beesoft-components 0.12.4 → 0.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function($t,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("react/jsx-runtime"),require("react"),require("@beesoft/locale"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@beesoft/locale","react-dom"],X):($t=typeof globalThis<"u"?globalThis:$t||self,X($t.BeeSoftComponents={},$t.React,$t.React,$t["beesoft-locale"],$t.ReactDOM))})(this,(function($t,X,H,yT,vT){"use strict";function ST(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}return t.default=n,Object.freeze(t)}const Ha=ST(H),bT=Math.PI/180;function ET(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const rc=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},Ot={_global:rc,version:"10.0.12",isBrowser:ET(),isUnminified:/param/.test((function(n){}).toString()),dblClickWindow:400,getAngle(n){return Ot.angleDeg?n*bT:n},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_renderBackend:"web",legacyTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return Ot.DD.isDragging},isTransforming(){var n,t;return(t=(n=Ot.Transformer)===null||n===void 0?void 0:n.isTransforming())!==null&&t!==void 0?t:!1},isDragReady(){return!!Ot.DD.node},releaseCanvasOnDestroy:!0,document:rc.document,_injectGlobal(n){typeof rc.Konva<"u"&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),rc.Konva=n}},En=n=>{Ot[n.prototype.getClassName()]=n};Ot._injectGlobal(Ot);const TT=`Konva.js unsupported environment.
1
+ (function(te,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("react/jsx-runtime"),require("react"),require("@beesoft/locale"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@beesoft/locale","react-dom"],X):(te=typeof globalThis<"u"?globalThis:te||self,X(te.BeeSoftComponents={},te.React,te.React,te["beesoft-locale"],te.ReactDOM))})(this,(function(te,X,w,vT,ST){"use strict";function bT(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}return t.default=n,Object.freeze(t)}const wa=bT(w),ET=Math.PI/180;function TT(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const sc=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},Nt={_global:sc,version:"10.0.12",isBrowser:TT(),isUnminified:/param/.test((function(n){}).toString()),dblClickWindow:400,getAngle(n){return Nt.angleDeg?n*ET:n},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_renderBackend:"web",legacyTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return Nt.DD.isDragging},isTransforming(){var n,t;return(t=(n=Nt.Transformer)===null||n===void 0?void 0:n.isTransforming())!==null&&t!==void 0?t:!1},isDragReady(){return!!Nt.DD.node},releaseCanvasOnDestroy:!0,document:sc.document,_injectGlobal(n){typeof sc.Konva<"u"&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),sc.Konva=n}},Tn=n=>{Nt[n.prototype.getClassName()]=n};Nt._injectGlobal(Nt);const CT=`Konva.js unsupported environment.
2
2
 
3
3
  Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined.
4
4
 
@@ -11,66 +11,66 @@ or
11
11
 
12
12
  bash: npm install skia-canvas
13
13
  js: import "konva/skia-backend";
14
- `,c5=()=>{if(typeof document>"u")throw new Error(TT)};class Qi{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Qi(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){const i=this.m;return{x:i[0]*t.x+i[2]*t.y+i[4],y:i[1]*t.x+i[3]*t.y+i[5]}}translate(t,i){return this.m[4]+=this.m[0]*t+this.m[2]*i,this.m[5]+=this.m[1]*t+this.m[3]*i,this}scale(t,i){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=i,this.m[3]*=i,this}rotate(t){const i=Math.cos(t),s=Math.sin(t),u=this.m[0]*i+this.m[2]*s,c=this.m[1]*i+this.m[3]*s,f=this.m[0]*-s+this.m[2]*i,p=this.m[1]*-s+this.m[3]*i;return this.m[0]=u,this.m[1]=c,this.m[2]=f,this.m[3]=p,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,i){const s=this.m[0]+this.m[2]*i,u=this.m[1]+this.m[3]*i,c=this.m[2]+this.m[0]*t,f=this.m[3]+this.m[1]*t;return this.m[0]=s,this.m[1]=u,this.m[2]=c,this.m[3]=f,this}multiply(t){const i=this.m[0]*t.m[0]+this.m[2]*t.m[1],s=this.m[1]*t.m[0]+this.m[3]*t.m[1],u=this.m[0]*t.m[2]+this.m[2]*t.m[3],c=this.m[1]*t.m[2]+this.m[3]*t.m[3],f=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],p=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=i,this.m[1]=s,this.m[2]=u,this.m[3]=c,this.m[4]=f,this.m[5]=p,this}invert(){const t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),i=this.m[3]*t,s=-this.m[1]*t,u=-this.m[2]*t,c=this.m[0]*t,f=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),p=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=i,this.m[1]=s,this.m[2]=u,this.m[3]=c,this.m[4]=f,this.m[5]=p,this}getMatrix(){return this.m}decompose(){const t=this.m[0],i=this.m[1],s=this.m[2],u=this.m[3],c=this.m[4],f=this.m[5],p=t*u-i*s,m={x:c,y:f,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||i!=0){const S=Math.sqrt(t*t+i*i);m.rotation=i>0?Math.acos(t/S):-Math.acos(t/S),m.scaleX=S,m.scaleY=p/S,m.skewX=(t*s+i*u)/p,m.skewY=0}else if(s!=0||u!=0){const S=Math.sqrt(s*s+u*u);m.rotation=Math.PI/2-(u>0?Math.acos(-s/S):-Math.acos(s/S)),m.scaleX=p/S,m.scaleY=S,m.skewX=0,m.skewY=(t*s+i*u)/p}return m.rotation=k._getRotation(m.rotation),m}}const CT="[object Array]",_T="[object Number]",xT="[object String]",DT="[object Boolean]",AT=Math.PI/180,MT=180/Math.PI,Hp="#",NT="",OT="0",RT="Konva warning: ",f5="Konva error: ",zT="rgb(",S2={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},HT=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let E1=[],wp=null;const wT=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(n){setTimeout(n,60)},k={_isElement(n){return!!(n&&n.nodeType==1)},_isFunction(n){return!!(n&&n.constructor&&n.call&&n.apply)},_isPlainObject(n){return!!n&&n.constructor===Object},_isArray(n){return Object.prototype.toString.call(n)===CT},_isNumber(n){return Object.prototype.toString.call(n)===_T&&!isNaN(n)&&isFinite(n)},_isString(n){return Object.prototype.toString.call(n)===xT},_isBoolean(n){return Object.prototype.toString.call(n)===DT},isObject(n){return n instanceof Object},isValidSelector(n){if(typeof n!="string")return!1;const t=n[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(n){return n===0||n>0?1:-1},requestAnimFrame(n){E1.push(n),E1.length===1&&wT(function(){const t=E1;E1=[],t.forEach(function(i){i()})})},createCanvasElement(){c5();const n=document.createElement("canvas");try{n.style=n.style||{}}catch{}return n},createImageElement(){return c5(),document.createElement("img")},_isInDocument(n){for(;n=n.parentNode;)if(n==document)return!0;return!1},_urlToImage(n,t){const i=k.createImageElement();i.onload=function(){t(i)},i.src=n},_rgbToHex(n,t,i){return((1<<24)+(n<<16)+(t<<8)+i).toString(16).slice(1)},_hexToRgb(n){n=n.replace(Hp,NT);const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){let n=(Math.random()*16777215<<0).toString(16);for(;n.length<6;)n=OT+n;return Hp+n},isCanvasFarblingActive(){if(wp!==null)return wp;if(typeof document>"u")return wp=!1,!1;const n=this.createCanvasElement();n.width=10,n.height=10;const t=n.getContext("2d",{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle="#282828",t.fillRect(0,0,10,10);const i=t.getImageData(0,0,10,10).data;let s=!1;for(let u=0;u<100;u++)if(i[u*4]!==40||i[u*4+1]!==40||i[u*4+2]!==40||i[u*4+3]!==255){s=!0;break}return wp=s,this.releaseCanvas(n),wp},getHitColor(){const n=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(n):n},getHitColorKey(n,t,i){return this.isCanvasFarblingActive()&&(n=Math.round(n/5)*5,t=Math.round(t/5)*5,i=Math.round(i/5)*5),Hp+this._rgbToHex(n,t,i)},getSnappedHexColor(n){const t=this._hexToRgb(n);return Hp+this._rgbToHex(Math.round(t.r/5)*5,Math.round(t.g/5)*5,Math.round(t.b/5)*5)},getRGB(n){let t;return n in S2?(t=S2[n],{r:t[0],g:t[1],b:t[2]}):n[0]===Hp?this._hexToRgb(n.substring(1)):n.substr(0,4)===zT?(t=HT.exec(n.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(n){return n=n||"black",k._namedColorToRBA(n)||k._hex3ColorToRGBA(n)||k._hex4ColorToRGBA(n)||k._hex6ColorToRGBA(n)||k._hex8ColorToRGBA(n)||k._rgbColorToRGBA(n)||k._rgbaColorToRGBA(n)||k._hslColorToRGBA(n)},_namedColorToRBA(n){const t=S2[n.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(n){if(n.indexOf("rgb(")===0){n=n.match(/rgb\(([^)]+)\)/)[1];const t=n.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(n){if(n.indexOf("rgba(")===0){n=n.match(/rgba\(([^)]+)\)/)[1];const t=n.split(/ *, */).map((i,s)=>i.slice(-1)==="%"?s===3?parseInt(i)/100:parseInt(i)/100*255:Number(i));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(n){if(n[0]==="#"&&n.length===9)return{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16),a:parseInt(n.slice(7,9),16)/255}},_hex6ColorToRGBA(n){if(n[0]==="#"&&n.length===7)return{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16),a:1}},_hex4ColorToRGBA(n){if(n[0]==="#"&&n.length===5)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16),a:parseInt(n[4]+n[4],16)/255}},_hex3ColorToRGBA(n){if(n[0]==="#"&&n.length===4)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16),a:1}},_hslColorToRGBA(n){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(n)){const[t,...i]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(n),s=Number(i[0])/360,u=Number(i[1])/100,c=Number(i[2])/100;let f,p,m;if(u===0)return m=c*255,{r:Math.round(m),g:Math.round(m),b:Math.round(m),a:1};c<.5?f=c*(1+u):f=c+u-c*u;const S=2*c-f,b=[0,0,0];for(let _=0;_<3;_++)p=s+1/3*-(_-1),p<0&&p++,p>1&&p--,6*p<1?m=S+(f-S)*6*p:2*p<1?m=f:3*p<2?m=S+(f-S)*(2/3-p)*6:m=S,b[_]=m*255;return{r:Math.round(b[0]),g:Math.round(b[1]),b:Math.round(b[2]),a:1}}},haveIntersection(n,t){return!(t.x>n.x+n.width||t.x+t.width<n.x||t.y>n.y+n.height||t.y+t.height<n.y)},cloneObject(n){const t={};for(const i in n)this._isPlainObject(n[i])?t[i]=this.cloneObject(n[i]):this._isArray(n[i])?t[i]=this.cloneArray(n[i]):t[i]=n[i];return t},cloneArray(n){return n.slice(0)},degToRad(n){return n*AT},radToDeg(n){return n*MT},_degToRad(n){return k.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),k.degToRad(n)},_radToDeg(n){return k.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),k.radToDeg(n)},_getRotation(n){return Ot.angleDeg?k.radToDeg(n):n},_capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)},throw(n){throw new Error(f5+n)},error(n){console.error(f5+n)},warn(n){Ot.showWarnings&&console.warn(RT+n)},each(n,t){for(const i in n)t(i,n[i])},_inRange(n,t,i){return t<=n&&n<i},_getProjectionToSegment(n,t,i,s,u,c){let f,p,m;const S=(n-i)*(n-i)+(t-s)*(t-s);if(S==0)f=n,p=t,m=(u-i)*(u-i)+(c-s)*(c-s);else{const b=((u-n)*(i-n)+(c-t)*(s-t))/S;b<0?(f=n,p=t,m=(n-u)*(n-u)+(t-c)*(t-c)):b>1?(f=i,p=s,m=(i-u)*(i-u)+(s-c)*(s-c)):(f=n+b*(i-n),p=t+b*(s-t),m=(f-u)*(f-u)+(p-c)*(p-c))}return[f,p,m]},_getProjectionToLine(n,t,i){const s=k.cloneObject(n);let u=Number.MAX_VALUE;return t.forEach(function(c,f){if(!i&&f===t.length-1)return;const p=t[(f+1)%t.length],m=k._getProjectionToSegment(c.x,c.y,p.x,p.y,n.x,n.y),S=m[0],b=m[1],_=m[2];_<u&&(s.x=S,s.y=b,u=_)}),s},_prepareArrayForTween(n,t,i){const s=[],u=[];if(n.length>t.length){const f=t;t=n,n=f}for(let f=0;f<n.length;f+=2)s.push({x:n[f],y:n[f+1]});for(let f=0;f<t.length;f+=2)u.push({x:t[f],y:t[f+1]});const c=[];return u.forEach(function(f){const p=k._getProjectionToLine(f,s,i);c.push(p.x),c.push(p.y)}),c},_prepareToStringify(n){let t;n.visitedByCircularReferenceRemoval=!0;for(const i in n)if(n.hasOwnProperty(i)&&n[i]&&typeof n[i]=="object"){if(t=Object.getOwnPropertyDescriptor(n,i),n[i].visitedByCircularReferenceRemoval||k._isElement(n[i]))if(t.configurable)delete n[i];else return null;else if(k._prepareToStringify(n[i])===null)if(t.configurable)delete n[i];else return null}return delete n.visitedByCircularReferenceRemoval,n},_assign(n,t){for(const i in t)n[i]=t[i];return n},_getFirstPointerId(n){return n.touches?n.changedTouches[0].identifier:n.pointerId||999},releaseCanvas(...n){Ot.releaseCanvasOnDestroy&&n.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(n,t,i,s){let u=t<0?t:0,c=i<0?i:0;t=Math.abs(t),i=Math.abs(i);let f=0,p=0,m=0,S=0;typeof s=="number"?f=p=m=S=Math.min(s,t/2,i/2):(f=Math.min(s[0]||0,t/2,i/2),p=Math.min(s[1]||0,t/2,i/2),S=Math.min(s[2]||0,t/2,i/2),m=Math.min(s[3]||0,t/2,i/2)),n.moveTo(u+f,c),n.lineTo(u+t-p,c),n.arc(u+t-p,c+p,p,Math.PI*3/2,0,!1),n.lineTo(u+t,c+i-S),n.arc(u+t-S,c+i-S,S,0,Math.PI/2,!1),n.lineTo(u+m,c+i),n.arc(u+m,c+i-m,m,Math.PI/2,Math.PI,!1),n.lineTo(u,c+f),n.arc(u+f,c+f,f,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(n,t,i,s,u){s=Math.abs(s);for(let c=0;c<i;c++){const f=t[(c-1+i)%i],p=t[c],m=t[(c+1)%i],S={x:p.x-f.x,y:p.y-f.y},b={x:m.x-p.x,y:m.y-p.y},_=Math.hypot(S.x,S.y),x=Math.hypot(b.x,b.y);let D;typeof u=="number"?D=u:D=c<u.length?u[c]:0,D=s*Math.cos(Math.PI/i)*Math.min(1,D/s*2);const N={x:S.x/_,y:S.y/_},R={x:b.x/x,y:b.y/x},O={x:p.x-N.x*D,y:p.y-N.y*D},U={x:p.x+R.x*D,y:p.y+R.y*D};c===0?n.moveTo(O.x,O.y):n.lineTo(O.x,O.y),n.arcTo(p.x,p.y,U.x,U.y,D)}}};function UT(n){const t=[],i=n.length,s=k;for(let u=0;u<i;u++){let c=n[u];s._isNumber(c)?c=Math.round(c*1e3)/1e3:s._isString(c)||(c=c+""),t.push(c)}return t}const h5=",",BT="(",VT=")",GT="([",jT="])",LT=";",PT="()",YT="=",d5=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],qT=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],XT=100;let T1=null;function p5(){if(T1!==null)return T1;try{const t=k.createCanvasElement().getContext("2d");return t?!!t&&"filter"in t:(T1=!1,!1)}catch{return T1=!1,!1}}class C1{constructor(t){this.canvas=t,Ot.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,i){let s=this.traceArr,u=s.length,c="",f,p,m,S;for(f=0;f<u;f++)p=s[f],m=p.method,m?(S=p.args,c+=m,t?c+=PT:k._isArray(S[0])?c+=GT+S.join(h5)+jT:(i&&(S=S.map(b=>typeof b=="number"?Math.floor(b):b)),c+=BT+S.join(h5)+VT)):(c+=p.property,t||(c+=YT+p.val)),c+=LT;return c}clearTrace(){this.traceArr=[]}_trace(t){let i=this.traceArr,s;i.push(t),s=i.length,s>=XT&&i.shift()}reset(){const t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){const i=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,i.getWidth()/i.pixelRatio,i.getHeight()/i.pixelRatio)}_applyLineCap(t){const i=t.attrs.lineCap;i&&this.setAttr("lineCap",i)}_applyOpacity(t){const i=t.getAbsoluteOpacity();i!==1&&this.setAttr("globalAlpha",i)}_applyLineJoin(t){const i=t.attrs.lineJoin;i&&this.setAttr("lineJoin",i)}_applyMiterLimit(t){const i=t.attrs.miterLimit;i!=null&&this.setAttr("miterLimit",i)}setAttr(t,i){this._context[t]=i}arc(t,i,s,u,c,f){this._context.arc(t,i,s,u,c,f)}arcTo(t,i,s,u,c){this._context.arcTo(t,i,s,u,c)}beginPath(){this._context.beginPath()}bezierCurveTo(t,i,s,u,c,f){this._context.bezierCurveTo(t,i,s,u,c,f)}clearRect(t,i,s,u){this._context.clearRect(t,i,s,u)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,i){const s=arguments;if(s.length===2)return this._context.createImageData(t,i);if(s.length===1)return this._context.createImageData(t)}createLinearGradient(t,i,s,u){return this._context.createLinearGradient(t,i,s,u)}createPattern(t,i){return this._context.createPattern(t,i)}createRadialGradient(t,i,s,u,c,f){return this._context.createRadialGradient(t,i,s,u,c,f)}drawImage(t,i,s,u,c,f,p,m,S){const b=arguments,_=this._context;b.length===3?_.drawImage(t,i,s):b.length===5?_.drawImage(t,i,s,u,c):b.length===9&&_.drawImage(t,i,s,u,c,f,p,m,S)}ellipse(t,i,s,u,c,f,p,m){this._context.ellipse(t,i,s,u,c,f,p,m)}isPointInPath(t,i,s,u){return s?this._context.isPointInPath(s,t,i,u):this._context.isPointInPath(t,i,u)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,i,s,u){this._context.fillRect(t,i,s,u)}strokeRect(t,i,s,u){this._context.strokeRect(t,i,s,u)}fillText(t,i,s,u){u?this._context.fillText(t,i,s,u):this._context.fillText(t,i,s)}measureText(t){return this._context.measureText(t)}getImageData(t,i,s,u){return this._context.getImageData(t,i,s,u)}lineTo(t,i){this._context.lineTo(t,i)}moveTo(t,i){this._context.moveTo(t,i)}rect(t,i,s,u){this._context.rect(t,i,s,u)}roundRect(t,i,s,u,c){this._context.roundRect(t,i,s,u,c)}putImageData(t,i,s){this._context.putImageData(t,i,s)}quadraticCurveTo(t,i,s,u){this._context.quadraticCurveTo(t,i,s,u)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,i){this._context.scale(t,i)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,i,s,u,c,f){this._context.setTransform(t,i,s,u,c,f)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,i,s,u){this._context.strokeText(t,i,s,u)}transform(t,i,s,u,c,f){this._context.transform(t,i,s,u,c,f)}translate(t,i){this._context.translate(t,i)}_enableTrace(){let t=this,i=d5.length,s=this.setAttr,u,c;const f=function(p){let m=t[p],S;t[p]=function(){return c=UT(Array.prototype.slice.call(arguments,0)),S=m.apply(t,arguments),t._trace({method:p,args:c}),S}};for(u=0;u<i;u++)f(d5[u]);t.setAttr=function(){s.apply(t,arguments);const p=arguments[0];let m=arguments[1];(p==="shadowOffsetX"||p==="shadowOffsetY"||p==="shadowBlur")&&(m=m/this.canvas.getPixelRatio()),t._trace({property:p,val:m})}}_applyGlobalCompositeOperation(t){const i=t.attrs.globalCompositeOperation;!i||i==="source-over"||this.setAttr("globalCompositeOperation",i)}}qT.forEach(function(n){Object.defineProperty(C1.prototype,n,{get(){return this._context[n]},set(t){this._context[n]=t}})});class KT extends C1{constructor(t,{willReadFrequently:i=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:i})}_fillColor(t){const i=t.fill();this.setAttr("fillStyle",i),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){const i=t._getLinearGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fillRadialGradient(t){const i=t._getRadialGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fill(t){const i=t.fill(),s=t.getFillPriority();if(i&&s==="color"){this._fillColor(t);return}const u=t.getFillPatternImage();if(u&&s==="pattern"){this._fillPattern(t);return}const c=t.getFillLinearGradientColorStops();if(c&&s==="linear-gradient"){this._fillLinearGradient(t);return}const f=t.getFillRadialGradientColorStops();if(f&&s==="radial-gradient"){this._fillRadialGradient(t);return}i?this._fillColor(t):u?this._fillPattern(t):c?this._fillLinearGradient(t):f&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const i=t.getStrokeLinearGradientStartPoint(),s=t.getStrokeLinearGradientEndPoint(),u=t.getStrokeLinearGradientColorStops(),c=this.createLinearGradient(i.x,i.y,s.x,s.y);if(u){for(let f=0;f<u.length;f+=2)c.addColorStop(u[f],u[f+1]);this.setAttr("strokeStyle",c)}}_stroke(t){const i=t.dash(),s=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!s){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(t),i&&t.dashEnabled()&&(this.setLineDash(i),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),s||this.restore()}}_applyShadow(t){var i,s,u;const c=(i=t.getShadowRGBA())!==null&&i!==void 0?i:"black",f=(s=t.getShadowBlur())!==null&&s!==void 0?s:5,p=(u=t.getShadowOffset())!==null&&u!==void 0?u:{x:0,y:0},m=t.getAbsoluteScale(),S=this.canvas.getPixelRatio(),b=m.x*S,_=m.y*S;this.setAttr("shadowColor",c),this.setAttr("shadowBlur",f*Math.min(Math.abs(b),Math.abs(_))),this.setAttr("shadowOffsetX",p.x*b),this.setAttr("shadowOffsetY",p.y*_)}}class QT extends C1{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const i=t.getStrokeScaleEnabled();if(!i){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(t);const s=t.hitStrokeWidth(),u=s==="auto"?t.strokeWidth():s;this.setAttr("lineWidth",u),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}}let _1;function ZT(){if(_1)return _1;const n=k.createCanvasElement(),t=n.getContext("2d");return _1=(function(){const i=Ot._global.devicePixelRatio||1,s=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return i/s})(),k.releaseCanvas(n),_1}class b2{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const s=(t||{}).pixelRatio||Ot.pixelRatio||ZT();this.pixelRatio=s,this._canvas=k.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){const i=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/i,this.getHeight()/i)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,i){this.setWidth(t||0),this.setHeight(i||0)}toDataURL(t,i){try{return this._canvas.toDataURL(t,i)}catch{try{return this._canvas.toDataURL()}catch(u){return k.error("Unable to get data URL. "+u.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class Vo extends b2{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new KT(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}class E2 extends b2{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new QT(this),this.setSize(t.width,t.height)}}const Ne={get isDragging(){let n=!1;return Ne._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return Ne._dragElements.forEach(t=>{n=t.node}),n},_dragElements:new Map,_drag(n){const t=[];Ne._dragElements.forEach((i,s)=>{const{node:u}=i,c=u.getStage();c.setPointersPositions(n),i.pointerId===void 0&&(i.pointerId=k._getFirstPointerId(n));const f=c._changedPointerPositions.find(p=>p.id===i.pointerId);if(f){if(i.dragStatus!=="dragging"){const p=u.dragDistance();if(Math.max(Math.abs(f.x-i.startPointerPos.x),Math.abs(f.y-i.startPointerPos.y))<p||(u.startDrag({evt:n}),!u.isDragging()))return}u._setDragPosition(n,i),t.push(u)}}),t.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:n},!0)})},_endDragBefore(n){const t=[];Ne._dragElements.forEach(i=>{const{node:s}=i,u=s.getStage();if(n&&u.setPointersPositions(n),!u._changedPointerPositions.find(p=>p.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(Ne.justDragged=!0,Ot._mouseListenClick=!1,Ot._touchListenClick=!1,Ot._pointerListenClick=!1,i.dragStatus="stopped");const f=i.node.getLayer()||i.node instanceof Ot.Stage&&i.node;f&&t.indexOf(f)===-1&&t.push(f)}),t.forEach(i=>{i.draw()})},_endDragAfter(n){Ne._dragElements.forEach((t,i)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:n},!0),t.dragStatus!=="dragging"&&Ne._dragElements.delete(i)})}};Ot.isBrowser&&(window.addEventListener("mouseup",Ne._endDragBefore,!0),window.addEventListener("touchend",Ne._endDragBefore,!0),window.addEventListener("touchcancel",Ne._endDragBefore,!0),window.addEventListener("mousemove",Ne._drag),window.addEventListener("touchmove",Ne._drag),window.addEventListener("mouseup",Ne._endDragAfter,!1),window.addEventListener("touchend",Ne._endDragAfter,!1),window.addEventListener("touchcancel",Ne._endDragAfter,!1));function Go(n){return k._isString(n)?'"'+n+'"':Object.prototype.toString.call(n)==="[object Number]"||k._isBoolean(n)?n:Object.prototype.toString.call(n)}function m5(n){return n>255?255:n<0?0:Math.round(n)}function Dt(){if(Ot.isUnminified)return function(n,t){return k._isNumber(n)||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),n}}function x1(n){if(Ot.isUnminified)return function(t,i){let s=k._isNumber(t),u=k._isArray(t)&&t.length==n;return!s&&!u&&k.warn(Go(t)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+n+")"),t}}function T2(){if(Ot.isUnminified)return function(n,t){return k._isNumber(n)||n==="auto"||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),n}}function oc(){if(Ot.isUnminified)return function(n,t){return k._isString(n)||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),n}}function g5(){if(Ot.isUnminified)return function(n,t){const i=k._isString(n),s=Object.prototype.toString.call(n)==="[object CanvasGradient]"||n&&n.addColorStop;return i||s||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),n}}function JT(){if(Ot.isUnminified)return function(n,t){const i=Int8Array?Object.getPrototypeOf(Int8Array):null;return i&&n instanceof i||(k._isArray(n)?n.forEach(function(s){k._isNumber(s)||k.warn('"'+t+'" attribute has non numeric element '+s+". Make sure that all elements are numbers.")}):k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),n}}function sl(){if(Ot.isUnminified)return function(n,t){return n===!0||n===!1||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),n}}function FT(n){if(Ot.isUnminified)return function(t,i){return t==null||k.isObject(t)||k.warn(Go(t)+' is a not valid value for "'+i+'" attribute. The value should be an object with properties '+n),t}}const Up="get",Bp="set",G={addGetterSetter(n,t,i,s,u){G.addGetter(n,t,i),G.addSetter(n,t,s,u),G.addOverloadedGetterSetter(n,t)},addGetter(n,t,i){const s=Up+k._capitalize(t);n.prototype[s]=n.prototype[s]||function(){const u=this.attrs[t];return u===void 0?i:u}},addSetter(n,t,i,s){const u=Bp+k._capitalize(t);n.prototype[u]||G.overWriteSetter(n,t,i,s)},overWriteSetter(n,t,i,s){const u=Bp+k._capitalize(t);n.prototype[u]=function(c){return i&&c!==void 0&&c!==null&&(c=i.call(this,c,t)),this._setAttr(t,c),s&&s.call(this),this}},addComponentsGetterSetter(n,t,i,s,u){const c=i.length,f=k._capitalize,p=Up+f(t),m=Bp+f(t);n.prototype[p]=function(){const b={};for(let _=0;_<c;_++){const x=i[_];b[x]=this.getAttr(t+f(x))}return b};const S=FT(i);n.prototype[m]=function(b){const _=this.attrs[t];s&&(b=s.call(this,b,t)),S&&S.call(this,b,t);for(const x in b)b.hasOwnProperty(x)&&this._setAttr(t+f(x),b[x]);return b||i.forEach(x=>{this._setAttr(t+f(x),void 0)}),this._fireChangeEvent(t,_,b),u&&u.call(this),this},G.addOverloadedGetterSetter(n,t)},addOverloadedGetterSetter(n,t){const i=k._capitalize(t),s=Bp+i,u=Up+i;n.prototype[t]=function(){return arguments.length?(this[s](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(n,t,i,s){k.error("Adding deprecated "+t);const u=Up+k._capitalize(t),c=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";n.prototype[u]=function(){k.error(c);const f=this.attrs[t];return f===void 0?i:f},G.addSetter(n,t,s,function(){k.error(c)}),G.addOverloadedGetterSetter(n,t)},backCompat(n,t){k.each(t,function(i,s){const u=n.prototype[s],c=Up+k._capitalize(i),f=Bp+k._capitalize(i);function p(){u.apply(this,arguments),k.error('"'+i+'" method is deprecated and will be removed soon. Use ""'+s+'" instead.')}n.prototype[i]=p,n.prototype[c]=p,n.prototype[f]=p})},afterSetFilter(){this._filterUpToDate=!1}};function kT(n){const t=/(\w+)\(([^)]+)\)/g;let i;for(;(i=t.exec(n))!==null;){const[,s,u]=i;switch(s){case"blur":{const c=parseFloat(u.replace("px",""));return function(f){this.blurRadius(c*.5);const p=Ot.Filters;p&&p.Blur&&p.Blur.call(this,f)}}case"brightness":{const c=u.includes("%")?parseFloat(u)/100:parseFloat(u);return function(f){this.brightness(c);const p=Ot.Filters;p&&p.Brightness&&p.Brightness.call(this,f)}}case"contrast":{const c=parseFloat(u);return function(f){const p=100*(Math.sqrt(c)-1);this.contrast(p);const m=Ot.Filters;m&&m.Contrast&&m.Contrast.call(this,f)}}case"grayscale":return function(c){const f=Ot.Filters;f&&f.Grayscale&&f.Grayscale.call(this,c)};case"sepia":return function(c){const f=Ot.Filters;f&&f.Sepia&&f.Sepia.call(this,c)};case"invert":return function(c){const f=Ot.Filters;f&&f.Invert&&f.Invert.call(this,c)};default:k.warn(`CSS filter "${s}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const D1="absoluteOpacity",A1="allEventListeners",Mr="absoluteTransform",y5="absoluteScale",uc="canvas",IT="Change",WT="children",$T="konva",C2="listening",tC="mouseenter",eC="mouseleave",nC="pointerenter",aC="pointerleave",iC="touchenter",sC="touchleave",v5="set",S5="Shape",M1=" ",b5="stage",jo="transform",lC="Stage",_2="visible",rC=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(M1);let oC=1,Nt=class u5{constructor(t){this._id=oC++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===jo||t===Mr)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,i){let s=this._cache.get(t);return(s===void 0||(t===jo||t===Mr)&&s.dirty===!0)&&(s=i.call(this),this._cache.set(t,s)),s}_calculate(t,i,s){if(!this._attachedDepsListeners.get(t)){const u=i.map(c=>c+"Change.konva").join(M1);this.on(u,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,s)}_getCanvasCache(){return this._cache.get(uc)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Mr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(uc)){const{scene:t,filter:i,hit:s,buffer:u}=this._cache.get(uc);k.releaseCanvas(t,i,s,u),this._cache.delete(uc)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){const i=t||{};let s={};(i.x===void 0||i.y===void 0||i.width===void 0||i.height===void 0)&&(s=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let u=Math.ceil(i.width||s.width),c=Math.ceil(i.height||s.height),f=i.pixelRatio,p=i.x===void 0?Math.floor(s.x):i.x,m=i.y===void 0?Math.floor(s.y):i.y,S=i.offset||0,b=i.drawBorder||!1,_=i.hitCanvasPixelRatio||1;if(!u||!c){k.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const x=Math.abs(Math.round(s.x)-p)>.5?1:0,D=Math.abs(Math.round(s.y)-m)>.5?1:0;u+=S*2+x,c+=S*2+D,p-=S,m-=S;const A=new Vo({pixelRatio:f,width:u,height:c}),N=new Vo({pixelRatio:f,width:0,height:0,willReadFrequently:!0}),R=new E2({pixelRatio:_,width:u,height:c}),O=A.getContext(),U=R.getContext(),j=new Vo({width:A.width/A.pixelRatio+Math.abs(p),height:A.height/A.pixelRatio+Math.abs(m),pixelRatio:A.pixelRatio}),V=j.getContext();return R.isCache=!0,A.isCache=!0,this._cache.delete(uc),this._filterUpToDate=!1,i.imageSmoothingEnabled===!1&&(A.getContext()._context.imageSmoothingEnabled=!1,N.getContext()._context.imageSmoothingEnabled=!1),O.save(),U.save(),V.save(),O.translate(-p,-m),U.translate(-p,-m),V.translate(-p,-m),j.x=p,j.y=m,this._isUnderCache=!0,this._clearSelfAndDescendantCache(D1),this._clearSelfAndDescendantCache(y5),this.drawScene(A,this,j),this.drawHit(R,this),this._isUnderCache=!1,O.restore(),U.restore(),b&&(O.save(),O.beginPath(),O.rect(0,0,u,c),O.closePath(),O.setAttr("strokeStyle","red"),O.setAttr("lineWidth",5),O.stroke(),O.restore()),this._cache.set(uc,{scene:A,filter:N,hit:R,buffer:j,x:p,y:m}),this._requestDraw(),this}isCached(){return this._cache.has(uc)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,i){const s=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];let u=1/0,c=1/0,f=-1/0,p=-1/0;const m=this.getAbsoluteTransform(i);return s.forEach(function(S){const b=m.point(S);u===void 0&&(u=f=b.x,c=p=b.y),u=Math.min(u,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),p=Math.max(p,b.y)}),{x:u,y:c,width:f-u,height:p-c}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const i=this._getCanvasCache();t.translate(i.x,i.y);const s=this._getCachedSceneCanvas(),u=s.pixelRatio;t.drawImage(s._canvas,0,0,s.width/u,s.height/u),t.restore()}_drawCachedHitCanvas(t){const i=this._getCanvasCache(),s=i.hit;t.save(),t.translate(i.x,i.y),t.drawImage(s._canvas,0,0,s.width/s.pixelRatio,s.height/s.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),i=this._getCanvasCache(),s=i.scene,u=i.filter,c=u.getContext(),f,p,m,S;if(!t||t.length===0)return s;if(this._filterUpToDate)return u;let b=!0;for(let x=0;x<t.length;x++)if(typeof t[x]=="string"&&p5(),typeof t[x]!="string"||!p5()){b=!1;break}const _=s.pixelRatio;if(u.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio),b){const x=t.join(" ");return c.save(),c.setAttr("filter",x),c.drawImage(s._canvas,0,0,s.getWidth()/_,s.getHeight()/_),c.restore(),this._filterUpToDate=!0,u}try{for(f=t.length,c.clear(),c.drawImage(s._canvas,0,0,s.getWidth()/_,s.getHeight()/_),p=c.getImageData(0,0,u.getWidth(),u.getHeight()),m=0;m<f;m++)S=t[m],typeof S=="string"&&(S=kT(S)),S.call(this,p),c.putImageData(p,0,0)}catch(x){k.error("Unable to apply filter. "+x.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,u}on(t,i){if(this._cache&&this._cache.delete(A1),arguments.length===3)return this._delegate.apply(this,arguments);const s=t.split(M1);for(let u=0;u<s.length;u++){const f=s[u].split("."),p=f[0],m=f[1]||"";this.eventListeners[p]||(this.eventListeners[p]=[]),this.eventListeners[p].push({name:m,handler:i})}return this}off(t,i){let s=(t||"").split(M1),u=s.length,c,f,p,m,S,b;if(this._cache&&this._cache.delete(A1),!t)for(f in this.eventListeners)this._off(f);for(c=0;c<u;c++)if(p=s[c],m=p.split("."),S=m[0],b=m[1],S)this.eventListeners[S]&&this._off(S,b,i);else for(f in this.eventListeners)this._off(f,b,i);return this}dispatchEvent(t){const i={target:this,type:t.type,evt:t};return this.fire(t.type,i),this}addEventListener(t,i){return this.on(t,function(s){i.call(this,s.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,i,s){const u=this;this.on(t,function(c){const f=c.target.findAncestors(i,!0,u);for(let p=0;p<f.length;p++)c=k.cloneObject(c),c.currentTarget=f[p],s.call(f[p],c)})}remove(){return this.isDragging()&&this.stopDrag(),Ne._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Mr),this._clearSelfAndDescendantCache(D1),this._clearSelfAndDescendantCache(y5),this._clearSelfAndDescendantCache(b5),this._clearSelfAndDescendantCache(_2),this._clearSelfAndDescendantCache(C2)}_remove(){this._clearCaches();const t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){const i="get"+k._capitalize(t);return k._isFunction(this[i])?this[i]():this.attrs[t]}getAncestors(){let t=this.getParent(),i=[];for(;t;)i.push(t),t=t.getParent();return i}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let i,s;if(!t)return this;for(i in t)i!==WT&&(s=v5+k._capitalize(i),k._isFunction(this[s])?this[s](t[i]):this._setAttr(i,t[i]))}),this}isListening(){return this._getCache(C2,this._isListening)}_isListening(t){if(!this.listening())return!1;const s=this.getParent();return s&&s!==t&&this!==t?s._isListening(t):!0}isVisible(){return this._getCache(_2,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const s=this.getParent();return s&&s!==t&&this!==t?s._isVisible(t):!0}shouldDrawHit(t,i=!1){if(t)return this._isVisible(t)&&this._isListening(t);const s=this.getLayer();let u=!1;Ne._dragElements.forEach(f=>{f.dragStatus==="dragging"&&(f.node.nodeType==="Stage"||f.node.getLayer()===s)&&(u=!0)});const c=!i&&!Ot.hitOnDragEnabled&&(u||Ot.isTransforming());return this.isListening()&&this.isVisible()&&!c}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),i=this,s=0,u,c,f,p;function m(b){for(u=[],c=b.length,f=0;f<c;f++)p=b[f],s++,p.nodeType!==S5&&(u=u.concat(p.getChildren().slice())),p._id===i._id&&(f=c);u.length>0&&u[0].getDepth()<=t&&m(u)}const S=this.getStage();return i.nodeType!==lC&&S&&m(S.getChildren()),s}getDepth(){let t=0,i=this.parent;for(;i;)t++,i=i.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(jo),this._clearSelfAndDescendantCache(Mr)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;const i=t.getPointerPosition();if(!i)return null;const s=this.getAbsoluteTransform().copy();return s.invert(),s.point(i)}getAbsolutePosition(t){let i=!1,s=this.parent;for(;s;){if(s.isCached()){i=!0;break}s=s.parent}i&&!t&&(t=!0);const u=this.getAbsoluteTransform(t).getMatrix(),c=new Qi,f=this.offset();return c.m=u.slice(),c.translate(f.x,f.y),c.getTranslation()}setAbsolutePosition(t){const{x:i,y:s,...u}=this._clearTransform();this.attrs.x=i,this.attrs.y=s,this._clearCache(jo);const c=this._getAbsoluteTransform().copy();return c.invert(),c.translate(t.x,t.y),t={x:this.attrs.x+c.getTranslation().x,y:this.attrs.y+c.getTranslation().y},this._setTransform(u),this.setPosition({x:t.x,y:t.y}),this._clearCache(jo),this._clearSelfAndDescendantCache(Mr),this}_setTransform(t){let i;for(i in t)this.attrs[i]=t[i]}_clearTransform(){const t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let i=t.x,s=t.y,u=this.x(),c=this.y();return i!==void 0&&(u+=i),s!==void 0&&(c+=s),this.setPosition({x:u,y:c}),this}_eachAncestorReverse(t,i){let s=[],u=this.getParent(),c,f;if(!(i&&i._id===this._id)){for(s.unshift(this);u&&(!i||u._id!==i._id);)s.unshift(u),u=u.parent;for(c=s.length,f=0;f<c;f++)t(s[f])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return k.warn("Node has no parent. moveToTop function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return k.warn("Node has no parent. moveUp function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return k.warn("Node has no parent. moveDown function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return k.warn("Node has no parent. moveToBottom function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return k.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&k.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(D1,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity();const i=this.getParent();return i&&!i._isUnderCache&&(t*=i.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t=this.getAttrs(),i,s,u,c,f;const p={attrs:{},className:this.getClassName()};for(i in t)s=t[i],f=k.isObject(s)&&!k._isPlainObject(s)&&!k._isArray(s),!f&&(u=typeof this[i]=="function"&&this[i],delete t[i],c=u?u.call(this):null,t[i]=s,c!==s&&(p.attrs[i]=s));return k._prepareToStringify(p)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,i,s){const u=[];i&&this._isMatch(t)&&u.push(this);let c=this.parent;for(;c;){if(c===s)return u;c._isMatch(t)&&u.push(c),c=c.parent}return u}isAncestorOf(t){return!1}findAncestor(t,i,s){return this.findAncestors(t,i,s)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);let i=t.replace(/ /g,"").split(","),s=i.length,u,c;for(u=0;u<s;u++)if(c=i[u],k.isValidSelector(c)||(k.warn('Selector "'+c+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),k.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),k.warn("Konva is awesome, right?")),c.charAt(0)==="#"){if(this.id()===c.slice(1))return!0}else if(c.charAt(0)==="."){if(this.hasName(c.slice(1)))return!0}else if(this.className===c||this.nodeType===c)return!0;return!1}getLayer(){const t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(b5,this._getStage)}_getStage(){const t=this.getParent();return t?t.getStage():null}fire(t,i={},s){return i.target=i.target||this,s?this._fireAndBubble(t,i):this._fire(t,i),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Mr,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let i;if(t)return i=new Qi,this._eachAncestorReverse(function(s){const u=s.transformsEnabled();u==="all"?i.multiply(s.getTransform()):u==="position"&&i.translate(s.x()-s.offsetX(),s.y()-s.offsetY())},t),i;{i=this._cache.get(Mr)||new Qi,this.parent?this.parent.getAbsoluteTransform().copyInto(i):i.reset();const s=this.transformsEnabled();if(s==="all")i.multiply(this.getTransform());else if(s==="position"){const u=this.attrs.x||0,c=this.attrs.y||0,f=this.attrs.offsetX||0,p=this.attrs.offsetY||0;i.translate(u-f,c-p)}return i.dirty=!1,i}}getAbsoluteScale(t){let i=this;for(;i;)i._isUnderCache&&(t=i),i=i.getParent();const u=this.getAbsoluteTransform(t).decompose();return{x:u.scaleX,y:u.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(jo,this._getTransform)}_getTransform(){var t,i;const s=this._cache.get(jo)||new Qi;s.reset();const u=this.x(),c=this.y(),f=Ot.getAngle(this.rotation()),p=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,m=(i=this.attrs.scaleY)!==null&&i!==void 0?i:1,S=this.attrs.skewX||0,b=this.attrs.skewY||0,_=this.attrs.offsetX||0,x=this.attrs.offsetY||0;return(u!==0||c!==0)&&s.translate(u,c),f!==0&&s.rotate(f),(S!==0||b!==0)&&s.skew(S,b),(p!==1||m!==1)&&s.scale(p,m),(_!==0||x!==0)&&s.translate(-1*_,-1*x),s.dirty=!1,s}clone(t){let i=k.cloneObject(this.attrs),s,u,c,f,p;for(s in t)i[s]=t[s];const m=new this.constructor(i);for(s in this.eventListeners)for(u=this.eventListeners[s],c=u.length,f=0;f<c;f++)p=u[f],p.name.indexOf($T)<0&&(m.eventListeners[s]||(m.eventListeners[s]=[]),m.eventListeners[s].push(p));return m}_toKonvaCanvas(t){t=t||{};const i=this.getClientRect(),s=this.getStage(),u=t.x!==void 0?t.x:Math.floor(i.x),c=t.y!==void 0?t.y:Math.floor(i.y),f=t.pixelRatio||1,p=new Vo({width:t.width||Math.ceil(i.width)||(s?s.width():0),height:t.height||Math.ceil(i.height)||(s?s.height():0),pixelRatio:f}),m=p.getContext(),S=new Vo({width:p.width/p.pixelRatio+Math.abs(u),height:p.height/p.pixelRatio+Math.abs(c),pixelRatio:p.pixelRatio});return t.imageSmoothingEnabled===!1&&(m._context.imageSmoothingEnabled=!1),m.save(),(u||c)&&m.translate(-1*u,-1*c),this.drawScene(p,void 0,S),m.restore(),p}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};const i=t.mimeType||null,s=t.quality||null,u=this._toKonvaCanvas(t).toDataURL(i,s);return t.callback&&t.callback(u),u}toImage(t){return new Promise((i,s)=>{try{const u=t?.callback;u&&delete t.callback,k._urlToImage(this.toDataURL(t),function(c){i(c),u?.(c)})}catch(u){s(u)}})}toBlob(t){return new Promise((i,s)=>{try{const u=t?.callback;u&&delete t.callback,this.toCanvas(t).toBlob(c=>{i(c),u?.(c)},t?.mimeType,t?.quality)}catch(u){s(u)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Ot.dragDistance}_off(t,i,s){let u=this.eventListeners[t],c,f,p;for(c=0;c<u.length;c++)if(f=u[c].name,p=u[c].handler,(f!=="konva"||i==="konva")&&(!i||f===i)&&(!s||s===p)){if(u.splice(c,1),u.length===0){delete this.eventListeners[t];break}c--}}_fireChangeEvent(t,i,s){this._fire(t+IT,{oldVal:i,newVal:s})}addName(t){if(!this.hasName(t)){const i=this.name(),s=i?i+" "+t:t;this.name(s)}return this}hasName(t){if(!t)return!1;const i=this.name();return i?(i||"").split(/\s/g).indexOf(t)!==-1:!1}removeName(t){const i=(this.name()||"").split(/\s/g),s=i.indexOf(t);return s!==-1&&(i.splice(s,1),this.name(i.join(" "))),this}setAttr(t,i){const s=this[v5+k._capitalize(t)];return k._isFunction(s)?s.call(this,i):this._setAttr(t,i),this}_requestDraw(){if(Ot.autoDrawEnabled){const t=this.getLayer()||this.getStage();t?.batchDraw()}}_setAttr(t,i){const s=this.attrs[t];s===i&&!k.isObject(i)||(i==null?delete this.attrs[t]:this.attrs[t]=i,this._shouldFireChangeEvents&&this._fireChangeEvent(t,s,i),this._requestDraw())}_setComponentAttr(t,i,s){let u;s!==void 0&&(u=this.attrs[t],u||(this.attrs[t]=this.getAttr(t)),this.attrs[t][i]=s,this._fireChangeEvent(t,u,s))}_fireAndBubble(t,i,s){i&&this.nodeType===S5&&(i.target=this);const u=[tC,eC,nC,aC,iC,sC];if(!(u.indexOf(t)!==-1&&(s&&(this===s||this.isAncestorOf&&this.isAncestorOf(s))||this.nodeType==="Stage"&&!s))){this._fire(t,i);const f=u.indexOf(t)!==-1&&s&&s.isAncestorOf&&s.isAncestorOf(this)&&!s.isAncestorOf(this.parent);(i&&!i.cancelBubble||!i)&&this.parent&&this.parent.isListening()&&!f&&(s&&s.parent?this._fireAndBubble.call(this.parent,t,i,s):this._fireAndBubble.call(this.parent,t,i))}}_getProtoListeners(t){var i,s,u;const c=(i=this._cache.get(A1))!==null&&i!==void 0?i:{};let f=c?.[t];if(f===void 0){f=[];let p=Object.getPrototypeOf(this);for(;p;){const m=(u=(s=p.eventListeners)===null||s===void 0?void 0:s[t])!==null&&u!==void 0?u:[];f.push(...m),p=Object.getPrototypeOf(p)}c[t]=f,this._cache.set(A1,c)}return f}_fire(t,i){i=i||{},i.currentTarget=this,i.type=t;const s=this._getProtoListeners(t);if(s)for(let c=0;c<s.length;c++)s[c].handler.call(this,i);const u=this.eventListeners[t];if(u)for(let c=0;c<u.length;c++)u[c].handler.call(this,i)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){const i=t?t.pointerId:void 0,s=this.getStage(),u=this.getAbsolutePosition();if(!s)return;const c=s._getPointerById(i)||s._changedPointerPositions[0]||u;Ne._dragElements.set(this._id,{node:this,startPointerPos:c,offset:{x:c.x-u.x,y:c.y-u.y},dragStatus:"ready",pointerId:i})}startDrag(t,i=!0){Ne._dragElements.has(this._id)||this._createDragElement(t);const s=Ne._dragElements.get(this._id);s.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},i)}_setDragPosition(t,i){const s=this.getStage()._getPointerById(i.pointerId);if(!s)return;let u={x:s.x-i.offset.x,y:s.y-i.offset.y};const c=this.dragBoundFunc();if(c!==void 0){const f=c.call(this,u,t);f?u=f:k.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==u.x||this._lastPos.y!==u.y)&&(this.setAbsolutePosition(u),this._requestDraw()),this._lastPos=u}stopDrag(t){const i=Ne._dragElements.get(this._id);i&&(i.dragStatus="stopped"),Ne._endDragBefore(t),Ne._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Ne._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(!(t.evt.button!==void 0)||Ot.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let u=!1;Ne._dragElements.forEach(c=>{this.isAncestorOf(c.node)&&(u=!0)}),u||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const i=Ne._dragElements.get(this._id),s=i&&i.dragStatus==="dragging",u=i&&i.dragStatus==="ready";s?this.stopDrag():u&&Ne._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const i=this.getStage();if(!i)return!1;const s={x:-t.x,y:-t.y,width:i.width()+2*t.x,height:i.height()+2*t.y};return k.haveIntersection(s,this.getClientRect())}static create(t,i){return k._isString(t)&&(t=JSON.parse(t)),this._createNode(t,i)}static _createNode(t,i){let s=u5.prototype.getClassName.call(t),u=t.children,c,f,p;i&&(t.attrs.container=i),Ot[s]||(k.warn('Can not find a node with class name "'+s+'". Fallback to "Shape".'),s="Shape");const m=Ot[s];if(c=new m(t.attrs),u)for(f=u.length,p=0;p<f;p++)c.add(u5._createNode(u[p]));return c}};Nt.prototype.nodeType="Node",Nt.prototype._attrsAffectingSize=[],Nt.prototype.eventListeners={},Nt.prototype.on.call(Nt.prototype,rC,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(jo),this._clearSelfAndDescendantCache(Mr)}),Nt.prototype.on.call(Nt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(_2)}),Nt.prototype.on.call(Nt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(C2)}),Nt.prototype.on.call(Nt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(D1)});const Ke=G.addGetterSetter;Ke(Nt,"zIndex"),Ke(Nt,"absolutePosition"),Ke(Nt,"position"),Ke(Nt,"x",0,Dt()),Ke(Nt,"y",0,Dt()),Ke(Nt,"globalCompositeOperation","source-over",oc()),Ke(Nt,"opacity",1,Dt()),Ke(Nt,"name","",oc()),Ke(Nt,"id","",oc()),Ke(Nt,"rotation",0,Dt()),G.addComponentsGetterSetter(Nt,"scale",["x","y"]),Ke(Nt,"scaleX",1,Dt()),Ke(Nt,"scaleY",1,Dt()),G.addComponentsGetterSetter(Nt,"skew",["x","y"]),Ke(Nt,"skewX",0,Dt()),Ke(Nt,"skewY",0,Dt()),G.addComponentsGetterSetter(Nt,"offset",["x","y"]),Ke(Nt,"offsetX",0,Dt()),Ke(Nt,"offsetY",0,Dt()),Ke(Nt,"dragDistance",void 0,Dt()),Ke(Nt,"width",0,Dt()),Ke(Nt,"height",0,Dt()),Ke(Nt,"listening",!0,sl()),Ke(Nt,"preventDefault",!0,sl()),Ke(Nt,"filters",void 0,function(n){return this._filterUpToDate=!1,n}),Ke(Nt,"visible",!0,sl()),Ke(Nt,"transformsEnabled","all",oc()),Ke(Nt,"size"),Ke(Nt,"dragBoundFunc"),Ke(Nt,"draggable",!1,sl()),G.backCompat(Nt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Zi extends Nt{constructor(){super(...arguments),this.children=[]}getChildren(t){const i=this.children||[];return t?i.filter(t):i}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(let s=0;s<t.length;s++)this.add(t[s]);return this}const i=t[0];return i.getParent()?(i.moveTo(this),this):(this._validateAdd(i),i.index=this.getChildren().length,i.parent=this,i._clearCaches(),this.getChildren().push(i),this._fire("add",{child:i}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){const i=this._generalFind(t,!0);return i.length>0?i[0]:void 0}_generalFind(t,i){const s=[];return this._descendants(u=>{const c=u._isMatch(t);return c&&s.push(u),!!(c&&i)}),s}_descendants(t){let i=!1;const s=this.getChildren();for(const u of s){if(i=t(u),i)return!0;if(u.hasChildren()&&(i=u._descendants(t),i))return!0}return!1}toObject(){const t=Nt.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(i=>{t.children.push(i.toObject())}),t}isAncestorOf(t){let i=t.getParent();for(;i;){if(i._id===this._id)return!0;i=i.getParent()}return!1}clone(t){const i=Nt.prototype.clone.call(this,t);return this.getChildren().forEach(function(s){i.add(s.clone())}),i}getAllIntersections(t){const i=[];return this.find("Shape").forEach(s=>{s.isVisible()&&s.intersects(t)&&i.push(s)}),i}_clearSelfAndDescendantCache(t){var i;super._clearSelfAndDescendantCache(t),!this.isCached()&&((i=this.children)===null||i===void 0||i.forEach(function(s){s._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(i,s){i.index=s}),this._requestDraw()}drawScene(t,i,s){const u=this.getLayer(),c=t||u&&u.getCanvas(),f=c&&c.getContext(),p=this._getCanvasCache(),m=p&&p.scene,S=c&&c.isCache;if(!this.isVisible()&&!S)return this;if(m){f.save();const b=this.getAbsoluteTransform(i).getMatrix();f.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(f),f.restore()}else this._drawChildren("drawScene",c,i,s);return this}drawHit(t,i){if(!this.shouldDrawHit(i))return this;const s=this.getLayer(),u=t||s&&s.hitCanvas,c=u&&u.getContext(),f=this._getCanvasCache();if(f&&f.hit){c.save();const m=this.getAbsoluteTransform(i).getMatrix();c.transform(m[0],m[1],m[2],m[3],m[4],m[5]),this._drawCachedHitCanvas(c),c.restore()}else this._drawChildren("drawHit",u,i);return this}_drawChildren(t,i,s,u){var c;const f=i&&i.getContext(),p=this.clipWidth(),m=this.clipHeight(),S=this.clipFunc(),b=typeof p=="number"&&typeof m=="number"||S,_=s===this;if(b){f.save();const D=this.getAbsoluteTransform(s);let A=D.getMatrix();f.transform(A[0],A[1],A[2],A[3],A[4],A[5]),f.beginPath();let N;if(S)N=S.call(this,f,this);else{const R=this.clipX(),O=this.clipY();f.rect(R||0,O||0,p,m)}f.clip.apply(f,N),A=D.copy().invert().getMatrix(),f.transform(A[0],A[1],A[2],A[3],A[4],A[5])}const x=!_&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";x&&(f.save(),f._applyGlobalCompositeOperation(this)),(c=this.children)===null||c===void 0||c.forEach(function(D){D[t](i,s,u)}),x&&f.restore(),b&&f.restore()}getClientRect(t={}){var i;const s=t.skipTransform,u=t.relativeTo;let c,f,p,m,S={x:1/0,y:1/0,width:0,height:0};const b=this;(i=this.children)===null||i===void 0||i.forEach(function(D){if(!D.visible())return;const A=D.getClientRect({relativeTo:b,skipShadow:t.skipShadow,skipStroke:t.skipStroke});A.width===0&&A.height===0||(c===void 0?(c=A.x,f=A.y,p=A.x+A.width,m=A.y+A.height):(c=Math.min(c,A.x),f=Math.min(f,A.y),p=Math.max(p,A.x+A.width),m=Math.max(m,A.y+A.height)))});const _=this.find("Shape");let x=!1;for(let D=0;D<_.length;D++)if(_[D]._isVisible(this)){x=!0;break}return x&&c!==void 0?S={x:c,y:f,width:p-c,height:m-f}:S={x:0,y:0,width:0,height:0},s?S:this._transformedRect(S,u)}}G.addComponentsGetterSetter(Zi,"clip",["x","y","width","height"]),G.addGetterSetter(Zi,"clipX",void 0,Dt()),G.addGetterSetter(Zi,"clipY",void 0,Dt()),G.addGetterSetter(Zi,"clipWidth",void 0,Dt()),G.addGetterSetter(Zi,"clipHeight",void 0,Dt()),G.addGetterSetter(Zi,"clipFunc");const Vp=new Map,E5=Ot._global.PointerEvent!==void 0;function x2(n){return Vp.get(n)}function D2(n){return{evt:n,pointerId:n.pointerId}}function T5(n,t){return Vp.get(n)===t}function C5(n,t){Gp(n),t.getStage()&&(Vp.set(n,t),E5&&t._fire("gotpointercapture",D2(new PointerEvent("gotpointercapture"))))}function Gp(n,t){const i=Vp.get(n);if(!i)return;const s=i.getStage();s&&s.content,Vp.delete(n),E5&&i._fire("lostpointercapture",D2(new PointerEvent("lostpointercapture")))}const uC="Stage",cC="string",_5="px",fC="mouseout",x5="mouseleave",D5="mouseover",A5="mouseenter",M5="mousemove",N5="mousedown",O5="mouseup",jp="pointermove",Lp="pointerdown",kf="pointerup",Pp="pointercancel",hC="lostpointercapture",N1="pointerout",Yp="pointerleave",O1="pointerover",R1="pointerenter",A2="contextmenu",R5="touchstart",z5="touchend",H5="touchmove",w5="touchcancel",M2="wheel",dC=5,pC=[[A5,"_pointerenter"],[N5,"_pointerdown"],[M5,"_pointermove"],[O5,"_pointerup"],[x5,"_pointerleave"],[R5,"_pointerdown"],[H5,"_pointermove"],[z5,"_pointerup"],[w5,"_pointercancel"],[D5,"_pointerover"],[M2,"_wheel"],[A2,"_contextmenu"],[Lp,"_pointerdown"],[jp,"_pointermove"],[kf,"_pointerup"],[Pp,"_pointercancel"],[Yp,"_pointerleave"],[hC,"_lostpointercapture"]],N2={mouse:{[N1]:fC,[Yp]:x5,[O1]:D5,[R1]:A5,[jp]:M5,[Lp]:N5,[kf]:O5,[Pp]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[N1]:"touchout",[Yp]:"touchleave",[O1]:"touchover",[R1]:"touchenter",[jp]:H5,[Lp]:R5,[kf]:z5,[Pp]:w5,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[N1]:N1,[Yp]:Yp,[O1]:O1,[R1]:R1,[jp]:jp,[Lp]:Lp,[kf]:kf,[Pp]:Pp,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},qp=n=>n.indexOf("pointer")>=0?"pointer":n.indexOf("touch")>=0?"touch":"mouse",If=n=>{const t=qp(n);if(t==="pointer")return Ot.pointerEventsEnabled&&N2.pointer;if(t==="touch")return N2.touch;if(t==="mouse")return N2.mouse};function U5(n={}){return(n.clipFunc||n.clipWidth||n.clipHeight)&&k.warn("Stage does not support clipping. Please use clip for Layers or Groups."),n}const mC="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Xp=[];let z1=class extends Zi{constructor(t){super(U5(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Xp.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{U5(this.attrs)}),this._checkVisibility()}_validateAdd(t){const i=t.getType()==="Layer",s=t.getType()==="FastLayer";i||s||k.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===cC){let i;if(t.charAt(0)==="."){const s=t.slice(1);t=document.getElementsByClassName(s)[0]}else t.charAt(0)!=="#"?i=t:i=t.slice(1),t=document.getElementById(i);if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const t=this.children,i=t.length;for(let s=0;s<i;s++)t[s].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),Zi.prototype.clone.call(this,t)}destroy(){super.destroy();const t=this.content;t&&k._isInDocument(t)&&this.container().removeChild(t);const i=Xp.indexOf(this);return i>-1&&Xp.splice(i,1),k.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(k.warn(mC),null)}_getPointerById(t){return this._pointerPositions.find(i=>i.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t={...t},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();const i=new Vo({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),s=i.getContext()._context,u=this.children;return(t.x||t.y)&&s.translate(-1*t.x,-1*t.y),u.forEach(function(c){if(!c.isVisible())return;const f=c._toKonvaCanvas(t);s.drawImage(f._canvas,t.x,t.y,f.getWidth()/f.getPixelRatio(),f.getHeight()/f.getPixelRatio())}),i}getIntersection(t){if(!t)return null;const i=this.children,s=i.length,u=s-1;for(let c=u;c>=0;c--){const f=i[c].getIntersection(t);if(f)return f}return null}_resizeDOM(){const t=this.width(),i=this.height();this.content&&(this.content.style.width=t+_5,this.content.style.height=i+_5),this.bufferCanvas.setSize(t,i),this.bufferHitCanvas.setSize(t,i),this.children.forEach(s=>{s.setSize({width:t,height:i}),s.draw()})}add(t,...i){if(arguments.length>1){for(let u=0;u<arguments.length;u++)this.add(arguments[u]);return this}super.add(t);const s=this.children.length;return s>dC&&k.warn("The stage has "+s+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),Ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return T5(t,this)}setPointerCapture(t){C5(t,this)}releaseCapture(t){Gp(t)}getLayers(){return this.children}_bindContentEvents(){Ot.isBrowser&&pC.forEach(([t,i])=>{this.content.addEventListener(t,s=>{this[i](s)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const i=If(t.type);i&&this._fire(i.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const i=If(t.type);i&&this._fire(i.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let i=this[t+"targetShape"];return i&&!i.getStage()&&(i=null),i}_pointerleave(t){const i=If(t.type),s=qp(t.type);if(!i)return;this.setPointersPositions(t);const u=this._getTargetShape(s),c=!(Ot.isDragging()||Ot.isTransforming())||Ot.hitOnDragEnabled;u&&c?(u._fireAndBubble(i.pointerout,{evt:t}),u._fireAndBubble(i.pointerleave,{evt:t}),this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this[s+"targetShape"]=null):c&&(this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(i.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){const i=If(t.type),s=qp(t.type);if(!i)return;this.setPointersPositions(t);let u=!1;this._changedPointerPositions.forEach(c=>{const f=this.getIntersection(c);if(Ne.justDragged=!1,Ot["_"+s+"ListenClick"]=!0,!f||!f.isListening()){this[s+"ClickStartShape"]=void 0;return}Ot.capturePointerEventsEnabled&&f.setPointerCapture(c.id),this[s+"ClickStartShape"]=f,f._fireAndBubble(i.pointerdown,{evt:t,pointerId:c.id}),u=!0;const p=t.type.indexOf("touch")>=0;f.preventDefault()&&t.cancelable&&p&&t.preventDefault()}),u||this._fire(i.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){const i=If(t.type),s=qp(t.type);if(!i)return;const u=t.type.indexOf("touch")>=0||t.pointerType==="touch";if(Ot.isDragging()&&Ne.node.preventDefault()&&t.cancelable&&u&&t.preventDefault(),this.setPointersPositions(t),!(!(Ot.isDragging()||Ot.isTransforming())||Ot.hitOnDragEnabled))return;const f={};let p=!1;const m=this._getTargetShape(s);this._changedPointerPositions.forEach(S=>{const b=x2(S.id)||this.getIntersection(S),_=S.id,x={evt:t,pointerId:_},D=m!==b;if(D&&m&&(m._fireAndBubble(i.pointerout,{...x},b),m._fireAndBubble(i.pointerleave,{...x},b)),b){if(f[b._id])return;f[b._id]=!0}b&&b.isListening()?(p=!0,D&&(b._fireAndBubble(i.pointerover,{...x},m),b._fireAndBubble(i.pointerenter,{...x},m),this[s+"targetShape"]=b),b._fireAndBubble(i.pointermove,{...x})):m&&(this._fire(i.pointerover,{evt:t,target:this,currentTarget:this,pointerId:_}),this[s+"targetShape"]=null)}),p||this._fire(i.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const i=If(t.type),s=qp(t.type);if(!i)return;this.setPointersPositions(t);const u=this[s+"ClickStartShape"],c=this[s+"ClickEndShape"],f={};let p=!1;this._changedPointerPositions.forEach(m=>{const S=x2(m.id)||this.getIntersection(m);if(S){if(S.releaseCapture(m.id),f[S._id])return;f[S._id]=!0}const b=m.id,_={evt:t,pointerId:b};let x=!1;Ot["_"+s+"InDblClickWindow"]?(x=!0,clearTimeout(this[s+"DblTimeout"])):Ne.justDragged||(Ot["_"+s+"InDblClickWindow"]=!0,clearTimeout(this[s+"DblTimeout"])),this[s+"DblTimeout"]=setTimeout(function(){Ot["_"+s+"InDblClickWindow"]=!1},Ot.dblClickWindow),S&&S.isListening()?(p=!0,this[s+"ClickEndShape"]=S,S._fireAndBubble(i.pointerup,{..._}),Ot["_"+s+"ListenClick"]&&u&&u===S&&(S._fireAndBubble(i.pointerclick,{..._}),x&&c&&c===S&&S._fireAndBubble(i.pointerdblclick,{..._}))):(this[s+"ClickEndShape"]=null,p||(this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),p=!0),Ot["_"+s+"ListenClick"]&&this._fire(i.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:b}),x&&this._fire(i.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:b}))}),p||this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Ot["_"+s+"ListenClick"]=!1,t.cancelable&&s!=="touch"&&s!=="pointer"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(A2,{evt:t}):this._fire(A2,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(M2,{evt:t}):this._fire(M2,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const i=x2(t.pointerId)||this.getIntersection(this.getPointerPosition());i&&i._fireAndBubble(kf,D2(t)),Gp(t.pointerId)}_lostpointercapture(t){Gp(t.pointerId)}setPointersPositions(t){const i=this._getContentPosition();let s=null,u=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,c=>{this._pointerPositions.push({id:c.identifier,x:(c.clientX-i.left)/i.scaleX,y:(c.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,c=>{this._changedPointerPositions.push({id:c.identifier,x:(c.clientX-i.left)/i.scaleX,y:(c.clientY-i.top)/i.scaleY})})):(s=(t.clientX-i.left)/i.scaleX,u=(t.clientY-i.top)/i.scaleY,this.pointerPos={x:s,y:u},this._pointerPositions=[{x:s,y:u,id:k._getFirstPointerId(t)}],this._changedPointerPositions=[{x:s,y:u,id:k._getFirstPointerId(t)}])}_setPointerPosition(t){k.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Vo({width:this.width(),height:this.height()}),this.bufferHitCanvas=new E2({pixelRatio:1,width:this.width(),height:this.height()}),!Ot.isBrowser)return;const t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return k.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}};z1.prototype.nodeType=uC,En(z1),G.addGetterSetter(z1,"container"),Ot.isBrowser&&document.addEventListener("visibilitychange",()=>{Xp.forEach(n=>{n.batchDraw()})});const B5="hasShadow",V5="shadowRGBA",G5="patternImage",j5="linearGradient",L5="radialGradient";let H1;function O2(){return H1||(H1=k.createCanvasElement().getContext("2d"),H1)}const Kp={};function gC(n){const t=this.attrs.fillRule;t?n.fill(t):n.fill()}function yC(n){n.stroke()}function vC(n){const t=this.attrs.fillRule;t?n.fill(t):n.fill()}function SC(n){n.stroke()}function bC(){this._clearCache(B5)}function EC(){this._clearCache(V5)}function TC(){this._clearCache(G5)}function CC(){this._clearCache(j5)}function _C(){this._clearCache(L5)}class Ct extends Nt{constructor(t){super(t);let i,s=0;for(;i=k.getHitColor(),!(i&&!(i in Kp));)if(s++,s>=1e4){k.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),i=k.getRandomColor();break}this.colorKey=i,Kp[i]=this}getContext(){return k.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return k.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(B5,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(G5,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const i=O2().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(i&&i.setTransform){const s=new Qi;s.translate(this.fillPatternX(),this.fillPatternY()),s.rotate(Ot.getAngle(this.fillPatternRotation())),s.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),s.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const u=s.getMatrix(),c=typeof DOMMatrix>"u"?{a:u[0],b:u[1],c:u[2],d:u[3],e:u[4],f:u[5]}:new DOMMatrix(u);i.setTransform(c)}return i}}_getLinearGradient(){return this._getCache(j5,this.__getLinearGradient)}__getLinearGradient(){const t=this.fillLinearGradientColorStops();if(t){const i=O2(),s=this.fillLinearGradientStartPoint(),u=this.fillLinearGradientEndPoint(),c=i.createLinearGradient(s.x,s.y,u.x,u.y);for(let f=0;f<t.length;f+=2)c.addColorStop(t[f],t[f+1]);return c}}_getRadialGradient(){return this._getCache(L5,this.__getRadialGradient)}__getRadialGradient(){const t=this.fillRadialGradientColorStops();if(t){const i=O2(),s=this.fillRadialGradientStartPoint(),u=this.fillRadialGradientEndPoint(),c=i.createRadialGradient(s.x,s.y,this.fillRadialGradientStartRadius(),u.x,u.y,this.fillRadialGradientEndRadius());for(let f=0;f<t.length;f+=2)c.addColorStop(t[f],t[f+1]);return c}}getShadowRGBA(){return this._getCache(V5,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const t=k.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){const i=this.getStage();if(!i)return!1;const s=i.bufferHitCanvas;return s.getContext().clear(),this.drawHit(s,void 0,!0),s.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return Nt.prototype.destroy.call(this),delete Kp[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var i;if(!((i=this.attrs.perfectDrawEnabled)!==null&&i!==void 0?i:!0))return!1;const u=t||this.hasFill(),c=this.hasStroke(),f=this.getAbsoluteOpacity()!==1;if(u&&c&&f)return!0;const p=this.hasShadow(),m=this.shadowForStrokeEnabled();return!!(u&&c&&p&&m)}setStrokeHitEnabled(t){k.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let i=!1,s=this.getParent();for(;s;){if(s.isCached()){i=!0;break}s=s.getParent()}const u=t.skipTransform,c=t.relativeTo||i&&this.getStage()||void 0,f=this.getSelfRect(),m=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,S=f.width+m,b=f.height+m,_=!t.skipShadow&&this.hasShadow(),x=_?this.shadowOffsetX():0,D=_?this.shadowOffsetY():0,A=S+Math.abs(x),N=b+Math.abs(D),R=_&&this.shadowBlur()||0,O=A+R*2,U=N+R*2,j={width:O,height:U,x:-(m/2+R)+Math.min(x,0)+f.x,y:-(m/2+R)+Math.min(D,0)+f.y};return u?j:this._transformedRect(j,c)}drawScene(t,i,s){const u=this.getLayer(),c=t||u.getCanvas(),f=c.getContext(),p=this._getCanvasCache(),m=this.getSceneFunc(),S=this.hasShadow();let b;const _=i===this;if(!this.isVisible()&&!_)return this;if(p){f.save();const x=this.getAbsoluteTransform(i).getMatrix();return f.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedSceneCanvas(f),f.restore(),this}if(!m)return this;if(f.save(),this._useBufferCanvas()){b=this.getStage();const x=s||b.bufferCanvas,D=x.getContext();D.clear(),D.save(),D._applyLineJoin(this),D._applyMiterLimit(this);const A=this.getAbsoluteTransform(i).getMatrix();D.transform(A[0],A[1],A[2],A[3],A[4],A[5]),m.call(this,D,this),D.restore();const N=x.pixelRatio;S&&f._applyShadow(this),_||(f._applyOpacity(this),f._applyGlobalCompositeOperation(this)),f.drawImage(x._canvas,x.x||0,x.y||0,x.width/N,x.height/N)}else{if(f._applyLineJoin(this),f._applyMiterLimit(this),!_){const x=this.getAbsoluteTransform(i).getMatrix();f.transform(x[0],x[1],x[2],x[3],x[4],x[5]),f._applyOpacity(this),f._applyGlobalCompositeOperation(this)}S&&f._applyShadow(this),m.call(this,f,this)}return f.restore(),this}drawHit(t,i,s=!1){if(!this.shouldDrawHit(i,s))return this;const u=this.getLayer(),c=t||u.hitCanvas,f=c&&c.getContext(),p=this.hitFunc()||this.sceneFunc(),m=this._getCanvasCache(),S=m&&m.hit;if(this.colorKey||k.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),S){f.save();const _=this.getAbsoluteTransform(i).getMatrix();return f.transform(_[0],_[1],_[2],_[3],_[4],_[5]),this._drawCachedHitCanvas(f),f.restore(),this}if(!p)return this;if(f.save(),f._applyLineJoin(this),f._applyMiterLimit(this),!(this===i)){const _=this.getAbsoluteTransform(i).getMatrix();f.transform(_[0],_[1],_[2],_[3],_[4],_[5])}return p.call(this,f,this),f.restore(),this}drawHitFromCache(t=0){const i=this._getCanvasCache(),s=this._getCachedSceneCanvas(),u=i.hit,c=u.getContext(),f=u.getWidth(),p=u.getHeight();c.clear(),c.drawImage(s._canvas,0,0,f,p);try{const m=c.getImageData(0,0,f,p),S=m.data,b=S.length,_=k._hexToRgb(this.colorKey);for(let x=0;x<b;x+=4)S[x+3]>t?(S[x]=_.r,S[x+1]=_.g,S[x+2]=_.b,S[x+3]=255):S[x+3]=0;c.putImageData(m,0,0)}catch(m){k.error("Unable to draw hit graph from cached scene canvas. "+m.message)}return this}hasPointerCapture(t){return T5(t,this)}setPointerCapture(t){C5(t,this)}releaseCapture(t){Gp(t)}}Ct.prototype._fillFunc=gC,Ct.prototype._strokeFunc=yC,Ct.prototype._fillFuncHit=vC,Ct.prototype._strokeFuncHit=SC,Ct.prototype._centroid=!1,Ct.prototype.nodeType="Shape",En(Ct),Ct.prototype.eventListeners={},Ct.prototype.on.call(Ct.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",bC),Ct.prototype.on.call(Ct.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",EC),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",TC),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",CC),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",_C),G.addGetterSetter(Ct,"stroke",void 0,g5()),G.addGetterSetter(Ct,"strokeWidth",2,Dt()),G.addGetterSetter(Ct,"fillAfterStrokeEnabled",!1),G.addGetterSetter(Ct,"hitStrokeWidth","auto",T2()),G.addGetterSetter(Ct,"strokeHitEnabled",!0,sl()),G.addGetterSetter(Ct,"perfectDrawEnabled",!0,sl()),G.addGetterSetter(Ct,"shadowForStrokeEnabled",!0,sl()),G.addGetterSetter(Ct,"lineJoin"),G.addGetterSetter(Ct,"lineCap"),G.addGetterSetter(Ct,"miterLimit"),G.addGetterSetter(Ct,"sceneFunc"),G.addGetterSetter(Ct,"hitFunc"),G.addGetterSetter(Ct,"dash"),G.addGetterSetter(Ct,"dashOffset",0,Dt()),G.addGetterSetter(Ct,"shadowColor",void 0,oc()),G.addGetterSetter(Ct,"shadowBlur",0,Dt()),G.addGetterSetter(Ct,"shadowOpacity",1,Dt()),G.addComponentsGetterSetter(Ct,"shadowOffset",["x","y"]),G.addGetterSetter(Ct,"shadowOffsetX",0,Dt()),G.addGetterSetter(Ct,"shadowOffsetY",0,Dt()),G.addGetterSetter(Ct,"fillPatternImage"),G.addGetterSetter(Ct,"fill",void 0,g5()),G.addGetterSetter(Ct,"fillPatternX",0,Dt()),G.addGetterSetter(Ct,"fillPatternY",0,Dt()),G.addGetterSetter(Ct,"fillLinearGradientColorStops"),G.addGetterSetter(Ct,"strokeLinearGradientColorStops"),G.addGetterSetter(Ct,"fillRadialGradientStartRadius",0),G.addGetterSetter(Ct,"fillRadialGradientEndRadius",0),G.addGetterSetter(Ct,"fillRadialGradientColorStops"),G.addGetterSetter(Ct,"fillPatternRepeat","repeat"),G.addGetterSetter(Ct,"fillEnabled",!0),G.addGetterSetter(Ct,"strokeEnabled",!0),G.addGetterSetter(Ct,"shadowEnabled",!0),G.addGetterSetter(Ct,"dashEnabled",!0),G.addGetterSetter(Ct,"strokeScaleEnabled",!0),G.addGetterSetter(Ct,"fillPriority","color"),G.addComponentsGetterSetter(Ct,"fillPatternOffset",["x","y"]),G.addGetterSetter(Ct,"fillPatternOffsetX",0,Dt()),G.addGetterSetter(Ct,"fillPatternOffsetY",0,Dt()),G.addComponentsGetterSetter(Ct,"fillPatternScale",["x","y"]),G.addGetterSetter(Ct,"fillPatternScaleX",1,Dt()),G.addGetterSetter(Ct,"fillPatternScaleY",1,Dt()),G.addComponentsGetterSetter(Ct,"fillLinearGradientStartPoint",["x","y"]),G.addComponentsGetterSetter(Ct,"strokeLinearGradientStartPoint",["x","y"]),G.addGetterSetter(Ct,"fillLinearGradientStartPointX",0),G.addGetterSetter(Ct,"strokeLinearGradientStartPointX",0),G.addGetterSetter(Ct,"fillLinearGradientStartPointY",0),G.addGetterSetter(Ct,"strokeLinearGradientStartPointY",0),G.addComponentsGetterSetter(Ct,"fillLinearGradientEndPoint",["x","y"]),G.addComponentsGetterSetter(Ct,"strokeLinearGradientEndPoint",["x","y"]),G.addGetterSetter(Ct,"fillLinearGradientEndPointX",0),G.addGetterSetter(Ct,"strokeLinearGradientEndPointX",0),G.addGetterSetter(Ct,"fillLinearGradientEndPointY",0),G.addGetterSetter(Ct,"strokeLinearGradientEndPointY",0),G.addComponentsGetterSetter(Ct,"fillRadialGradientStartPoint",["x","y"]),G.addGetterSetter(Ct,"fillRadialGradientStartPointX",0),G.addGetterSetter(Ct,"fillRadialGradientStartPointY",0),G.addComponentsGetterSetter(Ct,"fillRadialGradientEndPoint",["x","y"]),G.addGetterSetter(Ct,"fillRadialGradientEndPointX",0),G.addGetterSetter(Ct,"fillRadialGradientEndPointY",0),G.addGetterSetter(Ct,"fillPatternRotation",0),G.addGetterSetter(Ct,"fillRule",void 0,oc()),G.backCompat(Ct,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const xC="beforeDraw",DC="draw",P5=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],AC=P5.length;let cc=class extends Zi{constructor(t){super(t),this.canvas=new Vo,this.hitCanvas=new E2({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);const i=this.getStage();return i&&i.content&&(i.content.removeChild(this.getNativeCanvasElement()),t<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[t+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Nt.prototype.moveToTop.call(this);const t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Nt.prototype.moveUp.call(this))return!1;const i=this.getStage();return!i||!i.content?!1:(i.content.removeChild(this.getNativeCanvasElement()),this.index<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[this.index+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Nt.prototype.moveDown.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Nt.prototype.moveToBottom.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const t=this.getNativeCanvasElement();return Nt.prototype.remove.call(this),t&&t.parentNode&&k._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:i}){return this.canvas.setSize(t,i),this.hitCanvas.setSize(t,i),this._setSmoothEnabled(),this}_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&k.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t={...t},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),Nt.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){k.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){k.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,k.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let i=1,s=!1;for(;;){for(let u=0;u<AC;u++){const c=P5[u],f=this._getIntersection({x:t.x+c.x*i,y:t.y+c.y*i}),p=f.shape;if(p)return p;if(s=!!f.antialiased,!f.antialiased)break}if(s)i+=1;else return null}}_getIntersection(t){const i=this.hitCanvas.pixelRatio,s=this.hitCanvas.context.getImageData(Math.round(t.x*i),Math.round(t.y*i),1,1).data,u=s[3];if(u===255){const c=k.getHitColorKey(s[0],s[1],s[2]),f=Kp[c];return f?{shape:f}:{antialiased:!0}}else if(u>0)return{antialiased:!0};return{}}drawScene(t,i,s){const u=this.getLayer(),c=t||u&&u.getCanvas();return this._fire(xC,{node:this}),this.clearBeforeDraw()&&c.getContext().clear(),Zi.prototype.drawScene.call(this,c,i,s),this._fire(DC,{node:this}),this}drawHit(t,i){const s=this.getLayer(),u=t||s&&s.hitCanvas;return s&&s.clearBeforeDraw()&&s.getHitCanvas().getContext().clear(),Zi.prototype.drawHit.call(this,u,i),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){k.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return k.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const t=this.parent;!!this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return k.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};cc.prototype.nodeType="Layer",En(cc),G.addGetterSetter(cc,"imageSmoothingEnabled",!0),G.addGetterSetter(cc,"clearBeforeDraw",!0),G.addGetterSetter(cc,"hitGraphEnabled",!0,sl());class R2 extends cc{constructor(t){super(t),this.listening(!1),k.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}R2.prototype.nodeType="FastLayer",En(R2);let Wf=class extends Zi{_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&k.throw("You may only add groups and shapes to groups.")}};Wf.prototype.nodeType="Group",En(Wf);const z2=(function(){return rc.performance&&rc.performance.now?function(){return rc.performance.now()}:function(){return new Date().getTime()}})();class Ss{constructor(t,i){this.id=Ss.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:z2(),frameRate:0},this.func=t,this.setLayers(i)}setLayers(t){let i=[];return t&&(i=Array.isArray(t)?t:[t]),this.layers=i,this}getLayers(){return this.layers}addLayer(t){const i=this.layers,s=i.length;for(let u=0;u<s;u++)if(i[u]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const i=Ss.animations,s=i.length;for(let u=0;u<s;u++)if(i[u].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=z2(),Ss._addAnimation(this),this}stop(){return Ss._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const i=t.id,s=this.animations,u=s.length;for(let c=0;c<u;c++)if(s[c].id===i){this.animations.splice(c,1);break}}static _runFrames(){const t={},i=this.animations;for(let s=0;s<i.length;s++){const u=i[s],c=u.layers,f=u.func;u._updateFrameObject(z2());const p=c.length;let m;if(f?m=f.call(u,u.frame)!==!1:m=!0,!!m)for(let S=0;S<p;S++){const b=c[S];b._id!==void 0&&(t[b._id]=b)}}for(const s in t)t.hasOwnProperty(s)&&t[s].batchDraw()}static _animationLoop(){const t=Ss;t.animations.length?(t._runFrames(),k.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,k.requestAnimFrame(this._animationLoop))}}Ss.animations=[],Ss.animIdCounter=0,Ss.animRunning=!1;const MC={node:1,duration:1,easing:1,onFinish:1,yoyo:1},NC=1,Y5=2,q5=3,X5=["fill","stroke","shadowColor"];let OC=0;class RC{constructor(t,i,s,u,c,f,p){this.prop=t,this.propFunc=i,this.begin=u,this._pos=u,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=p,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=s,this._change=c-this.begin,this.pause()}fire(t){const i=this[t];i&&i()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Y5,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=q5,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const t=this.getTimer()-this._startTime;this.state===Y5?this.setTime(t):this.state===q5&&this.setTime(this.duration-t)}pause(){this.state=NC,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Ze{constructor(t){const i=this,s=t.node,u=s._id,c=t.easing||Qp.Linear,f=!!t.yoyo;let p,m;typeof t.duration>"u"?p=.3:t.duration===0?p=.001:p=t.duration,this.node=s,this._id=OC++;const S=s.getLayer()||(s instanceof Ot.Stage?s.getLayers():null);S||k.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ss(function(){i.tween.onEnterFrame()},S),this.tween=new RC(m,function(b){i._tweenFunc(b)},c,0,1,p*1e3,f),this._addListeners(),Ze.attrs[u]||(Ze.attrs[u]={}),Ze.attrs[u][this._id]||(Ze.attrs[u][this._id]={}),Ze.tweens[u]||(Ze.tweens[u]={});for(m in t)MC[m]===void 0&&this._addAttr(m,t[m]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,i){const s=this.node,u=s._id;let c,f,p,m,S;const b=Ze.tweens[u][t];b&&delete Ze.attrs[u][b][t];let _=s.getAttr(t);if(k._isArray(i))if(c=[],f=Math.max(i.length,_.length),t==="points"&&i.length!==_.length&&(i.length>_.length?(m=_,_=k._prepareArrayForTween(_,i,s.closed())):(p=i,i=k._prepareArrayForTween(i,_,s.closed()))),t.indexOf("fill")===0)for(let x=0;x<f;x++)if(x%2===0)c.push(i[x]-_[x]);else{const D=k.colorToRGBA(_[x]);S=k.colorToRGBA(i[x]),_[x]=D,c.push({r:S.r-D.r,g:S.g-D.g,b:S.b-D.b,a:S.a-D.a})}else for(let x=0;x<f;x++)c.push(i[x]-_[x]);else X5.indexOf(t)!==-1?(_=k.colorToRGBA(_),S=k.colorToRGBA(i),c={r:S.r-_.r,g:S.g-_.g,b:S.b-_.b,a:S.a-_.a}):c=i-_;Ze.attrs[u][this._id][t]={start:_,diff:c,end:i,trueEnd:p,trueStart:m},Ze.tweens[u][t]=this._id}_tweenFunc(t){const i=this.node,s=Ze.attrs[i._id][this._id];let u,c,f,p,m,S,b,_;for(u in s){if(c=s[u],f=c.start,p=c.diff,_=c.end,k._isArray(f))if(m=[],b=Math.max(f.length,_.length),u.indexOf("fill")===0)for(S=0;S<b;S++)S%2===0?m.push((f[S]||0)+p[S]*t):m.push("rgba("+Math.round(f[S].r+p[S].r*t)+","+Math.round(f[S].g+p[S].g*t)+","+Math.round(f[S].b+p[S].b*t)+","+(f[S].a+p[S].a*t)+")");else for(S=0;S<b;S++)m.push((f[S]||0)+p[S]*t);else X5.indexOf(u)!==-1?m="rgba("+Math.round(f.r+p.r*t)+","+Math.round(f.g+p.g*t)+","+Math.round(f.b+p.b*t)+","+(f.a+p.a*t)+")":m=f+p*t;i.setAttr(u,m)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const t=this.node,i=Ze.attrs[t._id][this._id];i.points&&i.points.trueEnd&&t.setAttr("points",i.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const t=this.node,i=Ze.attrs[t._id][this._id];i.points&&i.points.trueStart&&t.points(i.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const t=this.node._id,i=this._id,s=Ze.tweens[t];this.pause(),this.anim&&this.anim.stop();for(const u in s)delete Ze.tweens[t][u];delete Ze.attrs[t][i],Ze.tweens[t]&&(Object.keys(Ze.tweens[t]).length===0&&delete Ze.tweens[t],Object.keys(Ze.attrs[t]).length===0&&delete Ze.attrs[t])}}Ze.attrs={},Ze.tweens={},Nt.prototype.to=function(n){const t=n.onFinish;n.node=this,n.onFinish=function(){this.destroy(),t&&t()},new Ze(n).play()};const Qp={BackEaseIn(n,t,i,s){return i*(n/=s)*n*((1.70158+1)*n-1.70158)+t},BackEaseOut(n,t,i,s){return i*((n=n/s-1)*n*((1.70158+1)*n+1.70158)+1)+t},BackEaseInOut(n,t,i,s){let u=1.70158;return(n/=s/2)<1?i/2*(n*n*(((u*=1.525)+1)*n-u))+t:i/2*((n-=2)*n*(((u*=1.525)+1)*n+u)+2)+t},ElasticEaseIn(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s)===1?t+i:(c||(c=s*.3),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),-(u*Math.pow(2,10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c))+t)},ElasticEaseOut(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s)===1?t+i:(c||(c=s*.3),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),u*Math.pow(2,-10*n)*Math.sin((n*s-f)*(2*Math.PI)/c)+i+t)},ElasticEaseInOut(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s/2)===2?t+i:(c||(c=s*(.3*1.5)),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),n<1?-.5*(u*Math.pow(2,10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c))+t:u*Math.pow(2,-10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c)*.5+i+t)},BounceEaseOut(n,t,i,s){return(n/=s)<1/2.75?i*(7.5625*n*n)+t:n<2/2.75?i*(7.5625*(n-=1.5/2.75)*n+.75)+t:n<2.5/2.75?i*(7.5625*(n-=2.25/2.75)*n+.9375)+t:i*(7.5625*(n-=2.625/2.75)*n+.984375)+t},BounceEaseIn(n,t,i,s){return i-Qp.BounceEaseOut(s-n,0,i,s)+t},BounceEaseInOut(n,t,i,s){return n<s/2?Qp.BounceEaseIn(n*2,0,i,s)*.5+t:Qp.BounceEaseOut(n*2-s,0,i,s)*.5+i*.5+t},EaseIn(n,t,i,s){return i*(n/=s)*n+t},EaseOut(n,t,i,s){return-i*(n/=s)*(n-2)+t},EaseInOut(n,t,i,s){return(n/=s/2)<1?i/2*n*n+t:-i/2*(--n*(n-2)-1)+t},StrongEaseIn(n,t,i,s){return i*(n/=s)*n*n*n*n+t},StrongEaseOut(n,t,i,s){return i*((n=n/s-1)*n*n*n*n+1)+t},StrongEaseInOut(n,t,i,s){return(n/=s/2)<1?i/2*n*n*n*n*n+t:i/2*((n-=2)*n*n*n*n+2)+t},Linear(n,t,i,s){return i*n/s+t}},$f=k._assign(Ot,{Util:k,Transform:Qi,Node:Nt,Container:Zi,Stage:z1,stages:Xp,Layer:cc,FastLayer:R2,Group:Wf,DD:Ne,Shape:Ct,shapes:Kp,Animation:Ss,Tween:Ze,Easings:Qp,Context:C1,Canvas:b2});class Nr extends Ct{_sceneFunc(t){const i=Ot.getAngle(this.angle()),s=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,i,s),t.arc(0,0,this.innerRadius(),i,0,!s),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),i=this.outerRadius(),s=this.clockwise(),u=Ot.getAngle(s?360-this.angle():this.angle()),c=Math.cos(Math.min(u,Math.PI)),f=1,p=Math.sin(Math.min(Math.max(Math.PI,u),3*Math.PI/2)),m=Math.sin(Math.min(u,Math.PI/2)),S=c*(c>0?t:i),b=f*i,_=p*(p>0?t:i),x=m*(m>0?i:t);return{x:S,y:s?-1*x:_,width:b-S,height:x-_}}}Nr.prototype._centroid=!0,Nr.prototype.className="Arc",Nr.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],En(Nr),G.addGetterSetter(Nr,"innerRadius",0,Dt()),G.addGetterSetter(Nr,"outerRadius",0,Dt()),G.addGetterSetter(Nr,"angle",0,Dt()),G.addGetterSetter(Nr,"clockwise",!1,sl());function H2(n,t,i,s,u,c,f){const p=Math.sqrt(Math.pow(i-n,2)+Math.pow(s-t,2)),m=Math.sqrt(Math.pow(u-i,2)+Math.pow(c-s,2)),S=f*p/(p+m),b=f*m/(p+m),_=i-S*(u-n),x=s-S*(c-t),D=i+b*(u-n),A=s+b*(c-t);return[_,x,D,A]}function K5(n,t){const i=n.length,s=[];for(let u=2;u<i-2;u+=2){const c=H2(n[u-2],n[u-1],n[u],n[u+1],n[u+2],n[u+3],t);isNaN(c[0])||(s.push(c[0]),s.push(c[1]),s.push(n[u]),s.push(n[u+1]),s.push(c[2]),s.push(c[3]))}return s}let Or=class extends Ct{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){const i=this.points(),s=i.length,u=this.tension(),c=this.closed(),f=this.bezier();if(!s)return;let p=0;if(t.beginPath(),t.moveTo(i[0],i[1]),u!==0&&s>4){const m=this.getTensionPoints(),S=m.length;for(p=c?0:4,c||t.quadraticCurveTo(m[0],m[1],m[2],m[3]);p<S-2;)t.bezierCurveTo(m[p++],m[p++],m[p++],m[p++],m[p++],m[p++]);c||t.quadraticCurveTo(m[S-2],m[S-1],i[s-2],i[s-1])}else if(f)for(p=2;p<s;)t.bezierCurveTo(i[p++],i[p++],i[p++],i[p++],i[p++],i[p++]);else for(p=2;p<s;p+=2)t.lineTo(i[p],i[p+1]);c?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():K5(this.points(),this.tension())}_getTensionPointsClosed(){const t=this.points(),i=t.length,s=this.tension(),u=H2(t[i-2],t[i-1],t[0],t[1],t[2],t[3],s),c=H2(t[i-4],t[i-3],t[i-2],t[i-1],t[0],t[1],s),f=K5(t,s);return[u[2],u[3]].concat(f).concat([c[0],c[1],t[i-2],t[i-1],c[2],c[3],u[0],u[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();let i=t[0],s=t[0],u=t[1],c=t[1],f,p;for(let m=0;m<t.length/2;m++)f=t[m*2],p=t[m*2+1],i=Math.min(i,f),s=Math.max(s,f),u=Math.min(u,p),c=Math.max(c,p);return{x:i,y:u,width:s-i,height:c-u}}};Or.prototype.className="Line",Or.prototype._attrsAffectingSize=["points","bezier","tension"],En(Or),G.addGetterSetter(Or,"closed",!1),G.addGetterSetter(Or,"bezier",!1),G.addGetterSetter(Or,"tension",0,Dt()),G.addGetterSetter(Or,"points",[],JT());const zC=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],HC=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],wC=[[1],[1,1],[1,2,1],[1,3,3,1]],Q5=(n,t,i)=>{let s,u;const f=i/2;s=0;for(let p=0;p<20;p++)u=f*zC[20][p]+f,s+=HC[20][p]*UC(n,t,u);return f*s},Z5=(n,t,i)=>{i===void 0&&(i=1);const s=n[0]-2*n[1]+n[2],u=t[0]-2*t[1]+t[2],c=2*n[1]-2*n[0],f=2*t[1]-2*t[0],p=4*(s*s+u*u),m=4*(s*c+u*f),S=c*c+f*f;if(p===0)return i*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(t[2]-t[0],2));const b=m/(2*p),_=S/p,x=i+b,D=_-b*b,A=x*x+D>0?Math.sqrt(x*x+D):0,N=b*b+D>0?Math.sqrt(b*b+D):0,R=b+Math.sqrt(b*b+D)!==0?D*Math.log(Math.abs((x+A)/(b+N))):0;return Math.sqrt(p)/2*(x*A-b*N+R)};function UC(n,t,i){const s=w2(1,i,n),u=w2(1,i,t),c=s*s+u*u;return Math.sqrt(c)}const w2=(n,t,i)=>{const s=i.length-1;let u,c;if(s===0)return 0;if(n===0){c=0;for(let f=0;f<=s;f++)c+=wC[s][f]*Math.pow(1-t,s-f)*Math.pow(t,f)*i[f];return c}else{u=new Array(s);for(let f=0;f<s;f++)u[f]=s*(i[f+1]-i[f]);return w2(n-1,t,u)}},J5=(n,t,i)=>{let s=1,u=n/t,c=(n-i(u))/t,f=0;for(;s>.001;){const p=i(u+c),m=Math.abs(n-p)/t;if(m<s)s=m,u+=c;else{const S=i(u-c),b=Math.abs(n-S)/t;b<s?(s=b,u-=c):c/=2}if(f++,f>500)break}return u};let bs=class Ki extends Ct{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Ki.parsePathData(this.data()),this.pathLength=Ki.getPathLength(this.dataArray)}_sceneFunc(t){const i=this.dataArray;t.beginPath();let s=!1;for(let u=0;u<i.length;u++){const c=i[u].command,f=i[u].points;switch(c){case"L":t.lineTo(f[0],f[1]);break;case"M":t.moveTo(f[0],f[1]);break;case"C":t.bezierCurveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case"Q":t.quadraticCurveTo(f[0],f[1],f[2],f[3]);break;case"A":const p=f[0],m=f[1],S=f[2],b=f[3],_=f[4],x=f[5],D=f[6],A=f[7],N=S>b?S:b,R=S>b?1:S/b,O=S>b?b/S:1;t.translate(p,m),t.rotate(D),t.scale(R,O),t.arc(0,0,N,_,_+x,1-A),t.scale(1/R,1/O),t.rotate(-D),t.translate(-p,-m);break;case"z":s=!0,t.closePath();break}}!s&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){let t=[];this.dataArray.forEach(function(m){if(m.command==="A"){const S=m.points[4],b=m.points[5],_=m.points[4]+b;let x=Math.PI/180;if(Math.abs(S-_)<x&&(x=Math.abs(S-_)),b<0)for(let D=S-x;D>_;D-=x){const A=Ki.getPointOnEllipticalArc(m.points[0],m.points[1],m.points[2],m.points[3],D,0);t.push(A.x,A.y)}else for(let D=S+x;D<_;D+=x){const A=Ki.getPointOnEllipticalArc(m.points[0],m.points[1],m.points[2],m.points[3],D,0);t.push(A.x,A.y)}}else if(m.command==="C")for(let S=0;S<=1;S+=.01){const b=Ki.getPointOnCubicBezier(S,m.start.x,m.start.y,m.points[0],m.points[1],m.points[2],m.points[3],m.points[4],m.points[5]);t.push(b.x,b.y)}else t=t.concat(m.points)});let i=t[0],s=t[0],u=t[1],c=t[1],f,p;for(let m=0;m<t.length/2;m++)f=t[m*2],p=t[m*2+1],isNaN(f)||(i=Math.min(i,f),s=Math.max(s,f)),isNaN(p)||(u=Math.min(u,p),c=Math.max(c,p));return{x:i,y:u,width:s-i,height:c-u}}getLength(){return this.pathLength}getPointAtLength(t){return Ki.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,i,s,u){return Math.sqrt((s-t)*(s-t)+(u-i)*(u-i))}static getPathLength(t){let i=0;for(let s=0;s<t.length;++s)i+=t[s].pathLength;return i}static getPointAtLengthOfDataArray(t,i){let s,u=0,c=i.length;if(!c)return null;for(;u<c&&t>i[u].pathLength;)t-=i[u].pathLength,++u;if(u===c)return s=i[u-1].points.slice(-2),{x:s[0],y:s[1]};if(t<.01)return i[u].command==="M"?(s=i[u].points.slice(0,2),{x:s[0],y:s[1]}):{x:i[u].start.x,y:i[u].start.y};const f=i[u],p=f.points;switch(f.command){case"L":return Ki.getPointOnLine(t,f.start.x,f.start.y,p[0],p[1]);case"C":return Ki.getPointOnCubicBezier(J5(t,Ki.getPathLength(i),N=>Q5([f.start.x,p[0],p[2],p[4]],[f.start.y,p[1],p[3],p[5]],N)),f.start.x,f.start.y,p[0],p[1],p[2],p[3],p[4],p[5]);case"Q":return Ki.getPointOnQuadraticBezier(J5(t,Ki.getPathLength(i),N=>Z5([f.start.x,p[0],p[2]],[f.start.y,p[1],p[3]],N)),f.start.x,f.start.y,p[0],p[1],p[2],p[3]);case"A":const m=p[0],S=p[1],b=p[2],_=p[3],x=p[5],D=p[6];let A=p[4];return A+=x*t/f.pathLength,Ki.getPointOnEllipticalArc(m,S,b,_,A,D)}return null}static getPointOnLine(t,i,s,u,c,f,p){f=f??i,p=p??s;const m=this.getLineLength(i,s,u,c);if(m<1e-10)return{x:i,y:s};if(u===i)return{x:f,y:p+(c>s?t:-t)};const S=(c-s)/(u-i),b=Math.sqrt(t*t/(1+S*S))*(u<i?-1:1),_=S*b;if(Math.abs(p-s-S*(f-i))<1e-10)return{x:f+b,y:p+_};const x=((f-i)*(u-i)+(p-s)*(c-s))/(m*m),D=i+x*(u-i),A=s+x*(c-s),N=this.getLineLength(f,p,D,A),R=Math.sqrt(t*t-N*N),O=Math.sqrt(R*R/(1+S*S))*(u<i?-1:1),U=S*O;return{x:D+O,y:A+U}}static getPointOnCubicBezier(t,i,s,u,c,f,p,m,S){function b(R){return R*R*R}function _(R){return 3*R*R*(1-R)}function x(R){return 3*R*(1-R)*(1-R)}function D(R){return(1-R)*(1-R)*(1-R)}const A=m*b(t)+f*_(t)+u*x(t)+i*D(t),N=S*b(t)+p*_(t)+c*x(t)+s*D(t);return{x:A,y:N}}static getPointOnQuadraticBezier(t,i,s,u,c,f,p){function m(D){return D*D}function S(D){return 2*D*(1-D)}function b(D){return(1-D)*(1-D)}const _=f*m(t)+u*S(t)+i*b(t),x=p*m(t)+c*S(t)+s*b(t);return{x:_,y:x}}static getPointOnEllipticalArc(t,i,s,u,c,f){const p=Math.cos(f),m=Math.sin(f),S={x:s*Math.cos(c),y:u*Math.sin(c)};return{x:t+(S.x*p-S.y*m),y:i+(S.x*m+S.y*p)}}static parsePathData(t){if(!t)return[];let i=t;const s=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(new RegExp(" ","g"),",");for(let _=0;_<s.length;_++)i=i.replace(new RegExp(s[_],"g"),"|"+s[_]);const u=i.split("|"),c=[],f=[];let p=0,m=0;const S=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let b;for(let _=1;_<u.length;_++){let x=u[_],D=x.charAt(0);for(x=x.slice(1),f.length=0;b=S.exec(x);)f.push(b[0]);let A=[],N=D==="A"||D==="a"?0:-1;for(let R=0,O=f.length;R<O;R++){const U=f[R];if(U==="00"){A.push(0,0),N>=0&&(N+=2,N>=7&&(N-=7));continue}if(N>=0){if(N===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(U)){A.push(parseInt(U[0],10)),A.push(parseInt(U[1],10)),A.push(parseFloat(U.slice(2))),N+=3,N>=7&&(N-=7);continue}if(U==="11"||U==="10"||U==="01"){A.push(parseInt(U[0],10)),A.push(parseInt(U[1],10)),N+=2,N>=7&&(N-=7);continue}if(U==="0"||U==="1"){A.push(parseInt(U,10)),N+=1,N>=7&&(N-=7);continue}}else if(N===4){if(/^[01]\d+(?:\.\d+)?$/.test(U)){A.push(parseInt(U[0],10)),A.push(parseFloat(U.slice(1))),N+=2,N>=7&&(N-=7);continue}if(U==="0"||U==="1"){A.push(parseInt(U,10)),N+=1,N>=7&&(N-=7);continue}}const j=parseFloat(U);isNaN(j)?A.push(0):A.push(j),N+=1,N>=7&&(N-=7)}else{const j=parseFloat(U);isNaN(j)?A.push(0):A.push(j)}}for(;A.length>0&&!isNaN(A[0]);){let R="",O=[];const U=p,j=m;let V,F,$,st,I,et,nt,bt,lt,dt;switch(D){case"l":p+=A.shift(),m+=A.shift(),R="L",O.push(p,m);break;case"L":p=A.shift(),m=A.shift(),O.push(p,m);break;case"m":const pt=A.shift(),tt=A.shift();if(p+=pt,m+=tt,R="M",c.length>2&&c[c.length-1].command==="z"){for(let w=c.length-2;w>=0;w--)if(c[w].command==="M"){p=c[w].points[0]+pt,m=c[w].points[1]+tt;break}}O.push(p,m),D="l";break;case"M":p=A.shift(),m=A.shift(),R="M",O.push(p,m),D="L";break;case"h":p+=A.shift(),R="L",O.push(p,m);break;case"H":p=A.shift(),R="L",O.push(p,m);break;case"v":m+=A.shift(),R="L",O.push(p,m);break;case"V":m=A.shift(),R="L",O.push(p,m);break;case"C":O.push(A.shift(),A.shift(),A.shift(),A.shift()),p=A.shift(),m=A.shift(),O.push(p,m);break;case"c":O.push(p+A.shift(),m+A.shift(),p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="C",O.push(p,m);break;case"S":F=p,$=m,V=c[c.length-1],V.command==="C"&&(F=p+(p-V.points[2]),$=m+(m-V.points[3])),O.push(F,$,A.shift(),A.shift()),p=A.shift(),m=A.shift(),R="C",O.push(p,m);break;case"s":F=p,$=m,V=c[c.length-1],V.command==="C"&&(F=p+(p-V.points[2]),$=m+(m-V.points[3])),O.push(F,$,p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="C",O.push(p,m);break;case"Q":O.push(A.shift(),A.shift()),p=A.shift(),m=A.shift(),O.push(p,m);break;case"q":O.push(p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="Q",O.push(p,m);break;case"T":F=p,$=m,V=c[c.length-1],V.command==="Q"&&(F=p+(p-V.points[0]),$=m+(m-V.points[1])),p=A.shift(),m=A.shift(),R="Q",O.push(F,$,p,m);break;case"t":F=p,$=m,V=c[c.length-1],V.command==="Q"&&(F=p+(p-V.points[0]),$=m+(m-V.points[1])),p+=A.shift(),m+=A.shift(),R="Q",O.push(F,$,p,m);break;case"A":st=A.shift(),I=A.shift(),et=A.shift(),nt=A.shift(),bt=A.shift(),lt=p,dt=m,p=A.shift(),m=A.shift(),R="A",O=this.convertEndpointToCenterParameterization(lt,dt,p,m,nt,bt,st,I,et);break;case"a":st=A.shift(),I=A.shift(),et=A.shift(),nt=A.shift(),bt=A.shift(),lt=p,dt=m,p+=A.shift(),m+=A.shift(),R="A",O=this.convertEndpointToCenterParameterization(lt,dt,p,m,nt,bt,st,I,et);break}c.push({command:R||D,points:O,start:{x:U,y:j},pathLength:this.calcLength(U,j,R||D,O)})}(D==="z"||D==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(t,i,s,u){let c,f,p,m;const S=Ki;switch(s){case"L":return S.getLineLength(t,i,u[0],u[1]);case"C":return Q5([t,u[0],u[2],u[4]],[i,u[1],u[3],u[5]],1);case"Q":return Z5([t,u[0],u[2]],[i,u[1],u[3]],1);case"A":c=0;const b=u[4],_=u[5],x=u[4]+_;let D=Math.PI/180;if(Math.abs(b-x)<D&&(D=Math.abs(b-x)),f=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],b,0),_<0)for(m=b-D;m>x;m-=D)p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],m,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),f=p;else for(m=b+D;m<x;m+=D)p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],m,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),f=p;return p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],x,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),c}return 0}static convertEndpointToCenterParameterization(t,i,s,u,c,f,p,m,S){const b=S*(Math.PI/180),_=Math.cos(b)*(t-s)/2+Math.sin(b)*(i-u)/2,x=-1*Math.sin(b)*(t-s)/2+Math.cos(b)*(i-u)/2,D=_*_/(p*p)+x*x/(m*m);D>1&&(p*=Math.sqrt(D),m*=Math.sqrt(D));let A=Math.sqrt((p*p*(m*m)-p*p*(x*x)-m*m*(_*_))/(p*p*(x*x)+m*m*(_*_)));c===f&&(A*=-1),isNaN(A)&&(A=0);const N=A*p*x/m,R=A*-m*_/p,O=(t+s)/2+Math.cos(b)*N-Math.sin(b)*R,U=(i+u)/2+Math.sin(b)*N+Math.cos(b)*R,j=function(nt){return Math.sqrt(nt[0]*nt[0]+nt[1]*nt[1])},V=function(nt,bt){return(nt[0]*bt[0]+nt[1]*bt[1])/(j(nt)*j(bt))},F=function(nt,bt){return(nt[0]*bt[1]<nt[1]*bt[0]?-1:1)*Math.acos(V(nt,bt))},$=F([1,0],[(_-N)/p,(x-R)/m]),st=[(_-N)/p,(x-R)/m],I=[(-1*_-N)/p,(-1*x-R)/m];let et=F(st,I);return V(st,I)<=-1&&(et=Math.PI),V(st,I)>=1&&(et=0),f===0&&et>0&&(et=et-2*Math.PI),f===1&&et<0&&(et=et+2*Math.PI),[O,U,p,m,$,et,b,f]}};bs.prototype.className="Path",bs.prototype._attrsAffectingSize=["data"],En(bs),G.addGetterSetter(bs,"data");class fc extends Or{_sceneFunc(t){super._sceneFunc(t);const i=Math.PI*2,s=this.points();let u=s;const c=this.tension()!==0&&s.length>4;c&&(u=this.getTensionPoints());const f=this.pointerLength(),p=s.length;let m,S;if(c){const x=[u[u.length-4],u[u.length-3],u[u.length-2],u[u.length-1],s[p-2],s[p-1]],D=bs.calcLength(u[u.length-4],u[u.length-3],"C",x),A=bs.getPointOnQuadraticBezier(Math.min(1,1-f/D),x[0],x[1],x[2],x[3],x[4],x[5]);m=s[p-2]-A.x,S=s[p-1]-A.y}else m=s[p-2]-s[p-4],S=s[p-1]-s[p-3];const b=(Math.atan2(S,m)+i)%i,_=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(s[p-2],s[p-1]),t.rotate(b),t.moveTo(0,0),t.lineTo(-f,_/2),t.lineTo(-f,-_/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(s[0],s[1]),c?(m=(u[0]+u[2])/2-s[0],S=(u[1]+u[3])/2-s[1]):(m=s[2]-s[0],S=s[3]-s[1]),t.rotate((Math.atan2(-S,-m)+i)%i),t.moveTo(0,0),t.lineTo(-f,_/2),t.lineTo(-f,-_/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){const i=this.dashEnabled();i&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),i&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),i=this.pointerWidth()/2;return{x:t.x,y:t.y-i,width:t.width,height:t.height+i*2}}}fc.prototype.className="Arrow",En(fc),G.addGetterSetter(fc,"pointerLength",10,Dt()),G.addGetterSetter(fc,"pointerWidth",10,Dt()),G.addGetterSetter(fc,"pointerAtBeginning",!1),G.addGetterSetter(fc,"pointerAtEnding",!0);let th=class extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}};th.prototype._centroid=!0,th.prototype.className="Circle",th.prototype._attrsAffectingSize=["radius"],En(th),G.addGetterSetter(th,"radius",0,Dt());class Lo extends Ct{_sceneFunc(t){const i=this.radiusX(),s=this.radiusY();t.beginPath(),t.save(),i!==s&&t.scale(1,s/i),t.arc(0,0,i,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Lo.prototype.className="Ellipse",Lo.prototype._centroid=!0,Lo.prototype._attrsAffectingSize=["radiusX","radiusY"],En(Lo),G.addComponentsGetterSetter(Lo,"radius",["x","y"]),G.addGetterSetter(Lo,"radiusX",0,Dt()),G.addGetterSetter(Lo,"radiusY",0,Dt());let ll=class gT extends Ct{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",i=>{this._removeImageLoad(i.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const t=!!this.cornerRadius(),i=this.hasShadow();return t&&i?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const i=this.getWidth(),s=this.getHeight(),u=this.cornerRadius(),c=this.attrs.image;let f;if(c){const p=this.attrs.cropWidth,m=this.attrs.cropHeight;p&&m?f=[c,this.cropX(),this.cropY(),p,m,0,0,i,s]:f=[c,0,0,i,s]}(this.hasFill()||this.hasStroke()||u)&&(t.beginPath(),u?k.drawRoundedRectPath(t,i,s,u):t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)),c&&(u&&t.clip(),t.drawImage.apply(t,f))}_hitFunc(t){const i=this.width(),s=this.height(),u=this.cornerRadius();t.beginPath(),u?k.drawRoundedRectPath(t,i,s,u):t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,i,s;return(s=(t=this.attrs.width)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.width)!==null&&s!==void 0?s:0}getHeight(){var t,i,s;return(s=(t=this.attrs.height)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.height)!==null&&s!==void 0?s:0}static fromURL(t,i,s=null){const u=k.createImageElement();u.onload=function(){const c=new gT({image:u});i(c)},u.onerror=s,u.crossOrigin="Anonymous",u.src=t}};ll.prototype.className="Image",ll.prototype._attrsAffectingSize=["image"],En(ll),G.addGetterSetter(ll,"cornerRadius",0,x1(4)),G.addGetterSetter(ll,"image"),G.addComponentsGetterSetter(ll,"crop",["x","y","width","height"]),G.addGetterSetter(ll,"cropX",0,Dt()),G.addGetterSetter(ll,"cropY",0,Dt()),G.addGetterSetter(ll,"cropWidth",0,Dt()),G.addGetterSetter(ll,"cropHeight",0,Dt());const F5=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],BC="Change.konva",VC="none",U2="up",B2="right",V2="down",G2="left",GC=F5.length;let j2=class extends Wf{constructor(t){super(t),this.on("add.konva",function(i){this._addListeners(i.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let i=this,s;const u=function(){i._sync()};for(s=0;s<GC;s++)t.on(F5[s]+BC,u)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),i=this.getTag(),s,u,c,f,p,m,S;if(t&&i){switch(s=t.width(),u=t.height(),c=i.pointerDirection(),f=i.pointerWidth(),S=i.pointerHeight(),p=0,m=0,c){case U2:p=s/2,m=-1*S;break;case B2:p=s+f,m=u/2;break;case V2:p=s/2,m=u+S;break;case G2:p=-1*f,m=u/2;break}i.setAttrs({x:-1*p,y:-1*m,width:s,height:u}),t.setAttrs({x:-1*p,y:-1*m})}}};j2.prototype.className="Label",En(j2);class hc extends Ct{_sceneFunc(t){const i=this.width(),s=this.height(),u=this.pointerDirection(),c=this.pointerWidth(),f=this.pointerHeight(),p=this.cornerRadius();let m=0,S=0,b=0,_=0;typeof p=="number"?m=S=b=_=Math.min(p,i/2,s/2):(m=Math.min(p[0]||0,i/2,s/2),S=Math.min(p[1]||0,i/2,s/2),_=Math.min(p[2]||0,i/2,s/2),b=Math.min(p[3]||0,i/2,s/2)),t.beginPath(),t.moveTo(m,0),u===U2&&(t.lineTo((i-c)/2,0),t.lineTo(i/2,-1*f),t.lineTo((i+c)/2,0)),t.lineTo(i-S,0),t.arc(i-S,S,S,Math.PI*3/2,0,!1),u===B2&&(t.lineTo(i,(s-f)/2),t.lineTo(i+c,s/2),t.lineTo(i,(s+f)/2)),t.lineTo(i,s-_),t.arc(i-_,s-_,_,0,Math.PI/2,!1),u===V2&&(t.lineTo((i+c)/2,s),t.lineTo(i/2,s+f),t.lineTo((i-c)/2,s)),t.lineTo(b,s),t.arc(b,s-b,b,Math.PI/2,Math.PI,!1),u===G2&&(t.lineTo(0,(s+f)/2),t.lineTo(-1*c,s/2),t.lineTo(0,(s-f)/2)),t.lineTo(0,m),t.arc(m,m,m,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,i=0,s=this.pointerWidth(),u=this.pointerHeight(),c=this.pointerDirection(),f=this.width(),p=this.height();return c===U2?(i-=u,p+=u):c===V2?p+=u:c===G2?(t-=s*1.5,f+=s):c===B2&&(f+=s*1.5),{x:t,y:i,width:f,height:p}}}hc.prototype.className="Tag",En(hc),G.addGetterSetter(hc,"pointerDirection",VC),G.addGetterSetter(hc,"pointerWidth",0,Dt()),G.addGetterSetter(hc,"pointerHeight",0,Dt()),G.addGetterSetter(hc,"cornerRadius",0,x1(4));let Zp=class extends Ct{_sceneFunc(t){const i=this.cornerRadius(),s=this.width(),u=this.height();t.beginPath(),i?k.drawRoundedRectPath(t,s,u,i):t.rect(0,0,s,u),t.closePath(),t.fillStrokeShape(this)}};Zp.prototype.className="Rect",En(Zp),G.addGetterSetter(Zp,"cornerRadius",0,x1(4));class Po extends Ct{_sceneFunc(t){const i=this._getPoints(),s=this.radius(),u=this.sides(),c=this.cornerRadius();if(t.beginPath(),c)k.drawRoundedPolygonPath(t,i,u,s,c);else{t.moveTo(i[0].x,i[0].y);for(let f=1;f<i.length;f++)t.lineTo(i[f].x,i[f].y)}t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,i=this.attrs.radius||0,s=[];for(let u=0;u<t;u++)s.push({x:i*Math.sin(u*2*Math.PI/t),y:-1*i*Math.cos(u*2*Math.PI/t)});return s}getSelfRect(){const t=this._getPoints();let i=t[0].x,s=t[0].x,u=t[0].y,c=t[0].y;return t.forEach(f=>{i=Math.min(i,f.x),s=Math.max(s,f.x),u=Math.min(u,f.y),c=Math.max(c,f.y)}),{x:i,y:u,width:s-i,height:c-u}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Po.prototype.className="RegularPolygon",Po.prototype._centroid=!0,Po.prototype._attrsAffectingSize=["radius"],En(Po),G.addGetterSetter(Po,"radius",0,Dt()),G.addGetterSetter(Po,"sides",0,Dt()),G.addGetterSetter(Po,"cornerRadius",0,x1(4));const k5=Math.PI*2;class dc extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,k5,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),k5,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}dc.prototype.className="Ring",dc.prototype._centroid=!0,dc.prototype._attrsAffectingSize=["innerRadius","outerRadius"],En(dc),G.addGetterSetter(dc,"innerRadius",0,Dt()),G.addGetterSetter(dc,"outerRadius",0,Dt());class Kl extends Ct{constructor(t){super(t),this._updated=!0,this.anim=new Ss(()=>{const i=this._updated;return this._updated=!1,i}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){const i=this.animation(),s=this.frameIndex(),u=s*4,c=this.animations()[i],f=this.frameOffsets(),p=c[u+0],m=c[u+1],S=c[u+2],b=c[u+3],_=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,S,b),t.closePath(),t.fillStrokeShape(this)),_)if(f){const x=f[i],D=s*2;t.drawImage(_,p,m,S,b,x[D+0],x[D+1],S,b)}else t.drawImage(_,p,m,S,b,0,0,S,b)}_hitFunc(t){const i=this.animation(),s=this.frameIndex(),u=s*4,c=this.animations()[i],f=this.frameOffsets(),p=c[u+2],m=c[u+3];if(t.beginPath(),f){const S=f[i],b=s*2;t.rect(S[b+0],S[b+1],p,m)}else t.rect(0,0,p,m);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const t=this.frameIndex(),i=this.animation(),s=this.animations(),u=s[i],c=u.length/4;t<c-1?this.frameIndex(t+1):this.frameIndex(0)}}Kl.prototype.className="Sprite",En(Kl),G.addGetterSetter(Kl,"animation"),G.addGetterSetter(Kl,"animations"),G.addGetterSetter(Kl,"frameOffsets"),G.addGetterSetter(Kl,"image"),G.addGetterSetter(Kl,"frameIndex",0,Dt()),G.addGetterSetter(Kl,"frameRate",17,Dt()),G.backCompat(Kl,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Yo extends Ct{_sceneFunc(t){const i=this.innerRadius(),s=this.outerRadius(),u=this.numPoints();t.beginPath(),t.moveTo(0,0-s);for(let c=1;c<u*2;c++){const f=c%2===0?s:i,p=f*Math.sin(c*Math.PI/u),m=-1*f*Math.cos(c*Math.PI/u);t.lineTo(p,m)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Yo.prototype.className="Star",Yo.prototype._centroid=!0,Yo.prototype._attrsAffectingSize=["innerRadius","outerRadius"],En(Yo),G.addGetterSetter(Yo,"numPoints",5,Dt()),G.addGetterSetter(Yo,"innerRadius",0,Dt()),G.addGetterSetter(Yo,"outerRadius",0,Dt());function qo(n){return[...n].reduce((t,i,s,u)=>{if(new RegExp("\\p{Emoji}","u").test(i)){const c=u[s+1];c&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(c)?(t.push(i+c),u[s+1]=""):t.push(i)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(i+(u[s+1]||""))?t.push(i+u[s+1]):s>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(i)?t[t.length-1]+=i:i&&t.push(i);return t},[])}const eh="auto",jC="center",I5="inherit",Jp="justify",LC="Change.konva",PC="2d",W5="-",$5="left",YC="text",qC="Text",XC="top",KC="bottom",t4="middle",e4="normal",QC="px ",w1=" ",ZC="right",n4="rtl",JC="word",FC="char",a4="none",L2="…",i4=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],kC=i4.length;function IC(n){return n.split(",").map(t=>{t=t.trim();const i=t.indexOf(" ")>=0,s=t.indexOf('"')>=0||t.indexOf("'")>=0;return i&&!s&&(t=`"${t}"`),t}).join(", ")}let U1;function P2(){return U1||(U1=k.createCanvasElement().getContext(PC),U1)}function WC(n){n.fillText(this._partialText,this._partialTextX,this._partialTextY)}function $C(n){n.setAttr("miterLimit",2),n.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function t_(n){return n=n||{},!n.fillLinearGradientColorStops&&!n.fillRadialGradientColorStops&&!n.fillPatternImage&&(n.fill=n.fill||"black"),n}class an extends Ct{constructor(t){super(t_(t)),this._partialTextX=0,this._partialTextY=0;for(let i=0;i<kC;i++)this.on(i4[i]+LC,this._setTextData);this._setTextData()}_sceneFunc(t){var i,s;const u=this.textArr,c=u.length;if(!this.text())return;let f=this.padding(),p=this.fontSize(),m=this.lineHeight()*p,S=this.verticalAlign(),b=this.direction(),_=0,x=this.align(),D=this.getWidth(),A=this.letterSpacing(),N=this.charRenderFunc(),R=this.fill(),O=this.textDecoration(),U=O.indexOf("underline")!==-1,j=O.indexOf("line-through")!==-1,V;b=b===I5?t.direction:b;let F=m/2,$=t4;if(!Ot.legacyTextRendering){const st=this.measureSize("M");$="alphabetic";const I=(i=st.fontBoundingBoxAscent)!==null&&i!==void 0?i:st.actualBoundingBoxAscent,et=(s=st.fontBoundingBoxDescent)!==null&&s!==void 0?s:st.actualBoundingBoxDescent;F=(I-et)/2+m/2}for(b===n4&&t.setAttr("direction",b),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",$),t.setAttr("textAlign",$5),S===t4?_=(this.getHeight()-c*m-f*2)/2:S===KC&&(_=this.getHeight()-c*m-f*2),t.translate(f,_+f),V=0;V<c;V++){let st=0,I=0;const et=u[V],nt=et.text,bt=et.width,lt=et.lastInParagraph;if(t.save(),x===ZC?st+=D-bt-f*2:x===jC&&(st+=(D-bt-f*2)/2),U){t.save(),t.beginPath();const pt=Ot.legacyTextRendering?Math.round(p/2):Math.round(p/4),tt=st,w=F+I+pt;t.moveTo(tt,w);const Z=x===Jp&&!lt?D-f*2:bt;t.lineTo(tt+Math.round(Z),w),t.lineWidth=p/15;const K=this._getLinearGradient();t.strokeStyle=K||R,t.stroke(),t.restore()}const dt=st;if(b!==n4&&(A!==0||x===Jp||N)){const pt=nt.split(" ").length-1,tt=qo(nt);for(let w=0;w<tt.length;w++){const Z=tt[w];if(Z===" "&&!lt&&x===Jp&&(st+=(D-f*2-bt)/pt),this._partialTextX=st,this._partialTextY=F+I,this._partialText=Z,N){t.save();const at=u.slice(0,V).reduce((W,gt)=>W+qo(gt.text).length,0),St=w+at;N({char:Z,index:St,x:st,y:F+I,lineIndex:V,column:w,isLastInLine:lt,width:this.measureSize(Z).width,context:t})}t.fillStrokeShape(this),N&&t.restore(),st+=this.measureSize(Z).width+A}}else A!==0&&t.setAttr("letterSpacing",`${A}px`),this._partialTextX=st,this._partialTextY=F+I,this._partialText=nt,t.fillStrokeShape(this);if(j){t.save(),t.beginPath();const pt=Ot.legacyTextRendering?0:-Math.round(p/4),tt=dt;t.moveTo(tt,F+I+pt);const w=x===Jp&&!lt?D-f*2:bt;t.lineTo(tt+Math.round(w),F+I+pt),t.lineWidth=p/15;const Z=this._getLinearGradient();t.strokeStyle=Z||R,t.stroke(),t.restore()}t.restore(),c>1&&(F+=m)}}_hitFunc(t){const i=this.getWidth(),s=this.getHeight();t.beginPath(),t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)}setText(t){const i=k._isString(t)?t:t==null?"":t+"";return this._setAttr(YC,i),this}getWidth(){return this.attrs.width===eh||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===eh||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return k.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var i,s,u,c,f,p,m,S,b,_,x;let D=P2(),A=this.fontSize(),N;D.save(),D.font=this._getContextFont(),N=D.measureText(t),D.restore();const R=A/100;return{actualBoundingBoxAscent:(i=N.actualBoundingBoxAscent)!==null&&i!==void 0?i:71.58203125*R,actualBoundingBoxDescent:(s=N.actualBoundingBoxDescent)!==null&&s!==void 0?s:0,actualBoundingBoxLeft:(u=N.actualBoundingBoxLeft)!==null&&u!==void 0?u:-7.421875*R,actualBoundingBoxRight:(c=N.actualBoundingBoxRight)!==null&&c!==void 0?c:75.732421875*R,alphabeticBaseline:(f=N.alphabeticBaseline)!==null&&f!==void 0?f:0,emHeightAscent:(p=N.emHeightAscent)!==null&&p!==void 0?p:100*R,emHeightDescent:(m=N.emHeightDescent)!==null&&m!==void 0?m:-20*R,fontBoundingBoxAscent:(S=N.fontBoundingBoxAscent)!==null&&S!==void 0?S:91*R,fontBoundingBoxDescent:(b=N.fontBoundingBoxDescent)!==null&&b!==void 0?b:21*R,hangingBaseline:(_=N.hangingBaseline)!==null&&_!==void 0?_:72.80000305175781*R,ideographicBaseline:(x=N.ideographicBaseline)!==null&&x!==void 0?x:-21*R,width:N.width,height:A}}_getContextFont(){return this.fontStyle()+w1+this.fontVariant()+w1+(this.fontSize()+QC)+IC(this.fontFamily())}_addTextLine(t){this.align()===Jp&&(t=t.trim());const s=this._getTextWidth(t);return this.textArr.push({text:t,width:s,lastInParagraph:!1})}_getTextWidth(t){const i=this.letterSpacing(),s=t.length;return P2().measureText(t).width+i*s}_setTextData(){let t=this.text().split(`
15
- `),i=+this.fontSize(),s=0,u=this.lineHeight()*i,c=this.attrs.width,f=this.attrs.height,p=c!==eh&&c!==void 0,m=f!==eh&&f!==void 0,S=this.padding(),b=c-S*2,_=f-S*2,x=0,D=this.wrap(),A=D!==a4,N=D!==FC&&A,R=this.ellipsis();this.textArr=[],P2().font=this._getContextFont();const O=R?this._getTextWidth(L2):0;for(let U=0,j=t.length;U<j;++U){let V=t[U],F=this._getTextWidth(V);if(p&&F>b)for(;V.length>0;){let $=0,st=qo(V).length,I="",et=0;for(;$<st;){const nt=$+st>>>1,bt=qo(V),lt=bt.slice(0,nt+1).join(""),dt=this._getTextWidth(lt);(R&&m&&x+u>_?dt+O:dt)<=b?($=nt+1,I=lt,et=dt):st=nt}if(I){if(N){const lt=qo(V),dt=qo(I),pt=lt[dt.length],tt=pt===w1||pt===W5;let w;if(tt&&et<=b)w=dt.length;else{const Z=dt.lastIndexOf(w1),K=dt.lastIndexOf(W5);w=Math.max(Z,K)+1}w>0&&($=w,I=lt.slice(0,$).join(""),et=this._getTextWidth(I))}if(I=I.trimRight(),this._addTextLine(I),s=Math.max(s,et),x+=u,this._shouldHandleEllipsis(x)){this._tryToAddEllipsisToLastLine();break}if(V=qo(V).slice($).join("").trimLeft(),V.length>0&&(F=this._getTextWidth(V),F<=b)){this._addTextLine(V),x+=u,s=Math.max(s,F);break}}else break}else this._addTextLine(V),x+=u,s=Math.max(s,F),this._shouldHandleEllipsis(x)&&U<j-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),m&&x+u>_)break}this.textHeight=i,this.textWidth=s}_shouldHandleEllipsis(t){const i=+this.fontSize(),s=this.lineHeight()*i,u=this.attrs.height,c=u!==eh&&u!==void 0,f=this.padding(),p=u-f*2;return!(this.wrap()!==a4)||c&&t+s>p}_tryToAddEllipsisToLastLine(){const t=this.attrs.width,i=t!==eh&&t!==void 0,s=this.padding(),u=t-s*2,c=this.ellipsis(),f=this.textArr[this.textArr.length-1];!f||!c||(i&&(this._getTextWidth(f.text+L2)<u||(f.text=f.text.slice(0,f.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(f.text+L2))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,i=this.hasShadow();return t&&i?!0:super._useBufferCanvas()}}an.prototype._fillFunc=WC,an.prototype._strokeFunc=$C,an.prototype.className=qC,an.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],En(an),G.overWriteSetter(an,"width",T2()),G.overWriteSetter(an,"height",T2()),G.addGetterSetter(an,"direction",I5),G.addGetterSetter(an,"fontFamily","Arial"),G.addGetterSetter(an,"fontSize",12,Dt()),G.addGetterSetter(an,"fontStyle",e4),G.addGetterSetter(an,"fontVariant",e4),G.addGetterSetter(an,"padding",0,Dt()),G.addGetterSetter(an,"align",$5),G.addGetterSetter(an,"verticalAlign",XC),G.addGetterSetter(an,"lineHeight",1,Dt()),G.addGetterSetter(an,"wrap",JC),G.addGetterSetter(an,"ellipsis",!1,sl()),G.addGetterSetter(an,"letterSpacing",0,Dt()),G.addGetterSetter(an,"text","",oc()),G.addGetterSetter(an,"textDecoration",""),G.addGetterSetter(an,"charRenderFunc",void 0);const e_="",s4="normal";function l4(n){n.fillText(this.partialText,0,0)}function r4(n){n.strokeText(this.partialText,0,0)}class ca extends Ct{constructor(t){super(t),this.dummyCanvas=k.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return bs.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const i=this.pathLength;return t>i?null:bs.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=bs.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();const i=this.textDecoration(),s=this.fill(),u=this.fontSize(),c=this.glyphInfo,f=i.indexOf("underline")!==-1,p=i.indexOf("line-through")!==-1;f&&t.beginPath();for(let m=0;m<c.length;m++){t.save();const S=c[m].p0;t.translate(S.x,S.y),t.rotate(c[m].rotation),this.partialText=c[m].text,t.fillStrokeShape(this),f&&(m===0&&t.moveTo(0,u/2+1),t.lineTo(c[m].width,u/2+1)),t.restore()}if(f&&(t.strokeStyle=s,t.lineWidth=u/20,t.stroke()),p){t.beginPath();for(let m=0;m<c.length;m++){t.save();const S=c[m].p0;t.translate(S.x,S.y),t.rotate(c[m].rotation),m===0&&t.moveTo(0,0),t.lineTo(c[m].width,0),t.restore()}t.strokeStyle=s,t.lineWidth=u/20,t.stroke()}t.restore()}_hitFunc(t){t.beginPath();const i=this.glyphInfo;if(i.length>=1){const s=i[0].p0;t.moveTo(s.x,s.y)}for(let s=0;s<i.length;s++){const u=i[s].p1;t.lineTo(u.x,u.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return k.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return an.prototype.setText.call(this,t)}_getContextFont(){return an.prototype._getContextFont.call(this)}_getTextSize(t){const s=this.dummyCanvas.getContext("2d");s.save(),s.font=this._getContextFont();const u=s.measureText(t);return s.restore(),{width:u.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const t=qo(this.text()),i=[];let s=0;for(let _=0;_<t.length;_++)i.push({char:t[_],width:this._getTextSize(t[_]).width}),s+=i[_].width;const{height:u}=this._getTextSize(this.attrs.text);if(this.textWidth=s,this.textHeight=u,this.glyphInfo=[],!this.attrs.data)return null;const c=this.letterSpacing(),f=this.align(),p=this.kerningFunc(),m=Math.max(this.textWidth+((this.attrs.text||"").length-1)*c,0);let S=0;f==="center"&&(S=Math.max(0,this.pathLength/2-m/2)),f==="right"&&(S=Math.max(0,this.pathLength-m));let b=S;for(let _=0;_<i.length;_++){const x=this._getPointAtLength(b);if(!x)return;const D=i[_].char;let A=i[_].width+c;if(D===" "&&f==="justify"){const V=this.text().split(" ").length-1;A+=(this.pathLength-m)/V}const N=this._getPointAtLength(b+A);if(!N)return;const R=bs.getLineLength(x.x,x.y,N.x,N.y);let O=0;if(p)try{O=p(i[_-1].char,D)*this.fontSize()}catch{O=0}x.x+=O,N.x+=O,this.textWidth+=O;const U=bs.getPointOnLine(O+R/2,x.x,x.y,N.x,N.y),j=Math.atan2(N.y-x.y,N.x-x.x);this.glyphInfo.push({transposeX:U.x,transposeY:U.y,text:t[_],rotation:j,p0:x,p1:N,width:R}),b+=A}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const t=[];this.glyphInfo.forEach(function(S){t.push(S.p0.x),t.push(S.p0.y),t.push(S.p1.x),t.push(S.p1.y)});let i=t[0]||0,s=t[0]||0,u=t[1]||0,c=t[1]||0,f,p;for(let S=0;S<t.length/2;S++)f=t[S*2],p=t[S*2+1],i=Math.min(i,f),s=Math.max(s,f),u=Math.min(u,p),c=Math.max(c,p);const m=this.fontSize();return{x:i-m/2,y:u-m/2,width:s-i+m,height:c-u+m}}destroy(){return k.releaseCanvas(this.dummyCanvas),super.destroy()}}ca.prototype._fillFunc=l4,ca.prototype._strokeFunc=r4,ca.prototype._fillFuncHit=l4,ca.prototype._strokeFuncHit=r4,ca.prototype.className="TextPath",ca.prototype._attrsAffectingSize=["text","fontSize","data"],En(ca),G.addGetterSetter(ca,"data"),G.addGetterSetter(ca,"fontFamily","Arial"),G.addGetterSetter(ca,"fontSize",12,Dt()),G.addGetterSetter(ca,"fontStyle",s4),G.addGetterSetter(ca,"align","left"),G.addGetterSetter(ca,"letterSpacing",0,Dt()),G.addGetterSetter(ca,"textBaseline","middle"),G.addGetterSetter(ca,"fontVariant",s4),G.addGetterSetter(ca,"text",e_),G.addGetterSetter(ca,"textDecoration",""),G.addGetterSetter(ca,"kerningFunc",void 0);const o4="tr-konva",n_=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(n=>n+`.${o4}`).join(" "),u4="nodesRect",a_=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],i_={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},s_="ontouchstart"in Ot._global;function l_(n,t,i){if(n==="rotater")return i;t+=k.degToRad(i_[n]||0);const s=(k.radToDeg(t)%360+360)%360;return k._inRange(s,315+22.5,360)||k._inRange(s,0,22.5)?"ns-resize":k._inRange(s,45-22.5,45+22.5)?"nesw-resize":k._inRange(s,90-22.5,90+22.5)?"ew-resize":k._inRange(s,135-22.5,135+22.5)?"nwse-resize":k._inRange(s,180-22.5,180+22.5)?"ns-resize":k._inRange(s,225-22.5,225+22.5)?"nesw-resize":k._inRange(s,270-22.5,270+22.5)?"ew-resize":k._inRange(s,315-22.5,315+22.5)?"nwse-resize":(k.error("Transformer has unknown angle for cursor detection: "+s),"pointer")}const B1=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function r_(n){return{x:n.x+n.width/2*Math.cos(n.rotation)+n.height/2*Math.sin(-n.rotation),y:n.y+n.height/2*Math.cos(n.rotation)+n.width/2*Math.sin(n.rotation)}}function c4(n,t,i){const s=i.x+(n.x-i.x)*Math.cos(t)-(n.y-i.y)*Math.sin(t),u=i.y+(n.x-i.x)*Math.sin(t)+(n.y-i.y)*Math.cos(t);return{...n,rotation:n.rotation+t,x:s,y:u}}function o_(n,t){const i=r_(n);return c4(n,t,i)}function u_(n,t,i){let s=t;for(let u=0;u<n.length;u++){const c=Ot.getAngle(n[u]),f=Math.abs(c-t)%(Math.PI*2);Math.min(f,Math.PI*2-f)<i&&(s=c)}return s}let Y2=0;class ve extends Wf{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(n_,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return k.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return o4+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const i=t.filter(u=>u.isAncestorOf(this)?(k.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=t=i,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(u=>{const c=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(u._attrsAffectingSize.length){const f=u._attrsAffectingSize.map(p=>p+"Change."+this._getEventNamespace()).join(" ");u.on(f,c)}u.on(a_.map(f=>f+`.${this._getEventNamespace()}`).join(" "),c),u.on(`absoluteTransformChange.${this._getEventNamespace()}`,c),this._proxyDrag(u)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let i;t.on(`dragstart.${this._getEventNamespace()}`,s=>{i=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(s,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,s=>{if(!i)return;const u=t.getAbsolutePosition(),c=u.x-i.x,f=u.y-i.y;this.nodes().forEach(p=>{if(p===t||p.isDragging())return;const m=p.getAbsolutePosition();p.setAbsolutePosition({x:m.x+c,y:m.y+f}),p.startDrag(s)}),i=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(u4),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(u4,this.__getNodeRect)}__getNodeShape(t,i=this.rotation(),s){const u=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),c=t.getAbsoluteScale(s),f=t.getAbsolutePosition(s),p=u.x*c.x-t.offsetX()*c.x,m=u.y*c.y-t.offsetY()*c.y,S=(Ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),b={x:f.x+p*Math.cos(S)+m*Math.sin(-S),y:f.y+m*Math.cos(S)+p*Math.sin(S),width:u.width*c.x,height:u.height*c.y,rotation:S};return c4(b,-Ot.getAngle(i),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const i=[];this.nodes().map(S=>{const b=S.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),_=[{x:b.x,y:b.y},{x:b.x+b.width,y:b.y},{x:b.x+b.width,y:b.y+b.height},{x:b.x,y:b.y+b.height}],x=S.getAbsoluteTransform();_.forEach(function(D){const A=x.point(D);i.push(A)})});const s=new Qi;s.rotate(-Ot.getAngle(this.rotation()));let u=1/0,c=1/0,f=-1/0,p=-1/0;i.forEach(function(S){const b=s.point(S);u===void 0&&(u=f=b.x,c=p=b.y),u=Math.min(u,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),p=Math.max(p,b.y)}),s.invert();const m=s.point({x:u,y:c});return{x:m.x,y:m.y,width:f-u,height:p-c,rotation:Ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),B1.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){const i=new Zp({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:s_?10:"auto"}),s=this;i.on("mousedown touchstart",function(u){s._handleMouseDown(u)}),i.on("dragstart",u=>{i.stopDrag(),u.cancelBubble=!0}),i.on("dragend",u=>{u.cancelBubble=!0}),i.on("mouseenter",()=>{const u=Ot.getAngle(this.rotation()),c=this.rotateAnchorCursor(),f=l_(t,u,c);i.getStage().content&&(i.getStage().content.style.cursor=f),this._cursorChange=!0}),i.on("mouseout",()=>{i.getStage().content&&(i.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(i)}_createBack(){const t=new Ct({name:"back",width:0,height:0,sceneFunc(i,s){const u=s.getParent(),c=u.padding();i.beginPath(),i.rect(-c,-c,s.width()+c*2,s.height()+c*2),i.moveTo(s.width()/2,-c),u.rotateEnabled()&&u.rotateLineVisible()&&i.lineTo(s.width()/2,-u.rotateAnchorOffset()*k._sign(s.height())-c),i.fillStrokeShape(s)},hitFunc:(i,s)=>{if(!this.shouldOverdrawWholeArea())return;const u=this.padding();i.beginPath(),i.rect(-u,-u,s.width()+u*2,s.height()+u*2),i.fillStrokeShape(s)}});this.add(t),this._proxyDrag(t),t.on("dragstart",i=>{i.cancelBubble=!0}),t.on("dragmove",i=>{i.cancelBubble=!0}),t.on("dragend",i=>{i.cancelBubble=!0}),this.on("dragmove",i=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];const i=this._getNodeRect(),s=i.width,u=i.height,c=Math.sqrt(Math.pow(s,2)+Math.pow(u,2));this.sin=Math.abs(u/c),this.cos=Math.abs(s/c),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const f=t.target.getAbsolutePosition(),p=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:p.x-f.x,y:p.y-f.y},Y2++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(m=>{m._fire("transformstart",{evt:t.evt,target:m})})}_handleMouseMove(t){let i,s,u;const c=this.findOne("."+this._movingAnchorName),f=c.getStage();f.setPointersPositions(t);const p=f.getPointerPosition();let m={x:p.x-this._anchorDragOffset.x,y:p.y-this._anchorDragOffset.y};const S=c.getAbsolutePosition();this.anchorDragBoundFunc()&&(m=this.anchorDragBoundFunc()(S,m,t)),c.setAbsolutePosition(m);const b=c.getAbsolutePosition();if(S.x===b.x&&S.y===b.y)return;if(this._movingAnchorName==="rotater"){const U=this._getNodeRect();i=c.x()-U.width/2,s=-c.y()+U.height/2;let j=Math.atan2(-s,i)+Math.PI/2;U.height<0&&(j-=Math.PI);const F=Ot.getAngle(this.rotation())+j,$=Ot.getAngle(this.rotationSnapTolerance()),I=u_(this.rotationSnaps(),F,$)-U.rotation,et=o_(U,I);this._fitNodesInto(et,t);return}const _=this.shiftBehavior();let x;_==="inverted"?x=this.keepRatio()&&!t.shiftKey:_==="none"?x=this.keepRatio():x=this.keepRatio()||t.shiftKey;let D=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};u=Math.sqrt(Math.pow(U.x-c.x(),2)+Math.pow(U.y-c.y(),2));const j=this.findOne(".top-left").x()>U.x?-1:1,V=this.findOne(".top-left").y()>U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".top-left").x(U.x-i),this.findOne(".top-left").y(U.y-s)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(c.y());else if(this._movingAnchorName==="top-right"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};u=Math.sqrt(Math.pow(c.x()-U.x,2)+Math.pow(U.y-c.y(),2));const j=this.findOne(".top-right").x()<U.x?-1:1,V=this.findOne(".top-right").y()>U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".top-right").x(U.x+i),this.findOne(".top-right").y(U.y-s)}var A=c.position();this.findOne(".top-left").y(A.y),this.findOne(".bottom-right").x(A.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(c.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(c.x());else if(this._movingAnchorName==="bottom-left"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};u=Math.sqrt(Math.pow(U.x-c.x(),2)+Math.pow(c.y()-U.y,2));const j=U.x<c.x()?-1:1,V=c.y()<U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,c.x(U.x-i),c.y(U.y+s)}A=c.position(),this.findOne(".top-left").x(A.x),this.findOne(".bottom-right").y(A.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(c.y());else if(this._movingAnchorName==="bottom-right"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};u=Math.sqrt(Math.pow(c.x()-U.x,2)+Math.pow(c.y()-U.y,2));const j=this.findOne(".bottom-right").x()<U.x?-1:1,V=this.findOne(".bottom-right").y()<U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".bottom-right").x(U.x+i),this.findOne(".bottom-right").y(U.y+s)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(D=this.centeredScaling()||t.altKey,D){const U=this.findOne(".top-left"),j=this.findOne(".bottom-right"),V=U.x(),F=U.y(),$=this.getWidth()-j.x(),st=this.getHeight()-j.y();j.move({x:-V,y:-F}),U.move({x:$,y:st})}const N=this.findOne(".top-left").getAbsolutePosition();i=N.x,s=N.y;const R=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),O=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:i,y:s,width:R,height:O,rotation:Ot.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var i;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const s=this.getNode();Y2--,this._fire("transformend",{evt:t,target:s}),(i=this.getLayer())===null||i===void 0||i.batchDraw(),s&&this._nodes.forEach(u=>{var c;u._fire("transformend",{evt:t,target:u}),(c=u.getLayer())===null||c===void 0||c.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,i){const s=this._getNodeRect(),u=1;if(k._inRange(t.width,-this.padding()*2-u,u)){this.update();return}if(k._inRange(t.height,-this.padding()*2-u,u)){this.update();return}const c=new Qi;if(c.rotate(Ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const x=c.point({x:-this.padding()*2,y:0});t.x+=x.x,t.y+=x.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const x=c.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const x=c.point({x:0,y:-this.padding()*2});t.x+=x.x,t.y+=x.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const x=c.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const x=this.boundBoxFunc()(s,t);x?t=x:k.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const f=1e7,p=new Qi;p.translate(s.x,s.y),p.rotate(s.rotation),p.scale(s.width/f,s.height/f);const m=new Qi,S=t.width/f,b=t.height/f;this.flipEnabled()===!1?(m.translate(t.x,t.y),m.rotate(t.rotation),m.translate(t.width<0?t.width:0,t.height<0?t.height:0),m.scale(Math.abs(S),Math.abs(b))):(m.translate(t.x,t.y),m.rotate(t.rotation),m.scale(S,b));const _=m.multiply(p.invert());this._nodes.forEach(x=>{var D;if(!x.getStage())return;const A=x.getParent().getAbsoluteTransform(),N=x.getTransform().copy();N.translate(x.offsetX(),x.offsetY());const R=new Qi;R.multiply(A.copy().invert()).multiply(_).multiply(A).multiply(N);const O=R.decompose();x.setAttrs(O),(D=x.getLayer())===null||D===void 0||D.batchDraw()}),this.rotation(k._getRotation(t.rotation)),this._nodes.forEach(x=>{this._fire("transform",{evt:i,target:x}),x._fire("transform",{evt:i,target:x})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,i){this.findOne(t).setAttrs(i)}update(){var t;const i=this._getNodeRect();this.rotation(k._getRotation(i.rotation));const s=i.width,u=i.height,c=this.enabledAnchors(),f=this.resizeEnabled(),p=this.padding(),m=this.anchorSize(),S=this.find("._anchor");S.forEach(_=>{_.setAttrs({width:m,height:m,offsetX:m/2,offsetY:m/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:m/2+p,offsetY:m/2+p,visible:f&&c.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:s/2,y:0,offsetY:m/2+p,visible:f&&c.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:s,y:0,offsetX:m/2-p,offsetY:m/2+p,visible:f&&c.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:u/2,offsetX:m/2+p,visible:f&&c.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:s,y:u/2,offsetX:m/2-p,visible:f&&c.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:u,offsetX:m/2+p,offsetY:m/2-p,visible:f&&c.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:s/2,y:u,offsetY:m/2-p,visible:f&&c.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:s,y:u,offsetX:m/2-p,offsetY:m/2-p,visible:f&&c.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:s/2,y:-this.rotateAnchorOffset()*k._sign(u)-p,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:s,height:u,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(_=>_.draggable()),x:0,y:0});const b=this.anchorStyleFunc();b&&S.forEach(_=>{b(_)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),Wf.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Nt.prototype.toObject.call(this)}clone(t){return Nt.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}ve.isTransforming=()=>Y2>0;function c_(n){return n instanceof Array||k.warn("enabledAnchors value should be an array"),n instanceof Array&&n.forEach(function(t){B1.indexOf(t)===-1&&k.warn("Unknown anchor name: "+t+". Available names are: "+B1.join(", "))}),n||[]}ve.prototype.className="Transformer",En(ve),G.addGetterSetter(ve,"enabledAnchors",B1,c_),G.addGetterSetter(ve,"flipEnabled",!0,sl()),G.addGetterSetter(ve,"resizeEnabled",!0),G.addGetterSetter(ve,"anchorSize",10,Dt()),G.addGetterSetter(ve,"rotateEnabled",!0),G.addGetterSetter(ve,"rotateLineVisible",!0),G.addGetterSetter(ve,"rotationSnaps",[]),G.addGetterSetter(ve,"rotateAnchorOffset",50,Dt()),G.addGetterSetter(ve,"rotateAnchorCursor","crosshair"),G.addGetterSetter(ve,"rotationSnapTolerance",5,Dt()),G.addGetterSetter(ve,"borderEnabled",!0),G.addGetterSetter(ve,"anchorStroke","rgb(0, 161, 255)"),G.addGetterSetter(ve,"anchorStrokeWidth",1,Dt()),G.addGetterSetter(ve,"anchorFill","white"),G.addGetterSetter(ve,"anchorCornerRadius",0,Dt()),G.addGetterSetter(ve,"borderStroke","rgb(0, 161, 255)"),G.addGetterSetter(ve,"borderStrokeWidth",1,Dt()),G.addGetterSetter(ve,"borderDash"),G.addGetterSetter(ve,"keepRatio",!0),G.addGetterSetter(ve,"shiftBehavior","default"),G.addGetterSetter(ve,"centeredScaling",!1),G.addGetterSetter(ve,"ignoreStroke",!1),G.addGetterSetter(ve,"padding",0,Dt()),G.addGetterSetter(ve,"nodes"),G.addGetterSetter(ve,"node"),G.addGetterSetter(ve,"boundBoxFunc"),G.addGetterSetter(ve,"anchorDragBoundFunc"),G.addGetterSetter(ve,"anchorStyleFunc"),G.addGetterSetter(ve,"shouldOverdrawWholeArea",!1),G.addGetterSetter(ve,"useSingleNodeRotation",!0),G.backCompat(ve,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Rr extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,Ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Rr.prototype.className="Wedge",Rr.prototype._centroid=!0,Rr.prototype._attrsAffectingSize=["radius"],En(Rr),G.addGetterSetter(Rr,"radius",0,Dt()),G.addGetterSetter(Rr,"angle",0,Dt()),G.addGetterSetter(Rr,"clockwise",!1),G.backCompat(Rr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function f4(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const f_=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],h_=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function d_(n,t){const i=n.data,s=n.width,u=n.height;let c,f,p,m,S,b,_,x,D,A,N,R,O,U,j,V,F,$,st,I;const et=t+t+1,nt=s-1,bt=u-1,lt=t+1,dt=lt*(lt+1)/2,pt=new f4,tt=f_[t],w=h_[t];let Z=null,K=pt,at=null,St=null;for(let W=1;W<et;W++)K=K.next=new f4,W===lt&&(Z=K);K.next=pt,p=f=0;for(let W=0;W<u;W++){R=O=U=j=m=S=b=_=0,x=lt*(V=i[f]),D=lt*(F=i[f+1]),A=lt*($=i[f+2]),N=lt*(st=i[f+3]),m+=dt*V,S+=dt*F,b+=dt*$,_+=dt*st,K=pt;for(let gt=0;gt<lt;gt++)K.r=V,K.g=F,K.b=$,K.a=st,K=K.next;for(let gt=1;gt<lt;gt++)c=f+((nt<gt?nt:gt)<<2),m+=(K.r=V=i[c])*(I=lt-gt),S+=(K.g=F=i[c+1])*I,b+=(K.b=$=i[c+2])*I,_+=(K.a=st=i[c+3])*I,R+=V,O+=F,U+=$,j+=st,K=K.next;at=pt,St=Z;for(let gt=0;gt<s;gt++)i[f+3]=st=_*tt>>w,st!==0?(st=255/st,i[f]=(m*tt>>w)*st,i[f+1]=(S*tt>>w)*st,i[f+2]=(b*tt>>w)*st):i[f]=i[f+1]=i[f+2]=0,m-=x,S-=D,b-=A,_-=N,x-=at.r,D-=at.g,A-=at.b,N-=at.a,c=p+((c=gt+t+1)<nt?c:nt)<<2,R+=at.r=i[c],O+=at.g=i[c+1],U+=at.b=i[c+2],j+=at.a=i[c+3],m+=R,S+=O,b+=U,_+=j,at=at.next,x+=V=St.r,D+=F=St.g,A+=$=St.b,N+=st=St.a,R-=V,O-=F,U-=$,j-=st,St=St.next,f+=4;p+=s}for(let W=0;W<s;W++){O=U=j=R=S=b=_=m=0,f=W<<2,x=lt*(V=i[f]),D=lt*(F=i[f+1]),A=lt*($=i[f+2]),N=lt*(st=i[f+3]),m+=dt*V,S+=dt*F,b+=dt*$,_+=dt*st,K=pt;for(let Tt=0;Tt<lt;Tt++)K.r=V,K.g=F,K.b=$,K.a=st,K=K.next;let gt=s;for(let Tt=1;Tt<=t;Tt++)f=gt+W<<2,m+=(K.r=V=i[f])*(I=lt-Tt),S+=(K.g=F=i[f+1])*I,b+=(K.b=$=i[f+2])*I,_+=(K.a=st=i[f+3])*I,R+=V,O+=F,U+=$,j+=st,K=K.next,Tt<bt&&(gt+=s);f=W,at=pt,St=Z;for(let Tt=0;Tt<u;Tt++)c=f<<2,i[c+3]=st=_*tt>>w,st>0?(st=255/st,i[c]=(m*tt>>w)*st,i[c+1]=(S*tt>>w)*st,i[c+2]=(b*tt>>w)*st):i[c]=i[c+1]=i[c+2]=0,m-=x,S-=D,b-=A,_-=N,x-=at.r,D-=at.g,A-=at.b,N-=at.a,c=W+((c=Tt+lt)<bt?c:bt)*s<<2,m+=R+=at.r=i[c],S+=O+=at.g=i[c+1],b+=U+=at.b=i[c+2],_+=j+=at.a=i[c+3],at=at.next,x+=V=St.r,D+=F=St.g,A+=$=St.b,N+=st=St.a,R-=V,O-=F,U-=$,j-=st,St=St.next,f+=s}}const p_=function(t){const i=Math.round(this.blurRadius());i>0&&d_(t,i)};G.addGetterSetter(Nt,"blurRadius",0,Dt(),G.afterSetFilter);const m_=function(n){const t=this.brightness()*255,i=n.data,s=i.length;for(let u=0;u<s;u+=4)i[u]+=t,i[u+1]+=t,i[u+2]+=t};G.addGetterSetter(Nt,"brightness",0,Dt(),G.afterSetFilter);const g_=function(n){const t=this.brightness(),i=n.data,s=i.length;for(let u=0;u<s;u+=4)i[u]=Math.min(255,i[u]*t),i[u+1]=Math.min(255,i[u+1]*t),i[u+2]=Math.min(255,i[u+2]*t)},y_=function(n){const t=Math.pow((this.contrast()+100)/100,2),i=n.data,s=i.length;let u=150,c=150,f=150;for(let p=0;p<s;p+=4)u=i[p],c=i[p+1],f=i[p+2],u/=255,u-=.5,u*=t,u+=.5,u*=255,c/=255,c-=.5,c*=t,c+=.5,c*=255,f/=255,f-=.5,f*=t,f+=.5,f*=255,u=u<0?0:u>255?255:u,c=c<0?0:c>255?255:c,f=f<0?0:f>255?255:f,i[p]=u,i[p+1]=c,i[p+2]=f};G.addGetterSetter(Nt,"contrast",0,Dt(),G.afterSetFilter);const v_=function(n){var t,i,s,u,c,f,p,m,S;const b=n.data,_=n.width,x=n.height,D=Math.min(1,Math.max(0,(i=(t=this.embossStrength)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:.5)),A=Math.min(1,Math.max(0,(u=(s=this.embossWhiteLevel)===null||s===void 0?void 0:s.call(this))!==null&&u!==void 0?u:.5)),R=(p={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(f=(c=this.embossDirection)===null||c===void 0?void 0:c.call(this))!==null&&f!==void 0?f:"top-left"])!==null&&p!==void 0?p:315,O=!!((S=(m=this.embossBlend)===null||m===void 0?void 0:m.call(this))!==null&&S!==void 0&&S),U=D*10,j=A*255,V=R*Math.PI/180,F=Math.cos(V),$=Math.sin(V),st=128/1020*U,I=new Uint8ClampedArray(b),et=new Float32Array(_*x);for(let pt=0,tt=0;tt<b.length;tt+=4,pt++)et[pt]=.2126*I[tt]+.7152*I[tt+1]+.0722*I[tt+2];const nt=[-1,0,1,-2,0,2,-1,0,1],bt=[-1,-2,-1,0,0,0,1,2,1],lt=[-_-1,-_,-_+1,-1,0,1,_-1,_,_+1],dt=pt=>pt<0?0:pt>255?255:pt;for(let pt=1;pt<x-1;pt++)for(let tt=1;tt<_-1;tt++){const w=pt*_+tt;let Z=0,K=0;Z+=et[w+lt[0]]*nt[0],K+=et[w+lt[0]]*bt[0],Z+=et[w+lt[1]]*nt[1],K+=et[w+lt[1]]*bt[1],Z+=et[w+lt[2]]*nt[2],K+=et[w+lt[2]]*bt[2],Z+=et[w+lt[3]]*nt[3],K+=et[w+lt[3]]*bt[3],Z+=et[w+lt[5]]*nt[5],K+=et[w+lt[5]]*bt[5],Z+=et[w+lt[6]]*nt[6],K+=et[w+lt[6]]*bt[6],Z+=et[w+lt[7]]*nt[7],K+=et[w+lt[7]]*bt[7],Z+=et[w+lt[8]]*nt[8],K+=et[w+lt[8]]*bt[8];const at=F*Z+$*K,St=dt(j+at*st),W=w*4;if(O){const gt=St-j;b[W]=dt(I[W]+gt),b[W+1]=dt(I[W+1]+gt),b[W+2]=dt(I[W+2]+gt),b[W+3]=I[W+3]}else b[W]=b[W+1]=b[W+2]=St,b[W+3]=I[W+3]}for(let pt=0;pt<_;pt++){let tt=pt*4,w=((x-1)*_+pt)*4;b[tt]=I[tt],b[tt+1]=I[tt+1],b[tt+2]=I[tt+2],b[tt+3]=I[tt+3],b[w]=I[w],b[w+1]=I[w+1],b[w+2]=I[w+2],b[w+3]=I[w+3]}for(let pt=1;pt<x-1;pt++){let tt=pt*_*4,w=(pt*_+(_-1))*4;b[tt]=I[tt],b[tt+1]=I[tt+1],b[tt+2]=I[tt+2],b[tt+3]=I[tt+3],b[w]=I[w],b[w+1]=I[w+1],b[w+2]=I[w+2],b[w+3]=I[w+3]}return n};G.addGetterSetter(Nt,"embossStrength",.5,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"embossWhiteLevel",.5,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"embossDirection","top-left",void 0,G.afterSetFilter),G.addGetterSetter(Nt,"embossBlend",!1,void 0,G.afterSetFilter);function q2(n,t,i,s,u){const c=i-t,f=u-s;if(c===0)return s+f/2;if(f===0)return s;let p=(n-t)/c;return p=f*p+s,p}const S_=function(n){const t=n.data,i=t.length;let s=t[0],u=s,c,f=t[1],p=f,m,S=t[2],b=S,_;const x=this.enhance();if(x===0)return;for(let j=0;j<i;j+=4)c=t[j+0],c<s?s=c:c>u&&(u=c),m=t[j+1],m<f?f=m:m>p&&(p=m),_=t[j+2],_<S?S=_:_>b&&(b=_);u===s&&(u=255,s=0),p===f&&(p=255,f=0),b===S&&(b=255,S=0);let D,A,N,R,O,U;if(x>0)D=u+x*(255-u),A=s-x*(s-0),N=p+x*(255-p),R=f-x*(f-0),O=b+x*(255-b),U=S-x*(S-0);else{const j=(u+s)*.5;D=u+x*(u-j),A=s+x*(s-j);const V=(p+f)*.5;N=p+x*(p-V),R=f+x*(f-V);const F=(b+S)*.5;O=b+x*(b-F),U=S+x*(S-F)}for(let j=0;j<i;j+=4)t[j+0]=q2(t[j+0],s,u,A,D),t[j+1]=q2(t[j+1],f,p,R,N),t[j+2]=q2(t[j+2],S,b,U,O)};G.addGetterSetter(Nt,"enhance",0,Dt(),G.afterSetFilter);const b_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4){const u=.34*t[s]+.5*t[s+1]+.16*t[s+2];t[s]=u,t[s+1]=u,t[s+2]=u}};G.addGetterSetter(Nt,"hue",0,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"saturation",0,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"luminance",0,Dt(),G.afterSetFilter);const E_=function(n){const t=n.data,i=t.length,s=1,u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=this.luminance()*127,p=s*u*Math.cos(c*Math.PI/180),m=s*u*Math.sin(c*Math.PI/180),S=.299*s+.701*p+.167*m,b=.587*s-.587*p+.33*m,_=.114*s-.114*p-.497*m,x=.299*s-.299*p-.328*m,D=.587*s+.413*p+.035*m,A=.114*s-.114*p+.293*m,N=.299*s-.3*p+1.25*m,R=.587*s-.586*p-1.05*m,O=.114*s+.886*p-.2*m;let U,j,V,F;for(let $=0;$<i;$+=4)U=t[$+0],j=t[$+1],V=t[$+2],F=t[$+3],t[$+0]=S*U+b*j+_*V+f,t[$+1]=x*U+D*j+A*V+f,t[$+2]=N*U+R*j+O*V+f,t[$+3]=F},T_=function(n){const t=n.data,i=t.length,s=Math.pow(2,this.value()),u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=s*u*Math.cos(c*Math.PI/180),p=s*u*Math.sin(c*Math.PI/180),m=.299*s+.701*f+.167*p,S=.587*s-.587*f+.33*p,b=.114*s-.114*f-.497*p,_=.299*s-.299*f-.328*p,x=.587*s+.413*f+.035*p,D=.114*s-.114*f+.293*p,A=.299*s-.3*f+1.25*p,N=.587*s-.586*f-1.05*p,R=.114*s+.886*f-.2*p;for(let O=0;O<i;O+=4){const U=t[O+0],j=t[O+1],V=t[O+2],F=t[O+3];t[O+0]=m*U+S*j+b*V,t[O+1]=_*U+x*j+D*V,t[O+2]=A*U+N*j+R*V,t[O+3]=F}};G.addGetterSetter(Nt,"hue",0,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"saturation",0,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"value",0,Dt(),G.afterSetFilter);const C_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4)t[s]=255-t[s],t[s+1]=255-t[s+1],t[s+2]=255-t[s+2]},__=function(n,t,i){const s=n.data,u=t.data,c=n.width,f=n.height,p=i.polarCenterX||c/2,m=i.polarCenterY||f/2;let S=Math.sqrt(p*p+m*m),b=c-p,_=f-m;const x=Math.sqrt(b*b+_*_);S=x>S?x:S;const D=f,A=c,N=360/A*Math.PI/180;for(let R=0;R<A;R+=1){const O=Math.sin(R*N),U=Math.cos(R*N);for(let j=0;j<D;j+=1){b=Math.floor(p+S*j/D*U),_=Math.floor(m+S*j/D*O);let V=(_*c+b)*4;const F=s[V+0],$=s[V+1],st=s[V+2],I=s[V+3];V=(R+j*c)*4,u[V+0]=F,u[V+1]=$,u[V+2]=st,u[V+3]=I}}},x_=function(n,t,i){const s=n.data,u=t.data,c=n.width,f=n.height,p=i.polarCenterX||c/2,m=i.polarCenterY||f/2;let S=Math.sqrt(p*p+m*m),b=c-p,_=f-m;const x=Math.sqrt(b*b+_*_);S=x>S?x:S;const D=f,A=c,N=0;let R,O;for(b=0;b<c;b+=1)for(_=0;_<f;_+=1){const U=b-p,j=_-m,V=Math.sqrt(U*U+j*j)*D/S;let F=(Math.atan2(j,U)*180/Math.PI+360+N)%360;F=F*A/360,R=Math.floor(F),O=Math.floor(V);let $=(O*c+R)*4;const st=s[$+0],I=s[$+1],et=s[$+2],nt=s[$+3];$=(_*c+b)*4,u[$+0]=st,u[$+1]=I,u[$+2]=et,u[$+3]=nt}},D_=function(n){const t=n.width,i=n.height;let s,u,c,f,p,m,S,b,_,x,D=Math.round(this.kaleidoscopePower());const A=Math.round(this.kaleidoscopeAngle()),N=Math.floor(t*(A%360)/360);if(D<1)return;const R=k.createCanvasElement();R.width=t,R.height=i;const O=R.getContext("2d").getImageData(0,0,t,i);k.releaseCanvas(R),__(n,O,{polarCenterX:t/2,polarCenterY:i/2});let U=t/Math.pow(2,D);for(;U<=8;)U=U*2,D-=1;U=Math.ceil(U);let j=U,V=0,F=j,$=1;for(N+U>t&&(V=j,F=0,$=-1),u=0;u<i;u+=1)for(s=V;s!==F;s+=$)c=Math.round(s+N)%t,_=(t*u+c)*4,p=O.data[_+0],m=O.data[_+1],S=O.data[_+2],b=O.data[_+3],x=(t*u+s)*4,O.data[x+0]=p,O.data[x+1]=m,O.data[x+2]=S,O.data[x+3]=b;for(u=0;u<i;u+=1)for(j=Math.floor(U),f=0;f<D;f+=1){for(s=0;s<j+1;s+=1)_=(t*u+s)*4,p=O.data[_+0],m=O.data[_+1],S=O.data[_+2],b=O.data[_+3],x=(t*u+j*2-s-1)*4,O.data[x+0]=p,O.data[x+1]=m,O.data[x+2]=S,O.data[x+3]=b;j*=2}x_(O,n,{})};G.addGetterSetter(Nt,"kaleidoscopePower",2,Dt(),G.afterSetFilter),G.addGetterSetter(Nt,"kaleidoscopeAngle",0,Dt(),G.afterSetFilter);function V1(n,t,i){let s=(i*n.width+t)*4;const u=[];return u.push(n.data[s++],n.data[s++],n.data[s++],n.data[s++]),u}function Fp(n,t){return Math.sqrt(Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2))}function A_(n){const t=[0,0,0];for(let i=0;i<n.length;i++)t[0]+=n[i][0],t[1]+=n[i][1],t[2]+=n[i][2];return t[0]/=n.length,t[1]/=n.length,t[2]/=n.length,t}function M_(n,t){const i=V1(n,0,0),s=V1(n,n.width-1,0),u=V1(n,0,n.height-1),c=V1(n,n.width-1,n.height-1),f=t||10;if(Fp(i,s)<f&&Fp(s,c)<f&&Fp(c,u)<f&&Fp(u,i)<f){const p=A_([s,i,c,u]),m=[];for(let S=0;S<n.width*n.height;S++){const b=Fp(p,[n.data[S*4],n.data[S*4+1],n.data[S*4+2]]);m[S]=b<f?0:255}return m}}function N_(n,t){for(let i=0;i<n.width*n.height;i++)n.data[4*i+3]=t[i]}function O_(n,t,i){const s=[1,1,1,1,0,1,1,1,1],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b===2040?255:0}return f}function R_(n,t,i){const s=[1,1,1,1,1,1,1,1,1],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b>=1020?255:0}return f}function z_(n,t,i){const s=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b}return f}const H_=function(n){const t=this.threshold();let i=M_(n,t);return i&&(i=O_(i,n.width,n.height),i=R_(i,n.width,n.height),i=z_(i,n.width,n.height),N_(n,i)),n};G.addGetterSetter(Nt,"threshold",0,Dt(),G.afterSetFilter);const w_=function(n){const t=this.noise()*255,i=n.data,s=i.length,u=t/2;for(let c=0;c<s;c+=4)i[c+0]+=u-2*u*Math.random(),i[c+1]+=u-2*u*Math.random(),i[c+2]+=u-2*u*Math.random()};G.addGetterSetter(Nt,"noise",.2,Dt(),G.afterSetFilter);const U_=function(n){let t=Math.ceil(this.pixelSize()),i=n.width,s=n.height,u=Math.ceil(i/t),c=Math.ceil(s/t),f=n.data;if(t<=0){k.error("pixelSize value can not be <= 0");return}for(let p=0;p<u;p+=1)for(let m=0;m<c;m+=1){let S=0,b=0,_=0,x=0;const D=p*t,A=D+t,N=m*t,R=N+t;let O=0;for(let U=D;U<A;U+=1)if(!(U>=i))for(let j=N;j<R;j+=1){if(j>=s)continue;const V=(i*j+U)*4;S+=f[V+0],b+=f[V+1],_+=f[V+2],x+=f[V+3],O+=1}S=S/O,b=b/O,_=_/O,x=x/O;for(let U=D;U<A;U+=1)if(!(U>=i))for(let j=N;j<R;j+=1){if(j>=s)continue;const V=(i*j+U)*4;f[V+0]=S,f[V+1]=b,f[V+2]=_,f[V+3]=x}}};G.addGetterSetter(Nt,"pixelSize",8,Dt(),G.afterSetFilter);const B_=function(n){const t=Math.round(this.levels()*254)+1,i=n.data,s=i.length,u=255/t;for(let c=0;c<s;c+=1)i[c]=Math.floor(i[c]/u)*u};G.addGetterSetter(Nt,"levels",.5,Dt(),G.afterSetFilter);const V_=function(n){const t=n.data,i=t.length,s=this.red(),u=this.green(),c=this.blue();for(let f=0;f<i;f+=4){const p=(.34*t[f]+.5*t[f+1]+.16*t[f+2])/255;t[f]=p*s,t[f+1]=p*u,t[f+2]=p*c,t[f+3]=t[f+3]}};G.addGetterSetter(Nt,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Nt,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Nt,"blue",0,m5,G.afterSetFilter);const G_=function(n){const t=n.data,i=t.length,s=this.red(),u=this.green(),c=this.blue(),f=this.alpha();for(let p=0;p<i;p+=4){const m=1-f;t[p]=s*f+t[p]*m,t[p+1]=u*f+t[p+1]*m,t[p+2]=c*f+t[p+2]*m}};G.addGetterSetter(Nt,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Nt,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Nt,"blue",0,m5,G.afterSetFilter),G.addGetterSetter(Nt,"alpha",1,function(n){return this._filterUpToDate=!1,n>1?1:n<0?0:n});const j_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4){const u=t[s+0],c=t[s+1],f=t[s+2];t[s+0]=Math.min(255,u*.393+c*.769+f*.189),t[s+1]=Math.min(255,u*.349+c*.686+f*.168),t[s+2]=Math.min(255,u*.272+c*.534+f*.131)}},L_=function(n){const i=n.data;for(let s=0;s<i.length;s+=4){const u=i[s],c=i[s+1],f=i[s+2];.2126*u+.7152*c+.0722*f>=128&&(i[s]=255-u,i[s+1]=255-c,i[s+2]=255-f)}return n},P_=function(n){const t=this.threshold()*255,i=n.data,s=i.length;for(let u=0;u<s;u+=1)i[u]=i[u]<t?0:255};G.addGetterSetter(Nt,"threshold",.5,Dt(),G.afterSetFilter),$f.Util._assign($f,{Arc:Nr,Arrow:fc,Circle:th,Ellipse:Lo,Image:ll,Label:j2,Tag:hc,Line:Or,Path:bs,Rect:Zp,RegularPolygon:Po,Ring:dc,Sprite:Kl,Star:Yo,Text:an,TextPath:ca,Transformer:ve,Wedge:Rr,Filters:{Blur:p_,Brightness:g_,Brighten:m_,Contrast:y_,Emboss:v_,Enhance:S_,Grayscale:b_,HSL:E_,HSV:T_,Invert:C_,Kaleidoscope:D_,Mask:H_,Noise:w_,Pixelate:U_,Posterize:B_,RGB:V_,RGBA:G_,Sepia:j_,Solarize:L_,Threshold:P_}});function X2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var G1={exports:{}},K2={exports:{}},j1={exports:{}},Q2={};var h4;function Y_(){return h4||(h4=1,(function(n){function t(w,Z){var K=w.length;w.push(Z);t:for(;0<K;){var at=K-1>>>1,St=w[at];if(0<u(St,Z))w[at]=Z,w[K]=St,K=at;else break t}}function i(w){return w.length===0?null:w[0]}function s(w){if(w.length===0)return null;var Z=w[0],K=w.pop();if(K!==Z){w[0]=K;t:for(var at=0,St=w.length,W=St>>>1;at<W;){var gt=2*(at+1)-1,Tt=w[gt],Pt=gt+1,le=w[Pt];if(0>u(Tt,K))Pt<St&&0>u(le,Tt)?(w[at]=le,w[Pt]=K,at=Pt):(w[at]=Tt,w[gt]=K,at=gt);else if(Pt<St&&0>u(le,K))w[at]=le,w[Pt]=K,at=Pt;else break t}}return Z}function u(w,Z){var K=w.sortIndex-Z.sortIndex;return K!==0?K:w.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var m=[],S=[],b=1,_=null,x=3,D=!1,A=!1,N=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function V(w){for(var Z=i(S);Z!==null;){if(Z.callback===null)s(S);else if(Z.startTime<=w)s(S),Z.sortIndex=Z.expirationTime,t(m,Z);else break;Z=i(S)}}function F(w){if(N=!1,V(w),!A)if(i(m)!==null)A=!0,$||($=!0,lt());else{var Z=i(S);Z!==null&&tt(F,Z.startTime-w)}}var $=!1,st=-1,I=5,et=-1;function nt(){return R?!0:!(n.unstable_now()-et<I)}function bt(){if(R=!1,$){var w=n.unstable_now();et=w;var Z=!0;try{t:{A=!1,N&&(N=!1,U(st),st=-1),D=!0;var K=x;try{e:{for(V(w),_=i(m);_!==null&&!(_.expirationTime>w&&nt());){var at=_.callback;if(typeof at=="function"){_.callback=null,x=_.priorityLevel;var St=at(_.expirationTime<=w);if(w=n.unstable_now(),typeof St=="function"){_.callback=St,V(w),Z=!0;break e}_===i(m)&&s(m),V(w)}else s(m);_=i(m)}if(_!==null)Z=!0;else{var W=i(S);W!==null&&tt(F,W.startTime-w),Z=!1}}break t}finally{_=null,x=K,D=!1}Z=void 0}}finally{Z?lt():$=!1}}}var lt;if(typeof j=="function")lt=function(){j(bt)};else if(typeof MessageChannel<"u"){var dt=new MessageChannel,pt=dt.port2;dt.port1.onmessage=bt,lt=function(){pt.postMessage(null)}}else lt=function(){O(bt,0)};function tt(w,Z){st=O(function(){w(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(w){w.callback=null},n.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<w?Math.floor(1e3/w):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(w){switch(x){case 1:case 2:case 3:var Z=3;break;default:Z=x}var K=x;x=Z;try{return w()}finally{x=K}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(w,Z){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var K=x;x=w;try{return Z()}finally{x=K}},n.unstable_scheduleCallback=function(w,Z,K){var at=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?at+K:at):K=at,w){case 1:var St=-1;break;case 2:St=250;break;case 5:St=1073741823;break;case 4:St=1e4;break;default:St=5e3}return St=K+St,w={id:b++,callback:Z,priorityLevel:w,startTime:K,expirationTime:St,sortIndex:-1},K>at?(w.sortIndex=K,t(S,w),i(m)===null&&w===i(S)&&(N?(U(st),st=-1):N=!0,tt(F,K-at))):(w.sortIndex=St,t(m,w),A||D||(A=!0,$||($=!0,lt()))),w},n.unstable_shouldYield=nt,n.unstable_wrapCallback=function(w){var Z=x;return function(){var K=x;x=Z;try{return w.apply(this,arguments)}finally{x=K}}}})(Q2)),Q2}var Z2={};var d4;function q_(){return d4||(d4=1,(function(n){process.env.NODE_ENV!=="production"&&(function(){function t(){if(F=!1,et){var w=n.unstable_now();lt=w;var Z=!0;try{t:{j=!1,V&&(V=!1,st(nt),nt=-1),U=!0;var K=O;try{e:{for(f(w),R=s(D);R!==null&&!(R.expirationTime>w&&m());){var at=R.callback;if(typeof at=="function"){R.callback=null,O=R.priorityLevel;var St=at(R.expirationTime<=w);if(w=n.unstable_now(),typeof St=="function"){R.callback=St,f(w),Z=!0;break e}R===s(D)&&u(D),f(w)}else u(D);R=s(D)}if(R!==null)Z=!0;else{var W=s(A);W!==null&&S(p,W.startTime-w),Z=!1}}break t}finally{R=null,O=K,U=!1}Z=void 0}}finally{Z?dt():et=!1}}}function i(w,Z){var K=w.length;w.push(Z);t:for(;0<K;){var at=K-1>>>1,St=w[at];if(0<c(St,Z))w[at]=Z,w[K]=St,K=at;else break t}}function s(w){return w.length===0?null:w[0]}function u(w){if(w.length===0)return null;var Z=w[0],K=w.pop();if(K!==Z){w[0]=K;t:for(var at=0,St=w.length,W=St>>>1;at<W;){var gt=2*(at+1)-1,Tt=w[gt],Pt=gt+1,le=w[Pt];if(0>c(Tt,K))Pt<St&&0>c(le,Tt)?(w[at]=le,w[Pt]=K,at=Pt):(w[at]=Tt,w[gt]=K,at=gt);else if(Pt<St&&0>c(le,K))w[at]=le,w[Pt]=K,at=Pt;else break t}}return Z}function c(w,Z){var K=w.sortIndex-Z.sortIndex;return K!==0?K:w.id-Z.id}function f(w){for(var Z=s(A);Z!==null;){if(Z.callback===null)u(A);else if(Z.startTime<=w)u(A),Z.sortIndex=Z.expirationTime,i(D,Z);else break;Z=s(A)}}function p(w){if(V=!1,f(w),!j)if(s(D)!==null)j=!0,et||(et=!0,dt());else{var Z=s(A);Z!==null&&S(p,Z.startTime-w)}}function m(){return F?!0:!(n.unstable_now()-lt<bt)}function S(w,Z){nt=$(function(){w(n.unstable_now())},Z)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;n.unstable_now=function(){return b.now()}}else{var _=Date,x=_.now();n.unstable_now=function(){return _.now()-x}}var D=[],A=[],N=1,R=null,O=3,U=!1,j=!1,V=!1,F=!1,$=typeof setTimeout=="function"?setTimeout:null,st=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null,et=!1,nt=-1,bt=5,lt=-1;if(typeof I=="function")var dt=function(){I(t)};else if(typeof MessageChannel<"u"){var pt=new MessageChannel,tt=pt.port2;pt.port1.onmessage=t,dt=function(){tt.postMessage(null)}}else dt=function(){$(t,0)};n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(w){w.callback=null},n.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):bt=0<w?Math.floor(1e3/w):5},n.unstable_getCurrentPriorityLevel=function(){return O},n.unstable_next=function(w){switch(O){case 1:case 2:case 3:var Z=3;break;default:Z=O}var K=O;O=Z;try{return w()}finally{O=K}},n.unstable_requestPaint=function(){F=!0},n.unstable_runWithPriority=function(w,Z){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var K=O;O=w;try{return Z()}finally{O=K}},n.unstable_scheduleCallback=function(w,Z,K){var at=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?at+K:at):K=at,w){case 1:var St=-1;break;case 2:St=250;break;case 5:St=1073741823;break;case 4:St=1e4;break;default:St=5e3}return St=K+St,w={id:N++,callback:Z,priorityLevel:w,startTime:K,expirationTime:St,sortIndex:-1},K>at?(w.sortIndex=K,i(A,w),s(D)===null&&w===s(A)&&(V?(st(nt),nt=-1):V=!0,S(p,K-at))):(w.sortIndex=St,i(D,w),j||U||(j=!0,et||(et=!0,dt()))),w},n.unstable_shouldYield=m,n.unstable_wrapCallback=function(w){var Z=O;return function(){var K=O;O=Z;try{return w.apply(this,arguments)}finally{O=K}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Z2)),Z2}var p4;function J2(){return p4||(p4=1,process.env.NODE_ENV==="production"?j1.exports=Y_():j1.exports=q_()),j1.exports}var m4;function X_(){return m4||(m4=1,(function(n){n.exports=function(t){function i(l,r,h,g){return new md(l,r,h,g)}function s(){}function u(l){var r="https://react.dev/errors/"+l;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)r+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+l+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(l){var r=l,h=l;if(l.alternate)for(;r.return;)r=r.return;else{l=r;do r=l,(r.flags&4098)!==0&&(h=r.return),l=r.return;while(l)}return r.tag===3?h:null}function f(l){if(c(l)!==l)throw Error(u(188))}function p(l){var r=l.alternate;if(!r){if(r=c(l),r===null)throw Error(u(188));return r!==l?null:l}for(var h=l,g=r;;){var E=h.return;if(E===null)break;var T=E.alternate;if(T===null){if(g=E.return,g!==null){h=g;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===h)return f(E),l;if(T===g)return f(E),r;T=T.sibling}throw Error(u(188))}if(h.return!==g.return)h=E,g=T;else{for(var z=!1,L=E.child;L;){if(L===h){z=!0,h=E,g=T;break}if(L===g){z=!0,g=E,h=T;break}L=L.sibling}if(!z){for(L=T.child;L;){if(L===h){z=!0,h=T,g=E;break}if(L===g){z=!0,g=T,h=E;break}L=L.sibling}if(!z)throw Error(u(189))}}if(h.alternate!==g)throw Error(u(190))}if(h.tag!==3)throw Error(u(188));return h.stateNode.current===h?l:r}function m(l){var r=l.tag;if(r===5||r===26||r===27||r===6)return l;for(l=l.child;l!==null;){if(r=m(l),r!==null)return r;l=l.sibling}return null}function S(l){var r=l.tag;if(r===5||r===26||r===27||r===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(r=S(l),r!==null))return r;l=l.sibling}return null}function b(l){return l===null||typeof l!="object"?null:(l=ym&&l[ym]||l["@@iterator"],typeof l=="function"?l:null)}function _(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===vm?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case io:return"Fragment";case ff:return"Profiler";case mm:return"StrictMode";case so:return"Suspense";case ze:return"SuspenseList";case Td:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case or:return"Portal";case Al:return l.displayName||"Context";case Ed:return(l._context.displayName||"Context")+".Consumer";case Cu:var r=l.render;return l=l.displayName,l||(l=r.displayName||r.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case gm:return r=l.displayName||null,r!==null?r:_(l.type)||"Memo";case ur:r=l._payload,l=l._init;try{return _(l(r))}catch{}}return null}function x(l){return{current:l}}function D(l){0>Nu||(l.current=bf[Nu],bf[Nu]=null,Nu--)}function A(l,r){Nu++,bf[Nu]=l.current,l.current=r}function N(l){return l>>>=0,l===0?32:31-(My(l)/Ny|0)|0}function R(l){var r=l&42;if(r!==0)return r;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function O(l,r,h){var g=l.pendingLanes;if(g===0)return 0;var E=0,T=l.suspendedLanes,z=l.pingedLanes;l=l.warmLanes;var L=g&134217727;return L!==0?(g=L&~T,g!==0?E=R(g):(z&=L,z!==0?E=R(z):h||(h=L&~l,h!==0&&(E=R(h))))):(L=g&~T,L!==0?E=R(L):z!==0?E=R(z):h||(h=g&~l,h!==0&&(E=R(h)))),E===0?0:r!==0&&r!==E&&(r&T)===0&&(T=E&-E,h=r&-r,T>=h||T===32&&(h&4194048)!==0)?r:E}function U(l,r){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&r)===0}function j(l,r){switch(l){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 V(){var l=Ou;return Ou<<=1,(Ou&62914560)===0&&(Ou=4194304),l}function F(l){for(var r=[],h=0;31>h;h++)r.push(l);return r}function $(l,r){l.pendingLanes|=r,r!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function st(l,r,h,g,E,T){var z=l.pendingLanes;l.pendingLanes=h,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=h,l.entangledLanes&=h,l.errorRecoveryDisabledLanes&=h,l.shellSuspendCounter=0;var L=l.entanglements,ft=l.expirationTimes,vt=l.hiddenUpdates;for(h=z&~h;0<h;){var Mt=31-ii(h),xt=1<<Mt;L[Mt]=0,ft[Mt]=-1;var Rt=vt[Mt];if(Rt!==null)for(vt[Mt]=null,Mt=0;Mt<Rt.length;Mt++){var Yt=Rt[Mt];Yt!==null&&(Yt.lane&=-536870913)}h&=~xt}g!==0&&I(l,g,0),T!==0&&E===0&&l.tag!==0&&(l.suspendedLanes|=T&~(z&~r))}function I(l,r,h){l.pendingLanes|=r,l.suspendedLanes&=~r;var g=31-ii(r);l.entangledLanes|=r,l.entanglements[g]=l.entanglements[g]|1073741824|h&261930}function et(l,r){var h=l.entangledLanes|=r;for(l=l.entanglements;h;){var g=31-ii(h),E=1<<g;E&r|l[g]&r&&(l[g]|=r),h&=~E}}function nt(l,r){var h=r&-r;return h=(h&42)!==0?1:bt(h),(h&(l.suspendedLanes|r))!==0?0:h}function bt(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function lt(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function dt(l){if(typeof Gd=="function"&&wm(l),Rn&&typeof Rn.setStrictMode=="function")try{Rn.setStrictMode(po,l)}catch{}}function pt(l,r){return l===r&&(l!==0||1/l===1/r)||l!==l&&r!==r}function tt(l){if(zu===void 0)try{throw Error()}catch(h){var r=h.stack.trim().match(/\n( *(at )?)/);zu=r&&r[1]||"",li=-1<h.stack.indexOf(`
14
+ `,c5=()=>{if(typeof document>"u")throw new Error(CT)};class Ji{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new Ji(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){const i=this.m;return{x:i[0]*t.x+i[2]*t.y+i[4],y:i[1]*t.x+i[3]*t.y+i[5]}}translate(t,i){return this.m[4]+=this.m[0]*t+this.m[2]*i,this.m[5]+=this.m[1]*t+this.m[3]*i,this}scale(t,i){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=i,this.m[3]*=i,this}rotate(t){const i=Math.cos(t),s=Math.sin(t),u=this.m[0]*i+this.m[2]*s,c=this.m[1]*i+this.m[3]*s,f=this.m[0]*-s+this.m[2]*i,p=this.m[1]*-s+this.m[3]*i;return this.m[0]=u,this.m[1]=c,this.m[2]=f,this.m[3]=p,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,i){const s=this.m[0]+this.m[2]*i,u=this.m[1]+this.m[3]*i,c=this.m[2]+this.m[0]*t,f=this.m[3]+this.m[1]*t;return this.m[0]=s,this.m[1]=u,this.m[2]=c,this.m[3]=f,this}multiply(t){const i=this.m[0]*t.m[0]+this.m[2]*t.m[1],s=this.m[1]*t.m[0]+this.m[3]*t.m[1],u=this.m[0]*t.m[2]+this.m[2]*t.m[3],c=this.m[1]*t.m[2]+this.m[3]*t.m[3],f=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],p=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=i,this.m[1]=s,this.m[2]=u,this.m[3]=c,this.m[4]=f,this.m[5]=p,this}invert(){const t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),i=this.m[3]*t,s=-this.m[1]*t,u=-this.m[2]*t,c=this.m[0]*t,f=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),p=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=i,this.m[1]=s,this.m[2]=u,this.m[3]=c,this.m[4]=f,this.m[5]=p,this}getMatrix(){return this.m}decompose(){const t=this.m[0],i=this.m[1],s=this.m[2],u=this.m[3],c=this.m[4],f=this.m[5],p=t*u-i*s,m={x:c,y:f,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||i!=0){const S=Math.sqrt(t*t+i*i);m.rotation=i>0?Math.acos(t/S):-Math.acos(t/S),m.scaleX=S,m.scaleY=p/S,m.skewX=(t*s+i*u)/p,m.skewY=0}else if(s!=0||u!=0){const S=Math.sqrt(s*s+u*u);m.rotation=Math.PI/2-(u>0?Math.acos(-s/S):-Math.acos(s/S)),m.scaleX=p/S,m.scaleY=S,m.skewX=0,m.skewY=(t*s+i*u)/p}return m.rotation=k._getRotation(m.rotation),m}}const _T="[object Array]",xT="[object Number]",DT="[object String]",AT="[object Boolean]",MT=Math.PI/180,NT=180/Math.PI,Up="#",OT="",RT="0",zT="Konva warning: ",f5="Konva error: ",HT="rgb(",S2={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},wT=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let T1=[],Bp=null;const UT=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(n){setTimeout(n,60)},k={_isElement(n){return!!(n&&n.nodeType==1)},_isFunction(n){return!!(n&&n.constructor&&n.call&&n.apply)},_isPlainObject(n){return!!n&&n.constructor===Object},_isArray(n){return Object.prototype.toString.call(n)===_T},_isNumber(n){return Object.prototype.toString.call(n)===xT&&!isNaN(n)&&isFinite(n)},_isString(n){return Object.prototype.toString.call(n)===DT},_isBoolean(n){return Object.prototype.toString.call(n)===AT},isObject(n){return n instanceof Object},isValidSelector(n){if(typeof n!="string")return!1;const t=n[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(n){return n===0||n>0?1:-1},requestAnimFrame(n){T1.push(n),T1.length===1&&UT(function(){const t=T1;T1=[],t.forEach(function(i){i()})})},createCanvasElement(){c5();const n=document.createElement("canvas");try{n.style=n.style||{}}catch{}return n},createImageElement(){return c5(),document.createElement("img")},_isInDocument(n){for(;n=n.parentNode;)if(n==document)return!0;return!1},_urlToImage(n,t){const i=k.createImageElement();i.onload=function(){t(i)},i.src=n},_rgbToHex(n,t,i){return((1<<24)+(n<<16)+(t<<8)+i).toString(16).slice(1)},_hexToRgb(n){n=n.replace(Up,OT);const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){let n=(Math.random()*16777215<<0).toString(16);for(;n.length<6;)n=RT+n;return Up+n},isCanvasFarblingActive(){if(Bp!==null)return Bp;if(typeof document>"u")return Bp=!1,!1;const n=this.createCanvasElement();n.width=10,n.height=10;const t=n.getContext("2d",{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle="#282828",t.fillRect(0,0,10,10);const i=t.getImageData(0,0,10,10).data;let s=!1;for(let u=0;u<100;u++)if(i[u*4]!==40||i[u*4+1]!==40||i[u*4+2]!==40||i[u*4+3]!==255){s=!0;break}return Bp=s,this.releaseCanvas(n),Bp},getHitColor(){const n=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(n):n},getHitColorKey(n,t,i){return this.isCanvasFarblingActive()&&(n=Math.round(n/5)*5,t=Math.round(t/5)*5,i=Math.round(i/5)*5),Up+this._rgbToHex(n,t,i)},getSnappedHexColor(n){const t=this._hexToRgb(n);return Up+this._rgbToHex(Math.round(t.r/5)*5,Math.round(t.g/5)*5,Math.round(t.b/5)*5)},getRGB(n){let t;return n in S2?(t=S2[n],{r:t[0],g:t[1],b:t[2]}):n[0]===Up?this._hexToRgb(n.substring(1)):n.substr(0,4)===HT?(t=wT.exec(n.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(n){return n=n||"black",k._namedColorToRBA(n)||k._hex3ColorToRGBA(n)||k._hex4ColorToRGBA(n)||k._hex6ColorToRGBA(n)||k._hex8ColorToRGBA(n)||k._rgbColorToRGBA(n)||k._rgbaColorToRGBA(n)||k._hslColorToRGBA(n)},_namedColorToRBA(n){const t=S2[n.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(n){if(n.indexOf("rgb(")===0){n=n.match(/rgb\(([^)]+)\)/)[1];const t=n.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(n){if(n.indexOf("rgba(")===0){n=n.match(/rgba\(([^)]+)\)/)[1];const t=n.split(/ *, */).map((i,s)=>i.slice(-1)==="%"?s===3?parseInt(i)/100:parseInt(i)/100*255:Number(i));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(n){if(n[0]==="#"&&n.length===9)return{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16),a:parseInt(n.slice(7,9),16)/255}},_hex6ColorToRGBA(n){if(n[0]==="#"&&n.length===7)return{r:parseInt(n.slice(1,3),16),g:parseInt(n.slice(3,5),16),b:parseInt(n.slice(5,7),16),a:1}},_hex4ColorToRGBA(n){if(n[0]==="#"&&n.length===5)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16),a:parseInt(n[4]+n[4],16)/255}},_hex3ColorToRGBA(n){if(n[0]==="#"&&n.length===4)return{r:parseInt(n[1]+n[1],16),g:parseInt(n[2]+n[2],16),b:parseInt(n[3]+n[3],16),a:1}},_hslColorToRGBA(n){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(n)){const[t,...i]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(n),s=Number(i[0])/360,u=Number(i[1])/100,c=Number(i[2])/100;let f,p,m;if(u===0)return m=c*255,{r:Math.round(m),g:Math.round(m),b:Math.round(m),a:1};c<.5?f=c*(1+u):f=c+u-c*u;const S=2*c-f,b=[0,0,0];for(let _=0;_<3;_++)p=s+1/3*-(_-1),p<0&&p++,p>1&&p--,6*p<1?m=S+(f-S)*6*p:2*p<1?m=f:3*p<2?m=S+(f-S)*(2/3-p)*6:m=S,b[_]=m*255;return{r:Math.round(b[0]),g:Math.round(b[1]),b:Math.round(b[2]),a:1}}},haveIntersection(n,t){return!(t.x>n.x+n.width||t.x+t.width<n.x||t.y>n.y+n.height||t.y+t.height<n.y)},cloneObject(n){const t={};for(const i in n)this._isPlainObject(n[i])?t[i]=this.cloneObject(n[i]):this._isArray(n[i])?t[i]=this.cloneArray(n[i]):t[i]=n[i];return t},cloneArray(n){return n.slice(0)},degToRad(n){return n*MT},radToDeg(n){return n*NT},_degToRad(n){return k.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),k.degToRad(n)},_radToDeg(n){return k.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),k.radToDeg(n)},_getRotation(n){return Nt.angleDeg?k.radToDeg(n):n},_capitalize(n){return n.charAt(0).toUpperCase()+n.slice(1)},throw(n){throw new Error(f5+n)},error(n){console.error(f5+n)},warn(n){Nt.showWarnings&&console.warn(zT+n)},each(n,t){for(const i in n)t(i,n[i])},_inRange(n,t,i){return t<=n&&n<i},_getProjectionToSegment(n,t,i,s,u,c){let f,p,m;const S=(n-i)*(n-i)+(t-s)*(t-s);if(S==0)f=n,p=t,m=(u-i)*(u-i)+(c-s)*(c-s);else{const b=((u-n)*(i-n)+(c-t)*(s-t))/S;b<0?(f=n,p=t,m=(n-u)*(n-u)+(t-c)*(t-c)):b>1?(f=i,p=s,m=(i-u)*(i-u)+(s-c)*(s-c)):(f=n+b*(i-n),p=t+b*(s-t),m=(f-u)*(f-u)+(p-c)*(p-c))}return[f,p,m]},_getProjectionToLine(n,t,i){const s=k.cloneObject(n);let u=Number.MAX_VALUE;return t.forEach(function(c,f){if(!i&&f===t.length-1)return;const p=t[(f+1)%t.length],m=k._getProjectionToSegment(c.x,c.y,p.x,p.y,n.x,n.y),S=m[0],b=m[1],_=m[2];_<u&&(s.x=S,s.y=b,u=_)}),s},_prepareArrayForTween(n,t,i){const s=[],u=[];if(n.length>t.length){const f=t;t=n,n=f}for(let f=0;f<n.length;f+=2)s.push({x:n[f],y:n[f+1]});for(let f=0;f<t.length;f+=2)u.push({x:t[f],y:t[f+1]});const c=[];return u.forEach(function(f){const p=k._getProjectionToLine(f,s,i);c.push(p.x),c.push(p.y)}),c},_prepareToStringify(n){let t;n.visitedByCircularReferenceRemoval=!0;for(const i in n)if(n.hasOwnProperty(i)&&n[i]&&typeof n[i]=="object"){if(t=Object.getOwnPropertyDescriptor(n,i),n[i].visitedByCircularReferenceRemoval||k._isElement(n[i]))if(t.configurable)delete n[i];else return null;else if(k._prepareToStringify(n[i])===null)if(t.configurable)delete n[i];else return null}return delete n.visitedByCircularReferenceRemoval,n},_assign(n,t){for(const i in t)n[i]=t[i];return n},_getFirstPointerId(n){return n.touches?n.changedTouches[0].identifier:n.pointerId||999},releaseCanvas(...n){Nt.releaseCanvasOnDestroy&&n.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(n,t,i,s){let u=t<0?t:0,c=i<0?i:0;t=Math.abs(t),i=Math.abs(i);let f=0,p=0,m=0,S=0;typeof s=="number"?f=p=m=S=Math.min(s,t/2,i/2):(f=Math.min(s[0]||0,t/2,i/2),p=Math.min(s[1]||0,t/2,i/2),S=Math.min(s[2]||0,t/2,i/2),m=Math.min(s[3]||0,t/2,i/2)),n.moveTo(u+f,c),n.lineTo(u+t-p,c),n.arc(u+t-p,c+p,p,Math.PI*3/2,0,!1),n.lineTo(u+t,c+i-S),n.arc(u+t-S,c+i-S,S,0,Math.PI/2,!1),n.lineTo(u+m,c+i),n.arc(u+m,c+i-m,m,Math.PI/2,Math.PI,!1),n.lineTo(u,c+f),n.arc(u+f,c+f,f,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(n,t,i,s,u){s=Math.abs(s);for(let c=0;c<i;c++){const f=t[(c-1+i)%i],p=t[c],m=t[(c+1)%i],S={x:p.x-f.x,y:p.y-f.y},b={x:m.x-p.x,y:m.y-p.y},_=Math.hypot(S.x,S.y),x=Math.hypot(b.x,b.y);let D;typeof u=="number"?D=u:D=c<u.length?u[c]:0,D=s*Math.cos(Math.PI/i)*Math.min(1,D/s*2);const N={x:S.x/_,y:S.y/_},R={x:b.x/x,y:b.y/x},O={x:p.x-N.x*D,y:p.y-N.y*D},U={x:p.x+R.x*D,y:p.y+R.y*D};c===0?n.moveTo(O.x,O.y):n.lineTo(O.x,O.y),n.arcTo(p.x,p.y,U.x,U.y,D)}}};function BT(n){const t=[],i=n.length,s=k;for(let u=0;u<i;u++){let c=n[u];s._isNumber(c)?c=Math.round(c*1e3)/1e3:s._isString(c)||(c=c+""),t.push(c)}return t}const h5=",",VT="(",GT=")",jT="([",LT="])",PT=";",YT="()",qT="=",d5=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],XT=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"],KT=100;let C1=null;function p5(){if(C1!==null)return C1;try{const t=k.createCanvasElement().getContext("2d");return t?!!t&&"filter"in t:(C1=!1,!1)}catch{return C1=!1,!1}}class _1{constructor(t){this.canvas=t,Nt.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,i){let s=this.traceArr,u=s.length,c="",f,p,m,S;for(f=0;f<u;f++)p=s[f],m=p.method,m?(S=p.args,c+=m,t?c+=YT:k._isArray(S[0])?c+=jT+S.join(h5)+LT:(i&&(S=S.map(b=>typeof b=="number"?Math.floor(b):b)),c+=VT+S.join(h5)+GT)):(c+=p.property,t||(c+=qT+p.val)),c+=PT;return c}clearTrace(){this.traceArr=[]}_trace(t){let i=this.traceArr,s;i.push(t),s=i.length,s>=KT&&i.shift()}reset(){const t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){const i=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,i.getWidth()/i.pixelRatio,i.getHeight()/i.pixelRatio)}_applyLineCap(t){const i=t.attrs.lineCap;i&&this.setAttr("lineCap",i)}_applyOpacity(t){const i=t.getAbsoluteOpacity();i!==1&&this.setAttr("globalAlpha",i)}_applyLineJoin(t){const i=t.attrs.lineJoin;i&&this.setAttr("lineJoin",i)}_applyMiterLimit(t){const i=t.attrs.miterLimit;i!=null&&this.setAttr("miterLimit",i)}setAttr(t,i){this._context[t]=i}arc(t,i,s,u,c,f){this._context.arc(t,i,s,u,c,f)}arcTo(t,i,s,u,c){this._context.arcTo(t,i,s,u,c)}beginPath(){this._context.beginPath()}bezierCurveTo(t,i,s,u,c,f){this._context.bezierCurveTo(t,i,s,u,c,f)}clearRect(t,i,s,u){this._context.clearRect(t,i,s,u)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,i){const s=arguments;if(s.length===2)return this._context.createImageData(t,i);if(s.length===1)return this._context.createImageData(t)}createLinearGradient(t,i,s,u){return this._context.createLinearGradient(t,i,s,u)}createPattern(t,i){return this._context.createPattern(t,i)}createRadialGradient(t,i,s,u,c,f){return this._context.createRadialGradient(t,i,s,u,c,f)}drawImage(t,i,s,u,c,f,p,m,S){const b=arguments,_=this._context;b.length===3?_.drawImage(t,i,s):b.length===5?_.drawImage(t,i,s,u,c):b.length===9&&_.drawImage(t,i,s,u,c,f,p,m,S)}ellipse(t,i,s,u,c,f,p,m){this._context.ellipse(t,i,s,u,c,f,p,m)}isPointInPath(t,i,s,u){return s?this._context.isPointInPath(s,t,i,u):this._context.isPointInPath(t,i,u)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,i,s,u){this._context.fillRect(t,i,s,u)}strokeRect(t,i,s,u){this._context.strokeRect(t,i,s,u)}fillText(t,i,s,u){u?this._context.fillText(t,i,s,u):this._context.fillText(t,i,s)}measureText(t){return this._context.measureText(t)}getImageData(t,i,s,u){return this._context.getImageData(t,i,s,u)}lineTo(t,i){this._context.lineTo(t,i)}moveTo(t,i){this._context.moveTo(t,i)}rect(t,i,s,u){this._context.rect(t,i,s,u)}roundRect(t,i,s,u,c){this._context.roundRect(t,i,s,u,c)}putImageData(t,i,s){this._context.putImageData(t,i,s)}quadraticCurveTo(t,i,s,u){this._context.quadraticCurveTo(t,i,s,u)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,i){this._context.scale(t,i)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,i,s,u,c,f){this._context.setTransform(t,i,s,u,c,f)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,i,s,u){this._context.strokeText(t,i,s,u)}transform(t,i,s,u,c,f){this._context.transform(t,i,s,u,c,f)}translate(t,i){this._context.translate(t,i)}_enableTrace(){let t=this,i=d5.length,s=this.setAttr,u,c;const f=function(p){let m=t[p],S;t[p]=function(){return c=BT(Array.prototype.slice.call(arguments,0)),S=m.apply(t,arguments),t._trace({method:p,args:c}),S}};for(u=0;u<i;u++)f(d5[u]);t.setAttr=function(){s.apply(t,arguments);const p=arguments[0];let m=arguments[1];(p==="shadowOffsetX"||p==="shadowOffsetY"||p==="shadowBlur")&&(m=m/this.canvas.getPixelRatio()),t._trace({property:p,val:m})}}_applyGlobalCompositeOperation(t){const i=t.attrs.globalCompositeOperation;!i||i==="source-over"||this.setAttr("globalCompositeOperation",i)}}XT.forEach(function(n){Object.defineProperty(_1.prototype,n,{get(){return this._context[n]},set(t){this._context[n]=t}})});class QT extends _1{constructor(t,{willReadFrequently:i=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:i})}_fillColor(t){const i=t.fill();this.setAttr("fillStyle",i),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){const i=t._getLinearGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fillRadialGradient(t){const i=t._getRadialGradient();i&&(this.setAttr("fillStyle",i),t._fillFunc(this))}_fill(t){const i=t.fill(),s=t.getFillPriority();if(i&&s==="color"){this._fillColor(t);return}const u=t.getFillPatternImage();if(u&&s==="pattern"){this._fillPattern(t);return}const c=t.getFillLinearGradientColorStops();if(c&&s==="linear-gradient"){this._fillLinearGradient(t);return}const f=t.getFillRadialGradientColorStops();if(f&&s==="radial-gradient"){this._fillRadialGradient(t);return}i?this._fillColor(t):u?this._fillPattern(t):c?this._fillLinearGradient(t):f&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const i=t.getStrokeLinearGradientStartPoint(),s=t.getStrokeLinearGradientEndPoint(),u=t.getStrokeLinearGradientColorStops(),c=this.createLinearGradient(i.x,i.y,s.x,s.y);if(u){for(let f=0;f<u.length;f+=2)c.addColorStop(u[f],u[f+1]);this.setAttr("strokeStyle",c)}}_stroke(t){const i=t.dash(),s=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!s){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(t),i&&t.dashEnabled()&&(this.setLineDash(i),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),s||this.restore()}}_applyShadow(t){var i,s,u;const c=(i=t.getShadowRGBA())!==null&&i!==void 0?i:"black",f=(s=t.getShadowBlur())!==null&&s!==void 0?s:5,p=(u=t.getShadowOffset())!==null&&u!==void 0?u:{x:0,y:0},m=t.getAbsoluteScale(),S=this.canvas.getPixelRatio(),b=m.x*S,_=m.y*S;this.setAttr("shadowColor",c),this.setAttr("shadowBlur",f*Math.min(Math.abs(b),Math.abs(_))),this.setAttr("shadowOffsetX",p.x*b),this.setAttr("shadowOffsetY",p.y*_)}}class ZT extends _1{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const i=t.getStrokeScaleEnabled();if(!i){this.save();const c=this.getCanvas().getPixelRatio();this.setTransform(c,0,0,c,0,0)}this._applyLineCap(t);const s=t.hitStrokeWidth(),u=s==="auto"?t.strokeWidth():s;this.setAttr("lineWidth",u),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}}let x1;function JT(){if(x1)return x1;const n=k.createCanvasElement(),t=n.getContext("2d");return x1=(function(){const i=Nt._global.devicePixelRatio||1,s=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return i/s})(),k.releaseCanvas(n),x1}class b2{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const s=(t||{}).pixelRatio||Nt.pixelRatio||JT();this.pixelRatio=s,this._canvas=k.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){const i=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/i,this.getHeight()/i)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";const i=this.pixelRatio;this.getContext()._context.scale(i,i)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,i){this.setWidth(t||0),this.setHeight(i||0)}toDataURL(t,i){try{return this._canvas.toDataURL(t,i)}catch{try{return this._canvas.toDataURL()}catch(u){return k.error("Unable to get data URL. "+u.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class Vo extends b2{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new QT(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}class E2 extends b2{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new ZT(this),this.setSize(t.width,t.height)}}const Ne={get isDragging(){let n=!1;return Ne._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return Ne._dragElements.forEach(t=>{n=t.node}),n},_dragElements:new Map,_drag(n){const t=[];Ne._dragElements.forEach((i,s)=>{const{node:u}=i,c=u.getStage();c.setPointersPositions(n),i.pointerId===void 0&&(i.pointerId=k._getFirstPointerId(n));const f=c._changedPointerPositions.find(p=>p.id===i.pointerId);if(f){if(i.dragStatus!=="dragging"){const p=u.dragDistance();if(Math.max(Math.abs(f.x-i.startPointerPos.x),Math.abs(f.y-i.startPointerPos.y))<p||(u.startDrag({evt:n}),!u.isDragging()))return}u._setDragPosition(n,i),t.push(u)}}),t.forEach(i=>{i.fire("dragmove",{type:"dragmove",target:i,evt:n},!0)})},_endDragBefore(n){const t=[];Ne._dragElements.forEach(i=>{const{node:s}=i,u=s.getStage();if(n&&u.setPointersPositions(n),!u._changedPointerPositions.find(p=>p.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(Ne.justDragged=!0,Nt._mouseListenClick=!1,Nt._touchListenClick=!1,Nt._pointerListenClick=!1,i.dragStatus="stopped");const f=i.node.getLayer()||i.node instanceof Nt.Stage&&i.node;f&&t.indexOf(f)===-1&&t.push(f)}),t.forEach(i=>{i.draw()})},_endDragAfter(n){Ne._dragElements.forEach((t,i)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:n},!0),t.dragStatus!=="dragging"&&Ne._dragElements.delete(i)})}};Nt.isBrowser&&(window.addEventListener("mouseup",Ne._endDragBefore,!0),window.addEventListener("touchend",Ne._endDragBefore,!0),window.addEventListener("touchcancel",Ne._endDragBefore,!0),window.addEventListener("mousemove",Ne._drag),window.addEventListener("touchmove",Ne._drag),window.addEventListener("mouseup",Ne._endDragAfter,!1),window.addEventListener("touchend",Ne._endDragAfter,!1),window.addEventListener("touchcancel",Ne._endDragAfter,!1));function Go(n){return k._isString(n)?'"'+n+'"':Object.prototype.toString.call(n)==="[object Number]"||k._isBoolean(n)?n:Object.prototype.toString.call(n)}function m5(n){return n>255?255:n<0?0:Math.round(n)}function Dt(){if(Nt.isUnminified)return function(n,t){return k._isNumber(n)||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),n}}function D1(n){if(Nt.isUnminified)return function(t,i){let s=k._isNumber(t),u=k._isArray(t)&&t.length==n;return!s&&!u&&k.warn(Go(t)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+n+")"),t}}function T2(){if(Nt.isUnminified)return function(n,t){return k._isNumber(n)||n==="auto"||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),n}}function lc(){if(Nt.isUnminified)return function(n,t){return k._isString(n)||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),n}}function g5(){if(Nt.isUnminified)return function(n,t){const i=k._isString(n),s=Object.prototype.toString.call(n)==="[object CanvasGradient]"||n&&n.addColorStop;return i||s||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),n}}function FT(){if(Nt.isUnminified)return function(n,t){const i=Int8Array?Object.getPrototypeOf(Int8Array):null;return i&&n instanceof i||(k._isArray(n)?n.forEach(function(s){k._isNumber(s)||k.warn('"'+t+'" attribute has non numeric element '+s+". Make sure that all elements are numbers.")}):k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),n}}function ol(){if(Nt.isUnminified)return function(n,t){return n===!0||n===!1||k.warn(Go(n)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),n}}function kT(n){if(Nt.isUnminified)return function(t,i){return t==null||k.isObject(t)||k.warn(Go(t)+' is a not valid value for "'+i+'" attribute. The value should be an object with properties '+n),t}}const Vp="get",Gp="set",G={addGetterSetter(n,t,i,s,u){G.addGetter(n,t,i),G.addSetter(n,t,s,u),G.addOverloadedGetterSetter(n,t)},addGetter(n,t,i){const s=Vp+k._capitalize(t);n.prototype[s]=n.prototype[s]||function(){const u=this.attrs[t];return u===void 0?i:u}},addSetter(n,t,i,s){const u=Gp+k._capitalize(t);n.prototype[u]||G.overWriteSetter(n,t,i,s)},overWriteSetter(n,t,i,s){const u=Gp+k._capitalize(t);n.prototype[u]=function(c){return i&&c!==void 0&&c!==null&&(c=i.call(this,c,t)),this._setAttr(t,c),s&&s.call(this),this}},addComponentsGetterSetter(n,t,i,s,u){const c=i.length,f=k._capitalize,p=Vp+f(t),m=Gp+f(t);n.prototype[p]=function(){const b={};for(let _=0;_<c;_++){const x=i[_];b[x]=this.getAttr(t+f(x))}return b};const S=kT(i);n.prototype[m]=function(b){const _=this.attrs[t];s&&(b=s.call(this,b,t)),S&&S.call(this,b,t);for(const x in b)b.hasOwnProperty(x)&&this._setAttr(t+f(x),b[x]);return b||i.forEach(x=>{this._setAttr(t+f(x),void 0)}),this._fireChangeEvent(t,_,b),u&&u.call(this),this},G.addOverloadedGetterSetter(n,t)},addOverloadedGetterSetter(n,t){const i=k._capitalize(t),s=Gp+i,u=Vp+i;n.prototype[t]=function(){return arguments.length?(this[s](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(n,t,i,s){k.error("Adding deprecated "+t);const u=Vp+k._capitalize(t),c=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";n.prototype[u]=function(){k.error(c);const f=this.attrs[t];return f===void 0?i:f},G.addSetter(n,t,s,function(){k.error(c)}),G.addOverloadedGetterSetter(n,t)},backCompat(n,t){k.each(t,function(i,s){const u=n.prototype[s],c=Vp+k._capitalize(i),f=Gp+k._capitalize(i);function p(){u.apply(this,arguments),k.error('"'+i+'" method is deprecated and will be removed soon. Use ""'+s+'" instead.')}n.prototype[i]=p,n.prototype[c]=p,n.prototype[f]=p})},afterSetFilter(){this._filterUpToDate=!1}};function IT(n){const t=/(\w+)\(([^)]+)\)/g;let i;for(;(i=t.exec(n))!==null;){const[,s,u]=i;switch(s){case"blur":{const c=parseFloat(u.replace("px",""));return function(f){this.blurRadius(c*.5);const p=Nt.Filters;p&&p.Blur&&p.Blur.call(this,f)}}case"brightness":{const c=u.includes("%")?parseFloat(u)/100:parseFloat(u);return function(f){this.brightness(c);const p=Nt.Filters;p&&p.Brightness&&p.Brightness.call(this,f)}}case"contrast":{const c=parseFloat(u);return function(f){const p=100*(Math.sqrt(c)-1);this.contrast(p);const m=Nt.Filters;m&&m.Contrast&&m.Contrast.call(this,f)}}case"grayscale":return function(c){const f=Nt.Filters;f&&f.Grayscale&&f.Grayscale.call(this,c)};case"sepia":return function(c){const f=Nt.Filters;f&&f.Sepia&&f.Sepia.call(this,c)};case"invert":return function(c){const f=Nt.Filters;f&&f.Invert&&f.Invert.call(this,c)};default:k.warn(`CSS filter "${s}" is not supported in fallback mode. Consider using function filters for better compatibility.`);break}}return()=>{}}const A1="absoluteOpacity",M1="allEventListeners",Rr="absoluteTransform",y5="absoluteScale",rc="canvas",WT="Change",$T="children",tC="konva",C2="listening",eC="mouseenter",nC="mouseleave",aC="pointerenter",iC="pointerleave",sC="touchenter",lC="touchleave",v5="set",S5="Shape",N1=" ",b5="stage",jo="transform",rC="Stage",_2="visible",oC=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(N1);let uC=1,Mt=class u5{constructor(t){this._id=uC++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===jo||t===Rr)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,i){let s=this._cache.get(t);return(s===void 0||(t===jo||t===Rr)&&s.dirty===!0)&&(s=i.call(this),this._cache.set(t,s)),s}_calculate(t,i,s){if(!this._attachedDepsListeners.get(t)){const u=i.map(c=>c+"Change.konva").join(N1);this.on(u,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,s)}_getCanvasCache(){return this._cache.get(rc)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Rr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(rc)){const{scene:t,filter:i,hit:s,buffer:u}=this._cache.get(rc);k.releaseCanvas(t,i,s,u),this._cache.delete(rc)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){const i=t||{};let s={};(i.x===void 0||i.y===void 0||i.width===void 0||i.height===void 0)&&(s=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let u=Math.ceil(i.width||s.width),c=Math.ceil(i.height||s.height),f=i.pixelRatio,p=i.x===void 0?Math.floor(s.x):i.x,m=i.y===void 0?Math.floor(s.y):i.y,S=i.offset||0,b=i.drawBorder||!1,_=i.hitCanvasPixelRatio||1;if(!u||!c){k.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const x=Math.abs(Math.round(s.x)-p)>.5?1:0,D=Math.abs(Math.round(s.y)-m)>.5?1:0;u+=S*2+x,c+=S*2+D,p-=S,m-=S;const A=new Vo({pixelRatio:f,width:u,height:c}),N=new Vo({pixelRatio:f,width:0,height:0,willReadFrequently:!0}),R=new E2({pixelRatio:_,width:u,height:c}),O=A.getContext(),U=R.getContext(),j=new Vo({width:A.width/A.pixelRatio+Math.abs(p),height:A.height/A.pixelRatio+Math.abs(m),pixelRatio:A.pixelRatio}),V=j.getContext();return R.isCache=!0,A.isCache=!0,this._cache.delete(rc),this._filterUpToDate=!1,i.imageSmoothingEnabled===!1&&(A.getContext()._context.imageSmoothingEnabled=!1,N.getContext()._context.imageSmoothingEnabled=!1),O.save(),U.save(),V.save(),O.translate(-p,-m),U.translate(-p,-m),V.translate(-p,-m),j.x=p,j.y=m,this._isUnderCache=!0,this._clearSelfAndDescendantCache(A1),this._clearSelfAndDescendantCache(y5),this.drawScene(A,this,j),this.drawHit(R,this),this._isUnderCache=!1,O.restore(),U.restore(),b&&(O.save(),O.beginPath(),O.rect(0,0,u,c),O.closePath(),O.setAttr("strokeStyle","red"),O.setAttr("lineWidth",5),O.stroke(),O.restore()),this._cache.set(rc,{scene:A,filter:N,hit:R,buffer:j,x:p,y:m}),this._requestDraw(),this}isCached(){return this._cache.has(rc)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,i){const s=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];let u=1/0,c=1/0,f=-1/0,p=-1/0;const m=this.getAbsoluteTransform(i);return s.forEach(function(S){const b=m.point(S);u===void 0&&(u=f=b.x,c=p=b.y),u=Math.min(u,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),p=Math.max(p,b.y)}),{x:u,y:c,width:f-u,height:p-c}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const i=this._getCanvasCache();t.translate(i.x,i.y);const s=this._getCachedSceneCanvas(),u=s.pixelRatio;t.drawImage(s._canvas,0,0,s.width/u,s.height/u),t.restore()}_drawCachedHitCanvas(t){const i=this._getCanvasCache(),s=i.hit;t.save(),t.translate(i.x,i.y),t.drawImage(s._canvas,0,0,s.width/s.pixelRatio,s.height/s.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),i=this._getCanvasCache(),s=i.scene,u=i.filter,c=u.getContext(),f,p,m,S;if(!t||t.length===0)return s;if(this._filterUpToDate)return u;let b=!0;for(let x=0;x<t.length;x++)if(typeof t[x]=="string"&&p5(),typeof t[x]!="string"||!p5()){b=!1;break}const _=s.pixelRatio;if(u.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio),b){const x=t.join(" ");return c.save(),c.setAttr("filter",x),c.drawImage(s._canvas,0,0,s.getWidth()/_,s.getHeight()/_),c.restore(),this._filterUpToDate=!0,u}try{for(f=t.length,c.clear(),c.drawImage(s._canvas,0,0,s.getWidth()/_,s.getHeight()/_),p=c.getImageData(0,0,u.getWidth(),u.getHeight()),m=0;m<f;m++)S=t[m],typeof S=="string"&&(S=IT(S)),S.call(this,p),c.putImageData(p,0,0)}catch(x){k.error("Unable to apply filter. "+x.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,u}on(t,i){if(this._cache&&this._cache.delete(M1),arguments.length===3)return this._delegate.apply(this,arguments);const s=t.split(N1);for(let u=0;u<s.length;u++){const f=s[u].split("."),p=f[0],m=f[1]||"";this.eventListeners[p]||(this.eventListeners[p]=[]),this.eventListeners[p].push({name:m,handler:i})}return this}off(t,i){let s=(t||"").split(N1),u=s.length,c,f,p,m,S,b;if(this._cache&&this._cache.delete(M1),!t)for(f in this.eventListeners)this._off(f);for(c=0;c<u;c++)if(p=s[c],m=p.split("."),S=m[0],b=m[1],S)this.eventListeners[S]&&this._off(S,b,i);else for(f in this.eventListeners)this._off(f,b,i);return this}dispatchEvent(t){const i={target:this,type:t.type,evt:t};return this.fire(t.type,i),this}addEventListener(t,i){return this.on(t,function(s){i.call(this,s.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,i,s){const u=this;this.on(t,function(c){const f=c.target.findAncestors(i,!0,u);for(let p=0;p<f.length;p++)c=k.cloneObject(c),c.currentTarget=f[p],s.call(f[p],c)})}remove(){return this.isDragging()&&this.stopDrag(),Ne._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Rr),this._clearSelfAndDescendantCache(A1),this._clearSelfAndDescendantCache(y5),this._clearSelfAndDescendantCache(b5),this._clearSelfAndDescendantCache(_2),this._clearSelfAndDescendantCache(C2)}_remove(){this._clearCaches();const t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){const i="get"+k._capitalize(t);return k._isFunction(this[i])?this[i]():this.attrs[t]}getAncestors(){let t=this.getParent(),i=[];for(;t;)i.push(t),t=t.getParent();return i}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let i,s;if(!t)return this;for(i in t)i!==$T&&(s=v5+k._capitalize(i),k._isFunction(this[s])?this[s](t[i]):this._setAttr(i,t[i]))}),this}isListening(){return this._getCache(C2,this._isListening)}_isListening(t){if(!this.listening())return!1;const s=this.getParent();return s&&s!==t&&this!==t?s._isListening(t):!0}isVisible(){return this._getCache(_2,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const s=this.getParent();return s&&s!==t&&this!==t?s._isVisible(t):!0}shouldDrawHit(t,i=!1){if(t)return this._isVisible(t)&&this._isListening(t);const s=this.getLayer();let u=!1;Ne._dragElements.forEach(f=>{f.dragStatus==="dragging"&&(f.node.nodeType==="Stage"||f.node.getLayer()===s)&&(u=!0)});const c=!i&&!Nt.hitOnDragEnabled&&(u||Nt.isTransforming());return this.isListening()&&this.isVisible()&&!c}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),i=this,s=0,u,c,f,p;function m(b){for(u=[],c=b.length,f=0;f<c;f++)p=b[f],s++,p.nodeType!==S5&&(u=u.concat(p.getChildren().slice())),p._id===i._id&&(f=c);u.length>0&&u[0].getDepth()<=t&&m(u)}const S=this.getStage();return i.nodeType!==rC&&S&&m(S.getChildren()),s}getDepth(){let t=0,i=this.parent;for(;i;)t++,i=i.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(jo),this._clearSelfAndDescendantCache(Rr)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;const i=t.getPointerPosition();if(!i)return null;const s=this.getAbsoluteTransform().copy();return s.invert(),s.point(i)}getAbsolutePosition(t){let i=!1,s=this.parent;for(;s;){if(s.isCached()){i=!0;break}s=s.parent}i&&!t&&(t=!0);const u=this.getAbsoluteTransform(t).getMatrix(),c=new Ji,f=this.offset();return c.m=u.slice(),c.translate(f.x,f.y),c.getTranslation()}setAbsolutePosition(t){const{x:i,y:s,...u}=this._clearTransform();this.attrs.x=i,this.attrs.y=s,this._clearCache(jo);const c=this._getAbsoluteTransform().copy();return c.invert(),c.translate(t.x,t.y),t={x:this.attrs.x+c.getTranslation().x,y:this.attrs.y+c.getTranslation().y},this._setTransform(u),this.setPosition({x:t.x,y:t.y}),this._clearCache(jo),this._clearSelfAndDescendantCache(Rr),this}_setTransform(t){let i;for(i in t)this.attrs[i]=t[i]}_clearTransform(){const t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let i=t.x,s=t.y,u=this.x(),c=this.y();return i!==void 0&&(u+=i),s!==void 0&&(c+=s),this.setPosition({x:u,y:c}),this}_eachAncestorReverse(t,i){let s=[],u=this.getParent(),c,f;if(!(i&&i._id===this._id)){for(s.unshift(this);u&&(!i||u._id!==i._id);)s.unshift(u),u=u.parent;for(c=s.length,f=0;f<c;f++)t(s[f])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return k.warn("Node has no parent. moveToTop function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return k.warn("Node has no parent. moveUp function is ignored."),!1;const t=this.index,i=this.parent.getChildren().length;return t<i-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return k.warn("Node has no parent. moveDown function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return k.warn("Node has no parent. moveToBottom function is ignored."),!1;const t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return k.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&k.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(A1,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity();const i=this.getParent();return i&&!i._isUnderCache&&(t*=i.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t=this.getAttrs(),i,s,u,c,f;const p={attrs:{},className:this.getClassName()};for(i in t)s=t[i],f=k.isObject(s)&&!k._isPlainObject(s)&&!k._isArray(s),!f&&(u=typeof this[i]=="function"&&this[i],delete t[i],c=u?u.call(this):null,t[i]=s,c!==s&&(p.attrs[i]=s));return k._prepareToStringify(p)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,i,s){const u=[];i&&this._isMatch(t)&&u.push(this);let c=this.parent;for(;c;){if(c===s)return u;c._isMatch(t)&&u.push(c),c=c.parent}return u}isAncestorOf(t){return!1}findAncestor(t,i,s){return this.findAncestors(t,i,s)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);let i=t.replace(/ /g,"").split(","),s=i.length,u,c;for(u=0;u<s;u++)if(c=i[u],k.isValidSelector(c)||(k.warn('Selector "'+c+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),k.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),k.warn("Konva is awesome, right?")),c.charAt(0)==="#"){if(this.id()===c.slice(1))return!0}else if(c.charAt(0)==="."){if(this.hasName(c.slice(1)))return!0}else if(this.className===c||this.nodeType===c)return!0;return!1}getLayer(){const t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(b5,this._getStage)}_getStage(){const t=this.getParent();return t?t.getStage():null}fire(t,i={},s){return i.target=i.target||this,s?this._fireAndBubble(t,i):this._fire(t,i),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Rr,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let i;if(t)return i=new Ji,this._eachAncestorReverse(function(s){const u=s.transformsEnabled();u==="all"?i.multiply(s.getTransform()):u==="position"&&i.translate(s.x()-s.offsetX(),s.y()-s.offsetY())},t),i;{i=this._cache.get(Rr)||new Ji,this.parent?this.parent.getAbsoluteTransform().copyInto(i):i.reset();const s=this.transformsEnabled();if(s==="all")i.multiply(this.getTransform());else if(s==="position"){const u=this.attrs.x||0,c=this.attrs.y||0,f=this.attrs.offsetX||0,p=this.attrs.offsetY||0;i.translate(u-f,c-p)}return i.dirty=!1,i}}getAbsoluteScale(t){let i=this;for(;i;)i._isUnderCache&&(t=i),i=i.getParent();const u=this.getAbsoluteTransform(t).decompose();return{x:u.scaleX,y:u.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(jo,this._getTransform)}_getTransform(){var t,i;const s=this._cache.get(jo)||new Ji;s.reset();const u=this.x(),c=this.y(),f=Nt.getAngle(this.rotation()),p=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,m=(i=this.attrs.scaleY)!==null&&i!==void 0?i:1,S=this.attrs.skewX||0,b=this.attrs.skewY||0,_=this.attrs.offsetX||0,x=this.attrs.offsetY||0;return(u!==0||c!==0)&&s.translate(u,c),f!==0&&s.rotate(f),(S!==0||b!==0)&&s.skew(S,b),(p!==1||m!==1)&&s.scale(p,m),(_!==0||x!==0)&&s.translate(-1*_,-1*x),s.dirty=!1,s}clone(t){let i=k.cloneObject(this.attrs),s,u,c,f,p;for(s in t)i[s]=t[s];const m=new this.constructor(i);for(s in this.eventListeners)for(u=this.eventListeners[s],c=u.length,f=0;f<c;f++)p=u[f],p.name.indexOf(tC)<0&&(m.eventListeners[s]||(m.eventListeners[s]=[]),m.eventListeners[s].push(p));return m}_toKonvaCanvas(t){t=t||{};const i=this.getClientRect(),s=this.getStage(),u=t.x!==void 0?t.x:Math.floor(i.x),c=t.y!==void 0?t.y:Math.floor(i.y),f=t.pixelRatio||1,p=new Vo({width:t.width||Math.ceil(i.width)||(s?s.width():0),height:t.height||Math.ceil(i.height)||(s?s.height():0),pixelRatio:f}),m=p.getContext(),S=new Vo({width:p.width/p.pixelRatio+Math.abs(u),height:p.height/p.pixelRatio+Math.abs(c),pixelRatio:p.pixelRatio});return t.imageSmoothingEnabled===!1&&(m._context.imageSmoothingEnabled=!1),m.save(),(u||c)&&m.translate(-1*u,-1*c),this.drawScene(p,void 0,S),m.restore(),p}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};const i=t.mimeType||null,s=t.quality||null,u=this._toKonvaCanvas(t).toDataURL(i,s);return t.callback&&t.callback(u),u}toImage(t){return new Promise((i,s)=>{try{const u=t?.callback;u&&delete t.callback,k._urlToImage(this.toDataURL(t),function(c){i(c),u?.(c)})}catch(u){s(u)}})}toBlob(t){return new Promise((i,s)=>{try{const u=t?.callback;u&&delete t.callback,this.toCanvas(t).toBlob(c=>{i(c),u?.(c)},t?.mimeType,t?.quality)}catch(u){s(u)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Nt.dragDistance}_off(t,i,s){let u=this.eventListeners[t],c,f,p;for(c=0;c<u.length;c++)if(f=u[c].name,p=u[c].handler,(f!=="konva"||i==="konva")&&(!i||f===i)&&(!s||s===p)){if(u.splice(c,1),u.length===0){delete this.eventListeners[t];break}c--}}_fireChangeEvent(t,i,s){this._fire(t+WT,{oldVal:i,newVal:s})}addName(t){if(!this.hasName(t)){const i=this.name(),s=i?i+" "+t:t;this.name(s)}return this}hasName(t){if(!t)return!1;const i=this.name();return i?(i||"").split(/\s/g).indexOf(t)!==-1:!1}removeName(t){const i=(this.name()||"").split(/\s/g),s=i.indexOf(t);return s!==-1&&(i.splice(s,1),this.name(i.join(" "))),this}setAttr(t,i){const s=this[v5+k._capitalize(t)];return k._isFunction(s)?s.call(this,i):this._setAttr(t,i),this}_requestDraw(){if(Nt.autoDrawEnabled){const t=this.getLayer()||this.getStage();t?.batchDraw()}}_setAttr(t,i){const s=this.attrs[t];s===i&&!k.isObject(i)||(i==null?delete this.attrs[t]:this.attrs[t]=i,this._shouldFireChangeEvents&&this._fireChangeEvent(t,s,i),this._requestDraw())}_setComponentAttr(t,i,s){let u;s!==void 0&&(u=this.attrs[t],u||(this.attrs[t]=this.getAttr(t)),this.attrs[t][i]=s,this._fireChangeEvent(t,u,s))}_fireAndBubble(t,i,s){i&&this.nodeType===S5&&(i.target=this);const u=[eC,nC,aC,iC,sC,lC];if(!(u.indexOf(t)!==-1&&(s&&(this===s||this.isAncestorOf&&this.isAncestorOf(s))||this.nodeType==="Stage"&&!s))){this._fire(t,i);const f=u.indexOf(t)!==-1&&s&&s.isAncestorOf&&s.isAncestorOf(this)&&!s.isAncestorOf(this.parent);(i&&!i.cancelBubble||!i)&&this.parent&&this.parent.isListening()&&!f&&(s&&s.parent?this._fireAndBubble.call(this.parent,t,i,s):this._fireAndBubble.call(this.parent,t,i))}}_getProtoListeners(t){var i,s,u;const c=(i=this._cache.get(M1))!==null&&i!==void 0?i:{};let f=c?.[t];if(f===void 0){f=[];let p=Object.getPrototypeOf(this);for(;p;){const m=(u=(s=p.eventListeners)===null||s===void 0?void 0:s[t])!==null&&u!==void 0?u:[];f.push(...m),p=Object.getPrototypeOf(p)}c[t]=f,this._cache.set(M1,c)}return f}_fire(t,i){i=i||{},i.currentTarget=this,i.type=t;const s=this._getProtoListeners(t);if(s)for(let c=0;c<s.length;c++)s[c].handler.call(this,i);const u=this.eventListeners[t];if(u)for(let c=0;c<u.length;c++)u[c].handler.call(this,i)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){const i=t?t.pointerId:void 0,s=this.getStage(),u=this.getAbsolutePosition();if(!s)return;const c=s._getPointerById(i)||s._changedPointerPositions[0]||u;Ne._dragElements.set(this._id,{node:this,startPointerPos:c,offset:{x:c.x-u.x,y:c.y-u.y},dragStatus:"ready",pointerId:i})}startDrag(t,i=!0){Ne._dragElements.has(this._id)||this._createDragElement(t);const s=Ne._dragElements.get(this._id);s.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},i)}_setDragPosition(t,i){const s=this.getStage()._getPointerById(i.pointerId);if(!s)return;let u={x:s.x-i.offset.x,y:s.y-i.offset.y};const c=this.dragBoundFunc();if(c!==void 0){const f=c.call(this,u,t);f?u=f:k.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==u.x||this._lastPos.y!==u.y)&&(this.setAbsolutePosition(u),this._requestDraw()),this._lastPos=u}stopDrag(t){const i=Ne._dragElements.get(this._id);i&&(i.dragStatus="stopped"),Ne._endDragBefore(t),Ne._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Ne._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(!(t.evt.button!==void 0)||Nt.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let u=!1;Ne._dragElements.forEach(c=>{this.isAncestorOf(c.node)&&(u=!0)}),u||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const i=Ne._dragElements.get(this._id),s=i&&i.dragStatus==="dragging",u=i&&i.dragStatus==="ready";s?this.stopDrag():u&&Ne._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const i=this.getStage();if(!i)return!1;const s={x:-t.x,y:-t.y,width:i.width()+2*t.x,height:i.height()+2*t.y};return k.haveIntersection(s,this.getClientRect())}static create(t,i){return k._isString(t)&&(t=JSON.parse(t)),this._createNode(t,i)}static _createNode(t,i){let s=u5.prototype.getClassName.call(t),u=t.children,c,f,p;i&&(t.attrs.container=i),Nt[s]||(k.warn('Can not find a node with class name "'+s+'". Fallback to "Shape".'),s="Shape");const m=Nt[s];if(c=new m(t.attrs),u)for(f=u.length,p=0;p<f;p++)c.add(u5._createNode(u[p]));return c}};Mt.prototype.nodeType="Node",Mt.prototype._attrsAffectingSize=[],Mt.prototype.eventListeners={},Mt.prototype.on.call(Mt.prototype,oC,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(jo),this._clearSelfAndDescendantCache(Rr)}),Mt.prototype.on.call(Mt.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(_2)}),Mt.prototype.on.call(Mt.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(C2)}),Mt.prototype.on.call(Mt.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(A1)});const Je=G.addGetterSetter;Je(Mt,"zIndex"),Je(Mt,"absolutePosition"),Je(Mt,"position"),Je(Mt,"x",0,Dt()),Je(Mt,"y",0,Dt()),Je(Mt,"globalCompositeOperation","source-over",lc()),Je(Mt,"opacity",1,Dt()),Je(Mt,"name","",lc()),Je(Mt,"id","",lc()),Je(Mt,"rotation",0,Dt()),G.addComponentsGetterSetter(Mt,"scale",["x","y"]),Je(Mt,"scaleX",1,Dt()),Je(Mt,"scaleY",1,Dt()),G.addComponentsGetterSetter(Mt,"skew",["x","y"]),Je(Mt,"skewX",0,Dt()),Je(Mt,"skewY",0,Dt()),G.addComponentsGetterSetter(Mt,"offset",["x","y"]),Je(Mt,"offsetX",0,Dt()),Je(Mt,"offsetY",0,Dt()),Je(Mt,"dragDistance",void 0,Dt()),Je(Mt,"width",0,Dt()),Je(Mt,"height",0,Dt()),Je(Mt,"listening",!0,ol()),Je(Mt,"preventDefault",!0,ol()),Je(Mt,"filters",void 0,function(n){return this._filterUpToDate=!1,n}),Je(Mt,"visible",!0,ol()),Je(Mt,"transformsEnabled","all",lc()),Je(Mt,"size"),Je(Mt,"dragBoundFunc"),Je(Mt,"draggable",!1,ol()),G.backCompat(Mt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Fi extends Mt{constructor(){super(...arguments),this.children=[]}getChildren(t){const i=this.children||[];return t?i.filter(t):i}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(let s=0;s<t.length;s++)this.add(t[s]);return this}const i=t[0];return i.getParent()?(i.moveTo(this),this):(this._validateAdd(i),i.index=this.getChildren().length,i.parent=this,i._clearCaches(),this.getChildren().push(i),this._fire("add",{child:i}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){const i=this._generalFind(t,!0);return i.length>0?i[0]:void 0}_generalFind(t,i){const s=[];return this._descendants(u=>{const c=u._isMatch(t);return c&&s.push(u),!!(c&&i)}),s}_descendants(t){let i=!1;const s=this.getChildren();for(const u of s){if(i=t(u),i)return!0;if(u.hasChildren()&&(i=u._descendants(t),i))return!0}return!1}toObject(){const t=Mt.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(i=>{t.children.push(i.toObject())}),t}isAncestorOf(t){let i=t.getParent();for(;i;){if(i._id===this._id)return!0;i=i.getParent()}return!1}clone(t){const i=Mt.prototype.clone.call(this,t);return this.getChildren().forEach(function(s){i.add(s.clone())}),i}getAllIntersections(t){const i=[];return this.find("Shape").forEach(s=>{s.isVisible()&&s.intersects(t)&&i.push(s)}),i}_clearSelfAndDescendantCache(t){var i;super._clearSelfAndDescendantCache(t),!this.isCached()&&((i=this.children)===null||i===void 0||i.forEach(function(s){s._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(i,s){i.index=s}),this._requestDraw()}drawScene(t,i,s){const u=this.getLayer(),c=t||u&&u.getCanvas(),f=c&&c.getContext(),p=this._getCanvasCache(),m=p&&p.scene,S=c&&c.isCache;if(!this.isVisible()&&!S)return this;if(m){f.save();const b=this.getAbsoluteTransform(i).getMatrix();f.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(f),f.restore()}else this._drawChildren("drawScene",c,i,s);return this}drawHit(t,i){if(!this.shouldDrawHit(i))return this;const s=this.getLayer(),u=t||s&&s.hitCanvas,c=u&&u.getContext(),f=this._getCanvasCache();if(f&&f.hit){c.save();const m=this.getAbsoluteTransform(i).getMatrix();c.transform(m[0],m[1],m[2],m[3],m[4],m[5]),this._drawCachedHitCanvas(c),c.restore()}else this._drawChildren("drawHit",u,i);return this}_drawChildren(t,i,s,u){var c;const f=i&&i.getContext(),p=this.clipWidth(),m=this.clipHeight(),S=this.clipFunc(),b=typeof p=="number"&&typeof m=="number"||S,_=s===this;if(b){f.save();const D=this.getAbsoluteTransform(s);let A=D.getMatrix();f.transform(A[0],A[1],A[2],A[3],A[4],A[5]),f.beginPath();let N;if(S)N=S.call(this,f,this);else{const R=this.clipX(),O=this.clipY();f.rect(R||0,O||0,p,m)}f.clip.apply(f,N),A=D.copy().invert().getMatrix(),f.transform(A[0],A[1],A[2],A[3],A[4],A[5])}const x=!_&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";x&&(f.save(),f._applyGlobalCompositeOperation(this)),(c=this.children)===null||c===void 0||c.forEach(function(D){D[t](i,s,u)}),x&&f.restore(),b&&f.restore()}getClientRect(t={}){var i;const s=t.skipTransform,u=t.relativeTo;let c,f,p,m,S={x:1/0,y:1/0,width:0,height:0};const b=this;(i=this.children)===null||i===void 0||i.forEach(function(D){if(!D.visible())return;const A=D.getClientRect({relativeTo:b,skipShadow:t.skipShadow,skipStroke:t.skipStroke});A.width===0&&A.height===0||(c===void 0?(c=A.x,f=A.y,p=A.x+A.width,m=A.y+A.height):(c=Math.min(c,A.x),f=Math.min(f,A.y),p=Math.max(p,A.x+A.width),m=Math.max(m,A.y+A.height)))});const _=this.find("Shape");let x=!1;for(let D=0;D<_.length;D++)if(_[D]._isVisible(this)){x=!0;break}return x&&c!==void 0?S={x:c,y:f,width:p-c,height:m-f}:S={x:0,y:0,width:0,height:0},s?S:this._transformedRect(S,u)}}G.addComponentsGetterSetter(Fi,"clip",["x","y","width","height"]),G.addGetterSetter(Fi,"clipX",void 0,Dt()),G.addGetterSetter(Fi,"clipY",void 0,Dt()),G.addGetterSetter(Fi,"clipWidth",void 0,Dt()),G.addGetterSetter(Fi,"clipHeight",void 0,Dt()),G.addGetterSetter(Fi,"clipFunc");const jp=new Map,E5=Nt._global.PointerEvent!==void 0;function x2(n){return jp.get(n)}function D2(n){return{evt:n,pointerId:n.pointerId}}function T5(n,t){return jp.get(n)===t}function C5(n,t){Lp(n),t.getStage()&&(jp.set(n,t),E5&&t._fire("gotpointercapture",D2(new PointerEvent("gotpointercapture"))))}function Lp(n,t){const i=jp.get(n);if(!i)return;const s=i.getStage();s&&s.content,jp.delete(n),E5&&i._fire("lostpointercapture",D2(new PointerEvent("lostpointercapture")))}const cC="Stage",fC="string",_5="px",hC="mouseout",x5="mouseleave",D5="mouseover",A5="mouseenter",M5="mousemove",N5="mousedown",O5="mouseup",Pp="pointermove",Yp="pointerdown",Wf="pointerup",qp="pointercancel",dC="lostpointercapture",O1="pointerout",Xp="pointerleave",R1="pointerover",z1="pointerenter",A2="contextmenu",R5="touchstart",z5="touchend",H5="touchmove",w5="touchcancel",M2="wheel",pC=5,mC=[[A5,"_pointerenter"],[N5,"_pointerdown"],[M5,"_pointermove"],[O5,"_pointerup"],[x5,"_pointerleave"],[R5,"_pointerdown"],[H5,"_pointermove"],[z5,"_pointerup"],[w5,"_pointercancel"],[D5,"_pointerover"],[M2,"_wheel"],[A2,"_contextmenu"],[Yp,"_pointerdown"],[Pp,"_pointermove"],[Wf,"_pointerup"],[qp,"_pointercancel"],[Xp,"_pointerleave"],[dC,"_lostpointercapture"]],N2={mouse:{[O1]:hC,[Xp]:x5,[R1]:D5,[z1]:A5,[Pp]:M5,[Yp]:N5,[Wf]:O5,[qp]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[O1]:"touchout",[Xp]:"touchleave",[R1]:"touchover",[z1]:"touchenter",[Pp]:H5,[Yp]:R5,[Wf]:z5,[qp]:w5,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[O1]:O1,[Xp]:Xp,[R1]:R1,[z1]:z1,[Pp]:Pp,[Yp]:Yp,[Wf]:Wf,[qp]:qp,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Kp=n=>n.indexOf("pointer")>=0?"pointer":n.indexOf("touch")>=0?"touch":"mouse",$f=n=>{const t=Kp(n);if(t==="pointer")return Nt.pointerEventsEnabled&&N2.pointer;if(t==="touch")return N2.touch;if(t==="mouse")return N2.mouse};function U5(n={}){return(n.clipFunc||n.clipWidth||n.clipHeight)&&k.warn("Stage does not support clipping. Please use clip for Layers or Groups."),n}const gC="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",Qp=[];let H1=class extends Fi{constructor(t){super(U5(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Qp.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{U5(this.attrs)}),this._checkVisibility()}_validateAdd(t){const i=t.getType()==="Layer",s=t.getType()==="FastLayer";i||s||k.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===fC){let i;if(t.charAt(0)==="."){const s=t.slice(1);t=document.getElementsByClassName(s)[0]}else t.charAt(0)!=="#"?i=t:i=t.slice(1),t=document.getElementById(i);if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const t=this.children,i=t.length;for(let s=0;s<i;s++)t[s].clear();return this}clone(t){return t||(t={}),t.container=typeof document<"u"&&document.createElement("div"),Fi.prototype.clone.call(this,t)}destroy(){super.destroy();const t=this.content;t&&k._isInDocument(t)&&this.container().removeChild(t);const i=Qp.indexOf(this);return i>-1&&Qp.splice(i,1),k.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(k.warn(gC),null)}_getPointerById(t){return this._pointerPositions.find(i=>i.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t={...t},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();const i=new Vo({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),s=i.getContext()._context,u=this.children;return(t.x||t.y)&&s.translate(-1*t.x,-1*t.y),u.forEach(function(c){if(!c.isVisible())return;const f=c._toKonvaCanvas(t);s.drawImage(f._canvas,t.x,t.y,f.getWidth()/f.getPixelRatio(),f.getHeight()/f.getPixelRatio())}),i}getIntersection(t){if(!t)return null;const i=this.children,s=i.length,u=s-1;for(let c=u;c>=0;c--){const f=i[c].getIntersection(t);if(f)return f}return null}_resizeDOM(){const t=this.width(),i=this.height();this.content&&(this.content.style.width=t+_5,this.content.style.height=i+_5),this.bufferCanvas.setSize(t,i),this.bufferHitCanvas.setSize(t,i),this.children.forEach(s=>{s.setSize({width:t,height:i}),s.draw()})}add(t,...i){if(arguments.length>1){for(let u=0;u<arguments.length;u++)this.add(arguments[u]);return this}super.add(t);const s=this.children.length;return s>pC&&k.warn("The stage has "+s+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),Nt.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return T5(t,this)}setPointerCapture(t){C5(t,this)}releaseCapture(t){Lp(t)}getLayers(){return this.children}_bindContentEvents(){Nt.isBrowser&&mC.forEach(([t,i])=>{this.content.addEventListener(t,s=>{this[i](s)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const i=$f(t.type);i&&this._fire(i.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const i=$f(t.type);i&&this._fire(i.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let i=this[t+"targetShape"];return i&&!i.getStage()&&(i=null),i}_pointerleave(t){const i=$f(t.type),s=Kp(t.type);if(!i)return;this.setPointersPositions(t);const u=this._getTargetShape(s),c=!(Nt.isDragging()||Nt.isTransforming())||Nt.hitOnDragEnabled;u&&c?(u._fireAndBubble(i.pointerout,{evt:t}),u._fireAndBubble(i.pointerleave,{evt:t}),this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this[s+"targetShape"]=null):c&&(this._fire(i.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(i.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){const i=$f(t.type),s=Kp(t.type);if(!i)return;this.setPointersPositions(t);let u=!1;this._changedPointerPositions.forEach(c=>{const f=this.getIntersection(c);if(Ne.justDragged=!1,Nt["_"+s+"ListenClick"]=!0,!f||!f.isListening()){this[s+"ClickStartShape"]=void 0;return}Nt.capturePointerEventsEnabled&&f.setPointerCapture(c.id),this[s+"ClickStartShape"]=f,f._fireAndBubble(i.pointerdown,{evt:t,pointerId:c.id}),u=!0;const p=t.type.indexOf("touch")>=0;f.preventDefault()&&t.cancelable&&p&&t.preventDefault()}),u||this._fire(i.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){const i=$f(t.type),s=Kp(t.type);if(!i)return;const u=t.type.indexOf("touch")>=0||t.pointerType==="touch";if(Nt.isDragging()&&Ne.node.preventDefault()&&t.cancelable&&u&&t.preventDefault(),this.setPointersPositions(t),!(!(Nt.isDragging()||Nt.isTransforming())||Nt.hitOnDragEnabled))return;const f={};let p=!1;const m=this._getTargetShape(s);this._changedPointerPositions.forEach(S=>{const b=x2(S.id)||this.getIntersection(S),_=S.id,x={evt:t,pointerId:_},D=m!==b;if(D&&m&&(m._fireAndBubble(i.pointerout,{...x},b),m._fireAndBubble(i.pointerleave,{...x},b)),b){if(f[b._id])return;f[b._id]=!0}b&&b.isListening()?(p=!0,D&&(b._fireAndBubble(i.pointerover,{...x},m),b._fireAndBubble(i.pointerenter,{...x},m),this[s+"targetShape"]=b),b._fireAndBubble(i.pointermove,{...x})):m&&(this._fire(i.pointerover,{evt:t,target:this,currentTarget:this,pointerId:_}),this[s+"targetShape"]=null)}),p||this._fire(i.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const i=$f(t.type),s=Kp(t.type);if(!i)return;this.setPointersPositions(t);const u=this[s+"ClickStartShape"],c=this[s+"ClickEndShape"],f={};let p=!1;this._changedPointerPositions.forEach(m=>{const S=x2(m.id)||this.getIntersection(m);if(S){if(S.releaseCapture(m.id),f[S._id])return;f[S._id]=!0}const b=m.id,_={evt:t,pointerId:b};let x=!1;Nt["_"+s+"InDblClickWindow"]?(x=!0,clearTimeout(this[s+"DblTimeout"])):Ne.justDragged||(Nt["_"+s+"InDblClickWindow"]=!0,clearTimeout(this[s+"DblTimeout"])),this[s+"DblTimeout"]=setTimeout(function(){Nt["_"+s+"InDblClickWindow"]=!1},Nt.dblClickWindow),S&&S.isListening()?(p=!0,this[s+"ClickEndShape"]=S,S._fireAndBubble(i.pointerup,{..._}),Nt["_"+s+"ListenClick"]&&u&&u===S&&(S._fireAndBubble(i.pointerclick,{..._}),x&&c&&c===S&&S._fireAndBubble(i.pointerdblclick,{..._}))):(this[s+"ClickEndShape"]=null,p||(this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),p=!0),Nt["_"+s+"ListenClick"]&&this._fire(i.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:b}),x&&this._fire(i.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:b}))}),p||this._fire(i.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),Nt["_"+s+"ListenClick"]=!1,t.cancelable&&s!=="touch"&&s!=="pointer"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(A2,{evt:t}):this._fire(A2,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);const i=this.getIntersection(this.getPointerPosition());i&&i.isListening()?i._fireAndBubble(M2,{evt:t}):this._fire(M2,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const i=x2(t.pointerId)||this.getIntersection(this.getPointerPosition());i&&i._fireAndBubble(Wf,D2(t)),Lp(t.pointerId)}_lostpointercapture(t){Lp(t.pointerId)}setPointersPositions(t){const i=this._getContentPosition();let s=null,u=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,c=>{this._pointerPositions.push({id:c.identifier,x:(c.clientX-i.left)/i.scaleX,y:(c.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,c=>{this._changedPointerPositions.push({id:c.identifier,x:(c.clientX-i.left)/i.scaleX,y:(c.clientY-i.top)/i.scaleY})})):(s=(t.clientX-i.left)/i.scaleX,u=(t.clientY-i.top)/i.scaleY,this.pointerPos={x:s,y:u},this._pointerPositions=[{x:s,y:u,id:k._getFirstPointerId(t)}],this._changedPointerPositions=[{x:s,y:u,id:k._getFirstPointerId(t)}])}_setPointerPosition(t){k.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Vo({width:this.width(),height:this.height()}),this.bufferHitCanvas=new E2({pixelRatio:1,width:this.width(),height:this.height()}),!Nt.isBrowser)return;const t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return k.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}};H1.prototype.nodeType=cC,Tn(H1),G.addGetterSetter(H1,"container"),Nt.isBrowser&&document.addEventListener("visibilitychange",()=>{Qp.forEach(n=>{n.batchDraw()})});const B5="hasShadow",V5="shadowRGBA",G5="patternImage",j5="linearGradient",L5="radialGradient";let w1;function O2(){return w1||(w1=k.createCanvasElement().getContext("2d"),w1)}const Zp={};function yC(n){const t=this.attrs.fillRule;t?n.fill(t):n.fill()}function vC(n){n.stroke()}function SC(n){const t=this.attrs.fillRule;t?n.fill(t):n.fill()}function bC(n){n.stroke()}function EC(){this._clearCache(B5)}function TC(){this._clearCache(V5)}function CC(){this._clearCache(G5)}function _C(){this._clearCache(j5)}function xC(){this._clearCache(L5)}class Ct extends Mt{constructor(t){super(t);let i,s=0;for(;i=k.getHitColor(),!(i&&!(i in Zp));)if(s++,s>=1e4){k.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),i=k.getRandomColor();break}this.colorKey=i,Zp[i]=this}getContext(){return k.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return k.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(B5,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(G5,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const i=O2().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(i&&i.setTransform){const s=new Ji;s.translate(this.fillPatternX(),this.fillPatternY()),s.rotate(Nt.getAngle(this.fillPatternRotation())),s.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),s.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const u=s.getMatrix(),c=typeof DOMMatrix>"u"?{a:u[0],b:u[1],c:u[2],d:u[3],e:u[4],f:u[5]}:new DOMMatrix(u);i.setTransform(c)}return i}}_getLinearGradient(){return this._getCache(j5,this.__getLinearGradient)}__getLinearGradient(){const t=this.fillLinearGradientColorStops();if(t){const i=O2(),s=this.fillLinearGradientStartPoint(),u=this.fillLinearGradientEndPoint(),c=i.createLinearGradient(s.x,s.y,u.x,u.y);for(let f=0;f<t.length;f+=2)c.addColorStop(t[f],t[f+1]);return c}}_getRadialGradient(){return this._getCache(L5,this.__getRadialGradient)}__getRadialGradient(){const t=this.fillRadialGradientColorStops();if(t){const i=O2(),s=this.fillRadialGradientStartPoint(),u=this.fillRadialGradientEndPoint(),c=i.createRadialGradient(s.x,s.y,this.fillRadialGradientStartRadius(),u.x,u.y,this.fillRadialGradientEndRadius());for(let f=0;f<t.length;f+=2)c.addColorStop(t[f],t[f+1]);return c}}getShadowRGBA(){return this._getCache(V5,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const t=k.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){const i=this.getStage();if(!i)return!1;const s=i.bufferHitCanvas;return s.getContext().clear(),this.drawHit(s,void 0,!0),s.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return Mt.prototype.destroy.call(this),delete Zp[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var i;if(!((i=this.attrs.perfectDrawEnabled)!==null&&i!==void 0?i:!0))return!1;const u=t||this.hasFill(),c=this.hasStroke(),f=this.getAbsoluteOpacity()!==1;if(u&&c&&f)return!0;const p=this.hasShadow(),m=this.shadowForStrokeEnabled();return!!(u&&c&&p&&m)}setStrokeHitEnabled(t){k.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let i=!1,s=this.getParent();for(;s;){if(s.isCached()){i=!0;break}s=s.getParent()}const u=t.skipTransform,c=t.relativeTo||i&&this.getStage()||void 0,f=this.getSelfRect(),m=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,S=f.width+m,b=f.height+m,_=!t.skipShadow&&this.hasShadow(),x=_?this.shadowOffsetX():0,D=_?this.shadowOffsetY():0,A=S+Math.abs(x),N=b+Math.abs(D),R=_&&this.shadowBlur()||0,O=A+R*2,U=N+R*2,j={width:O,height:U,x:-(m/2+R)+Math.min(x,0)+f.x,y:-(m/2+R)+Math.min(D,0)+f.y};return u?j:this._transformedRect(j,c)}drawScene(t,i,s){const u=this.getLayer(),c=t||u.getCanvas(),f=c.getContext(),p=this._getCanvasCache(),m=this.getSceneFunc(),S=this.hasShadow();let b;const _=i===this;if(!this.isVisible()&&!_)return this;if(p){f.save();const x=this.getAbsoluteTransform(i).getMatrix();return f.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedSceneCanvas(f),f.restore(),this}if(!m)return this;if(f.save(),this._useBufferCanvas()){b=this.getStage();const x=s||b.bufferCanvas,D=x.getContext();D.clear(),D.save(),D._applyLineJoin(this),D._applyMiterLimit(this);const A=this.getAbsoluteTransform(i).getMatrix();D.transform(A[0],A[1],A[2],A[3],A[4],A[5]),m.call(this,D,this),D.restore();const N=x.pixelRatio;S&&f._applyShadow(this),_||(f._applyOpacity(this),f._applyGlobalCompositeOperation(this)),f.drawImage(x._canvas,x.x||0,x.y||0,x.width/N,x.height/N)}else{if(f._applyLineJoin(this),f._applyMiterLimit(this),!_){const x=this.getAbsoluteTransform(i).getMatrix();f.transform(x[0],x[1],x[2],x[3],x[4],x[5]),f._applyOpacity(this),f._applyGlobalCompositeOperation(this)}S&&f._applyShadow(this),m.call(this,f,this)}return f.restore(),this}drawHit(t,i,s=!1){if(!this.shouldDrawHit(i,s))return this;const u=this.getLayer(),c=t||u.hitCanvas,f=c&&c.getContext(),p=this.hitFunc()||this.sceneFunc(),m=this._getCanvasCache(),S=m&&m.hit;if(this.colorKey||k.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),S){f.save();const _=this.getAbsoluteTransform(i).getMatrix();return f.transform(_[0],_[1],_[2],_[3],_[4],_[5]),this._drawCachedHitCanvas(f),f.restore(),this}if(!p)return this;if(f.save(),f._applyLineJoin(this),f._applyMiterLimit(this),!(this===i)){const _=this.getAbsoluteTransform(i).getMatrix();f.transform(_[0],_[1],_[2],_[3],_[4],_[5])}return p.call(this,f,this),f.restore(),this}drawHitFromCache(t=0){const i=this._getCanvasCache(),s=this._getCachedSceneCanvas(),u=i.hit,c=u.getContext(),f=u.getWidth(),p=u.getHeight();c.clear(),c.drawImage(s._canvas,0,0,f,p);try{const m=c.getImageData(0,0,f,p),S=m.data,b=S.length,_=k._hexToRgb(this.colorKey);for(let x=0;x<b;x+=4)S[x+3]>t?(S[x]=_.r,S[x+1]=_.g,S[x+2]=_.b,S[x+3]=255):S[x+3]=0;c.putImageData(m,0,0)}catch(m){k.error("Unable to draw hit graph from cached scene canvas. "+m.message)}return this}hasPointerCapture(t){return T5(t,this)}setPointerCapture(t){C5(t,this)}releaseCapture(t){Lp(t)}}Ct.prototype._fillFunc=yC,Ct.prototype._strokeFunc=vC,Ct.prototype._fillFuncHit=SC,Ct.prototype._strokeFuncHit=bC,Ct.prototype._centroid=!1,Ct.prototype.nodeType="Shape",Tn(Ct),Ct.prototype.eventListeners={},Ct.prototype.on.call(Ct.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",EC),Ct.prototype.on.call(Ct.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",TC),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",CC),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",_C),Ct.prototype.on.call(Ct.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",xC),G.addGetterSetter(Ct,"stroke",void 0,g5()),G.addGetterSetter(Ct,"strokeWidth",2,Dt()),G.addGetterSetter(Ct,"fillAfterStrokeEnabled",!1),G.addGetterSetter(Ct,"hitStrokeWidth","auto",T2()),G.addGetterSetter(Ct,"strokeHitEnabled",!0,ol()),G.addGetterSetter(Ct,"perfectDrawEnabled",!0,ol()),G.addGetterSetter(Ct,"shadowForStrokeEnabled",!0,ol()),G.addGetterSetter(Ct,"lineJoin"),G.addGetterSetter(Ct,"lineCap"),G.addGetterSetter(Ct,"miterLimit"),G.addGetterSetter(Ct,"sceneFunc"),G.addGetterSetter(Ct,"hitFunc"),G.addGetterSetter(Ct,"dash"),G.addGetterSetter(Ct,"dashOffset",0,Dt()),G.addGetterSetter(Ct,"shadowColor",void 0,lc()),G.addGetterSetter(Ct,"shadowBlur",0,Dt()),G.addGetterSetter(Ct,"shadowOpacity",1,Dt()),G.addComponentsGetterSetter(Ct,"shadowOffset",["x","y"]),G.addGetterSetter(Ct,"shadowOffsetX",0,Dt()),G.addGetterSetter(Ct,"shadowOffsetY",0,Dt()),G.addGetterSetter(Ct,"fillPatternImage"),G.addGetterSetter(Ct,"fill",void 0,g5()),G.addGetterSetter(Ct,"fillPatternX",0,Dt()),G.addGetterSetter(Ct,"fillPatternY",0,Dt()),G.addGetterSetter(Ct,"fillLinearGradientColorStops"),G.addGetterSetter(Ct,"strokeLinearGradientColorStops"),G.addGetterSetter(Ct,"fillRadialGradientStartRadius",0),G.addGetterSetter(Ct,"fillRadialGradientEndRadius",0),G.addGetterSetter(Ct,"fillRadialGradientColorStops"),G.addGetterSetter(Ct,"fillPatternRepeat","repeat"),G.addGetterSetter(Ct,"fillEnabled",!0),G.addGetterSetter(Ct,"strokeEnabled",!0),G.addGetterSetter(Ct,"shadowEnabled",!0),G.addGetterSetter(Ct,"dashEnabled",!0),G.addGetterSetter(Ct,"strokeScaleEnabled",!0),G.addGetterSetter(Ct,"fillPriority","color"),G.addComponentsGetterSetter(Ct,"fillPatternOffset",["x","y"]),G.addGetterSetter(Ct,"fillPatternOffsetX",0,Dt()),G.addGetterSetter(Ct,"fillPatternOffsetY",0,Dt()),G.addComponentsGetterSetter(Ct,"fillPatternScale",["x","y"]),G.addGetterSetter(Ct,"fillPatternScaleX",1,Dt()),G.addGetterSetter(Ct,"fillPatternScaleY",1,Dt()),G.addComponentsGetterSetter(Ct,"fillLinearGradientStartPoint",["x","y"]),G.addComponentsGetterSetter(Ct,"strokeLinearGradientStartPoint",["x","y"]),G.addGetterSetter(Ct,"fillLinearGradientStartPointX",0),G.addGetterSetter(Ct,"strokeLinearGradientStartPointX",0),G.addGetterSetter(Ct,"fillLinearGradientStartPointY",0),G.addGetterSetter(Ct,"strokeLinearGradientStartPointY",0),G.addComponentsGetterSetter(Ct,"fillLinearGradientEndPoint",["x","y"]),G.addComponentsGetterSetter(Ct,"strokeLinearGradientEndPoint",["x","y"]),G.addGetterSetter(Ct,"fillLinearGradientEndPointX",0),G.addGetterSetter(Ct,"strokeLinearGradientEndPointX",0),G.addGetterSetter(Ct,"fillLinearGradientEndPointY",0),G.addGetterSetter(Ct,"strokeLinearGradientEndPointY",0),G.addComponentsGetterSetter(Ct,"fillRadialGradientStartPoint",["x","y"]),G.addGetterSetter(Ct,"fillRadialGradientStartPointX",0),G.addGetterSetter(Ct,"fillRadialGradientStartPointY",0),G.addComponentsGetterSetter(Ct,"fillRadialGradientEndPoint",["x","y"]),G.addGetterSetter(Ct,"fillRadialGradientEndPointX",0),G.addGetterSetter(Ct,"fillRadialGradientEndPointY",0),G.addGetterSetter(Ct,"fillPatternRotation",0),G.addGetterSetter(Ct,"fillRule",void 0,lc()),G.backCompat(Ct,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});const DC="beforeDraw",AC="draw",P5=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],MC=P5.length;let oc=class extends Fi{constructor(t){super(t),this.canvas=new Vo,this.hitCanvas=new E2({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);const i=this.getStage();return i&&i.content&&(i.content.removeChild(this.getNativeCanvasElement()),t<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[t+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Mt.prototype.moveToTop.call(this);const t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Mt.prototype.moveUp.call(this))return!1;const i=this.getStage();return!i||!i.content?!1:(i.content.removeChild(this.getNativeCanvasElement()),this.index<i.children.length-1?i.content.insertBefore(this.getNativeCanvasElement(),i.children[this.index+1].getCanvas()._canvas):i.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Mt.prototype.moveDown.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Mt.prototype.moveToBottom.call(this)){const t=this.getStage();if(t){const i=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),i[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const t=this.getNativeCanvasElement();return Mt.prototype.remove.call(this),t&&t.parentNode&&k._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:i}){return this.canvas.setSize(t,i),this.hitCanvas.setSize(t,i),this._setSmoothEnabled(),this}_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&k.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t={...t},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),Mt.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){k.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){k.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,k.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let i=1,s=!1;for(;;){for(let u=0;u<MC;u++){const c=P5[u],f=this._getIntersection({x:t.x+c.x*i,y:t.y+c.y*i}),p=f.shape;if(p)return p;if(s=!!f.antialiased,!f.antialiased)break}if(s)i+=1;else return null}}_getIntersection(t){const i=this.hitCanvas.pixelRatio,s=this.hitCanvas.context.getImageData(Math.round(t.x*i),Math.round(t.y*i),1,1).data,u=s[3];if(u===255){const c=k.getHitColorKey(s[0],s[1],s[2]),f=Zp[c];return f?{shape:f}:{antialiased:!0}}else if(u>0)return{antialiased:!0};return{}}drawScene(t,i,s){const u=this.getLayer(),c=t||u&&u.getCanvas();return this._fire(DC,{node:this}),this.clearBeforeDraw()&&c.getContext().clear(),Fi.prototype.drawScene.call(this,c,i,s),this._fire(AC,{node:this}),this}drawHit(t,i){const s=this.getLayer(),u=t||s&&s.hitCanvas;return s&&s.clearBeforeDraw()&&s.getHitCanvas().getContext().clear(),Fi.prototype.drawHit.call(this,u,i),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){k.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return k.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const t=this.parent;!!this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return k.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};oc.prototype.nodeType="Layer",Tn(oc),G.addGetterSetter(oc,"imageSmoothingEnabled",!0),G.addGetterSetter(oc,"clearBeforeDraw",!0),G.addGetterSetter(oc,"hitGraphEnabled",!0,ol());class R2 extends oc{constructor(t){super(t),this.listening(!1),k.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}R2.prototype.nodeType="FastLayer",Tn(R2);let th=class extends Fi{_validateAdd(t){const i=t.getType();i!=="Group"&&i!=="Shape"&&k.throw("You may only add groups and shapes to groups.")}};th.prototype.nodeType="Group",Tn(th);const z2=(function(){return sc.performance&&sc.performance.now?function(){return sc.performance.now()}:function(){return new Date().getTime()}})();class Ss{constructor(t,i){this.id=Ss.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:z2(),frameRate:0},this.func=t,this.setLayers(i)}setLayers(t){let i=[];return t&&(i=Array.isArray(t)?t:[t]),this.layers=i,this}getLayers(){return this.layers}addLayer(t){const i=this.layers,s=i.length;for(let u=0;u<s;u++)if(i[u]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const i=Ss.animations,s=i.length;for(let u=0;u<s;u++)if(i[u].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=z2(),Ss._addAnimation(this),this}stop(){return Ss._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const i=t.id,s=this.animations,u=s.length;for(let c=0;c<u;c++)if(s[c].id===i){this.animations.splice(c,1);break}}static _runFrames(){const t={},i=this.animations;for(let s=0;s<i.length;s++){const u=i[s],c=u.layers,f=u.func;u._updateFrameObject(z2());const p=c.length;let m;if(f?m=f.call(u,u.frame)!==!1:m=!0,!!m)for(let S=0;S<p;S++){const b=c[S];b._id!==void 0&&(t[b._id]=b)}}for(const s in t)t.hasOwnProperty(s)&&t[s].batchDraw()}static _animationLoop(){const t=Ss;t.animations.length?(t._runFrames(),k.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,k.requestAnimFrame(this._animationLoop))}}Ss.animations=[],Ss.animIdCounter=0,Ss.animRunning=!1;const NC={node:1,duration:1,easing:1,onFinish:1,yoyo:1},OC=1,Y5=2,q5=3,X5=["fill","stroke","shadowColor"];let RC=0;class zC{constructor(t,i,s,u,c,f,p){this.prop=t,this.propFunc=i,this.begin=u,this._pos=u,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=p,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=s,this._change=c-this.begin,this.pause()}fire(t){const i=this[t];i&&i()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Y5,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=q5,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const t=this.getTimer()-this._startTime;this.state===Y5?this.setTime(t):this.state===q5&&this.setTime(this.duration-t)}pause(){this.state=OC,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Fe{constructor(t){const i=this,s=t.node,u=s._id,c=t.easing||Jp.Linear,f=!!t.yoyo;let p,m;typeof t.duration>"u"?p=.3:t.duration===0?p=.001:p=t.duration,this.node=s,this._id=RC++;const S=s.getLayer()||(s instanceof Nt.Stage?s.getLayers():null);S||k.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ss(function(){i.tween.onEnterFrame()},S),this.tween=new zC(m,function(b){i._tweenFunc(b)},c,0,1,p*1e3,f),this._addListeners(),Fe.attrs[u]||(Fe.attrs[u]={}),Fe.attrs[u][this._id]||(Fe.attrs[u][this._id]={}),Fe.tweens[u]||(Fe.tweens[u]={});for(m in t)NC[m]===void 0&&this._addAttr(m,t[m]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,i){const s=this.node,u=s._id;let c,f,p,m,S;const b=Fe.tweens[u][t];b&&delete Fe.attrs[u][b][t];let _=s.getAttr(t);if(k._isArray(i))if(c=[],f=Math.max(i.length,_.length),t==="points"&&i.length!==_.length&&(i.length>_.length?(m=_,_=k._prepareArrayForTween(_,i,s.closed())):(p=i,i=k._prepareArrayForTween(i,_,s.closed()))),t.indexOf("fill")===0)for(let x=0;x<f;x++)if(x%2===0)c.push(i[x]-_[x]);else{const D=k.colorToRGBA(_[x]);S=k.colorToRGBA(i[x]),_[x]=D,c.push({r:S.r-D.r,g:S.g-D.g,b:S.b-D.b,a:S.a-D.a})}else for(let x=0;x<f;x++)c.push(i[x]-_[x]);else X5.indexOf(t)!==-1?(_=k.colorToRGBA(_),S=k.colorToRGBA(i),c={r:S.r-_.r,g:S.g-_.g,b:S.b-_.b,a:S.a-_.a}):c=i-_;Fe.attrs[u][this._id][t]={start:_,diff:c,end:i,trueEnd:p,trueStart:m},Fe.tweens[u][t]=this._id}_tweenFunc(t){const i=this.node,s=Fe.attrs[i._id][this._id];let u,c,f,p,m,S,b,_;for(u in s){if(c=s[u],f=c.start,p=c.diff,_=c.end,k._isArray(f))if(m=[],b=Math.max(f.length,_.length),u.indexOf("fill")===0)for(S=0;S<b;S++)S%2===0?m.push((f[S]||0)+p[S]*t):m.push("rgba("+Math.round(f[S].r+p[S].r*t)+","+Math.round(f[S].g+p[S].g*t)+","+Math.round(f[S].b+p[S].b*t)+","+(f[S].a+p[S].a*t)+")");else for(S=0;S<b;S++)m.push((f[S]||0)+p[S]*t);else X5.indexOf(u)!==-1?m="rgba("+Math.round(f.r+p.r*t)+","+Math.round(f.g+p.g*t)+","+Math.round(f.b+p.b*t)+","+(f.a+p.a*t)+")":m=f+p*t;i.setAttr(u,m)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const t=this.node,i=Fe.attrs[t._id][this._id];i.points&&i.points.trueEnd&&t.setAttr("points",i.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const t=this.node,i=Fe.attrs[t._id][this._id];i.points&&i.points.trueStart&&t.points(i.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const t=this.node._id,i=this._id,s=Fe.tweens[t];this.pause(),this.anim&&this.anim.stop();for(const u in s)delete Fe.tweens[t][u];delete Fe.attrs[t][i],Fe.tweens[t]&&(Object.keys(Fe.tweens[t]).length===0&&delete Fe.tweens[t],Object.keys(Fe.attrs[t]).length===0&&delete Fe.attrs[t])}}Fe.attrs={},Fe.tweens={},Mt.prototype.to=function(n){const t=n.onFinish;n.node=this,n.onFinish=function(){this.destroy(),t&&t()},new Fe(n).play()};const Jp={BackEaseIn(n,t,i,s){return i*(n/=s)*n*((1.70158+1)*n-1.70158)+t},BackEaseOut(n,t,i,s){return i*((n=n/s-1)*n*((1.70158+1)*n+1.70158)+1)+t},BackEaseInOut(n,t,i,s){let u=1.70158;return(n/=s/2)<1?i/2*(n*n*(((u*=1.525)+1)*n-u))+t:i/2*((n-=2)*n*(((u*=1.525)+1)*n+u)+2)+t},ElasticEaseIn(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s)===1?t+i:(c||(c=s*.3),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),-(u*Math.pow(2,10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c))+t)},ElasticEaseOut(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s)===1?t+i:(c||(c=s*.3),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),u*Math.pow(2,-10*n)*Math.sin((n*s-f)*(2*Math.PI)/c)+i+t)},ElasticEaseInOut(n,t,i,s,u,c){let f=0;return n===0?t:(n/=s/2)===2?t+i:(c||(c=s*(.3*1.5)),!u||u<Math.abs(i)?(u=i,f=c/4):f=c/(2*Math.PI)*Math.asin(i/u),n<1?-.5*(u*Math.pow(2,10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c))+t:u*Math.pow(2,-10*(n-=1))*Math.sin((n*s-f)*(2*Math.PI)/c)*.5+i+t)},BounceEaseOut(n,t,i,s){return(n/=s)<1/2.75?i*(7.5625*n*n)+t:n<2/2.75?i*(7.5625*(n-=1.5/2.75)*n+.75)+t:n<2.5/2.75?i*(7.5625*(n-=2.25/2.75)*n+.9375)+t:i*(7.5625*(n-=2.625/2.75)*n+.984375)+t},BounceEaseIn(n,t,i,s){return i-Jp.BounceEaseOut(s-n,0,i,s)+t},BounceEaseInOut(n,t,i,s){return n<s/2?Jp.BounceEaseIn(n*2,0,i,s)*.5+t:Jp.BounceEaseOut(n*2-s,0,i,s)*.5+i*.5+t},EaseIn(n,t,i,s){return i*(n/=s)*n+t},EaseOut(n,t,i,s){return-i*(n/=s)*(n-2)+t},EaseInOut(n,t,i,s){return(n/=s/2)<1?i/2*n*n+t:-i/2*(--n*(n-2)-1)+t},StrongEaseIn(n,t,i,s){return i*(n/=s)*n*n*n*n+t},StrongEaseOut(n,t,i,s){return i*((n=n/s-1)*n*n*n*n+1)+t},StrongEaseInOut(n,t,i,s){return(n/=s/2)<1?i/2*n*n*n*n*n+t:i/2*((n-=2)*n*n*n*n+2)+t},Linear(n,t,i,s){return i*n/s+t}},eh=k._assign(Nt,{Util:k,Transform:Ji,Node:Mt,Container:Fi,Stage:H1,stages:Qp,Layer:oc,FastLayer:R2,Group:th,DD:Ne,Shape:Ct,shapes:Zp,Animation:Ss,Tween:Fe,Easings:Jp,Context:_1,Canvas:b2});class zr extends Ct{_sceneFunc(t){const i=Nt.getAngle(this.angle()),s=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,i,s),t.arc(0,0,this.innerRadius(),i,0,!s),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),i=this.outerRadius(),s=this.clockwise(),u=Nt.getAngle(s?360-this.angle():this.angle()),c=Math.cos(Math.min(u,Math.PI)),f=1,p=Math.sin(Math.min(Math.max(Math.PI,u),3*Math.PI/2)),m=Math.sin(Math.min(u,Math.PI/2)),S=c*(c>0?t:i),b=f*i,_=p*(p>0?t:i),x=m*(m>0?i:t);return{x:S,y:s?-1*x:_,width:b-S,height:x-_}}}zr.prototype._centroid=!0,zr.prototype.className="Arc",zr.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],Tn(zr),G.addGetterSetter(zr,"innerRadius",0,Dt()),G.addGetterSetter(zr,"outerRadius",0,Dt()),G.addGetterSetter(zr,"angle",0,Dt()),G.addGetterSetter(zr,"clockwise",!1,ol());function H2(n,t,i,s,u,c,f){const p=Math.sqrt(Math.pow(i-n,2)+Math.pow(s-t,2)),m=Math.sqrt(Math.pow(u-i,2)+Math.pow(c-s,2)),S=f*p/(p+m),b=f*m/(p+m),_=i-S*(u-n),x=s-S*(c-t),D=i+b*(u-n),A=s+b*(c-t);return[_,x,D,A]}function K5(n,t){const i=n.length,s=[];for(let u=2;u<i-2;u+=2){const c=H2(n[u-2],n[u-1],n[u],n[u+1],n[u+2],n[u+3],t);isNaN(c[0])||(s.push(c[0]),s.push(c[1]),s.push(n[u]),s.push(n[u+1]),s.push(c[2]),s.push(c[3]))}return s}let Hr=class extends Ct{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){const i=this.points(),s=i.length,u=this.tension(),c=this.closed(),f=this.bezier();if(!s)return;let p=0;if(t.beginPath(),t.moveTo(i[0],i[1]),u!==0&&s>4){const m=this.getTensionPoints(),S=m.length;for(p=c?0:4,c||t.quadraticCurveTo(m[0],m[1],m[2],m[3]);p<S-2;)t.bezierCurveTo(m[p++],m[p++],m[p++],m[p++],m[p++],m[p++]);c||t.quadraticCurveTo(m[S-2],m[S-1],i[s-2],i[s-1])}else if(f)for(p=2;p<s;)t.bezierCurveTo(i[p++],i[p++],i[p++],i[p++],i[p++],i[p++]);else for(p=2;p<s;p+=2)t.lineTo(i[p],i[p+1]);c?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():K5(this.points(),this.tension())}_getTensionPointsClosed(){const t=this.points(),i=t.length,s=this.tension(),u=H2(t[i-2],t[i-1],t[0],t[1],t[2],t[3],s),c=H2(t[i-4],t[i-3],t[i-2],t[i-1],t[0],t[1],s),f=K5(t,s);return[u[2],u[3]].concat(f).concat([c[0],c[1],t[i-2],t[i-1],c[2],c[3],u[0],u[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();let i=t[0],s=t[0],u=t[1],c=t[1],f,p;for(let m=0;m<t.length/2;m++)f=t[m*2],p=t[m*2+1],i=Math.min(i,f),s=Math.max(s,f),u=Math.min(u,p),c=Math.max(c,p);return{x:i,y:u,width:s-i,height:c-u}}};Hr.prototype.className="Line",Hr.prototype._attrsAffectingSize=["points","bezier","tension"],Tn(Hr),G.addGetterSetter(Hr,"closed",!1),G.addGetterSetter(Hr,"bezier",!1),G.addGetterSetter(Hr,"tension",0,Dt()),G.addGetterSetter(Hr,"points",[],FT());const HC=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],wC=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],UC=[[1],[1,1],[1,2,1],[1,3,3,1]],Q5=(n,t,i)=>{let s,u;const f=i/2;s=0;for(let p=0;p<20;p++)u=f*HC[20][p]+f,s+=wC[20][p]*BC(n,t,u);return f*s},Z5=(n,t,i)=>{i===void 0&&(i=1);const s=n[0]-2*n[1]+n[2],u=t[0]-2*t[1]+t[2],c=2*n[1]-2*n[0],f=2*t[1]-2*t[0],p=4*(s*s+u*u),m=4*(s*c+u*f),S=c*c+f*f;if(p===0)return i*Math.sqrt(Math.pow(n[2]-n[0],2)+Math.pow(t[2]-t[0],2));const b=m/(2*p),_=S/p,x=i+b,D=_-b*b,A=x*x+D>0?Math.sqrt(x*x+D):0,N=b*b+D>0?Math.sqrt(b*b+D):0,R=b+Math.sqrt(b*b+D)!==0?D*Math.log(Math.abs((x+A)/(b+N))):0;return Math.sqrt(p)/2*(x*A-b*N+R)};function BC(n,t,i){const s=w2(1,i,n),u=w2(1,i,t),c=s*s+u*u;return Math.sqrt(c)}const w2=(n,t,i)=>{const s=i.length-1;let u,c;if(s===0)return 0;if(n===0){c=0;for(let f=0;f<=s;f++)c+=UC[s][f]*Math.pow(1-t,s-f)*Math.pow(t,f)*i[f];return c}else{u=new Array(s);for(let f=0;f<s;f++)u[f]=s*(i[f+1]-i[f]);return w2(n-1,t,u)}},J5=(n,t,i)=>{let s=1,u=n/t,c=(n-i(u))/t,f=0;for(;s>.001;){const p=i(u+c),m=Math.abs(n-p)/t;if(m<s)s=m,u+=c;else{const S=i(u-c),b=Math.abs(n-S)/t;b<s?(s=b,u-=c):c/=2}if(f++,f>500)break}return u};let bs=class Zi extends Ct{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Zi.parsePathData(this.data()),this.pathLength=Zi.getPathLength(this.dataArray)}_sceneFunc(t){const i=this.dataArray;t.beginPath();let s=!1;for(let u=0;u<i.length;u++){const c=i[u].command,f=i[u].points;switch(c){case"L":t.lineTo(f[0],f[1]);break;case"M":t.moveTo(f[0],f[1]);break;case"C":t.bezierCurveTo(f[0],f[1],f[2],f[3],f[4],f[5]);break;case"Q":t.quadraticCurveTo(f[0],f[1],f[2],f[3]);break;case"A":const p=f[0],m=f[1],S=f[2],b=f[3],_=f[4],x=f[5],D=f[6],A=f[7],N=S>b?S:b,R=S>b?1:S/b,O=S>b?b/S:1;t.translate(p,m),t.rotate(D),t.scale(R,O),t.arc(0,0,N,_,_+x,1-A),t.scale(1/R,1/O),t.rotate(-D),t.translate(-p,-m);break;case"z":s=!0,t.closePath();break}}!s&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){let t=[];this.dataArray.forEach(function(m){if(m.command==="A"){const S=m.points[4],b=m.points[5],_=m.points[4]+b;let x=Math.PI/180;if(Math.abs(S-_)<x&&(x=Math.abs(S-_)),b<0)for(let D=S-x;D>_;D-=x){const A=Zi.getPointOnEllipticalArc(m.points[0],m.points[1],m.points[2],m.points[3],D,0);t.push(A.x,A.y)}else for(let D=S+x;D<_;D+=x){const A=Zi.getPointOnEllipticalArc(m.points[0],m.points[1],m.points[2],m.points[3],D,0);t.push(A.x,A.y)}}else if(m.command==="C")for(let S=0;S<=1;S+=.01){const b=Zi.getPointOnCubicBezier(S,m.start.x,m.start.y,m.points[0],m.points[1],m.points[2],m.points[3],m.points[4],m.points[5]);t.push(b.x,b.y)}else t=t.concat(m.points)});let i=t[0],s=t[0],u=t[1],c=t[1],f,p;for(let m=0;m<t.length/2;m++)f=t[m*2],p=t[m*2+1],isNaN(f)||(i=Math.min(i,f),s=Math.max(s,f)),isNaN(p)||(u=Math.min(u,p),c=Math.max(c,p));return{x:i,y:u,width:s-i,height:c-u}}getLength(){return this.pathLength}getPointAtLength(t){return Zi.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,i,s,u){return Math.sqrt((s-t)*(s-t)+(u-i)*(u-i))}static getPathLength(t){let i=0;for(let s=0;s<t.length;++s)i+=t[s].pathLength;return i}static getPointAtLengthOfDataArray(t,i){let s,u=0,c=i.length;if(!c)return null;for(;u<c&&t>i[u].pathLength;)t-=i[u].pathLength,++u;if(u===c)return s=i[u-1].points.slice(-2),{x:s[0],y:s[1]};if(t<.01)return i[u].command==="M"?(s=i[u].points.slice(0,2),{x:s[0],y:s[1]}):{x:i[u].start.x,y:i[u].start.y};const f=i[u],p=f.points;switch(f.command){case"L":return Zi.getPointOnLine(t,f.start.x,f.start.y,p[0],p[1]);case"C":return Zi.getPointOnCubicBezier(J5(t,Zi.getPathLength(i),N=>Q5([f.start.x,p[0],p[2],p[4]],[f.start.y,p[1],p[3],p[5]],N)),f.start.x,f.start.y,p[0],p[1],p[2],p[3],p[4],p[5]);case"Q":return Zi.getPointOnQuadraticBezier(J5(t,Zi.getPathLength(i),N=>Z5([f.start.x,p[0],p[2]],[f.start.y,p[1],p[3]],N)),f.start.x,f.start.y,p[0],p[1],p[2],p[3]);case"A":const m=p[0],S=p[1],b=p[2],_=p[3],x=p[5],D=p[6];let A=p[4];return A+=x*t/f.pathLength,Zi.getPointOnEllipticalArc(m,S,b,_,A,D)}return null}static getPointOnLine(t,i,s,u,c,f,p){f=f??i,p=p??s;const m=this.getLineLength(i,s,u,c);if(m<1e-10)return{x:i,y:s};if(u===i)return{x:f,y:p+(c>s?t:-t)};const S=(c-s)/(u-i),b=Math.sqrt(t*t/(1+S*S))*(u<i?-1:1),_=S*b;if(Math.abs(p-s-S*(f-i))<1e-10)return{x:f+b,y:p+_};const x=((f-i)*(u-i)+(p-s)*(c-s))/(m*m),D=i+x*(u-i),A=s+x*(c-s),N=this.getLineLength(f,p,D,A),R=Math.sqrt(t*t-N*N),O=Math.sqrt(R*R/(1+S*S))*(u<i?-1:1),U=S*O;return{x:D+O,y:A+U}}static getPointOnCubicBezier(t,i,s,u,c,f,p,m,S){function b(R){return R*R*R}function _(R){return 3*R*R*(1-R)}function x(R){return 3*R*(1-R)*(1-R)}function D(R){return(1-R)*(1-R)*(1-R)}const A=m*b(t)+f*_(t)+u*x(t)+i*D(t),N=S*b(t)+p*_(t)+c*x(t)+s*D(t);return{x:A,y:N}}static getPointOnQuadraticBezier(t,i,s,u,c,f,p){function m(D){return D*D}function S(D){return 2*D*(1-D)}function b(D){return(1-D)*(1-D)}const _=f*m(t)+u*S(t)+i*b(t),x=p*m(t)+c*S(t)+s*b(t);return{x:_,y:x}}static getPointOnEllipticalArc(t,i,s,u,c,f){const p=Math.cos(f),m=Math.sin(f),S={x:s*Math.cos(c),y:u*Math.sin(c)};return{x:t+(S.x*p-S.y*m),y:i+(S.x*m+S.y*p)}}static parsePathData(t){if(!t)return[];let i=t;const s=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(new RegExp(" ","g"),",");for(let _=0;_<s.length;_++)i=i.replace(new RegExp(s[_],"g"),"|"+s[_]);const u=i.split("|"),c=[],f=[];let p=0,m=0;const S=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let b;for(let _=1;_<u.length;_++){let x=u[_],D=x.charAt(0);for(x=x.slice(1),f.length=0;b=S.exec(x);)f.push(b[0]);let A=[],N=D==="A"||D==="a"?0:-1;for(let R=0,O=f.length;R<O;R++){const U=f[R];if(U==="00"){A.push(0,0),N>=0&&(N+=2,N>=7&&(N-=7));continue}if(N>=0){if(N===3){if(/^[01]{2}\d+(?:\.\d+)?$/.test(U)){A.push(parseInt(U[0],10)),A.push(parseInt(U[1],10)),A.push(parseFloat(U.slice(2))),N+=3,N>=7&&(N-=7);continue}if(U==="11"||U==="10"||U==="01"){A.push(parseInt(U[0],10)),A.push(parseInt(U[1],10)),N+=2,N>=7&&(N-=7);continue}if(U==="0"||U==="1"){A.push(parseInt(U,10)),N+=1,N>=7&&(N-=7);continue}}else if(N===4){if(/^[01]\d+(?:\.\d+)?$/.test(U)){A.push(parseInt(U[0],10)),A.push(parseFloat(U.slice(1))),N+=2,N>=7&&(N-=7);continue}if(U==="0"||U==="1"){A.push(parseInt(U,10)),N+=1,N>=7&&(N-=7);continue}}const j=parseFloat(U);isNaN(j)?A.push(0):A.push(j),N+=1,N>=7&&(N-=7)}else{const j=parseFloat(U);isNaN(j)?A.push(0):A.push(j)}}for(;A.length>0&&!isNaN(A[0]);){let R="",O=[];const U=p,j=m;let V,F,W,st,$,tt,et,Tt,it,ht;switch(D){case"l":p+=A.shift(),m+=A.shift(),R="L",O.push(p,m);break;case"L":p=A.shift(),m=A.shift(),O.push(p,m);break;case"m":const dt=A.shift(),nt=A.shift();if(p+=dt,m+=nt,R="M",c.length>2&&c[c.length-1].command==="z"){for(let H=c.length-2;H>=0;H--)if(c[H].command==="M"){p=c[H].points[0]+dt,m=c[H].points[1]+nt;break}}O.push(p,m),D="l";break;case"M":p=A.shift(),m=A.shift(),R="M",O.push(p,m),D="L";break;case"h":p+=A.shift(),R="L",O.push(p,m);break;case"H":p=A.shift(),R="L",O.push(p,m);break;case"v":m+=A.shift(),R="L",O.push(p,m);break;case"V":m=A.shift(),R="L",O.push(p,m);break;case"C":O.push(A.shift(),A.shift(),A.shift(),A.shift()),p=A.shift(),m=A.shift(),O.push(p,m);break;case"c":O.push(p+A.shift(),m+A.shift(),p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="C",O.push(p,m);break;case"S":F=p,W=m,V=c[c.length-1],V.command==="C"&&(F=p+(p-V.points[2]),W=m+(m-V.points[3])),O.push(F,W,A.shift(),A.shift()),p=A.shift(),m=A.shift(),R="C",O.push(p,m);break;case"s":F=p,W=m,V=c[c.length-1],V.command==="C"&&(F=p+(p-V.points[2]),W=m+(m-V.points[3])),O.push(F,W,p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="C",O.push(p,m);break;case"Q":O.push(A.shift(),A.shift()),p=A.shift(),m=A.shift(),O.push(p,m);break;case"q":O.push(p+A.shift(),m+A.shift()),p+=A.shift(),m+=A.shift(),R="Q",O.push(p,m);break;case"T":F=p,W=m,V=c[c.length-1],V.command==="Q"&&(F=p+(p-V.points[0]),W=m+(m-V.points[1])),p=A.shift(),m=A.shift(),R="Q",O.push(F,W,p,m);break;case"t":F=p,W=m,V=c[c.length-1],V.command==="Q"&&(F=p+(p-V.points[0]),W=m+(m-V.points[1])),p+=A.shift(),m+=A.shift(),R="Q",O.push(F,W,p,m);break;case"A":st=A.shift(),$=A.shift(),tt=A.shift(),et=A.shift(),Tt=A.shift(),it=p,ht=m,p=A.shift(),m=A.shift(),R="A",O=this.convertEndpointToCenterParameterization(it,ht,p,m,et,Tt,st,$,tt);break;case"a":st=A.shift(),$=A.shift(),tt=A.shift(),et=A.shift(),Tt=A.shift(),it=p,ht=m,p+=A.shift(),m+=A.shift(),R="A",O=this.convertEndpointToCenterParameterization(it,ht,p,m,et,Tt,st,$,tt);break}c.push({command:R||D,points:O,start:{x:U,y:j},pathLength:this.calcLength(U,j,R||D,O)})}(D==="z"||D==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(t,i,s,u){let c,f,p,m;const S=Zi;switch(s){case"L":return S.getLineLength(t,i,u[0],u[1]);case"C":return Q5([t,u[0],u[2],u[4]],[i,u[1],u[3],u[5]],1);case"Q":return Z5([t,u[0],u[2]],[i,u[1],u[3]],1);case"A":c=0;const b=u[4],_=u[5],x=u[4]+_;let D=Math.PI/180;if(Math.abs(b-x)<D&&(D=Math.abs(b-x)),f=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],b,0),_<0)for(m=b-D;m>x;m-=D)p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],m,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),f=p;else for(m=b+D;m<x;m+=D)p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],m,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),f=p;return p=S.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],x,0),c+=S.getLineLength(f.x,f.y,p.x,p.y),c}return 0}static convertEndpointToCenterParameterization(t,i,s,u,c,f,p,m,S){const b=S*(Math.PI/180),_=Math.cos(b)*(t-s)/2+Math.sin(b)*(i-u)/2,x=-1*Math.sin(b)*(t-s)/2+Math.cos(b)*(i-u)/2,D=_*_/(p*p)+x*x/(m*m);D>1&&(p*=Math.sqrt(D),m*=Math.sqrt(D));let A=Math.sqrt((p*p*(m*m)-p*p*(x*x)-m*m*(_*_))/(p*p*(x*x)+m*m*(_*_)));c===f&&(A*=-1),isNaN(A)&&(A=0);const N=A*p*x/m,R=A*-m*_/p,O=(t+s)/2+Math.cos(b)*N-Math.sin(b)*R,U=(i+u)/2+Math.sin(b)*N+Math.cos(b)*R,j=function(et){return Math.sqrt(et[0]*et[0]+et[1]*et[1])},V=function(et,Tt){return(et[0]*Tt[0]+et[1]*Tt[1])/(j(et)*j(Tt))},F=function(et,Tt){return(et[0]*Tt[1]<et[1]*Tt[0]?-1:1)*Math.acos(V(et,Tt))},W=F([1,0],[(_-N)/p,(x-R)/m]),st=[(_-N)/p,(x-R)/m],$=[(-1*_-N)/p,(-1*x-R)/m];let tt=F(st,$);return V(st,$)<=-1&&(tt=Math.PI),V(st,$)>=1&&(tt=0),f===0&&tt>0&&(tt=tt-2*Math.PI),f===1&&tt<0&&(tt=tt+2*Math.PI),[O,U,p,m,W,tt,b,f]}};bs.prototype.className="Path",bs.prototype._attrsAffectingSize=["data"],Tn(bs),G.addGetterSetter(bs,"data");class uc extends Hr{_sceneFunc(t){super._sceneFunc(t);const i=Math.PI*2,s=this.points();let u=s;const c=this.tension()!==0&&s.length>4;c&&(u=this.getTensionPoints());const f=this.pointerLength(),p=s.length;let m,S;if(c){const x=[u[u.length-4],u[u.length-3],u[u.length-2],u[u.length-1],s[p-2],s[p-1]],D=bs.calcLength(u[u.length-4],u[u.length-3],"C",x),A=bs.getPointOnQuadraticBezier(Math.min(1,1-f/D),x[0],x[1],x[2],x[3],x[4],x[5]);m=s[p-2]-A.x,S=s[p-1]-A.y}else m=s[p-2]-s[p-4],S=s[p-1]-s[p-3];const b=(Math.atan2(S,m)+i)%i,_=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(s[p-2],s[p-1]),t.rotate(b),t.moveTo(0,0),t.lineTo(-f,_/2),t.lineTo(-f,-_/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(s[0],s[1]),c?(m=(u[0]+u[2])/2-s[0],S=(u[1]+u[3])/2-s[1]):(m=s[2]-s[0],S=s[3]-s[1]),t.rotate((Math.atan2(-S,-m)+i)%i),t.moveTo(0,0),t.lineTo(-f,_/2),t.lineTo(-f,-_/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){const i=this.dashEnabled();i&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),i&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),i=this.pointerWidth()/2;return{x:t.x,y:t.y-i,width:t.width,height:t.height+i*2}}}uc.prototype.className="Arrow",Tn(uc),G.addGetterSetter(uc,"pointerLength",10,Dt()),G.addGetterSetter(uc,"pointerWidth",10,Dt()),G.addGetterSetter(uc,"pointerAtBeginning",!1),G.addGetterSetter(uc,"pointerAtEnding",!0);let nh=class extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}};nh.prototype._centroid=!0,nh.prototype.className="Circle",nh.prototype._attrsAffectingSize=["radius"],Tn(nh),G.addGetterSetter(nh,"radius",0,Dt());class Lo extends Ct{_sceneFunc(t){const i=this.radiusX(),s=this.radiusY();t.beginPath(),t.save(),i!==s&&t.scale(1,s/i),t.arc(0,0,i,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}Lo.prototype.className="Ellipse",Lo.prototype._centroid=!0,Lo.prototype._attrsAffectingSize=["radiusX","radiusY"],Tn(Lo),G.addComponentsGetterSetter(Lo,"radius",["x","y"]),G.addGetterSetter(Lo,"radiusX",0,Dt()),G.addGetterSetter(Lo,"radiusY",0,Dt());let ul=class yT extends Ct{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",i=>{this._removeImageLoad(i.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const t=!!this.cornerRadius(),i=this.hasShadow();return t&&i?!0:super._useBufferCanvas(!0)}_sceneFunc(t){const i=this.getWidth(),s=this.getHeight(),u=this.cornerRadius(),c=this.attrs.image;let f;if(c){const p=this.attrs.cropWidth,m=this.attrs.cropHeight;p&&m?f=[c,this.cropX(),this.cropY(),p,m,0,0,i,s]:f=[c,0,0,i,s]}(this.hasFill()||this.hasStroke()||u)&&(t.beginPath(),u?k.drawRoundedRectPath(t,i,s,u):t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)),c&&(u&&t.clip(),t.drawImage.apply(t,f))}_hitFunc(t){const i=this.width(),s=this.height(),u=this.cornerRadius();t.beginPath(),u?k.drawRoundedRectPath(t,i,s,u):t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,i,s;return(s=(t=this.attrs.width)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.width)!==null&&s!==void 0?s:0}getHeight(){var t,i,s;return(s=(t=this.attrs.height)!==null&&t!==void 0?t:(i=this.image())===null||i===void 0?void 0:i.height)!==null&&s!==void 0?s:0}static fromURL(t,i,s=null){const u=k.createImageElement();u.onload=function(){const c=new yT({image:u});i(c)},u.onerror=s,u.crossOrigin="Anonymous",u.src=t}};ul.prototype.className="Image",ul.prototype._attrsAffectingSize=["image"],Tn(ul),G.addGetterSetter(ul,"cornerRadius",0,D1(4)),G.addGetterSetter(ul,"image"),G.addComponentsGetterSetter(ul,"crop",["x","y","width","height"]),G.addGetterSetter(ul,"cropX",0,Dt()),G.addGetterSetter(ul,"cropY",0,Dt()),G.addGetterSetter(ul,"cropWidth",0,Dt()),G.addGetterSetter(ul,"cropHeight",0,Dt());const F5=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],VC="Change.konva",GC="none",U2="up",B2="right",V2="down",G2="left",jC=F5.length;let j2=class extends th{constructor(t){super(t),this.on("add.konva",function(i){this._addListeners(i.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let i=this,s;const u=function(){i._sync()};for(s=0;s<jC;s++)t.on(F5[s]+VC,u)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),i=this.getTag(),s,u,c,f,p,m,S;if(t&&i){switch(s=t.width(),u=t.height(),c=i.pointerDirection(),f=i.pointerWidth(),S=i.pointerHeight(),p=0,m=0,c){case U2:p=s/2,m=-1*S;break;case B2:p=s+f,m=u/2;break;case V2:p=s/2,m=u+S;break;case G2:p=-1*f,m=u/2;break}i.setAttrs({x:-1*p,y:-1*m,width:s,height:u}),t.setAttrs({x:-1*p,y:-1*m})}}};j2.prototype.className="Label",Tn(j2);class cc extends Ct{_sceneFunc(t){const i=this.width(),s=this.height(),u=this.pointerDirection(),c=this.pointerWidth(),f=this.pointerHeight(),p=this.cornerRadius();let m=0,S=0,b=0,_=0;typeof p=="number"?m=S=b=_=Math.min(p,i/2,s/2):(m=Math.min(p[0]||0,i/2,s/2),S=Math.min(p[1]||0,i/2,s/2),_=Math.min(p[2]||0,i/2,s/2),b=Math.min(p[3]||0,i/2,s/2)),t.beginPath(),t.moveTo(m,0),u===U2&&(t.lineTo((i-c)/2,0),t.lineTo(i/2,-1*f),t.lineTo((i+c)/2,0)),t.lineTo(i-S,0),t.arc(i-S,S,S,Math.PI*3/2,0,!1),u===B2&&(t.lineTo(i,(s-f)/2),t.lineTo(i+c,s/2),t.lineTo(i,(s+f)/2)),t.lineTo(i,s-_),t.arc(i-_,s-_,_,0,Math.PI/2,!1),u===V2&&(t.lineTo((i+c)/2,s),t.lineTo(i/2,s+f),t.lineTo((i-c)/2,s)),t.lineTo(b,s),t.arc(b,s-b,b,Math.PI/2,Math.PI,!1),u===G2&&(t.lineTo(0,(s+f)/2),t.lineTo(-1*c,s/2),t.lineTo(0,(s-f)/2)),t.lineTo(0,m),t.arc(m,m,m,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,i=0,s=this.pointerWidth(),u=this.pointerHeight(),c=this.pointerDirection(),f=this.width(),p=this.height();return c===U2?(i-=u,p+=u):c===V2?p+=u:c===G2?(t-=s*1.5,f+=s):c===B2&&(f+=s*1.5),{x:t,y:i,width:f,height:p}}}cc.prototype.className="Tag",Tn(cc),G.addGetterSetter(cc,"pointerDirection",GC),G.addGetterSetter(cc,"pointerWidth",0,Dt()),G.addGetterSetter(cc,"pointerHeight",0,Dt()),G.addGetterSetter(cc,"cornerRadius",0,D1(4));let Fp=class extends Ct{_sceneFunc(t){const i=this.cornerRadius(),s=this.width(),u=this.height();t.beginPath(),i?k.drawRoundedRectPath(t,s,u,i):t.rect(0,0,s,u),t.closePath(),t.fillStrokeShape(this)}};Fp.prototype.className="Rect",Tn(Fp),G.addGetterSetter(Fp,"cornerRadius",0,D1(4));class Po extends Ct{_sceneFunc(t){const i=this._getPoints(),s=this.radius(),u=this.sides(),c=this.cornerRadius();if(t.beginPath(),c)k.drawRoundedPolygonPath(t,i,u,s,c);else{t.moveTo(i[0].x,i[0].y);for(let f=1;f<i.length;f++)t.lineTo(i[f].x,i[f].y)}t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,i=this.attrs.radius||0,s=[];for(let u=0;u<t;u++)s.push({x:i*Math.sin(u*2*Math.PI/t),y:-1*i*Math.cos(u*2*Math.PI/t)});return s}getSelfRect(){const t=this._getPoints();let i=t[0].x,s=t[0].x,u=t[0].y,c=t[0].y;return t.forEach(f=>{i=Math.min(i,f.x),s=Math.max(s,f.x),u=Math.min(u,f.y),c=Math.max(c,f.y)}),{x:i,y:u,width:s-i,height:c-u}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Po.prototype.className="RegularPolygon",Po.prototype._centroid=!0,Po.prototype._attrsAffectingSize=["radius"],Tn(Po),G.addGetterSetter(Po,"radius",0,Dt()),G.addGetterSetter(Po,"sides",0,Dt()),G.addGetterSetter(Po,"cornerRadius",0,D1(4));const k5=Math.PI*2;class fc extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,k5,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),k5,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}fc.prototype.className="Ring",fc.prototype._centroid=!0,fc.prototype._attrsAffectingSize=["innerRadius","outerRadius"],Tn(fc),G.addGetterSetter(fc,"innerRadius",0,Dt()),G.addGetterSetter(fc,"outerRadius",0,Dt());class Fl extends Ct{constructor(t){super(t),this._updated=!0,this.anim=new Ss(()=>{const i=this._updated;return this._updated=!1,i}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){const i=this.animation(),s=this.frameIndex(),u=s*4,c=this.animations()[i],f=this.frameOffsets(),p=c[u+0],m=c[u+1],S=c[u+2],b=c[u+3],_=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,S,b),t.closePath(),t.fillStrokeShape(this)),_)if(f){const x=f[i],D=s*2;t.drawImage(_,p,m,S,b,x[D+0],x[D+1],S,b)}else t.drawImage(_,p,m,S,b,0,0,S,b)}_hitFunc(t){const i=this.animation(),s=this.frameIndex(),u=s*4,c=this.animations()[i],f=this.frameOffsets(),p=c[u+2],m=c[u+3];if(t.beginPath(),f){const S=f[i],b=s*2;t.rect(S[b+0],S[b+1],p,m)}else t.rect(0,0,p,m);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const t=this.frameIndex(),i=this.animation(),s=this.animations(),u=s[i],c=u.length/4;t<c-1?this.frameIndex(t+1):this.frameIndex(0)}}Fl.prototype.className="Sprite",Tn(Fl),G.addGetterSetter(Fl,"animation"),G.addGetterSetter(Fl,"animations"),G.addGetterSetter(Fl,"frameOffsets"),G.addGetterSetter(Fl,"image"),G.addGetterSetter(Fl,"frameIndex",0,Dt()),G.addGetterSetter(Fl,"frameRate",17,Dt()),G.backCompat(Fl,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Yo extends Ct{_sceneFunc(t){const i=this.innerRadius(),s=this.outerRadius(),u=this.numPoints();t.beginPath(),t.moveTo(0,0-s);for(let c=1;c<u*2;c++){const f=c%2===0?s:i,p=f*Math.sin(c*Math.PI/u),m=-1*f*Math.cos(c*Math.PI/u);t.lineTo(p,m)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Yo.prototype.className="Star",Yo.prototype._centroid=!0,Yo.prototype._attrsAffectingSize=["innerRadius","outerRadius"],Tn(Yo),G.addGetterSetter(Yo,"numPoints",5,Dt()),G.addGetterSetter(Yo,"innerRadius",0,Dt()),G.addGetterSetter(Yo,"outerRadius",0,Dt());function qo(n){return[...n].reduce((t,i,s,u)=>{if(new RegExp("\\p{Emoji}","u").test(i)){const c=u[s+1];c&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(c)?(t.push(i+c),u[s+1]=""):t.push(i)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(i+(u[s+1]||""))?t.push(i+u[s+1]):s>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(i)?t[t.length-1]+=i:i&&t.push(i);return t},[])}const ah="auto",LC="center",I5="inherit",kp="justify",PC="Change.konva",YC="2d",W5="-",$5="left",qC="text",XC="Text",KC="top",QC="bottom",t4="middle",e4="normal",ZC="px ",U1=" ",JC="right",n4="rtl",FC="word",kC="char",a4="none",L2="…",i4=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],IC=i4.length;function WC(n){return n.split(",").map(t=>{t=t.trim();const i=t.indexOf(" ")>=0,s=t.indexOf('"')>=0||t.indexOf("'")>=0;return i&&!s&&(t=`"${t}"`),t}).join(", ")}let B1;function P2(){return B1||(B1=k.createCanvasElement().getContext(YC),B1)}function $C(n){n.fillText(this._partialText,this._partialTextX,this._partialTextY)}function t_(n){n.setAttr("miterLimit",2),n.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function e_(n){return n=n||{},!n.fillLinearGradientColorStops&&!n.fillRadialGradientColorStops&&!n.fillPatternImage&&(n.fill=n.fill||"black"),n}class on extends Ct{constructor(t){super(e_(t)),this._partialTextX=0,this._partialTextY=0;for(let i=0;i<IC;i++)this.on(i4[i]+PC,this._setTextData);this._setTextData()}_sceneFunc(t){var i,s;const u=this.textArr,c=u.length;if(!this.text())return;let f=this.padding(),p=this.fontSize(),m=this.lineHeight()*p,S=this.verticalAlign(),b=this.direction(),_=0,x=this.align(),D=this.getWidth(),A=this.letterSpacing(),N=this.charRenderFunc(),R=this.fill(),O=this.textDecoration(),U=O.indexOf("underline")!==-1,j=O.indexOf("line-through")!==-1,V;b=b===I5?t.direction:b;let F=m/2,W=t4;if(!Nt.legacyTextRendering){const st=this.measureSize("M");W="alphabetic";const $=(i=st.fontBoundingBoxAscent)!==null&&i!==void 0?i:st.actualBoundingBoxAscent,tt=(s=st.fontBoundingBoxDescent)!==null&&s!==void 0?s:st.actualBoundingBoxDescent;F=($-tt)/2+m/2}for(b===n4&&t.setAttr("direction",b),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",W),t.setAttr("textAlign",$5),S===t4?_=(this.getHeight()-c*m-f*2)/2:S===QC&&(_=this.getHeight()-c*m-f*2),t.translate(f,_+f),V=0;V<c;V++){let st=0,$=0;const tt=u[V],et=tt.text,Tt=tt.width,it=tt.lastInParagraph;if(t.save(),x===JC?st+=D-Tt-f*2:x===LC&&(st+=(D-Tt-f*2)/2),U){t.save(),t.beginPath();const dt=Nt.legacyTextRendering?Math.round(p/2):Math.round(p/4),nt=st,H=F+$+dt;t.moveTo(nt,H);const J=x===kp&&!it?D-f*2:Tt;t.lineTo(nt+Math.round(J),H),t.lineWidth=p/15;const K=this._getLinearGradient();t.strokeStyle=K||R,t.stroke(),t.restore()}const ht=st;if(b!==n4&&(A!==0||x===kp||N)){const dt=et.split(" ").length-1,nt=qo(et);for(let H=0;H<nt.length;H++){const J=nt[H];if(J===" "&&!it&&x===kp&&(st+=(D-f*2-Tt)/dt),this._partialTextX=st,this._partialTextY=F+$,this._partialText=J,N){t.save();const mt=u.slice(0,V).reduce((I,vt)=>I+qo(vt.text).length,0),pt=H+mt;N({char:J,index:pt,x:st,y:F+$,lineIndex:V,column:H,isLastInLine:it,width:this.measureSize(J).width,context:t})}t.fillStrokeShape(this),N&&t.restore(),st+=this.measureSize(J).width+A}}else A!==0&&t.setAttr("letterSpacing",`${A}px`),this._partialTextX=st,this._partialTextY=F+$,this._partialText=et,t.fillStrokeShape(this);if(j){t.save(),t.beginPath();const dt=Nt.legacyTextRendering?0:-Math.round(p/4),nt=ht;t.moveTo(nt,F+$+dt);const H=x===kp&&!it?D-f*2:Tt;t.lineTo(nt+Math.round(H),F+$+dt),t.lineWidth=p/15;const J=this._getLinearGradient();t.strokeStyle=J||R,t.stroke(),t.restore()}t.restore(),c>1&&(F+=m)}}_hitFunc(t){const i=this.getWidth(),s=this.getHeight();t.beginPath(),t.rect(0,0,i,s),t.closePath(),t.fillStrokeShape(this)}setText(t){const i=k._isString(t)?t:t==null?"":t+"";return this._setAttr(qC,i),this}getWidth(){return this.attrs.width===ah||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===ah||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return k.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var i,s,u,c,f,p,m,S,b,_,x;let D=P2(),A=this.fontSize(),N;D.save(),D.font=this._getContextFont(),N=D.measureText(t),D.restore();const R=A/100;return{actualBoundingBoxAscent:(i=N.actualBoundingBoxAscent)!==null&&i!==void 0?i:71.58203125*R,actualBoundingBoxDescent:(s=N.actualBoundingBoxDescent)!==null&&s!==void 0?s:0,actualBoundingBoxLeft:(u=N.actualBoundingBoxLeft)!==null&&u!==void 0?u:-7.421875*R,actualBoundingBoxRight:(c=N.actualBoundingBoxRight)!==null&&c!==void 0?c:75.732421875*R,alphabeticBaseline:(f=N.alphabeticBaseline)!==null&&f!==void 0?f:0,emHeightAscent:(p=N.emHeightAscent)!==null&&p!==void 0?p:100*R,emHeightDescent:(m=N.emHeightDescent)!==null&&m!==void 0?m:-20*R,fontBoundingBoxAscent:(S=N.fontBoundingBoxAscent)!==null&&S!==void 0?S:91*R,fontBoundingBoxDescent:(b=N.fontBoundingBoxDescent)!==null&&b!==void 0?b:21*R,hangingBaseline:(_=N.hangingBaseline)!==null&&_!==void 0?_:72.80000305175781*R,ideographicBaseline:(x=N.ideographicBaseline)!==null&&x!==void 0?x:-21*R,width:N.width,height:A}}_getContextFont(){return this.fontStyle()+U1+this.fontVariant()+U1+(this.fontSize()+ZC)+WC(this.fontFamily())}_addTextLine(t){this.align()===kp&&(t=t.trim());const s=this._getTextWidth(t);return this.textArr.push({text:t,width:s,lastInParagraph:!1})}_getTextWidth(t){const i=this.letterSpacing(),s=t.length;return P2().measureText(t).width+i*s}_setTextData(){let t=this.text().split(`
15
+ `),i=+this.fontSize(),s=0,u=this.lineHeight()*i,c=this.attrs.width,f=this.attrs.height,p=c!==ah&&c!==void 0,m=f!==ah&&f!==void 0,S=this.padding(),b=c-S*2,_=f-S*2,x=0,D=this.wrap(),A=D!==a4,N=D!==kC&&A,R=this.ellipsis();this.textArr=[],P2().font=this._getContextFont();const O=R?this._getTextWidth(L2):0;for(let U=0,j=t.length;U<j;++U){let V=t[U],F=this._getTextWidth(V);if(p&&F>b)for(;V.length>0;){let W=0,st=qo(V).length,$="",tt=0;for(;W<st;){const et=W+st>>>1,Tt=qo(V),it=Tt.slice(0,et+1).join(""),ht=this._getTextWidth(it);(R&&m&&x+u>_?ht+O:ht)<=b?(W=et+1,$=it,tt=ht):st=et}if($){if(N){const it=qo(V),ht=qo($),dt=it[ht.length],nt=dt===U1||dt===W5;let H;if(nt&&tt<=b)H=ht.length;else{const J=ht.lastIndexOf(U1),K=ht.lastIndexOf(W5);H=Math.max(J,K)+1}H>0&&(W=H,$=it.slice(0,W).join(""),tt=this._getTextWidth($))}if($=$.trimRight(),this._addTextLine($),s=Math.max(s,tt),x+=u,this._shouldHandleEllipsis(x)){this._tryToAddEllipsisToLastLine();break}if(V=qo(V).slice(W).join("").trimLeft(),V.length>0&&(F=this._getTextWidth(V),F<=b)){this._addTextLine(V),x+=u,s=Math.max(s,F);break}}else break}else this._addTextLine(V),x+=u,s=Math.max(s,F),this._shouldHandleEllipsis(x)&&U<j-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),m&&x+u>_)break}this.textHeight=i,this.textWidth=s}_shouldHandleEllipsis(t){const i=+this.fontSize(),s=this.lineHeight()*i,u=this.attrs.height,c=u!==ah&&u!==void 0,f=this.padding(),p=u-f*2;return!(this.wrap()!==a4)||c&&t+s>p}_tryToAddEllipsisToLastLine(){const t=this.attrs.width,i=t!==ah&&t!==void 0,s=this.padding(),u=t-s*2,c=this.ellipsis(),f=this.textArr[this.textArr.length-1];!f||!c||(i&&(this._getTextWidth(f.text+L2)<u||(f.text=f.text.slice(0,f.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(f.text+L2))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,i=this.hasShadow();return t&&i?!0:super._useBufferCanvas()}}on.prototype._fillFunc=$C,on.prototype._strokeFunc=t_,on.prototype.className=XC,on.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],Tn(on),G.overWriteSetter(on,"width",T2()),G.overWriteSetter(on,"height",T2()),G.addGetterSetter(on,"direction",I5),G.addGetterSetter(on,"fontFamily","Arial"),G.addGetterSetter(on,"fontSize",12,Dt()),G.addGetterSetter(on,"fontStyle",e4),G.addGetterSetter(on,"fontVariant",e4),G.addGetterSetter(on,"padding",0,Dt()),G.addGetterSetter(on,"align",$5),G.addGetterSetter(on,"verticalAlign",KC),G.addGetterSetter(on,"lineHeight",1,Dt()),G.addGetterSetter(on,"wrap",FC),G.addGetterSetter(on,"ellipsis",!1,ol()),G.addGetterSetter(on,"letterSpacing",0,Dt()),G.addGetterSetter(on,"text","",lc()),G.addGetterSetter(on,"textDecoration",""),G.addGetterSetter(on,"charRenderFunc",void 0);const n_="",s4="normal";function l4(n){n.fillText(this.partialText,0,0)}function r4(n){n.strokeText(this.partialText,0,0)}class ca extends Ct{constructor(t){super(t),this.dummyCanvas=k.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return bs.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const i=this.pathLength;return t>i?null:bs.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=bs.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();const i=this.textDecoration(),s=this.fill(),u=this.fontSize(),c=this.glyphInfo,f=i.indexOf("underline")!==-1,p=i.indexOf("line-through")!==-1;f&&t.beginPath();for(let m=0;m<c.length;m++){t.save();const S=c[m].p0;t.translate(S.x,S.y),t.rotate(c[m].rotation),this.partialText=c[m].text,t.fillStrokeShape(this),f&&(m===0&&t.moveTo(0,u/2+1),t.lineTo(c[m].width,u/2+1)),t.restore()}if(f&&(t.strokeStyle=s,t.lineWidth=u/20,t.stroke()),p){t.beginPath();for(let m=0;m<c.length;m++){t.save();const S=c[m].p0;t.translate(S.x,S.y),t.rotate(c[m].rotation),m===0&&t.moveTo(0,0),t.lineTo(c[m].width,0),t.restore()}t.strokeStyle=s,t.lineWidth=u/20,t.stroke()}t.restore()}_hitFunc(t){t.beginPath();const i=this.glyphInfo;if(i.length>=1){const s=i[0].p0;t.moveTo(s.x,s.y)}for(let s=0;s<i.length;s++){const u=i[s].p1;t.lineTo(u.x,u.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return k.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return on.prototype.setText.call(this,t)}_getContextFont(){return on.prototype._getContextFont.call(this)}_getTextSize(t){const s=this.dummyCanvas.getContext("2d");s.save(),s.font=this._getContextFont();const u=s.measureText(t);return s.restore(),{width:u.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const t=qo(this.text()),i=[];let s=0;for(let _=0;_<t.length;_++)i.push({char:t[_],width:this._getTextSize(t[_]).width}),s+=i[_].width;const{height:u}=this._getTextSize(this.attrs.text);if(this.textWidth=s,this.textHeight=u,this.glyphInfo=[],!this.attrs.data)return null;const c=this.letterSpacing(),f=this.align(),p=this.kerningFunc(),m=Math.max(this.textWidth+((this.attrs.text||"").length-1)*c,0);let S=0;f==="center"&&(S=Math.max(0,this.pathLength/2-m/2)),f==="right"&&(S=Math.max(0,this.pathLength-m));let b=S;for(let _=0;_<i.length;_++){const x=this._getPointAtLength(b);if(!x)return;const D=i[_].char;let A=i[_].width+c;if(D===" "&&f==="justify"){const V=this.text().split(" ").length-1;A+=(this.pathLength-m)/V}const N=this._getPointAtLength(b+A);if(!N)return;const R=bs.getLineLength(x.x,x.y,N.x,N.y);let O=0;if(p)try{O=p(i[_-1].char,D)*this.fontSize()}catch{O=0}x.x+=O,N.x+=O,this.textWidth+=O;const U=bs.getPointOnLine(O+R/2,x.x,x.y,N.x,N.y),j=Math.atan2(N.y-x.y,N.x-x.x);this.glyphInfo.push({transposeX:U.x,transposeY:U.y,text:t[_],rotation:j,p0:x,p1:N,width:R}),b+=A}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const t=[];this.glyphInfo.forEach(function(S){t.push(S.p0.x),t.push(S.p0.y),t.push(S.p1.x),t.push(S.p1.y)});let i=t[0]||0,s=t[0]||0,u=t[1]||0,c=t[1]||0,f,p;for(let S=0;S<t.length/2;S++)f=t[S*2],p=t[S*2+1],i=Math.min(i,f),s=Math.max(s,f),u=Math.min(u,p),c=Math.max(c,p);const m=this.fontSize();return{x:i-m/2,y:u-m/2,width:s-i+m,height:c-u+m}}destroy(){return k.releaseCanvas(this.dummyCanvas),super.destroy()}}ca.prototype._fillFunc=l4,ca.prototype._strokeFunc=r4,ca.prototype._fillFuncHit=l4,ca.prototype._strokeFuncHit=r4,ca.prototype.className="TextPath",ca.prototype._attrsAffectingSize=["text","fontSize","data"],Tn(ca),G.addGetterSetter(ca,"data"),G.addGetterSetter(ca,"fontFamily","Arial"),G.addGetterSetter(ca,"fontSize",12,Dt()),G.addGetterSetter(ca,"fontStyle",s4),G.addGetterSetter(ca,"align","left"),G.addGetterSetter(ca,"letterSpacing",0,Dt()),G.addGetterSetter(ca,"textBaseline","middle"),G.addGetterSetter(ca,"fontVariant",s4),G.addGetterSetter(ca,"text",n_),G.addGetterSetter(ca,"textDecoration",""),G.addGetterSetter(ca,"kerningFunc",void 0);const o4="tr-konva",a_=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(n=>n+`.${o4}`).join(" "),u4="nodesRect",i_=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],s_={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},l_="ontouchstart"in Nt._global;function r_(n,t,i){if(n==="rotater")return i;t+=k.degToRad(s_[n]||0);const s=(k.radToDeg(t)%360+360)%360;return k._inRange(s,315+22.5,360)||k._inRange(s,0,22.5)?"ns-resize":k._inRange(s,45-22.5,45+22.5)?"nesw-resize":k._inRange(s,90-22.5,90+22.5)?"ew-resize":k._inRange(s,135-22.5,135+22.5)?"nwse-resize":k._inRange(s,180-22.5,180+22.5)?"ns-resize":k._inRange(s,225-22.5,225+22.5)?"nesw-resize":k._inRange(s,270-22.5,270+22.5)?"ew-resize":k._inRange(s,315-22.5,315+22.5)?"nwse-resize":(k.error("Transformer has unknown angle for cursor detection: "+s),"pointer")}const V1=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function o_(n){return{x:n.x+n.width/2*Math.cos(n.rotation)+n.height/2*Math.sin(-n.rotation),y:n.y+n.height/2*Math.cos(n.rotation)+n.width/2*Math.sin(n.rotation)}}function c4(n,t,i){const s=i.x+(n.x-i.x)*Math.cos(t)-(n.y-i.y)*Math.sin(t),u=i.y+(n.x-i.x)*Math.sin(t)+(n.y-i.y)*Math.cos(t);return{...n,rotation:n.rotation+t,x:s,y:u}}function u_(n,t){const i=o_(n);return c4(n,t,i)}function c_(n,t,i){let s=t;for(let u=0;u<n.length;u++){const c=Nt.getAngle(n[u]),f=Math.abs(c-t)%(Math.PI*2);Math.min(f,Math.PI*2-f)<i&&(s=c)}return s}let Y2=0;class ye extends th{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(a_,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return k.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return o4+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const i=t.filter(u=>u.isAncestorOf(this)?(k.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=t=i,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(u=>{const c=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(u._attrsAffectingSize.length){const f=u._attrsAffectingSize.map(p=>p+"Change."+this._getEventNamespace()).join(" ");u.on(f,c)}u.on(i_.map(f=>f+`.${this._getEventNamespace()}`).join(" "),c),u.on(`absoluteTransformChange.${this._getEventNamespace()}`,c),this._proxyDrag(u)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let i;t.on(`dragstart.${this._getEventNamespace()}`,s=>{i=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(s,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,s=>{if(!i)return;const u=t.getAbsolutePosition(),c=u.x-i.x,f=u.y-i.y;this.nodes().forEach(p=>{if(p===t||p.isDragging())return;const m=p.getAbsolutePosition();p.setAbsolutePosition({x:m.x+c,y:m.y+f}),p.startDrag(s)}),i=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(u4),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(u4,this.__getNodeRect)}__getNodeShape(t,i=this.rotation(),s){const u=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),c=t.getAbsoluteScale(s),f=t.getAbsolutePosition(s),p=u.x*c.x-t.offsetX()*c.x,m=u.y*c.y-t.offsetY()*c.y,S=(Nt.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),b={x:f.x+p*Math.cos(S)+m*Math.sin(-S),y:f.y+m*Math.cos(S)+p*Math.sin(S),width:u.width*c.x,height:u.height*c.y,rotation:S};return c4(b,-Nt.getAngle(i),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const i=[];this.nodes().map(S=>{const b=S.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),_=[{x:b.x,y:b.y},{x:b.x+b.width,y:b.y},{x:b.x+b.width,y:b.y+b.height},{x:b.x,y:b.y+b.height}],x=S.getAbsoluteTransform();_.forEach(function(D){const A=x.point(D);i.push(A)})});const s=new Ji;s.rotate(-Nt.getAngle(this.rotation()));let u=1/0,c=1/0,f=-1/0,p=-1/0;i.forEach(function(S){const b=s.point(S);u===void 0&&(u=f=b.x,c=p=b.y),u=Math.min(u,b.x),c=Math.min(c,b.y),f=Math.max(f,b.x),p=Math.max(p,b.y)}),s.invert();const m=s.point({x:u,y:c});return{x:m.x,y:m.y,width:f-u,height:p-c,rotation:Nt.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),V1.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){const i=new Fp({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:l_?10:"auto"}),s=this;i.on("mousedown touchstart",function(u){s._handleMouseDown(u)}),i.on("dragstart",u=>{i.stopDrag(),u.cancelBubble=!0}),i.on("dragend",u=>{u.cancelBubble=!0}),i.on("mouseenter",()=>{const u=Nt.getAngle(this.rotation()),c=this.rotateAnchorCursor(),f=r_(t,u,c);i.getStage().content&&(i.getStage().content.style.cursor=f),this._cursorChange=!0}),i.on("mouseout",()=>{i.getStage().content&&(i.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(i)}_createBack(){const t=new Ct({name:"back",width:0,height:0,sceneFunc(i,s){const u=s.getParent(),c=u.padding();i.beginPath(),i.rect(-c,-c,s.width()+c*2,s.height()+c*2),i.moveTo(s.width()/2,-c),u.rotateEnabled()&&u.rotateLineVisible()&&i.lineTo(s.width()/2,-u.rotateAnchorOffset()*k._sign(s.height())-c),i.fillStrokeShape(s)},hitFunc:(i,s)=>{if(!this.shouldOverdrawWholeArea())return;const u=this.padding();i.beginPath(),i.rect(-u,-u,s.width()+u*2,s.height()+u*2),i.fillStrokeShape(s)}});this.add(t),this._proxyDrag(t),t.on("dragstart",i=>{i.cancelBubble=!0}),t.on("dragmove",i=>{i.cancelBubble=!0}),t.on("dragend",i=>{i.cancelBubble=!0}),this.on("dragmove",i=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];const i=this._getNodeRect(),s=i.width,u=i.height,c=Math.sqrt(Math.pow(s,2)+Math.pow(u,2));this.sin=Math.abs(u/c),this.cos=Math.abs(s/c),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const f=t.target.getAbsolutePosition(),p=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:p.x-f.x,y:p.y-f.y},Y2++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(m=>{m._fire("transformstart",{evt:t.evt,target:m})})}_handleMouseMove(t){let i,s,u;const c=this.findOne("."+this._movingAnchorName),f=c.getStage();f.setPointersPositions(t);const p=f.getPointerPosition();let m={x:p.x-this._anchorDragOffset.x,y:p.y-this._anchorDragOffset.y};const S=c.getAbsolutePosition();this.anchorDragBoundFunc()&&(m=this.anchorDragBoundFunc()(S,m,t)),c.setAbsolutePosition(m);const b=c.getAbsolutePosition();if(S.x===b.x&&S.y===b.y)return;if(this._movingAnchorName==="rotater"){const U=this._getNodeRect();i=c.x()-U.width/2,s=-c.y()+U.height/2;let j=Math.atan2(-s,i)+Math.PI/2;U.height<0&&(j-=Math.PI);const F=Nt.getAngle(this.rotation())+j,W=Nt.getAngle(this.rotationSnapTolerance()),$=c_(this.rotationSnaps(),F,W)-U.rotation,tt=u_(U,$);this._fitNodesInto(tt,t);return}const _=this.shiftBehavior();let x;_==="inverted"?x=this.keepRatio()&&!t.shiftKey:_==="none"?x=this.keepRatio():x=this.keepRatio()||t.shiftKey;let D=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};u=Math.sqrt(Math.pow(U.x-c.x(),2)+Math.pow(U.y-c.y(),2));const j=this.findOne(".top-left").x()>U.x?-1:1,V=this.findOne(".top-left").y()>U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".top-left").x(U.x-i),this.findOne(".top-left").y(U.y-s)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(c.y());else if(this._movingAnchorName==="top-right"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};u=Math.sqrt(Math.pow(c.x()-U.x,2)+Math.pow(U.y-c.y(),2));const j=this.findOne(".top-right").x()<U.x?-1:1,V=this.findOne(".top-right").y()>U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".top-right").x(U.x+i),this.findOne(".top-right").y(U.y-s)}var A=c.position();this.findOne(".top-left").y(A.y),this.findOne(".bottom-right").x(A.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(c.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(c.x());else if(this._movingAnchorName==="bottom-left"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};u=Math.sqrt(Math.pow(U.x-c.x(),2)+Math.pow(c.y()-U.y,2));const j=U.x<c.x()?-1:1,V=c.y()<U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,c.x(U.x-i),c.y(U.y+s)}A=c.position(),this.findOne(".top-left").x(A.x),this.findOne(".bottom-right").y(A.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(c.y());else if(this._movingAnchorName==="bottom-right"){if(x){const U=D?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};u=Math.sqrt(Math.pow(c.x()-U.x,2)+Math.pow(c.y()-U.y,2));const j=this.findOne(".bottom-right").x()<U.x?-1:1,V=this.findOne(".bottom-right").y()<U.y?-1:1;i=u*this.cos*j,s=u*this.sin*V,this.findOne(".bottom-right").x(U.x+i),this.findOne(".bottom-right").y(U.y+s)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(D=this.centeredScaling()||t.altKey,D){const U=this.findOne(".top-left"),j=this.findOne(".bottom-right"),V=U.x(),F=U.y(),W=this.getWidth()-j.x(),st=this.getHeight()-j.y();j.move({x:-V,y:-F}),U.move({x:W,y:st})}const N=this.findOne(".top-left").getAbsolutePosition();i=N.x,s=N.y;const R=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),O=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:i,y:s,width:R,height:O,rotation:Nt.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var i;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const s=this.getNode();Y2--,this._fire("transformend",{evt:t,target:s}),(i=this.getLayer())===null||i===void 0||i.batchDraw(),s&&this._nodes.forEach(u=>{var c;u._fire("transformend",{evt:t,target:u}),(c=u.getLayer())===null||c===void 0||c.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,i){const s=this._getNodeRect(),u=1;if(k._inRange(t.width,-this.padding()*2-u,u)){this.update();return}if(k._inRange(t.height,-this.padding()*2-u,u)){this.update();return}const c=new Ji;if(c.rotate(Nt.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const x=c.point({x:-this.padding()*2,y:0});t.x+=x.x,t.y+=x.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const x=c.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const x=c.point({x:0,y:-this.padding()*2});t.x+=x.x,t.y+=x.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const x=c.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=x.x,this._anchorDragOffset.y-=x.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const x=this.boundBoxFunc()(s,t);x?t=x:k.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const f=1e7,p=new Ji;p.translate(s.x,s.y),p.rotate(s.rotation),p.scale(s.width/f,s.height/f);const m=new Ji,S=t.width/f,b=t.height/f;this.flipEnabled()===!1?(m.translate(t.x,t.y),m.rotate(t.rotation),m.translate(t.width<0?t.width:0,t.height<0?t.height:0),m.scale(Math.abs(S),Math.abs(b))):(m.translate(t.x,t.y),m.rotate(t.rotation),m.scale(S,b));const _=m.multiply(p.invert());this._nodes.forEach(x=>{var D;if(!x.getStage())return;const A=x.getParent().getAbsoluteTransform(),N=x.getTransform().copy();N.translate(x.offsetX(),x.offsetY());const R=new Ji;R.multiply(A.copy().invert()).multiply(_).multiply(A).multiply(N);const O=R.decompose();x.setAttrs(O),(D=x.getLayer())===null||D===void 0||D.batchDraw()}),this.rotation(k._getRotation(t.rotation)),this._nodes.forEach(x=>{this._fire("transform",{evt:i,target:x}),x._fire("transform",{evt:i,target:x})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,i){this.findOne(t).setAttrs(i)}update(){var t;const i=this._getNodeRect();this.rotation(k._getRotation(i.rotation));const s=i.width,u=i.height,c=this.enabledAnchors(),f=this.resizeEnabled(),p=this.padding(),m=this.anchorSize(),S=this.find("._anchor");S.forEach(_=>{_.setAttrs({width:m,height:m,offsetX:m/2,offsetY:m/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:m/2+p,offsetY:m/2+p,visible:f&&c.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:s/2,y:0,offsetY:m/2+p,visible:f&&c.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:s,y:0,offsetX:m/2-p,offsetY:m/2+p,visible:f&&c.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:u/2,offsetX:m/2+p,visible:f&&c.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:s,y:u/2,offsetX:m/2-p,visible:f&&c.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:u,offsetX:m/2+p,offsetY:m/2-p,visible:f&&c.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:s/2,y:u,offsetY:m/2-p,visible:f&&c.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:s,y:u,offsetX:m/2-p,offsetY:m/2-p,visible:f&&c.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:s/2,y:-this.rotateAnchorOffset()*k._sign(u)-p,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:s,height:u,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(_=>_.draggable()),x:0,y:0});const b=this.anchorStyleFunc();b&&S.forEach(_=>{b(_)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),th.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Mt.prototype.toObject.call(this)}clone(t){return Mt.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}ye.isTransforming=()=>Y2>0;function f_(n){return n instanceof Array||k.warn("enabledAnchors value should be an array"),n instanceof Array&&n.forEach(function(t){V1.indexOf(t)===-1&&k.warn("Unknown anchor name: "+t+". Available names are: "+V1.join(", "))}),n||[]}ye.prototype.className="Transformer",Tn(ye),G.addGetterSetter(ye,"enabledAnchors",V1,f_),G.addGetterSetter(ye,"flipEnabled",!0,ol()),G.addGetterSetter(ye,"resizeEnabled",!0),G.addGetterSetter(ye,"anchorSize",10,Dt()),G.addGetterSetter(ye,"rotateEnabled",!0),G.addGetterSetter(ye,"rotateLineVisible",!0),G.addGetterSetter(ye,"rotationSnaps",[]),G.addGetterSetter(ye,"rotateAnchorOffset",50,Dt()),G.addGetterSetter(ye,"rotateAnchorCursor","crosshair"),G.addGetterSetter(ye,"rotationSnapTolerance",5,Dt()),G.addGetterSetter(ye,"borderEnabled",!0),G.addGetterSetter(ye,"anchorStroke","rgb(0, 161, 255)"),G.addGetterSetter(ye,"anchorStrokeWidth",1,Dt()),G.addGetterSetter(ye,"anchorFill","white"),G.addGetterSetter(ye,"anchorCornerRadius",0,Dt()),G.addGetterSetter(ye,"borderStroke","rgb(0, 161, 255)"),G.addGetterSetter(ye,"borderStrokeWidth",1,Dt()),G.addGetterSetter(ye,"borderDash"),G.addGetterSetter(ye,"keepRatio",!0),G.addGetterSetter(ye,"shiftBehavior","default"),G.addGetterSetter(ye,"centeredScaling",!1),G.addGetterSetter(ye,"ignoreStroke",!1),G.addGetterSetter(ye,"padding",0,Dt()),G.addGetterSetter(ye,"nodes"),G.addGetterSetter(ye,"node"),G.addGetterSetter(ye,"boundBoxFunc"),G.addGetterSetter(ye,"anchorDragBoundFunc"),G.addGetterSetter(ye,"anchorStyleFunc"),G.addGetterSetter(ye,"shouldOverdrawWholeArea",!1),G.addGetterSetter(ye,"useSingleNodeRotation",!0),G.backCompat(ye,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class wr extends Ct{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,Nt.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}wr.prototype.className="Wedge",wr.prototype._centroid=!0,wr.prototype._attrsAffectingSize=["radius"],Tn(wr),G.addGetterSetter(wr,"radius",0,Dt()),G.addGetterSetter(wr,"angle",0,Dt()),G.addGetterSetter(wr,"clockwise",!1),G.backCompat(wr,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function f4(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const h_=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],d_=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function p_(n,t){const i=n.data,s=n.width,u=n.height;let c,f,p,m,S,b,_,x,D,A,N,R,O,U,j,V,F,W,st,$;const tt=t+t+1,et=s-1,Tt=u-1,it=t+1,ht=it*(it+1)/2,dt=new f4,nt=h_[t],H=d_[t];let J=null,K=dt,mt=null,pt=null;for(let I=1;I<tt;I++)K=K.next=new f4,I===it&&(J=K);K.next=dt,p=f=0;for(let I=0;I<u;I++){R=O=U=j=m=S=b=_=0,x=it*(V=i[f]),D=it*(F=i[f+1]),A=it*(W=i[f+2]),N=it*(st=i[f+3]),m+=ht*V,S+=ht*F,b+=ht*W,_+=ht*st,K=dt;for(let vt=0;vt<it;vt++)K.r=V,K.g=F,K.b=W,K.a=st,K=K.next;for(let vt=1;vt<it;vt++)c=f+((et<vt?et:vt)<<2),m+=(K.r=V=i[c])*($=it-vt),S+=(K.g=F=i[c+1])*$,b+=(K.b=W=i[c+2])*$,_+=(K.a=st=i[c+3])*$,R+=V,O+=F,U+=W,j+=st,K=K.next;mt=dt,pt=J;for(let vt=0;vt<s;vt++)i[f+3]=st=_*nt>>H,st!==0?(st=255/st,i[f]=(m*nt>>H)*st,i[f+1]=(S*nt>>H)*st,i[f+2]=(b*nt>>H)*st):i[f]=i[f+1]=i[f+2]=0,m-=x,S-=D,b-=A,_-=N,x-=mt.r,D-=mt.g,A-=mt.b,N-=mt.a,c=p+((c=vt+t+1)<et?c:et)<<2,R+=mt.r=i[c],O+=mt.g=i[c+1],U+=mt.b=i[c+2],j+=mt.a=i[c+3],m+=R,S+=O,b+=U,_+=j,mt=mt.next,x+=V=pt.r,D+=F=pt.g,A+=W=pt.b,N+=st=pt.a,R-=V,O-=F,U-=W,j-=st,pt=pt.next,f+=4;p+=s}for(let I=0;I<s;I++){O=U=j=R=S=b=_=m=0,f=I<<2,x=it*(V=i[f]),D=it*(F=i[f+1]),A=it*(W=i[f+2]),N=it*(st=i[f+3]),m+=ht*V,S+=ht*F,b+=ht*W,_+=ht*st,K=dt;for(let bt=0;bt<it;bt++)K.r=V,K.g=F,K.b=W,K.a=st,K=K.next;let vt=s;for(let bt=1;bt<=t;bt++)f=vt+I<<2,m+=(K.r=V=i[f])*($=it-bt),S+=(K.g=F=i[f+1])*$,b+=(K.b=W=i[f+2])*$,_+=(K.a=st=i[f+3])*$,R+=V,O+=F,U+=W,j+=st,K=K.next,bt<Tt&&(vt+=s);f=I,mt=dt,pt=J;for(let bt=0;bt<u;bt++)c=f<<2,i[c+3]=st=_*nt>>H,st>0?(st=255/st,i[c]=(m*nt>>H)*st,i[c+1]=(S*nt>>H)*st,i[c+2]=(b*nt>>H)*st):i[c]=i[c+1]=i[c+2]=0,m-=x,S-=D,b-=A,_-=N,x-=mt.r,D-=mt.g,A-=mt.b,N-=mt.a,c=I+((c=bt+it)<Tt?c:Tt)*s<<2,m+=R+=mt.r=i[c],S+=O+=mt.g=i[c+1],b+=U+=mt.b=i[c+2],_+=j+=mt.a=i[c+3],mt=mt.next,x+=V=pt.r,D+=F=pt.g,A+=W=pt.b,N+=st=pt.a,R-=V,O-=F,U-=W,j-=st,pt=pt.next,f+=s}}const m_=function(t){const i=Math.round(this.blurRadius());i>0&&p_(t,i)};G.addGetterSetter(Mt,"blurRadius",0,Dt(),G.afterSetFilter);const g_=function(n){const t=this.brightness()*255,i=n.data,s=i.length;for(let u=0;u<s;u+=4)i[u]+=t,i[u+1]+=t,i[u+2]+=t};G.addGetterSetter(Mt,"brightness",0,Dt(),G.afterSetFilter);const y_=function(n){const t=this.brightness(),i=n.data,s=i.length;for(let u=0;u<s;u+=4)i[u]=Math.min(255,i[u]*t),i[u+1]=Math.min(255,i[u+1]*t),i[u+2]=Math.min(255,i[u+2]*t)},v_=function(n){const t=Math.pow((this.contrast()+100)/100,2),i=n.data,s=i.length;let u=150,c=150,f=150;for(let p=0;p<s;p+=4)u=i[p],c=i[p+1],f=i[p+2],u/=255,u-=.5,u*=t,u+=.5,u*=255,c/=255,c-=.5,c*=t,c+=.5,c*=255,f/=255,f-=.5,f*=t,f+=.5,f*=255,u=u<0?0:u>255?255:u,c=c<0?0:c>255?255:c,f=f<0?0:f>255?255:f,i[p]=u,i[p+1]=c,i[p+2]=f};G.addGetterSetter(Mt,"contrast",0,Dt(),G.afterSetFilter);const S_=function(n){var t,i,s,u,c,f,p,m,S;const b=n.data,_=n.width,x=n.height,D=Math.min(1,Math.max(0,(i=(t=this.embossStrength)===null||t===void 0?void 0:t.call(this))!==null&&i!==void 0?i:.5)),A=Math.min(1,Math.max(0,(u=(s=this.embossWhiteLevel)===null||s===void 0?void 0:s.call(this))!==null&&u!==void 0?u:.5)),R=(p={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[(f=(c=this.embossDirection)===null||c===void 0?void 0:c.call(this))!==null&&f!==void 0?f:"top-left"])!==null&&p!==void 0?p:315,O=!!((S=(m=this.embossBlend)===null||m===void 0?void 0:m.call(this))!==null&&S!==void 0&&S),U=D*10,j=A*255,V=R*Math.PI/180,F=Math.cos(V),W=Math.sin(V),st=128/1020*U,$=new Uint8ClampedArray(b),tt=new Float32Array(_*x);for(let dt=0,nt=0;nt<b.length;nt+=4,dt++)tt[dt]=.2126*$[nt]+.7152*$[nt+1]+.0722*$[nt+2];const et=[-1,0,1,-2,0,2,-1,0,1],Tt=[-1,-2,-1,0,0,0,1,2,1],it=[-_-1,-_,-_+1,-1,0,1,_-1,_,_+1],ht=dt=>dt<0?0:dt>255?255:dt;for(let dt=1;dt<x-1;dt++)for(let nt=1;nt<_-1;nt++){const H=dt*_+nt;let J=0,K=0;J+=tt[H+it[0]]*et[0],K+=tt[H+it[0]]*Tt[0],J+=tt[H+it[1]]*et[1],K+=tt[H+it[1]]*Tt[1],J+=tt[H+it[2]]*et[2],K+=tt[H+it[2]]*Tt[2],J+=tt[H+it[3]]*et[3],K+=tt[H+it[3]]*Tt[3],J+=tt[H+it[5]]*et[5],K+=tt[H+it[5]]*Tt[5],J+=tt[H+it[6]]*et[6],K+=tt[H+it[6]]*Tt[6],J+=tt[H+it[7]]*et[7],K+=tt[H+it[7]]*Tt[7],J+=tt[H+it[8]]*et[8],K+=tt[H+it[8]]*Tt[8];const mt=F*J+W*K,pt=ht(j+mt*st),I=H*4;if(O){const vt=pt-j;b[I]=ht($[I]+vt),b[I+1]=ht($[I+1]+vt),b[I+2]=ht($[I+2]+vt),b[I+3]=$[I+3]}else b[I]=b[I+1]=b[I+2]=pt,b[I+3]=$[I+3]}for(let dt=0;dt<_;dt++){let nt=dt*4,H=((x-1)*_+dt)*4;b[nt]=$[nt],b[nt+1]=$[nt+1],b[nt+2]=$[nt+2],b[nt+3]=$[nt+3],b[H]=$[H],b[H+1]=$[H+1],b[H+2]=$[H+2],b[H+3]=$[H+3]}for(let dt=1;dt<x-1;dt++){let nt=dt*_*4,H=(dt*_+(_-1))*4;b[nt]=$[nt],b[nt+1]=$[nt+1],b[nt+2]=$[nt+2],b[nt+3]=$[nt+3],b[H]=$[H],b[H+1]=$[H+1],b[H+2]=$[H+2],b[H+3]=$[H+3]}return n};G.addGetterSetter(Mt,"embossStrength",.5,Dt(),G.afterSetFilter),G.addGetterSetter(Mt,"embossWhiteLevel",.5,Dt(),G.afterSetFilter),G.addGetterSetter(Mt,"embossDirection","top-left",void 0,G.afterSetFilter),G.addGetterSetter(Mt,"embossBlend",!1,void 0,G.afterSetFilter);function q2(n,t,i,s,u){const c=i-t,f=u-s;if(c===0)return s+f/2;if(f===0)return s;let p=(n-t)/c;return p=f*p+s,p}const b_=function(n){const t=n.data,i=t.length;let s=t[0],u=s,c,f=t[1],p=f,m,S=t[2],b=S,_;const x=this.enhance();if(x===0)return;for(let j=0;j<i;j+=4)c=t[j+0],c<s?s=c:c>u&&(u=c),m=t[j+1],m<f?f=m:m>p&&(p=m),_=t[j+2],_<S?S=_:_>b&&(b=_);u===s&&(u=255,s=0),p===f&&(p=255,f=0),b===S&&(b=255,S=0);let D,A,N,R,O,U;if(x>0)D=u+x*(255-u),A=s-x*(s-0),N=p+x*(255-p),R=f-x*(f-0),O=b+x*(255-b),U=S-x*(S-0);else{const j=(u+s)*.5;D=u+x*(u-j),A=s+x*(s-j);const V=(p+f)*.5;N=p+x*(p-V),R=f+x*(f-V);const F=(b+S)*.5;O=b+x*(b-F),U=S+x*(S-F)}for(let j=0;j<i;j+=4)t[j+0]=q2(t[j+0],s,u,A,D),t[j+1]=q2(t[j+1],f,p,R,N),t[j+2]=q2(t[j+2],S,b,U,O)};G.addGetterSetter(Mt,"enhance",0,Dt(),G.afterSetFilter);const E_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4){const u=.34*t[s]+.5*t[s+1]+.16*t[s+2];t[s]=u,t[s+1]=u,t[s+2]=u}};G.addGetterSetter(Mt,"hue",0,Dt(),G.afterSetFilter),G.addGetterSetter(Mt,"saturation",0,Dt(),G.afterSetFilter),G.addGetterSetter(Mt,"luminance",0,Dt(),G.afterSetFilter);const T_=function(n){const t=n.data,i=t.length,s=1,u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=this.luminance()*127,p=s*u*Math.cos(c*Math.PI/180),m=s*u*Math.sin(c*Math.PI/180),S=.299*s+.701*p+.167*m,b=.587*s-.587*p+.33*m,_=.114*s-.114*p-.497*m,x=.299*s-.299*p-.328*m,D=.587*s+.413*p+.035*m,A=.114*s-.114*p+.293*m,N=.299*s-.3*p+1.25*m,R=.587*s-.586*p-1.05*m,O=.114*s+.886*p-.2*m;let U,j,V,F;for(let W=0;W<i;W+=4)U=t[W+0],j=t[W+1],V=t[W+2],F=t[W+3],t[W+0]=S*U+b*j+_*V+f,t[W+1]=x*U+D*j+A*V+f,t[W+2]=N*U+R*j+O*V+f,t[W+3]=F},C_=function(n){const t=n.data,i=t.length,s=Math.pow(2,this.value()),u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=s*u*Math.cos(c*Math.PI/180),p=s*u*Math.sin(c*Math.PI/180),m=.299*s+.701*f+.167*p,S=.587*s-.587*f+.33*p,b=.114*s-.114*f-.497*p,_=.299*s-.299*f-.328*p,x=.587*s+.413*f+.035*p,D=.114*s-.114*f+.293*p,A=.299*s-.3*f+1.25*p,N=.587*s-.586*f-1.05*p,R=.114*s+.886*f-.2*p;for(let O=0;O<i;O+=4){const U=t[O+0],j=t[O+1],V=t[O+2],F=t[O+3];t[O+0]=m*U+S*j+b*V,t[O+1]=_*U+x*j+D*V,t[O+2]=A*U+N*j+R*V,t[O+3]=F}};G.addGetterSetter(Mt,"hue",0,Dt(),G.afterSetFilter),G.addGetterSetter(Mt,"saturation",0,Dt(),G.afterSetFilter),G.addGetterSetter(Mt,"value",0,Dt(),G.afterSetFilter);const __=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4)t[s]=255-t[s],t[s+1]=255-t[s+1],t[s+2]=255-t[s+2]},x_=function(n,t,i){const s=n.data,u=t.data,c=n.width,f=n.height,p=i.polarCenterX||c/2,m=i.polarCenterY||f/2;let S=Math.sqrt(p*p+m*m),b=c-p,_=f-m;const x=Math.sqrt(b*b+_*_);S=x>S?x:S;const D=f,A=c,N=360/A*Math.PI/180;for(let R=0;R<A;R+=1){const O=Math.sin(R*N),U=Math.cos(R*N);for(let j=0;j<D;j+=1){b=Math.floor(p+S*j/D*U),_=Math.floor(m+S*j/D*O);let V=(_*c+b)*4;const F=s[V+0],W=s[V+1],st=s[V+2],$=s[V+3];V=(R+j*c)*4,u[V+0]=F,u[V+1]=W,u[V+2]=st,u[V+3]=$}}},D_=function(n,t,i){const s=n.data,u=t.data,c=n.width,f=n.height,p=i.polarCenterX||c/2,m=i.polarCenterY||f/2;let S=Math.sqrt(p*p+m*m),b=c-p,_=f-m;const x=Math.sqrt(b*b+_*_);S=x>S?x:S;const D=f,A=c,N=0;let R,O;for(b=0;b<c;b+=1)for(_=0;_<f;_+=1){const U=b-p,j=_-m,V=Math.sqrt(U*U+j*j)*D/S;let F=(Math.atan2(j,U)*180/Math.PI+360+N)%360;F=F*A/360,R=Math.floor(F),O=Math.floor(V);let W=(O*c+R)*4;const st=s[W+0],$=s[W+1],tt=s[W+2],et=s[W+3];W=(_*c+b)*4,u[W+0]=st,u[W+1]=$,u[W+2]=tt,u[W+3]=et}},A_=function(n){const t=n.width,i=n.height;let s,u,c,f,p,m,S,b,_,x,D=Math.round(this.kaleidoscopePower());const A=Math.round(this.kaleidoscopeAngle()),N=Math.floor(t*(A%360)/360);if(D<1)return;const R=k.createCanvasElement();R.width=t,R.height=i;const O=R.getContext("2d").getImageData(0,0,t,i);k.releaseCanvas(R),x_(n,O,{polarCenterX:t/2,polarCenterY:i/2});let U=t/Math.pow(2,D);for(;U<=8;)U=U*2,D-=1;U=Math.ceil(U);let j=U,V=0,F=j,W=1;for(N+U>t&&(V=j,F=0,W=-1),u=0;u<i;u+=1)for(s=V;s!==F;s+=W)c=Math.round(s+N)%t,_=(t*u+c)*4,p=O.data[_+0],m=O.data[_+1],S=O.data[_+2],b=O.data[_+3],x=(t*u+s)*4,O.data[x+0]=p,O.data[x+1]=m,O.data[x+2]=S,O.data[x+3]=b;for(u=0;u<i;u+=1)for(j=Math.floor(U),f=0;f<D;f+=1){for(s=0;s<j+1;s+=1)_=(t*u+s)*4,p=O.data[_+0],m=O.data[_+1],S=O.data[_+2],b=O.data[_+3],x=(t*u+j*2-s-1)*4,O.data[x+0]=p,O.data[x+1]=m,O.data[x+2]=S,O.data[x+3]=b;j*=2}D_(O,n,{})};G.addGetterSetter(Mt,"kaleidoscopePower",2,Dt(),G.afterSetFilter),G.addGetterSetter(Mt,"kaleidoscopeAngle",0,Dt(),G.afterSetFilter);function G1(n,t,i){let s=(i*n.width+t)*4;const u=[];return u.push(n.data[s++],n.data[s++],n.data[s++],n.data[s++]),u}function Ip(n,t){return Math.sqrt(Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2))}function M_(n){const t=[0,0,0];for(let i=0;i<n.length;i++)t[0]+=n[i][0],t[1]+=n[i][1],t[2]+=n[i][2];return t[0]/=n.length,t[1]/=n.length,t[2]/=n.length,t}function N_(n,t){const i=G1(n,0,0),s=G1(n,n.width-1,0),u=G1(n,0,n.height-1),c=G1(n,n.width-1,n.height-1),f=t||10;if(Ip(i,s)<f&&Ip(s,c)<f&&Ip(c,u)<f&&Ip(u,i)<f){const p=M_([s,i,c,u]),m=[];for(let S=0;S<n.width*n.height;S++){const b=Ip(p,[n.data[S*4],n.data[S*4+1],n.data[S*4+2]]);m[S]=b<f?0:255}return m}}function O_(n,t){for(let i=0;i<n.width*n.height;i++)n.data[4*i+3]=t[i]}function R_(n,t,i){const s=[1,1,1,1,0,1,1,1,1],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b===2040?255:0}return f}function z_(n,t,i){const s=[1,1,1,1,1,1,1,1,1],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b>=1020?255:0}return f}function H_(n,t,i){const s=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],u=Math.round(Math.sqrt(s.length)),c=Math.floor(u/2),f=[];for(let p=0;p<i;p++)for(let m=0;m<t;m++){const S=p*t+m;let b=0;for(let _=0;_<u;_++)for(let x=0;x<u;x++){const D=p+_-c,A=m+x-c;if(D>=0&&D<i&&A>=0&&A<t){const N=D*t+A,R=s[_*u+x];b+=n[N]*R}}f[S]=b}return f}const w_=function(n){const t=this.threshold();let i=N_(n,t);return i&&(i=R_(i,n.width,n.height),i=z_(i,n.width,n.height),i=H_(i,n.width,n.height),O_(n,i)),n};G.addGetterSetter(Mt,"threshold",0,Dt(),G.afterSetFilter);const U_=function(n){const t=this.noise()*255,i=n.data,s=i.length,u=t/2;for(let c=0;c<s;c+=4)i[c+0]+=u-2*u*Math.random(),i[c+1]+=u-2*u*Math.random(),i[c+2]+=u-2*u*Math.random()};G.addGetterSetter(Mt,"noise",.2,Dt(),G.afterSetFilter);const B_=function(n){let t=Math.ceil(this.pixelSize()),i=n.width,s=n.height,u=Math.ceil(i/t),c=Math.ceil(s/t),f=n.data;if(t<=0){k.error("pixelSize value can not be <= 0");return}for(let p=0;p<u;p+=1)for(let m=0;m<c;m+=1){let S=0,b=0,_=0,x=0;const D=p*t,A=D+t,N=m*t,R=N+t;let O=0;for(let U=D;U<A;U+=1)if(!(U>=i))for(let j=N;j<R;j+=1){if(j>=s)continue;const V=(i*j+U)*4;S+=f[V+0],b+=f[V+1],_+=f[V+2],x+=f[V+3],O+=1}S=S/O,b=b/O,_=_/O,x=x/O;for(let U=D;U<A;U+=1)if(!(U>=i))for(let j=N;j<R;j+=1){if(j>=s)continue;const V=(i*j+U)*4;f[V+0]=S,f[V+1]=b,f[V+2]=_,f[V+3]=x}}};G.addGetterSetter(Mt,"pixelSize",8,Dt(),G.afterSetFilter);const V_=function(n){const t=Math.round(this.levels()*254)+1,i=n.data,s=i.length,u=255/t;for(let c=0;c<s;c+=1)i[c]=Math.floor(i[c]/u)*u};G.addGetterSetter(Mt,"levels",.5,Dt(),G.afterSetFilter);const G_=function(n){const t=n.data,i=t.length,s=this.red(),u=this.green(),c=this.blue();for(let f=0;f<i;f+=4){const p=(.34*t[f]+.5*t[f+1]+.16*t[f+2])/255;t[f]=p*s,t[f+1]=p*u,t[f+2]=p*c,t[f+3]=t[f+3]}};G.addGetterSetter(Mt,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Mt,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Mt,"blue",0,m5,G.afterSetFilter);const j_=function(n){const t=n.data,i=t.length,s=this.red(),u=this.green(),c=this.blue(),f=this.alpha();for(let p=0;p<i;p+=4){const m=1-f;t[p]=s*f+t[p]*m,t[p+1]=u*f+t[p+1]*m,t[p+2]=c*f+t[p+2]*m}};G.addGetterSetter(Mt,"red",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Mt,"green",0,function(n){return this._filterUpToDate=!1,n>255?255:n<0?0:Math.round(n)}),G.addGetterSetter(Mt,"blue",0,m5,G.afterSetFilter),G.addGetterSetter(Mt,"alpha",1,function(n){return this._filterUpToDate=!1,n>1?1:n<0?0:n});const L_=function(n){const t=n.data,i=t.length;for(let s=0;s<i;s+=4){const u=t[s+0],c=t[s+1],f=t[s+2];t[s+0]=Math.min(255,u*.393+c*.769+f*.189),t[s+1]=Math.min(255,u*.349+c*.686+f*.168),t[s+2]=Math.min(255,u*.272+c*.534+f*.131)}},P_=function(n){const i=n.data;for(let s=0;s<i.length;s+=4){const u=i[s],c=i[s+1],f=i[s+2];.2126*u+.7152*c+.0722*f>=128&&(i[s]=255-u,i[s+1]=255-c,i[s+2]=255-f)}return n},Y_=function(n){const t=this.threshold()*255,i=n.data,s=i.length;for(let u=0;u<s;u+=1)i[u]=i[u]<t?0:255};G.addGetterSetter(Mt,"threshold",.5,Dt(),G.afterSetFilter),eh.Util._assign(eh,{Arc:zr,Arrow:uc,Circle:nh,Ellipse:Lo,Image:ul,Label:j2,Tag:cc,Line:Hr,Path:bs,Rect:Fp,RegularPolygon:Po,Ring:fc,Sprite:Fl,Star:Yo,Text:on,TextPath:ca,Transformer:ye,Wedge:wr,Filters:{Blur:m_,Brightness:y_,Brighten:g_,Contrast:v_,Emboss:S_,Enhance:b_,Grayscale:E_,HSL:T_,HSV:C_,Invert:__,Kaleidoscope:A_,Mask:w_,Noise:U_,Pixelate:B_,Posterize:V_,RGB:G_,RGBA:j_,Sepia:L_,Solarize:P_,Threshold:Y_}});function X2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var j1={exports:{}},K2={exports:{}},L1={exports:{}},Q2={};var h4;function q_(){return h4||(h4=1,(function(n){function t(H,J){var K=H.length;H.push(J);t:for(;0<K;){var mt=K-1>>>1,pt=H[mt];if(0<u(pt,J))H[mt]=J,H[K]=pt,K=mt;else break t}}function i(H){return H.length===0?null:H[0]}function s(H){if(H.length===0)return null;var J=H[0],K=H.pop();if(K!==J){H[0]=K;t:for(var mt=0,pt=H.length,I=pt>>>1;mt<I;){var vt=2*(mt+1)-1,bt=H[vt],jt=vt+1,pe=H[jt];if(0>u(bt,K))jt<pt&&0>u(pe,bt)?(H[mt]=pe,H[jt]=K,mt=jt):(H[mt]=bt,H[vt]=K,mt=vt);else if(jt<pt&&0>u(pe,K))H[mt]=pe,H[jt]=K,mt=jt;else break t}}return J}function u(H,J){var K=H.sortIndex-J.sortIndex;return K!==0?K:H.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var m=[],S=[],b=1,_=null,x=3,D=!1,A=!1,N=!1,R=!1,O=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function V(H){for(var J=i(S);J!==null;){if(J.callback===null)s(S);else if(J.startTime<=H)s(S),J.sortIndex=J.expirationTime,t(m,J);else break;J=i(S)}}function F(H){if(N=!1,V(H),!A)if(i(m)!==null)A=!0,W||(W=!0,it());else{var J=i(S);J!==null&&nt(F,J.startTime-H)}}var W=!1,st=-1,$=5,tt=-1;function et(){return R?!0:!(n.unstable_now()-tt<$)}function Tt(){if(R=!1,W){var H=n.unstable_now();tt=H;var J=!0;try{t:{A=!1,N&&(N=!1,U(st),st=-1),D=!0;var K=x;try{e:{for(V(H),_=i(m);_!==null&&!(_.expirationTime>H&&et());){var mt=_.callback;if(typeof mt=="function"){_.callback=null,x=_.priorityLevel;var pt=mt(_.expirationTime<=H);if(H=n.unstable_now(),typeof pt=="function"){_.callback=pt,V(H),J=!0;break e}_===i(m)&&s(m),V(H)}else s(m);_=i(m)}if(_!==null)J=!0;else{var I=i(S);I!==null&&nt(F,I.startTime-H),J=!1}}break t}finally{_=null,x=K,D=!1}J=void 0}}finally{J?it():W=!1}}}var it;if(typeof j=="function")it=function(){j(Tt)};else if(typeof MessageChannel<"u"){var ht=new MessageChannel,dt=ht.port2;ht.port1.onmessage=Tt,it=function(){dt.postMessage(null)}}else it=function(){O(Tt,0)};function nt(H,J){st=O(function(){H(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(H){switch(x){case 1:case 2:case 3:var J=3;break;default:J=x}var K=x;x=J;try{return H()}finally{x=K}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(H,J){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var K=x;x=H;try{return J()}finally{x=K}},n.unstable_scheduleCallback=function(H,J,K){var mt=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?mt+K:mt):K=mt,H){case 1:var pt=-1;break;case 2:pt=250;break;case 5:pt=1073741823;break;case 4:pt=1e4;break;default:pt=5e3}return pt=K+pt,H={id:b++,callback:J,priorityLevel:H,startTime:K,expirationTime:pt,sortIndex:-1},K>mt?(H.sortIndex=K,t(S,H),i(m)===null&&H===i(S)&&(N?(U(st),st=-1):N=!0,nt(F,K-mt))):(H.sortIndex=pt,t(m,H),A||D||(A=!0,W||(W=!0,it()))),H},n.unstable_shouldYield=et,n.unstable_wrapCallback=function(H){var J=x;return function(){var K=x;x=J;try{return H.apply(this,arguments)}finally{x=K}}}})(Q2)),Q2}var Z2={};var d4;function X_(){return d4||(d4=1,(function(n){process.env.NODE_ENV!=="production"&&(function(){function t(){if(F=!1,tt){var H=n.unstable_now();it=H;var J=!0;try{t:{j=!1,V&&(V=!1,st(et),et=-1),U=!0;var K=O;try{e:{for(f(H),R=s(D);R!==null&&!(R.expirationTime>H&&m());){var mt=R.callback;if(typeof mt=="function"){R.callback=null,O=R.priorityLevel;var pt=mt(R.expirationTime<=H);if(H=n.unstable_now(),typeof pt=="function"){R.callback=pt,f(H),J=!0;break e}R===s(D)&&u(D),f(H)}else u(D);R=s(D)}if(R!==null)J=!0;else{var I=s(A);I!==null&&S(p,I.startTime-H),J=!1}}break t}finally{R=null,O=K,U=!1}J=void 0}}finally{J?ht():tt=!1}}}function i(H,J){var K=H.length;H.push(J);t:for(;0<K;){var mt=K-1>>>1,pt=H[mt];if(0<c(pt,J))H[mt]=J,H[K]=pt,K=mt;else break t}}function s(H){return H.length===0?null:H[0]}function u(H){if(H.length===0)return null;var J=H[0],K=H.pop();if(K!==J){H[0]=K;t:for(var mt=0,pt=H.length,I=pt>>>1;mt<I;){var vt=2*(mt+1)-1,bt=H[vt],jt=vt+1,pe=H[jt];if(0>c(bt,K))jt<pt&&0>c(pe,bt)?(H[mt]=pe,H[jt]=K,mt=jt):(H[mt]=bt,H[vt]=K,mt=vt);else if(jt<pt&&0>c(pe,K))H[mt]=pe,H[jt]=K,mt=jt;else break t}}return J}function c(H,J){var K=H.sortIndex-J.sortIndex;return K!==0?K:H.id-J.id}function f(H){for(var J=s(A);J!==null;){if(J.callback===null)u(A);else if(J.startTime<=H)u(A),J.sortIndex=J.expirationTime,i(D,J);else break;J=s(A)}}function p(H){if(V=!1,f(H),!j)if(s(D)!==null)j=!0,tt||(tt=!0,ht());else{var J=s(A);J!==null&&S(p,J.startTime-H)}}function m(){return F?!0:!(n.unstable_now()-it<Tt)}function S(H,J){et=W(function(){H(n.unstable_now())},J)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;n.unstable_now=function(){return b.now()}}else{var _=Date,x=_.now();n.unstable_now=function(){return _.now()-x}}var D=[],A=[],N=1,R=null,O=3,U=!1,j=!1,V=!1,F=!1,W=typeof setTimeout=="function"?setTimeout:null,st=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null,tt=!1,et=-1,Tt=5,it=-1;if(typeof $=="function")var ht=function(){$(t)};else if(typeof MessageChannel<"u"){var dt=new MessageChannel,nt=dt.port2;dt.port1.onmessage=t,ht=function(){nt.postMessage(null)}}else ht=function(){W(t,0)};n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Tt=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return O},n.unstable_next=function(H){switch(O){case 1:case 2:case 3:var J=3;break;default:J=O}var K=O;O=J;try{return H()}finally{O=K}},n.unstable_requestPaint=function(){F=!0},n.unstable_runWithPriority=function(H,J){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var K=O;O=H;try{return J()}finally{O=K}},n.unstable_scheduleCallback=function(H,J,K){var mt=n.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?mt+K:mt):K=mt,H){case 1:var pt=-1;break;case 2:pt=250;break;case 5:pt=1073741823;break;case 4:pt=1e4;break;default:pt=5e3}return pt=K+pt,H={id:N++,callback:J,priorityLevel:H,startTime:K,expirationTime:pt,sortIndex:-1},K>mt?(H.sortIndex=K,i(A,H),s(D)===null&&H===s(A)&&(V?(st(et),et=-1):V=!0,S(p,K-mt))):(H.sortIndex=pt,i(D,H),j||U||(j=!0,tt||(tt=!0,ht()))),H},n.unstable_shouldYield=m,n.unstable_wrapCallback=function(H){var J=O;return function(){var K=O;O=J;try{return H.apply(this,arguments)}finally{O=K}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Z2)),Z2}var p4;function J2(){return p4||(p4=1,process.env.NODE_ENV==="production"?L1.exports=q_():L1.exports=X_()),L1.exports}var m4;function K_(){return m4||(m4=1,(function(n){n.exports=function(t){function i(l,r,h,g){return new yd(l,r,h,g)}function s(){}function u(l){var r="https://react.dev/errors/"+l;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)r+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+l+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(l){var r=l,h=l;if(l.alternate)for(;r.return;)r=r.return;else{l=r;do r=l,(r.flags&4098)!==0&&(h=r.return),l=r.return;while(l)}return r.tag===3?h:null}function f(l){if(c(l)!==l)throw Error(u(188))}function p(l){var r=l.alternate;if(!r){if(r=c(l),r===null)throw Error(u(188));return r!==l?null:l}for(var h=l,g=r;;){var E=h.return;if(E===null)break;var T=E.alternate;if(T===null){if(g=E.return,g!==null){h=g;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===h)return f(E),l;if(T===g)return f(E),r;T=T.sibling}throw Error(u(188))}if(h.return!==g.return)h=E,g=T;else{for(var z=!1,L=E.child;L;){if(L===h){z=!0,h=E,g=T;break}if(L===g){z=!0,g=E,h=T;break}L=L.sibling}if(!z){for(L=T.child;L;){if(L===h){z=!0,h=T,g=E;break}if(L===g){z=!0,g=T,h=E;break}L=L.sibling}if(!z)throw Error(u(189))}}if(h.alternate!==g)throw Error(u(190))}if(h.tag!==3)throw Error(u(188));return h.stateNode.current===h?l:r}function m(l){var r=l.tag;if(r===5||r===26||r===27||r===6)return l;for(l=l.child;l!==null;){if(r=m(l),r!==null)return r;l=l.sibling}return null}function S(l){var r=l.tag;if(r===5||r===26||r===27||r===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(r=S(l),r!==null))return r;l=l.sibling}return null}function b(l){return l===null||typeof l!="object"?null:(l=vm&&l[vm]||l["@@iterator"],typeof l=="function"?l:null)}function _(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===Sm?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case io:return"Fragment";case df:return"Profiler";case gm:return"StrictMode";case so:return"Suspense";case we:return"SuspenseList";case _d:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case fr:return"Portal";case Rl:return l.displayName||"Context";case Cd:return(l._context.displayName||"Context")+".Consumer";case Eu:var r=l.render;return l=l.displayName,l||(l=r.displayName||r.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case ym:return r=l.displayName||null,r!==null?r:_(l.type)||"Memo";case hr:r=l._payload,l=l._init;try{return _(l(r))}catch{}}return null}function x(l){return{current:l}}function D(l){0>Au||(l.current=Tf[Au],Tf[Au]=null,Au--)}function A(l,r){Au++,Tf[Au]=l.current,l.current=r}function N(l){return l>>>=0,l===0?32:31-(My(l)/Ny|0)|0}function R(l){var r=l&42;if(r!==0)return r;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function O(l,r,h){var g=l.pendingLanes;if(g===0)return 0;var E=0,T=l.suspendedLanes,z=l.pingedLanes;l=l.warmLanes;var L=g&134217727;return L!==0?(g=L&~T,g!==0?E=R(g):(z&=L,z!==0?E=R(z):h||(h=L&~l,h!==0&&(E=R(h))))):(L=g&~T,L!==0?E=R(L):z!==0?E=R(z):h||(h=g&~l,h!==0&&(E=R(h)))),E===0?0:r!==0&&r!==E&&(r&T)===0&&(T=E&-E,h=r&-r,T>=h||T===32&&(h&4194048)!==0)?r:E}function U(l,r){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&r)===0}function j(l,r){switch(l){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 V(){var l=Mu;return Mu<<=1,(Mu&62914560)===0&&(Mu=4194304),l}function F(l){for(var r=[],h=0;31>h;h++)r.push(l);return r}function W(l,r){l.pendingLanes|=r,r!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function st(l,r,h,g,E,T){var z=l.pendingLanes;l.pendingLanes=h,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=h,l.entangledLanes&=h,l.errorRecoveryDisabledLanes&=h,l.shellSuspendCounter=0;var L=l.entanglements,ct=l.expirationTimes,St=l.hiddenUpdates;for(h=z&~h;0<h;){var At=31-li(h),xt=1<<At;L[At]=0,ct[At]=-1;var Ot=St[At];if(Ot!==null)for(St[At]=null,At=0;At<Ot.length;At++){var Yt=Ot[At];Yt!==null&&(Yt.lane&=-536870913)}h&=~xt}g!==0&&$(l,g,0),T!==0&&E===0&&l.tag!==0&&(l.suspendedLanes|=T&~(z&~r))}function $(l,r,h){l.pendingLanes|=r,l.suspendedLanes&=~r;var g=31-li(r);l.entangledLanes|=r,l.entanglements[g]=l.entanglements[g]|1073741824|h&261930}function tt(l,r){var h=l.entangledLanes|=r;for(l=l.entanglements;h;){var g=31-li(h),E=1<<g;E&r|l[g]&r&&(l[g]|=r),h&=~E}}function et(l,r){var h=r&-r;return h=(h&42)!==0?1:Tt(h),(h&(l.suspendedLanes|r))!==0?0:h}function Tt(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function it(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function ht(l){if(typeof Ld=="function"&&Um(l),Rn&&typeof Rn.setStrictMode=="function")try{Rn.setStrictMode(po,l)}catch{}}function dt(l,r){return l===r&&(l!==0||1/l===1/r)||l!==l&&r!==r}function nt(l){if(Ou===void 0)try{throw Error()}catch(h){var r=h.stack.trim().match(/\n( *(at )?)/);Ou=r&&r[1]||"",oi=-1<h.stack.indexOf(`
16
16
  at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
17
- `+zu+l+li}function w(l,r){if(!l||Cf)return"";Cf=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(r){var xt=function(){throw Error()};if(Object.defineProperty(xt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xt,[])}catch(Yt){var Rt=Yt}Reflect.construct(l,[],xt)}else{try{xt.call()}catch(Yt){Rt=Yt}l.call(xt.prototype)}}else{try{throw Error()}catch(Yt){Rt=Yt}(xt=l())&&typeof xt.catch=="function"&&xt.catch(function(){})}}catch(Yt){if(Yt&&Rt&&typeof Yt.stack=="string")return[Yt.stack,Rt.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=g.DetermineComponentFrameRoot(),z=T[0],L=T[1];if(z&&L){var ft=z.split(`
18
- `),vt=L.split(`
19
- `);for(E=g=0;g<ft.length&&!ft[g].includes("DetermineComponentFrameRoot");)g++;for(;E<vt.length&&!vt[E].includes("DetermineComponentFrameRoot");)E++;if(g===ft.length||E===vt.length)for(g=ft.length-1,E=vt.length-1;1<=g&&0<=E&&ft[g]!==vt[E];)E--;for(;1<=g&&0<=E;g--,E--)if(ft[g]!==vt[E]){if(g!==1||E!==1)do if(g--,E--,0>E||ft[g]!==vt[E]){var Mt=`
20
- `+ft[g].replace(" at new "," at ");return l.displayName&&Mt.includes("<anonymous>")&&(Mt=Mt.replace("<anonymous>",l.displayName)),Mt}while(1<=g&&0<=E);break}}}finally{Cf=!1,Error.prepareStackTrace=h}return(h=l?l.displayName||l.name:"")?tt(h):""}function Z(l,r){switch(l.tag){case 26:case 27:case 5:return tt(l.type);case 16:return tt("Lazy");case 13:return l.child!==r&&r!==null?tt("Suspense Fallback"):tt("Suspense");case 19:return tt("SuspenseList");case 0:case 15:return w(l.type,!1);case 11:return w(l.type.render,!1);case 1:return w(l.type,!0);case 31:return tt("Activity");default:return""}}function K(l){try{var r="",h=null;do r+=Z(l,h),h=l,l=l.return;while(l);return r}catch(g){return`
17
+ `+Ou+l+oi}function H(l,r){if(!l||xf)return"";xf=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(r){var xt=function(){throw Error()};if(Object.defineProperty(xt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xt,[])}catch(Yt){var Ot=Yt}Reflect.construct(l,[],xt)}else{try{xt.call()}catch(Yt){Ot=Yt}l.call(xt.prototype)}}else{try{throw Error()}catch(Yt){Ot=Yt}(xt=l())&&typeof xt.catch=="function"&&xt.catch(function(){})}}catch(Yt){if(Yt&&Ot&&typeof Yt.stack=="string")return[Yt.stack,Ot.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=g.DetermineComponentFrameRoot(),z=T[0],L=T[1];if(z&&L){var ct=z.split(`
18
+ `),St=L.split(`
19
+ `);for(E=g=0;g<ct.length&&!ct[g].includes("DetermineComponentFrameRoot");)g++;for(;E<St.length&&!St[E].includes("DetermineComponentFrameRoot");)E++;if(g===ct.length||E===St.length)for(g=ct.length-1,E=St.length-1;1<=g&&0<=E&&ct[g]!==St[E];)E--;for(;1<=g&&0<=E;g--,E--)if(ct[g]!==St[E]){if(g!==1||E!==1)do if(g--,E--,0>E||ct[g]!==St[E]){var At=`
20
+ `+ct[g].replace(" at new "," at ");return l.displayName&&At.includes("<anonymous>")&&(At=At.replace("<anonymous>",l.displayName)),At}while(1<=g&&0<=E);break}}}finally{xf=!1,Error.prepareStackTrace=h}return(h=l?l.displayName||l.name:"")?nt(h):""}function J(l,r){switch(l.tag){case 26:case 27:case 5:return nt(l.type);case 16:return nt("Lazy");case 13:return l.child!==r&&r!==null?nt("Suspense Fallback"):nt("Suspense");case 19:return nt("SuspenseList");case 0:case 15:return H(l.type,!1);case 11:return H(l.type.render,!1);case 1:return H(l.type,!0);case 31:return nt("Activity");default:return""}}function K(l){try{var r="",h=null;do r+=J(l,h),h=l,l=l.return;while(l);return r}catch(g){return`
21
21
  Error generating stack: `+g.message+`
22
- `+g.stack}}function at(l,r){if(typeof l=="object"&&l!==null){var h=Ry.get(l);return h!==void 0?h:(r={value:l,source:r,stack:K(r)},Ry.set(l,r),r)}return{value:l,source:r,stack:K(r)}}function St(l,r){mo[Hu++]=rt,mo[Hu++]=Pn,Pn=l,rt=r}function W(l,r,h){Ui[Bi++]=Xa,Ui[Bi++]=qs,Ui[Bi++]=Hl,Hl=l;var g=Xa;l=qs;var E=32-ii(g)-1;g&=~(1<<E),h+=1;var T=32-ii(r)+E;if(30<T){var z=E-E%5;T=(g&(1<<z)-1).toString(32),g>>=z,E-=z,Xa=1<<32-ii(r)+E|h<<E|g,qs=T+l}else Xa=1<<T|h<<E|g,qs=l}function gt(l){l.return!==null&&(St(l,1),W(l,1,0))}function Tt(l){for(;l===Pn;)Pn=mo[--Hu],mo[Hu]=null,rt=mo[--Hu],mo[Hu]=null;for(;l===Hl;)Hl=Ui[--Bi],Ui[Bi]=null,qs=Ui[--Bi],Ui[Bi]=null,Xa=Ui[--Bi],Ui[Bi]=null}function Pt(l,r){Ui[Bi++]=Xa,Ui[Bi++]=qs,Ui[Bi++]=Hl,Xa=r.id,qs=r.overflow,Hl=l}function le(l,r){A(dr,r),A(_f,l),A(ba,null),l=n3(r),D(ba),A(ba,l)}function xn(){D(ba),D(_f),D(dr)}function xe(l){l.memoizedState!==null&&A(Ld,l);var r=ba.current,h=Yg(r,l.type);r!==h&&(A(_f,l),A(ba,h))}function Dn(l){_f.current===l&&(D(ba),D(_f)),Ld.current===l&&(D(Ld),Hi?fr._currentValue=qa:fr._currentValue2=qa)}function ln(l){var r=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw An(at(r,l)),Bm}function Be(l,r){if(!ya)throw Error(u(175));Du(l.stateNode,l.type,l.memoizedProps,r,l)||ln(l,!0)}function At(l){for(Fn=l.return;Fn;)switch(Fn.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:Fn=Fn.return}}function ue(l){if(!ya||l!==Fn)return!1;if(!se)return At(l),se=!0,!1;var r=l.tag;if(Ln?r!==3&&r!==27&&(r!==5||Cy(l.type)&&!pf(l.type,l.memoizedProps))&&We&&ln(l):r!==3&&(r!==5||Cy(l.type)&&!pf(l.type,l.memoizedProps))&&We&&ln(l),At(l),r===13){if(!ya)throw Error(u(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));We=yy(l)}else if(r===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));We=gy(l)}else We=Ln&&r===27?fy(l.type,We):Fn?Am(l.stateNode):null;return!0}function ta(){ya&&(We=Fn=null,se=!1)}function ea(){var l=wl;return l!==null&&(ui===null?ui=l:ui.push.apply(ui,l),wl=null),l}function An(l){wl===null?wl=[l]:wl.push(l)}function Ba(l,r,h){Hi?(A(Xs,r._currentValue),r._currentValue=h):(A(Xs,r._currentValue2),r._currentValue2=h)}function rn(l){var r=Xs.current;Hi?l._currentValue=r:l._currentValue2=r,D(Xs)}function ha(l,r,h){for(;l!==null;){var g=l.alternate;if((l.childLanes&r)!==r?(l.childLanes|=r,g!==null&&(g.childLanes|=r)):g!==null&&(g.childLanes&r)!==r&&(g.childLanes|=r),l===h)break;l=l.return}}function Ji(l,r,h,g){var E=l.child;for(E!==null&&(E.return=l);E!==null;){var T=E.dependencies;if(T!==null){var z=E.child;T=T.firstContext;t:for(;T!==null;){var L=T;T=E;for(var ft=0;ft<r.length;ft++)if(L.context===r[ft]){T.lanes|=h,L=T.alternate,L!==null&&(L.lanes|=h),ha(T.return,h,l),g||(z=null);break t}T=L.next}}else if(E.tag===18){if(z=E.return,z===null)throw Error(u(341));z.lanes|=h,T=z.alternate,T!==null&&(T.lanes|=h),ha(z,h,l),z=null}else z=E.child;if(z!==null)z.return=E;else for(z=E;z!==null;){if(z===l){z=null;break}if(E=z.sibling,E!==null){E.return=z.return,z=E;break}z=z.return}E=z}}function di(l,r,h,g){l=null;for(var E=r,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var z=E.alternate;if(z===null)throw Error(u(387));if(z=z.memoizedProps,z!==null){var L=E.type;Sa(E.pendingProps.value,z.value)||(l!==null?l.push(L):l=[L])}}else if(E===Ld.current){if(z=E.alternate,z===null)throw Error(u(387));z.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(l!==null?l.push(fr):l=[fr])}E=E.return}l!==null&&Ji(r,l,h,g),r.flags|=262144}function Fi(l){for(l=l.firstContext;l!==null;){var r=l.context;if(!Sa(Hi?r._currentValue:r._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function Mn(l){Ka=l,$e=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function on(l){return Ut(Ka,l)}function Mi(l,r){return Ka===null&&Mn(l),Ut(l,r)}function Ut(l,r){var h=Hi?r._currentValue:r._currentValue2;if(r={context:r,memoizedValue:h,next:null},$e===null){if(l===null)throw Error(u(308));$e=r,l.dependencies={lanes:0,firstContext:r},l.flags|=524288}else $e=$e.next=r;return h}function Ae(){return{controller:new Ks,data:new Map,refCount:0}}function jn(l){l.refCount--,l.refCount===0&&Na(m3,function(){l.controller.abort()})}function Va(){}function ke(l){l!==ri&&l.next===null&&(ri===null?zn=ri=l:ri=ri.next=l),wu=!0,Vm||(Vm=!0,Cg())}function mn(l,r){if(!go&&wu){go=!0;do for(var h=!1,g=zn;g!==null;){if(l!==0){var E=g.pendingLanes;if(E===0)var T=0;else{var z=g.suspendedLanes,L=g.pingedLanes;T=(1<<31-ii(42|l)+1)-1,T&=E&~(z&~L),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(h=!0,Pr(g,T))}else T=ce,T=O(g,g===Le?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==Ml),(T&3)===0||U(g,T)||(h=!0,Pr(g,T));g=g.next}while(h);go=!1}}function eu(){Lr()}function Lr(){wu=Vm=!1;var l=0;hs!==0&&Tm()&&(l=hs);for(var r=Me(),h=null,g=zn;g!==null;){var E=g.next,T=nu(g,r);T===0?(g.next=null,h===null?zn=E:h.next=E,E===null&&(ri=h)):(h=g,(l!==0||(T&3)!==0)&&(wu=!0)),g=E}we!==0&&we!==5||mn(l),hs!==0&&(hs=0)}function nu(l,r){for(var h=l.suspendedLanes,g=l.pingedLanes,E=l.expirationTimes,T=l.pendingLanes&-62914561;0<T;){var z=31-ii(T),L=1<<z,ft=E[z];ft===-1?((L&h)===0||(L&g)!==0)&&(E[z]=j(L,r)):ft<=r&&(l.expiredLanes|=L),T&=~L}if(r=Le,h=ce,h=O(l,l===r?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Ml),g=l.callbackNode,h===0||l===r&&(He===2||He===9)||l.cancelPendingCommit!==null)return g!==null&&g!==null&&ae(g),l.callbackNode=null,l.callbackPriority=0;if((h&3)===0||U(l,h)){if(r=h&-h,r===l.callbackPriority)return r;switch(g!==null&&ae(g),lt(h)){case 2:case 8:h=Rl;break;case 32:h=zl;break;case 268435456:h=Ru;break;default:h=zl}return g=da.bind(null,l),h=Vd(h,g),l.callbackPriority=r,l.callbackNode=h,r}return g!==null&&g!==null&&ae(g),l.callbackPriority=2,l.callbackNode=null,2}function da(l,r){if(we!==0&&we!==5)return l.callbackNode=null,l.callbackPriority=0,null;var h=l.callbackNode;if(On()&&l.callbackNode!==h)return null;var g=ce;return g=O(l,l===Le?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Ml),g===0?null:(am(l,g,r),nu(l,Me()),l.callbackNode!=null&&l.callbackNode===h?da.bind(null,l):null)}function Pr(l,r){if(On())return null;am(l,r,!0)}function Cg(){kg?Ps(function(){(re&6)!==0?Vd(Oy,eu):Lr()}):Vd(Oy,eu)}function Yr(){if(hs===0){var l=Uu;l===0&&(l=Ef,Ef<<=1,(Ef&261888)===0&&(Ef=256)),hs=l}return hs}function au(l,r){if(xf===null){var h=xf=[];Gm=0,Uu=Yr(),Bu={status:"pending",value:void 0,then:function(g){h.push(g)}}}return Gm++,r.then(Ht,Ht),r}function Ht(){if(--Gm===0&&xf!==null){Bu!==null&&(Bu.status="fulfilled");var l=xf;xf=null,Uu=0,Bu=null;for(var r=0;r<l.length;r++)(0,l[r])()}}function ge(l,r){var h=[],g={status:"pending",value:null,reason:null,then:function(E){h.push(E)}};return l.then(function(){g.status="fulfilled",g.value=r;for(var E=0;E<h.length;E++)(0,h[E])(r)},function(E){for(g.status="rejected",g.reason=E,E=0;E<h.length;E++)(0,h[E])(void 0)}),g}function qr(){var l=pr.current;return l!==null?l:Le.pooledCache}function Wl(l,r){r===null?A(pr,pr.current):A(pr,r.pool)}function Nh(){var l=qr();return l===null?null:{parent:Hi?cn._currentValue:cn._currentValue2,pool:l}}function _c(l,r){if(Sa(l,r))return!0;if(typeof l!="object"||l===null||typeof r!="object"||r===null)return!1;var h=Object.keys(l),g=Object.keys(r);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var E=h[g];if(!Um.call(r,E)||!Sa(l[E],r[E]))return!1}return!0}function O0(l){return l=l.status,l==="fulfilled"||l==="rejected"}function fl(l,r,h){switch(h=l[h],h===void 0?l.push(r):h!==r&&(r.then(Va,Va),r=h),r.status){case"fulfilled":return r.value;case"rejected":throw l=r.reason,Xr(l),l;default:if(typeof r.status=="string")r.then(Va,Va);else{if(l=Le,l!==null&&100<l.shellSuspendCounter)throw Error(u(482));l=r,l.status="pending",l.then(function(g){if(r.status==="pending"){var E=r;E.status="fulfilled",E.value=g}},function(g){if(r.status==="pending"){var E=r;E.status="rejected",E.reason=g}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw l=r.reason,Xr(l),l}throw Gi=r,Vu}}function Wa(l){try{var r=l._init;return r(l._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Gi=h,Vu):h}}function xc(){if(Gi===null)throw Error(u(459));var l=Gi;return Gi=null,l}function Xr(l){if(l===Vu||l===qd)throw Error(u(483))}function pi(l){var r=Df;return Df+=1,ji===null&&(ji=[]),fl(ji,l,r)}function Kr(l,r){r=r.props.ref,l.ref=r!==void 0?r:null}function Qr(l,r){throw r.$$typeof===bd?Error(u(525)):(l=Object.prototype.toString.call(r),Error(u(31,l==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":l)))}function R0(l){function r(it,J){if(l){var ut=it.deletions;ut===null?(it.deletions=[J],it.flags|=16):ut.push(J)}}function h(it,J){if(!l)return null;for(;J!==null;)r(it,J),J=J.sibling;return null}function g(it){for(var J=new Map;it!==null;)it.key!==null?J.set(it.key,it):J.set(it.index,it),it=it.sibling;return J}function E(it,J){return it=Vs(it,J),it.index=0,it.sibling=null,it}function T(it,J,ut){return it.index=ut,l?(ut=it.alternate,ut!==null?(ut=ut.index,ut<J?(it.flags|=67108866,J):ut):(it.flags|=67108866,J)):(it.flags|=1048576,J)}function z(it){return l&&it.alternate===null&&(it.flags|=67108866),it}function L(it,J,ut,_t){return J===null||J.tag!==6?(J=of(ut,it.mode,_t),J.return=it,J):(J=E(J,ut),J.return=it,J)}function ft(it,J,ut,_t){var jt=ut.type;return jt===io?Mt(it,J,ut.props.children,_t,ut.key):J!==null&&(J.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===ur&&Wa(jt)===J.type)?(J=E(J,ut.props),Kr(J,ut),J.return=it,J):(J=rf(ut.type,ut.key,ut.props,null,it.mode,_t),Kr(J,ut),J.return=it,J)}function vt(it,J,ut,_t){return J===null||J.tag!==4||J.stateNode.containerInfo!==ut.containerInfo||J.stateNode.implementation!==ut.implementation?(J=yd(ut,it.mode,_t),J.return=it,J):(J=E(J,ut.children||[]),J.return=it,J)}function Mt(it,J,ut,_t,jt){return J===null||J.tag!==7?(J=Dl(ut,it.mode,_t,jt),J.return=it,J):(J=E(J,ut),J.return=it,J)}function xt(it,J,ut){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=of(""+J,it.mode,ut),J.return=it,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case cf:return ut=rf(J.type,J.key,J.props,null,it.mode,ut),Kr(ut,J),ut.return=it,ut;case or:return J=yd(J,it.mode,ut),J.return=it,J;case ur:return J=Wa(J),xt(it,J,ut)}if(cr(J)||b(J))return J=Dl(J,it.mode,ut,null),J.return=it,J;if(typeof J.then=="function")return xt(it,pi(J),ut);if(J.$$typeof===Al)return xt(it,Mi(it,J),ut);Qr(it,J)}return null}function Rt(it,J,ut,_t){var jt=J!==null?J.key:null;if(typeof ut=="string"&&ut!==""||typeof ut=="number"||typeof ut=="bigint")return jt!==null?null:L(it,J,""+ut,_t);if(typeof ut=="object"&&ut!==null){switch(ut.$$typeof){case cf:return ut.key===jt?ft(it,J,ut,_t):null;case or:return ut.key===jt?vt(it,J,ut,_t):null;case ur:return ut=Wa(ut),Rt(it,J,ut,_t)}if(cr(ut)||b(ut))return jt!==null?null:Mt(it,J,ut,_t,null);if(typeof ut.then=="function")return Rt(it,J,pi(ut),_t);if(ut.$$typeof===Al)return Rt(it,J,Mi(it,ut),_t);Qr(it,ut)}return null}function Yt(it,J,ut,_t,jt){if(typeof _t=="string"&&_t!==""||typeof _t=="number"||typeof _t=="bigint")return it=it.get(ut)||null,L(J,it,""+_t,jt);if(typeof _t=="object"&&_t!==null){switch(_t.$$typeof){case cf:return it=it.get(_t.key===null?ut:_t.key)||null,ft(J,it,_t,jt);case or:return it=it.get(_t.key===null?ut:_t.key)||null,vt(J,it,_t,jt);case ur:return _t=Wa(_t),Yt(it,J,ut,_t,jt)}if(cr(_t)||b(_t))return it=it.get(ut)||null,Mt(J,it,_t,jt,null);if(typeof _t.then=="function")return Yt(it,J,ut,pi(_t),jt);if(_t.$$typeof===Al)return Yt(it,J,ut,Mi(J,_t),jt);Qr(J,_t)}return null}function tn(it,J,ut,_t){for(var jt=null,fn=null,Xt=J,_e=J=0,fe=null;Xt!==null&&_e<ut.length;_e++){Xt.index>_e?(fe=Xt,Xt=null):fe=Xt.sibling;var ye=Rt(it,Xt,ut[_e],_t);if(ye===null){Xt===null&&(Xt=fe);break}l&&Xt&&ye.alternate===null&&r(it,Xt),J=T(ye,J,_e),fn===null?jt=ye:fn.sibling=ye,fn=ye,Xt=fe}if(_e===ut.length)return h(it,Xt),se&&St(it,_e),jt;if(Xt===null){for(;_e<ut.length;_e++)Xt=xt(it,ut[_e],_t),Xt!==null&&(J=T(Xt,J,_e),fn===null?jt=Xt:fn.sibling=Xt,fn=Xt);return se&&St(it,_e),jt}for(Xt=g(Xt);_e<ut.length;_e++)fe=Yt(Xt,it,_e,ut[_e],_t),fe!==null&&(l&&fe.alternate!==null&&Xt.delete(fe.key===null?_e:fe.key),J=T(fe,J,_e),fn===null?jt=fe:fn.sibling=fe,fn=fe);return l&&Xt.forEach(function(Gl){return r(it,Gl)}),se&&St(it,_e),jt}function kn(it,J,ut,_t){if(ut==null)throw Error(u(151));for(var jt=null,fn=null,Xt=J,_e=J=0,fe=null,ye=ut.next();Xt!==null&&!ye.done;_e++,ye=ut.next()){Xt.index>_e?(fe=Xt,Xt=null):fe=Xt.sibling;var Gl=Rt(it,Xt,ye.value,_t);if(Gl===null){Xt===null&&(Xt=fe);break}l&&Xt&&Gl.alternate===null&&r(it,Xt),J=T(Gl,J,_e),fn===null?jt=Gl:fn.sibling=Gl,fn=Gl,Xt=fe}if(ye.done)return h(it,Xt),se&&St(it,_e),jt;if(Xt===null){for(;!ye.done;_e++,ye=ut.next())ye=xt(it,ye.value,_t),ye!==null&&(J=T(ye,J,_e),fn===null?jt=ye:fn.sibling=ye,fn=ye);return se&&St(it,_e),jt}for(Xt=g(Xt);!ye.done;_e++,ye=ut.next())ye=Yt(Xt,it,_e,ye.value,_t),ye!==null&&(l&&ye.alternate!==null&&Xt.delete(ye.key===null?_e:ye.key),J=T(ye,J,_e),fn===null?jt=ye:fn.sibling=ye,fn=ye);return l&&Xt.forEach(function(zf){return r(it,zf)}),se&&St(it,_e),jt}function Eo(it,J,ut,_t){if(typeof ut=="object"&&ut!==null&&ut.type===io&&ut.key===null&&(ut=ut.props.children),typeof ut=="object"&&ut!==null){switch(ut.$$typeof){case cf:t:{for(var jt=ut.key;J!==null;){if(J.key===jt){if(jt=ut.type,jt===io){if(J.tag===7){h(it,J.sibling),_t=E(J,ut.props.children),_t.return=it,it=_t;break t}}else if(J.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===ur&&Wa(jt)===J.type){h(it,J.sibling),_t=E(J,ut.props),Kr(_t,ut),_t.return=it,it=_t;break t}h(it,J);break}else r(it,J);J=J.sibling}ut.type===io?(_t=Dl(ut.props.children,it.mode,_t,ut.key),_t.return=it,it=_t):(_t=rf(ut.type,ut.key,ut.props,null,it.mode,_t),Kr(_t,ut),_t.return=it,it=_t)}return z(it);case or:t:{for(jt=ut.key;J!==null;){if(J.key===jt)if(J.tag===4&&J.stateNode.containerInfo===ut.containerInfo&&J.stateNode.implementation===ut.implementation){h(it,J.sibling),_t=E(J,ut.children||[]),_t.return=it,it=_t;break t}else{h(it,J);break}else r(it,J);J=J.sibling}_t=yd(ut,it.mode,_t),_t.return=it,it=_t}return z(it);case ur:return ut=Wa(ut),Eo(it,J,ut,_t)}if(cr(ut))return tn(it,J,ut,_t);if(b(ut)){if(jt=b(ut),typeof jt!="function")throw Error(u(150));return ut=jt.call(ut),kn(it,J,ut,_t)}if(typeof ut.then=="function")return Eo(it,J,pi(ut),_t);if(ut.$$typeof===Al)return Eo(it,J,Mi(it,ut),_t);Qr(it,ut)}return typeof ut=="string"&&ut!==""||typeof ut=="number"||typeof ut=="bigint"?(ut=""+ut,J!==null&&J.tag===6?(h(it,J.sibling),_t=E(J,ut),_t.return=it,it=_t):(h(it,J),_t=of(ut,it.mode,_t),_t.return=it,it=_t),z(it)):h(it,J)}return function(it,J,ut,_t){try{Df=0;var jt=Eo(it,J,ut,_t);return ji=null,jt}catch(Xt){if(Xt===Vu||Xt===qd)throw Xt;var fn=i(29,Xt,null,it.mode);return fn.lanes=_t,fn.return=it,fn}}}function Ca(){for(var l=ds,r=jm=ds=0;r<l;){var h=Li[r];Li[r++]=null;var g=Li[r];Li[r++]=null;var E=Li[r];Li[r++]=null;var T=Li[r];if(Li[r++]=null,g!==null&&E!==null){var z=g.pending;z===null?E.next=E:(E.next=z.next,z.next=E),g.pending=E}T!==0&&iu(h,E,T)}}function hl(l,r,h,g){Li[ds++]=l,Li[ds++]=r,Li[ds++]=h,Li[ds++]=g,jm|=g,l.lanes|=g,l=l.alternate,l!==null&&(l.lanes|=g)}function dl(l,r,h,g){return hl(l,r,h,g),Zr(l)}function $l(l,r){return hl(l,null,null,r),Zr(l)}function iu(l,r,h){l.lanes|=h;var g=l.alternate;g!==null&&(g.lanes|=h);for(var E=!1,T=l.return;T!==null;)T.childLanes|=h,g=T.alternate,g!==null&&(g.childLanes|=h),T.tag===22&&(l=T.stateNode,l===null||l._visibility&1||(E=!0)),l=T,T=T.return;return l.tag===3?(T=l.stateNode,E&&r!==null&&(E=31-ii(h),l=T.hiddenUpdates,g=l[E],g===null?l[E]=[r]:g.push(r),r.lane=h|536870912),T):null}function Zr(l){if(50<qu)throw qu=0,rp=null,Error(u(185));for(var r=l.return;r!==null;)l=r,r=l.return;return l.tag===3?l.stateNode:null}function Dc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jr(l,r){l=l.updateQueue,r.updateQueue===l&&(r.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function mi(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Ds(l,r,h){var g=l.updateQueue;if(g===null)return null;if(g=g.shared,(re&2)!==0){var E=g.pending;return E===null?r.next=r:(r.next=E.next,E.next=r),g.pending=r,r=Zr(l),iu(l,null,h),r}return hl(l,g,r,h),Zr(l)}function Ac(l,r,h){if(r=r.updateQueue,r!==null&&(r=r.shared,(h&4194048)!==0)){var g=r.lanes;g&=l.pendingLanes,h|=g,r.lanes=h,et(l,h)}}function z0(l,r){var h=l.updateQueue,g=l.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var E=null,T=null;if(h=h.firstBaseUpdate,h!==null){do{var z={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};T===null?E=T=z:T=T.next=z,h=h.next}while(h!==null);T===null?E=T=r:T=T.next=r}else E=T=r;h={baseState:g.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},l.updateQueue=h;return}l=h.lastBaseUpdate,l===null?h.firstBaseUpdate=r:l.next=r,h.lastBaseUpdate=r}function su(){if(Lm){var l=Bu;if(l!==null)throw l}}function Fr(l,r,h,g){Lm=!1;var E=l.updateQueue;mr=!1;var T=E.firstBaseUpdate,z=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var ft=L,vt=ft.next;ft.next=null,z===null?T=vt:z.next=vt,z=ft;var Mt=l.alternate;Mt!==null&&(Mt=Mt.updateQueue,L=Mt.lastBaseUpdate,L!==z&&(L===null?Mt.firstBaseUpdate=vt:L.next=vt,Mt.lastBaseUpdate=ft))}if(T!==null){var xt=E.baseState;z=0,Mt=vt=ft=null,L=T;do{var Rt=L.lane&-536870913,Yt=Rt!==L.lane;if(Yt?(ce&Rt)===Rt:(g&Rt)===Rt){Rt!==0&&Rt===Uu&&(Lm=!0),Mt!==null&&(Mt=Mt.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});t:{var tn=l,kn=L;Rt=r;var Eo=h;switch(kn.tag){case 1:if(tn=kn.payload,typeof tn=="function"){xt=tn.call(Eo,xt,Rt);break t}xt=tn;break t;case 3:tn.flags=tn.flags&-65537|128;case 0:if(tn=kn.payload,Rt=typeof tn=="function"?tn.call(Eo,xt,Rt):tn,Rt==null)break t;xt=yi({},xt,Rt);break t;case 2:mr=!0}}Rt=L.callback,Rt!==null&&(l.flags|=64,Yt&&(l.flags|=8192),Yt=E.callbacks,Yt===null?E.callbacks=[Rt]:Yt.push(Rt))}else Yt={lane:Rt,tag:L.tag,payload:L.payload,callback:L.callback,next:null},Mt===null?(vt=Mt=Yt,ft=xt):Mt=Mt.next=Yt,z|=Rt;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;Yt=L,L=Yt.next,Yt.next=null,E.lastBaseUpdate=Yt,E.shared.pending=null}}while(!0);Mt===null&&(ft=xt),E.baseState=ft,E.firstBaseUpdate=vt,E.lastBaseUpdate=Mt,T===null&&(E.shared.lanes=0),vr|=z,l.lanes=z,l.memoizedState=xt}}function H0(l,r){if(typeof l!="function")throw Error(u(191,l));l.call(r)}function _g(l,r){var h=l.callbacks;if(h!==null)for(l.callbacks=null,l=0;l<h.length;l++)H0(h[l],r)}function Bt(l,r){l=Bl,A(Kd,l),A(Qs,r),Bl=l|r.baseLanes}function Mc(){A(Kd,Bl),A(Qs,Qs.current)}function pl(){Bl=Kd.current,D(Qs),D(Kd)}function ml(l){var r=l.alternate;A(Hn,Hn.current&1),A(Si,l),Pi===null&&(r===null||Qs.current!==null||r.memoizedState!==null)&&(Pi=l)}function lu(l){A(Hn,Hn.current),A(Si,l),Pi===null&&(Pi=l)}function As(l){l.tag===22?(A(Hn,Hn.current),A(Si,l),Pi===null&&(Pi=l)):gl()}function gl(){A(Hn,Hn.current),A(Si,Si.current)}function $a(l){D(Si),Pi===l&&(Pi=null),D(Hn)}function yl(l){for(var r=l;r!==null;){if(r.tag===13){var h=r.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||vf(h)||Sf(h)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break;for(;r.sibling===null;){if(r.return===null||r.return===l)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function un(){throw Error(u(321))}function vl(l,r){if(r===null)return!1;for(var h=0;h<r.length&&h<l.length;h++)if(!Sa(l[h],r[h]))return!1;return!0}function Nc(l,r,h,g,E,T){return Ul=T,kt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Gt.H=l===null||l.memoizedState===null?Hy:Pm,vo=!1,T=h(g,E),vo=!1,Gu&&(T=Oh(r,h,g,E)),ru(l),T}function ru(l){Gt.H=Af;var r=Ge!==null&&Ge.next!==null;if(Ul=0,Yn=Ge=kt=null,Qd=!1,ju=0,Lu=null,r)throw Error(u(300));l===null||qn||(l=l.dependencies,l!==null&&Fi(l)&&(qn=!0))}function Oh(l,r,h,g){kt=l;var E=0;do{if(Gu&&(Lu=null),ju=0,Gu=!1,25<=E)throw Error(u(301));if(E+=1,Yn=Ge=null,l.updateQueue!=null){var T=l.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Gt.H=wy,T=r(h,g)}while(Gu);return T}function Rh(){var l=Gt.H,r=l.useState()[0];return r=typeof r.then=="function"?Ii(r):r,l=l.useState()[0],(Ge!==null?Ge.memoizedState:null)!==l&&(kt.flags|=1024),r}function Ms(){var l=Zd!==0;return Zd=0,l}function ki(l,r,h){r.updateQueue=l.updateQueue,r.flags&=-2053,l.lanes&=~h}function Oc(l){if(Qd){for(l=l.memoizedState;l!==null;){var r=l.queue;r!==null&&(r.pending=null),l=l.next}Qd=!1}Ul=0,Yn=Ge=kt=null,Gu=!1,ju=Zd=0,Lu=null}function pa(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yn===null?kt.memoizedState=Yn=l:Yn=Yn.next=l,Yn}function Ye(){if(Ge===null){var l=kt.alternate;l=l!==null?l.memoizedState:null}else l=Ge.next;var r=Yn===null?kt.memoizedState:Yn.next;if(r!==null)Yn=r,Ge=l;else{if(l===null)throw kt.alternate===null?Error(u(467)):Error(u(310));Ge=l,l={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},Yn===null?kt.memoizedState=Yn=l:Yn=Yn.next=l}return Yn}function kr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(l){var r=ju;return ju+=1,Lu===null&&(Lu=[]),l=fl(Lu,l,r),r=kt,(Yn===null?r.memoizedState:Yn.next)===null&&(r=r.alternate,Gt.H=r===null||r.memoizedState===null?Hy:Pm),l}function Ve(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Ii(l);if(l.$$typeof===Al)return on(l)}throw Error(u(438,String(l)))}function ou(l){var r=null,h=kt.updateQueue;if(h!==null&&(r=h.memoCache),r==null){var g=kt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(r={data:g.data.map(function(E){return E.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),h===null&&(h=kr(),kt.updateQueue=h),h.memoCache=r,h=r.data[r.index],h===void 0)for(h=r.data[r.index]=Array(l),g=0;g<l;g++)h[g]=Gs;return r.index++,h}function Ns(l,r){return typeof r=="function"?r(l):r}function uu(l){var r=Ye();return Sl(r,Ge,l)}function Sl(l,r,h){var g=l.queue;if(g===null)throw Error(u(311));g.lastRenderedReducer=h;var E=l.baseQueue,T=g.pending;if(T!==null){if(E!==null){var z=E.next;E.next=T.next,T.next=z}r.baseQueue=E=T,g.pending=null}if(T=l.baseState,E===null)l.memoizedState=T;else{r=E.next;var L=z=null,ft=null,vt=r,Mt=!1;do{var xt=vt.lane&-536870913;if(xt!==vt.lane?(ce&xt)===xt:(Ul&xt)===xt){var Rt=vt.revertLane;if(Rt===0)ft!==null&&(ft=ft.next={lane:0,revertLane:0,gesture:null,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null}),xt===Uu&&(Mt=!0);else if((Ul&Rt)===Rt){vt=vt.next,Rt===Uu&&(Mt=!0);continue}else xt={lane:0,revertLane:vt.revertLane,gesture:null,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null},ft===null?(L=ft=xt,z=T):ft=ft.next=xt,kt.lanes|=Rt,vr|=Rt;xt=vt.action,vo&&h(T,xt),T=vt.hasEagerState?vt.eagerState:h(T,xt)}else Rt={lane:xt,revertLane:vt.revertLane,gesture:vt.gesture,action:vt.action,hasEagerState:vt.hasEagerState,eagerState:vt.eagerState,next:null},ft===null?(L=ft=Rt,z=T):ft=ft.next=Rt,kt.lanes|=xt,vr|=xt;vt=vt.next}while(vt!==null&&vt!==r);if(ft===null?z=T:ft.next=L,!Sa(T,l.memoizedState)&&(qn=!0,Mt&&(h=Bu,h!==null)))throw h;l.memoizedState=T,l.baseState=z,l.baseQueue=ft,g.lastRenderedState=T}return E===null&&(g.lanes=0),[l.memoizedState,g.dispatch]}function Ir(l){var r=Ye(),h=r.queue;if(h===null)throw Error(u(311));h.lastRenderedReducer=l;var g=h.dispatch,E=h.pending,T=r.memoizedState;if(E!==null){h.pending=null;var z=E=E.next;do T=l(T,z.action),z=z.next;while(z!==E);Sa(T,r.memoizedState)||(qn=!0),r.memoizedState=T,r.baseQueue===null&&(r.baseState=T),h.lastRenderedState=T}return[T,g]}function Wi(l,r,h){var g=kt,E=Ye(),T=se;if(T){if(h===void 0)throw Error(u(407));h=h()}else h=r();var z=!Sa((Ge||E).memoizedState,h);if(z&&(E.memoizedState=h,qn=!0),E=E.queue,Hh(Rc.bind(null,g,E,l),[l]),E.getSnapshot!==r||z||Yn!==null&&Yn.memoizedState.tag&1){if(g.flags|=2048,ja(9,{destroy:void 0},Os.bind(null,g,E,h,r),null),Le===null)throw Error(u(349));T||(Ul&127)!==0||xg(g,r,h)}return h}function xg(l,r,h){l.flags|=16384,l={getSnapshot:r,value:h},r=kt.updateQueue,r===null?(r=kr(),kt.updateQueue=r,r.stores=[l]):(h=r.stores,h===null?r.stores=[l]:h.push(l))}function Os(l,r,h,g){r.value=h,r.getSnapshot=g,cu(r)&&zc(l)}function Rc(l,r,h){return h(function(){cu(r)&&zc(l)})}function cu(l){var r=l.getSnapshot;l=l.value;try{var h=r();return!Sa(l,h)}catch{return!0}}function zc(l){var r=$l(l,2);r!==null&&Pa(r,l,2)}function Ga(l){var r=pa();if(typeof l=="function"){var h=l;if(l=h(),vo){dt(!0);try{h()}finally{dt(!1)}}}return r.memoizedState=r.baseState=l,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:l},r}function ti(l,r,h,g){return l.baseState=h,Sl(l,Ge,typeof g=="function"?g:Ns)}function Rs(l,r,h,g,E){if(er(l))throw Error(u(485));if(l=r.action,l!==null){var T={payload:E,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){T.listeners.push(z)}};Gt.T!==null?h(!0):T.isTransition=!1,g(T),h=r.pending,h===null?(T.next=r.pending=T,$i(r,T)):(T.next=h.next,r.pending=h.next=T)}}function $i(l,r){var h=r.action,g=r.payload,E=l.state;if(r.isTransition){var T=Gt.T,z={};Gt.T=z;try{var L=h(E,g),ft=Gt.S;ft!==null&&ft(z,L),ts(l,r,L)}catch(vt){Hc(l,r,vt)}finally{T!==null&&z.types!==null&&(T.types=z.types),Gt.T=T}}else try{T=h(E,g),ts(l,r,T)}catch(vt){Hc(l,r,vt)}}function ts(l,r,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(g){es(l,r,g)},function(g){return Hc(l,r,g)}):es(l,r,h)}function es(l,r,h){r.status="fulfilled",r.value=h,zh(r),l.state=h,r=l.pending,r!==null&&(h=r.next,h===r?l.pending=null:(h=h.next,r.next=h,$i(l,h)))}function Hc(l,r,h){var g=l.pending;if(l.pending=null,g!==null){g=g.next;do r.status="rejected",r.reason=h,zh(r),r=r.next;while(r!==g)}l.action=null}function zh(l){l=l.listeners;for(var r=0;r<l.length;r++)(0,l[r])()}function w0(l,r){return r}function ns(l,r){if(se){var h=Le.formState;if(h!==null){t:{var g=kt;if(se){if(We){var E=uy(We,Vi);if(E){We=Am(E),g=cy(E);break t}}ln(g)}g=!1}g&&(r=h[0])}}h=pa(),h.memoizedState=h.baseState=r,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:w0,lastRenderedState:r},h.queue=g,h=jh.bind(null,kt,g),g.dispatch=h,g=Ga(!1);var T=hu.bind(null,kt,!1,g.queue);return g=pa(),E={state:r,dispatch:null,action:l,pending:null},g.queue=E,h=Rs.bind(null,kt,E,T,h),E.dispatch=h,g.memoizedState=l,[r,h,!1]}function U0(l){var r=Ye();return as(r,Ge,l)}function as(l,r,h){if(r=Sl(l,r,w0)[0],l=uu(Ns)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var g=Ii(r)}catch(z){throw z===Vu?qd:z}else g=r;r=Ye();var E=r.queue,T=E.dispatch;return h!==r.memoizedState&&(kt.flags|=2048,ja(9,{destroy:void 0},wc.bind(null,E,h),null)),[g,T,l]}function wc(l,r){l.action=r}function Uc(l){var r=Ye(),h=Ge;if(h!==null)return as(r,h,l);Ye(),r=r.memoizedState,h=Ye();var g=h.queue.dispatch;return h.memoizedState=l,[r,g,!1]}function ja(l,r,h,g){return l={tag:l,create:h,deps:g,inst:r,next:null},r=kt.updateQueue,r===null&&(r=kr(),kt.updateQueue=r),h=r.lastEffect,h===null?r.lastEffect=l.next=l:(g=h.next,h.next=l,l.next=g,r.lastEffect=l),l}function Wr(){return Ye().memoizedState}function Bc(l,r,h,g){var E=pa();kt.flags|=l,E.memoizedState=ja(1|r,{destroy:void 0},h,g===void 0?null:g)}function fu(l,r,h,g){var E=Ye();g=g===void 0?null:g;var T=E.memoizedState.inst;Ge!==null&&g!==null&&vl(g,Ge.memoizedState.deps)?E.memoizedState=ja(r,T,h,g):(kt.flags|=l,E.memoizedState=ja(1|r,T,h,g))}function B0(l,r){Bc(8390656,8,l,r)}function Hh(l,r){fu(2048,8,l,r)}function Dg(l){kt.flags|=4;var r=kt.updateQueue;if(r===null)r=kr(),kt.updateQueue=r,r.events=[l];else{var h=r.events;h===null?r.events=[l]:h.push(l)}}function wh(l){var r=Ye().memoizedState;return Dg({ref:r,nextImpl:l}),function(){if((re&2)!==0)throw Error(u(440));return r.impl.apply(void 0,arguments)}}function V0(l,r){return fu(4,2,l,r)}function Uh(l,r){return fu(4,4,l,r)}function Ag(l,r){if(typeof r=="function"){l=l();var h=r(l);return function(){typeof h=="function"?h():r(null)}}if(r!=null)return l=l(),r.current=l,function(){r.current=null}}function G0(l,r,h){h=h!=null?h.concat([l]):null,fu(4,4,Ag.bind(null,r,l),h)}function j0(){}function Bh(l,r){var h=Ye();r=r===void 0?null:r;var g=h.memoizedState;return r!==null&&vl(r,g[1])?g[0]:(h.memoizedState=[l,r],l)}function Vc(l,r){var h=Ye();r=r===void 0?null:r;var g=h.memoizedState;if(r!==null&&vl(r,g[1]))return g[0];if(g=l(),vo){dt(!0);try{l()}finally{dt(!1)}}return h.memoizedState=[g,r],g}function Vh(l,r,h){return h===void 0||(Ul&1073741824)!==0&&(ce&261930)===0?l.memoizedState=r:(l.memoizedState=h,l=ef(),kt.lanes|=l,vr|=l,h)}function Gc(l,r,h,g){return Sa(h,r)?h:Qs.current!==null?(l=Vh(l,h,g),Sa(l,r)||(qn=!0),l):(Ul&42)===0||(Ul&1073741824)!==0&&(ce&261930)===0?(qn=!0,l.memoizedState=h):(l=ef(),kt.lanes|=l,vr|=l,r)}function L0(l,r,h,g,E){var T=Ls();Jn(T!==0&&8>T?T:8);var z=Gt.T,L={};Gt.T=L,hu(l,!1,r,h);try{var ft=E(),vt=Gt.S;if(vt!==null&&vt(L,ft),ft!==null&&typeof ft=="object"&&typeof ft.then=="function"){var Mt=ge(ft,g);tr(l,r,Mt,ai(l))}else tr(l,r,g,ai(l))}catch(xt){tr(l,r,{then:function(){},status:"rejected",reason:xt},ai())}finally{Jn(T),z!==null&&L.types!==null&&(z.types=L.types),Gt.T=z}}function P0(l){var r=l.memoizedState;if(r!==null)return r;r={memoizedState:qa,baseState:qa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:qa},next:null};var h={};return r.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:h},next:null},l.memoizedState=r,l=l.alternate,l!==null&&(l.memoizedState=r),r}function Gh(){return on(fr)}function bl(){return Ye().memoizedState}function Y0(){return Ye().memoizedState}function Mg(l){for(var r=l.return;r!==null;){switch(r.tag){case 24:case 3:var h=ai();l=mi(h);var g=Ds(r,l,h);g!==null&&(Pa(g,r,h),Ac(g,r,h)),r={cache:Ae()},l.payload=r;return}r=r.return}}function ma(l,r,h){var g=ai();h={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},er(l)?q0(r,h):(h=dl(l,r,h,g),h!==null&&(Pa(h,l,g),jc(h,r,g)))}function jh(l,r,h){var g=ai();tr(l,r,h,g)}function tr(l,r,h,g){var E={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(er(l))q0(r,E);else{var T=l.alternate;if(l.lanes===0&&(T===null||T.lanes===0)&&(T=r.lastRenderedReducer,T!==null))try{var z=r.lastRenderedState,L=T(z,h);if(E.hasEagerState=!0,E.eagerState=L,Sa(L,z))return hl(l,r,E,0),Le===null&&Ca(),!1}catch{}if(h=dl(l,r,E,g),h!==null)return Pa(h,l,g),jc(h,r,g),!0}return!1}function hu(l,r,h,g){if(g={lane:2,revertLane:Yr(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},er(l)){if(r)throw Error(u(479))}else r=dl(l,h,g,2),r!==null&&Pa(r,l,2)}function er(l){var r=l.alternate;return l===kt||r!==null&&r===kt}function q0(l,r){Gu=Qd=!0;var h=l.pending;h===null?r.next=r:(r.next=h.next,h.next=r),l.pending=r}function jc(l,r,h){if((h&4194048)!==0){var g=r.lanes;g&=l.pendingLanes,h|=g,r.lanes=h,et(l,h)}}function Lh(l,r,h,g){r=l.memoizedState,h=h(g,r),h=h==null?r:yi({},r,h),l.memoizedState=h,l.lanes===0&&(l.updateQueue.baseState=h)}function Lc(l,r,h,g,E,T,z){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(g,T,z):r.prototype&&r.prototype.isPureReactComponent?!_c(h,g)||!_c(E,T):!0}function X0(l,r,h,g){l=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(h,g),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(h,g),r.state!==l&&Jd.enqueueReplaceState(r,r.state,null)}function zs(l,r){var h=r;if("ref"in r){h={};for(var g in r)g!=="ref"&&(h[g]=r[g])}if(l=l.defaultProps){h===r&&(h=yi({},h));for(var E in l)h[E]===void 0&&(h[E]=l[E])}return h}function Pc(l,r){try{var h=l.onUncaughtError;h(r.value,{componentStack:r.stack})}catch(g){setTimeout(function(){throw g})}}function K0(l,r,h){try{var g=l.onCaughtError;g(h.value,{componentStack:h.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function du(l,r,h){return h=mi(h),h.tag=3,h.payload={element:null},h.callback=function(){Pc(l,r)},h}function Yc(l){return l=mi(l),l.tag=3,l}function Ph(l,r,h,g){var E=h.type.getDerivedStateFromError;if(typeof E=="function"){var T=g.value;l.payload=function(){return E(T)},l.callback=function(){K0(r,h,g)}}var z=h.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(l.callback=function(){K0(r,h,g),typeof E!="function"&&(Sr===null?Sr=new Set([this]):Sr.add(this));var L=g.stack;this.componentDidCatch(g.value,{componentStack:L!==null?L:""})})}function _a(l,r,h,g,E){if(h.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(r=h.alternate,r!==null&&di(r,h,E,!0),h=Si.current,h!==null){switch(h.tag){case 31:case 13:return Pi===null?Eu():h.alternate===null&&yn===0&&(yn=3),h.flags&=-257,h.flags|=65536,h.lanes=E,g===Xd?h.flags|=16384:(r=h.updateQueue,r===null?h.updateQueue=new Set([g]):r.add(g),dd(l,g,E)),!1;case 22:return h.flags|=65536,g===Xd?h.flags|=16384:(r=h.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([g])},h.updateQueue=r):(h=r.retryQueue,h===null?r.retryQueue=new Set([g]):h.add(g)),dd(l,g,E)),!1}throw Error(u(435,h.tag))}return dd(l,g,E),Eu(),!1}if(se)return r=Si.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=E,g!==Bm&&(l=Error(u(422),{cause:g}),An(at(l,h)))):(g!==Bm&&(r=Error(u(423),{cause:g}),An(at(r,h))),l=l.current.alternate,l.flags|=65536,E&=-E,l.lanes|=E,g=at(g,h),E=du(l.stateNode,g,E),z0(l,E),yn!==4&&(yn=2)),!1;var T=Error(u(520),{cause:g});if(T=at(T,h),Of===null?Of=[T]:Of.push(T),yn!==4&&(yn=2),r===null)return!0;g=at(g,h),h=r;do{switch(h.tag){case 3:return h.flags|=65536,l=E&-E,h.lanes|=l,l=du(h.stateNode,g,l),z0(h,l),!1;case 1:if(r=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Sr===null||!Sr.has(T))))return h.flags|=65536,E&=-E,h.lanes|=E,E=Yc(E),Ph(E,l,h,g),z0(h,E),!1}h=h.return}while(h!==null);return!1}function na(l,r,h,g){r.child=l===null?zy(r,null,h,g):yo(r,l.child,h,g)}function qc(l,r,h,g,E){h=h.render;var T=r.ref;if("ref"in g){var z={};for(var L in g)L!=="ref"&&(z[L]=g[L])}else z=g;return Mn(r),g=Nc(l,r,h,z,T,E),L=Ms(),l!==null&&!qn?(ki(l,r,E),ei(l,r,E)):(se&&L&&gt(r),r.flags|=1,na(l,r,g,E),r.child)}function Yh(l,r,h,g,E){if(l===null){var T=h.type;return typeof T=="function"&&!lf(T)&&T.defaultProps===void 0&&h.compare===null?(r.tag=15,r.type=T,qh(l,r,T,g,E)):(l=rf(h.type,null,g,r,r.mode,E),l.ref=r.ref,l.return=r,r.child=l)}if(T=l.child,!gu(l,E)){var z=T.memoizedProps;if(h=h.compare,h=h!==null?h:_c,h(z,g)&&l.ref===r.ref)return ei(l,r,E)}return r.flags|=1,l=Vs(T,g),l.ref=r.ref,l.return=r,r.child=l}function qh(l,r,h,g,E){if(l!==null){var T=l.memoizedProps;if(_c(T,g)&&l.ref===r.ref)if(qn=!1,r.pendingProps=g=T,gu(l,E))(l.flags&131072)!==0&&(qn=!0);else return r.lanes=l.lanes,ei(l,r,E)}return Q0(l,r,h,g,E)}function El(l,r,h,g){var E=g.children,T=l!==null?l.memoizedState:null;if(l===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((r.flags&128)!==0){if(T=T!==null?T.baseLanes|h:h,l!==null){for(g=r.child=l.child,E=0;g!==null;)E=E|g.lanes|g.childLanes,g=g.sibling;g=E&~T}else g=0,r.child=null;return pu(l,r,T,h,g)}if((h&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},l!==null&&Wl(r,T!==null?T.cachePool:null),T!==null?Bt(r,T):Mc(),As(r);else return g=r.lanes=536870912,pu(l,r,T!==null?T.baseLanes|h:h,h,g)}else T!==null?(Wl(r,T.cachePool),Bt(r,T),gl(),r.memoizedState=null):(l!==null&&Wl(r,null),Mc(),gl());return na(l,r,E,h),r.child}function Ni(l,r){return l!==null&&l.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function pu(l,r,h,g,E){var T=qr();return T=T===null?null:{parent:Hi?cn._currentValue:cn._currentValue2,pool:T},r.memoizedState={baseLanes:h,cachePool:T},l!==null&&Wl(r,null),Mc(),As(r),l!==null&&di(l,r,g,!0),r.childLanes=E,null}function $r(l,r){return r=is({mode:r.mode,children:r.children},l.mode),r.ref=l.ref,l.child=r,r.return=l,r}function mu(l,r,h){return yo(r,l.child,null,h),l=$r(r,r.pendingProps),l.flags|=2,$a(r),r.memoizedState=null,l}function Xc(l,r,h){var g=r.pendingProps,E=(r.flags&128)!==0;if(r.flags&=-129,l===null){if(se){if(g.mode==="hidden")return l=$r(r,g),r.lanes=536870912,Ni(null,l);if(lu(r),(l=We)?(l=py(l,Vi),l!==null&&(r.memoizedState={dehydrated:l,treeContext:Hl!==null?{id:Xa,overflow:qs}:null,retryLane:536870912,hydrationErrors:null},h=gd(l),h.return=r,r.child=h,Fn=r,We=null)):l=null,l===null)throw ln(r);return r.lanes=536870912,null}return $r(r,g)}var T=l.memoizedState;if(T!==null){var z=T.dehydrated;if(lu(r),E)if(r.flags&256)r.flags&=-257,r=mu(l,r,h);else if(r.memoizedState!==null)r.child=l.child,r.flags|=128,r=null;else throw Error(u(558));else if(qn||di(l,r,h,!1),E=(h&l.childLanes)!==0,qn||E){if(g=Le,g!==null&&(z=nt(g,h),z!==0&&z!==T.retryLane))throw T.retryLane=z,$l(l,z),Pa(g,l,z),Fd;Eu(),r=mu(l,r,h)}else l=T.treeContext,ya&&(We=Mm(z),Fn=r,se=!0,wl=null,Vi=!1,l!==null&&Pt(r,l)),r=$r(r,g),r.flags|=4096;return r}return l=Vs(l.child,{mode:g.mode,children:g.children}),l.ref=r.ref,r.child=l,l.return=r,l}function Kc(l,r){var h=r.ref;if(h===null)l!==null&&l.ref!==null&&(r.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(u(284));(l===null||l.ref!==h)&&(r.flags|=4194816)}}function Q0(l,r,h,g,E){return Mn(r),h=Nc(l,r,h,g,void 0,E),g=Ms(),l!==null&&!qn?(ki(l,r,E),ei(l,r,E)):(se&&g&&gt(r),r.flags|=1,na(l,r,h,E),r.child)}function Z0(l,r,h,g,E,T){return Mn(r),r.updateQueue=null,h=Oh(r,g,h,E),ru(l),g=Ms(),l!==null&&!qn?(ki(l,r,T),ei(l,r,T)):(se&&g&&gt(r),r.flags|=1,na(l,r,h,T),r.child)}function J0(l,r,h,g,E){if(Mn(r),r.stateNode===null){var T=ho,z=h.contextType;typeof z=="object"&&z!==null&&(T=on(z)),T=new h(g,T),r.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Jd,r.stateNode=T,T._reactInternals=r,T=r.stateNode,T.props=g,T.state=r.memoizedState,T.refs={},Dc(r),z=h.contextType,T.context=typeof z=="object"&&z!==null?on(z):ho,T.state=r.memoizedState,z=h.getDerivedStateFromProps,typeof z=="function"&&(Lh(r,h,z,g),T.state=r.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(z=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),z!==T.state&&Jd.enqueueReplaceState(T,T.state,null),Fr(r,g,T,E),su(),T.state=r.memoizedState),typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!0}else if(l===null){T=r.stateNode;var L=r.memoizedProps,ft=zs(h,L);T.props=ft;var vt=T.context,Mt=h.contextType;z=ho,typeof Mt=="object"&&Mt!==null&&(z=on(Mt));var xt=h.getDerivedStateFromProps;Mt=typeof xt=="function"||typeof T.getSnapshotBeforeUpdate=="function",L=r.pendingProps!==L,Mt||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(L||vt!==z)&&X0(r,T,g,z),mr=!1;var Rt=r.memoizedState;T.state=Rt,Fr(r,g,T,E),su(),vt=r.memoizedState,L||Rt!==vt||mr?(typeof xt=="function"&&(Lh(r,h,xt,g),vt=r.memoizedState),(ft=mr||Lc(r,h,ft,g,Rt,vt,z))?(Mt||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(r.flags|=4194308)):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=g,r.memoizedState=vt),T.props=g,T.state=vt,T.context=z,g=ft):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!1)}else{T=r.stateNode,Jr(l,r),z=r.memoizedProps,Mt=zs(h,z),T.props=Mt,xt=r.pendingProps,Rt=T.context,vt=h.contextType,ft=ho,typeof vt=="object"&&vt!==null&&(ft=on(vt)),L=h.getDerivedStateFromProps,(vt=typeof L=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==xt||Rt!==ft)&&X0(r,T,g,ft),mr=!1,Rt=r.memoizedState,T.state=Rt,Fr(r,g,T,E),su();var Yt=r.memoizedState;z!==xt||Rt!==Yt||mr||l!==null&&l.dependencies!==null&&Fi(l.dependencies)?(typeof L=="function"&&(Lh(r,h,L,g),Yt=r.memoizedState),(Mt=mr||Lc(r,h,Mt,g,Rt,Yt,ft)||l!==null&&l.dependencies!==null&&Fi(l.dependencies))?(vt||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,Yt,ft),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,Yt,ft)),typeof T.componentDidUpdate=="function"&&(r.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof T.componentDidUpdate!="function"||z===l.memoizedProps&&Rt===l.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===l.memoizedProps&&Rt===l.memoizedState||(r.flags|=1024),r.memoizedProps=g,r.memoizedState=Yt),T.props=g,T.state=Yt,T.context=ft,g=Mt):(typeof T.componentDidUpdate!="function"||z===l.memoizedProps&&Rt===l.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===l.memoizedProps&&Rt===l.memoizedState||(r.flags|=1024),g=!1)}return T=g,Kc(l,r),g=(r.flags&128)!==0,T||g?(T=r.stateNode,h=g&&typeof h.getDerivedStateFromError!="function"?null:T.render(),r.flags|=1,l!==null&&g?(r.child=yo(r,l.child,null,E),r.child=yo(r,null,h,E)):na(l,r,h,E),r.memoizedState=T.state,l=r.child):l=ei(l,r,E),l}function Xh(l,r,h,g){return ta(),r.flags|=256,na(l,r,h,g),r.child}function Qc(l){return{baseLanes:l,cachePool:Nh()}}function Hs(l,r,h){return l=l!==null?l.childLanes&~h:0,r&&(l|=Ei),l}function Kh(l,r,h){var g=r.pendingProps,E=!1,T=(r.flags&128)!==0,z;if((z=T)||(z=l!==null&&l.memoizedState===null?!1:(Hn.current&2)!==0),z&&(E=!0,r.flags&=-129),z=(r.flags&32)!==0,r.flags&=-33,l===null){if(se){if(E?ml(r):gl(),(l=We)?(l=u3(l,Vi),l!==null&&(r.memoizedState={dehydrated:l,treeContext:Hl!==null?{id:Xa,overflow:qs}:null,retryLane:536870912,hydrationErrors:null},h=gd(l),h.return=r,r.child=h,Fn=r,We=null)):l=null,l===null)throw ln(r);return Sf(l)?r.lanes=32:r.lanes=536870912,null}var L=g.children;return g=g.fallback,E?(gl(),E=r.mode,L=is({mode:"hidden",children:L},E),g=Dl(g,E,h,null),L.return=r,g.return=r,L.sibling=g,r.child=L,g=r.child,g.memoizedState=Qc(h),g.childLanes=Hs(l,z,h),r.memoizedState=kd,Ni(null,g)):(ml(r),Qh(r,L))}var ft=l.memoizedState;if(ft!==null&&(L=ft.dehydrated,L!==null)){if(T)r.flags&256?(ml(r),r.flags&=-257,r=La(l,r,h)):r.memoizedState!==null?(gl(),r.child=l.child,r.flags|=128,r=null):(gl(),L=g.fallback,E=r.mode,g=is({mode:"visible",children:g.children},E),L=Dl(L,E,h,null),L.flags|=2,g.return=r,L.return=r,g.sibling=L,r.child=g,yo(r,l.child,null,h),g=r.child,g.memoizedState=Qc(h),g.childLanes=Hs(l,z,h),r.memoizedState=kd,r=Ni(null,g));else if(ml(r),Sf(L))z=uo(L).digest,g=Error(u(419)),g.stack="",g.digest=z,An({value:g,source:null,stack:null}),r=La(l,r,h);else if(qn||di(l,r,h,!1),z=(h&l.childLanes)!==0,qn||z){if(z=Le,z!==null&&(g=nt(z,h),g!==0&&g!==ft.retryLane))throw ft.retryLane=g,$l(l,g),Pa(z,l,g),Fd;vf(L)||Eu(),r=La(l,r,h)}else vf(L)?(r.flags|=192,r.child=l.child,r=null):(l=ft.treeContext,ya&&(We=hy(L),Fn=r,se=!0,wl=null,Vi=!1,l!==null&&Pt(r,l)),r=Qh(r,g.children),r.flags|=4096);return r}return E?(gl(),L=g.fallback,E=r.mode,ft=l.child,T=ft.sibling,g=Vs(ft,{mode:"hidden",children:g.children}),g.subtreeFlags=ft.subtreeFlags&65011712,T!==null?L=Vs(T,L):(L=Dl(L,E,h,null),L.flags|=2),L.return=r,g.return=r,g.sibling=L,r.child=g,Ni(null,g),g=r.child,L=l.child.memoizedState,L===null?L=Qc(h):(E=L.cachePool,E!==null?(ft=Hi?cn._currentValue:cn._currentValue2,E=E.parent!==ft?{parent:ft,pool:ft}:E):E=Nh(),L={baseLanes:L.baseLanes|h,cachePool:E}),g.memoizedState=L,g.childLanes=Hs(l,z,h),r.memoizedState=kd,Ni(l.child,g)):(ml(r),h=l.child,l=h.sibling,h=Vs(h,{mode:"visible",children:g.children}),h.return=r,h.sibling=null,l!==null&&(z=r.deletions,z===null?(r.deletions=[l],r.flags|=16):z.push(l)),r.child=h,r.memoizedState=null,h)}function Qh(l,r){return r=is({mode:"visible",children:r},l.mode),r.return=l,l.child=r}function is(l,r){return l=i(22,l,null,r),l.lanes=0,l}function La(l,r,h){return yo(r,l.child,null,h),l=Qh(r,r.pendingProps.children),l.flags|=2,r.memoizedState=null,l}function Zc(l,r,h){l.lanes|=r;var g=l.alternate;g!==null&&(g.lanes|=r),ha(l.return,r,h)}function Ft(l,r,h,g,E,T){var z=l.memoizedState;z===null?l.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:E,treeForkCount:T}:(z.isBackwards=r,z.rendering=null,z.renderingStartTime=0,z.last=g,z.tail=h,z.tailMode=E,z.treeForkCount=T)}function Et(l,r,h){var g=r.pendingProps,E=g.revealOrder,T=g.tail;g=g.children;var z=Hn.current,L=(z&2)!==0;if(L?(z=z&1|2,r.flags|=128):z&=1,A(Hn,z),na(l,r,g,h),g=se?rt:0,!L&&l!==null&&(l.flags&128)!==0)t:for(l=r.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&Zc(l,h,r);else if(l.tag===19)Zc(l,h,r);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===r)break t;for(;l.sibling===null;){if(l.return===null||l.return===r)break t;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(E){case"forwards":for(h=r.child,E=null;h!==null;)l=h.alternate,l!==null&&yl(l)===null&&(E=h),h=h.sibling;h=E,h===null?(E=r.child,r.child=null):(E=h.sibling,h.sibling=null),Ft(r,!1,E,h,T,g);break;case"backwards":case"unstable_legacy-backwards":for(h=null,E=r.child,r.child=null;E!==null;){if(l=E.alternate,l!==null&&yl(l)===null){r.child=E;break}l=E.sibling,E.sibling=h,h=E,E=l}Ft(r,!0,h,null,T,g);break;case"together":Ft(r,!1,null,null,void 0,g);break;default:r.memoizedState=null}return r.child}function ei(l,r,h){if(l!==null&&(r.dependencies=l.dependencies),vr|=r.lanes,(h&r.childLanes)===0)if(l!==null){if(di(l,r,h,!1),(h&r.childLanes)===0)return null}else return null;if(l!==null&&r.child!==l.child)throw Error(u(153));if(r.child!==null){for(l=r.child,h=Vs(l,l.pendingProps),r.child=h,h.return=r;l.sibling!==null;)l=l.sibling,h=h.sibling=Vs(l,l.pendingProps),h.return=r;h.sibling=null}return r.child}function gu(l,r){return(l.lanes&r)!==0?!0:(l=l.dependencies,!!(l!==null&&Fi(l)))}function gn(l,r,h){switch(r.tag){case 3:le(r,r.stateNode.containerInfo),Ba(r,cn,l.memoizedState.cache),ta();break;case 27:case 5:xe(r);break;case 4:le(r,r.stateNode.containerInfo);break;case 10:Ba(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,lu(r),null;break;case 13:var g=r.memoizedState;if(g!==null)return g.dehydrated!==null?(ml(r),r.flags|=128,null):(h&r.child.childLanes)!==0?Kh(l,r,h):(ml(r),l=ei(l,r,h),l!==null?l.sibling:null);ml(r);break;case 19:var E=(l.flags&128)!==0;if(g=(h&r.childLanes)!==0,g||(di(l,r,h,!1),g=(h&r.childLanes)!==0),E){if(g)return Et(l,r,h);r.flags|=128}if(E=r.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),A(Hn,Hn.current),g)break;return null;case 22:return r.lanes=0,El(l,r,h,r.pendingProps);case 24:Ba(r,cn,l.memoizedState.cache)}return ei(l,r,h)}function Zh(l,r,h){if(l!==null)if(l.memoizedProps!==r.pendingProps)qn=!0;else{if(!gu(l,h)&&(r.flags&128)===0)return qn=!1,gn(l,r,h);qn=(l.flags&131072)!==0}else qn=!1,se&&(r.flags&1048576)!==0&&W(r,rt,r.index);switch(r.lanes=0,r.tag){case 16:t:{var g=r.pendingProps;if(l=Wa(r.elementType),r.type=l,typeof l=="function")lf(l)?(g=zs(l,g),r.tag=1,r=J0(null,r,l,g,h)):(r.tag=0,r=Q0(null,r,l,g,h));else{if(l!=null){var E=l.$$typeof;if(E===Cu){r.tag=11,r=qc(null,r,l,g,h);break t}else if(E===gm){r.tag=14,r=Yh(null,r,l,g,h);break t}}throw r=_(l)||l,Error(u(306,r,""))}}return r;case 0:return Q0(l,r,r.type,r.pendingProps,h);case 1:return g=r.type,E=zs(g,r.pendingProps),J0(l,r,g,E,h);case 3:t:{if(le(r,r.stateNode.containerInfo),l===null)throw Error(u(387));var T=r.pendingProps;E=r.memoizedState,g=E.element,Jr(l,r),Fr(r,T,null,h);var z=r.memoizedState;if(T=z.cache,Ba(r,cn,T),T!==E.cache&&Ji(r,[cn],h,!0),su(),T=z.element,ya&&E.isDehydrated)if(E={element:T,isDehydrated:!1,cache:z.cache},r.updateQueue.baseState=E,r.memoizedState=E,r.flags&256){r=Xh(l,r,T,h);break t}else if(T!==g){g=at(Error(u(424)),r),An(g),r=Xh(l,r,T,h);break t}else for(ya&&(We=Nd(r.stateNode.containerInfo),Fn=r,se=!0,wl=null,Vi=!0),h=zy(r,null,T,h),r.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(ta(),T===g){r=ei(l,r,h);break t}na(l,r,T,h)}r=r.child}return r;case 26:if(wi)return Kc(l,r),l===null?(h=Mu(r.type,null,r.pendingProps,null))?r.memoizedState=h:se||(r.stateNode=Dy(r.type,r.pendingProps,dr.current,r)):r.memoizedState=Mu(r.type,l.memoizedProps,r.pendingProps,l.memoizedState),null;case 27:if(Ln)return xe(r),l===null&&Ln&&se&&(g=r.stateNode=wd(r.type,r.pendingProps,dr.current,ba.current,!1),Fn=r,Vi=!0,We=r3(r.type,g,We)),na(l,r,r.pendingProps.children,h),Kc(l,r),l===null&&(r.flags|=4194304),r.child;case 5:return l===null&&se&&(h3(r.type,r.pendingProps,ba.current),(E=g=We)&&(g=o3(g,r.type,r.pendingProps,Vi),g!==null?(r.stateNode=g,Fn=r,We=Md(g),Vi=!1,E=!0):E=!1),E||ln(r)),xe(r),E=r.type,T=r.pendingProps,z=l!==null?l.memoizedProps:null,g=T.children,pf(E,T)?g=null:z!==null&&pf(E,z)&&(r.flags|=32),r.memoizedState!==null&&(E=Nc(l,r,Rh,null,null,h),Hi?fr._currentValue=E:fr._currentValue2=E),Kc(l,r),na(l,r,g,h),r.child;case 6:return l===null&&se&&(Rm(r.pendingProps,ba.current),(l=h=We)&&(h=dy(h,r.pendingProps,Vi),h!==null?(r.stateNode=h,Fn=r,We=null,l=!0):l=!1),l||ln(r)),null;case 13:return Kh(l,r,h);case 4:return le(r,r.stateNode.containerInfo),g=r.pendingProps,l===null?r.child=yo(r,null,g,h):na(l,r,g,h),r.child;case 11:return qc(l,r,r.type,r.pendingProps,h);case 7:return na(l,r,r.pendingProps,h),r.child;case 8:return na(l,r,r.pendingProps.children,h),r.child;case 12:return na(l,r,r.pendingProps.children,h),r.child;case 10:return g=r.pendingProps,Ba(r,r.type,g.value),na(l,r,g.children,h),r.child;case 9:return E=r.type._context,g=r.pendingProps.children,Mn(r),E=on(E),g=g(E),r.flags|=1,na(l,r,g,h),r.child;case 14:return Yh(l,r,r.type,r.pendingProps,h);case 15:return qh(l,r,r.type,r.pendingProps,h);case 19:return Et(l,r,h);case 31:return Xc(l,r,h);case 22:return El(l,r,h,r.pendingProps);case 24:return Mn(r),g=on(cn),l===null?(E=qr(),E===null&&(E=Le,T=Ae(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=h),E=T),r.memoizedState={parent:g,cache:E},Dc(r),Ba(r,cn,E)):((l.lanes&h)!==0&&(Jr(l,r),Fr(r,null,null,h),su()),E=l.memoizedState,T=r.memoizedState,E.parent!==g?(E={parent:g,cache:g},r.memoizedState=E,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=E),Ba(r,cn,g)):(g=T.cache,Ba(r,cn,g),g!==E.cache&&Ji(r,[cn],h,!0))),na(l,r,r.pendingProps.children,h),r.child;case 29:throw r.pendingProps}throw Error(u(156,r.tag))}function gi(l){l.flags|=4}function Jc(l){us&&(l.flags|=8)}function Jh(l,r){if(l!==null&&l.child===r.child)return!1;if((r.flags&16)!==0)return!0;for(l=r.child;l!==null;){if((l.flags&8218)!==0||(l.subtreeFlags&8218)!==0)return!0;l=l.sibling}return!1}function F0(l,r,h,g){if(Aa)for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)Cd(l,h.stateNode);else if(!(h.tag===4||Ln&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break;for(;h.sibling===null;){if(h.return===null||h.return===r)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(us)for(var E=r.child;E!==null;){if(E.tag===5){var T=E.stateNode;h&&g&&(T=Nl(T,E.type,E.memoizedProps)),Cd(l,T)}else if(E.tag===6)T=E.stateNode,h&&g&&(T=yf(T,E.memoizedProps)),Cd(l,T);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)T=E.child,T!==null&&(T.return=E),F0(l,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===r)break;for(;E.sibling===null;){if(E.return===null||E.return===r)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function Fh(l,r,h,g){var E=!1;if(us)for(var T=r.child;T!==null;){if(T.tag===5){var z=T.stateNode;h&&g&&(z=Nl(z,T.type,T.memoizedProps)),Dm(l,z)}else if(T.tag===6)z=T.stateNode,h&&g&&(z=yf(z,T.memoizedProps)),Dm(l,z);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)E=T.child,E!==null&&(E.return=T),Fh(l,T,!0,!0),E=!0;else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===r)break;for(;T.sibling===null;){if(T.return===null||T.return===r)return E;T=T.return}T.sibling.return=T.return,T=T.sibling}return E}function kh(l,r){if(us&&Jh(l,r)){l=r.stateNode;var h=l.containerInfo,g=Ie();Fh(g,r,!1,!1),l.pendingChildren=g,gi(r),ry(h,g)}}function Fc(l,r,h,g){if(Aa)l.memoizedProps!==g&&gi(r);else if(us){var E=l.stateNode,T=l.memoizedProps;if((l=Jh(l,r))||T!==g){var z=ba.current;T=ly(E,h,T,g,!l,null),T===E?r.stateNode=E:(Jc(r),qg(T,h,g,z)&&gi(r),r.stateNode=T,l&&F0(T,r,!1,!1))}else r.stateNode=E}}function ga(l,r,h,g,E){if((l.mode&32)!==0&&(h===null?Zg(r,g):s3(r,h,g))){if(l.flags|=16777216,(E&335544128)===E||_u(r,g))if(va(l.stateNode,r,g))l.flags|=8192;else if(Bg())l.flags|=8192;else throw Gi=Xd,Yd}else l.flags&=-16777217}function De(l,r){if(d3(r)){if(l.flags|=16777216,!Hd(r))if(Bg())l.flags|=8192;else throw Gi=Xd,Yd}else l.flags&=-16777217}function to(l,r){r!==null&&(l.flags|=4),l.flags&16384&&(r=l.tag!==22?V():536870912,l.lanes|=r,Pu|=r)}function Tl(l,r){if(!se)switch(l.tailMode){case"hidden":r=l.tail;for(var h=null;r!==null;)r.alternate!==null&&(h=r),r=r.sibling;h===null?l.tail=null:h.sibling=null;break;case"collapsed":h=l.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?r||l.tail===null?l.tail=null:l.tail.sibling=null:g.sibling=null}}function Ce(l){var r=l.alternate!==null&&l.alternate.child===l.child,h=0,g=0;if(r)for(var E=l.child;E!==null;)h|=E.lanes|E.childLanes,g|=E.subtreeFlags&65011712,g|=E.flags&65011712,E.return=l,E=E.sibling;else for(E=l.child;E!==null;)h|=E.lanes|E.childLanes,g|=E.subtreeFlags,g|=E.flags,E.return=l,E=E.sibling;return l.subtreeFlags|=g,l.childLanes=h,r}function eo(l,r,h){var g=r.pendingProps;switch(Tt(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(r),null;case 1:return Ce(r),null;case 3:return h=r.stateNode,g=null,l!==null&&(g=l.memoizedState.cache),r.memoizedState.cache!==g&&(r.flags|=2048),rn(cn),xn(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(l===null||l.child===null)&&(ue(r)?gi(r):l===null||l.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,ea())),kh(l,r),Ce(r),null;case 26:if(wi){var E=r.type,T=r.memoizedState;return l===null?(gi(r),T!==null?(Ce(r),De(r,T)):(Ce(r),ga(r,E,null,g,h))):T?T!==l.memoizedState?(gi(r),Ce(r),De(r,T)):(Ce(r),r.flags&=-16777217):(T=l.memoizedProps,Aa?T!==g&&gi(r):Fc(l,r,E,g),Ce(r),ga(r,E,T,g,h)),null}case 27:if(Ln){if(Dn(r),h=dr.current,E=r.type,l!==null&&r.stateNode!=null)Aa?l.memoizedProps!==g&&gi(r):Fc(l,r,E,g);else{if(!g){if(r.stateNode===null)throw Error(u(166));return Ce(r),null}l=ba.current,ue(r)?Be(r,l):(l=wd(E,g,h,l,!0),r.stateNode=l,gi(r))}return Ce(r),null}case 5:if(Dn(r),E=r.type,l!==null&&r.stateNode!=null)Fc(l,r,E,g);else{if(!g){if(r.stateNode===null)throw Error(u(166));return Ce(r),null}if(T=ba.current,ue(r))Be(r,T),by(r.stateNode,E,g,T)&&(r.flags|=64);else{var z=js(E,g,dr.current,T,r);Jc(r),F0(z,r,!1,!1),r.stateNode=z,qg(z,E,g,T)&&gi(r)}}return Ce(r),ga(r,r.type,l===null?null:l.memoizedProps,r.pendingProps,h),null;case 6:if(l&&r.stateNode!=null)h=l.memoizedProps,Aa?h!==g&&gi(r):us&&(h!==g?(l=dr.current,h=ba.current,Jc(r),r.stateNode=_d(g,l,h,r)):r.stateNode=l.stateNode);else{if(typeof g!="string"&&r.stateNode===null)throw Error(u(166));if(l=dr.current,h=ba.current,ue(r)){if(!ya)throw Error(u(176));if(l=r.stateNode,h=r.memoizedProps,g=null,E=Fn,E!==null)switch(E.tag){case 27:case 5:g=E.memoizedProps}Od(l,h,r,g)||ln(r,!0)}else Jc(r),r.stateNode=_d(g,l,h,r)}return Ce(r),null;case 31:if(h=r.memoizedState,l===null||l.memoizedState!==null){if(g=ue(r),h!==null){if(l===null){if(!g)throw Error(u(318));if(!ya)throw Error(u(556));if(l=r.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(557));my(l,r)}else ta(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ce(r),l=!1}else h=ea(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=h),l=!0;if(!l)return r.flags&256?($a(r),r):($a(r),null);if((r.flags&128)!==0)throw Error(u(558))}return Ce(r),null;case 13:if(g=r.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(E=ue(r),g!==null&&g.dehydrated!==null){if(l===null){if(!E)throw Error(u(318));if(!ya)throw Error(u(344));if(E=r.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(u(317));Nm(E,r)}else ta(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ce(r),E=!1}else E=ea(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=E),E=!0;if(!E)return r.flags&256?($a(r),r):($a(r),null)}return $a(r),(r.flags&128)!==0?(r.lanes=h,r):(h=g!==null,l=l!==null&&l.memoizedState!==null,h&&(g=r.child,E=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(E=g.alternate.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==E&&(g.flags|=2048)),h!==l&&h&&(r.child.flags|=8192),to(r,r.updateQueue),Ce(r),null);case 4:return xn(),kh(l,r),l===null&&i3(r.stateNode.containerInfo),Ce(r),null;case 10:return rn(r.type),Ce(r),null;case 19:if(D(Hn),g=r.memoizedState,g===null)return Ce(r),null;if(E=(r.flags&128)!==0,T=g.rendering,T===null)if(E)Tl(g,!1);else{if(yn!==0||l!==null&&(l.flags&128)!==0)for(l=r.child;l!==null;){if(T=yl(l),T!==null){for(r.flags|=128,Tl(g,!1),l=T.updateQueue,r.updateQueue=l,to(r,l),r.subtreeFlags=0,l=h,h=r.child;h!==null;)fm(h,l),h=h.sibling;return A(Hn,Hn.current&1|2),se&&St(r,g.treeForkCount),r.child}l=l.sibling}g.tail!==null&&Me()>Yu&&(r.flags|=128,E=!0,Tl(g,!1),r.lanes=4194304)}else{if(!E)if(l=yl(T),l!==null){if(r.flags|=128,E=!0,l=l.updateQueue,r.updateQueue=l,to(r,l),Tl(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!se)return Ce(r),null}else 2*Me()-g.renderingStartTime>Yu&&h!==536870912&&(r.flags|=128,E=!0,Tl(g,!1),r.lanes=4194304);g.isBackwards?(T.sibling=r.child,r.child=T):(l=g.last,l!==null?l.sibling=T:r.child=T,g.last=T)}return g.tail!==null?(l=g.tail,g.rendering=l,g.tail=l.sibling,g.renderingStartTime=Me(),l.sibling=null,h=Hn.current,A(Hn,E?h&1|2:h&1),se&&St(r,g.treeForkCount),l):(Ce(r),null);case 22:case 23:return $a(r),pl(),g=r.memoizedState!==null,l!==null?l.memoizedState!==null!==g&&(r.flags|=8192):g&&(r.flags|=8192),g?(h&536870912)!==0&&(r.flags&128)===0&&(Ce(r),r.subtreeFlags&6&&(r.flags|=8192)):Ce(r),h=r.updateQueue,h!==null&&to(r,h.retryQueue),h=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),g=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(g=r.memoizedState.cachePool.pool),g!==h&&(r.flags|=2048),l!==null&&D(pr),null;case 24:return h=null,l!==null&&(h=l.memoizedState.cache),r.memoizedState.cache!==h&&(r.flags|=2048),rn(cn),Ce(r),null;case 25:return null;case 30:return null}throw Error(u(156,r.tag))}function ss(l,r){switch(Tt(r),r.tag){case 1:return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 3:return rn(cn),xn(),l=r.flags,(l&65536)!==0&&(l&128)===0?(r.flags=l&-65537|128,r):null;case 26:case 27:case 5:return Dn(r),null;case 31:if(r.memoizedState!==null){if($a(r),r.alternate===null)throw Error(u(340));ta()}return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 13:if($a(r),l=r.memoizedState,l!==null&&l.dehydrated!==null){if(r.alternate===null)throw Error(u(340));ta()}return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 19:return D(Hn),null;case 4:return xn(),null;case 10:return rn(r.type),null;case 22:case 23:return $a(r),pl(),l!==null&&D(pr),l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 24:return rn(cn),null;case 25:return null;default:return null}}function Ih(l,r){switch(Tt(r),r.tag){case 3:rn(cn),xn();break;case 26:case 27:case 5:Dn(r);break;case 4:xn();break;case 31:r.memoizedState!==null&&$a(r);break;case 13:$a(r);break;case 19:D(Hn);break;case 10:rn(r.type);break;case 22:case 23:$a(r),pl(),l!==null&&D(pr);break;case 24:rn(cn)}}function ws(l,r){try{var h=r.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var E=g.next;h=E;do{if((h.tag&l)===l){g=void 0;var T=h.create,z=h.inst;g=T(),z.destroy=g}h=h.next}while(h!==E)}}catch(L){be(r,r.return,L)}}function Us(l,r,h){try{var g=r.updateQueue,E=g!==null?g.lastEffect:null;if(E!==null){var T=E.next;g=T;do{if((g.tag&l)===l){var z=g.inst,L=z.destroy;if(L!==void 0){z.destroy=void 0,E=r;var ft=h,vt=L;try{vt()}catch(Mt){be(E,ft,Mt)}}}g=g.next}while(g!==T)}}catch(Mt){be(r,r.return,Mt)}}function yu(l){var r=l.updateQueue;if(r!==null){var h=l.stateNode;try{_g(r,h)}catch(g){be(l,l.return,g)}}}function Wh(l,r,h){h.props=zs(l.type,l.memoizedProps),h.state=l.memoizedState;try{h.componentWillUnmount()}catch(g){be(l,r,g)}}function nr(l,r){try{var h=l.ref;if(h!==null){switch(l.tag){case 26:case 27:case 5:var g=hf(l.stateNode);break;case 30:g=l.stateNode;break;default:g=l.stateNode}typeof h=="function"?l.refCleanup=h(g):h.current=g}}catch(E){be(l,r,E)}}function ls(l,r){var h=l.ref,g=l.refCleanup;if(h!==null)if(typeof g=="function")try{g()}catch(E){be(l,r,E)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(E){be(l,r,E)}else h.current=null}function k0(l){var r=l.type,h=l.memoizedProps,g=l.stateNode;try{ey(g,r,h,l)}catch(E){be(l,l.return,E)}}function $h(l,r,h){try{xd(l.stateNode,l.type,h,r,l)}catch(g){be(l,l.return,g)}}function I0(l){return l.tag===5||l.tag===3||(wi?l.tag===26:!1)||(Ln?l.tag===27&&fo(l.type):!1)||l.tag===4}function td(l){t:for(;;){for(;l.sibling===null;){if(l.return===null||I0(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(Ln&&l.tag===27&&fo(l.type)||l.flags&2||l.child===null||l.tag===4)continue t;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function kc(l,r,h){var g=l.tag;if(g===5||g===6)l=l.stateNode,r?ay(h,l,r):ty(h,l);else if(g!==4&&(Ln&&g===27&&fo(l.type)&&(h=l.stateNode,r=null),l=l.child,l!==null))for(kc(l,r,h),l=l.sibling;l!==null;)kc(l,r,h),l=l.sibling}function vu(l,r,h){var g=l.tag;if(g===5||g===6)l=l.stateNode,r?ny(h,l,r):$g(h,l);else if(g!==4&&(Ln&&g===27&&fo(l.type)&&(h=l.stateNode),l=l.child,l!==null))for(vu(l,r,h),l=l.sibling;l!==null;)vu(l,r,h),l=l.sibling}function ed(l,r,h){l=l.containerInfo;try{oy(l,h)}catch(g){be(r,r.return,g)}}function W0(l){var r=l.stateNode,h=l.memoizedProps;try{Ud(l.type,h,r,l)}catch(g){be(l,l.return,g)}}function Ng(l,r){for(a3(l.containerInfo),aa=r;aa!==null;)if(l=aa,r=l.child,(l.subtreeFlags&1028)!==0&&r!==null)r.return=l,aa=r;else for(;aa!==null;){l=aa;var h=l.alternate;switch(r=l.flags,l.tag){case 0:if((r&4)!==0&&(r=l.updateQueue,r=r!==null?r.events:null,r!==null))for(var g=0;g<r.length;g++){var E=r[g];E.ref.impl=E.nextImpl}break;case 11:case 15:break;case 1:if((r&1024)!==0&&h!==null){r=void 0,g=l,E=h.memoizedProps,h=h.memoizedState;var T=g.stateNode;try{var z=zs(g.type,E);r=T.getSnapshotBeforeUpdate(z,h),T.__reactInternalSnapshotBeforeUpdate=r}catch(L){be(g,g.return,L)}}break;case 3:(r&1024)!==0&&Aa&&vi(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(u(163))}if(r=l.sibling,r!==null){r.return=l.return,aa=r;break}aa=l.return}}function $0(l,r,h){var g=h.flags;switch(h.tag){case 0:case 11:case 15:Ri(l,h),g&4&&ws(5,h);break;case 1:if(Ri(l,h),g&4)if(l=h.stateNode,r===null)try{l.componentDidMount()}catch(z){be(h,h.return,z)}else{var E=zs(h.type,r.memoizedProps);r=r.memoizedState;try{l.componentDidUpdate(E,r,l.__reactInternalSnapshotBeforeUpdate)}catch(z){be(h,h.return,z)}}g&64&&yu(h),g&512&&nr(h,h.return);break;case 3:if(Ri(l,h),g&64&&(g=h.updateQueue,g!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=hf(h.child.stateNode);break;case 1:l=h.child.stateNode}try{_g(g,l)}catch(z){be(h,h.return,z)}}break;case 27:Ln&&r===null&&g&4&&W0(h);case 26:case 5:if(Ri(l,h),r===null){if(g&4)k0(h);else if(g&64){l=h.type,r=h.memoizedProps,E=h.stateNode;try{vy(E,l,r,h)}catch(z){be(h,h.return,z)}}}g&512&&nr(h,h.return);break;case 12:Ri(l,h);break;case 31:Ri(l,h),g&4&&tm(l,h);break;case 13:Ri(l,h),g&4&&ad(l,h),g&64&&(g=h.memoizedState,g!==null&&(g=g.dehydrated,g!==null&&(h=pd.bind(null,h),xu(g,h))));break;case 22:if(g=h.memoizedState!==null||Zs,!g){r=r!==null&&r.memoizedState!==null||wn,E=Zs;var T=wn;Zs=g,(wn=r)&&!T?rs(l,h,(h.subtreeFlags&8772)!==0):Ri(l,h),Zs=E,wn=T}break;case 30:break;default:Ri(l,h)}}function Og(l){var r=l.alternate;r!==null&&(l.alternate=null,Og(r)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(r=l.stateNode,r!==null&&Qg(r)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Oi(l,r,h){for(h=h.child;h!==null;)nd(l,r,h),h=h.sibling}function nd(l,r,h){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(po,h)}catch{}switch(h.tag){case 26:if(wi){wn||ls(h,r),Oi(l,r,h),h.memoizedState?xy(h.memoizedState):h.stateNode&&Hm(h.stateNode);break}case 27:if(Ln){wn||ls(h,r);var g=Xn,E=oi;fo(h.type)&&(Xn=h.stateNode,oi=!1),Oi(l,r,h),hr(h.stateNode),Xn=g,oi=E;break}case 5:wn||ls(h,r);case 6:if(Aa){if(g=Xn,E=oi,Xn=null,Oi(l,r,h),Xn=g,oi=E,Xn!==null)if(oi)try{xm(Xn,h.stateNode)}catch(T){be(h,r,T)}else try{_m(Xn,h.stateNode)}catch(T){be(h,r,T)}}else Oi(l,r,h);break;case 18:Aa&&Xn!==null&&(oi?Om(Xn,h.stateNode):Ee(Xn,h.stateNode));break;case 4:Aa?(g=Xn,E=oi,Xn=h.stateNode.containerInfo,oi=!0,Oi(l,r,h),Xn=g,oi=E):(us&&ed(h.stateNode,h,Ie()),Oi(l,r,h));break;case 0:case 11:case 14:case 15:Us(2,h,r),wn||Us(4,h,r),Oi(l,r,h);break;case 1:wn||(ls(h,r),g=h.stateNode,typeof g.componentWillUnmount=="function"&&Wh(h,r,g)),Oi(l,r,h);break;case 21:Oi(l,r,h);break;case 22:wn=(g=wn)||h.memoizedState!==null,Oi(l,r,h),wn=g;break;default:Oi(l,r,h)}}function tm(l,r){if(ya&&r.memoizedState===null&&(l=r.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{Sy(l)}catch(h){be(r,r.return,h)}}}function ad(l,r){if(ya&&r.memoizedState===null&&(l=r.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Au(l)}catch(h){be(r,r.return,h)}}function Rg(l){switch(l.tag){case 31:case 13:case 19:var r=l.stateNode;return r===null&&(r=l.stateNode=new Id),r;case 22:return l=l.stateNode,r=l._retryCache,r===null&&(r=l._retryCache=new Id),r;default:throw Error(u(435,l.tag))}}function Ic(l,r){var h=Rg(l);r.forEach(function(g){if(!h.has(g)){h.add(g);var E=Lg.bind(null,l,g);g.then(E,E)}})}function Nn(l,r){var h=r.deletions;if(h!==null)for(var g=0;g<h.length;g++){var E=h[g],T=l,z=r;if(Aa){var L=z;t:for(;L!==null;){switch(L.tag){case 27:if(Ln){if(fo(L.type)){Xn=L.stateNode,oi=!1;break t}break}case 5:Xn=L.stateNode,oi=!1;break t;case 3:case 4:Xn=L.stateNode.containerInfo,oi=!0;break t}L=L.return}if(Xn===null)throw Error(u(160));nd(T,z,E),Xn=null,oi=!1}else nd(T,z,E);T=E.alternate,T!==null&&(T.return=null),E.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Wc(r,l),r=r.sibling}function Wc(l,r){var h=l.alternate,g=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:Nn(r,l),xa(l),g&4&&(Us(3,l,l.return),ws(3,l),Us(5,l,l.return));break;case 1:Nn(r,l),xa(l),g&512&&(wn||h===null||ls(h,h.return)),g&64&&Zs&&(l=l.updateQueue,l!==null&&(g=l.callbacks,g!==null&&(h=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=h===null?g:h.concat(g))));break;case 26:if(wi){var E=ps;if(Nn(r,l),xa(l),g&512&&(wn||h===null||ls(h,h.return)),g&4){g=h!==null?h.memoizedState:null;var T=l.memoizedState;h===null?T===null?l.stateNode===null?l.stateNode=co(E,l.type,l.memoizedProps,l):zd(E,l.type,l.stateNode):l.stateNode=_y(E,T,l.memoizedProps):g!==T?(g===null?h.stateNode!==null&&Hm(h.stateNode):xy(g),T===null?zd(E,l.type,l.stateNode):_y(E,T,l.memoizedProps)):T===null&&l.stateNode!==null&&$h(l,l.memoizedProps,h.memoizedProps)}break}case 27:if(Ln){Nn(r,l),xa(l),g&512&&(wn||h===null||ls(h,h.return)),h!==null&&g&4&&$h(l,l.memoizedProps,h.memoizedProps);break}case 5:if(Nn(r,l),xa(l),g&512&&(wn||h===null||ls(h,h.return)),Aa){if(l.flags&32){E=l.stateNode;try{Dd(E)}catch(xt){be(l,l.return,xt)}}g&4&&l.stateNode!=null&&(E=l.memoizedProps,$h(l,E,h!==null?h.memoizedProps:E)),g&1024&&(Mf=!0)}else us&&l.alternate!==null&&(l.alternate.stateNode=l.stateNode);break;case 6:if(Nn(r,l),xa(l),g&4&&Aa){if(l.stateNode===null)throw Error(u(162));g=l.memoizedProps,h=h!==null?h.memoizedProps:g,E=l.stateNode;try{gf(E,h,g)}catch(xt){be(l,l.return,xt)}}break;case 3:if(wi?(Ay(),E=ps,ps=Rd(r.containerInfo),Nn(r,l),ps=E):Nn(r,l),xa(l),g&4){if(Aa&&ya&&h!==null&&h.memoizedState.isDehydrated)try{c3(r.containerInfo)}catch(xt){be(l,l.return,xt)}if(us){g=r.containerInfo,h=r.pendingChildren;try{oy(g,h)}catch(xt){be(l,l.return,xt)}}}Mf&&(Mf=!1,zg(l));break;case 4:wi?(h=ps,ps=Rd(l.stateNode.containerInfo),Nn(r,l),xa(l),ps=h):(Nn(r,l),xa(l)),g&4&&us&&ed(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:Nn(r,l),xa(l);break;case 31:Nn(r,l),xa(l),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,Ic(l,g)));break;case 13:Nn(r,l),xa(l),l.child.flags&8192&&l.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Rf=Me()),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,Ic(l,g)));break;case 22:E=l.memoizedState!==null;var z=h!==null&&h.memoizedState!==null,L=Zs,ft=wn;if(Zs=L||E,wn=ft||z,Nn(r,l),wn=ft,Zs=L,xa(l),g&8192&&(r=l.stateNode,r._visibility=E?r._visibility&-2:r._visibility|1,E&&(h===null||z||Zs||wn||zi(l)),Aa)){t:if(h=null,Aa)for(r=l;;){if(r.tag===5||wi&&r.tag===26){if(h===null){z=h=r;try{T=z.stateNode,E?iy(T):l3(z.stateNode,z.memoizedProps)}catch(xt){be(z,z.return,xt)}}}else if(r.tag===6){if(h===null){z=r;try{var vt=z.stateNode;E?Ad(vt):sy(vt,z.memoizedProps)}catch(xt){be(z,z.return,xt)}}}else if(r.tag===18){if(h===null){z=r;try{var Mt=z.stateNode;E?f3(Mt):Ty(z.stateNode)}catch(xt){be(z,z.return,xt)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===l)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break t;for(;r.sibling===null;){if(r.return===null||r.return===l)break t;h===r&&(h=null),r=r.return}h===r&&(h=null),r.sibling.return=r.return,r=r.sibling}}g&4&&(g=l.updateQueue,g!==null&&(h=g.retryQueue,h!==null&&(g.retryQueue=null,Ic(l,h))));break;case 19:Nn(r,l),xa(l),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,Ic(l,g)));break;case 30:break;case 21:break;default:Nn(r,l),xa(l)}}function xa(l){var r=l.flags;if(r&2){try{for(var h,g=l.return;g!==null;){if(I0(g)){h=g;break}g=g.return}if(Aa){if(h==null)throw Error(u(160));switch(h.tag){case 27:if(Ln){var E=h.stateNode,T=td(l);vu(l,T,E);break}case 5:var z=h.stateNode;h.flags&32&&(Dd(z),h.flags&=-33);var L=td(l);vu(l,L,z);break;case 3:case 4:var ft=h.stateNode.containerInfo,vt=td(l);kc(l,vt,ft);break;default:throw Error(u(161))}}}catch(Mt){be(l,l.return,Mt)}l.flags&=-3}r&4096&&(l.flags&=-4097)}function zg(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var r=l;zg(r),r.tag===5&&r.flags&1024&&lo(r.stateNode),l=l.sibling}}function Ri(l,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)$0(l,r.alternate,r),r=r.sibling}function zi(l){for(l=l.child;l!==null;){var r=l;switch(r.tag){case 0:case 11:case 14:case 15:Us(4,r,r.return),zi(r);break;case 1:ls(r,r.return);var h=r.stateNode;typeof h.componentWillUnmount=="function"&&Wh(r,r.return,h),zi(r);break;case 27:Ln&&hr(r.stateNode);case 26:case 5:ls(r,r.return),zi(r);break;case 22:r.memoizedState===null&&zi(r);break;case 30:zi(r);break;default:zi(r)}l=l.sibling}}function rs(l,r,h){for(h=h&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var g=r.alternate,E=l,T=r,z=T.flags;switch(T.tag){case 0:case 11:case 15:rs(E,T,h),ws(4,T);break;case 1:if(rs(E,T,h),g=T,E=g.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(vt){be(g,g.return,vt)}if(g=T,E=g.updateQueue,E!==null){var L=g.stateNode;try{var ft=E.shared.hiddenCallbacks;if(ft!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ft.length;E++)H0(ft[E],L)}catch(vt){be(g,g.return,vt)}}h&&z&64&&yu(T),nr(T,T.return);break;case 27:Ln&&W0(T);case 26:case 5:rs(E,T,h),h&&g===null&&z&4&&k0(T),nr(T,T.return);break;case 12:rs(E,T,h);break;case 31:rs(E,T,h),h&&z&4&&tm(E,T);break;case 13:rs(E,T,h),h&&z&4&&ad(E,T);break;case 22:T.memoizedState===null&&rs(E,T,h),nr(T,T.return);break;case 30:break;default:rs(E,T,h)}r=r.sibling}}function Cl(l,r){var h=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==h&&(l!=null&&l.refCount++,h!=null&&jn(h))}function Da(l,r){l=null,r.alternate!==null&&(l=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==l&&(r.refCount++,l!=null&&jn(l))}function ni(l,r,h,g){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Hg(l,r,h,g),r=r.sibling}function Hg(l,r,h,g){var E=r.flags;switch(r.tag){case 0:case 11:case 15:ni(l,r,h,g),E&2048&&ws(9,r);break;case 1:ni(l,r,h,g);break;case 3:ni(l,r,h,g),E&2048&&(l=null,r.alternate!==null&&(l=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==l&&(r.refCount++,l!=null&&jn(l)));break;case 12:if(E&2048){ni(l,r,h,g),l=r.stateNode;try{var T=r.memoizedProps,z=T.id,L=T.onPostCommit;typeof L=="function"&&L(z,r.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(ft){be(r,r.return,ft)}}else ni(l,r,h,g);break;case 31:ni(l,r,h,g);break;case 13:ni(l,r,h,g);break;case 23:break;case 22:T=r.stateNode,z=r.alternate,r.memoizedState!==null?T._visibility&2?ni(l,r,h,g):ir(l,r):T._visibility&2?ni(l,r,h,g):(T._visibility|=2,ar(l,r,h,g,(r.subtreeFlags&10256)!==0||!1)),E&2048&&Cl(z,r);break;case 24:ni(l,r,h,g),E&2048&&Da(r.alternate,r);break;default:ni(l,r,h,g)}}function ar(l,r,h,g,E){for(E=E&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var T=l,z=r,L=h,ft=g,vt=z.flags;switch(z.tag){case 0:case 11:case 15:ar(T,z,L,ft,E),ws(8,z);break;case 23:break;case 22:var Mt=z.stateNode;z.memoizedState!==null?Mt._visibility&2?ar(T,z,L,ft,E):ir(T,z):(Mt._visibility|=2,ar(T,z,L,ft,E)),E&&vt&2048&&Cl(z.alternate,z);break;case 24:ar(T,z,L,ft,E),E&&vt&2048&&Da(z.alternate,z);break;default:ar(T,z,L,ft,E)}r=r.sibling}}function ir(l,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var h=l,g=r,E=g.flags;switch(g.tag){case 22:ir(h,g),E&2048&&Cl(g.alternate,g);break;case 24:ir(h,g),E&2048&&Da(g.alternate,g);break;default:ir(h,g)}r=r.sibling}}function _l(l,r,h){if(l.subtreeFlags&gr)for(l=l.child;l!==null;)em(l,r,h),l=l.sibling}function em(l,r,h){switch(l.tag){case 26:if(_l(l,r,h),l.flags&gr)if(l.memoizedState!==null)Ol(h,ps,l.memoizedState,l.memoizedProps);else{var g=l.stateNode,E=l.type;l=l.memoizedProps,((r&335544128)===r||_u(E,l))&&Ma(h,g,E,l)}break;case 5:_l(l,r,h),l.flags&gr&&(g=l.stateNode,E=l.type,l=l.memoizedProps,((r&335544128)===r||_u(E,l))&&Ma(h,g,E,l));break;case 3:case 4:wi?(g=ps,ps=Rd(l.stateNode.containerInfo),_l(l,r,h),ps=g):_l(l,r,h);break;case 22:l.memoizedState===null&&(g=l.alternate,g!==null&&g.memoizedState!==null?(g=gr,gr=16777216,_l(l,r,h),gr=g):_l(l,r,h));break;default:_l(l,r,h)}}function id(l){var r=l.alternate;if(r!==null&&(l=r.child,l!==null)){r.child=null;do r=l.sibling,l.sibling=null,l=r;while(l!==null)}}function sr(l){var r=l.deletions;if((l.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];aa=g,ld(g,l)}id(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)sd(l),l=l.sibling}function sd(l){switch(l.tag){case 0:case 11:case 15:sr(l),l.flags&2048&&Us(9,l,l.return);break;case 3:sr(l);break;case 12:sr(l);break;case 22:var r=l.stateNode;l.memoizedState!==null&&r._visibility&2&&(l.return===null||l.return.tag!==13)?(r._visibility&=-3,no(l)):sr(l);break;default:sr(l)}}function no(l){var r=l.deletions;if((l.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];aa=g,ld(g,l)}id(l)}for(l=l.child;l!==null;){switch(r=l,r.tag){case 0:case 11:case 15:Us(8,r,r.return),no(r);break;case 22:h=r.stateNode,h._visibility&2&&(h._visibility&=-3,no(r));break;default:no(r)}l=l.sibling}}function ld(l,r){for(;aa!==null;){var h=aa;switch(h.tag){case 0:case 11:case 15:Us(8,h,r);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var g=h.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:jn(h.memoizedState.cache)}if(g=h.child,g!==null)g.return=h,aa=g;else t:for(h=l;aa!==null;){g=aa;var E=g.sibling,T=g.return;if(Og(g),g===h){aa=null;break t}if(E!==null){E.return=T,aa=E;break t}aa=T}}}function Su(l){var r=Kg(l);if(r!=null){if(typeof r.memoizedProps["data-testname"]!="string")throw Error(u(364));return r}if(l=Cm(l),l===null)throw Error(u(362));return l.stateNode.current}function $c(l,r){var h=l.tag;switch(r.$$typeof){case Wd:if(l.type===r.value)return!0;break;case $d:t:{for(r=r.value,l=[l,0],h=0;h<l.length;){var g=l[h++],E=g.tag,T=l[h++],z=r[T];if(E!==5&&E!==26&&E!==27||!Ys(g)){for(;z!=null&&$c(g,z);)T++,z=r[T];if(T===r.length){r=!0;break t}else for(g=g.child;g!==null;)l.push(g,T),g=g.sibling}}r=!1}return r;case tp:if((h===5||h===26||h===27)&&Wg(l.stateNode,r.value))return!0;break;case np:if((h===5||h===6||h===26||h===27)&&(l=Ig(l),l!==null&&0<=l.indexOf(r.value)))return!0;break;case ep:if((h===5||h===26||h===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===r.value.toLowerCase()))return!0;break;default:throw Error(u(365))}return!1}function rd(l){switch(l.$$typeof){case Wd:return"<"+(_(l.value)||"Unknown")+">";case $d:return":has("+(rd(l)||"")+")";case tp:return'[role="'+l.value+'"]';case np:return'"'+l.value+'"';case ep:return'[data-testname="'+l.value+'"]';default:throw Error(u(365))}}function nm(l,r){var h=[];l=[l,0];for(var g=0;g<l.length;){var E=l[g++],T=E.tag,z=l[g++],L=r[z];if(T!==5&&T!==26&&T!==27||!Ys(E)){for(;L!=null&&$c(E,L);)z++,L=r[z];if(z===r.length)h.push(E);else for(E=E.child;E!==null;)l.push(E,z),E=E.sibling}}return h}function tf(l,r){if(!ro)throw Error(u(363));l=Su(l),l=nm(l,r),r=[],l=Array.from(l);for(var h=0;h<l.length;){var g=l[h++],E=g.tag;if(E===5||E===26||E===27)Ys(g)||r.push(g.stateNode);else for(g=g.child;g!==null;)l.push(g),g=g.sibling}return r}function ai(){return(re&2)!==0&&ce!==0?ce&-ce:Gt.T!==null?Yr():cs()}function ef(){if(Ei===0)if((ce&536870912)===0||se){var l=Tf;Tf<<=1,(Tf&3932160)===0&&(Tf=262144),Ei=l}else Ei=536870912;return l=Si.current,l!==null&&(l.flags|=32),Ei}function Pa(l,r,h){(l===Le&&(He===2||He===9)||l.cancelPendingCommit!==null)&&(rr(l,0),xl(l,ce,Ei,!1)),$(l,h),((re&2)===0||l!==Le)&&(l===Le&&((re&2)===0&&(bo|=h),yn===4&&xl(l,ce,Ei,!1)),ke(l))}function am(l,r,h){if((re&6)!==0)throw Error(u(327));var g=!h&&(r&127)===0&&(r&l.expiredLanes)===0||U(l,r),E=g?Gg(l,r):Tu(l,r,!0),T=g;do{if(E===0){So&&!g&&xl(l,r,0,!1);break}else{if(h=l.current.alternate,T&&!wg(h)){E=Tu(l,r,!1),T=!1;continue}if(E===2){if(T=r,l.errorRecoveryDisabledLanes&T)var z=0;else z=l.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){r=z;t:{var L=l;E=Of;var ft=ya&&L.current.memoizedState.isDehydrated;if(ft&&(rr(L,z).flags|=256),z=Tu(L,z,!1),z!==2){if(Ym&&!ft){L.errorRecoveryDisabledLanes|=T,bo|=T,E=4;break t}T=ui,ui=E,T!==null&&(ui===null?ui=T:ui.push.apply(ui,T))}E=z}if(T=!1,E!==2)continue}}if(E===1){rr(l,0),xl(l,r,0,!0);break}t:{switch(g=l,T=E,T){case 0:case 1:throw Error(u(345));case 4:if((r&4194048)!==r)break;case 6:xl(g,r,Ei,!yr);break t;case 2:ui=null;break;case 3:case 5:break;default:throw Error(u(329))}if((r&62914560)===r&&(E=Rf+300-Me(),10<E)){if(xl(g,r,Ei,!yr),O(g,0,!0)!==0)break t;Js=r,g.timeoutHandle=Xg(od.bind(null,g,h,ui,ip,ap,r,Ei,bo,Pu,yr,T,"Throttled",-0,0),E);break t}od(g,h,ui,ip,ap,r,Ei,bo,Pu,yr,T,null,-0,0)}}break}while(!0);ke(l)}function od(l,r,h,g,E,T,z,L,ft,vt,Mt,xt,Rt,Yt){if(l.timeoutHandle=Ml,xt=r.subtreeFlags,xt&8192||(xt&16785408)===16785408){xt=Jg(),em(r,T,xt);var tn=(T&62914560)===T?Rf-Me():(T&4194048)===T?Xm-Me():0;if(tn=Fg(xt,tn),tn!==null){Js=T,l.cancelPendingCommit=tn(rm.bind(null,l,r,T,h,g,E,z,L,ft,Mt,xt,null,Rt,Yt)),xl(l,T,z,!vt);return}}rm(l,r,T,h,g,E,z,L,ft)}function wg(l){for(var r=l;;){var h=r.tag;if((h===0||h===11||h===15)&&r.flags&16384&&(h=r.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var g=0;g<h.length;g++){var E=h[g],T=E.getSnapshot;E=E.value;try{if(!Sa(T(),E))return!1}catch{return!1}}if(h=r.child,r.subtreeFlags&16384&&h!==null)h.return=r,r=h;else{if(r===l)break;for(;r.sibling===null;){if(r.return===null||r.return===l)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function xl(l,r,h,g){r&=~qm,r&=~bo,l.suspendedLanes|=r,l.pingedLanes&=~r,g&&(l.warmLanes|=r),g=l.expirationTimes;for(var E=r;0<E;){var T=31-ii(E),z=1<<T;g[T]=-1,E&=~z}h!==0&&I(l,h,r)}function lr(){return(re&6)===0?(mn(0),!1):!0}function nf(){if(oe!==null){if(He===0)var l=oe.return;else l=oe,$e=Ka=null,Oc(l),ji=null,Df=0,l=oe;for(;l!==null;)Ih(l.alternate,l),l=l.return;oe=null}}function rr(l,r){var h=l.timeoutHandle;h!==Ml&&(l.timeoutHandle=Ml,Em(h)),h=l.cancelPendingCommit,h!==null&&(l.cancelPendingCommit=null,h()),Js=0,nf(),Le=l,oe=h=Vs(l.current,null),ce=r,He=0,bi=null,yr=!1,So=U(l,r),Ym=!1,Pu=Ei=qm=bo=vr=yn=0,ui=Of=null,ap=!1,(r&8)!==0&&(r|=r&32);var g=l.entangledLanes;if(g!==0)for(l=l.entanglements,g&=r;0<g;){var E=31-ii(g),T=1<<E;r|=l[E],g&=~T}return Bl=r,Ca(),h}function Ug(l,r){kt=null,Gt.H=Af,r===Vu||r===qd?(r=xc(),He=3):r===Yd?(r=xc(),He=4):He=r===Fd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,bi=r,oe===null&&(yn=1,Pc(l,at(r,l.current)))}function Bg(){var l=Si.current;return l===null?!0:(ce&4194048)===ce?Pi===null:(ce&62914560)===ce||(ce&536870912)!==0?l===Pi:!1}function im(){var l=Gt.H;return Gt.H=Af,l===null?Af:l}function bu(){var l=Gt.A;return Gt.A=y3,l}function Eu(){yn=4,yr||(ce&4194048)!==ce&&Si.current!==null||(So=!0),(vr&134217727)===0&&(bo&134217727)===0||Le===null||xl(Le,ce,Ei,!1)}function Tu(l,r,h){var g=re;re|=2;var E=im(),T=bu();(Le!==l||ce!==r)&&(ip=null,rr(l,r)),r=!1;var z=yn;t:do try{if(He!==0&&oe!==null){var L=oe,ft=bi;switch(He){case 8:nf(),z=6;break t;case 3:case 2:case 9:case 6:Si.current===null&&(r=!0);var vt=He;if(He=0,bi=null,ao(l,L,ft,vt),h&&So){z=0;break t}break;default:vt=He,He=0,bi=null,ao(l,L,ft,vt)}}Vg(),z=yn;break}catch(Mt){Ug(l,Mt)}while(!0);return r&&l.shellSuspendCounter++,$e=Ka=null,re=g,Gt.H=E,Gt.A=T,oe===null&&(Le=null,ce=0,Ca()),z}function Vg(){for(;oe!==null;)ud(oe)}function Gg(l,r){var h=re;re|=2;var g=im(),E=bu();Le!==l||ce!==r?(ip=null,Yu=Me()+500,rr(l,r)):So=U(l,r);t:do try{if(He!==0&&oe!==null){r=oe;var T=bi;e:switch(He){case 1:He=0,bi=null,ao(l,r,T,1);break;case 2:case 9:if(O0(T)){He=0,bi=null,lm(r);break}r=function(){He!==2&&He!==9||Le!==l||(He=7),ke(l)},T.then(r,r);break t;case 3:He=7;break t;case 4:He=5;break t;case 7:O0(T)?(He=0,bi=null,lm(r)):(He=0,bi=null,ao(l,r,T,7));break;case 5:var z=null;switch(oe.tag){case 26:z=oe.memoizedState;case 5:case 27:var L=oe,ft=L.type,vt=L.pendingProps;if(z?Hd(z):va(L.stateNode,ft,vt)){He=0,bi=null;var Mt=L.sibling;if(Mt!==null)oe=Mt;else{var xt=L.return;xt!==null?(oe=xt,Bs(xt)):oe=null}break e}}He=0,bi=null,ao(l,r,T,5);break;case 6:He=0,bi=null,ao(l,r,T,6);break;case 8:nf(),yn=6;break t;default:throw Error(u(462))}}sm();break}catch(Rt){Ug(l,Rt)}while(!0);return $e=Ka=null,Gt.H=g,Gt.A=E,re=h,oe!==null?0:(Le=null,ce=0,Ca(),yn)}function sm(){for(;oe!==null&&!p3();)ud(oe)}function ud(l){var r=Zh(l.alternate,l,Bl);l.memoizedProps=l.pendingProps,r===null?Bs(l):oe=r}function lm(l){var r=l,h=r.alternate;switch(r.tag){case 15:case 0:r=Z0(h,r,r.pendingProps,r.type,void 0,ce);break;case 11:r=Z0(h,r,r.pendingProps,r.type.render,r.ref,ce);break;case 5:Oc(r);default:Ih(h,r),r=oe=fm(r,Bl),r=Zh(h,r,Bl)}l.memoizedProps=l.pendingProps,r===null?Bs(l):oe=r}function ao(l,r,h,g){$e=Ka=null,Oc(r),ji=null,Df=0;var E=r.return;try{if(_a(l,E,r,h,ce)){yn=1,Pc(l,at(h,l.current)),oe=null;return}}catch(T){if(E!==null)throw oe=E,T;yn=1,Pc(l,at(h,l.current)),oe=null;return}r.flags&32768?(se||g===1?l=!0:So||(ce&536870912)!==0?l=!1:(yr=l=!0,(g===2||g===9||g===3||g===6)&&(g=Si.current,g!==null&&g.tag===13&&(g.flags|=16384))),af(r,l)):Bs(r)}function Bs(l){var r=l;do{if((r.flags&32768)!==0){af(r,yr);return}l=r.return;var h=eo(r.alternate,r,Bl);if(h!==null){oe=h;return}if(r=r.sibling,r!==null){oe=r;return}oe=r=l}while(r!==null);yn===0&&(yn=5)}function af(l,r){do{var h=ss(l.alternate,l);if(h!==null){h.flags&=32767,oe=h;return}if(h=l.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!r&&(l=l.sibling,l!==null)){oe=l;return}oe=l=h}while(l!==null);yn=6,oe=null}function rm(l,r,h,g,E,T,z,L,ft){l.cancelPendingCommit=null;do On();while(we!==0);if((re&6)!==0)throw Error(u(327));if(r!==null){if(r===l.current)throw Error(u(177));if(T=r.lanes|r.childLanes,T|=jm,st(l,h,T,z,L,ft),l===Le&&(oe=Le=null,ce=0),br=r,Vl=l,Js=h,sp=T,lp=E,Uy=g,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,t3(zl,function(){return om(),null})):(l.callbackNode=null,l.callbackPriority=0),g=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||g){g=Gt.T,Gt.T=null,E=Ls(),Jn(2),z=re,re|=4;try{Ng(l,r,h)}finally{re=z,Jn(E),Gt.T=g}}we=1,cd(),fd(),hd()}}function cd(){if(we===1){we=0;var l=Vl,r=br,h=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||h){h=Gt.T,Gt.T=null;var g=Ls();Jn(2);var E=re;re|=4;try{Wc(r,l),df(l.containerInfo)}finally{re=E,Jn(g),Gt.T=h}}l.current=r,we=2}}function fd(){if(we===2){we=0;var l=Vl,r=br,h=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||h){h=Gt.T,Gt.T=null;var g=Ls();Jn(2);var E=re;re|=4;try{$0(l,r.alternate,r)}finally{re=E,Jn(g),Gt.T=h}}we=3}}function hd(){if(we===4||we===3){we=0,si();var l=Vl,r=br,h=Js,g=Uy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?we=5:(we=0,br=Vl=null,jg(l,l.pendingLanes));var E=l.pendingLanes;if(E===0&&(Sr=null),lt(h),r=r.stateNode,Rn&&typeof Rn.onCommitFiberRoot=="function")try{Rn.onCommitFiberRoot(po,r,void 0,(r.current.flags&128)===128)}catch{}if(g!==null){r=Gt.T,E=Ls(),Jn(2),Gt.T=null;try{for(var T=l.onRecoverableError,z=0;z<g.length;z++){var L=g[z];T(L.value,{componentStack:L.stack})}}finally{Gt.T=r,Jn(E)}}(Js&3)!==0&&On(),ke(l),E=l.pendingLanes,(h&261930)!==0&&(E&42)!==0?l===rp?qu++:(qu=0,rp=l):qu=0,ya&&Ey(),mn(0)}}function jg(l,r){(l.pooledCacheLanes&=r)===0&&(r=l.pooledCache,r!=null&&(l.pooledCache=null,jn(r)))}function On(){return cd(),fd(),hd(),om()}function om(){if(we!==5)return!1;var l=Vl,r=sp;sp=0;var h=lt(Js),g=32>h?32:h;h=Gt.T;var E=Ls();try{Jn(g),Gt.T=null,g=lp,lp=null;var T=Vl,z=Js;if(we=0,br=Vl=null,Js=0,(re&6)!==0)throw Error(u(331));var L=re;if(re|=4,sd(T.current),Hg(T,T.current,z,g),re=L,mn(0,!1),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(po,T)}catch{}return!0}finally{Jn(E),Gt.T=h,jg(l,r)}}function um(l,r,h){r=at(h,r),r=du(l.stateNode,r,2),l=Ds(l,r,2),l!==null&&($(l,2),ke(l))}function be(l,r,h){if(l.tag===3)um(l,l,h);else for(;r!==null;){if(r.tag===3){um(r,l,h);break}else if(r.tag===1){var g=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Sr===null||!Sr.has(g))){l=at(h,l),h=Yc(2),g=Ds(r,h,2),g!==null&&(Ph(h,g,r,l),$(g,2),ke(g));break}}r=r.return}}function dd(l,r,h){var g=l.pingCache;if(g===null){g=l.pingCache=new v3;var E=new Set;g.set(r,E)}else E=g.get(r),E===void 0&&(E=new Set,g.set(r,E));E.has(h)||(Ym=!0,E.add(h),l=sf.bind(null,l,r,h),r.then(l,l))}function sf(l,r,h){var g=l.pingCache;g!==null&&g.delete(r),l.pingedLanes|=l.suspendedLanes&h,l.warmLanes&=~h,Le===l&&(ce&h)===h&&(yn===4||yn===3&&(ce&62914560)===ce&&300>Me()-Rf?(re&2)===0&&rr(l,0):qm|=h,Pu===ce&&(Pu=0)),ke(l)}function cm(l,r){r===0&&(r=V()),l=$l(l,r),l!==null&&($(l,r),ke(l))}function pd(l){var r=l.memoizedState,h=0;r!==null&&(h=r.retryLane),cm(l,h)}function Lg(l,r){var h=0;switch(l.tag){case 31:case 13:var g=l.stateNode,E=l.memoizedState;E!==null&&(h=E.retryLane);break;case 19:g=l.stateNode;break;case 22:g=l.stateNode._retryCache;break;default:throw Error(u(314))}g!==null&&g.delete(r),cm(l,h)}function t3(l,r){return Vd(l,r)}function md(l,r,h,g){this.tag=l,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lf(l){return l=l.prototype,!(!l||!l.isReactComponent)}function Vs(l,r){var h=l.alternate;return h===null?(h=i(l.tag,r,l.key,l.mode),h.elementType=l.elementType,h.type=l.type,h.stateNode=l.stateNode,h.alternate=l,l.alternate=h):(h.pendingProps=r,h.type=l.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=l.flags&65011712,h.childLanes=l.childLanes,h.lanes=l.lanes,h.child=l.child,h.memoizedProps=l.memoizedProps,h.memoizedState=l.memoizedState,h.updateQueue=l.updateQueue,r=l.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},h.sibling=l.sibling,h.index=l.index,h.ref=l.ref,h.refCleanup=l.refCleanup,h}function fm(l,r){l.flags&=65011714;var h=l.alternate;return h===null?(l.childLanes=0,l.lanes=r,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=h.childLanes,l.lanes=h.lanes,l.child=h.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=h.memoizedProps,l.memoizedState=h.memoizedState,l.updateQueue=h.updateQueue,l.type=h.type,r=h.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),l}function rf(l,r,h,g,E,T){var z=0;if(g=l,typeof l=="function")lf(l)&&(z=1);else if(typeof l=="string")z=wi&&Ln?zm(l,h,ba.current)?26:Bd(l)?27:5:wi?zm(l,h,ba.current)?26:5:Ln&&Bd(l)?27:5;else t:switch(l){case Td:return l=i(31,h,r,E),l.elementType=Td,l.lanes=T,l;case io:return Dl(h.children,E,T,r);case mm:z=8,E|=24;break;case ff:return l=i(12,h,r,E|2),l.elementType=ff,l.lanes=T,l;case so:return l=i(13,h,r,E),l.elementType=so,l.lanes=T,l;case ze:return l=i(19,h,r,E),l.elementType=ze,l.lanes=T,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Al:z=10;break t;case Ed:z=9;break t;case Cu:z=11;break t;case gm:z=14;break t;case ur:z=16,g=null;break t}z=29,h=Error(u(130,l===null?"null":typeof l,"")),g=null}return r=i(z,h,r,E),r.elementType=l,r.type=g,r.lanes=T,r}function Dl(l,r,h,g){return l=i(7,l,g,r),l.lanes=h,l}function of(l,r,h){return l=i(6,l,null,r),l.lanes=h,l}function gd(l){var r=i(18,null,null,0);return r.stateNode=l,r}function yd(l,r,h){return r=i(4,l.children!==null?l.children:[],l.key,r),r.lanes=h,r.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},r}function hm(l,r,h,g,E,T,z,L,ft){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ml,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=F(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=F(0),this.hiddenUpdates=F(null),this.identifierPrefix=g,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ft,this.incompleteTransitions=new Map}function uf(l,r,h,g,E,T,z,L,ft,vt,Mt,xt){return l=new hm(l,r,h,z,ft,vt,Mt,xt,L),r=1,T===!0&&(r|=24),T=i(3,null,null,r),l.current=T,T.stateNode=l,r=Ae(),r.refCount++,l.pooledCache=r,r.refCount++,T.memoizedState={element:g,isDehydrated:h,cache:r},Dc(T),l}function vd(l){return l?(l=ho,l):ho}function dm(l){var r=l._reactInternals;if(r===void 0)throw typeof l.render=="function"?Error(u(188)):(l=Object.keys(l).join(","),Error(u(268,l)));return l=p(r),l=l!==null?m(l):null,l===null?null:hf(l.stateNode)}function Sd(l,r,h,g,E,T){E=vd(E),g.context===null?g.context=E:g.pendingContext=E,g=mi(r),g.payload={element:h},T=T===void 0?null:T,T!==null&&(g.callback=T),h=Ds(l,g,r),h!==null&&(Pa(h,l,r),Ac(h,l,r))}function pm(l,r){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var h=l.retryLane;l.retryLane=h!==0&&h<r?h:r}}function os(l,r){pm(l,r),(l=l.alternate)&&pm(l,r)}var ne={},e3=H,Ya=J2(),yi=Object.assign,bd=Symbol.for("react.element"),cf=Symbol.for("react.transitional.element"),or=Symbol.for("react.portal"),io=Symbol.for("react.fragment"),mm=Symbol.for("react.strict_mode"),ff=Symbol.for("react.profiler"),Ed=Symbol.for("react.consumer"),Al=Symbol.for("react.context"),Cu=Symbol.for("react.forward_ref"),so=Symbol.for("react.suspense"),ze=Symbol.for("react.suspense_list"),gm=Symbol.for("react.memo"),ur=Symbol.for("react.lazy"),Td=Symbol.for("react.activity"),Gs=Symbol.for("react.memo_cache_sentinel"),ym=Symbol.iterator,vm=Symbol.for("react.client.reference"),cr=Array.isArray,Gt=e3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Pg=t.rendererVersion,Sm=t.rendererPackageName,bm=t.extraDevToolsConfig,hf=t.getPublicInstance,n3=t.getRootHostContext,Yg=t.getChildHostContext,a3=t.prepareForCommit,df=t.resetAfterCommit,js=t.createInstance;t.cloneMutableInstance;var Cd=t.appendInitialChild,qg=t.finalizeInitialChildren,pf=t.shouldSetTextContent,_d=t.createTextInstance;t.cloneMutableTextInstance;var Xg=t.scheduleTimeout,Em=t.cancelTimeout,Ml=t.noTimeout,Hi=t.isPrimaryRenderer;t.warnsIfNotActing;var Aa=t.supportsMutation,us=t.supportsPersistence,ya=t.supportsHydration,Kg=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var i3=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Jn=t.setCurrentUpdatePriority,Ls=t.getCurrentUpdatePriority,cs=t.resolveUpdatePriority;t.trackSchedulerEvent,t.resolveEventType,t.resolveEventTimeStamp;var Tm=t.shouldAttemptEagerTransition,Qg=t.detachDeletedInstance;t.requestPostPaintCallback;var Zg=t.maySuspendCommit,s3=t.maySuspendCommitOnUpdate,_u=t.maySuspendCommitInSyncRender,va=t.preloadInstance,Jg=t.startSuspendingCommit,Ma=t.suspendInstance;t.suspendOnActiveViewTransition;var Fg=t.waitForCommitToBeReady;t.getSuspendedCommitReason;var qa=t.NotPendingTransition,fr=t.HostTransitionContext,lo=t.resetFormInstance;t.bindToConsole;var kg=t.supportsMicrotasks,Ps=t.scheduleMicrotask,ro=t.supportsTestSelectors,Cm=t.findFiberRoot,fs=t.getBoundingRect,Ig=t.getTextContent,Ys=t.isHiddenSubtree,Wg=t.matchAccessibilityRole,mf=t.setFocusIfFocusable,oo=t.setupIntersectionObserver,$g=t.appendChild,ty=t.appendChildToContainer,gf=t.commitTextUpdate,ey=t.commitMount,xd=t.commitUpdate,ny=t.insertBefore,ay=t.insertInContainerBefore,_m=t.removeChild,xm=t.removeChildFromContainer,Dd=t.resetTextContent,iy=t.hideInstance,Ad=t.hideTextInstance,l3=t.unhideInstance,sy=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var vi=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var ly=t.cloneInstance,Ie=t.createContainerChildSet,Dm=t.appendChildToContainerChildSet,ry=t.finalizeContainerChildren,oy=t.replaceContainerChildren,Nl=t.cloneHiddenInstance,yf=t.cloneHiddenTextInstance,vf=t.isSuspenseInstancePending,Sf=t.isSuspenseInstanceFallback,uo=t.getSuspenseInstanceFallbackErrorDetails,xu=t.registerSuspenseInstanceRetry,uy=t.canHydrateFormStateMarker,cy=t.isFormStateMarkerMatching,Am=t.getNextHydratableSibling,fy=t.getNextHydratableSiblingAfterSingleton,Md=t.getFirstHydratableChild,Nd=t.getFirstHydratableChildWithinContainer,Mm=t.getFirstHydratableChildWithinActivityInstance,hy=t.getFirstHydratableChildWithinSuspenseInstance,r3=t.getFirstHydratableChildWithinSingleton,o3=t.canHydrateInstance,dy=t.canHydrateTextInstance,py=t.canHydrateActivityInstance,u3=t.canHydrateSuspenseInstance,Du=t.hydrateInstance,Od=t.hydrateTextInstance,my=t.hydrateActivityInstance,Nm=t.hydrateSuspenseInstance,gy=t.getNextHydratableInstanceAfterActivityInstance,yy=t.getNextHydratableInstanceAfterSuspenseInstance,vy=t.commitHydratedInstance,c3=t.commitHydratedContainer,Sy=t.commitHydratedActivityInstance,Au=t.commitHydratedSuspenseInstance,by=t.finalizeHydratedChildren,Ey=t.flushHydrationEvents;t.clearActivityBoundary;var Ee=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var Om=t.clearSuspenseBoundaryFromContainer,f3=t.hideDehydratedBoundary,Ty=t.unhideDehydratedBoundary,Cy=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var h3=t.validateHydratableInstance,Rm=t.validateHydratableTextInstance,wi=t.supportsResources,zm=t.isHostHoistableType,Rd=t.getHoistableRoot,Mu=t.getResource,_y=t.acquireResource,xy=t.releaseResource,co=t.hydrateHoistable,zd=t.mountHoistable,Hm=t.unmountHoistable,Dy=t.createHoistableInstance,Ay=t.prepareToCommitHoistables,d3=t.mayResourceSuspendCommit,Hd=t.preloadResource,Ol=t.suspendResource,Ln=t.supportsSingletons,wd=t.resolveSingletonInstance,Ud=t.acquireSingletonInstance,hr=t.releaseSingletonInstance,Bd=t.isHostSingletonType,fo=t.isSingletonScope,bf=[],Nu=-1,ho={},ii=Math.clz32?Math.clz32:N,My=Math.log,Ny=Math.LN2,Ef=256,Tf=262144,Ou=4194304,Vd=Ya.unstable_scheduleCallback,ae=Ya.unstable_cancelCallback,p3=Ya.unstable_shouldYield,si=Ya.unstable_requestPaint,Me=Ya.unstable_now,Oy=Ya.unstable_ImmediatePriority,Rl=Ya.unstable_UserBlockingPriority,zl=Ya.unstable_NormalPriority,Ru=Ya.unstable_IdlePriority,Gd=Ya.log,wm=Ya.unstable_setDisableYieldValue,po=null,Rn=null,Sa=typeof Object.is=="function"?Object.is:pt,jd=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Um=Object.prototype.hasOwnProperty,zu,li,Cf=!1,Ry=new WeakMap,mo=[],Hu=0,Pn=null,rt=0,Ui=[],Bi=0,Hl=null,Xa=1,qs="",ba=x(null),_f=x(null),dr=x(null),Ld=x(null),Fn=null,We=null,se=!1,wl=null,Vi=!1,Bm=Error(u(519)),Xs=x(null),Ka=null,$e=null,Ks=typeof AbortController<"u"?AbortController:function(){var l=[],r=this.signal={aborted:!1,addEventListener:function(h,g){l.push(g)}};this.abort=function(){r.aborted=!0,l.forEach(function(h){return h()})}},Na=Ya.unstable_scheduleCallback,m3=Ya.unstable_NormalPriority,cn={$$typeof:Al,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},zn=null,ri=null,Vm=!1,wu=!1,go=!1,hs=0,xf=null,Gm=0,Uu=0,Bu=null,Pd=Gt.S;Gt.S=function(l,r){Xm=Me(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&au(l,r),Pd!==null&&Pd(l,r)};var pr=x(null),Vu=Error(u(460)),Yd=Error(u(474)),qd=Error(u(542)),Xd={then:function(){}},Gi=null,ji=null,Df=0,yo=R0(!0),zy=R0(!1),Li=[],ds=0,jm=0,mr=!1,Lm=!1,Qs=x(null),Kd=x(0),Si=x(null),Pi=null,Hn=x(0),Ul=0,kt=null,Ge=null,Yn=null,Qd=!1,Gu=!1,vo=!1,Zd=0,ju=0,Lu=null,g3=0,Af={readContext:on,use:Ve,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useLayoutEffect:un,useInsertionEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useSyncExternalStore:un,useId:un,useHostTransitionStatus:un,useFormState:un,useActionState:un,useOptimistic:un,useMemoCache:un,useCacheRefresh:un};Af.useEffectEvent=un;var Hy={readContext:on,use:Ve,useCallback:function(l,r){return pa().memoizedState=[l,r===void 0?null:r],l},useContext:on,useEffect:B0,useImperativeHandle:function(l,r,h){h=h!=null?h.concat([l]):null,Bc(4194308,4,Ag.bind(null,r,l),h)},useLayoutEffect:function(l,r){return Bc(4194308,4,l,r)},useInsertionEffect:function(l,r){Bc(4,2,l,r)},useMemo:function(l,r){var h=pa();r=r===void 0?null:r;var g=l();if(vo){dt(!0);try{l()}finally{dt(!1)}}return h.memoizedState=[g,r],g},useReducer:function(l,r,h){var g=pa();if(h!==void 0){var E=h(r);if(vo){dt(!0);try{h(r)}finally{dt(!1)}}}else E=r;return g.memoizedState=g.baseState=E,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:E},g.queue=l,l=l.dispatch=ma.bind(null,kt,l),[g.memoizedState,l]},useRef:function(l){var r=pa();return l={current:l},r.memoizedState=l},useState:function(l){l=Ga(l);var r=l.queue,h=jh.bind(null,kt,r);return r.dispatch=h,[l.memoizedState,h]},useDebugValue:j0,useDeferredValue:function(l,r){var h=pa();return Vh(h,l,r)},useTransition:function(){var l=Ga(!1);return l=L0.bind(null,kt,l.queue,!0,!1),pa().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,r,h){var g=kt,E=pa();if(se){if(h===void 0)throw Error(u(407));h=h()}else{if(h=r(),Le===null)throw Error(u(349));(ce&127)!==0||xg(g,r,h)}E.memoizedState=h;var T={value:h,getSnapshot:r};return E.queue=T,B0(Rc.bind(null,g,T,l),[l]),g.flags|=2048,ja(9,{destroy:void 0},Os.bind(null,g,T,h,r),null),h},useId:function(){var l=pa(),r=Le.identifierPrefix;if(se){var h=qs,g=Xa;h=(g&~(1<<32-ii(g)-1)).toString(32)+h,r="_"+r+"R_"+h,h=Zd++,0<h&&(r+="H"+h.toString(32)),r+="_"}else h=g3++,r="_"+r+"r_"+h.toString(32)+"_";return l.memoizedState=r},useHostTransitionStatus:Gh,useFormState:ns,useActionState:ns,useOptimistic:function(l){var r=pa();r.memoizedState=r.baseState=l;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=h,r=hu.bind(null,kt,!0,h),h.dispatch=r,[l,r]},useMemoCache:ou,useCacheRefresh:function(){return pa().memoizedState=Mg.bind(null,kt)},useEffectEvent:function(l){var r=pa(),h={impl:l};return r.memoizedState=h,function(){if((re&2)!==0)throw Error(u(440));return h.impl.apply(void 0,arguments)}}},Pm={readContext:on,use:Ve,useCallback:Bh,useContext:on,useEffect:Hh,useImperativeHandle:G0,useInsertionEffect:V0,useLayoutEffect:Uh,useMemo:Vc,useReducer:uu,useRef:Wr,useState:function(){return uu(Ns)},useDebugValue:j0,useDeferredValue:function(l,r){var h=Ye();return Gc(h,Ge.memoizedState,l,r)},useTransition:function(){var l=uu(Ns)[0],r=Ye().memoizedState;return[typeof l=="boolean"?l:Ii(l),r]},useSyncExternalStore:Wi,useId:bl,useHostTransitionStatus:Gh,useFormState:U0,useActionState:U0,useOptimistic:function(l,r){var h=Ye();return ti(h,Ge,l,r)},useMemoCache:ou,useCacheRefresh:Y0};Pm.useEffectEvent=wh;var wy={readContext:on,use:Ve,useCallback:Bh,useContext:on,useEffect:Hh,useImperativeHandle:G0,useInsertionEffect:V0,useLayoutEffect:Uh,useMemo:Vc,useReducer:Ir,useRef:Wr,useState:function(){return Ir(Ns)},useDebugValue:j0,useDeferredValue:function(l,r){var h=Ye();return Ge===null?Vh(h,l,r):Gc(h,Ge.memoizedState,l,r)},useTransition:function(){var l=Ir(Ns)[0],r=Ye().memoizedState;return[typeof l=="boolean"?l:Ii(l),r]},useSyncExternalStore:Wi,useId:bl,useHostTransitionStatus:Gh,useFormState:Uc,useActionState:Uc,useOptimistic:function(l,r){var h=Ye();return Ge!==null?ti(h,Ge,l,r):(h.baseState=l,[l,h.queue.dispatch])},useMemoCache:ou,useCacheRefresh:Y0};wy.useEffectEvent=wh;var Jd={enqueueSetState:function(l,r,h){l=l._reactInternals;var g=ai(),E=mi(g);E.payload=r,h!=null&&(E.callback=h),r=Ds(l,E,g),r!==null&&(Pa(r,l,g),Ac(r,l,g))},enqueueReplaceState:function(l,r,h){l=l._reactInternals;var g=ai(),E=mi(g);E.tag=1,E.payload=r,h!=null&&(E.callback=h),r=Ds(l,E,g),r!==null&&(Pa(r,l,g),Ac(r,l,g))},enqueueForceUpdate:function(l,r){l=l._reactInternals;var h=ai(),g=mi(h);g.tag=2,r!=null&&(g.callback=r),r=Ds(l,g,h),r!==null&&(Pa(r,l,h),Ac(r,l,h))}},Fd=Error(u(461)),qn=!1,kd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Zs=!1,wn=!1,Mf=!1,Id=typeof WeakSet=="function"?WeakSet:Set,aa=null,Xn=null,oi=!1,ps=null,gr=8192,y3={getCacheForType:function(l){var r=on(cn),h=r.data.get(l);return h===void 0&&(h=l(),r.data.set(l,h)),h},cacheSignal:function(){return on(cn).controller.signal}},Wd=0,$d=1,tp=2,ep=3,np=4;if(typeof Symbol=="function"&&Symbol.for){var Nf=Symbol.for;Wd=Nf("selector.component"),$d=Nf("selector.has_pseudo_class"),tp=Nf("selector.role"),ep=Nf("selector.test_id"),np=Nf("selector.text")}var v3=typeof WeakMap=="function"?WeakMap:Map,re=0,Le=null,oe=null,ce=0,He=0,bi=null,yr=!1,So=!1,Ym=!1,Bl=0,yn=0,vr=0,bo=0,qm=0,Ei=0,Pu=0,Of=null,ui=null,ap=!1,Rf=0,Xm=0,Yu=1/0,ip=null,Sr=null,we=0,Vl=null,br=null,Js=0,sp=0,lp=null,Uy=null,qu=0,rp=null;return ne.attemptContinuousHydration=function(l){if(l.tag===13||l.tag===31){var r=$l(l,67108864);r!==null&&Pa(r,l,67108864),os(l,67108864)}},ne.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13||l.tag===31){var r=ai();r=bt(r);var h=$l(l,r);h!==null&&Pa(h,l,r),os(l,r)}},ne.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var r=R(l.pendingLanes);if(r!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;r;){var h=1<<31-ii(r);l.entanglements[1]|=h,r&=~h}ke(l),(re&6)===0&&(Yu=Me()+500,mn(0))}}break;case 31:case 13:r=$l(l,2),r!==null&&Pa(r,l,2),lr(),os(l,2)}},ne.batchedUpdates=function(l,r){return l(r)},ne.createComponentSelector=function(l){return{$$typeof:Wd,value:l}},ne.createContainer=function(l,r,h,g,E,T,z,L,ft,vt){return uf(l,r,!1,null,h,g,T,null,z,L,ft,vt)},ne.createHasPseudoClassSelector=function(l){return{$$typeof:$d,value:l}},ne.createHydrationContainer=function(l,r,h,g,E,T,z,L,ft,vt,Mt,xt,Rt,Yt){return l=uf(h,g,!0,l,E,T,L,Yt,ft,vt,Mt,xt),l.context=vd(null),h=l.current,g=ai(),g=bt(g),E=mi(g),E.callback=r??null,Ds(h,E,g),r=g,l.current.lanes=r,$(l,r),ke(l),l},ne.createPortal=function(l,r,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:or,key:g==null?null:""+g,children:l,containerInfo:r,implementation:h}},ne.createRoleSelector=function(l){return{$$typeof:tp,value:l}},ne.createTestNameSelector=function(l){return{$$typeof:ep,value:l}},ne.createTextSelector=function(l){return{$$typeof:np,value:l}},ne.defaultOnCaughtError=function(l){console.error(l)},ne.defaultOnRecoverableError=function(l){jd(l)},ne.defaultOnUncaughtError=function(l){jd(l)},ne.deferredUpdates=function(l){var r=Gt.T,h=Ls();try{return Jn(32),Gt.T=null,l()}finally{Jn(h),Gt.T=r}},ne.discreteUpdates=function(l,r,h,g,E){var T=Gt.T,z=Ls();try{return Jn(2),Gt.T=null,l(r,h,g,E)}finally{Jn(z),Gt.T=T,re===0&&(Yu=Me()+500)}},ne.findAllNodes=tf,ne.findBoundingRects=function(l,r){if(!ro)throw Error(u(363));r=tf(l,r),l=[];for(var h=0;h<r.length;h++)l.push(fs(r[h]));for(r=l.length-1;0<r;r--){h=l[r];for(var g=h.x,E=g+h.width,T=h.y,z=T+h.height,L=r-1;0<=L;L--)if(r!==L){var ft=l[L],vt=ft.x,Mt=vt+ft.width,xt=ft.y,Rt=xt+ft.height;if(g>=vt&&T>=xt&&E<=Mt&&z<=Rt){l.splice(r,1);break}else if(g!==vt||h.width!==ft.width||Rt<T||xt>z){if(!(T!==xt||h.height!==ft.height||Mt<g||vt>E)){vt>g&&(ft.width+=vt-g,ft.x=g),Mt<E&&(ft.width=E-vt),l.splice(r,1);break}}else{xt>T&&(ft.height+=xt-T,ft.y=T),Rt<z&&(ft.height=z-xt),l.splice(r,1);break}}}return l},ne.findHostInstance=dm,ne.findHostInstanceWithNoPortals=function(l){return l=p(l),l=l!==null?S(l):null,l===null?null:hf(l.stateNode)},ne.findHostInstanceWithWarning=function(l){return dm(l)},ne.flushPassiveEffects=On,ne.flushSyncFromReconciler=function(l){var r=re;re|=1;var h=Gt.T,g=Ls();try{if(Jn(2),Gt.T=null,l)return l()}finally{Jn(g),Gt.T=h,re=r,(re&6)===0&&mn(0)}},ne.flushSyncWork=lr,ne.focusWithin=function(l,r){if(!ro)throw Error(u(363));for(l=Su(l),r=nm(l,r),r=Array.from(r),l=0;l<r.length;){var h=r[l++],g=h.tag;if(!Ys(h)){if((g===5||g===26||g===27)&&mf(h.stateNode))return!0;for(h=h.child;h!==null;)r.push(h),h=h.sibling}}return!1},ne.getFindAllNodesFailureDescription=function(l,r){if(!ro)throw Error(u(363));var h=0,g=[];l=[Su(l),0];for(var E=0;E<l.length;){var T=l[E++],z=T.tag,L=l[E++],ft=r[L];if((z!==5&&z!==26&&z!==27||!Ys(T))&&($c(T,ft)&&(g.push(rd(ft)),L++,L>h&&(h=L)),L<r.length))for(T=T.child;T!==null;)l.push(T,L),T=T.sibling}if(h<r.length){for(l=[];h<r.length;h++)l.push(rd(r[h]));return`findAllNodes was able to match part of the selector:
22
+ `+g.stack}}function mt(l,r){if(typeof l=="object"&&l!==null){var h=Ry.get(l);return h!==void 0?h:(r={value:l,source:r,stack:K(r)},Ry.set(l,r),r)}return{value:l,source:r,stack:K(r)}}function pt(l,r){mo[Ru++]=lt,mo[Ru++]=jn,jn=l,lt=r}function I(l,r,h){Vi[Gi++]=Xa,Vi[Gi++]=Qs,Vi[Gi++]=Vl,Vl=l;var g=Xa;l=Qs;var E=32-li(g)-1;g&=~(1<<E),h+=1;var T=32-li(r)+E;if(30<T){var z=E-E%5;T=(g&(1<<z)-1).toString(32),g>>=z,E-=z,Xa=1<<32-li(r)+E|h<<E|g,Qs=T+l}else Xa=1<<T|h<<E|g,Qs=l}function vt(l){l.return!==null&&(pt(l,1),I(l,1,0))}function bt(l){for(;l===jn;)jn=mo[--Ru],mo[Ru]=null,lt=mo[--Ru],mo[Ru]=null;for(;l===Vl;)Vl=Vi[--Gi],Vi[Gi]=null,Qs=Vi[--Gi],Vi[Gi]=null,Xa=Vi[--Gi],Vi[Gi]=null}function jt(l,r){Vi[Gi++]=Xa,Vi[Gi++]=Qs,Vi[Gi++]=Vl,Xa=r.id,Qs=r.overflow,Vl=l}function pe(l,r){A(gr,r),A(Df,l),A(ba,null),l=n3(r),D(ba),A(ba,l)}function An(){D(ba),D(Df),D(gr)}function Se(l){l.memoizedState!==null&&A(Yd,l);var r=ba.current,h=Yg(r,l.type);r!==h&&(A(Df,l),A(ba,h))}function Qn(l){Df.current===l&&(D(ba),D(Df)),Yd.current===l&&(D(Yd),Ui?pr._currentValue=qa:pr._currentValue2=qa)}function We(l){var r=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $e(mt(r,l)),Vm}function ze(l,r){if(!ya)throw Error(u(175));_u(l.stateNode,l.type,l.memoizedProps,r,l)||We(l,!0)}function Wt(l){for(Jn=l.return;Jn;)switch(Jn.tag){case 5:case 31:case 13:ji=!1;return;case 27:case 3:ji=!0;return;default:Jn=Jn.return}}function Bt(l){if(!ya||l!==Jn)return!1;if(!le)return Wt(l),le=!0,!1;var r=l.tag;if(Gn?r!==3&&r!==27&&(r!==5||Cy(l.type)&&!gf(l.type,l.memoizedProps))&&nn&&We(l):r!==3&&(r!==5||Cy(l.type)&&!gf(l.type,l.memoizedProps))&&nn&&We(l),Wt(l),r===13){if(!ya)throw Error(u(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));nn=yy(l)}else if(r===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));nn=gy(l)}else nn=Gn&&r===27?fy(l.type,nn):Jn?Mm(l.stateNode):null;return!0}function Ce(){ya&&(nn=Jn=null,le=!1)}function $n(){var l=Gl;return l!==null&&(fi===null?fi=l:fi.push.apply(fi,l),Gl=null),l}function $e(l){Gl===null?Gl=[l]:Gl.push(l)}function Wa(l,r,h){Ui?(A(Zs,r._currentValue),r._currentValue=h):(A(Zs,r._currentValue2),r._currentValue2=h)}function tn(l){var r=Zs.current;Ui?l._currentValue=r:l._currentValue2=r,D(Zs)}function ha(l,r,h){for(;l!==null;){var g=l.alternate;if((l.childLanes&r)!==r?(l.childLanes|=r,g!==null&&(g.childLanes|=r)):g!==null&&(g.childLanes&r)!==r&&(g.childLanes|=r),l===h)break;l=l.return}}function Ds(l,r,h,g){var E=l.child;for(E!==null&&(E.return=l);E!==null;){var T=E.dependencies;if(T!==null){var z=E.child;T=T.firstContext;t:for(;T!==null;){var L=T;T=E;for(var ct=0;ct<r.length;ct++)if(L.context===r[ct]){T.lanes|=h,L=T.alternate,L!==null&&(L.lanes|=h),ha(T.return,h,l),g||(z=null);break t}T=L.next}}else if(E.tag===18){if(z=E.return,z===null)throw Error(u(341));z.lanes|=h,T=z.alternate,T!==null&&(T.lanes|=h),ha(z,h,l),z=null}else z=E.child;if(z!==null)z.return=E;else for(z=E;z!==null;){if(z===l){z=null;break}if(E=z.sibling,E!==null){E.return=z.return,z=E;break}z=z.return}E=z}}function $a(l,r,h,g){l=null;for(var E=r,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var z=E.alternate;if(z===null)throw Error(u(387));if(z=z.memoizedProps,z!==null){var L=E.type;Sa(E.pendingProps.value,z.value)||(l!==null?l.push(L):l=[L])}}else if(E===Yd.current){if(z=E.alternate,z===null)throw Error(u(387));z.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(l!==null?l.push(pr):l=[pr])}E=E.return}l!==null&&Ds(r,l,h,g),r.flags|=262144}function As(l){for(l=l.firstContext;l!==null;){var r=l.context;if(!Sa(Ui?r._currentValue:r._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function Mn(l){Ka=l,an=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function gn(l){return Ht(Ka,l)}function mi(l,r){return Ka===null&&Mn(l),Ht(l,r)}function Ht(l,r){var h=Ui?r._currentValue:r._currentValue2;if(r={context:r,memoizedValue:h,next:null},an===null){if(l===null)throw Error(u(308));an=r,l.dependencies={lanes:0,firstContext:r},l.flags|=524288}else an=an.next=r;return h}function De(){return{controller:new Js,data:new Map,refCount:0}}function da(l){l.refCount--,l.refCount===0&&Oa(m3,function(){l.controller.abort()})}function Va(){}function Ye(l){l!==ui&&l.next===null&&(ui===null?zn=ui=l:ui=ui.next=l),zu=!0,Gm||(Gm=!0,Rh())}function ta(l,r){if(!go&&zu){go=!0;do for(var h=!1,g=zn;g!==null;){if(l!==0){var E=g.pendingLanes;if(E===0)var T=0;else{var z=g.suspendedLanes,L=g.pingedLanes;T=(1<<31-li(42|l)+1)-1,T&=E&~(z&~L),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(h=!0,qr(g,T))}else T=ue,T=O(g,g===qe?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==zl),(T&3)===0||U(g,T)||(h=!0,qr(g,T));g=g.next}while(h);go=!1}}function Ms(){er()}function er(){zu=Gm=!1;var l=0;hs!==0&&Cm()&&(l=hs);for(var r=Me(),h=null,g=zn;g!==null;){var E=g.next,T=Cc(g,r);T===0?(g.next=null,h===null?zn=E:h.next=E,E===null&&(ui=h)):(h=g,(l!==0||(T&3)!==0)&&(zu=!0)),g=E}Be!==0&&Be!==5||ta(l),hs!==0&&(hs=0)}function Cc(l,r){for(var h=l.suspendedLanes,g=l.pingedLanes,E=l.expirationTimes,T=l.pendingLanes&-62914561;0<T;){var z=31-li(T),L=1<<z,ct=E[z];ct===-1?((L&h)===0||(L&g)!==0)&&(E[z]=j(L,r)):ct<=r&&(l.expiredLanes|=L),T&=~L}if(r=qe,h=ue,h=O(l,l===r?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==zl),g=l.callbackNode,h===0||l===r&&(Ue===2||Ue===9)||l.cancelPendingCommit!==null)return g!==null&&g!==null&&ie(g),l.callbackNode=null,l.callbackPriority=0;if((h&3)===0||U(l,h)){if(r=h&-h,r===l.callbackPriority)return r;switch(g!==null&&ie(g),it(h)){case 2:case 8:h=Ul;break;case 32:h=Bl;break;case 268435456:h=Nu;break;default:h=Bl}return g=Ca.bind(null,l),h=jd(h,g),l.callbackPriority=r,l.callbackNode=h,r}return g!==null&&g!==null&&ie(g),l.callbackPriority=2,l.callbackNode=null,2}function Ca(l,r){if(Be!==0&&Be!==5)return l.callbackNode=null,l.callbackPriority=0,null;var h=l.callbackNode;if(On()&&l.callbackNode!==h)return null;var g=ue;return g=O(l,l===qe?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==zl),g===0?null:(im(l,g,r),Cc(l,Me()),l.callbackNode!=null&&l.callbackNode===h?Ca.bind(null,l):null)}function qr(l,r){if(On())return null;im(l,r,!0)}function Rh(){kg?Xs(function(){(re&6)!==0?jd(Oy,Ms):er()}):jd(Oy,Ms)}function _c(){if(hs===0){var l=Hu;l===0&&(l=Cf,Cf<<=1,(Cf&261888)===0&&(Cf=256)),hs=l}return hs}function xc(l,r){if(Af===null){var h=Af=[];jm=0,Hu=_c(),wu={status:"pending",value:void 0,then:function(g){h.push(g)}}}return jm++,r.then(ea,ea),r}function ea(){if(--jm===0&&Af!==null){wu!==null&&(wu.status="fulfilled");var l=Af;Af=null,Hu=0,wu=null;for(var r=0;r<l.length;r++)(0,l[r])()}}function Ut(l,r){var h=[],g={status:"pending",value:null,reason:null,then:function(E){h.push(E)}};return l.then(function(){g.status="fulfilled",g.value=r;for(var E=0;E<h.length;E++)(0,h[E])(r)},function(E){for(g.status="rejected",g.reason=E,E=0;E<h.length;E++)(0,h[E])(void 0)}),g}function He(){var l=yr.current;return l!==null?l:qe.pooledCache}function pl(l,r){r===null?A(yr,yr.current):A(yr,r.pool)}function eu(){var l=He();return l===null?null:{parent:Ui?fn._currentValue:fn._currentValue2,pool:l}}function Dc(l,r){if(Sa(l,r))return!0;if(typeof l!="object"||l===null||typeof r!="object"||r===null)return!1;var h=Object.keys(l),g=Object.keys(r);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var E=h[g];if(!Bm.call(r,E)||!Sa(l[E],r[E]))return!1}return!0}function R0(l){return l=l.status,l==="fulfilled"||l==="rejected"}function ml(l,r,h){switch(h=l[h],h===void 0?l.push(r):h!==r&&(r.then(Va,Va),r=h),r.status){case"fulfilled":return r.value;case"rejected":throw l=r.reason,Xr(l),l;default:if(typeof r.status=="string")r.then(Va,Va);else{if(l=qe,l!==null&&100<l.shellSuspendCounter)throw Error(u(482));l=r,l.status="pending",l.then(function(g){if(r.status==="pending"){var E=r;E.status="fulfilled",E.value=g}},function(g){if(r.status==="pending"){var E=r;E.status="rejected",E.reason=g}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw l=r.reason,Xr(l),l}throw Li=r,Uu}}function ti(l){try{var r=l._init;return r(l._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Li=h,Uu):h}}function Ac(){if(Li===null)throw Error(u(459));var l=Li;return Li=null,l}function Xr(l){if(l===Uu||l===Kd)throw Error(u(483))}function gi(l){var r=Mf;return Mf+=1,Pi===null&&(Pi=[]),ml(Pi,l,r)}function Kr(l,r){r=r.props.ref,l.ref=r!==void 0?r:null}function Qr(l,r){throw r.$$typeof===Td?Error(u(525)):(l=Object.prototype.toString.call(r),Error(u(31,l==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":l)))}function z0(l){function r(at,Z){if(l){var ot=at.deletions;ot===null?(at.deletions=[Z],at.flags|=16):ot.push(Z)}}function h(at,Z){if(!l)return null;for(;Z!==null;)r(at,Z),Z=Z.sibling;return null}function g(at){for(var Z=new Map;at!==null;)at.key!==null?Z.set(at.key,at):Z.set(at.index,at),at=at.sibling;return Z}function E(at,Z){return at=Ls(at,Z),at.index=0,at.sibling=null,at}function T(at,Z,ot){return at.index=ot,l?(ot=at.alternate,ot!==null?(ot=ot.index,ot<Z?(at.flags|=67108866,Z):ot):(at.flags|=67108866,Z)):(at.flags|=1048576,Z)}function z(at){return l&&at.alternate===null&&(at.flags|=67108866),at}function L(at,Z,ot,_t){return Z===null||Z.tag!==6?(Z=cf(ot,at.mode,_t),Z.return=at,Z):(Z=E(Z,ot),Z.return=at,Z)}function ct(at,Z,ot,_t){var Lt=ot.type;return Lt===io?At(at,Z,ot.props.children,_t,ot.key):Z!==null&&(Z.elementType===Lt||typeof Lt=="object"&&Lt!==null&&Lt.$$typeof===hr&&ti(Lt)===Z.type)?(Z=E(Z,ot.props),Kr(Z,ot),Z.return=at,Z):(Z=uf(ot.type,ot.key,ot.props,null,at.mode,_t),Kr(Z,ot),Z.return=at,Z)}function St(at,Z,ot,_t){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ot.containerInfo||Z.stateNode.implementation!==ot.implementation?(Z=Sd(ot,at.mode,_t),Z.return=at,Z):(Z=E(Z,ot.children||[]),Z.return=at,Z)}function At(at,Z,ot,_t,Lt){return Z===null||Z.tag!==7?(Z=Ol(ot,at.mode,_t,Lt),Z.return=at,Z):(Z=E(Z,ot),Z.return=at,Z)}function xt(at,Z,ot){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=cf(""+Z,at.mode,ot),Z.return=at,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case hf:return ot=uf(Z.type,Z.key,Z.props,null,at.mode,ot),Kr(ot,Z),ot.return=at,ot;case fr:return Z=Sd(Z,at.mode,ot),Z.return=at,Z;case hr:return Z=ti(Z),xt(at,Z,ot)}if(dr(Z)||b(Z))return Z=Ol(Z,at.mode,ot,null),Z.return=at,Z;if(typeof Z.then=="function")return xt(at,gi(Z),ot);if(Z.$$typeof===Rl)return xt(at,mi(at,Z),ot);Qr(at,Z)}return null}function Ot(at,Z,ot,_t){var Lt=Z!==null?Z.key:null;if(typeof ot=="string"&&ot!==""||typeof ot=="number"||typeof ot=="bigint")return Lt!==null?null:L(at,Z,""+ot,_t);if(typeof ot=="object"&&ot!==null){switch(ot.$$typeof){case hf:return ot.key===Lt?ct(at,Z,ot,_t):null;case fr:return ot.key===Lt?St(at,Z,ot,_t):null;case hr:return ot=ti(ot),Ot(at,Z,ot,_t)}if(dr(ot)||b(ot))return Lt!==null?null:At(at,Z,ot,_t,null);if(typeof ot.then=="function")return Ot(at,Z,gi(ot),_t);if(ot.$$typeof===Rl)return Ot(at,Z,mi(at,ot),_t);Qr(at,ot)}return null}function Yt(at,Z,ot,_t,Lt){if(typeof _t=="string"&&_t!==""||typeof _t=="number"||typeof _t=="bigint")return at=at.get(ot)||null,L(Z,at,""+_t,Lt);if(typeof _t=="object"&&_t!==null){switch(_t.$$typeof){case hf:return at=at.get(_t.key===null?ot:_t.key)||null,ct(Z,at,_t,Lt);case fr:return at=at.get(_t.key===null?ot:_t.key)||null,St(Z,at,_t,Lt);case hr:return _t=ti(_t),Yt(at,Z,ot,_t,Lt)}if(dr(_t)||b(_t))return at=at.get(ot)||null,At(Z,at,_t,Lt,null);if(typeof _t.then=="function")return Yt(at,Z,ot,gi(_t),Lt);if(_t.$$typeof===Rl)return Yt(at,Z,ot,mi(Z,_t),Lt);Qr(Z,_t)}return null}function sn(at,Z,ot,_t){for(var Lt=null,hn=null,Xt=Z,xe=Z=0,ce=null;Xt!==null&&xe<ot.length;xe++){Xt.index>xe?(ce=Xt,Xt=null):ce=Xt.sibling;var ge=Ot(at,Xt,ot[xe],_t);if(ge===null){Xt===null&&(Xt=ce);break}l&&Xt&&ge.alternate===null&&r(at,Xt),Z=T(ge,Z,xe),hn===null?Lt=ge:hn.sibling=ge,hn=ge,Xt=ce}if(xe===ot.length)return h(at,Xt),le&&pt(at,xe),Lt;if(Xt===null){for(;xe<ot.length;xe++)Xt=xt(at,ot[xe],_t),Xt!==null&&(Z=T(Xt,Z,xe),hn===null?Lt=Xt:hn.sibling=Xt,hn=Xt);return le&&pt(at,xe),Lt}for(Xt=g(Xt);xe<ot.length;xe++)ce=Yt(Xt,at,xe,ot[xe],_t),ce!==null&&(l&&ce.alternate!==null&&Xt.delete(ce.key===null?xe:ce.key),Z=T(ce,Z,xe),hn===null?Lt=ce:hn.sibling=ce,hn=ce);return l&&Xt.forEach(function(Yl){return r(at,Yl)}),le&&pt(at,xe),Lt}function Fn(at,Z,ot,_t){if(ot==null)throw Error(u(151));for(var Lt=null,hn=null,Xt=Z,xe=Z=0,ce=null,ge=ot.next();Xt!==null&&!ge.done;xe++,ge=ot.next()){Xt.index>xe?(ce=Xt,Xt=null):ce=Xt.sibling;var Yl=Ot(at,Xt,ge.value,_t);if(Yl===null){Xt===null&&(Xt=ce);break}l&&Xt&&Yl.alternate===null&&r(at,Xt),Z=T(Yl,Z,xe),hn===null?Lt=Yl:hn.sibling=Yl,hn=Yl,Xt=ce}if(ge.done)return h(at,Xt),le&&pt(at,xe),Lt;if(Xt===null){for(;!ge.done;xe++,ge=ot.next())ge=xt(at,ge.value,_t),ge!==null&&(Z=T(ge,Z,xe),hn===null?Lt=ge:hn.sibling=ge,hn=ge);return le&&pt(at,xe),Lt}for(Xt=g(Xt);!ge.done;xe++,ge=ot.next())ge=Yt(Xt,at,xe,ge.value,_t),ge!==null&&(l&&ge.alternate!==null&&Xt.delete(ge.key===null?xe:ge.key),Z=T(ge,Z,xe),hn===null?Lt=ge:hn.sibling=ge,hn=ge);return l&&Xt.forEach(function(wf){return r(at,wf)}),le&&pt(at,xe),Lt}function Eo(at,Z,ot,_t){if(typeof ot=="object"&&ot!==null&&ot.type===io&&ot.key===null&&(ot=ot.props.children),typeof ot=="object"&&ot!==null){switch(ot.$$typeof){case hf:t:{for(var Lt=ot.key;Z!==null;){if(Z.key===Lt){if(Lt=ot.type,Lt===io){if(Z.tag===7){h(at,Z.sibling),_t=E(Z,ot.props.children),_t.return=at,at=_t;break t}}else if(Z.elementType===Lt||typeof Lt=="object"&&Lt!==null&&Lt.$$typeof===hr&&ti(Lt)===Z.type){h(at,Z.sibling),_t=E(Z,ot.props),Kr(_t,ot),_t.return=at,at=_t;break t}h(at,Z);break}else r(at,Z);Z=Z.sibling}ot.type===io?(_t=Ol(ot.props.children,at.mode,_t,ot.key),_t.return=at,at=_t):(_t=uf(ot.type,ot.key,ot.props,null,at.mode,_t),Kr(_t,ot),_t.return=at,at=_t)}return z(at);case fr:t:{for(Lt=ot.key;Z!==null;){if(Z.key===Lt)if(Z.tag===4&&Z.stateNode.containerInfo===ot.containerInfo&&Z.stateNode.implementation===ot.implementation){h(at,Z.sibling),_t=E(Z,ot.children||[]),_t.return=at,at=_t;break t}else{h(at,Z);break}else r(at,Z);Z=Z.sibling}_t=Sd(ot,at.mode,_t),_t.return=at,at=_t}return z(at);case hr:return ot=ti(ot),Eo(at,Z,ot,_t)}if(dr(ot))return sn(at,Z,ot,_t);if(b(ot)){if(Lt=b(ot),typeof Lt!="function")throw Error(u(150));return ot=Lt.call(ot),Fn(at,Z,ot,_t)}if(typeof ot.then=="function")return Eo(at,Z,gi(ot),_t);if(ot.$$typeof===Rl)return Eo(at,Z,mi(at,ot),_t);Qr(at,ot)}return typeof ot=="string"&&ot!==""||typeof ot=="number"||typeof ot=="bigint"?(ot=""+ot,Z!==null&&Z.tag===6?(h(at,Z.sibling),_t=E(Z,ot),_t.return=at,at=_t):(h(at,Z),_t=cf(ot,at.mode,_t),_t.return=at,at=_t),z(at)):h(at,Z)}return function(at,Z,ot,_t){try{Mf=0;var Lt=Eo(at,Z,ot,_t);return Pi=null,Lt}catch(Xt){if(Xt===Uu||Xt===Kd)throw Xt;var hn=i(29,Xt,null,at.mode);return hn.lanes=_t,hn.return=at,hn}}}function _a(){for(var l=ds,r=Lm=ds=0;r<l;){var h=Yi[r];Yi[r++]=null;var g=Yi[r];Yi[r++]=null;var E=Yi[r];Yi[r++]=null;var T=Yi[r];if(Yi[r++]=null,g!==null&&E!==null){var z=g.pending;z===null?E.next=E:(E.next=z.next,z.next=E),g.pending=E}T!==0&&nu(h,E,T)}}function gl(l,r,h,g){Yi[ds++]=l,Yi[ds++]=r,Yi[ds++]=h,Yi[ds++]=g,Lm|=g,l.lanes|=g,l=l.alternate,l!==null&&(l.lanes|=g)}function yl(l,r,h,g){return gl(l,r,h,g),Zr(l)}function nr(l,r){return gl(l,null,null,r),Zr(l)}function nu(l,r,h){l.lanes|=h;var g=l.alternate;g!==null&&(g.lanes|=h);for(var E=!1,T=l.return;T!==null;)T.childLanes|=h,g=T.alternate,g!==null&&(g.childLanes|=h),T.tag===22&&(l=T.stateNode,l===null||l._visibility&1||(E=!0)),l=T,T=T.return;return l.tag===3?(T=l.stateNode,E&&r!==null&&(E=31-li(h),l=T.hiddenUpdates,g=l[E],g===null?l[E]=[r]:g.push(r),r.lane=h|536870912),T):null}function Zr(l){if(50<Pu)throw Pu=0,up=null,Error(u(185));for(var r=l.return;r!==null;)l=r,r=l.return;return l.tag===3?l.stateNode:null}function Mc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jr(l,r){l=l.updateQueue,r.updateQueue===l&&(r.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function yi(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Ns(l,r,h){var g=l.updateQueue;if(g===null)return null;if(g=g.shared,(re&2)!==0){var E=g.pending;return E===null?r.next=r:(r.next=E.next,E.next=r),g.pending=r,r=Zr(l),nu(l,null,h),r}return gl(l,g,r,h),Zr(l)}function Nc(l,r,h){if(r=r.updateQueue,r!==null&&(r=r.shared,(h&4194048)!==0)){var g=r.lanes;g&=l.pendingLanes,h|=g,r.lanes=h,tt(l,h)}}function H0(l,r){var h=l.updateQueue,g=l.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var E=null,T=null;if(h=h.firstBaseUpdate,h!==null){do{var z={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};T===null?E=T=z:T=T.next=z,h=h.next}while(h!==null);T===null?E=T=r:T=T.next=r}else E=T=r;h={baseState:g.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},l.updateQueue=h;return}l=h.lastBaseUpdate,l===null?h.firstBaseUpdate=r:l.next=r,h.lastBaseUpdate=r}function au(){if(Pm){var l=wu;if(l!==null)throw l}}function Fr(l,r,h,g){Pm=!1;var E=l.updateQueue;vr=!1;var T=E.firstBaseUpdate,z=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var ct=L,St=ct.next;ct.next=null,z===null?T=St:z.next=St,z=ct;var At=l.alternate;At!==null&&(At=At.updateQueue,L=At.lastBaseUpdate,L!==z&&(L===null?At.firstBaseUpdate=St:L.next=St,At.lastBaseUpdate=ct))}if(T!==null){var xt=E.baseState;z=0,At=St=ct=null,L=T;do{var Ot=L.lane&-536870913,Yt=Ot!==L.lane;if(Yt?(ue&Ot)===Ot:(g&Ot)===Ot){Ot!==0&&Ot===Hu&&(Pm=!0),At!==null&&(At=At.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});t:{var sn=l,Fn=L;Ot=r;var Eo=h;switch(Fn.tag){case 1:if(sn=Fn.payload,typeof sn=="function"){xt=sn.call(Eo,xt,Ot);break t}xt=sn;break t;case 3:sn.flags=sn.flags&-65537|128;case 0:if(sn=Fn.payload,Ot=typeof sn=="function"?sn.call(Eo,xt,Ot):sn,Ot==null)break t;xt=Si({},xt,Ot);break t;case 2:vr=!0}}Ot=L.callback,Ot!==null&&(l.flags|=64,Yt&&(l.flags|=8192),Yt=E.callbacks,Yt===null?E.callbacks=[Ot]:Yt.push(Ot))}else Yt={lane:Ot,tag:L.tag,payload:L.payload,callback:L.callback,next:null},At===null?(St=At=Yt,ct=xt):At=At.next=Yt,z|=Ot;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;Yt=L,L=Yt.next,Yt.next=null,E.lastBaseUpdate=Yt,E.shared.pending=null}}while(!0);At===null&&(ct=xt),E.baseState=ct,E.firstBaseUpdate=St,E.lastBaseUpdate=At,T===null&&(E.shared.lanes=0),Er|=z,l.lanes=z,l.memoizedState=xt}}function w0(l,r){if(typeof l!="function")throw Error(u(191,l));l.call(r)}function _g(l,r){var h=l.callbacks;if(h!==null)for(l.callbacks=null,l=0;l<h.length;l++)w0(h[l],r)}function wt(l,r){l=Ll,A(Zd,l),A(Fs,r),Ll=l|r.baseLanes}function Oc(){A(Zd,Ll),A(Fs,Fs.current)}function vl(){Ll=Zd.current,D(Fs),D(Zd)}function Sl(l){var r=l.alternate;A(Hn,Hn.current&1),A(Ei,l),qi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(qi=l)}function iu(l){A(Hn,Hn.current),A(Ei,l),qi===null&&(qi=l)}function Os(l){l.tag===22?(A(Hn,Hn.current),A(Ei,l),qi===null&&(qi=l)):bl()}function bl(){A(Hn,Hn.current),A(Ei,Ei.current)}function ei(l){D(Ei),qi===l&&(qi=null),D(Hn)}function El(l){for(var r=l;r!==null;){if(r.tag===13){var h=r.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||bf(h)||Ef(h)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break;for(;r.sibling===null;){if(r.return===null||r.return===l)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function cn(){throw Error(u(321))}function Tl(l,r){if(r===null)return!1;for(var h=0;h<r.length&&h<l.length;h++)if(!Sa(l[h],r[h]))return!1;return!0}function Rc(l,r,h,g,E,T){return jl=T,kt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Gt.H=l===null||l.memoizedState===null?Hy:Ym,vo=!1,T=h(g,E),vo=!1,Bu&&(T=zh(r,h,g,E)),su(l),T}function su(l){Gt.H=Nf;var r=je!==null&&je.next!==null;if(jl=0,Ln=je=kt=null,Jd=!1,Vu=0,Gu=null,r)throw Error(u(300));l===null||Pn||(l=l.dependencies,l!==null&&As(l)&&(Pn=!0))}function zh(l,r,h,g){kt=l;var E=0;do{if(Bu&&(Gu=null),Vu=0,Bu=!1,25<=E)throw Error(u(301));if(E+=1,Ln=je=null,l.updateQueue!=null){var T=l.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Gt.H=wy,T=r(h,g)}while(Bu);return T}function Hh(){var l=Gt.H,r=l.useState()[0];return r=typeof r.then=="function"?Ii(r):r,l=l.useState()[0],(je!==null?je.memoizedState:null)!==l&&(kt.flags|=1024),r}function Rs(){var l=Fd!==0;return Fd=0,l}function ki(l,r,h){r.updateQueue=l.updateQueue,r.flags&=-2053,l.lanes&=~h}function zc(l){if(Jd){for(l=l.memoizedState;l!==null;){var r=l.queue;r!==null&&(r.pending=null),l=l.next}Jd=!1}jl=0,Ln=je=kt=null,Bu=!1,Vu=Fd=0,Gu=null}function pa(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ln===null?kt.memoizedState=Ln=l:Ln=Ln.next=l,Ln}function Ke(){if(je===null){var l=kt.alternate;l=l!==null?l.memoizedState:null}else l=je.next;var r=Ln===null?kt.memoizedState:Ln.next;if(r!==null)Ln=r,je=l;else{if(l===null)throw kt.alternate===null?Error(u(467)):Error(u(310));je=l,l={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Ln===null?kt.memoizedState=Ln=l:Ln=Ln.next=l}return Ln}function kr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(l){var r=Vu;return Vu+=1,Gu===null&&(Gu=[]),l=ml(Gu,l,r),r=kt,(Ln===null?r.memoizedState:Ln.next)===null&&(r=r.alternate,Gt.H=r===null||r.memoizedState===null?Hy:Ym),l}function Ge(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Ii(l);if(l.$$typeof===Rl)return gn(l)}throw Error(u(438,String(l)))}function lu(l){var r=null,h=kt.updateQueue;if(h!==null&&(r=h.memoCache),r==null){var g=kt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(r={data:g.data.map(function(E){return E.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),h===null&&(h=kr(),kt.updateQueue=h),h.memoCache=r,h=r.data[r.index],h===void 0)for(h=r.data[r.index]=Array(l),g=0;g<l;g++)h[g]=Ps;return r.index++,h}function zs(l,r){return typeof r=="function"?r(l):r}function ru(l){var r=Ke();return Cl(r,je,l)}function Cl(l,r,h){var g=l.queue;if(g===null)throw Error(u(311));g.lastRenderedReducer=h;var E=l.baseQueue,T=g.pending;if(T!==null){if(E!==null){var z=E.next;E.next=T.next,T.next=z}r.baseQueue=E=T,g.pending=null}if(T=l.baseState,E===null)l.memoizedState=T;else{r=E.next;var L=z=null,ct=null,St=r,At=!1;do{var xt=St.lane&-536870913;if(xt!==St.lane?(ue&xt)===xt:(jl&xt)===xt){var Ot=St.revertLane;if(Ot===0)ct!==null&&(ct=ct.next={lane:0,revertLane:0,gesture:null,action:St.action,hasEagerState:St.hasEagerState,eagerState:St.eagerState,next:null}),xt===Hu&&(At=!0);else if((jl&Ot)===Ot){St=St.next,Ot===Hu&&(At=!0);continue}else xt={lane:0,revertLane:St.revertLane,gesture:null,action:St.action,hasEagerState:St.hasEagerState,eagerState:St.eagerState,next:null},ct===null?(L=ct=xt,z=T):ct=ct.next=xt,kt.lanes|=Ot,Er|=Ot;xt=St.action,vo&&h(T,xt),T=St.hasEagerState?St.eagerState:h(T,xt)}else Ot={lane:xt,revertLane:St.revertLane,gesture:St.gesture,action:St.action,hasEagerState:St.hasEagerState,eagerState:St.eagerState,next:null},ct===null?(L=ct=Ot,z=T):ct=ct.next=Ot,kt.lanes|=xt,Er|=xt;St=St.next}while(St!==null&&St!==r);if(ct===null?z=T:ct.next=L,!Sa(T,l.memoizedState)&&(Pn=!0,At&&(h=wu,h!==null)))throw h;l.memoizedState=T,l.baseState=z,l.baseQueue=ct,g.lastRenderedState=T}return E===null&&(g.lanes=0),[l.memoizedState,g.dispatch]}function Ir(l){var r=Ke(),h=r.queue;if(h===null)throw Error(u(311));h.lastRenderedReducer=l;var g=h.dispatch,E=h.pending,T=r.memoizedState;if(E!==null){h.pending=null;var z=E=E.next;do T=l(T,z.action),z=z.next;while(z!==E);Sa(T,r.memoizedState)||(Pn=!0),r.memoizedState=T,r.baseQueue===null&&(r.baseState=T),h.lastRenderedState=T}return[T,g]}function Wi(l,r,h){var g=kt,E=Ke(),T=le;if(T){if(h===void 0)throw Error(u(407));h=h()}else h=r();var z=!Sa((je||E).memoizedState,h);if(z&&(E.memoizedState=h,Pn=!0),E=E.queue,Uh(Hc.bind(null,g,E,l),[l]),E.getSnapshot!==r||z||Ln!==null&&Ln.memoizedState.tag&1){if(g.flags|=2048,ja(9,{destroy:void 0},Hs.bind(null,g,E,h,r),null),qe===null)throw Error(u(349));T||(jl&127)!==0||xg(g,r,h)}return h}function xg(l,r,h){l.flags|=16384,l={getSnapshot:r,value:h},r=kt.updateQueue,r===null?(r=kr(),kt.updateQueue=r,r.stores=[l]):(h=r.stores,h===null?r.stores=[l]:h.push(l))}function Hs(l,r,h,g){r.value=h,r.getSnapshot=g,ou(r)&&wc(l)}function Hc(l,r,h){return h(function(){ou(r)&&wc(l)})}function ou(l){var r=l.getSnapshot;l=l.value;try{var h=r();return!Sa(l,h)}catch{return!0}}function wc(l){var r=nr(l,2);r!==null&&Pa(r,l,2)}function Ga(l){var r=pa();if(typeof l=="function"){var h=l;if(l=h(),vo){ht(!0);try{h()}finally{ht(!1)}}}return r.memoizedState=r.baseState=l,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:l},r}function ni(l,r,h,g){return l.baseState=h,Cl(l,je,typeof g=="function"?g:zs)}function ws(l,r,h,g,E){if(ir(l))throw Error(u(485));if(l=r.action,l!==null){var T={payload:E,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){T.listeners.push(z)}};Gt.T!==null?h(!0):T.isTransition=!1,g(T),h=r.pending,h===null?(T.next=r.pending=T,$i(r,T)):(T.next=h.next,r.pending=h.next=T)}}function $i(l,r){var h=r.action,g=r.payload,E=l.state;if(r.isTransition){var T=Gt.T,z={};Gt.T=z;try{var L=h(E,g),ct=Gt.S;ct!==null&&ct(z,L),ts(l,r,L)}catch(St){Uc(l,r,St)}finally{T!==null&&z.types!==null&&(T.types=z.types),Gt.T=T}}else try{T=h(E,g),ts(l,r,T)}catch(St){Uc(l,r,St)}}function ts(l,r,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(g){es(l,r,g)},function(g){return Uc(l,r,g)}):es(l,r,h)}function es(l,r,h){r.status="fulfilled",r.value=h,wh(r),l.state=h,r=l.pending,r!==null&&(h=r.next,h===r?l.pending=null:(h=h.next,r.next=h,$i(l,h)))}function Uc(l,r,h){var g=l.pending;if(l.pending=null,g!==null){g=g.next;do r.status="rejected",r.reason=h,wh(r),r=r.next;while(r!==g)}l.action=null}function wh(l){l=l.listeners;for(var r=0;r<l.length;r++)(0,l[r])()}function U0(l,r){return r}function ns(l,r){if(le){var h=qe.formState;if(h!==null){t:{var g=kt;if(le){if(nn){var E=uy(nn,ji);if(E){nn=Mm(E),g=cy(E);break t}}We(g)}g=!1}g&&(r=h[0])}}h=pa(),h.memoizedState=h.baseState=r,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:U0,lastRenderedState:r},h.queue=g,h=Ph.bind(null,kt,g),g.dispatch=h,g=Ga(!1);var T=cu.bind(null,kt,!1,g.queue);return g=pa(),E={state:r,dispatch:null,action:l,pending:null},g.queue=E,h=ws.bind(null,kt,E,T,h),E.dispatch=h,g.memoizedState=l,[r,h,!1]}function B0(l){var r=Ke();return as(r,je,l)}function as(l,r,h){if(r=Cl(l,r,U0)[0],l=ru(zs)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var g=Ii(r)}catch(z){throw z===Uu?Kd:z}else g=r;r=Ke();var E=r.queue,T=E.dispatch;return h!==r.memoizedState&&(kt.flags|=2048,ja(9,{destroy:void 0},Bc.bind(null,E,h),null)),[g,T,l]}function Bc(l,r){l.action=r}function Vc(l){var r=Ke(),h=je;if(h!==null)return as(r,h,l);Ke(),r=r.memoizedState,h=Ke();var g=h.queue.dispatch;return h.memoizedState=l,[r,g,!1]}function ja(l,r,h,g){return l={tag:l,create:h,deps:g,inst:r,next:null},r=kt.updateQueue,r===null&&(r=kr(),kt.updateQueue=r),h=r.lastEffect,h===null?r.lastEffect=l.next=l:(g=h.next,h.next=l,l.next=g,r.lastEffect=l),l}function Wr(){return Ke().memoizedState}function Gc(l,r,h,g){var E=pa();kt.flags|=l,E.memoizedState=ja(1|r,{destroy:void 0},h,g===void 0?null:g)}function uu(l,r,h,g){var E=Ke();g=g===void 0?null:g;var T=E.memoizedState.inst;je!==null&&g!==null&&Tl(g,je.memoizedState.deps)?E.memoizedState=ja(r,T,h,g):(kt.flags|=l,E.memoizedState=ja(1|r,T,h,g))}function V0(l,r){Gc(8390656,8,l,r)}function Uh(l,r){uu(2048,8,l,r)}function Dg(l){kt.flags|=4;var r=kt.updateQueue;if(r===null)r=kr(),kt.updateQueue=r,r.events=[l];else{var h=r.events;h===null?r.events=[l]:h.push(l)}}function Bh(l){var r=Ke().memoizedState;return Dg({ref:r,nextImpl:l}),function(){if((re&2)!==0)throw Error(u(440));return r.impl.apply(void 0,arguments)}}function G0(l,r){return uu(4,2,l,r)}function Vh(l,r){return uu(4,4,l,r)}function Ag(l,r){if(typeof r=="function"){l=l();var h=r(l);return function(){typeof h=="function"?h():r(null)}}if(r!=null)return l=l(),r.current=l,function(){r.current=null}}function j0(l,r,h){h=h!=null?h.concat([l]):null,uu(4,4,Ag.bind(null,r,l),h)}function L0(){}function Gh(l,r){var h=Ke();r=r===void 0?null:r;var g=h.memoizedState;return r!==null&&Tl(r,g[1])?g[0]:(h.memoizedState=[l,r],l)}function jc(l,r){var h=Ke();r=r===void 0?null:r;var g=h.memoizedState;if(r!==null&&Tl(r,g[1]))return g[0];if(g=l(),vo){ht(!0);try{l()}finally{ht(!1)}}return h.memoizedState=[g,r],g}function jh(l,r,h){return h===void 0||(jl&1073741824)!==0&&(ue&261930)===0?l.memoizedState=r:(l.memoizedState=h,l=af(),kt.lanes|=l,Er|=l,h)}function Lc(l,r,h,g){return Sa(h,r)?h:Fs.current!==null?(l=jh(l,h,g),Sa(l,r)||(Pn=!0),l):(jl&42)===0||(jl&1073741824)!==0&&(ue&261930)===0?(Pn=!0,l.memoizedState=h):(l=af(),kt.lanes|=l,Er|=l,r)}function P0(l,r,h,g,E){var T=qs();Zn(T!==0&&8>T?T:8);var z=Gt.T,L={};Gt.T=L,cu(l,!1,r,h);try{var ct=E(),St=Gt.S;if(St!==null&&St(L,ct),ct!==null&&typeof ct=="object"&&typeof ct.then=="function"){var At=Ut(ct,g);ar(l,r,At,si(l))}else ar(l,r,g,si(l))}catch(xt){ar(l,r,{then:function(){},status:"rejected",reason:xt},si())}finally{Zn(T),z!==null&&L.types!==null&&(z.types=L.types),Gt.T=z}}function Y0(l){var r=l.memoizedState;if(r!==null)return r;r={memoizedState:qa,baseState:qa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:qa},next:null};var h={};return r.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:h},next:null},l.memoizedState=r,l=l.alternate,l!==null&&(l.memoizedState=r),r}function Lh(){return gn(pr)}function _l(){return Ke().memoizedState}function q0(){return Ke().memoizedState}function Mg(l){for(var r=l.return;r!==null;){switch(r.tag){case 24:case 3:var h=si();l=yi(h);var g=Ns(r,l,h);g!==null&&(Pa(g,r,h),Nc(g,r,h)),r={cache:De()},l.payload=r;return}r=r.return}}function ma(l,r,h){var g=si();h={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},ir(l)?X0(r,h):(h=yl(l,r,h,g),h!==null&&(Pa(h,l,g),Pc(h,r,g)))}function Ph(l,r,h){var g=si();ar(l,r,h,g)}function ar(l,r,h,g){var E={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(ir(l))X0(r,E);else{var T=l.alternate;if(l.lanes===0&&(T===null||T.lanes===0)&&(T=r.lastRenderedReducer,T!==null))try{var z=r.lastRenderedState,L=T(z,h);if(E.hasEagerState=!0,E.eagerState=L,Sa(L,z))return gl(l,r,E,0),qe===null&&_a(),!1}catch{}if(h=yl(l,r,E,g),h!==null)return Pa(h,l,g),Pc(h,r,g),!0}return!1}function cu(l,r,h,g){if(g={lane:2,revertLane:_c(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},ir(l)){if(r)throw Error(u(479))}else r=yl(l,h,g,2),r!==null&&Pa(r,l,2)}function ir(l){var r=l.alternate;return l===kt||r!==null&&r===kt}function X0(l,r){Bu=Jd=!0;var h=l.pending;h===null?r.next=r:(r.next=h.next,h.next=r),l.pending=r}function Pc(l,r,h){if((h&4194048)!==0){var g=r.lanes;g&=l.pendingLanes,h|=g,r.lanes=h,tt(l,h)}}function Yh(l,r,h,g){r=l.memoizedState,h=h(g,r),h=h==null?r:Si({},r,h),l.memoizedState=h,l.lanes===0&&(l.updateQueue.baseState=h)}function Yc(l,r,h,g,E,T,z){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(g,T,z):r.prototype&&r.prototype.isPureReactComponent?!Dc(h,g)||!Dc(E,T):!0}function K0(l,r,h,g){l=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(h,g),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(h,g),r.state!==l&&kd.enqueueReplaceState(r,r.state,null)}function Us(l,r){var h=r;if("ref"in r){h={};for(var g in r)g!=="ref"&&(h[g]=r[g])}if(l=l.defaultProps){h===r&&(h=Si({},h));for(var E in l)h[E]===void 0&&(h[E]=l[E])}return h}function qc(l,r){try{var h=l.onUncaughtError;h(r.value,{componentStack:r.stack})}catch(g){setTimeout(function(){throw g})}}function Q0(l,r,h){try{var g=l.onCaughtError;g(h.value,{componentStack:h.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function fu(l,r,h){return h=yi(h),h.tag=3,h.payload={element:null},h.callback=function(){qc(l,r)},h}function Xc(l){return l=yi(l),l.tag=3,l}function qh(l,r,h,g){var E=h.type.getDerivedStateFromError;if(typeof E=="function"){var T=g.value;l.payload=function(){return E(T)},l.callback=function(){Q0(r,h,g)}}var z=h.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(l.callback=function(){Q0(r,h,g),typeof E!="function"&&(Tr===null?Tr=new Set([this]):Tr.add(this));var L=g.stack;this.componentDidCatch(g.value,{componentStack:L!==null?L:""})})}function xa(l,r,h,g,E){if(h.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(r=h.alternate,r!==null&&$a(r,h,E,!0),h=Ei.current,h!==null){switch(h.tag){case 31:case 13:return qi===null?Su():h.alternate===null&&vn===0&&(vn=3),h.flags&=-257,h.flags|=65536,h.lanes=E,g===Qd?h.flags|=16384:(r=h.updateQueue,r===null?h.updateQueue=new Set([g]):r.add(g),md(l,g,E)),!1;case 22:return h.flags|=65536,g===Qd?h.flags|=16384:(r=h.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([g])},h.updateQueue=r):(h=r.retryQueue,h===null?r.retryQueue=new Set([g]):h.add(g)),md(l,g,E)),!1}throw Error(u(435,h.tag))}return md(l,g,E),Su(),!1}if(le)return r=Ei.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=E,g!==Vm&&(l=Error(u(422),{cause:g}),$e(mt(l,h)))):(g!==Vm&&(r=Error(u(423),{cause:g}),$e(mt(r,h))),l=l.current.alternate,l.flags|=65536,E&=-E,l.lanes|=E,g=mt(g,h),E=fu(l.stateNode,g,E),H0(l,E),vn!==4&&(vn=2)),!1;var T=Error(u(520),{cause:g});if(T=mt(T,h),zf===null?zf=[T]:zf.push(T),vn!==4&&(vn=2),r===null)return!0;g=mt(g,h),h=r;do{switch(h.tag){case 3:return h.flags|=65536,l=E&-E,h.lanes|=l,l=fu(h.stateNode,g,l),H0(h,l),!1;case 1:if(r=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Tr===null||!Tr.has(T))))return h.flags|=65536,E&=-E,h.lanes|=E,E=Xc(E),qh(E,l,h,g),H0(h,E),!1}h=h.return}while(h!==null);return!1}function na(l,r,h,g){r.child=l===null?zy(r,null,h,g):yo(r,l.child,h,g)}function Kc(l,r,h,g,E){h=h.render;var T=r.ref;if("ref"in g){var z={};for(var L in g)L!=="ref"&&(z[L]=g[L])}else z=g;return Mn(r),g=Rc(l,r,h,z,T,E),L=Rs(),l!==null&&!Pn?(ki(l,r,E),ai(l,r,E)):(le&&L&&vt(r),r.flags|=1,na(l,r,g,E),r.child)}function Xh(l,r,h,g,E){if(l===null){var T=h.type;return typeof T=="function"&&!of(T)&&T.defaultProps===void 0&&h.compare===null?(r.tag=15,r.type=T,Kh(l,r,T,g,E)):(l=uf(h.type,null,g,r,r.mode,E),l.ref=r.ref,l.return=r,r.child=l)}if(T=l.child,!pu(l,E)){var z=T.memoizedProps;if(h=h.compare,h=h!==null?h:Dc,h(z,g)&&l.ref===r.ref)return ai(l,r,E)}return r.flags|=1,l=Ls(T,g),l.ref=r.ref,l.return=r,r.child=l}function Kh(l,r,h,g,E){if(l!==null){var T=l.memoizedProps;if(Dc(T,g)&&l.ref===r.ref)if(Pn=!1,r.pendingProps=g=T,pu(l,E))(l.flags&131072)!==0&&(Pn=!0);else return r.lanes=l.lanes,ai(l,r,E)}return Z0(l,r,h,g,E)}function xl(l,r,h,g){var E=g.children,T=l!==null?l.memoizedState:null;if(l===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((r.flags&128)!==0){if(T=T!==null?T.baseLanes|h:h,l!==null){for(g=r.child=l.child,E=0;g!==null;)E=E|g.lanes|g.childLanes,g=g.sibling;g=E&~T}else g=0,r.child=null;return hu(l,r,T,h,g)}if((h&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},l!==null&&pl(r,T!==null?T.cachePool:null),T!==null?wt(r,T):Oc(),Os(r);else return g=r.lanes=536870912,hu(l,r,T!==null?T.baseLanes|h:h,h,g)}else T!==null?(pl(r,T.cachePool),wt(r,T),bl(),r.memoizedState=null):(l!==null&&pl(r,null),Oc(),bl());return na(l,r,E,h),r.child}function Ri(l,r){return l!==null&&l.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function hu(l,r,h,g,E){var T=He();return T=T===null?null:{parent:Ui?fn._currentValue:fn._currentValue2,pool:T},r.memoizedState={baseLanes:h,cachePool:T},l!==null&&pl(r,null),Oc(),Os(r),l!==null&&$a(l,r,g,!0),r.childLanes=E,null}function $r(l,r){return r=is({mode:r.mode,children:r.children},l.mode),r.ref=l.ref,l.child=r,r.return=l,r}function du(l,r,h){return yo(r,l.child,null,h),l=$r(r,r.pendingProps),l.flags|=2,ei(r),r.memoizedState=null,l}function Qc(l,r,h){var g=r.pendingProps,E=(r.flags&128)!==0;if(r.flags&=-129,l===null){if(le){if(g.mode==="hidden")return l=$r(r,g),r.lanes=536870912,Ri(null,l);if(iu(r),(l=nn)?(l=py(l,ji),l!==null&&(r.memoizedState={dehydrated:l,treeContext:Vl!==null?{id:Xa,overflow:Qs}:null,retryLane:536870912,hydrationErrors:null},h=vd(l),h.return=r,r.child=h,Jn=r,nn=null)):l=null,l===null)throw We(r);return r.lanes=536870912,null}return $r(r,g)}var T=l.memoizedState;if(T!==null){var z=T.dehydrated;if(iu(r),E)if(r.flags&256)r.flags&=-257,r=du(l,r,h);else if(r.memoizedState!==null)r.child=l.child,r.flags|=128,r=null;else throw Error(u(558));else if(Pn||$a(l,r,h,!1),E=(h&l.childLanes)!==0,Pn||E){if(g=qe,g!==null&&(z=et(g,h),z!==0&&z!==T.retryLane))throw T.retryLane=z,nr(l,z),Pa(g,l,z),Id;Su(),r=du(l,r,h)}else l=T.treeContext,ya&&(nn=Nm(z),Jn=r,le=!0,Gl=null,ji=!1,l!==null&&jt(r,l)),r=$r(r,g),r.flags|=4096;return r}return l=Ls(l.child,{mode:g.mode,children:g.children}),l.ref=r.ref,r.child=l,l.return=r,l}function Zc(l,r){var h=r.ref;if(h===null)l!==null&&l.ref!==null&&(r.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(u(284));(l===null||l.ref!==h)&&(r.flags|=4194816)}}function Z0(l,r,h,g,E){return Mn(r),h=Rc(l,r,h,g,void 0,E),g=Rs(),l!==null&&!Pn?(ki(l,r,E),ai(l,r,E)):(le&&g&&vt(r),r.flags|=1,na(l,r,h,E),r.child)}function J0(l,r,h,g,E,T){return Mn(r),r.updateQueue=null,h=zh(r,g,h,E),su(l),g=Rs(),l!==null&&!Pn?(ki(l,r,T),ai(l,r,T)):(le&&g&&vt(r),r.flags|=1,na(l,r,h,T),r.child)}function F0(l,r,h,g,E){if(Mn(r),r.stateNode===null){var T=ho,z=h.contextType;typeof z=="object"&&z!==null&&(T=gn(z)),T=new h(g,T),r.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=kd,r.stateNode=T,T._reactInternals=r,T=r.stateNode,T.props=g,T.state=r.memoizedState,T.refs={},Mc(r),z=h.contextType,T.context=typeof z=="object"&&z!==null?gn(z):ho,T.state=r.memoizedState,z=h.getDerivedStateFromProps,typeof z=="function"&&(Yh(r,h,z,g),T.state=r.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(z=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),z!==T.state&&kd.enqueueReplaceState(T,T.state,null),Fr(r,g,T,E),au(),T.state=r.memoizedState),typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!0}else if(l===null){T=r.stateNode;var L=r.memoizedProps,ct=Us(h,L);T.props=ct;var St=T.context,At=h.contextType;z=ho,typeof At=="object"&&At!==null&&(z=gn(At));var xt=h.getDerivedStateFromProps;At=typeof xt=="function"||typeof T.getSnapshotBeforeUpdate=="function",L=r.pendingProps!==L,At||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(L||St!==z)&&K0(r,T,g,z),vr=!1;var Ot=r.memoizedState;T.state=Ot,Fr(r,g,T,E),au(),St=r.memoizedState,L||Ot!==St||vr?(typeof xt=="function"&&(Yh(r,h,xt,g),St=r.memoizedState),(ct=vr||Yc(r,h,ct,g,Ot,St,z))?(At||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(r.flags|=4194308)):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=g,r.memoizedState=St),T.props=g,T.state=St,T.context=z,g=ct):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),g=!1)}else{T=r.stateNode,Jr(l,r),z=r.memoizedProps,At=Us(h,z),T.props=At,xt=r.pendingProps,Ot=T.context,St=h.contextType,ct=ho,typeof St=="object"&&St!==null&&(ct=gn(St)),L=h.getDerivedStateFromProps,(St=typeof L=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(z!==xt||Ot!==ct)&&K0(r,T,g,ct),vr=!1,Ot=r.memoizedState,T.state=Ot,Fr(r,g,T,E),au();var Yt=r.memoizedState;z!==xt||Ot!==Yt||vr||l!==null&&l.dependencies!==null&&As(l.dependencies)?(typeof L=="function"&&(Yh(r,h,L,g),Yt=r.memoizedState),(At=vr||Yc(r,h,At,g,Ot,Yt,ct)||l!==null&&l.dependencies!==null&&As(l.dependencies))?(St||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,Yt,ct),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,Yt,ct)),typeof T.componentDidUpdate=="function"&&(r.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof T.componentDidUpdate!="function"||z===l.memoizedProps&&Ot===l.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===l.memoizedProps&&Ot===l.memoizedState||(r.flags|=1024),r.memoizedProps=g,r.memoizedState=Yt),T.props=g,T.state=Yt,T.context=ct,g=At):(typeof T.componentDidUpdate!="function"||z===l.memoizedProps&&Ot===l.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||z===l.memoizedProps&&Ot===l.memoizedState||(r.flags|=1024),g=!1)}return T=g,Zc(l,r),g=(r.flags&128)!==0,T||g?(T=r.stateNode,h=g&&typeof h.getDerivedStateFromError!="function"?null:T.render(),r.flags|=1,l!==null&&g?(r.child=yo(r,l.child,null,E),r.child=yo(r,null,h,E)):na(l,r,h,E),r.memoizedState=T.state,l=r.child):l=ai(l,r,E),l}function Qh(l,r,h,g){return Ce(),r.flags|=256,na(l,r,h,g),r.child}function Jc(l){return{baseLanes:l,cachePool:eu()}}function Bs(l,r,h){return l=l!==null?l.childLanes&~h:0,r&&(l|=Ci),l}function Zh(l,r,h){var g=r.pendingProps,E=!1,T=(r.flags&128)!==0,z;if((z=T)||(z=l!==null&&l.memoizedState===null?!1:(Hn.current&2)!==0),z&&(E=!0,r.flags&=-129),z=(r.flags&32)!==0,r.flags&=-33,l===null){if(le){if(E?Sl(r):bl(),(l=nn)?(l=u3(l,ji),l!==null&&(r.memoizedState={dehydrated:l,treeContext:Vl!==null?{id:Xa,overflow:Qs}:null,retryLane:536870912,hydrationErrors:null},h=vd(l),h.return=r,r.child=h,Jn=r,nn=null)):l=null,l===null)throw We(r);return Ef(l)?r.lanes=32:r.lanes=536870912,null}var L=g.children;return g=g.fallback,E?(bl(),E=r.mode,L=is({mode:"hidden",children:L},E),g=Ol(g,E,h,null),L.return=r,g.return=r,L.sibling=g,r.child=L,g=r.child,g.memoizedState=Jc(h),g.childLanes=Bs(l,z,h),r.memoizedState=Wd,Ri(null,g)):(Sl(r),Jh(r,L))}var ct=l.memoizedState;if(ct!==null&&(L=ct.dehydrated,L!==null)){if(T)r.flags&256?(Sl(r),r.flags&=-257,r=La(l,r,h)):r.memoizedState!==null?(bl(),r.child=l.child,r.flags|=128,r=null):(bl(),L=g.fallback,E=r.mode,g=is({mode:"visible",children:g.children},E),L=Ol(L,E,h,null),L.flags|=2,g.return=r,L.return=r,g.sibling=L,r.child=g,yo(r,l.child,null,h),g=r.child,g.memoizedState=Jc(h),g.childLanes=Bs(l,z,h),r.memoizedState=Wd,r=Ri(null,g));else if(Sl(r),Ef(L))z=uo(L).digest,g=Error(u(419)),g.stack="",g.digest=z,$e({value:g,source:null,stack:null}),r=La(l,r,h);else if(Pn||$a(l,r,h,!1),z=(h&l.childLanes)!==0,Pn||z){if(z=qe,z!==null&&(g=et(z,h),g!==0&&g!==ct.retryLane))throw ct.retryLane=g,nr(l,g),Pa(z,l,g),Id;bf(L)||Su(),r=La(l,r,h)}else bf(L)?(r.flags|=192,r.child=l.child,r=null):(l=ct.treeContext,ya&&(nn=hy(L),Jn=r,le=!0,Gl=null,ji=!1,l!==null&&jt(r,l)),r=Jh(r,g.children),r.flags|=4096);return r}return E?(bl(),L=g.fallback,E=r.mode,ct=l.child,T=ct.sibling,g=Ls(ct,{mode:"hidden",children:g.children}),g.subtreeFlags=ct.subtreeFlags&65011712,T!==null?L=Ls(T,L):(L=Ol(L,E,h,null),L.flags|=2),L.return=r,g.return=r,g.sibling=L,r.child=g,Ri(null,g),g=r.child,L=l.child.memoizedState,L===null?L=Jc(h):(E=L.cachePool,E!==null?(ct=Ui?fn._currentValue:fn._currentValue2,E=E.parent!==ct?{parent:ct,pool:ct}:E):E=eu(),L={baseLanes:L.baseLanes|h,cachePool:E}),g.memoizedState=L,g.childLanes=Bs(l,z,h),r.memoizedState=Wd,Ri(l.child,g)):(Sl(r),h=l.child,l=h.sibling,h=Ls(h,{mode:"visible",children:g.children}),h.return=r,h.sibling=null,l!==null&&(z=r.deletions,z===null?(r.deletions=[l],r.flags|=16):z.push(l)),r.child=h,r.memoizedState=null,h)}function Jh(l,r){return r=is({mode:"visible",children:r},l.mode),r.return=l,l.child=r}function is(l,r){return l=i(22,l,null,r),l.lanes=0,l}function La(l,r,h){return yo(r,l.child,null,h),l=Jh(r,r.pendingProps.children),l.flags|=2,r.memoizedState=null,l}function Fc(l,r,h){l.lanes|=r;var g=l.alternate;g!==null&&(g.lanes|=r),ha(l.return,r,h)}function Ft(l,r,h,g,E,T){var z=l.memoizedState;z===null?l.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:E,treeForkCount:T}:(z.isBackwards=r,z.rendering=null,z.renderingStartTime=0,z.last=g,z.tail=h,z.tailMode=E,z.treeForkCount=T)}function Et(l,r,h){var g=r.pendingProps,E=g.revealOrder,T=g.tail;g=g.children;var z=Hn.current,L=(z&2)!==0;if(L?(z=z&1|2,r.flags|=128):z&=1,A(Hn,z),na(l,r,g,h),g=le?lt:0,!L&&l!==null&&(l.flags&128)!==0)t:for(l=r.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&Fc(l,h,r);else if(l.tag===19)Fc(l,h,r);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===r)break t;for(;l.sibling===null;){if(l.return===null||l.return===r)break t;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(E){case"forwards":for(h=r.child,E=null;h!==null;)l=h.alternate,l!==null&&El(l)===null&&(E=h),h=h.sibling;h=E,h===null?(E=r.child,r.child=null):(E=h.sibling,h.sibling=null),Ft(r,!1,E,h,T,g);break;case"backwards":case"unstable_legacy-backwards":for(h=null,E=r.child,r.child=null;E!==null;){if(l=E.alternate,l!==null&&El(l)===null){r.child=E;break}l=E.sibling,E.sibling=h,h=E,E=l}Ft(r,!0,h,null,T,g);break;case"together":Ft(r,!1,null,null,void 0,g);break;default:r.memoizedState=null}return r.child}function ai(l,r,h){if(l!==null&&(r.dependencies=l.dependencies),Er|=r.lanes,(h&r.childLanes)===0)if(l!==null){if($a(l,r,h,!1),(h&r.childLanes)===0)return null}else return null;if(l!==null&&r.child!==l.child)throw Error(u(153));if(r.child!==null){for(l=r.child,h=Ls(l,l.pendingProps),r.child=h,h.return=r;l.sibling!==null;)l=l.sibling,h=h.sibling=Ls(l,l.pendingProps),h.return=r;h.sibling=null}return r.child}function pu(l,r){return(l.lanes&r)!==0?!0:(l=l.dependencies,!!(l!==null&&As(l)))}function yn(l,r,h){switch(r.tag){case 3:pe(r,r.stateNode.containerInfo),Wa(r,fn,l.memoizedState.cache),Ce();break;case 27:case 5:Se(r);break;case 4:pe(r,r.stateNode.containerInfo);break;case 10:Wa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,iu(r),null;break;case 13:var g=r.memoizedState;if(g!==null)return g.dehydrated!==null?(Sl(r),r.flags|=128,null):(h&r.child.childLanes)!==0?Zh(l,r,h):(Sl(r),l=ai(l,r,h),l!==null?l.sibling:null);Sl(r);break;case 19:var E=(l.flags&128)!==0;if(g=(h&r.childLanes)!==0,g||($a(l,r,h,!1),g=(h&r.childLanes)!==0),E){if(g)return Et(l,r,h);r.flags|=128}if(E=r.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),A(Hn,Hn.current),g)break;return null;case 22:return r.lanes=0,xl(l,r,h,r.pendingProps);case 24:Wa(r,fn,l.memoizedState.cache)}return ai(l,r,h)}function Fh(l,r,h){if(l!==null)if(l.memoizedProps!==r.pendingProps)Pn=!0;else{if(!pu(l,h)&&(r.flags&128)===0)return Pn=!1,yn(l,r,h);Pn=(l.flags&131072)!==0}else Pn=!1,le&&(r.flags&1048576)!==0&&I(r,lt,r.index);switch(r.lanes=0,r.tag){case 16:t:{var g=r.pendingProps;if(l=ti(r.elementType),r.type=l,typeof l=="function")of(l)?(g=Us(l,g),r.tag=1,r=F0(null,r,l,g,h)):(r.tag=0,r=Z0(null,r,l,g,h));else{if(l!=null){var E=l.$$typeof;if(E===Eu){r.tag=11,r=Kc(null,r,l,g,h);break t}else if(E===ym){r.tag=14,r=Xh(null,r,l,g,h);break t}}throw r=_(l)||l,Error(u(306,r,""))}}return r;case 0:return Z0(l,r,r.type,r.pendingProps,h);case 1:return g=r.type,E=Us(g,r.pendingProps),F0(l,r,g,E,h);case 3:t:{if(pe(r,r.stateNode.containerInfo),l===null)throw Error(u(387));var T=r.pendingProps;E=r.memoizedState,g=E.element,Jr(l,r),Fr(r,T,null,h);var z=r.memoizedState;if(T=z.cache,Wa(r,fn,T),T!==E.cache&&Ds(r,[fn],h,!0),au(),T=z.element,ya&&E.isDehydrated)if(E={element:T,isDehydrated:!1,cache:z.cache},r.updateQueue.baseState=E,r.memoizedState=E,r.flags&256){r=Qh(l,r,T,h);break t}else if(T!==g){g=mt(Error(u(424)),r),$e(g),r=Qh(l,r,T,h);break t}else for(ya&&(nn=Rd(r.stateNode.containerInfo),Jn=r,le=!0,Gl=null,ji=!0),h=zy(r,null,T,h),r.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Ce(),T===g){r=ai(l,r,h);break t}na(l,r,T,h)}r=r.child}return r;case 26:if(Bi)return Zc(l,r),l===null?(h=Du(r.type,null,r.pendingProps,null))?r.memoizedState=h:le||(r.stateNode=Dy(r.type,r.pendingProps,gr.current,r)):r.memoizedState=Du(r.type,l.memoizedProps,r.pendingProps,l.memoizedState),null;case 27:if(Gn)return Se(r),l===null&&Gn&&le&&(g=r.stateNode=Bd(r.type,r.pendingProps,gr.current,ba.current,!1),Jn=r,ji=!0,nn=r3(r.type,g,nn)),na(l,r,r.pendingProps.children,h),Zc(l,r),l===null&&(r.flags|=4194304),r.child;case 5:return l===null&&le&&(h3(r.type,r.pendingProps,ba.current),(E=g=nn)&&(g=o3(g,r.type,r.pendingProps,ji),g!==null?(r.stateNode=g,Jn=r,nn=Od(g),ji=!1,E=!0):E=!1),E||We(r)),Se(r),E=r.type,T=r.pendingProps,z=l!==null?l.memoizedProps:null,g=T.children,gf(E,T)?g=null:z!==null&&gf(E,z)&&(r.flags|=32),r.memoizedState!==null&&(E=Rc(l,r,Hh,null,null,h),Ui?pr._currentValue=E:pr._currentValue2=E),Zc(l,r),na(l,r,g,h),r.child;case 6:return l===null&&le&&(zm(r.pendingProps,ba.current),(l=h=nn)&&(h=dy(h,r.pendingProps,ji),h!==null?(r.stateNode=h,Jn=r,nn=null,l=!0):l=!1),l||We(r)),null;case 13:return Zh(l,r,h);case 4:return pe(r,r.stateNode.containerInfo),g=r.pendingProps,l===null?r.child=yo(r,null,g,h):na(l,r,g,h),r.child;case 11:return Kc(l,r,r.type,r.pendingProps,h);case 7:return na(l,r,r.pendingProps,h),r.child;case 8:return na(l,r,r.pendingProps.children,h),r.child;case 12:return na(l,r,r.pendingProps.children,h),r.child;case 10:return g=r.pendingProps,Wa(r,r.type,g.value),na(l,r,g.children,h),r.child;case 9:return E=r.type._context,g=r.pendingProps.children,Mn(r),E=gn(E),g=g(E),r.flags|=1,na(l,r,g,h),r.child;case 14:return Xh(l,r,r.type,r.pendingProps,h);case 15:return Kh(l,r,r.type,r.pendingProps,h);case 19:return Et(l,r,h);case 31:return Qc(l,r,h);case 22:return xl(l,r,h,r.pendingProps);case 24:return Mn(r),g=gn(fn),l===null?(E=He(),E===null&&(E=qe,T=De(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=h),E=T),r.memoizedState={parent:g,cache:E},Mc(r),Wa(r,fn,E)):((l.lanes&h)!==0&&(Jr(l,r),Fr(r,null,null,h),au()),E=l.memoizedState,T=r.memoizedState,E.parent!==g?(E={parent:g,cache:g},r.memoizedState=E,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=E),Wa(r,fn,g)):(g=T.cache,Wa(r,fn,g),g!==E.cache&&Ds(r,[fn],h,!0))),na(l,r,r.pendingProps.children,h),r.child;case 29:throw r.pendingProps}throw Error(u(156,r.tag))}function vi(l){l.flags|=4}function kc(l){us&&(l.flags|=8)}function kh(l,r){if(l!==null&&l.child===r.child)return!1;if((r.flags&16)!==0)return!0;for(l=r.child;l!==null;){if((l.flags&8218)!==0||(l.subtreeFlags&8218)!==0)return!0;l=l.sibling}return!1}function k0(l,r,h,g){if(Ma)for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)xd(l,h.stateNode);else if(!(h.tag===4||Gn&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break;for(;h.sibling===null;){if(h.return===null||h.return===r)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(us)for(var E=r.child;E!==null;){if(E.tag===5){var T=E.stateNode;h&&g&&(T=Hl(T,E.type,E.memoizedProps)),xd(l,T)}else if(E.tag===6)T=E.stateNode,h&&g&&(T=Sf(T,E.memoizedProps)),xd(l,T);else if(E.tag!==4){if(E.tag===22&&E.memoizedState!==null)T=E.child,T!==null&&(T.return=E),k0(l,E,!0,!0);else if(E.child!==null){E.child.return=E,E=E.child;continue}}if(E===r)break;for(;E.sibling===null;){if(E.return===null||E.return===r)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function Ih(l,r,h,g){var E=!1;if(us)for(var T=r.child;T!==null;){if(T.tag===5){var z=T.stateNode;h&&g&&(z=Hl(z,T.type,T.memoizedProps)),Am(l,z)}else if(T.tag===6)z=T.stateNode,h&&g&&(z=Sf(z,T.memoizedProps)),Am(l,z);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)E=T.child,E!==null&&(E.return=T),Ih(l,T,!0,!0),E=!0;else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===r)break;for(;T.sibling===null;){if(T.return===null||T.return===r)return E;T=T.return}T.sibling.return=T.return,T=T.sibling}return E}function Wh(l,r){if(us&&kh(l,r)){l=r.stateNode;var h=l.containerInfo,g=en();Ih(g,r,!1,!1),l.pendingChildren=g,vi(r),ry(h,g)}}function Ic(l,r,h,g){if(Ma)l.memoizedProps!==g&&vi(r);else if(us){var E=l.stateNode,T=l.memoizedProps;if((l=kh(l,r))||T!==g){var z=ba.current;T=ly(E,h,T,g,!l,null),T===E?r.stateNode=E:(kc(r),qg(T,h,g,z)&&vi(r),r.stateNode=T,l&&k0(T,r,!1,!1))}else r.stateNode=E}}function ga(l,r,h,g,E){if((l.mode&32)!==0&&(h===null?Zg(r,g):s3(r,h,g))){if(l.flags|=16777216,(E&335544128)===E||Tu(r,g))if(va(l.stateNode,r,g))l.flags|=8192;else if(Bg())l.flags|=8192;else throw Li=Qd,Xd}else l.flags&=-16777217}function Ae(l,r){if(d3(r)){if(l.flags|=16777216,!Ud(r))if(Bg())l.flags|=8192;else throw Li=Qd,Xd}else l.flags&=-16777217}function to(l,r){r!==null&&(l.flags|=4),l.flags&16384&&(r=l.tag!==22?V():536870912,l.lanes|=r,ju|=r)}function Dl(l,r){if(!le)switch(l.tailMode){case"hidden":r=l.tail;for(var h=null;r!==null;)r.alternate!==null&&(h=r),r=r.sibling;h===null?l.tail=null:h.sibling=null;break;case"collapsed":h=l.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?r||l.tail===null?l.tail=null:l.tail.sibling=null:g.sibling=null}}function _e(l){var r=l.alternate!==null&&l.alternate.child===l.child,h=0,g=0;if(r)for(var E=l.child;E!==null;)h|=E.lanes|E.childLanes,g|=E.subtreeFlags&65011712,g|=E.flags&65011712,E.return=l,E=E.sibling;else for(E=l.child;E!==null;)h|=E.lanes|E.childLanes,g|=E.subtreeFlags,g|=E.flags,E.return=l,E=E.sibling;return l.subtreeFlags|=g,l.childLanes=h,r}function eo(l,r,h){var g=r.pendingProps;switch(bt(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _e(r),null;case 1:return _e(r),null;case 3:return h=r.stateNode,g=null,l!==null&&(g=l.memoizedState.cache),r.memoizedState.cache!==g&&(r.flags|=2048),tn(fn),An(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(l===null||l.child===null)&&(Bt(r)?vi(r):l===null||l.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,$n())),Wh(l,r),_e(r),null;case 26:if(Bi){var E=r.type,T=r.memoizedState;return l===null?(vi(r),T!==null?(_e(r),Ae(r,T)):(_e(r),ga(r,E,null,g,h))):T?T!==l.memoizedState?(vi(r),_e(r),Ae(r,T)):(_e(r),r.flags&=-16777217):(T=l.memoizedProps,Ma?T!==g&&vi(r):Ic(l,r,E,g),_e(r),ga(r,E,T,g,h)),null}case 27:if(Gn){if(Qn(r),h=gr.current,E=r.type,l!==null&&r.stateNode!=null)Ma?l.memoizedProps!==g&&vi(r):Ic(l,r,E,g);else{if(!g){if(r.stateNode===null)throw Error(u(166));return _e(r),null}l=ba.current,Bt(r)?ze(r,l):(l=Bd(E,g,h,l,!0),r.stateNode=l,vi(r))}return _e(r),null}case 5:if(Qn(r),E=r.type,l!==null&&r.stateNode!=null)Ic(l,r,E,g);else{if(!g){if(r.stateNode===null)throw Error(u(166));return _e(r),null}if(T=ba.current,Bt(r))ze(r,T),by(r.stateNode,E,g,T)&&(r.flags|=64);else{var z=Ys(E,g,gr.current,T,r);kc(r),k0(z,r,!1,!1),r.stateNode=z,qg(z,E,g,T)&&vi(r)}}return _e(r),ga(r,r.type,l===null?null:l.memoizedProps,r.pendingProps,h),null;case 6:if(l&&r.stateNode!=null)h=l.memoizedProps,Ma?h!==g&&vi(r):us&&(h!==g?(l=gr.current,h=ba.current,kc(r),r.stateNode=Dd(g,l,h,r)):r.stateNode=l.stateNode);else{if(typeof g!="string"&&r.stateNode===null)throw Error(u(166));if(l=gr.current,h=ba.current,Bt(r)){if(!ya)throw Error(u(176));if(l=r.stateNode,h=r.memoizedProps,g=null,E=Jn,E!==null)switch(E.tag){case 27:case 5:g=E.memoizedProps}zd(l,h,r,g)||We(r,!0)}else kc(r),r.stateNode=Dd(g,l,h,r)}return _e(r),null;case 31:if(h=r.memoizedState,l===null||l.memoizedState!==null){if(g=Bt(r),h!==null){if(l===null){if(!g)throw Error(u(318));if(!ya)throw Error(u(556));if(l=r.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(557));my(l,r)}else Ce(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;_e(r),l=!1}else h=$n(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=h),l=!0;if(!l)return r.flags&256?(ei(r),r):(ei(r),null);if((r.flags&128)!==0)throw Error(u(558))}return _e(r),null;case 13:if(g=r.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(E=Bt(r),g!==null&&g.dehydrated!==null){if(l===null){if(!E)throw Error(u(318));if(!ya)throw Error(u(344));if(E=r.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(u(317));Om(E,r)}else Ce(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;_e(r),E=!1}else E=$n(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=E),E=!0;if(!E)return r.flags&256?(ei(r),r):(ei(r),null)}return ei(r),(r.flags&128)!==0?(r.lanes=h,r):(h=g!==null,l=l!==null&&l.memoizedState!==null,h&&(g=r.child,E=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(E=g.alternate.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==E&&(g.flags|=2048)),h!==l&&h&&(r.child.flags|=8192),to(r,r.updateQueue),_e(r),null);case 4:return An(),Wh(l,r),l===null&&i3(r.stateNode.containerInfo),_e(r),null;case 10:return tn(r.type),_e(r),null;case 19:if(D(Hn),g=r.memoizedState,g===null)return _e(r),null;if(E=(r.flags&128)!==0,T=g.rendering,T===null)if(E)Dl(g,!1);else{if(vn!==0||l!==null&&(l.flags&128)!==0)for(l=r.child;l!==null;){if(T=El(l),T!==null){for(r.flags|=128,Dl(g,!1),l=T.updateQueue,r.updateQueue=l,to(r,l),r.subtreeFlags=0,l=h,h=r.child;h!==null;)hm(h,l),h=h.sibling;return A(Hn,Hn.current&1|2),le&&pt(r,g.treeForkCount),r.child}l=l.sibling}g.tail!==null&&Me()>Lu&&(r.flags|=128,E=!0,Dl(g,!1),r.lanes=4194304)}else{if(!E)if(l=El(T),l!==null){if(r.flags|=128,E=!0,l=l.updateQueue,r.updateQueue=l,to(r,l),Dl(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!le)return _e(r),null}else 2*Me()-g.renderingStartTime>Lu&&h!==536870912&&(r.flags|=128,E=!0,Dl(g,!1),r.lanes=4194304);g.isBackwards?(T.sibling=r.child,r.child=T):(l=g.last,l!==null?l.sibling=T:r.child=T,g.last=T)}return g.tail!==null?(l=g.tail,g.rendering=l,g.tail=l.sibling,g.renderingStartTime=Me(),l.sibling=null,h=Hn.current,A(Hn,E?h&1|2:h&1),le&&pt(r,g.treeForkCount),l):(_e(r),null);case 22:case 23:return ei(r),vl(),g=r.memoizedState!==null,l!==null?l.memoizedState!==null!==g&&(r.flags|=8192):g&&(r.flags|=8192),g?(h&536870912)!==0&&(r.flags&128)===0&&(_e(r),r.subtreeFlags&6&&(r.flags|=8192)):_e(r),h=r.updateQueue,h!==null&&to(r,h.retryQueue),h=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),g=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(g=r.memoizedState.cachePool.pool),g!==h&&(r.flags|=2048),l!==null&&D(yr),null;case 24:return h=null,l!==null&&(h=l.memoizedState.cache),r.memoizedState.cache!==h&&(r.flags|=2048),tn(fn),_e(r),null;case 25:return null;case 30:return null}throw Error(u(156,r.tag))}function ss(l,r){switch(bt(r),r.tag){case 1:return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 3:return tn(fn),An(),l=r.flags,(l&65536)!==0&&(l&128)===0?(r.flags=l&-65537|128,r):null;case 26:case 27:case 5:return Qn(r),null;case 31:if(r.memoizedState!==null){if(ei(r),r.alternate===null)throw Error(u(340));Ce()}return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 13:if(ei(r),l=r.memoizedState,l!==null&&l.dehydrated!==null){if(r.alternate===null)throw Error(u(340));Ce()}return l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 19:return D(Hn),null;case 4:return An(),null;case 10:return tn(r.type),null;case 22:case 23:return ei(r),vl(),l!==null&&D(yr),l=r.flags,l&65536?(r.flags=l&-65537|128,r):null;case 24:return tn(fn),null;case 25:return null;default:return null}}function $h(l,r){switch(bt(r),r.tag){case 3:tn(fn),An();break;case 26:case 27:case 5:Qn(r);break;case 4:An();break;case 31:r.memoizedState!==null&&ei(r);break;case 13:ei(r);break;case 19:D(Hn);break;case 10:tn(r.type);break;case 22:case 23:ei(r),vl(),l!==null&&D(yr);break;case 24:tn(fn)}}function Vs(l,r){try{var h=r.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var E=g.next;h=E;do{if((h.tag&l)===l){g=void 0;var T=h.create,z=h.inst;g=T(),z.destroy=g}h=h.next}while(h!==E)}}catch(L){be(r,r.return,L)}}function Gs(l,r,h){try{var g=r.updateQueue,E=g!==null?g.lastEffect:null;if(E!==null){var T=E.next;g=T;do{if((g.tag&l)===l){var z=g.inst,L=z.destroy;if(L!==void 0){z.destroy=void 0,E=r;var ct=h,St=L;try{St()}catch(At){be(E,ct,At)}}}g=g.next}while(g!==T)}}catch(At){be(r,r.return,At)}}function mu(l){var r=l.updateQueue;if(r!==null){var h=l.stateNode;try{_g(r,h)}catch(g){be(l,l.return,g)}}}function td(l,r,h){h.props=Us(l.type,l.memoizedProps),h.state=l.memoizedState;try{h.componentWillUnmount()}catch(g){be(l,r,g)}}function sr(l,r){try{var h=l.ref;if(h!==null){switch(l.tag){case 26:case 27:case 5:var g=pf(l.stateNode);break;case 30:g=l.stateNode;break;default:g=l.stateNode}typeof h=="function"?l.refCleanup=h(g):h.current=g}}catch(E){be(l,r,E)}}function ls(l,r){var h=l.ref,g=l.refCleanup;if(h!==null)if(typeof g=="function")try{g()}catch(E){be(l,r,E)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(E){be(l,r,E)}else h.current=null}function I0(l){var r=l.type,h=l.memoizedProps,g=l.stateNode;try{ey(g,r,h,l)}catch(E){be(l,l.return,E)}}function ed(l,r,h){try{Ad(l.stateNode,l.type,h,r,l)}catch(g){be(l,l.return,g)}}function W0(l){return l.tag===5||l.tag===3||(Bi?l.tag===26:!1)||(Gn?l.tag===27&&fo(l.type):!1)||l.tag===4}function nd(l){t:for(;;){for(;l.sibling===null;){if(l.return===null||W0(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(Gn&&l.tag===27&&fo(l.type)||l.flags&2||l.child===null||l.tag===4)continue t;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Wc(l,r,h){var g=l.tag;if(g===5||g===6)l=l.stateNode,r?ay(h,l,r):ty(h,l);else if(g!==4&&(Gn&&g===27&&fo(l.type)&&(h=l.stateNode,r=null),l=l.child,l!==null))for(Wc(l,r,h),l=l.sibling;l!==null;)Wc(l,r,h),l=l.sibling}function gu(l,r,h){var g=l.tag;if(g===5||g===6)l=l.stateNode,r?ny(h,l,r):$g(h,l);else if(g!==4&&(Gn&&g===27&&fo(l.type)&&(h=l.stateNode),l=l.child,l!==null))for(gu(l,r,h),l=l.sibling;l!==null;)gu(l,r,h),l=l.sibling}function ad(l,r,h){l=l.containerInfo;try{oy(l,h)}catch(g){be(r,r.return,g)}}function $0(l){var r=l.stateNode,h=l.memoizedProps;try{Vd(l.type,h,r,l)}catch(g){be(l,l.return,g)}}function Ng(l,r){for(a3(l.containerInfo),aa=r;aa!==null;)if(l=aa,r=l.child,(l.subtreeFlags&1028)!==0&&r!==null)r.return=l,aa=r;else for(;aa!==null;){l=aa;var h=l.alternate;switch(r=l.flags,l.tag){case 0:if((r&4)!==0&&(r=l.updateQueue,r=r!==null?r.events:null,r!==null))for(var g=0;g<r.length;g++){var E=r[g];E.ref.impl=E.nextImpl}break;case 11:case 15:break;case 1:if((r&1024)!==0&&h!==null){r=void 0,g=l,E=h.memoizedProps,h=h.memoizedState;var T=g.stateNode;try{var z=Us(g.type,E);r=T.getSnapshotBeforeUpdate(z,h),T.__reactInternalSnapshotBeforeUpdate=r}catch(L){be(g,g.return,L)}}break;case 3:(r&1024)!==0&&Ma&&bi(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(u(163))}if(r=l.sibling,r!==null){r.return=l.return,aa=r;break}aa=l.return}}function tm(l,r,h){var g=h.flags;switch(h.tag){case 0:case 11:case 15:Hi(l,h),g&4&&Vs(5,h);break;case 1:if(Hi(l,h),g&4)if(l=h.stateNode,r===null)try{l.componentDidMount()}catch(z){be(h,h.return,z)}else{var E=Us(h.type,r.memoizedProps);r=r.memoizedState;try{l.componentDidUpdate(E,r,l.__reactInternalSnapshotBeforeUpdate)}catch(z){be(h,h.return,z)}}g&64&&mu(h),g&512&&sr(h,h.return);break;case 3:if(Hi(l,h),g&64&&(g=h.updateQueue,g!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=pf(h.child.stateNode);break;case 1:l=h.child.stateNode}try{_g(g,l)}catch(z){be(h,h.return,z)}}break;case 27:Gn&&r===null&&g&4&&$0(h);case 26:case 5:if(Hi(l,h),r===null){if(g&4)I0(h);else if(g&64){l=h.type,r=h.memoizedProps,E=h.stateNode;try{vy(E,l,r,h)}catch(z){be(h,h.return,z)}}}g&512&&sr(h,h.return);break;case 12:Hi(l,h);break;case 31:Hi(l,h),g&4&&em(l,h);break;case 13:Hi(l,h),g&4&&sd(l,h),g&64&&(g=h.memoizedState,g!==null&&(g=g.dehydrated,g!==null&&(h=gd.bind(null,h),Cu(g,h))));break;case 22:if(g=h.memoizedState!==null||ks,!g){r=r!==null&&r.memoizedState!==null||wn,E=ks;var T=wn;ks=g,(wn=r)&&!T?rs(l,h,(h.subtreeFlags&8772)!==0):Hi(l,h),ks=E,wn=T}break;case 30:break;default:Hi(l,h)}}function Og(l){var r=l.alternate;r!==null&&(l.alternate=null,Og(r)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(r=l.stateNode,r!==null&&Qg(r)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function zi(l,r,h){for(h=h.child;h!==null;)id(l,r,h),h=h.sibling}function id(l,r,h){if(Rn&&typeof Rn.onCommitFiberUnmount=="function")try{Rn.onCommitFiberUnmount(po,h)}catch{}switch(h.tag){case 26:if(Bi){wn||ls(h,r),zi(l,r,h),h.memoizedState?xy(h.memoizedState):h.stateNode&&wm(h.stateNode);break}case 27:if(Gn){wn||ls(h,r);var g=Yn,E=ci;fo(h.type)&&(Yn=h.stateNode,ci=!1),zi(l,r,h),mr(h.stateNode),Yn=g,ci=E;break}case 5:wn||ls(h,r);case 6:if(Ma){if(g=Yn,E=ci,Yn=null,zi(l,r,h),Yn=g,ci=E,Yn!==null)if(ci)try{Dm(Yn,h.stateNode)}catch(T){be(h,r,T)}else try{xm(Yn,h.stateNode)}catch(T){be(h,r,T)}}else zi(l,r,h);break;case 18:Ma&&Yn!==null&&(ci?Rm(Yn,h.stateNode):Ee(Yn,h.stateNode));break;case 4:Ma?(g=Yn,E=ci,Yn=h.stateNode.containerInfo,ci=!0,zi(l,r,h),Yn=g,ci=E):(us&&ad(h.stateNode,h,en()),zi(l,r,h));break;case 0:case 11:case 14:case 15:Gs(2,h,r),wn||Gs(4,h,r),zi(l,r,h);break;case 1:wn||(ls(h,r),g=h.stateNode,typeof g.componentWillUnmount=="function"&&td(h,r,g)),zi(l,r,h);break;case 21:zi(l,r,h);break;case 22:wn=(g=wn)||h.memoizedState!==null,zi(l,r,h),wn=g;break;default:zi(l,r,h)}}function em(l,r){if(ya&&r.memoizedState===null&&(l=r.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{Sy(l)}catch(h){be(r,r.return,h)}}}function sd(l,r){if(ya&&r.memoizedState===null&&(l=r.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{xu(l)}catch(h){be(r,r.return,h)}}function Rg(l){switch(l.tag){case 31:case 13:case 19:var r=l.stateNode;return r===null&&(r=l.stateNode=new $d),r;case 22:return l=l.stateNode,r=l._retryCache,r===null&&(r=l._retryCache=new $d),r;default:throw Error(u(435,l.tag))}}function $c(l,r){var h=Rg(l);r.forEach(function(g){if(!h.has(g)){h.add(g);var E=Lg.bind(null,l,g);g.then(E,E)}})}function Nn(l,r){var h=r.deletions;if(h!==null)for(var g=0;g<h.length;g++){var E=h[g],T=l,z=r;if(Ma){var L=z;t:for(;L!==null;){switch(L.tag){case 27:if(Gn){if(fo(L.type)){Yn=L.stateNode,ci=!1;break t}break}case 5:Yn=L.stateNode,ci=!1;break t;case 3:case 4:Yn=L.stateNode.containerInfo,ci=!0;break t}L=L.return}if(Yn===null)throw Error(u(160));id(T,z,E),Yn=null,ci=!1}else id(T,z,E);T=E.alternate,T!==null&&(T.return=null),E.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)tf(r,l),r=r.sibling}function tf(l,r){var h=l.alternate,g=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:Nn(r,l),Da(l),g&4&&(Gs(3,l,l.return),Vs(3,l),Gs(5,l,l.return));break;case 1:Nn(r,l),Da(l),g&512&&(wn||h===null||ls(h,h.return)),g&64&&ks&&(l=l.updateQueue,l!==null&&(g=l.callbacks,g!==null&&(h=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=h===null?g:h.concat(g))));break;case 26:if(Bi){var E=ps;if(Nn(r,l),Da(l),g&512&&(wn||h===null||ls(h,h.return)),g&4){g=h!==null?h.memoizedState:null;var T=l.memoizedState;h===null?T===null?l.stateNode===null?l.stateNode=co(E,l.type,l.memoizedProps,l):wd(E,l.type,l.stateNode):l.stateNode=_y(E,T,l.memoizedProps):g!==T?(g===null?h.stateNode!==null&&wm(h.stateNode):xy(g),T===null?wd(E,l.type,l.stateNode):_y(E,T,l.memoizedProps)):T===null&&l.stateNode!==null&&ed(l,l.memoizedProps,h.memoizedProps)}break}case 27:if(Gn){Nn(r,l),Da(l),g&512&&(wn||h===null||ls(h,h.return)),h!==null&&g&4&&ed(l,l.memoizedProps,h.memoizedProps);break}case 5:if(Nn(r,l),Da(l),g&512&&(wn||h===null||ls(h,h.return)),Ma){if(l.flags&32){E=l.stateNode;try{Md(E)}catch(xt){be(l,l.return,xt)}}g&4&&l.stateNode!=null&&(E=l.memoizedProps,ed(l,E,h!==null?h.memoizedProps:E)),g&1024&&(Of=!0)}else us&&l.alternate!==null&&(l.alternate.stateNode=l.stateNode);break;case 6:if(Nn(r,l),Da(l),g&4&&Ma){if(l.stateNode===null)throw Error(u(162));g=l.memoizedProps,h=h!==null?h.memoizedProps:g,E=l.stateNode;try{vf(E,h,g)}catch(xt){be(l,l.return,xt)}}break;case 3:if(Bi?(Ay(),E=ps,ps=Hd(r.containerInfo),Nn(r,l),ps=E):Nn(r,l),Da(l),g&4){if(Ma&&ya&&h!==null&&h.memoizedState.isDehydrated)try{c3(r.containerInfo)}catch(xt){be(l,l.return,xt)}if(us){g=r.containerInfo,h=r.pendingChildren;try{oy(g,h)}catch(xt){be(l,l.return,xt)}}}Of&&(Of=!1,zg(l));break;case 4:Bi?(h=ps,ps=Hd(l.stateNode.containerInfo),Nn(r,l),Da(l),ps=h):(Nn(r,l),Da(l)),g&4&&us&&ad(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:Nn(r,l),Da(l);break;case 31:Nn(r,l),Da(l),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,$c(l,g)));break;case 13:Nn(r,l),Da(l),l.child.flags&8192&&l.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Hf=Me()),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,$c(l,g)));break;case 22:E=l.memoizedState!==null;var z=h!==null&&h.memoizedState!==null,L=ks,ct=wn;if(ks=L||E,wn=ct||z,Nn(r,l),wn=ct,ks=L,Da(l),g&8192&&(r=l.stateNode,r._visibility=E?r._visibility&-2:r._visibility|1,E&&(h===null||z||ks||wn||wi(l)),Ma)){t:if(h=null,Ma)for(r=l;;){if(r.tag===5||Bi&&r.tag===26){if(h===null){z=h=r;try{T=z.stateNode,E?iy(T):l3(z.stateNode,z.memoizedProps)}catch(xt){be(z,z.return,xt)}}}else if(r.tag===6){if(h===null){z=r;try{var St=z.stateNode;E?Nd(St):sy(St,z.memoizedProps)}catch(xt){be(z,z.return,xt)}}}else if(r.tag===18){if(h===null){z=r;try{var At=z.stateNode;E?f3(At):Ty(z.stateNode)}catch(xt){be(z,z.return,xt)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===l)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break t;for(;r.sibling===null;){if(r.return===null||r.return===l)break t;h===r&&(h=null),r=r.return}h===r&&(h=null),r.sibling.return=r.return,r=r.sibling}}g&4&&(g=l.updateQueue,g!==null&&(h=g.retryQueue,h!==null&&(g.retryQueue=null,$c(l,h))));break;case 19:Nn(r,l),Da(l),g&4&&(g=l.updateQueue,g!==null&&(l.updateQueue=null,$c(l,g)));break;case 30:break;case 21:break;default:Nn(r,l),Da(l)}}function Da(l){var r=l.flags;if(r&2){try{for(var h,g=l.return;g!==null;){if(W0(g)){h=g;break}g=g.return}if(Ma){if(h==null)throw Error(u(160));switch(h.tag){case 27:if(Gn){var E=h.stateNode,T=nd(l);gu(l,T,E);break}case 5:var z=h.stateNode;h.flags&32&&(Md(z),h.flags&=-33);var L=nd(l);gu(l,L,z);break;case 3:case 4:var ct=h.stateNode.containerInfo,St=nd(l);Wc(l,St,ct);break;default:throw Error(u(161))}}}catch(At){be(l,l.return,At)}l.flags&=-3}r&4096&&(l.flags&=-4097)}function zg(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var r=l;zg(r),r.tag===5&&r.flags&1024&&lo(r.stateNode),l=l.sibling}}function Hi(l,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)tm(l,r.alternate,r),r=r.sibling}function wi(l){for(l=l.child;l!==null;){var r=l;switch(r.tag){case 0:case 11:case 14:case 15:Gs(4,r,r.return),wi(r);break;case 1:ls(r,r.return);var h=r.stateNode;typeof h.componentWillUnmount=="function"&&td(r,r.return,h),wi(r);break;case 27:Gn&&mr(r.stateNode);case 26:case 5:ls(r,r.return),wi(r);break;case 22:r.memoizedState===null&&wi(r);break;case 30:wi(r);break;default:wi(r)}l=l.sibling}}function rs(l,r,h){for(h=h&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var g=r.alternate,E=l,T=r,z=T.flags;switch(T.tag){case 0:case 11:case 15:rs(E,T,h),Vs(4,T);break;case 1:if(rs(E,T,h),g=T,E=g.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(St){be(g,g.return,St)}if(g=T,E=g.updateQueue,E!==null){var L=g.stateNode;try{var ct=E.shared.hiddenCallbacks;if(ct!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ct.length;E++)w0(ct[E],L)}catch(St){be(g,g.return,St)}}h&&z&64&&mu(T),sr(T,T.return);break;case 27:Gn&&$0(T);case 26:case 5:rs(E,T,h),h&&g===null&&z&4&&I0(T),sr(T,T.return);break;case 12:rs(E,T,h);break;case 31:rs(E,T,h),h&&z&4&&em(E,T);break;case 13:rs(E,T,h),h&&z&4&&sd(E,T);break;case 22:T.memoizedState===null&&rs(E,T,h),sr(T,T.return);break;case 30:break;default:rs(E,T,h)}r=r.sibling}}function Al(l,r){var h=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==h&&(l!=null&&l.refCount++,h!=null&&da(h))}function Aa(l,r){l=null,r.alternate!==null&&(l=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==l&&(r.refCount++,l!=null&&da(l))}function ii(l,r,h,g){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Hg(l,r,h,g),r=r.sibling}function Hg(l,r,h,g){var E=r.flags;switch(r.tag){case 0:case 11:case 15:ii(l,r,h,g),E&2048&&Vs(9,r);break;case 1:ii(l,r,h,g);break;case 3:ii(l,r,h,g),E&2048&&(l=null,r.alternate!==null&&(l=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==l&&(r.refCount++,l!=null&&da(l)));break;case 12:if(E&2048){ii(l,r,h,g),l=r.stateNode;try{var T=r.memoizedProps,z=T.id,L=T.onPostCommit;typeof L=="function"&&L(z,r.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(ct){be(r,r.return,ct)}}else ii(l,r,h,g);break;case 31:ii(l,r,h,g);break;case 13:ii(l,r,h,g);break;case 23:break;case 22:T=r.stateNode,z=r.alternate,r.memoizedState!==null?T._visibility&2?ii(l,r,h,g):rr(l,r):T._visibility&2?ii(l,r,h,g):(T._visibility|=2,lr(l,r,h,g,(r.subtreeFlags&10256)!==0||!1)),E&2048&&Al(z,r);break;case 24:ii(l,r,h,g),E&2048&&Aa(r.alternate,r);break;default:ii(l,r,h,g)}}function lr(l,r,h,g,E){for(E=E&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var T=l,z=r,L=h,ct=g,St=z.flags;switch(z.tag){case 0:case 11:case 15:lr(T,z,L,ct,E),Vs(8,z);break;case 23:break;case 22:var At=z.stateNode;z.memoizedState!==null?At._visibility&2?lr(T,z,L,ct,E):rr(T,z):(At._visibility|=2,lr(T,z,L,ct,E)),E&&St&2048&&Al(z.alternate,z);break;case 24:lr(T,z,L,ct,E),E&&St&2048&&Aa(z.alternate,z);break;default:lr(T,z,L,ct,E)}r=r.sibling}}function rr(l,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var h=l,g=r,E=g.flags;switch(g.tag){case 22:rr(h,g),E&2048&&Al(g.alternate,g);break;case 24:rr(h,g),E&2048&&Aa(g.alternate,g);break;default:rr(h,g)}r=r.sibling}}function Ml(l,r,h){if(l.subtreeFlags&Sr)for(l=l.child;l!==null;)nm(l,r,h),l=l.sibling}function nm(l,r,h){switch(l.tag){case 26:if(Ml(l,r,h),l.flags&Sr)if(l.memoizedState!==null)wl(h,ps,l.memoizedState,l.memoizedProps);else{var g=l.stateNode,E=l.type;l=l.memoizedProps,((r&335544128)===r||Tu(E,l))&&Na(h,g,E,l)}break;case 5:Ml(l,r,h),l.flags&Sr&&(g=l.stateNode,E=l.type,l=l.memoizedProps,((r&335544128)===r||Tu(E,l))&&Na(h,g,E,l));break;case 3:case 4:Bi?(g=ps,ps=Hd(l.stateNode.containerInfo),Ml(l,r,h),ps=g):Ml(l,r,h);break;case 22:l.memoizedState===null&&(g=l.alternate,g!==null&&g.memoizedState!==null?(g=Sr,Sr=16777216,Ml(l,r,h),Sr=g):Ml(l,r,h));break;default:Ml(l,r,h)}}function ld(l){var r=l.alternate;if(r!==null&&(l=r.child,l!==null)){r.child=null;do r=l.sibling,l.sibling=null,l=r;while(l!==null)}}function or(l){var r=l.deletions;if((l.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];aa=g,od(g,l)}ld(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)rd(l),l=l.sibling}function rd(l){switch(l.tag){case 0:case 11:case 15:or(l),l.flags&2048&&Gs(9,l,l.return);break;case 3:or(l);break;case 12:or(l);break;case 22:var r=l.stateNode;l.memoizedState!==null&&r._visibility&2&&(l.return===null||l.return.tag!==13)?(r._visibility&=-3,no(l)):or(l);break;default:or(l)}}function no(l){var r=l.deletions;if((l.flags&16)!==0){if(r!==null)for(var h=0;h<r.length;h++){var g=r[h];aa=g,od(g,l)}ld(l)}for(l=l.child;l!==null;){switch(r=l,r.tag){case 0:case 11:case 15:Gs(8,r,r.return),no(r);break;case 22:h=r.stateNode,h._visibility&2&&(h._visibility&=-3,no(r));break;default:no(r)}l=l.sibling}}function od(l,r){for(;aa!==null;){var h=aa;switch(h.tag){case 0:case 11:case 15:Gs(8,h,r);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var g=h.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:da(h.memoizedState.cache)}if(g=h.child,g!==null)g.return=h,aa=g;else t:for(h=l;aa!==null;){g=aa;var E=g.sibling,T=g.return;if(Og(g),g===h){aa=null;break t}if(E!==null){E.return=T,aa=E;break t}aa=T}}}function yu(l){var r=Kg(l);if(r!=null){if(typeof r.memoizedProps["data-testname"]!="string")throw Error(u(364));return r}if(l=_m(l),l===null)throw Error(u(362));return l.stateNode.current}function ef(l,r){var h=l.tag;switch(r.$$typeof){case tp:if(l.type===r.value)return!0;break;case ep:t:{for(r=r.value,l=[l,0],h=0;h<l.length;){var g=l[h++],E=g.tag,T=l[h++],z=r[T];if(E!==5&&E!==26&&E!==27||!Ks(g)){for(;z!=null&&ef(g,z);)T++,z=r[T];if(T===r.length){r=!0;break t}else for(g=g.child;g!==null;)l.push(g,T),g=g.sibling}}r=!1}return r;case np:if((h===5||h===26||h===27)&&Wg(l.stateNode,r.value))return!0;break;case ip:if((h===5||h===6||h===26||h===27)&&(l=Ig(l),l!==null&&0<=l.indexOf(r.value)))return!0;break;case ap:if((h===5||h===26||h===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===r.value.toLowerCase()))return!0;break;default:throw Error(u(365))}return!1}function ud(l){switch(l.$$typeof){case tp:return"<"+(_(l.value)||"Unknown")+">";case ep:return":has("+(ud(l)||"")+")";case np:return'[role="'+l.value+'"]';case ip:return'"'+l.value+'"';case ap:return'[data-testname="'+l.value+'"]';default:throw Error(u(365))}}function am(l,r){var h=[];l=[l,0];for(var g=0;g<l.length;){var E=l[g++],T=E.tag,z=l[g++],L=r[z];if(T!==5&&T!==26&&T!==27||!Ks(E)){for(;L!=null&&ef(E,L);)z++,L=r[z];if(z===r.length)h.push(E);else for(E=E.child;E!==null;)l.push(E,z),E=E.sibling}}return h}function nf(l,r){if(!ro)throw Error(u(363));l=yu(l),l=am(l,r),r=[],l=Array.from(l);for(var h=0;h<l.length;){var g=l[h++],E=g.tag;if(E===5||E===26||E===27)Ks(g)||r.push(g.stateNode);else for(g=g.child;g!==null;)l.push(g),g=g.sibling}return r}function si(){return(re&2)!==0&&ue!==0?ue&-ue:Gt.T!==null?_c():cs()}function af(){if(Ci===0)if((ue&536870912)===0||le){var l=_f;_f<<=1,(_f&3932160)===0&&(_f=262144),Ci=l}else Ci=536870912;return l=Ei.current,l!==null&&(l.flags|=32),Ci}function Pa(l,r,h){(l===qe&&(Ue===2||Ue===9)||l.cancelPendingCommit!==null)&&(cr(l,0),Nl(l,ue,Ci,!1)),W(l,h),((re&2)===0||l!==qe)&&(l===qe&&((re&2)===0&&(bo|=h),vn===4&&Nl(l,ue,Ci,!1)),Ye(l))}function im(l,r,h){if((re&6)!==0)throw Error(u(327));var g=!h&&(r&127)===0&&(r&l.expiredLanes)===0||U(l,r),E=g?Gg(l,r):bu(l,r,!0),T=g;do{if(E===0){So&&!g&&Nl(l,r,0,!1);break}else{if(h=l.current.alternate,T&&!wg(h)){E=bu(l,r,!1),T=!1;continue}if(E===2){if(T=r,l.errorRecoveryDisabledLanes&T)var z=0;else z=l.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){r=z;t:{var L=l;E=zf;var ct=ya&&L.current.memoizedState.isDehydrated;if(ct&&(cr(L,z).flags|=256),z=bu(L,z,!1),z!==2){if(qm&&!ct){L.errorRecoveryDisabledLanes|=T,bo|=T,E=4;break t}T=fi,fi=E,T!==null&&(fi===null?fi=T:fi.push.apply(fi,T))}E=z}if(T=!1,E!==2)continue}}if(E===1){cr(l,0),Nl(l,r,0,!0);break}t:{switch(g=l,T=E,T){case 0:case 1:throw Error(u(345));case 4:if((r&4194048)!==r)break;case 6:Nl(g,r,Ci,!br);break t;case 2:fi=null;break;case 3:case 5:break;default:throw Error(u(329))}if((r&62914560)===r&&(E=Hf+300-Me(),10<E)){if(Nl(g,r,Ci,!br),O(g,0,!0)!==0)break t;Is=r,g.timeoutHandle=Xg(cd.bind(null,g,h,fi,lp,sp,r,Ci,bo,ju,br,T,"Throttled",-0,0),E);break t}cd(g,h,fi,lp,sp,r,Ci,bo,ju,br,T,null,-0,0)}}break}while(!0);Ye(l)}function cd(l,r,h,g,E,T,z,L,ct,St,At,xt,Ot,Yt){if(l.timeoutHandle=zl,xt=r.subtreeFlags,xt&8192||(xt&16785408)===16785408){xt=Jg(),nm(r,T,xt);var sn=(T&62914560)===T?Hf-Me():(T&4194048)===T?Km-Me():0;if(sn=Fg(xt,sn),sn!==null){Is=T,l.cancelPendingCommit=sn(om.bind(null,l,r,T,h,g,E,z,L,ct,At,xt,null,Ot,Yt)),Nl(l,T,z,!St);return}}om(l,r,T,h,g,E,z,L,ct)}function wg(l){for(var r=l;;){var h=r.tag;if((h===0||h===11||h===15)&&r.flags&16384&&(h=r.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var g=0;g<h.length;g++){var E=h[g],T=E.getSnapshot;E=E.value;try{if(!Sa(T(),E))return!1}catch{return!1}}if(h=r.child,r.subtreeFlags&16384&&h!==null)h.return=r,r=h;else{if(r===l)break;for(;r.sibling===null;){if(r.return===null||r.return===l)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Nl(l,r,h,g){r&=~Xm,r&=~bo,l.suspendedLanes|=r,l.pingedLanes&=~r,g&&(l.warmLanes|=r),g=l.expirationTimes;for(var E=r;0<E;){var T=31-li(E),z=1<<T;g[T]=-1,E&=~z}h!==0&&$(l,h,r)}function ur(){return(re&6)===0?(ta(0),!1):!0}function sf(){if(oe!==null){if(Ue===0)var l=oe.return;else l=oe,an=Ka=null,zc(l),Pi=null,Mf=0,l=oe;for(;l!==null;)$h(l.alternate,l),l=l.return;oe=null}}function cr(l,r){var h=l.timeoutHandle;h!==zl&&(l.timeoutHandle=zl,Tm(h)),h=l.cancelPendingCommit,h!==null&&(l.cancelPendingCommit=null,h()),Is=0,sf(),qe=l,oe=h=Ls(l.current,null),ue=r,Ue=0,Ti=null,br=!1,So=U(l,r),qm=!1,ju=Ci=Xm=bo=Er=vn=0,fi=zf=null,sp=!1,(r&8)!==0&&(r|=r&32);var g=l.entangledLanes;if(g!==0)for(l=l.entanglements,g&=r;0<g;){var E=31-li(g),T=1<<E;r|=l[E],g&=~T}return Ll=r,_a(),h}function Ug(l,r){kt=null,Gt.H=Nf,r===Uu||r===Kd?(r=Ac(),Ue=3):r===Xd?(r=Ac(),Ue=4):Ue=r===Id?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Ti=r,oe===null&&(vn=1,qc(l,mt(r,l.current)))}function Bg(){var l=Ei.current;return l===null?!0:(ue&4194048)===ue?qi===null:(ue&62914560)===ue||(ue&536870912)!==0?l===qi:!1}function sm(){var l=Gt.H;return Gt.H=Nf,l===null?Nf:l}function vu(){var l=Gt.A;return Gt.A=y3,l}function Su(){vn=4,br||(ue&4194048)!==ue&&Ei.current!==null||(So=!0),(Er&134217727)===0&&(bo&134217727)===0||qe===null||Nl(qe,ue,Ci,!1)}function bu(l,r,h){var g=re;re|=2;var E=sm(),T=vu();(qe!==l||ue!==r)&&(lp=null,cr(l,r)),r=!1;var z=vn;t:do try{if(Ue!==0&&oe!==null){var L=oe,ct=Ti;switch(Ue){case 8:sf(),z=6;break t;case 3:case 2:case 9:case 6:Ei.current===null&&(r=!0);var St=Ue;if(Ue=0,Ti=null,ao(l,L,ct,St),h&&So){z=0;break t}break;default:St=Ue,Ue=0,Ti=null,ao(l,L,ct,St)}}Vg(),z=vn;break}catch(At){Ug(l,At)}while(!0);return r&&l.shellSuspendCounter++,an=Ka=null,re=g,Gt.H=E,Gt.A=T,oe===null&&(qe=null,ue=0,_a()),z}function Vg(){for(;oe!==null;)fd(oe)}function Gg(l,r){var h=re;re|=2;var g=sm(),E=vu();qe!==l||ue!==r?(lp=null,Lu=Me()+500,cr(l,r)):So=U(l,r);t:do try{if(Ue!==0&&oe!==null){r=oe;var T=Ti;e:switch(Ue){case 1:Ue=0,Ti=null,ao(l,r,T,1);break;case 2:case 9:if(R0(T)){Ue=0,Ti=null,rm(r);break}r=function(){Ue!==2&&Ue!==9||qe!==l||(Ue=7),Ye(l)},T.then(r,r);break t;case 3:Ue=7;break t;case 4:Ue=5;break t;case 7:R0(T)?(Ue=0,Ti=null,rm(r)):(Ue=0,Ti=null,ao(l,r,T,7));break;case 5:var z=null;switch(oe.tag){case 26:z=oe.memoizedState;case 5:case 27:var L=oe,ct=L.type,St=L.pendingProps;if(z?Ud(z):va(L.stateNode,ct,St)){Ue=0,Ti=null;var At=L.sibling;if(At!==null)oe=At;else{var xt=L.return;xt!==null?(oe=xt,js(xt)):oe=null}break e}}Ue=0,Ti=null,ao(l,r,T,5);break;case 6:Ue=0,Ti=null,ao(l,r,T,6);break;case 8:sf(),vn=6;break t;default:throw Error(u(462))}}lm();break}catch(Ot){Ug(l,Ot)}while(!0);return an=Ka=null,Gt.H=g,Gt.A=E,re=h,oe!==null?0:(qe=null,ue=0,_a(),vn)}function lm(){for(;oe!==null&&!p3();)fd(oe)}function fd(l){var r=Fh(l.alternate,l,Ll);l.memoizedProps=l.pendingProps,r===null?js(l):oe=r}function rm(l){var r=l,h=r.alternate;switch(r.tag){case 15:case 0:r=J0(h,r,r.pendingProps,r.type,void 0,ue);break;case 11:r=J0(h,r,r.pendingProps,r.type.render,r.ref,ue);break;case 5:zc(r);default:$h(h,r),r=oe=hm(r,Ll),r=Fh(h,r,Ll)}l.memoizedProps=l.pendingProps,r===null?js(l):oe=r}function ao(l,r,h,g){an=Ka=null,zc(r),Pi=null,Mf=0;var E=r.return;try{if(xa(l,E,r,h,ue)){vn=1,qc(l,mt(h,l.current)),oe=null;return}}catch(T){if(E!==null)throw oe=E,T;vn=1,qc(l,mt(h,l.current)),oe=null;return}r.flags&32768?(le||g===1?l=!0:So||(ue&536870912)!==0?l=!1:(br=l=!0,(g===2||g===9||g===3||g===6)&&(g=Ei.current,g!==null&&g.tag===13&&(g.flags|=16384))),lf(r,l)):js(r)}function js(l){var r=l;do{if((r.flags&32768)!==0){lf(r,br);return}l=r.return;var h=eo(r.alternate,r,Ll);if(h!==null){oe=h;return}if(r=r.sibling,r!==null){oe=r;return}oe=r=l}while(r!==null);vn===0&&(vn=5)}function lf(l,r){do{var h=ss(l.alternate,l);if(h!==null){h.flags&=32767,oe=h;return}if(h=l.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!r&&(l=l.sibling,l!==null)){oe=l;return}oe=l=h}while(l!==null);vn=6,oe=null}function om(l,r,h,g,E,T,z,L,ct){l.cancelPendingCommit=null;do On();while(Be!==0);if((re&6)!==0)throw Error(u(327));if(r!==null){if(r===l.current)throw Error(u(177));if(T=r.lanes|r.childLanes,T|=Lm,st(l,h,T,z,L,ct),l===qe&&(oe=qe=null,ue=0),Cr=r,Pl=l,Is=h,rp=T,op=E,Uy=g,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,t3(Bl,function(){return um(),null})):(l.callbackNode=null,l.callbackPriority=0),g=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||g){g=Gt.T,Gt.T=null,E=qs(),Zn(2),z=re,re|=4;try{Ng(l,r,h)}finally{re=z,Zn(E),Gt.T=g}}Be=1,hd(),dd(),pd()}}function hd(){if(Be===1){Be=0;var l=Pl,r=Cr,h=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||h){h=Gt.T,Gt.T=null;var g=qs();Zn(2);var E=re;re|=4;try{tf(r,l),mf(l.containerInfo)}finally{re=E,Zn(g),Gt.T=h}}l.current=r,Be=2}}function dd(){if(Be===2){Be=0;var l=Pl,r=Cr,h=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||h){h=Gt.T,Gt.T=null;var g=qs();Zn(2);var E=re;re|=4;try{tm(l,r.alternate,r)}finally{re=E,Zn(g),Gt.T=h}}Be=3}}function pd(){if(Be===4||Be===3){Be=0,ri();var l=Pl,r=Cr,h=Is,g=Uy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Be=5:(Be=0,Cr=Pl=null,jg(l,l.pendingLanes));var E=l.pendingLanes;if(E===0&&(Tr=null),it(h),r=r.stateNode,Rn&&typeof Rn.onCommitFiberRoot=="function")try{Rn.onCommitFiberRoot(po,r,void 0,(r.current.flags&128)===128)}catch{}if(g!==null){r=Gt.T,E=qs(),Zn(2),Gt.T=null;try{for(var T=l.onRecoverableError,z=0;z<g.length;z++){var L=g[z];T(L.value,{componentStack:L.stack})}}finally{Gt.T=r,Zn(E)}}(Is&3)!==0&&On(),Ye(l),E=l.pendingLanes,(h&261930)!==0&&(E&42)!==0?l===up?Pu++:(Pu=0,up=l):Pu=0,ya&&Ey(),ta(0)}}function jg(l,r){(l.pooledCacheLanes&=r)===0&&(r=l.pooledCache,r!=null&&(l.pooledCache=null,da(r)))}function On(){return hd(),dd(),pd(),um()}function um(){if(Be!==5)return!1;var l=Pl,r=rp;rp=0;var h=it(Is),g=32>h?32:h;h=Gt.T;var E=qs();try{Zn(g),Gt.T=null,g=op,op=null;var T=Pl,z=Is;if(Be=0,Cr=Pl=null,Is=0,(re&6)!==0)throw Error(u(331));var L=re;if(re|=4,rd(T.current),Hg(T,T.current,z,g),re=L,ta(0,!1),Rn&&typeof Rn.onPostCommitFiberRoot=="function")try{Rn.onPostCommitFiberRoot(po,T)}catch{}return!0}finally{Zn(E),Gt.T=h,jg(l,r)}}function cm(l,r,h){r=mt(h,r),r=fu(l.stateNode,r,2),l=Ns(l,r,2),l!==null&&(W(l,2),Ye(l))}function be(l,r,h){if(l.tag===3)cm(l,l,h);else for(;r!==null;){if(r.tag===3){cm(r,l,h);break}else if(r.tag===1){var g=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Tr===null||!Tr.has(g))){l=mt(h,l),h=Xc(2),g=Ns(r,h,2),g!==null&&(qh(h,g,r,l),W(g,2),Ye(g));break}}r=r.return}}function md(l,r,h){var g=l.pingCache;if(g===null){g=l.pingCache=new v3;var E=new Set;g.set(r,E)}else E=g.get(r),E===void 0&&(E=new Set,g.set(r,E));E.has(h)||(qm=!0,E.add(h),l=rf.bind(null,l,r,h),r.then(l,l))}function rf(l,r,h){var g=l.pingCache;g!==null&&g.delete(r),l.pingedLanes|=l.suspendedLanes&h,l.warmLanes&=~h,qe===l&&(ue&h)===h&&(vn===4||vn===3&&(ue&62914560)===ue&&300>Me()-Hf?(re&2)===0&&cr(l,0):Xm|=h,ju===ue&&(ju=0)),Ye(l)}function fm(l,r){r===0&&(r=V()),l=nr(l,r),l!==null&&(W(l,r),Ye(l))}function gd(l){var r=l.memoizedState,h=0;r!==null&&(h=r.retryLane),fm(l,h)}function Lg(l,r){var h=0;switch(l.tag){case 31:case 13:var g=l.stateNode,E=l.memoizedState;E!==null&&(h=E.retryLane);break;case 19:g=l.stateNode;break;case 22:g=l.stateNode._retryCache;break;default:throw Error(u(314))}g!==null&&g.delete(r),fm(l,h)}function t3(l,r){return jd(l,r)}function yd(l,r,h,g){this.tag=l,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function of(l){return l=l.prototype,!(!l||!l.isReactComponent)}function Ls(l,r){var h=l.alternate;return h===null?(h=i(l.tag,r,l.key,l.mode),h.elementType=l.elementType,h.type=l.type,h.stateNode=l.stateNode,h.alternate=l,l.alternate=h):(h.pendingProps=r,h.type=l.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=l.flags&65011712,h.childLanes=l.childLanes,h.lanes=l.lanes,h.child=l.child,h.memoizedProps=l.memoizedProps,h.memoizedState=l.memoizedState,h.updateQueue=l.updateQueue,r=l.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},h.sibling=l.sibling,h.index=l.index,h.ref=l.ref,h.refCleanup=l.refCleanup,h}function hm(l,r){l.flags&=65011714;var h=l.alternate;return h===null?(l.childLanes=0,l.lanes=r,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=h.childLanes,l.lanes=h.lanes,l.child=h.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=h.memoizedProps,l.memoizedState=h.memoizedState,l.updateQueue=h.updateQueue,l.type=h.type,r=h.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),l}function uf(l,r,h,g,E,T){var z=0;if(g=l,typeof l=="function")of(l)&&(z=1);else if(typeof l=="string")z=Bi&&Gn?Hm(l,h,ba.current)?26:Gd(l)?27:5:Bi?Hm(l,h,ba.current)?26:5:Gn&&Gd(l)?27:5;else t:switch(l){case _d:return l=i(31,h,r,E),l.elementType=_d,l.lanes=T,l;case io:return Ol(h.children,E,T,r);case gm:z=8,E|=24;break;case df:return l=i(12,h,r,E|2),l.elementType=df,l.lanes=T,l;case so:return l=i(13,h,r,E),l.elementType=so,l.lanes=T,l;case we:return l=i(19,h,r,E),l.elementType=we,l.lanes=T,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Rl:z=10;break t;case Cd:z=9;break t;case Eu:z=11;break t;case ym:z=14;break t;case hr:z=16,g=null;break t}z=29,h=Error(u(130,l===null?"null":typeof l,"")),g=null}return r=i(z,h,r,E),r.elementType=l,r.type=g,r.lanes=T,r}function Ol(l,r,h,g){return l=i(7,l,g,r),l.lanes=h,l}function cf(l,r,h){return l=i(6,l,null,r),l.lanes=h,l}function vd(l){var r=i(18,null,null,0);return r.stateNode=l,r}function Sd(l,r,h){return r=i(4,l.children!==null?l.children:[],l.key,r),r.lanes=h,r.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},r}function dm(l,r,h,g,E,T,z,L,ct){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=zl,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=F(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=F(0),this.hiddenUpdates=F(null),this.identifierPrefix=g,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ct,this.incompleteTransitions=new Map}function ff(l,r,h,g,E,T,z,L,ct,St,At,xt){return l=new dm(l,r,h,z,ct,St,At,xt,L),r=1,T===!0&&(r|=24),T=i(3,null,null,r),l.current=T,T.stateNode=l,r=De(),r.refCount++,l.pooledCache=r,r.refCount++,T.memoizedState={element:g,isDehydrated:h,cache:r},Mc(T),l}function bd(l){return l?(l=ho,l):ho}function pm(l){var r=l._reactInternals;if(r===void 0)throw typeof l.render=="function"?Error(u(188)):(l=Object.keys(l).join(","),Error(u(268,l)));return l=p(r),l=l!==null?m(l):null,l===null?null:pf(l.stateNode)}function Ed(l,r,h,g,E,T){E=bd(E),g.context===null?g.context=E:g.pendingContext=E,g=yi(r),g.payload={element:h},T=T===void 0?null:T,T!==null&&(g.callback=T),h=Ns(l,g,r),h!==null&&(Pa(h,l,r),Nc(h,l,r))}function mm(l,r){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var h=l.retryLane;l.retryLane=h!==0&&h<r?h:r}}function os(l,r){mm(l,r),(l=l.alternate)&&mm(l,r)}var ae={},e3=w,Ya=J2(),Si=Object.assign,Td=Symbol.for("react.element"),hf=Symbol.for("react.transitional.element"),fr=Symbol.for("react.portal"),io=Symbol.for("react.fragment"),gm=Symbol.for("react.strict_mode"),df=Symbol.for("react.profiler"),Cd=Symbol.for("react.consumer"),Rl=Symbol.for("react.context"),Eu=Symbol.for("react.forward_ref"),so=Symbol.for("react.suspense"),we=Symbol.for("react.suspense_list"),ym=Symbol.for("react.memo"),hr=Symbol.for("react.lazy"),_d=Symbol.for("react.activity"),Ps=Symbol.for("react.memo_cache_sentinel"),vm=Symbol.iterator,Sm=Symbol.for("react.client.reference"),dr=Array.isArray,Gt=e3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Pg=t.rendererVersion,bm=t.rendererPackageName,Em=t.extraDevToolsConfig,pf=t.getPublicInstance,n3=t.getRootHostContext,Yg=t.getChildHostContext,a3=t.prepareForCommit,mf=t.resetAfterCommit,Ys=t.createInstance;t.cloneMutableInstance;var xd=t.appendInitialChild,qg=t.finalizeInitialChildren,gf=t.shouldSetTextContent,Dd=t.createTextInstance;t.cloneMutableTextInstance;var Xg=t.scheduleTimeout,Tm=t.cancelTimeout,zl=t.noTimeout,Ui=t.isPrimaryRenderer;t.warnsIfNotActing;var Ma=t.supportsMutation,us=t.supportsPersistence,ya=t.supportsHydration,Kg=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var i3=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Zn=t.setCurrentUpdatePriority,qs=t.getCurrentUpdatePriority,cs=t.resolveUpdatePriority;t.trackSchedulerEvent,t.resolveEventType,t.resolveEventTimeStamp;var Cm=t.shouldAttemptEagerTransition,Qg=t.detachDeletedInstance;t.requestPostPaintCallback;var Zg=t.maySuspendCommit,s3=t.maySuspendCommitOnUpdate,Tu=t.maySuspendCommitInSyncRender,va=t.preloadInstance,Jg=t.startSuspendingCommit,Na=t.suspendInstance;t.suspendOnActiveViewTransition;var Fg=t.waitForCommitToBeReady;t.getSuspendedCommitReason;var qa=t.NotPendingTransition,pr=t.HostTransitionContext,lo=t.resetFormInstance;t.bindToConsole;var kg=t.supportsMicrotasks,Xs=t.scheduleMicrotask,ro=t.supportsTestSelectors,_m=t.findFiberRoot,fs=t.getBoundingRect,Ig=t.getTextContent,Ks=t.isHiddenSubtree,Wg=t.matchAccessibilityRole,yf=t.setFocusIfFocusable,oo=t.setupIntersectionObserver,$g=t.appendChild,ty=t.appendChildToContainer,vf=t.commitTextUpdate,ey=t.commitMount,Ad=t.commitUpdate,ny=t.insertBefore,ay=t.insertInContainerBefore,xm=t.removeChild,Dm=t.removeChildFromContainer,Md=t.resetTextContent,iy=t.hideInstance,Nd=t.hideTextInstance,l3=t.unhideInstance,sy=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var bi=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var ly=t.cloneInstance,en=t.createContainerChildSet,Am=t.appendChildToContainerChildSet,ry=t.finalizeContainerChildren,oy=t.replaceContainerChildren,Hl=t.cloneHiddenInstance,Sf=t.cloneHiddenTextInstance,bf=t.isSuspenseInstancePending,Ef=t.isSuspenseInstanceFallback,uo=t.getSuspenseInstanceFallbackErrorDetails,Cu=t.registerSuspenseInstanceRetry,uy=t.canHydrateFormStateMarker,cy=t.isFormStateMarkerMatching,Mm=t.getNextHydratableSibling,fy=t.getNextHydratableSiblingAfterSingleton,Od=t.getFirstHydratableChild,Rd=t.getFirstHydratableChildWithinContainer,Nm=t.getFirstHydratableChildWithinActivityInstance,hy=t.getFirstHydratableChildWithinSuspenseInstance,r3=t.getFirstHydratableChildWithinSingleton,o3=t.canHydrateInstance,dy=t.canHydrateTextInstance,py=t.canHydrateActivityInstance,u3=t.canHydrateSuspenseInstance,_u=t.hydrateInstance,zd=t.hydrateTextInstance,my=t.hydrateActivityInstance,Om=t.hydrateSuspenseInstance,gy=t.getNextHydratableInstanceAfterActivityInstance,yy=t.getNextHydratableInstanceAfterSuspenseInstance,vy=t.commitHydratedInstance,c3=t.commitHydratedContainer,Sy=t.commitHydratedActivityInstance,xu=t.commitHydratedSuspenseInstance,by=t.finalizeHydratedChildren,Ey=t.flushHydrationEvents;t.clearActivityBoundary;var Ee=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var Rm=t.clearSuspenseBoundaryFromContainer,f3=t.hideDehydratedBoundary,Ty=t.unhideDehydratedBoundary,Cy=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var h3=t.validateHydratableInstance,zm=t.validateHydratableTextInstance,Bi=t.supportsResources,Hm=t.isHostHoistableType,Hd=t.getHoistableRoot,Du=t.getResource,_y=t.acquireResource,xy=t.releaseResource,co=t.hydrateHoistable,wd=t.mountHoistable,wm=t.unmountHoistable,Dy=t.createHoistableInstance,Ay=t.prepareToCommitHoistables,d3=t.mayResourceSuspendCommit,Ud=t.preloadResource,wl=t.suspendResource,Gn=t.supportsSingletons,Bd=t.resolveSingletonInstance,Vd=t.acquireSingletonInstance,mr=t.releaseSingletonInstance,Gd=t.isHostSingletonType,fo=t.isSingletonScope,Tf=[],Au=-1,ho={},li=Math.clz32?Math.clz32:N,My=Math.log,Ny=Math.LN2,Cf=256,_f=262144,Mu=4194304,jd=Ya.unstable_scheduleCallback,ie=Ya.unstable_cancelCallback,p3=Ya.unstable_shouldYield,ri=Ya.unstable_requestPaint,Me=Ya.unstable_now,Oy=Ya.unstable_ImmediatePriority,Ul=Ya.unstable_UserBlockingPriority,Bl=Ya.unstable_NormalPriority,Nu=Ya.unstable_IdlePriority,Ld=Ya.log,Um=Ya.unstable_setDisableYieldValue,po=null,Rn=null,Sa=typeof Object.is=="function"?Object.is:dt,Pd=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Bm=Object.prototype.hasOwnProperty,Ou,oi,xf=!1,Ry=new WeakMap,mo=[],Ru=0,jn=null,lt=0,Vi=[],Gi=0,Vl=null,Xa=1,Qs="",ba=x(null),Df=x(null),gr=x(null),Yd=x(null),Jn=null,nn=null,le=!1,Gl=null,ji=!1,Vm=Error(u(519)),Zs=x(null),Ka=null,an=null,Js=typeof AbortController<"u"?AbortController:function(){var l=[],r=this.signal={aborted:!1,addEventListener:function(h,g){l.push(g)}};this.abort=function(){r.aborted=!0,l.forEach(function(h){return h()})}},Oa=Ya.unstable_scheduleCallback,m3=Ya.unstable_NormalPriority,fn={$$typeof:Rl,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},zn=null,ui=null,Gm=!1,zu=!1,go=!1,hs=0,Af=null,jm=0,Hu=0,wu=null,qd=Gt.S;Gt.S=function(l,r){Km=Me(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&xc(l,r),qd!==null&&qd(l,r)};var yr=x(null),Uu=Error(u(460)),Xd=Error(u(474)),Kd=Error(u(542)),Qd={then:function(){}},Li=null,Pi=null,Mf=0,yo=z0(!0),zy=z0(!1),Yi=[],ds=0,Lm=0,vr=!1,Pm=!1,Fs=x(null),Zd=x(0),Ei=x(null),qi=null,Hn=x(0),jl=0,kt=null,je=null,Ln=null,Jd=!1,Bu=!1,vo=!1,Fd=0,Vu=0,Gu=null,g3=0,Nf={readContext:gn,use:Ge,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useLayoutEffect:cn,useInsertionEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useSyncExternalStore:cn,useId:cn,useHostTransitionStatus:cn,useFormState:cn,useActionState:cn,useOptimistic:cn,useMemoCache:cn,useCacheRefresh:cn};Nf.useEffectEvent=cn;var Hy={readContext:gn,use:Ge,useCallback:function(l,r){return pa().memoizedState=[l,r===void 0?null:r],l},useContext:gn,useEffect:V0,useImperativeHandle:function(l,r,h){h=h!=null?h.concat([l]):null,Gc(4194308,4,Ag.bind(null,r,l),h)},useLayoutEffect:function(l,r){return Gc(4194308,4,l,r)},useInsertionEffect:function(l,r){Gc(4,2,l,r)},useMemo:function(l,r){var h=pa();r=r===void 0?null:r;var g=l();if(vo){ht(!0);try{l()}finally{ht(!1)}}return h.memoizedState=[g,r],g},useReducer:function(l,r,h){var g=pa();if(h!==void 0){var E=h(r);if(vo){ht(!0);try{h(r)}finally{ht(!1)}}}else E=r;return g.memoizedState=g.baseState=E,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:E},g.queue=l,l=l.dispatch=ma.bind(null,kt,l),[g.memoizedState,l]},useRef:function(l){var r=pa();return l={current:l},r.memoizedState=l},useState:function(l){l=Ga(l);var r=l.queue,h=Ph.bind(null,kt,r);return r.dispatch=h,[l.memoizedState,h]},useDebugValue:L0,useDeferredValue:function(l,r){var h=pa();return jh(h,l,r)},useTransition:function(){var l=Ga(!1);return l=P0.bind(null,kt,l.queue,!0,!1),pa().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,r,h){var g=kt,E=pa();if(le){if(h===void 0)throw Error(u(407));h=h()}else{if(h=r(),qe===null)throw Error(u(349));(ue&127)!==0||xg(g,r,h)}E.memoizedState=h;var T={value:h,getSnapshot:r};return E.queue=T,V0(Hc.bind(null,g,T,l),[l]),g.flags|=2048,ja(9,{destroy:void 0},Hs.bind(null,g,T,h,r),null),h},useId:function(){var l=pa(),r=qe.identifierPrefix;if(le){var h=Qs,g=Xa;h=(g&~(1<<32-li(g)-1)).toString(32)+h,r="_"+r+"R_"+h,h=Fd++,0<h&&(r+="H"+h.toString(32)),r+="_"}else h=g3++,r="_"+r+"r_"+h.toString(32)+"_";return l.memoizedState=r},useHostTransitionStatus:Lh,useFormState:ns,useActionState:ns,useOptimistic:function(l){var r=pa();r.memoizedState=r.baseState=l;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=h,r=cu.bind(null,kt,!0,h),h.dispatch=r,[l,r]},useMemoCache:lu,useCacheRefresh:function(){return pa().memoizedState=Mg.bind(null,kt)},useEffectEvent:function(l){var r=pa(),h={impl:l};return r.memoizedState=h,function(){if((re&2)!==0)throw Error(u(440));return h.impl.apply(void 0,arguments)}}},Ym={readContext:gn,use:Ge,useCallback:Gh,useContext:gn,useEffect:Uh,useImperativeHandle:j0,useInsertionEffect:G0,useLayoutEffect:Vh,useMemo:jc,useReducer:ru,useRef:Wr,useState:function(){return ru(zs)},useDebugValue:L0,useDeferredValue:function(l,r){var h=Ke();return Lc(h,je.memoizedState,l,r)},useTransition:function(){var l=ru(zs)[0],r=Ke().memoizedState;return[typeof l=="boolean"?l:Ii(l),r]},useSyncExternalStore:Wi,useId:_l,useHostTransitionStatus:Lh,useFormState:B0,useActionState:B0,useOptimistic:function(l,r){var h=Ke();return ni(h,je,l,r)},useMemoCache:lu,useCacheRefresh:q0};Ym.useEffectEvent=Bh;var wy={readContext:gn,use:Ge,useCallback:Gh,useContext:gn,useEffect:Uh,useImperativeHandle:j0,useInsertionEffect:G0,useLayoutEffect:Vh,useMemo:jc,useReducer:Ir,useRef:Wr,useState:function(){return Ir(zs)},useDebugValue:L0,useDeferredValue:function(l,r){var h=Ke();return je===null?jh(h,l,r):Lc(h,je.memoizedState,l,r)},useTransition:function(){var l=Ir(zs)[0],r=Ke().memoizedState;return[typeof l=="boolean"?l:Ii(l),r]},useSyncExternalStore:Wi,useId:_l,useHostTransitionStatus:Lh,useFormState:Vc,useActionState:Vc,useOptimistic:function(l,r){var h=Ke();return je!==null?ni(h,je,l,r):(h.baseState=l,[l,h.queue.dispatch])},useMemoCache:lu,useCacheRefresh:q0};wy.useEffectEvent=Bh;var kd={enqueueSetState:function(l,r,h){l=l._reactInternals;var g=si(),E=yi(g);E.payload=r,h!=null&&(E.callback=h),r=Ns(l,E,g),r!==null&&(Pa(r,l,g),Nc(r,l,g))},enqueueReplaceState:function(l,r,h){l=l._reactInternals;var g=si(),E=yi(g);E.tag=1,E.payload=r,h!=null&&(E.callback=h),r=Ns(l,E,g),r!==null&&(Pa(r,l,g),Nc(r,l,g))},enqueueForceUpdate:function(l,r){l=l._reactInternals;var h=si(),g=yi(h);g.tag=2,r!=null&&(g.callback=r),r=Ns(l,g,h),r!==null&&(Pa(r,l,h),Nc(r,l,h))}},Id=Error(u(461)),Pn=!1,Wd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},ks=!1,wn=!1,Of=!1,$d=typeof WeakSet=="function"?WeakSet:Set,aa=null,Yn=null,ci=!1,ps=null,Sr=8192,y3={getCacheForType:function(l){var r=gn(fn),h=r.data.get(l);return h===void 0&&(h=l(),r.data.set(l,h)),h},cacheSignal:function(){return gn(fn).controller.signal}},tp=0,ep=1,np=2,ap=3,ip=4;if(typeof Symbol=="function"&&Symbol.for){var Rf=Symbol.for;tp=Rf("selector.component"),ep=Rf("selector.has_pseudo_class"),np=Rf("selector.role"),ap=Rf("selector.test_id"),ip=Rf("selector.text")}var v3=typeof WeakMap=="function"?WeakMap:Map,re=0,qe=null,oe=null,ue=0,Ue=0,Ti=null,br=!1,So=!1,qm=!1,Ll=0,vn=0,Er=0,bo=0,Xm=0,Ci=0,ju=0,zf=null,fi=null,sp=!1,Hf=0,Km=0,Lu=1/0,lp=null,Tr=null,Be=0,Pl=null,Cr=null,Is=0,rp=0,op=null,Uy=null,Pu=0,up=null;return ae.attemptContinuousHydration=function(l){if(l.tag===13||l.tag===31){var r=nr(l,67108864);r!==null&&Pa(r,l,67108864),os(l,67108864)}},ae.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13||l.tag===31){var r=si();r=Tt(r);var h=nr(l,r);h!==null&&Pa(h,l,r),os(l,r)}},ae.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var r=R(l.pendingLanes);if(r!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;r;){var h=1<<31-li(r);l.entanglements[1]|=h,r&=~h}Ye(l),(re&6)===0&&(Lu=Me()+500,ta(0))}}break;case 31:case 13:r=nr(l,2),r!==null&&Pa(r,l,2),ur(),os(l,2)}},ae.batchedUpdates=function(l,r){return l(r)},ae.createComponentSelector=function(l){return{$$typeof:tp,value:l}},ae.createContainer=function(l,r,h,g,E,T,z,L,ct,St){return ff(l,r,!1,null,h,g,T,null,z,L,ct,St)},ae.createHasPseudoClassSelector=function(l){return{$$typeof:ep,value:l}},ae.createHydrationContainer=function(l,r,h,g,E,T,z,L,ct,St,At,xt,Ot,Yt){return l=ff(h,g,!0,l,E,T,L,Yt,ct,St,At,xt),l.context=bd(null),h=l.current,g=si(),g=Tt(g),E=yi(g),E.callback=r??null,Ns(h,E,g),r=g,l.current.lanes=r,W(l,r),Ye(l),l},ae.createPortal=function(l,r,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fr,key:g==null?null:""+g,children:l,containerInfo:r,implementation:h}},ae.createRoleSelector=function(l){return{$$typeof:np,value:l}},ae.createTestNameSelector=function(l){return{$$typeof:ap,value:l}},ae.createTextSelector=function(l){return{$$typeof:ip,value:l}},ae.defaultOnCaughtError=function(l){console.error(l)},ae.defaultOnRecoverableError=function(l){Pd(l)},ae.defaultOnUncaughtError=function(l){Pd(l)},ae.deferredUpdates=function(l){var r=Gt.T,h=qs();try{return Zn(32),Gt.T=null,l()}finally{Zn(h),Gt.T=r}},ae.discreteUpdates=function(l,r,h,g,E){var T=Gt.T,z=qs();try{return Zn(2),Gt.T=null,l(r,h,g,E)}finally{Zn(z),Gt.T=T,re===0&&(Lu=Me()+500)}},ae.findAllNodes=nf,ae.findBoundingRects=function(l,r){if(!ro)throw Error(u(363));r=nf(l,r),l=[];for(var h=0;h<r.length;h++)l.push(fs(r[h]));for(r=l.length-1;0<r;r--){h=l[r];for(var g=h.x,E=g+h.width,T=h.y,z=T+h.height,L=r-1;0<=L;L--)if(r!==L){var ct=l[L],St=ct.x,At=St+ct.width,xt=ct.y,Ot=xt+ct.height;if(g>=St&&T>=xt&&E<=At&&z<=Ot){l.splice(r,1);break}else if(g!==St||h.width!==ct.width||Ot<T||xt>z){if(!(T!==xt||h.height!==ct.height||At<g||St>E)){St>g&&(ct.width+=St-g,ct.x=g),At<E&&(ct.width=E-St),l.splice(r,1);break}}else{xt>T&&(ct.height+=xt-T,ct.y=T),Ot<z&&(ct.height=z-xt),l.splice(r,1);break}}}return l},ae.findHostInstance=pm,ae.findHostInstanceWithNoPortals=function(l){return l=p(l),l=l!==null?S(l):null,l===null?null:pf(l.stateNode)},ae.findHostInstanceWithWarning=function(l){return pm(l)},ae.flushPassiveEffects=On,ae.flushSyncFromReconciler=function(l){var r=re;re|=1;var h=Gt.T,g=qs();try{if(Zn(2),Gt.T=null,l)return l()}finally{Zn(g),Gt.T=h,re=r,(re&6)===0&&ta(0)}},ae.flushSyncWork=ur,ae.focusWithin=function(l,r){if(!ro)throw Error(u(363));for(l=yu(l),r=am(l,r),r=Array.from(r),l=0;l<r.length;){var h=r[l++],g=h.tag;if(!Ks(h)){if((g===5||g===26||g===27)&&yf(h.stateNode))return!0;for(h=h.child;h!==null;)r.push(h),h=h.sibling}}return!1},ae.getFindAllNodesFailureDescription=function(l,r){if(!ro)throw Error(u(363));var h=0,g=[];l=[yu(l),0];for(var E=0;E<l.length;){var T=l[E++],z=T.tag,L=l[E++],ct=r[L];if((z!==5&&z!==26&&z!==27||!Ks(T))&&(ef(T,ct)&&(g.push(ud(ct)),L++,L>h&&(h=L)),L<r.length))for(T=T.child;T!==null;)l.push(T,L),T=T.sibling}if(h<r.length){for(l=[];h<r.length;h++)l.push(ud(r[h]));return`findAllNodes was able to match part of the selector:
23
23
  `+(g.join(" > ")+`
24
24
 
25
25
  No matching component was found for:
26
- `)+l.join(" > ")}return null},ne.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return hf(l.child.stateNode);default:return l.child.stateNode}},ne.injectIntoDevTools=function(){var l={bundleType:0,version:Pg,rendererPackageName:Sm,currentDispatcherRef:Gt,reconcilerVersion:"19.2.0"};if(bm!==null&&(l.rendererConfig=bm),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled||!r.supportsFiber)l=!0;else{try{po=r.inject(l),Rn=r}catch{}l=!!r.checkDCE}}return l},ne.isAlreadyRendering=function(){return(re&6)!==0},ne.observeVisibleRects=function(l,r,h,g){if(!ro)throw Error(u(363));l=tf(l,r);var E=oo(l,h,g).disconnect;return{disconnect:function(){E()}}},ne.shouldError=function(){return null},ne.shouldSuspend=function(){return!1},ne.startHostTransition=function(l,r,h,g){if(l.tag!==5)throw Error(u(476));var E=P0(l).queue;L0(l,E,r,qa,h===null?s:function(){var T=P0(l);return T.next===null&&(T=l.alternate.memoizedState),tr(l,T.next.queue,{},ai()),h(g)})},ne.updateContainer=function(l,r,h,g){var E=r.current,T=ai();return Sd(E,T,l,r,h,g),T},ne.updateContainerSync=function(l,r,h,g){return Sd(r.current,2,l,r,h,g),2},ne},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(K2)),K2.exports}var F2={exports:{}};var g4;function K_(){return g4||(g4=1,(function(n){process.env.NODE_ENV!=="production"&&(n.exports=function(t){function i(e,a){for(e=e.memoizedState;e!==null&&0<a;)e=e.next,a--;return e}function s(e,a,o,d){if(o>=a.length)return d;var y=a[o],v=Pn(e)?e.slice():Me({},e);return v[y]=s(e[y],a,o+1,d),v}function u(e,a,o){if(a.length!==o.length)console.warn("copyWithRename() expects paths of the same length");else{for(var d=0;d<o.length-1;d++)if(a[d]!==o[d]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return c(e,a,o,0)}}function c(e,a,o,d){var y=a[d],v=Pn(e)?e.slice():Me({},e);return d+1===a.length?(v[o[d]]=v[y],Pn(v)?v.splice(y,1):delete v[y]):v[y]=c(e[y],a,o,d+1),v}function f(e,a,o){var d=a[o],y=Pn(e)?e.slice():Me({},e);return o+1===a.length?(Pn(y)?y.splice(d,1):delete y[d],y):(y[d]=f(e[d],a,o+1),y)}function p(){return!1}function m(){return null}function S(e,a,o,d){return new d3(e,a,o,d)}function b(e,a){e.context===tn&&(Ny(a,e,null,null),yf())}function _(e,a){if(il!==null){var o=a.staleFamilies;a=a.updatedFamilies,Au(),Ay(e.current,a,o),yf()}}function x(e){il=e}function D(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function A(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function N(){}function R(){}function O(e){var a=[];return e.forEach(function(o){a.push(o)}),a.sort().join(", ")}function U(e){var a=e,o=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(o=a.return),e=a.return;while(e)}return a.tag===3?o:null}function j(e){if(U(e)!==e)throw Error("Unable to find node on an unmounted component.")}function V(e){var a=e.alternate;if(!a){if(a=U(e),a===null)throw Error("Unable to find node on an unmounted component.");return a!==e?null:e}for(var o=e,d=a;;){var y=o.return;if(y===null)break;var v=y.alternate;if(v===null){if(d=y.return,d!==null){o=d;continue}break}if(y.child===v.child){for(v=y.child;v;){if(v===o)return j(y),e;if(v===d)return j(y),a;v=v.sibling}throw Error("Unable to find node on an unmounted component.")}if(o.return!==d.return)o=y,d=v;else{for(var C=!1,M=y.child;M;){if(M===o){C=!0,o=y,d=v;break}if(M===d){C=!0,d=y,o=v;break}M=M.sibling}if(!C){for(M=v.child;M;){if(M===o){C=!0,o=v,d=y;break}if(M===d){C=!0,d=v,o=y;break}M=M.sibling}if(!C)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(o.alternate!==d)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(o.tag!==3)throw Error("Unable to find node on an unmounted component.");return o.stateNode.current===o?e:a}function F(e){return e=V(e),e!==null?$(e):null}function $(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=$(e),a!==null)return a;e=e.sibling}return null}function st(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(e.tag!==4&&(a=st(e),a!==null))return a;e=e.sibling}return null}function I(e){return e===null||typeof e!="object"?null:(e=mo&&e[mo]||e["@@iterator"],typeof e=="function"?e:null)}function et(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Hu?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ru:return"Fragment";case wm:return"Profiler";case Gd:return"StrictMode";case jd:return"Suspense";case Um:return"SuspenseList";case Cf:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case zl:return"Portal";case Rn:return e.displayName||"Context";case po:return(e._context.displayName||"Context")+".Consumer";case Sa:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zu:return a=e.displayName||null,a!==null?a:et(e.type)||"Memo";case li:a=e._payload,e=e._init;try{return et(e(a))}catch{}}return null}function nt(e){var a=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(a._context.displayName||"Context")+".Consumer";case 10:return a.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=a.render,e=e.displayName||e.name||"",a.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return et(a);case 8:return a===Gd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;break;case 29:if(a=e._debugInfo,a!=null){for(var o=a.length-1;0<=o;o--)if(typeof a[o].name=="string")return a[o].name}if(e.return!==null)return nt(e.return)}return null}function bt(e){return{current:e}}function lt(e,a){0>Yt?console.error("Unexpected pop."):(a!==Rt[Yt]&&console.error("Unexpected Fiber popped."),e.current=xt[Yt],xt[Yt]=null,Rt[Yt]=null,Yt--)}function dt(e,a,o){Yt++,xt[Yt]=e.current,Rt[Yt]=o,e.current=a}function pt(e){return e>>>=0,e===0?32:31-(Eo(e)/it|0)|0}function tt(e){var a=e&42;if(a!==0)return a;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 console.error("Should have found matching lanes. This is a bug in React."),e}}function w(e,a,o){var d=e.pendingLanes;if(d===0)return 0;var y=0,v=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var M=d&134217727;return M!==0?(d=M&~v,d!==0?y=tt(d):(C&=M,C!==0?y=tt(C):o||(o=M&~e,o!==0&&(y=tt(o))))):(M=d&~v,M!==0?y=tt(M):C!==0?y=tt(C):o||(o=d&~e,o!==0&&(y=tt(o)))),y===0?0:a!==0&&a!==y&&(a&v)===0&&(v=y&-y,o=a&-a,v>=o||v===32&&(o&4194048)!==0)?a:y}function Z(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function K(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 console.error("Should have found matching lanes. This is a bug in React."),-1}}function at(){var e=_t;return _t<<=1,(_t&62914560)===0&&(_t=4194304),e}function St(e){for(var a=[],o=0;31>o;o++)a.push(e);return a}function W(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function gt(e,a,o,d,y,v){var C=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var M=e.entanglements,B=e.expirationTimes,q=e.hiddenUpdates;for(o=C&~o;0<o;){var ct=31-kn(o),ht=1<<ct;M[ct]=0,B[ct]=-1;var yt=q[ct];if(yt!==null)for(q[ct]=null,ct=0;ct<yt.length;ct++){var Vt=yt[ct];Vt!==null&&(Vt.lane&=-536870913)}o&=~ht}d!==0&&Tt(e,d,0),v!==0&&y===0&&e.tag!==0&&(e.suspendedLanes|=v&~(C&~a))}function Tt(e,a,o){e.pendingLanes|=a,e.suspendedLanes&=~a;var d=31-kn(a);e.entangledLanes|=a,e.entanglements[d]=e.entanglements[d]|1073741824|o&261930}function Pt(e,a){var o=e.entangledLanes|=a;for(e=e.entanglements;o;){var d=31-kn(o),y=1<<d;y&a|e[d]&a&&(e[d]|=a),o&=~y}}function le(e,a){var o=a&-a;return o=(o&42)!==0?1:xn(o),(o&(e.suspendedLanes|a))!==0?0:o}function xn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function xe(e,a,o){if(Tr)for(e=e.pendingUpdatersLaneMap;0<o;){var d=31-kn(o),y=1<<d;e[d].add(a),o&=~y}}function Dn(e,a){if(Tr)for(var o=e.pendingUpdatersLaneMap,d=e.memoizedUpdaters;0<a;){var y=31-kn(a);e=1<<y,y=o[y],0<y.size&&(y.forEach(function(v){var C=v.alternate;C!==null&&d.has(C)||d.add(v)}),y.clear()),a&=~e}}function ln(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Be(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(a.isDisabled)return!0;if(!a.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{op=a.inject(e),ci=a}catch(o){console.error("React instrumentation encountered an error: %o.",o)}return!!a.checkDCE}function At(e){if(typeof WG=="function"&&$G(e),ci&&typeof ci.setStrictMode=="function")try{ci.setStrictMode(op,e)}catch(a){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",a))}}function ue(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}function ta(e){for(var a=0,o=0;o<e.length;o++){var d=e[o];if(typeof d=="object"&&d!==null)if(Pn(d)&&d.length===2&&typeof d[0]=="string"){if(a!==0&&a!==3)return 1;a=3}else return 1;else{if(typeof d=="function"||typeof d=="string"&&50<d.length||a!==0&&a!==2)return 1;a=2}}return a}function ea(e,a,o,d){for(var y in e)S3.call(e,y)&&y[0]!=="_"&&An(y,e[y],a,o,d)}function An(e,a,o,d,y){switch(typeof a){case"object":if(a===null){a="null";break}else{if(a.$$typeof===Rl){var v=et(a.type)||"…",C=a.key;a=a.props;var M=Object.keys(a),B=M.length;if(C==null&&B===0){a="<"+v+" />";break}if(3>d||B===1&&M[0]==="children"&&C==null){a="<"+v+" … />";break}o.push([y+"  ".repeat(d)+e,"<"+v]),C!==null&&An("key",C,o,d+1,y),e=!1;for(var q in a)q==="children"?a.children!=null&&(!Pn(a.children)||0<a.children.length)&&(e=!0):S3.call(a,q)&&q[0]!=="_"&&An(q,a[q],o,d+1,y);o.push(["",e?">…</"+v+">":"/>"]);return}if(v=Object.prototype.toString.call(a),v=v.slice(8,v.length-1),v==="Array"){if(q=ta(a),q===2||q===0){a=JSON.stringify(a);break}else if(q===3){for(o.push([y+"  ".repeat(d)+e,""]),e=0;e<a.length;e++)v=a[e],An(v[0],v[1],o,d+1,y);return}}if(v==="Promise"){if(a.status==="fulfilled"){if(v=o.length,An(e,a.value,o,d,y),o.length>v){o=o[v],o[1]="Promise<"+(o[1]||"Object")+">";return}}else if(a.status==="rejected"&&(v=o.length,An(e,a.reason,o,d,y),o.length>v)){o=o[v],o[1]="Rejected Promise<"+o[1]+">";return}o.push(["  ".repeat(d)+e,"Promise"]);return}v==="Object"&&(q=Object.getPrototypeOf(a))&&typeof q.constructor=="function"&&(v=q.constructor.name),o.push([y+"  ".repeat(d)+e,v==="Object"?3>d?"":"…":v]),3>d&&ea(a,o,d+1,y);return}case"function":a=a.name===""?"() => {}":a.name+"() {}";break;case"string":a=a==="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."?"…":JSON.stringify(a);break;case"undefined":a="undefined";break;case"boolean":a=a?"true":"false";break;default:a=String(a)}o.push([y+"  ".repeat(d)+e,a])}function Ba(e,a,o,d){var y=!0;for(C in e)C in a||(o.push(["– "+"  ".repeat(d)+C,"…"]),y=!1);for(var v in a)if(v in e){var C=e[v],M=a[v];if(C!==M){if(d===0&&v==="children")y="  ".repeat(d)+v,o.push(["– "+y,"…"],["+ "+y,"…"]);else{if(!(3<=d)){if(typeof C=="object"&&typeof M=="object"&&C!==null&&M!==null&&C.$$typeof===M.$$typeof)if(M.$$typeof===Rl){if(C.type===M.type&&C.key===M.key){C=et(M.type)||"…",y="  ".repeat(d)+v,C="<"+C+" … />",o.push(["– "+y,C],["+ "+y,C]),y=!1;continue}}else{var B=Object.prototype.toString.call(C),q=Object.prototype.toString.call(M);if(B===q&&(q==="[object Object]"||q==="[object Array]")){B=["  "+"  ".repeat(d)+v,q==="[object Array]"?"Array":""],o.push(B),q=o.length,Ba(C,M,o,d+1)?q===o.length&&(B[1]="Referentially unequal but deeply equal objects. Consider memoization."):y=!1;continue}}else if(typeof C=="function"&&typeof M=="function"&&C.name===M.name&&C.length===M.length&&(B=Function.prototype.toString.call(C),q=Function.prototype.toString.call(M),B===q)){C=M.name===""?"() => {}":M.name+"() {}",o.push(["  "+"  ".repeat(d)+v,C+" Referentially unequal function closure. Consider memoization."]);continue}}An(v,C,o,d,"– "),An(v,M,o,d,"+ ")}y=!1}}else o.push(["+ "+"  ".repeat(d)+v,"…"]),y=!1;return y}function rn(e){me=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function ha(e,a,o,d){en&&(Ku.start=a,Ku.end=o,To.color="warning",To.tooltipText=d,To.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,d,Ku)):performance.measure(d,Ku))}function Ji(e,a,o){ha(e,a,o,"Reconnect")}function di(e,a,o,d,y){var v=nt(e);if(v!==null&&en){var C=e.alternate,M=e.actualDuration;if(C===null||C.child!==e.child)for(var B=e.child;B!==null;B=B.sibling)M-=B.actualDuration;d=.5>M?d?"tertiary-light":"primary-light":10>M?d?"tertiary":"primary":100>M?d?"tertiary-dark":"primary-dark":"error";var q=e.memoizedProps;M=e._debugTask,q!==null&&C!==null&&C.memoizedProps!==q?(B=[nj],q=Ba(C.memoizedProps,q,B,0),1<B.length&&(q&&!Xu&&(C.lanes&y)===0&&100<e.actualDuration?(Xu=!0,B[0]=aj,To.color="warning",To.tooltipText="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."):(To.color=d,To.tooltipText=v),To.properties=B,Ku.start=a,Ku.end=o,M!=null?M.run(performance.measure.bind(performance,"​"+v,Ku)):performance.measure("​"+v,Ku))):M!=null?M.run(console.timeStamp.bind(console,v,a,o,"Components ⚛",void 0,d)):console.timeStamp(v,a,o,"Components ⚛",void 0,d)}}function Fi(e,a,o,d){if(en){var y=nt(e);if(y!==null){for(var v=null,C=[],M=0;M<d.length;M++){var B=d[M];v==null&&B.source!==null&&(v=B.source._debugTask),B=B.value,C.push(["Error",typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B)])}e.key!==null&&An("key",e.key,C,0,""),e.memoizedProps!==null&&ea(e.memoizedProps,C,0,""),v==null&&(v=e._debugTask),e={start:a,end:o,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:C}}},v?v.run(performance.measure.bind(performance,"​"+y,e)):performance.measure("​"+y,e)}}}function Mn(e,a,o,d,y){if(y!==null){if(en){var v=nt(e);if(v!==null){d=[];for(var C=0;C<y.length;C++){var M=y[C].value;d.push(["Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e.key!==null&&An("key",e.key,d,0,""),e.memoizedProps!==null&&ea(e.memoizedProps,d,0,""),a={start:a,end:o,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:"A lifecycle or effect errored",properties:d}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,"​"+v,a)):performance.measure("​"+v,a)}}}else v=nt(e),v!==null&&en&&(y=1>d?"secondary-light":100>d?"secondary":500>d?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,v,a,o,"Components ⚛",void 0,y)):console.timeStamp(v,a,o,"Components ⚛",void 0,y))}function on(e,a,o,d){if(en&&!(a<=e)){var y=(o&738197653)===o?"tertiary-dark":"primary-dark";o=(o&536870912)===o?"Prepared":(o&201326741)===o?"Hydrated":"Render",d?d.run(console.timeStamp.bind(console,o,e,a,me,"Scheduler ⚛",y)):console.timeStamp(o,e,a,me,"Scheduler ⚛",y)}}function Mi(e,a,o,d){!en||a<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Prewarm",e,a,me,"Scheduler ⚛",o)):console.timeStamp("Prewarm",e,a,me,"Scheduler ⚛",o))}function Ut(e,a,o,d){!en||a<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Suspended",e,a,me,"Scheduler ⚛",o)):console.timeStamp("Suspended",e,a,me,"Scheduler ⚛",o))}function Ae(e,a,o,d,y,v){if(en&&!(a<=e)){o=[];for(var C=0;C<d.length;C++){var M=d[C].value;o.push(["Recoverable Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e={start:e,end:a,detail:{devtools:{color:"primary-dark",track:me,trackGroup:"Scheduler ⚛",tooltipText:y?"Hydration Failed":"Recovered after Error",properties:o}}},v?v.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function jn(e,a,o,d){!en||a<=e||(d?d.run(console.timeStamp.bind(console,"Errored",e,a,me,"Scheduler ⚛","error")):console.timeStamp("Errored",e,a,me,"Scheduler ⚛","error"))}function Va(e,a,o,d){!en||a<=e||(d?d.run(console.timeStamp.bind(console,o,e,a,me,"Scheduler ⚛","secondary-light")):console.timeStamp(o,e,a,me,"Scheduler ⚛","secondary-light"))}function ke(e,a,o,d,y){if(en&&!(a<=e)){for(var v=[],C=0;C<o.length;C++){var M=o[C].value;v.push(["Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e={start:e,end:a,detail:{devtools:{color:"error",track:me,trackGroup:"Scheduler ⚛",tooltipText:d?"Remaining Effects Errored":"Commit Errored",properties:v}}},y?y.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function mn(){}function eu(){if(Km===0){B9=console.log,V9=console.info,G9=console.warn,j9=console.error,L9=console.group,P9=console.groupCollapsed,Y9=console.groupEnd;var e={configurable:!0,enumerable:!0,value:mn,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Km++}function Lr(){if(Km--,Km===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Me({},e,{value:B9}),info:Me({},e,{value:V9}),warn:Me({},e,{value:G9}),error:Me({},e,{value:j9}),group:Me({},e,{value:L9}),groupCollapsed:Me({},e,{value:P9}),groupEnd:Me({},e,{value:Y9})})}0>Km&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function nu(e){var a=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=a,e.startsWith(`Error: react-stack-top-frame
26
+ `)+l.join(" > ")}return null},ae.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return pf(l.child.stateNode);default:return l.child.stateNode}},ae.injectIntoDevTools=function(){var l={bundleType:0,version:Pg,rendererPackageName:bm,currentDispatcherRef:Gt,reconcilerVersion:"19.2.0"};if(Em!==null&&(l.rendererConfig=Em),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(r.isDisabled||!r.supportsFiber)l=!0;else{try{po=r.inject(l),Rn=r}catch{}l=!!r.checkDCE}}return l},ae.isAlreadyRendering=function(){return(re&6)!==0},ae.observeVisibleRects=function(l,r,h,g){if(!ro)throw Error(u(363));l=nf(l,r);var E=oo(l,h,g).disconnect;return{disconnect:function(){E()}}},ae.shouldError=function(){return null},ae.shouldSuspend=function(){return!1},ae.startHostTransition=function(l,r,h,g){if(l.tag!==5)throw Error(u(476));var E=Y0(l).queue;P0(l,E,r,qa,h===null?s:function(){var T=Y0(l);return T.next===null&&(T=l.alternate.memoizedState),ar(l,T.next.queue,{},si()),h(g)})},ae.updateContainer=function(l,r,h,g){var E=r.current,T=si();return Ed(E,T,l,r,h,g),T},ae.updateContainerSync=function(l,r,h,g){return Ed(r.current,2,l,r,h,g),2},ae},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(K2)),K2.exports}var F2={exports:{}};var g4;function Q_(){return g4||(g4=1,(function(n){process.env.NODE_ENV!=="production"&&(n.exports=function(t){function i(e,a){for(e=e.memoizedState;e!==null&&0<a;)e=e.next,a--;return e}function s(e,a,o,d){if(o>=a.length)return d;var y=a[o],v=jn(e)?e.slice():Me({},e);return v[y]=s(e[y],a,o+1,d),v}function u(e,a,o){if(a.length!==o.length)console.warn("copyWithRename() expects paths of the same length");else{for(var d=0;d<o.length-1;d++)if(a[d]!==o[d]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return c(e,a,o,0)}}function c(e,a,o,d){var y=a[d],v=jn(e)?e.slice():Me({},e);return d+1===a.length?(v[o[d]]=v[y],jn(v)?v.splice(y,1):delete v[y]):v[y]=c(e[y],a,o,d+1),v}function f(e,a,o){var d=a[o],y=jn(e)?e.slice():Me({},e);return o+1===a.length?(jn(y)?y.splice(d,1):delete y[d],y):(y[d]=f(e[d],a,o+1),y)}function p(){return!1}function m(){return null}function S(e,a,o,d){return new d3(e,a,o,d)}function b(e,a){e.context===sn&&(Ny(a,e,null,null),Sf())}function _(e,a){if(rl!==null){var o=a.staleFamilies;a=a.updatedFamilies,xu(),Ay(e.current,a,o),Sf()}}function x(e){rl=e}function D(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function A(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function N(){}function R(){}function O(e){var a=[];return e.forEach(function(o){a.push(o)}),a.sort().join(", ")}function U(e){var a=e,o=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(o=a.return),e=a.return;while(e)}return a.tag===3?o:null}function j(e){if(U(e)!==e)throw Error("Unable to find node on an unmounted component.")}function V(e){var a=e.alternate;if(!a){if(a=U(e),a===null)throw Error("Unable to find node on an unmounted component.");return a!==e?null:e}for(var o=e,d=a;;){var y=o.return;if(y===null)break;var v=y.alternate;if(v===null){if(d=y.return,d!==null){o=d;continue}break}if(y.child===v.child){for(v=y.child;v;){if(v===o)return j(y),e;if(v===d)return j(y),a;v=v.sibling}throw Error("Unable to find node on an unmounted component.")}if(o.return!==d.return)o=y,d=v;else{for(var C=!1,M=y.child;M;){if(M===o){C=!0,o=y,d=v;break}if(M===d){C=!0,d=y,o=v;break}M=M.sibling}if(!C){for(M=v.child;M;){if(M===o){C=!0,o=v,d=y;break}if(M===d){C=!0,d=v,o=y;break}M=M.sibling}if(!C)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(o.alternate!==d)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(o.tag!==3)throw Error("Unable to find node on an unmounted component.");return o.stateNode.current===o?e:a}function F(e){return e=V(e),e!==null?W(e):null}function W(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=W(e),a!==null)return a;e=e.sibling}return null}function st(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(e.tag!==4&&(a=st(e),a!==null))return a;e=e.sibling}return null}function $(e){return e===null||typeof e!="object"?null:(e=mo&&e[mo]||e["@@iterator"],typeof e=="function"?e:null)}function tt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ru?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nu:return"Fragment";case Um:return"Profiler";case Ld:return"StrictMode";case Pd:return"Suspense";case Bm:return"SuspenseList";case xf:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Bl:return"Portal";case Rn:return e.displayName||"Context";case po:return(e._context.displayName||"Context")+".Consumer";case Sa:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ou:return a=e.displayName||null,a!==null?a:tt(e.type)||"Memo";case oi:a=e._payload,e=e._init;try{return tt(e(a))}catch{}}return null}function et(e){var a=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(a._context.displayName||"Context")+".Consumer";case 10:return a.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=a.render,e=e.displayName||e.name||"",a.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tt(a);case 8:return a===Ld?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;break;case 29:if(a=e._debugInfo,a!=null){for(var o=a.length-1;0<=o;o--)if(typeof a[o].name=="string")return a[o].name}if(e.return!==null)return et(e.return)}return null}function Tt(e){return{current:e}}function it(e,a){0>Yt?console.error("Unexpected pop."):(a!==Ot[Yt]&&console.error("Unexpected Fiber popped."),e.current=xt[Yt],xt[Yt]=null,Ot[Yt]=null,Yt--)}function ht(e,a,o){Yt++,xt[Yt]=e.current,Ot[Yt]=o,e.current=a}function dt(e){return e>>>=0,e===0?32:31-(Eo(e)/at|0)|0}function nt(e){var a=e&42;if(a!==0)return a;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 console.error("Should have found matching lanes. This is a bug in React."),e}}function H(e,a,o){var d=e.pendingLanes;if(d===0)return 0;var y=0,v=e.suspendedLanes,C=e.pingedLanes;e=e.warmLanes;var M=d&134217727;return M!==0?(d=M&~v,d!==0?y=nt(d):(C&=M,C!==0?y=nt(C):o||(o=M&~e,o!==0&&(y=nt(o))))):(M=d&~v,M!==0?y=nt(M):C!==0?y=nt(C):o||(o=d&~e,o!==0&&(y=nt(o)))),y===0?0:a!==0&&a!==y&&(a&v)===0&&(v=y&-y,o=a&-a,v>=o||v===32&&(o&4194048)!==0)?a:y}function J(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function K(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 console.error("Should have found matching lanes. This is a bug in React."),-1}}function mt(){var e=_t;return _t<<=1,(_t&62914560)===0&&(_t=4194304),e}function pt(e){for(var a=[],o=0;31>o;o++)a.push(e);return a}function I(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vt(e,a,o,d,y,v){var C=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var M=e.entanglements,B=e.expirationTimes,q=e.hiddenUpdates;for(o=C&~o;0<o;){var ut=31-Fn(o),ft=1<<ut;M[ut]=0,B[ut]=-1;var yt=q[ut];if(yt!==null)for(q[ut]=null,ut=0;ut<yt.length;ut++){var Vt=yt[ut];Vt!==null&&(Vt.lane&=-536870913)}o&=~ft}d!==0&&bt(e,d,0),v!==0&&y===0&&e.tag!==0&&(e.suspendedLanes|=v&~(C&~a))}function bt(e,a,o){e.pendingLanes|=a,e.suspendedLanes&=~a;var d=31-Fn(a);e.entangledLanes|=a,e.entanglements[d]=e.entanglements[d]|1073741824|o&261930}function jt(e,a){var o=e.entangledLanes|=a;for(e=e.entanglements;o;){var d=31-Fn(o),y=1<<d;y&a|e[d]&a&&(e[d]|=a),o&=~y}}function pe(e,a){var o=a&-a;return o=(o&42)!==0?1:An(o),(o&(e.suspendedLanes|a))!==0?0:o}function An(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Se(e,a,o){if(xr)for(e=e.pendingUpdatersLaneMap;0<o;){var d=31-Fn(o),y=1<<d;e[d].add(a),o&=~y}}function Qn(e,a){if(xr)for(var o=e.pendingUpdatersLaneMap,d=e.memoizedUpdaters;0<a;){var y=31-Fn(a);e=1<<y,y=o[y],0<y.size&&(y.forEach(function(v){var C=v.alternate;C!==null&&d.has(C)||d.add(v)}),y.clear()),a&=~e}}function We(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ze(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(a.isDisabled)return!0;if(!a.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{cp=a.inject(e),hi=a}catch(o){console.error("React instrumentation encountered an error: %o.",o)}return!!a.checkDCE}function Wt(e){if(typeof $G=="function"&&tj(e),hi&&typeof hi.setStrictMode=="function")try{hi.setStrictMode(cp,e)}catch(a){_r||(_r=!0,console.error("React instrumentation encountered an error: %o",a))}}function Bt(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}function Ce(e){for(var a=0,o=0;o<e.length;o++){var d=e[o];if(typeof d=="object"&&d!==null)if(jn(d)&&d.length===2&&typeof d[0]=="string"){if(a!==0&&a!==3)return 1;a=3}else return 1;else{if(typeof d=="function"||typeof d=="string"&&50<d.length||a!==0&&a!==2)return 1;a=2}}return a}function $n(e,a,o,d){for(var y in e)S3.call(e,y)&&y[0]!=="_"&&$e(y,e[y],a,o,d)}function $e(e,a,o,d,y){switch(typeof a){case"object":if(a===null){a="null";break}else{if(a.$$typeof===Ul){var v=tt(a.type)||"…",C=a.key;a=a.props;var M=Object.keys(a),B=M.length;if(C==null&&B===0){a="<"+v+" />";break}if(3>d||B===1&&M[0]==="children"&&C==null){a="<"+v+" … />";break}o.push([y+"  ".repeat(d)+e,"<"+v]),C!==null&&$e("key",C,o,d+1,y),e=!1;for(var q in a)q==="children"?a.children!=null&&(!jn(a.children)||0<a.children.length)&&(e=!0):S3.call(a,q)&&q[0]!=="_"&&$e(q,a[q],o,d+1,y);o.push(["",e?">…</"+v+">":"/>"]);return}if(v=Object.prototype.toString.call(a),v=v.slice(8,v.length-1),v==="Array"){if(q=Ce(a),q===2||q===0){a=JSON.stringify(a);break}else if(q===3){for(o.push([y+"  ".repeat(d)+e,""]),e=0;e<a.length;e++)v=a[e],$e(v[0],v[1],o,d+1,y);return}}if(v==="Promise"){if(a.status==="fulfilled"){if(v=o.length,$e(e,a.value,o,d,y),o.length>v){o=o[v],o[1]="Promise<"+(o[1]||"Object")+">";return}}else if(a.status==="rejected"&&(v=o.length,$e(e,a.reason,o,d,y),o.length>v)){o=o[v],o[1]="Rejected Promise<"+o[1]+">";return}o.push(["  ".repeat(d)+e,"Promise"]);return}v==="Object"&&(q=Object.getPrototypeOf(a))&&typeof q.constructor=="function"&&(v=q.constructor.name),o.push([y+"  ".repeat(d)+e,v==="Object"?3>d?"":"…":v]),3>d&&$n(a,o,d+1,y);return}case"function":a=a.name===""?"() => {}":a.name+"() {}";break;case"string":a=a==="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects."?"…":JSON.stringify(a);break;case"undefined":a="undefined";break;case"boolean":a=a?"true":"false";break;default:a=String(a)}o.push([y+"  ".repeat(d)+e,a])}function Wa(e,a,o,d){var y=!0;for(C in e)C in a||(o.push(["– "+"  ".repeat(d)+C,"…"]),y=!1);for(var v in a)if(v in e){var C=e[v],M=a[v];if(C!==M){if(d===0&&v==="children")y="  ".repeat(d)+v,o.push(["– "+y,"…"],["+ "+y,"…"]);else{if(!(3<=d)){if(typeof C=="object"&&typeof M=="object"&&C!==null&&M!==null&&C.$$typeof===M.$$typeof)if(M.$$typeof===Ul){if(C.type===M.type&&C.key===M.key){C=tt(M.type)||"…",y="  ".repeat(d)+v,C="<"+C+" … />",o.push(["– "+y,C],["+ "+y,C]),y=!1;continue}}else{var B=Object.prototype.toString.call(C),q=Object.prototype.toString.call(M);if(B===q&&(q==="[object Object]"||q==="[object Array]")){B=["  "+"  ".repeat(d)+v,q==="[object Array]"?"Array":""],o.push(B),q=o.length,Wa(C,M,o,d+1)?q===o.length&&(B[1]="Referentially unequal but deeply equal objects. Consider memoization."):y=!1;continue}}else if(typeof C=="function"&&typeof M=="function"&&C.name===M.name&&C.length===M.length&&(B=Function.prototype.toString.call(C),q=Function.prototype.toString.call(M),B===q)){C=M.name===""?"() => {}":M.name+"() {}",o.push(["  "+"  ".repeat(d)+v,C+" Referentially unequal function closure. Consider memoization."]);continue}}$e(v,C,o,d,"– "),$e(v,M,o,d,"+ ")}y=!1}}else o.push(["+ "+"  ".repeat(d)+v,"…"]),y=!1;return y}function tn(e){me=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function ha(e,a,o,d){ln&&(qu.start=a,qu.end=o,To.color="warning",To.tooltipText=d,To.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,d,qu)):performance.measure(d,qu))}function Ds(e,a,o){ha(e,a,o,"Reconnect")}function $a(e,a,o,d,y){var v=et(e);if(v!==null&&ln){var C=e.alternate,M=e.actualDuration;if(C===null||C.child!==e.child)for(var B=e.child;B!==null;B=B.sibling)M-=B.actualDuration;d=.5>M?d?"tertiary-light":"primary-light":10>M?d?"tertiary":"primary":100>M?d?"tertiary-dark":"primary-dark":"error";var q=e.memoizedProps;M=e._debugTask,q!==null&&C!==null&&C.memoizedProps!==q?(B=[aj],q=Wa(C.memoizedProps,q,B,0),1<B.length&&(q&&!Yu&&(C.lanes&y)===0&&100<e.actualDuration?(Yu=!0,B[0]=ij,To.color="warning",To.tooltipText="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."):(To.color=d,To.tooltipText=v),To.properties=B,qu.start=a,qu.end=o,M!=null?M.run(performance.measure.bind(performance,"​"+v,qu)):performance.measure("​"+v,qu))):M!=null?M.run(console.timeStamp.bind(console,v,a,o,"Components ⚛",void 0,d)):console.timeStamp(v,a,o,"Components ⚛",void 0,d)}}function As(e,a,o,d){if(ln){var y=et(e);if(y!==null){for(var v=null,C=[],M=0;M<d.length;M++){var B=d[M];v==null&&B.source!==null&&(v=B.source._debugTask),B=B.value,C.push(["Error",typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B)])}e.key!==null&&$e("key",e.key,C,0,""),e.memoizedProps!==null&&$n(e.memoizedProps,C,0,""),v==null&&(v=e._debugTask),e={start:a,end:o,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:C}}},v?v.run(performance.measure.bind(performance,"​"+y,e)):performance.measure("​"+y,e)}}}function Mn(e,a,o,d,y){if(y!==null){if(ln){var v=et(e);if(v!==null){d=[];for(var C=0;C<y.length;C++){var M=y[C].value;d.push(["Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e.key!==null&&$e("key",e.key,d,0,""),e.memoizedProps!==null&&$n(e.memoizedProps,d,0,""),a={start:a,end:o,detail:{devtools:{color:"error",track:"Components ⚛",tooltipText:"A lifecycle or effect errored",properties:d}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,"​"+v,a)):performance.measure("​"+v,a)}}}else v=et(e),v!==null&&ln&&(y=1>d?"secondary-light":100>d?"secondary":500>d?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,v,a,o,"Components ⚛",void 0,y)):console.timeStamp(v,a,o,"Components ⚛",void 0,y))}function gn(e,a,o,d){if(ln&&!(a<=e)){var y=(o&738197653)===o?"tertiary-dark":"primary-dark";o=(o&536870912)===o?"Prepared":(o&201326741)===o?"Hydrated":"Render",d?d.run(console.timeStamp.bind(console,o,e,a,me,"Scheduler ⚛",y)):console.timeStamp(o,e,a,me,"Scheduler ⚛",y)}}function mi(e,a,o,d){!ln||a<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Prewarm",e,a,me,"Scheduler ⚛",o)):console.timeStamp("Prewarm",e,a,me,"Scheduler ⚛",o))}function Ht(e,a,o,d){!ln||a<=e||(o=(o&738197653)===o?"tertiary-dark":"primary-dark",d?d.run(console.timeStamp.bind(console,"Suspended",e,a,me,"Scheduler ⚛",o)):console.timeStamp("Suspended",e,a,me,"Scheduler ⚛",o))}function De(e,a,o,d,y,v){if(ln&&!(a<=e)){o=[];for(var C=0;C<d.length;C++){var M=d[C].value;o.push(["Recoverable Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e={start:e,end:a,detail:{devtools:{color:"primary-dark",track:me,trackGroup:"Scheduler ⚛",tooltipText:y?"Hydration Failed":"Recovered after Error",properties:o}}},v?v.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function da(e,a,o,d){!ln||a<=e||(d?d.run(console.timeStamp.bind(console,"Errored",e,a,me,"Scheduler ⚛","error")):console.timeStamp("Errored",e,a,me,"Scheduler ⚛","error"))}function Va(e,a,o,d){!ln||a<=e||(d?d.run(console.timeStamp.bind(console,o,e,a,me,"Scheduler ⚛","secondary-light")):console.timeStamp(o,e,a,me,"Scheduler ⚛","secondary-light"))}function Ye(e,a,o,d,y){if(ln&&!(a<=e)){for(var v=[],C=0;C<o.length;C++){var M=o[C].value;v.push(["Error",typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M)])}e={start:e,end:a,detail:{devtools:{color:"error",track:me,trackGroup:"Scheduler ⚛",tooltipText:d?"Remaining Effects Errored":"Commit Errored",properties:v}}},y?y.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function ta(){}function Ms(){if(Qm===0){V9=console.log,G9=console.info,j9=console.warn,L9=console.error,P9=console.group,Y9=console.groupCollapsed,q9=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ta,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Qm++}function er(){if(Qm--,Qm===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Me({},e,{value:V9}),info:Me({},e,{value:G9}),warn:Me({},e,{value:j9}),error:Me({},e,{value:L9}),group:Me({},e,{value:P9}),groupCollapsed:Me({},e,{value:Y9}),groupEnd:Me({},e,{value:q9})})}0>Qm&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Cc(e){var a=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=a,e.startsWith(`Error: react-stack-top-frame
27
27
  `)&&(e=e.slice(29)),a=e.indexOf(`
28
28
  `),a!==-1&&(e=e.slice(a+1)),a=e.indexOf("react_stack_bottom_frame"),a!==-1&&(a=e.lastIndexOf(`
29
- `,a)),a!==-1)e=e.slice(0,a);else return"";return e}function da(e){if(b3===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);b3=a&&a[1]||"",q9=-1<o.stack.indexOf(`
29
+ `,a)),a!==-1)e=e.slice(0,a);else return"";return e}function Ca(e){if(b3===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);b3=a&&a[1]||"",X9=-1<o.stack.indexOf(`
30
30
  at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
31
- `+b3+e+q9}function Pr(e,a){if(!e||E3)return"";var o=T3.get(e);if(o!==void 0)return o;E3=!0,o=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var d=null;d=rt.H,rt.H=null,eu();try{var y={DetermineComponentFrameRoot:function(){try{if(a){var yt=function(){throw Error()};if(Object.defineProperty(yt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(yt,[])}catch(Jt){var Vt=Jt}Reflect.construct(e,[],yt)}else{try{yt.call()}catch(Jt){Vt=Jt}e.call(yt.prototype)}}else{try{throw Error()}catch(Jt){Vt=Jt}(yt=e())&&typeof yt.catch=="function"&&yt.catch(function(){})}}catch(Jt){if(Jt&&Vt&&typeof Jt.stack=="string")return[Jt.stack,Vt.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=y.DetermineComponentFrameRoot(),M=C[0],B=C[1];if(M&&B){var q=M.split(`
32
- `),ct=B.split(`
33
- `);for(C=v=0;v<q.length&&!q[v].includes("DetermineComponentFrameRoot");)v++;for(;C<ct.length&&!ct[C].includes("DetermineComponentFrameRoot");)C++;if(v===q.length||C===ct.length)for(v=q.length-1,C=ct.length-1;1<=v&&0<=C&&q[v]!==ct[C];)C--;for(;1<=v&&0<=C;v--,C--)if(q[v]!==ct[C]){if(v!==1||C!==1)do if(v--,C--,0>C||q[v]!==ct[C]){var ht=`
34
- `+q[v].replace(" at new "," at ");return e.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",e.displayName)),typeof e=="function"&&T3.set(e,ht),ht}while(1<=v&&0<=C);break}}}finally{E3=!1,rt.H=d,Lr(),Error.prepareStackTrace=o}return q=(q=e?e.displayName||e.name:"")?da(q):"",typeof e=="function"&&T3.set(e,q),q}function Cg(e,a){switch(e.tag){case 26:case 27:case 5:return da(e.type);case 16:return da("Lazy");case 13:return e.child!==a&&a!==null?da("Suspense Fallback"):da("Suspense");case 19:return da("SuspenseList");case 0:case 15:return Pr(e.type,!1);case 11:return Pr(e.type.render,!1);case 1:return Pr(e.type,!0);case 31:return da("Activity");default:return""}}function Yr(e){try{var a="",o=null;do{a+=Cg(e,o);var d=e._debugInfo;if(d)for(var y=d.length-1;0<=y;y--){var v=d[y];if(typeof v.name=="string"){var C=a;t:{var M=v.name,B=v.env,q=v.debugLocation;if(q!=null){var ct=nu(q),ht=ct.lastIndexOf(`
35
- `),yt=ht===-1?ct:ct.slice(ht+1);if(yt.indexOf(M)!==-1){var Vt=`
36
- `+yt;break t}}Vt=da(M+(B?" ["+B+"]":""))}a=C+Vt}}o=e,e=e.return}while(e);return a}catch(Jt){return`
31
+ `+b3+e+X9}function qr(e,a){if(!e||E3)return"";var o=T3.get(e);if(o!==void 0)return o;E3=!0,o=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var d=null;d=lt.H,lt.H=null,Ms();try{var y={DetermineComponentFrameRoot:function(){try{if(a){var yt=function(){throw Error()};if(Object.defineProperty(yt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(yt,[])}catch(Jt){var Vt=Jt}Reflect.construct(e,[],yt)}else{try{yt.call()}catch(Jt){Vt=Jt}e.call(yt.prototype)}}else{try{throw Error()}catch(Jt){Vt=Jt}(yt=e())&&typeof yt.catch=="function"&&yt.catch(function(){})}}catch(Jt){if(Jt&&Vt&&typeof Jt.stack=="string")return[Jt.stack,Vt.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=y.DetermineComponentFrameRoot(),M=C[0],B=C[1];if(M&&B){var q=M.split(`
32
+ `),ut=B.split(`
33
+ `);for(C=v=0;v<q.length&&!q[v].includes("DetermineComponentFrameRoot");)v++;for(;C<ut.length&&!ut[C].includes("DetermineComponentFrameRoot");)C++;if(v===q.length||C===ut.length)for(v=q.length-1,C=ut.length-1;1<=v&&0<=C&&q[v]!==ut[C];)C--;for(;1<=v&&0<=C;v--,C--)if(q[v]!==ut[C]){if(v!==1||C!==1)do if(v--,C--,0>C||q[v]!==ut[C]){var ft=`
34
+ `+q[v].replace(" at new "," at ");return e.displayName&&ft.includes("<anonymous>")&&(ft=ft.replace("<anonymous>",e.displayName)),typeof e=="function"&&T3.set(e,ft),ft}while(1<=v&&0<=C);break}}}finally{E3=!1,lt.H=d,er(),Error.prepareStackTrace=o}return q=(q=e?e.displayName||e.name:"")?Ca(q):"",typeof e=="function"&&T3.set(e,q),q}function Rh(e,a){switch(e.tag){case 26:case 27:case 5:return Ca(e.type);case 16:return Ca("Lazy");case 13:return e.child!==a&&a!==null?Ca("Suspense Fallback"):Ca("Suspense");case 19:return Ca("SuspenseList");case 0:case 15:return qr(e.type,!1);case 11:return qr(e.type.render,!1);case 1:return qr(e.type,!0);case 31:return Ca("Activity");default:return""}}function _c(e){try{var a="",o=null;do{a+=Rh(e,o);var d=e._debugInfo;if(d)for(var y=d.length-1;0<=y;y--){var v=d[y];if(typeof v.name=="string"){var C=a;t:{var M=v.name,B=v.env,q=v.debugLocation;if(q!=null){var ut=Cc(q),ft=ut.lastIndexOf(`
35
+ `),yt=ft===-1?ut:ut.slice(ft+1);if(yt.indexOf(M)!==-1){var Vt=`
36
+ `+yt;break t}}Vt=Ca(M+(B?" ["+B+"]":""))}a=C+Vt}}o=e,e=e.return}while(e);return a}catch(Jt){return`
37
37
  Error generating stack: `+Jt.message+`
38
- `+Jt.stack}}function au(e){return(e=e?e.displayName||e.name:"")?da(e):""}function Ht(e,a){if(typeof e=="object"&&e!==null){var o=C3.get(e);return o!==void 0?o:(a={value:e,source:a,stack:Yr(a)},C3.set(e,a),a)}return{value:e,source:a,stack:Yr(a)}}function ge(e,a){fl(),up[cp++]=Qm,up[cp++]=By,By=e,Qm=a}function qr(e,a,o){fl(),Fs[ks++]=Co,Fs[ks++]=_o,Fs[ks++]=Hf,Hf=e;var d=Co;e=_o;var y=32-kn(d)-1;d&=~(1<<y),o+=1;var v=32-kn(a)+y;if(30<v){var C=y-y%5;v=(d&(1<<C)-1).toString(32),d>>=C,y-=C,Co=1<<32-kn(a)+y|o<<y|d,_o=v+e}else Co=1<<v|o<<y|d,_o=e}function Wl(e){fl(),e.return!==null&&(ge(e,1),qr(e,1,0))}function Nh(e){for(;e===By;)By=up[--cp],up[cp]=null,Qm=up[--cp],up[cp]=null;for(;e===Hf;)Hf=Fs[--ks],Fs[ks]=null,_o=Fs[--ks],Fs[ks]=null,Co=Fs[--ks],Fs[ks]=null}function _c(){return fl(),Hf!==null?{id:Co,overflow:_o}:null}function O0(e,a){fl(),Fs[ks++]=Co,Fs[ks++]=_o,Fs[ks++]=Hf,Co=a.id,_o=a.overflow,Hf=e}function fl(){he||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Wa(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function xc(e,a){dt(Zu,a,e),dt(Zm,e,e),dt(Qu,null,e),a=qs(a),lt(Qu,e),dt(Qu,a,e)}function Xr(e){lt(Qu,e),lt(Zm,e),lt(Zu,e)}function pi(){return Wa(Qu.current)}function Kr(e){e.memoizedState!==null&&dt(Vy,e,e);var a=Wa(Qu.current),o=ba(a,e.type);a!==o&&(dt(Zm,e,e),dt(Qu,o,e))}function Qr(e){Zm.current===e&&(lt(Qu,e),lt(Zm,e)),Vy.current===e&&(lt(Vy,e),Ka?ji._currentValue=Gi:ji._currentValue2=Gi)}function R0(e,a){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-a?R0(e.children[0],a):e}function Ca(e){return" "+" ".repeat(e)}function hl(e){return"+ "+" ".repeat(e)}function dl(e){return"- "+" ".repeat(e)}function $l(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function iu(e,a){return X9.test(e)?(e=JSON.stringify(e),e.length>a-2?8>a?'{"..."}':"{"+e.slice(0,a-7)+'..."}':"{"+e+"}"):e.length>a?5>a?'{"..."}':e.slice(0,a-3)+"...":e}function Zr(e,a,o){var d=120-2*o;if(a===null)return hl(o)+iu(e,d)+`
39
- `;if(typeof a=="string"){for(var y=0;y<a.length&&y<e.length&&a.charCodeAt(y)===e.charCodeAt(y);y++);return y>d-8&&10<y&&(e="..."+e.slice(y-8),a="..."+a.slice(y-8)),hl(o)+iu(e,d)+`
40
- `+dl(o)+iu(a,d)+`
41
- `}return Ca(o)+iu(e,d)+`
42
- `}function Dc(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(a,o){return o})}function Jr(e,a){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>a?5>a?'"..."':e.slice(0,a-4)+'..."':e;case"object":if(e===null)return"null";if(Pn(e))return"[...]";if(e.$$typeof===Rl)return(a=et(e.type))?"<"+a+">":"<...>";var o=Dc(e);if(o==="Object"){o="",a-=2;for(var d in e)if(e.hasOwnProperty(d)){var y=JSON.stringify(d);if(y!=='"'+d+'"'&&(d=y),a-=d.length-2,y=Jr(e[d],15>a?a:15),a-=y.length,0>a){o+=o===""?"...":", ...";break}o+=(o===""?"":",")+d+":"+y}return"{"+o+"}"}return o;case"function":return(a=e.displayName||e.name)?"function "+a:"function";default:return String(e)}}function mi(e,a){return typeof e!="string"||X9.test(e)?"{"+Jr(e,a-2)+"}":e.length>a-2?5>a?'"..."':'"'+e.slice(0,a-5)+'..."':'"'+e+'"'}function Ds(e,a,o){var d=120-o.length-e.length,y=[],v;for(v in a)if(a.hasOwnProperty(v)&&v!=="children"){var C=mi(a[v],120-o.length-v.length-1);d-=v.length+C.length+2,y.push(v+"="+C)}return y.length===0?o+"<"+e+`>
38
+ `+Jt.stack}}function xc(e){return(e=e?e.displayName||e.name:"")?Ca(e):""}function ea(e,a){if(typeof e=="object"&&e!==null){var o=C3.get(e);return o!==void 0?o:(a={value:e,source:a,stack:_c(a)},C3.set(e,a),a)}return{value:e,source:a,stack:_c(a)}}function Ut(e,a){ml(),fp[hp++]=Zm,fp[hp++]=By,By=e,Zm=a}function He(e,a,o){ml(),Ws[$s++]=Co,Ws[$s++]=_o,Ws[$s++]=Uf,Uf=e;var d=Co;e=_o;var y=32-Fn(d)-1;d&=~(1<<y),o+=1;var v=32-Fn(a)+y;if(30<v){var C=y-y%5;v=(d&(1<<C)-1).toString(32),d>>=C,y-=C,Co=1<<32-Fn(a)+y|o<<y|d,_o=v+e}else Co=1<<v|o<<y|d,_o=e}function pl(e){ml(),e.return!==null&&(Ut(e,1),He(e,1,0))}function eu(e){for(;e===By;)By=fp[--hp],fp[hp]=null,Zm=fp[--hp],fp[hp]=null;for(;e===Uf;)Uf=Ws[--$s],Ws[$s]=null,_o=Ws[--$s],Ws[$s]=null,Co=Ws[--$s],Ws[$s]=null}function Dc(){return ml(),Uf!==null?{id:Co,overflow:_o}:null}function R0(e,a){ml(),Ws[$s++]=Co,Ws[$s++]=_o,Ws[$s++]=Uf,Co=a.id,_o=a.overflow,Uf=e}function ml(){fe||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function ti(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function Ac(e,a){ht(Ku,a,e),ht(Jm,e,e),ht(Xu,null,e),a=Qs(a),it(Xu,e),ht(Xu,a,e)}function Xr(e){it(Xu,e),it(Jm,e),it(Ku,e)}function gi(){return ti(Xu.current)}function Kr(e){e.memoizedState!==null&&ht(Vy,e,e);var a=ti(Xu.current),o=ba(a,e.type);a!==o&&(ht(Jm,e,e),ht(Xu,o,e))}function Qr(e){Jm.current===e&&(it(Xu,e),it(Jm,e)),Vy.current===e&&(it(Vy,e),Ka?Pi._currentValue=Li:Pi._currentValue2=Li)}function z0(e,a){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-a?z0(e.children[0],a):e}function _a(e){return" "+" ".repeat(e)}function gl(e){return"+ "+" ".repeat(e)}function yl(e){return"- "+" ".repeat(e)}function nr(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function nu(e,a){return K9.test(e)?(e=JSON.stringify(e),e.length>a-2?8>a?'{"..."}':"{"+e.slice(0,a-7)+'..."}':"{"+e+"}"):e.length>a?5>a?'{"..."}':e.slice(0,a-3)+"...":e}function Zr(e,a,o){var d=120-2*o;if(a===null)return gl(o)+nu(e,d)+`
39
+ `;if(typeof a=="string"){for(var y=0;y<a.length&&y<e.length&&a.charCodeAt(y)===e.charCodeAt(y);y++);return y>d-8&&10<y&&(e="..."+e.slice(y-8),a="..."+a.slice(y-8)),gl(o)+nu(e,d)+`
40
+ `+yl(o)+nu(a,d)+`
41
+ `}return _a(o)+nu(e,d)+`
42
+ `}function Mc(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(a,o){return o})}function Jr(e,a){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>a?5>a?'"..."':e.slice(0,a-4)+'..."':e;case"object":if(e===null)return"null";if(jn(e))return"[...]";if(e.$$typeof===Ul)return(a=tt(e.type))?"<"+a+">":"<...>";var o=Mc(e);if(o==="Object"){o="",a-=2;for(var d in e)if(e.hasOwnProperty(d)){var y=JSON.stringify(d);if(y!=='"'+d+'"'&&(d=y),a-=d.length-2,y=Jr(e[d],15>a?a:15),a-=y.length,0>a){o+=o===""?"...":", ...";break}o+=(o===""?"":",")+d+":"+y}return"{"+o+"}"}return o;case"function":return(a=e.displayName||e.name)?"function "+a:"function";default:return String(e)}}function yi(e,a){return typeof e!="string"||K9.test(e)?"{"+Jr(e,a-2)+"}":e.length>a-2?5>a?'"..."':'"'+e.slice(0,a-5)+'..."':'"'+e+'"'}function Ns(e,a,o){var d=120-o.length-e.length,y=[],v;for(v in a)if(a.hasOwnProperty(v)&&v!=="children"){var C=yi(a[v],120-o.length-v.length-1);d-=v.length+C.length+2,y.push(v+"="+C)}return y.length===0?o+"<"+e+`>
43
43
  `:0<d?o+"<"+e+" "+y.join(" ")+`>
44
44
  `:o+"<"+e+`
45
45
  `+o+" "+y.join(`
46
46
  `+o+" ")+`
47
47
  `+o+`>
48
- `}function Ac(e,a,o){var d="",y=Me({},a),v;for(v in e)if(e.hasOwnProperty(v)){delete y[v];var C=120-2*o-v.length-2,M=Jr(e[v],C);a.hasOwnProperty(v)?(C=Jr(a[v],C),d+=hl(o)+v+": "+M+`
49
- `,d+=dl(o)+v+": "+C+`
50
- `):d+=hl(o)+v+": "+M+`
51
- `}for(var B in y)y.hasOwnProperty(B)&&(e=Jr(y[B],120-2*o-B.length-2),d+=dl(o)+B+": "+e+`
52
- `);return d}function z0(e,a,o,d){var y="",v=new Map;for(q in o)o.hasOwnProperty(q)&&v.set(q.toLowerCase(),q);if(v.size===1&&v.has("children"))y+=Ds(e,a,Ca(d));else{for(var C in a)if(a.hasOwnProperty(C)&&C!=="children"){var M=120-2*(d+1)-C.length-1,B=v.get(C.toLowerCase());if(B!==void 0){v.delete(C.toLowerCase());var q=a[C];B=o[B];var ct=mi(q,M);M=mi(B,M),typeof q=="object"&&q!==null&&typeof B=="object"&&B!==null&&Dc(q)==="Object"&&Dc(B)==="Object"&&(2<Object.keys(q).length||2<Object.keys(B).length||-1<ct.indexOf("...")||-1<M.indexOf("..."))?y+=Ca(d+1)+C+`={{
53
- `+Ac(q,B,d+2)+Ca(d+1)+`}}
54
- `:(y+=hl(d+1)+C+"="+ct+`
55
- `,y+=dl(d+1)+C+"="+M+`
56
- `)}else y+=Ca(d+1)+C+"="+mi(a[C],M)+`
57
- `}v.forEach(function(ht){if(ht!=="children"){var yt=120-2*(d+1)-ht.length-1;y+=dl(d+1)+ht+"="+mi(o[ht],yt)+`
58
- `}}),y=y===""?Ca(d)+"<"+e+`>
59
- `:Ca(d)+"<"+e+`
60
- `+y+Ca(d)+`>
61
- `}return e=o.children,a=a.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(v="",(typeof a=="string"||typeof a=="number"||typeof a=="bigint")&&(v=""+a),y+=Zr(v,""+e,d+1)):(typeof a=="string"||typeof a=="number"||typeof a=="bigint")&&(y=e==null?y+Zr(""+a,null,d+1):y+Zr(""+a,void 0,d+1)),y}function su(e,a){var o=$l(e);if(o===null){for(o="",e=e.child;e;)o+=su(e,a),e=e.sibling;return o}return Ca(a)+"<"+o+`>
62
- `}function Fr(e,a){var o=R0(e,a);if(o!==e&&(e.children.length!==1||e.children[0]!==o))return Ca(a)+`...
63
- `+Fr(o,a+1);o="";var d=e.fiber._debugInfo;if(d)for(var y=0;y<d.length;y++){var v=d[y].name;typeof v=="string"&&(o+=Ca(a)+"<"+v+`>
64
- `,a++)}if(d="",y=e.fiber.pendingProps,e.fiber.tag===6)d=Zr(y,e.serverProps,a),a++;else if(v=$l(e.fiber),v!==null)if(e.serverProps===void 0){d=a;var C=120-2*d-v.length-2,M="";for(q in y)if(y.hasOwnProperty(q)&&q!=="children"){var B=mi(y[q],15);if(C-=q.length+B.length+2,0>C){M+=" ...";break}M+=" "+q+"="+B}d=Ca(d)+"<"+v+M+`>
65
- `,a++}else e.serverProps===null?(d=Ds(v,y,hl(a)),a++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(d=z0(v,y,e.serverProps,a),a++);var q="";for(y=e.fiber.child,v=0;y&&v<e.children.length;)C=e.children[v],C.fiber===y?(q+=Fr(C,a),v++):q+=su(y,a),y=y.sibling;for(y&&0<e.children.length&&(q+=Ca(a)+`...
66
- `),y=e.serverTail,e.serverProps===null&&a--,e=0;e<y.length;e++)v=y[e],q=typeof v=="string"?q+(dl(a)+iu(v,120-2*a)+`
67
- `):q+Ds(v.type,v.props,dl(a));return o+d+q}function H0(e){try{return`
68
-
69
- `+Fr(e,0)}catch{return""}}function _g(){if(xo===null)return"";var e=xo;try{var a="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:a+=da(e.type);break;case 13:a+=da("Suspense");break;case 19:a+=da("SuspenseList");break;case 31:a+=da("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||a!==""||(a+=au(e.type));break;case 11:e._debugOwner||a!==""||(a+=au(e.type.render))}for(;e;)if(typeof e.tag=="number"){var o=e;e=o._debugOwner;var d=o._debugStack;if(e&&d){var y=nu(d);y!==""&&(a+=`
48
+ `}function Nc(e,a,o){var d="",y=Me({},a),v;for(v in e)if(e.hasOwnProperty(v)){delete y[v];var C=120-2*o-v.length-2,M=Jr(e[v],C);a.hasOwnProperty(v)?(C=Jr(a[v],C),d+=gl(o)+v+": "+M+`
49
+ `,d+=yl(o)+v+": "+C+`
50
+ `):d+=gl(o)+v+": "+M+`
51
+ `}for(var B in y)y.hasOwnProperty(B)&&(e=Jr(y[B],120-2*o-B.length-2),d+=yl(o)+B+": "+e+`
52
+ `);return d}function H0(e,a,o,d){var y="",v=new Map;for(q in o)o.hasOwnProperty(q)&&v.set(q.toLowerCase(),q);if(v.size===1&&v.has("children"))y+=Ns(e,a,_a(d));else{for(var C in a)if(a.hasOwnProperty(C)&&C!=="children"){var M=120-2*(d+1)-C.length-1,B=v.get(C.toLowerCase());if(B!==void 0){v.delete(C.toLowerCase());var q=a[C];B=o[B];var ut=yi(q,M);M=yi(B,M),typeof q=="object"&&q!==null&&typeof B=="object"&&B!==null&&Mc(q)==="Object"&&Mc(B)==="Object"&&(2<Object.keys(q).length||2<Object.keys(B).length||-1<ut.indexOf("...")||-1<M.indexOf("..."))?y+=_a(d+1)+C+`={{
53
+ `+Nc(q,B,d+2)+_a(d+1)+`}}
54
+ `:(y+=gl(d+1)+C+"="+ut+`
55
+ `,y+=yl(d+1)+C+"="+M+`
56
+ `)}else y+=_a(d+1)+C+"="+yi(a[C],M)+`
57
+ `}v.forEach(function(ft){if(ft!=="children"){var yt=120-2*(d+1)-ft.length-1;y+=yl(d+1)+ft+"="+yi(o[ft],yt)+`
58
+ `}}),y=y===""?_a(d)+"<"+e+`>
59
+ `:_a(d)+"<"+e+`
60
+ `+y+_a(d)+`>
61
+ `}return e=o.children,a=a.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(v="",(typeof a=="string"||typeof a=="number"||typeof a=="bigint")&&(v=""+a),y+=Zr(v,""+e,d+1)):(typeof a=="string"||typeof a=="number"||typeof a=="bigint")&&(y=e==null?y+Zr(""+a,null,d+1):y+Zr(""+a,void 0,d+1)),y}function au(e,a){var o=nr(e);if(o===null){for(o="",e=e.child;e;)o+=au(e,a),e=e.sibling;return o}return _a(a)+"<"+o+`>
62
+ `}function Fr(e,a){var o=z0(e,a);if(o!==e&&(e.children.length!==1||e.children[0]!==o))return _a(a)+`...
63
+ `+Fr(o,a+1);o="";var d=e.fiber._debugInfo;if(d)for(var y=0;y<d.length;y++){var v=d[y].name;typeof v=="string"&&(o+=_a(a)+"<"+v+`>
64
+ `,a++)}if(d="",y=e.fiber.pendingProps,e.fiber.tag===6)d=Zr(y,e.serverProps,a),a++;else if(v=nr(e.fiber),v!==null)if(e.serverProps===void 0){d=a;var C=120-2*d-v.length-2,M="";for(q in y)if(y.hasOwnProperty(q)&&q!=="children"){var B=yi(y[q],15);if(C-=q.length+B.length+2,0>C){M+=" ...";break}M+=" "+q+"="+B}d=_a(d)+"<"+v+M+`>
65
+ `,a++}else e.serverProps===null?(d=Ns(v,y,gl(a)),a++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(d=H0(v,y,e.serverProps,a),a++);var q="";for(y=e.fiber.child,v=0;y&&v<e.children.length;)C=e.children[v],C.fiber===y?(q+=Fr(C,a),v++):q+=au(y,a),y=y.sibling;for(y&&0<e.children.length&&(q+=_a(a)+`...
66
+ `),y=e.serverTail,e.serverProps===null&&a--,e=0;e<y.length;e++)v=y[e],q=typeof v=="string"?q+(yl(a)+nu(v,120-2*a)+`
67
+ `):q+Ns(v.type,v.props,yl(a));return o+d+q}function w0(e){try{return`
68
+
69
+ `+Fr(e,0)}catch{return""}}function _g(){if(xo===null)return"";var e=xo;try{var a="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:a+=Ca(e.type);break;case 13:a+=Ca("Suspense");break;case 19:a+=Ca("SuspenseList");break;case 31:a+=Ca("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||a!==""||(a+=xc(e.type));break;case 11:e._debugOwner||a!==""||(a+=xc(e.type.render))}for(;e;)if(typeof e.tag=="number"){var o=e;e=o._debugOwner;var d=o._debugStack;if(e&&d){var y=Cc(d);y!==""&&(a+=`
70
70
  `+y)}}else if(e.debugStack!=null){var v=e.debugStack;(e=e.owner)&&v&&(a+=`
71
- `+nu(v))}else break;var C=a}catch(M){C=`
71
+ `+Cc(v))}else break;var C=a}catch(M){C=`
72
72
  Error generating stack: `+M.message+`
73
- `+M.stack}return C}function Bt(e,a,o,d,y,v,C){var M=xo;Mc(e);try{return e!==null&&e._debugTask?e._debugTask.run(a.bind(null,o,d,y,v,C)):a(o,d,y,v,C)}finally{Mc(M)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Mc(e){rt.getCurrentStack=e===null?null:_g,Cr=!1,xo=e}function pl(e,a){if(e.return===null){if(ms===null)ms={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:a};else{if(ms.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ms.distanceFromLeaf>a&&(ms.distanceFromLeaf=a)}return ms}var o=pl(e.return,a+1).children;return 0<o.length&&o[o.length-1].fiber===e?(o=o[o.length-1],o.distanceFromLeaf>a&&(o.distanceFromLeaf=a),o):(a={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:a},o.push(a),a)}function ml(){he&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function lu(e,a){_r||(e=pl(e,0),e.serverProps=null,a!==null&&(a=Yu(a),e.serverTail.push(a)))}function As(e){var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,o="",d=ms;throw d!==null&&(ms=null,o=H0(d)),ru(Ht(Error("Hydration failed because the server rendered "+(a?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
73
+ `+M.stack}return C}function wt(e,a,o,d,y,v,C){var M=xo;Oc(e);try{return e!==null&&e._debugTask?e._debugTask.run(a.bind(null,o,d,y,v,C)):a(o,d,y,v,C)}finally{Oc(M)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Oc(e){lt.getCurrentStack=e===null?null:_g,Dr=!1,xo=e}function vl(e,a){if(e.return===null){if(ms===null)ms={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:a};else{if(ms.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ms.distanceFromLeaf>a&&(ms.distanceFromLeaf=a)}return ms}var o=vl(e.return,a+1).children;return 0<o.length&&o[o.length-1].fiber===e?(o=o[o.length-1],o.distanceFromLeaf>a&&(o.distanceFromLeaf=a),o):(a={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:a},o.push(a),a)}function Sl(){fe&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function iu(e,a){Ar||(e=vl(e,0),e.serverProps=null,a!==null&&(a=Lu(a),e.serverTail.push(a)))}function Os(e){var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,o="",d=ms;throw d!==null&&(ms=null,o=w0(d)),su(ea(Error("Hydration failed because the server rendered "+(a?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
74
74
 
75
75
  - A server/client branch \`if (typeof window !== 'undefined')\`.
76
76
  - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
@@ -80,7 +80,7 @@ Error generating stack: `+M.message+`
80
80
 
81
81
  It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
82
82
 
83
- https://react.dev/link/hydration-mismatch`+o),e)),_3}function gl(e,a){if(!Na)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");oe(e.stateNode,e.type,e.memoizedProps,a,e)||As(e,!0)}function $a(e){for(Qa=e.return;Qa;)switch(Qa.tag){case 5:case 31:case 13:Is=!1;return;case 27:case 3:Is=!0;return;default:Qa=Qa.return}}function yl(e){if(!Na||e!==Qa)return!1;if(!he)return $a(e),he=!0,!1;var a=e.tag;if(T?a!==3&&a!==27&&(a!==5||ap(e.type)&&!se(e.type,e.memoizedProps))&&vn&&(un(e),As(e)):a!==3&&(a!==5||ap(e.type)&&!se(e.type,e.memoizedProps))&&vn&&(un(e),As(e)),$a(e),a===13){if(!Na)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");vn=So(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");vn=yr(e)}else vn=T&&a===27?y3(e.type,vn):Qa?gr(e.stateNode):null;return!0}function un(e){for(var a=vn;a;){var o=pl(e,0),d=Yu(a);o.serverTail.push(d),a=d.type==="Suspense"?So(a):gr(a)}}function vl(){Na&&(vn=Qa=null,_r=he=!1)}function Nc(){var e=Ju;return e!==null&&(Di===null?Di=e:Di.push.apply(Di,e),Ju=null),e}function ru(e){Ju===null?Ju=[e]:Ju.push(e)}function Oh(){var e=ms;if(e!==null){ms=null;for(var a=H0(e);0<e.children.length;)e=e.children[0];Bt(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
83
+ https://react.dev/link/hydration-mismatch`+o),e)),_3}function bl(e,a){if(!Oa)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");oe(e.stateNode,e.type,e.memoizedProps,a,e)||Os(e,!0)}function ei(e){for(Qa=e.return;Qa;)switch(Qa.tag){case 5:case 31:case 13:tl=!1;return;case 27:case 3:tl=!0;return;default:Qa=Qa.return}}function El(e){if(!Oa||e!==Qa)return!1;if(!fe)return ei(e),fe=!0,!1;var a=e.tag;if(T?a!==3&&a!==27&&(a!==5||sp(e.type)&&!le(e.type,e.memoizedProps))&&Sn&&(cn(e),Os(e)):a!==3&&(a!==5||sp(e.type)&&!le(e.type,e.memoizedProps))&&Sn&&(cn(e),Os(e)),ei(e),a===13){if(!Oa)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Sn=So(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Sn=br(e)}else Sn=T&&a===27?y3(e.type,Sn):Qa?Sr(e.stateNode):null;return!0}function cn(e){for(var a=Sn;a;){var o=vl(e,0),d=Lu(a);o.serverTail.push(d),a=d.type==="Suspense"?So(a):Sr(a)}}function Tl(){Oa&&(Sn=Qa=null,Ar=fe=!1)}function Rc(){var e=Qu;return e!==null&&(Mi===null?Mi=e:Mi.push.apply(Mi,e),Qu=null),e}function su(e){Qu===null?Qu=[e]:Qu.push(e)}function zh(){var e=ms;if(e!==null){ms=null;for(var a=w0(e);0<e.children.length;)e=e.children[0];wt(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
84
84
 
85
85
  - A server/client branch \`if (typeof window !== 'undefined')\`.
86
86
  - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
@@ -90,31 +90,31 @@ https://react.dev/link/hydration-mismatch`+o),e)),_3}function gl(e,a){if(!Na)thr
90
90
 
91
91
  It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
92
92
 
93
- %s%s`,"https://react.dev/link/hydration-mismatch",a)})}}function Rh(){fp=Ly=null,hp=!1}function Ms(e,a,o){Ka?(dt(Gy,a._currentValue,e),a._currentValue=o,dt(x3,a._currentRenderer,e),a._currentRenderer!==void 0&&a._currentRenderer!==null&&a._currentRenderer!==jy&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),a._currentRenderer=jy):(dt(Gy,a._currentValue2,e),a._currentValue2=o,dt(D3,a._currentRenderer2,e),a._currentRenderer2!==void 0&&a._currentRenderer2!==null&&a._currentRenderer2!==jy&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),a._currentRenderer2=jy)}function ki(e,a){var o=Gy.current;Ka?(e._currentValue=o,o=x3.current,lt(x3,a),e._currentRenderer=o):(e._currentValue2=o,o=D3.current,lt(D3,a),e._currentRenderer2=o),lt(Gy,a)}function Oc(e,a,o){for(;e!==null;){var d=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),e===o)break;e=e.return}e!==o&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function pa(e,a,o,d){var y=e.child;for(y!==null&&(y.return=e);y!==null;){var v=y.dependencies;if(v!==null){var C=y.child;v=v.firstContext;t:for(;v!==null;){var M=v;v=y;for(var B=0;B<a.length;B++)if(M.context===a[B]){v.lanes|=o,M=v.alternate,M!==null&&(M.lanes|=o),Oc(v.return,o,e),d||(C=null);break t}v=M.next}}else if(y.tag===18){if(C=y.return,C===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");C.lanes|=o,v=C.alternate,v!==null&&(v.lanes|=o),Oc(C,o,e),C=null}else C=y.child;if(C!==null)C.return=y;else for(C=y;C!==null;){if(C===e){C=null;break}if(y=C.sibling,y!==null){y.return=C.return,C=y;break}C=C.return}y=C}}function Ye(e,a,o,d){e=null;for(var y=a,v=!1;y!==null;){if(!v){if((y.flags&524288)!==0)v=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var C=y.alternate;if(C===null)throw Error("Should have a current fiber. This is a bug in React.");if(C=C.memoizedProps,C!==null){var M=y.type;Ti(y.pendingProps.value,C.value)||(e!==null?e.push(M):e=[M])}}else if(y===Vy.current){if(C=y.alternate,C===null)throw Error("Should have a current fiber. This is a bug in React.");C.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(e!==null?e.push(ji):e=[ji])}y=y.return}e!==null&&pa(a,e,o,d),a.flags|=262144}function kr(e){for(e=e.firstContext;e!==null;){var a=e.context;if(!Ti(Ka?a._currentValue:a._currentValue2,e.memoizedValue))return!0;e=e.next}return!1}function Ii(e){Ly=e,fp=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ve(e){return hp&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Ns(Ly,e)}function ou(e,a){return Ly===null&&Ii(e),Ns(e,a)}function Ns(e,a){var o=Ka?a._currentValue:a._currentValue2;if(a={context:a,memoizedValue:o,next:null},fp===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");fp=a,e.dependencies={lanes:0,firstContext:a,_debugThenableState:null},e.flags|=524288}else fp=fp.next=a;return o}function uu(){return{controller:new ij,data:new Map,refCount:0}}function Sl(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function Ir(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&sj(lj,function(){e.controller.abort()})}function Wi(e,a,o){(e&127)!==0?0>xr&&(xr=ia(),Jm=Py(a),A3=a,o!=null&&(M3=nt(o)),vf()&&(Bn=!0,ku=1),e=hs(),a=go(),e!==dp||a!==Fm?dp=-1.1:a!==null&&(ku=1),Bf=e,Fm=a):(e&4194048)!==0&&0>Ws&&(Ws=ia(),km=Py(a),K9=a,o!=null&&(Q9=nt(o)),0>No)&&(e=hs(),a=go(),(e!==Wu||a!==Vf)&&(Wu=-1.1),Iu=e,Vf=a)}function xg(e){if(0>xr){xr=ia(),Jm=e._debugTask!=null?e._debugTask:null,vf()&&(ku=1);var a=hs(),o=go();a!==dp||o!==Fm?dp=-1.1:o!==null&&(ku=1),Bf=a,Fm=o}0>Ws&&(Ws=ia(),km=e._debugTask!=null?e._debugTask:null,0>No)&&(e=hs(),a=go(),(e!==Wu||a!==Vf)&&(Wu=-1.1),Iu=e,Vf=a)}function Os(){var e=wf;return wf=0,e}function Rc(e){var a=wf;return wf=e,a}function cu(e){var a=wf;return wf+=e,a}function zc(){qt=Lt=-1.1}function Ga(){var e=Lt;return Lt=-1.1,e}function ti(e){0<=e&&(Lt=e)}function Rs(){var e=Sn;return Sn=-0,e}function $i(e){0<=e&&(Sn=e)}function ts(){var e=hn;return hn=null,e}function es(){var e=Bn;return Bn=!1,e}function Hc(e){Ci=ia(),0>e.actualStartTime&&(e.actualStartTime=Ci)}function zh(e){if(0<=Ci){var a=ia()-Ci;e.actualDuration+=a,e.selfBaseDuration=a,Ci=-1}}function w0(e){if(0<=Ci){var a=ia()-Ci;e.actualDuration+=a,Ci=-1}}function ns(){if(0<=Ci){var e=ia(),a=e-Ci;Ci=-1,wf+=a,Sn+=a,qt=e}}function U0(e){hn===null&&(hn=[]),hn.push(e),Ao===null&&(Ao=[]),Ao.push(e)}function as(){Ci=ia(),0>Lt&&(Lt=Ci)}function wc(e){for(var a=e.child;a;)e.actualDuration+=a.actualDuration,a=a.sibling}function Uc(){}function ja(e){e!==pp&&e.next===null&&(pp===null?Qy=pp=e:pp=pp.next=e),Zy=!0,rt.actQueue!==null?R3||(R3=!0,V0()):O3||(O3=!0,V0())}function Wr(e,a){if(!z3&&Zy){z3=!0;do for(var o=!1,d=Qy;d!==null;){if(e!==0){var y=d.pendingLanes;if(y===0)var v=0;else{var C=d.suspendedLanes,M=d.pingedLanes;v=(1<<31-kn(42|e)+1)-1,v&=y&~(C&~M),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,Dg(d,v))}else v=ee,v=w(d,d===Xe?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==Xs),(v&3)===0||Z(d,v)||(o=!0,Dg(d,v));d=d.next}while(o);z3=!1}}function Bc(){wu(),fu()}function fu(){Zy=R3=O3=!1;var e=0;Gf!==0&&xf()&&(e=Gf);for(var a=fe(),o=null,d=Qy;d!==null;){var y=d.next,v=B0(d,a);v===0?(d.next=null,o===null?Qy=y:o.next=y,y===null&&(pp=o)):(o=d,(e!==0||(v&3)!==0)&&(Zy=!0)),d=y}ua!==sc&&ua!==g2||Wr(e),Gf!==0&&(Gf=0)}function B0(e,a){for(var o=e.suspendedLanes,d=e.pingedLanes,y=e.expirationTimes,v=e.pendingLanes&-62914561;0<v;){var C=31-kn(v),M=1<<C,B=y[C];B===-1?((M&o)===0||(M&d)!==0)&&(y[C]=K(M,a)):B<=a&&(e.expiredLanes|=M),v&=~M}if(a=Xe,o=ee,o=w(e,e===a?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Xs),d=e.callbackNode,o===0||e===a&&(je===Qf||je===Zf)||e.cancelPendingCommit!==null)return d!==null&&wh(d),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||Z(e,o)){if(a=o&-o,a!==e.callbackPriority||rt.actQueue!==null&&d!==H3)wh(d);else return a;switch(ln(o)){case 2:case 8:o=Gl;break;case 32:o=zf;break;case 268435456:o=z9;break;default:o=zf}return d=Hh.bind(null,e),rt.actQueue!==null?(rt.actQueue.push(d),o=H3):o=jt(o,d),e.callbackPriority=a,e.callbackNode=o,a}return d!==null&&wh(d),e.callbackPriority=2,e.callbackNode=null,2}function Hh(e,a){if(Ky=Xy=!1,wu(),ua!==sc&&ua!==g2)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(ql===m2&&(ql=a5),Au()&&e.callbackNode!==o)return null;var d=ee;return d=w(e,e===Xe?d:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Xs),d===0?null:(Dm(e,d,a),B0(e,fe()),e.callbackNode!=null&&e.callbackNode===o?Hh.bind(null,e):null)}function Dg(e,a){if(Au())return null;Xy=Ky,Ky=!1,Dm(e,a,!0)}function wh(e){e!==H3&&e!==null&&fn(e)}function V0(){rt.actQueue!==null&&rt.actQueue.push(function(){return fu(),null}),zy?Li(function(){(de&(za|al))!==Ra?jt(ye,Bc):fu()}):jt(ye,Bc)}function Uh(){if(Gf===0){var e=jf;e===0&&(e=J,J<<=1,(J&261888)===0&&(J=256)),Gf=e}return Gf}function Ag(e,a){if(Wm===null){var o=Wm=[];w3=0,jf=Uh(),mp={status:"pending",value:void 0,then:function(d){o.push(d)}}}return w3++,a.then(G0,G0),a}function G0(){if(--w3===0&&(-1<Ws||(No=-1.1),Wm!==null)){mp!==null&&(mp.status="fulfilled");var e=Wm;Wm=null,jf=0,mp=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function j0(e,a){var o=[],d={status:"pending",value:null,reason:null,then:function(y){o.push(y)}};return e.then(function(){d.status="fulfilled",d.value=a;for(var y=0;y<o.length;y++)(0,o[y])(a)},function(y){for(d.status="rejected",d.reason=y,y=0;y<o.length;y++)(0,o[y])(void 0)}),d}function Bh(){var e=Lf.current;return e!==null?e:Xe.pooledCache}function Vc(e,a){a===null?dt(Lf,Lf.current,e):dt(Lf,a.pool,e)}function Vh(){var e=Bh();return e===null?null:{parent:Ka?Un._currentValue:Un._currentValue2,pool:e}}function Gc(e,a){if(Ti(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var o=Object.keys(e),d=Object.keys(a);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var y=o[d];if(!S3.call(a,y)||!Ti(e[y],a[y]))return!1}return!0}function L0(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function P0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Gh(e,a,o){rt.actQueue!==null&&(rt.didUsePromise=!0);var d=e.thenables;if(o=d[o],o===void 0?d.push(a):o!==a&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),a.then(Uc,Uc),a=o),a._debugInfo===void 0){e=performance.now(),d=a.displayName;var y={name:typeof d=="string"?d:"Promise",start:e,end:e,value:a};a._debugInfo=[{awaited:y}],a.status!=="fulfilled"&&a.status!=="rejected"&&(e=function(){y.end=performance.now()},a.then(e,e))}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Mg(e),e;default:if(typeof a.status=="string")a.then(Uc,Uc);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=a,e.status="pending",e.then(function(v){if(a.status==="pending"){var C=a;C.status="fulfilled",C.value=v}},function(v){if(a.status==="pending"){var C=a;C.status="rejected",C.reason=v}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Mg(e),e}throw Yf=a,s1=!0,gp}}function bl(e){try{return cj(e)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Yf=a,s1=!0,gp):a}}function Y0(){if(Yf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Yf;return Yf=null,s1=!1,e}function Mg(e){if(e===gp||e===Fy)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ma(e){var a=te;return e!=null&&(te=a===null?e:a.concat(e)),a}function jh(){var e=te;if(e!=null){for(var a=e.length-1;0<=a;a--)if(e[a].name!=null){var o=e[a].debugTask;if(o!=null)return o}}return null}function tr(e,a,o){for(var d=Object.keys(e.props),y=0;y<d.length;y++){var v=d[y];if(v!=="children"&&v!=="key"){a===null&&(a=Ud(e,o.mode,0),a._debugInfo=te,a.return=o),Bt(a,function(C){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",C)},v);break}}}function hu(e){var a=l1;return l1+=1,yp===null&&(yp=L0()),Gh(yp,e,a)}function er(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function q0(e,a){throw a.$$typeof===Oy?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
93
+ %s%s`,"https://react.dev/link/hydration-mismatch",a)})}}function Hh(){dp=Ly=null,pp=!1}function Rs(e,a,o){Ka?(ht(Gy,a._currentValue,e),a._currentValue=o,ht(x3,a._currentRenderer,e),a._currentRenderer!==void 0&&a._currentRenderer!==null&&a._currentRenderer!==jy&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),a._currentRenderer=jy):(ht(Gy,a._currentValue2,e),a._currentValue2=o,ht(D3,a._currentRenderer2,e),a._currentRenderer2!==void 0&&a._currentRenderer2!==null&&a._currentRenderer2!==jy&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),a._currentRenderer2=jy)}function ki(e,a){var o=Gy.current;Ka?(e._currentValue=o,o=x3.current,it(x3,a),e._currentRenderer=o):(e._currentValue2=o,o=D3.current,it(D3,a),e._currentRenderer2=o),it(Gy,a)}function zc(e,a,o){for(;e!==null;){var d=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),e===o)break;e=e.return}e!==o&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function pa(e,a,o,d){var y=e.child;for(y!==null&&(y.return=e);y!==null;){var v=y.dependencies;if(v!==null){var C=y.child;v=v.firstContext;t:for(;v!==null;){var M=v;v=y;for(var B=0;B<a.length;B++)if(M.context===a[B]){v.lanes|=o,M=v.alternate,M!==null&&(M.lanes|=o),zc(v.return,o,e),d||(C=null);break t}v=M.next}}else if(y.tag===18){if(C=y.return,C===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");C.lanes|=o,v=C.alternate,v!==null&&(v.lanes|=o),zc(C,o,e),C=null}else C=y.child;if(C!==null)C.return=y;else for(C=y;C!==null;){if(C===e){C=null;break}if(y=C.sibling,y!==null){y.return=C.return,C=y;break}C=C.return}y=C}}function Ke(e,a,o,d){e=null;for(var y=a,v=!1;y!==null;){if(!v){if((y.flags&524288)!==0)v=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var C=y.alternate;if(C===null)throw Error("Should have a current fiber. This is a bug in React.");if(C=C.memoizedProps,C!==null){var M=y.type;_i(y.pendingProps.value,C.value)||(e!==null?e.push(M):e=[M])}}else if(y===Vy.current){if(C=y.alternate,C===null)throw Error("Should have a current fiber. This is a bug in React.");C.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(e!==null?e.push(Pi):e=[Pi])}y=y.return}e!==null&&pa(a,e,o,d),a.flags|=262144}function kr(e){for(e=e.firstContext;e!==null;){var a=e.context;if(!_i(Ka?a._currentValue:a._currentValue2,e.memoizedValue))return!0;e=e.next}return!1}function Ii(e){Ly=e,dp=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ge(e){return pp&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),zs(Ly,e)}function lu(e,a){return Ly===null&&Ii(e),zs(e,a)}function zs(e,a){var o=Ka?a._currentValue:a._currentValue2;if(a={context:a,memoizedValue:o,next:null},dp===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");dp=a,e.dependencies={lanes:0,firstContext:a,_debugThenableState:null},e.flags|=524288}else dp=dp.next=a;return o}function ru(){return{controller:new sj,data:new Map,refCount:0}}function Cl(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function Ir(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&lj(rj,function(){e.controller.abort()})}function Wi(e,a,o){(e&127)!==0?0>Mr&&(Mr=ia(),Fm=Py(a),A3=a,o!=null&&(M3=et(o)),bf()&&(Bn=!0,Ju=1),e=hs(),a=go(),e!==mp||a!==km?mp=-1.1:a!==null&&(Ju=1),Gf=e,km=a):(e&4194048)!==0&&0>el&&(el=ia(),Im=Py(a),Q9=a,o!=null&&(Z9=et(o)),0>No)&&(e=hs(),a=go(),(e!==ku||a!==jf)&&(ku=-1.1),Fu=e,jf=a)}function xg(e){if(0>Mr){Mr=ia(),Fm=e._debugTask!=null?e._debugTask:null,bf()&&(Ju=1);var a=hs(),o=go();a!==mp||o!==km?mp=-1.1:o!==null&&(Ju=1),Gf=a,km=o}0>el&&(el=ia(),Im=e._debugTask!=null?e._debugTask:null,0>No)&&(e=hs(),a=go(),(e!==ku||a!==jf)&&(ku=-1.1),Fu=e,jf=a)}function Hs(){var e=Bf;return Bf=0,e}function Hc(e){var a=Bf;return Bf=e,a}function ou(e){var a=Bf;return Bf+=e,a}function wc(){qt=Pt=-1.1}function Ga(){var e=Pt;return Pt=-1.1,e}function ni(e){0<=e&&(Pt=e)}function ws(){var e=bn;return bn=-0,e}function $i(e){0<=e&&(bn=e)}function ts(){var e=dn;return dn=null,e}function es(){var e=Bn;return Bn=!1,e}function Uc(e){xi=ia(),0>e.actualStartTime&&(e.actualStartTime=xi)}function wh(e){if(0<=xi){var a=ia()-xi;e.actualDuration+=a,e.selfBaseDuration=a,xi=-1}}function U0(e){if(0<=xi){var a=ia()-xi;e.actualDuration+=a,xi=-1}}function ns(){if(0<=xi){var e=ia(),a=e-xi;xi=-1,Bf+=a,bn+=a,qt=e}}function B0(e){dn===null&&(dn=[]),dn.push(e),Ao===null&&(Ao=[]),Ao.push(e)}function as(){xi=ia(),0>Pt&&(Pt=xi)}function Bc(e){for(var a=e.child;a;)e.actualDuration+=a.actualDuration,a=a.sibling}function Vc(){}function ja(e){e!==gp&&e.next===null&&(gp===null?Qy=gp=e:gp=gp.next=e),Zy=!0,lt.actQueue!==null?R3||(R3=!0,G0()):O3||(O3=!0,G0())}function Wr(e,a){if(!z3&&Zy){z3=!0;do for(var o=!1,d=Qy;d!==null;){if(e!==0){var y=d.pendingLanes;if(y===0)var v=0;else{var C=d.suspendedLanes,M=d.pingedLanes;v=(1<<31-Fn(42|e)+1)-1,v&=y&~(C&~M),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,Dg(d,v))}else v=ne,v=H(d,d===Ze?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==Zs),(v&3)===0||J(d,v)||(o=!0,Dg(d,v));d=d.next}while(o);z3=!1}}function Gc(){zu(),uu()}function uu(){Zy=R3=O3=!1;var e=0;Lf!==0&&Af()&&(e=Lf);for(var a=ce(),o=null,d=Qy;d!==null;){var y=d.next,v=V0(d,a);v===0?(d.next=null,o===null?Qy=y:o.next=y,y===null&&(gp=o)):(o=d,(e!==0||(v&3)!==0)&&(Zy=!0)),d=y}ua!==ac&&ua!==g2||Wr(e),Lf!==0&&(Lf=0)}function V0(e,a){for(var o=e.suspendedLanes,d=e.pingedLanes,y=e.expirationTimes,v=e.pendingLanes&-62914561;0<v;){var C=31-Fn(v),M=1<<C,B=y[C];B===-1?((M&o)===0||(M&d)!==0)&&(y[C]=K(M,a)):B<=a&&(e.expiredLanes|=M),v&=~M}if(a=Ze,o=ne,o=H(e,e===a?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Zs),d=e.callbackNode,o===0||e===a&&(Le===Jf||Le===Ff)||e.cancelPendingCommit!==null)return d!==null&&Bh(d),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||J(e,o)){if(a=o&-o,a!==e.callbackPriority||lt.actQueue!==null&&d!==H3)Bh(d);else return a;switch(We(o)){case 2:case 8:o=Yl;break;case 32:o=wf;break;case 268435456:o=H9;break;default:o=wf}return d=Uh.bind(null,e),lt.actQueue!==null?(lt.actQueue.push(d),o=H3):o=Lt(o,d),e.callbackPriority=a,e.callbackNode=o,a}return d!==null&&Bh(d),e.callbackPriority=2,e.callbackNode=null,2}function Uh(e,a){if(Ky=Xy=!1,zu(),ua!==ac&&ua!==g2)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(Zl===m2&&(Zl=a5),xu()&&e.callbackNode!==o)return null;var d=ne;return d=H(e,e===Ze?d:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Zs),d===0?null:(Am(e,d,a),V0(e,ce()),e.callbackNode!=null&&e.callbackNode===o?Uh.bind(null,e):null)}function Dg(e,a){if(xu())return null;Xy=Ky,Ky=!1,Am(e,a,!0)}function Bh(e){e!==H3&&e!==null&&hn(e)}function G0(){lt.actQueue!==null&&lt.actQueue.push(function(){return uu(),null}),zy?Yi(function(){(he&(Ha|ll))!==za?Lt(ge,Gc):uu()}):Lt(ge,Gc)}function Vh(){if(Lf===0){var e=Pf;e===0&&(e=Z,Z<<=1,(Z&261888)===0&&(Z=256)),Lf=e}return Lf}function Ag(e,a){if($m===null){var o=$m=[];w3=0,Pf=Vh(),yp={status:"pending",value:void 0,then:function(d){o.push(d)}}}return w3++,a.then(j0,j0),a}function j0(){if(--w3===0&&(-1<el||(No=-1.1),$m!==null)){yp!==null&&(yp.status="fulfilled");var e=$m;$m=null,Pf=0,yp=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function L0(e,a){var o=[],d={status:"pending",value:null,reason:null,then:function(y){o.push(y)}};return e.then(function(){d.status="fulfilled",d.value=a;for(var y=0;y<o.length;y++)(0,o[y])(a)},function(y){for(d.status="rejected",d.reason=y,y=0;y<o.length;y++)(0,o[y])(void 0)}),d}function Gh(){var e=Yf.current;return e!==null?e:Ze.pooledCache}function jc(e,a){a===null?ht(Yf,Yf.current,e):ht(Yf,a.pool,e)}function jh(){var e=Gh();return e===null?null:{parent:Ka?Un._currentValue:Un._currentValue2,pool:e}}function Lc(e,a){if(_i(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var o=Object.keys(e),d=Object.keys(a);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var y=o[d];if(!S3.call(a,y)||!_i(e[y],a[y]))return!1}return!0}function P0(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function Y0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lh(e,a,o){lt.actQueue!==null&&(lt.didUsePromise=!0);var d=e.thenables;if(o=d[o],o===void 0?d.push(a):o!==a&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),a.then(Vc,Vc),a=o),a._debugInfo===void 0){e=performance.now(),d=a.displayName;var y={name:typeof d=="string"?d:"Promise",start:e,end:e,value:a};a._debugInfo=[{awaited:y}],a.status!=="fulfilled"&&a.status!=="rejected"&&(e=function(){y.end=performance.now()},a.then(e,e))}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Mg(e),e;default:if(typeof a.status=="string")a.then(Vc,Vc);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=a,e.status="pending",e.then(function(v){if(a.status==="pending"){var C=a;C.status="fulfilled",C.value=v}},function(v){if(a.status==="pending"){var C=a;C.status="rejected",C.reason=v}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Mg(e),e}throw Xf=a,l1=!0,vp}}function _l(e){try{return fj(e)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Xf=a,l1=!0,vp):a}}function q0(){if(Xf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Xf;return Xf=null,l1=!1,e}function Mg(e){if(e===vp||e===Fy)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ma(e){var a=ee;return e!=null&&(ee=a===null?e:a.concat(e)),a}function Ph(){var e=ee;if(e!=null){for(var a=e.length-1;0<=a;a--)if(e[a].name!=null){var o=e[a].debugTask;if(o!=null)return o}}return null}function ar(e,a,o){for(var d=Object.keys(e.props),y=0;y<d.length;y++){var v=d[y];if(v!=="children"&&v!=="key"){a===null&&(a=Vd(e,o.mode,0),a._debugInfo=ee,a.return=o),wt(a,function(C){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",C)},v);break}}}function cu(e){var a=r1;return r1+=1,Sp===null&&(Sp=P0()),Lh(Sp,e,a)}function ir(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function X0(e,a){throw a.$$typeof===Oy?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
94
94
  - Multiple copies of the "react" package is used.
95
95
  - A library pre-bundled an old copy of "react" or "react/jsx-runtime".
96
- - A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(a),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function jc(e,a){var o=jh();o!==null?o.run(q0.bind(null,e,a)):q0(e,a)}function Lh(e,a){var o=nt(e)||"Component";fE[o]||(fE[o]=!0,a=a.displayName||a.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
96
+ - A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(a),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function Pc(e,a){var o=Ph();o!==null?o.run(X0.bind(null,e,a)):X0(e,a)}function Yh(e,a){var o=et(e)||"Component";hE[o]||(hE[o]=!0,a=a.displayName||a.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
97
97
  root.render(%s)`,a,a,a):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
98
- <%s>{%s}</%s>`,a,a,o,a,o))}function Lc(e,a){var o=jh();o!==null?o.run(Lh.bind(null,e,a)):Lh(e,a)}function X0(e,a){var o=nt(e)||"Component";hE[o]||(hE[o]=!0,a=String(a),e.tag===3?console.error(`Symbols are not valid as a React child.
98
+ <%s>{%s}</%s>`,a,a,o,a,o))}function Yc(e,a){var o=Ph();o!==null?o.run(Yh.bind(null,e,a)):Yh(e,a)}function K0(e,a){var o=et(e)||"Component";dE[o]||(dE[o]=!0,a=String(a),e.tag===3?console.error(`Symbols are not valid as a React child.
99
99
  root.render(%s)`,a):console.error(`Symbols are not valid as a React child.
100
- <%s>%s</%s>`,o,a,o))}function zs(e,a){var o=jh();o!==null?o.run(X0.bind(null,e,a)):X0(e,a)}function Pc(e){function a(P,Y){if(e){var Q=P.deletions;Q===null?(P.deletions=[Y],P.flags|=16):Q.push(Y)}}function o(P,Y){if(!e)return null;for(;Y!==null;)a(P,Y),Y=Y.sibling;return null}function d(P){for(var Y=new Map;P!==null;)P.key!==null?Y.set(P.key,P):Y.set(P.index,P),P=P.sibling;return Y}function y(P,Y){return P=Ol(P,Y),P.index=0,P.sibling=null,P}function v(P,Y,Q){return P.index=Q,e?(Q=P.alternate,Q!==null?(Q=Q.index,Q<Y?(P.flags|=67108866,Y):Q):(P.flags|=67108866,Y)):(P.flags|=1048576,Y)}function C(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function M(P,Y,Q,mt){return Y===null||Y.tag!==6?(Y=Bd(Q,P.mode,mt),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=te,Y):(Y=y(Y,Q),Y.return=P,Y._debugInfo=te,Y)}function B(P,Y,Q,mt){var zt=Q.type;return zt===Ru?(Y=ct(P,Y,Q.props.children,mt,Q.key),tr(Q,Y,P),Y):Y!==null&&(Y.elementType===zt||Hm(Y,Q)||typeof zt=="object"&&zt!==null&&zt.$$typeof===li&&bl(zt)===Y.type)?(Y=y(Y,Q.props),er(Y,Q),Y.return=P,Y._debugOwner=Q._owner,Y._debugInfo=te,Y):(Y=Ud(Q,P.mode,mt),er(Y,Q),Y.return=P,Y._debugInfo=te,Y)}function q(P,Y,Q,mt){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Q.containerInfo||Y.stateNode.implementation!==Q.implementation?(Y=bf(Q,P.mode,mt),Y.return=P,Y._debugInfo=te,Y):(Y=y(Y,Q.children||[]),Y.return=P,Y._debugInfo=te,Y)}function ct(P,Y,Q,mt,zt){return Y===null||Y.tag!==7?(Y=hr(Q,P.mode,mt,zt),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=te,Y):(Y=y(Y,Q),Y.return=P,Y._debugInfo=te,Y)}function ht(P,Y,Q){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=Bd(""+Y,P.mode,Q),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=te,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Rl:return Q=Ud(Y,P.mode,Q),er(Q,Y),Q.return=P,P=ma(Y._debugInfo),Q._debugInfo=te,te=P,Q;case zl:return Y=bf(Y,P.mode,Q),Y.return=P,Y._debugInfo=te,Y;case li:var mt=ma(Y._debugInfo);return Y=bl(Y),P=ht(P,Y,Q),te=mt,P}if(Pn(Y)||I(Y))return Q=hr(Y,P.mode,Q,null),Q.return=P,Q._debugOwner=P,Q._debugTask=P._debugTask,P=ma(Y._debugInfo),Q._debugInfo=te,te=P,Q;if(typeof Y.then=="function")return mt=ma(Y._debugInfo),P=ht(P,hu(Y),Q),te=mt,P;if(Y.$$typeof===Rn)return ht(P,ou(P,Y),Q);jc(P,Y)}return typeof Y=="function"&&Lc(P,Y),typeof Y=="symbol"&&zs(P,Y),null}function yt(P,Y,Q,mt){var zt=Y!==null?Y.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return zt!==null?null:M(P,Y,""+Q,mt);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Rl:return Q.key===zt?(zt=ma(Q._debugInfo),P=B(P,Y,Q,mt),te=zt,P):null;case zl:return Q.key===zt?q(P,Y,Q,mt):null;case li:return zt=ma(Q._debugInfo),Q=bl(Q),P=yt(P,Y,Q,mt),te=zt,P}if(Pn(Q)||I(Q))return zt!==null?null:(zt=ma(Q._debugInfo),P=ct(P,Y,Q,mt,null),te=zt,P);if(typeof Q.then=="function")return zt=ma(Q._debugInfo),P=yt(P,Y,hu(Q),mt),te=zt,P;if(Q.$$typeof===Rn)return yt(P,Y,ou(P,Q),mt);jc(P,Q)}return typeof Q=="function"&&Lc(P,Q),typeof Q=="symbol"&&zs(P,Q),null}function Vt(P,Y,Q,mt,zt){if(typeof mt=="string"&&mt!==""||typeof mt=="number"||typeof mt=="bigint")return P=P.get(Q)||null,M(Y,P,""+mt,zt);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case Rl:return Q=P.get(mt.key===null?Q:mt.key)||null,P=ma(mt._debugInfo),Y=B(Y,Q,mt,zt),te=P,Y;case zl:return P=P.get(mt.key===null?Q:mt.key)||null,q(Y,P,mt,zt);case li:var Te=ma(mt._debugInfo);return mt=bl(mt),Y=Vt(P,Y,Q,mt,zt),te=Te,Y}if(Pn(mt)||I(mt))return Q=P.get(Q)||null,P=ma(mt._debugInfo),Y=ct(Y,Q,mt,zt,null),te=P,Y;if(typeof mt.then=="function")return Te=ma(mt._debugInfo),Y=Vt(P,Y,Q,hu(mt),zt),te=Te,Y;if(mt.$$typeof===Rn)return Vt(P,Y,Q,ou(Y,mt),zt);jc(Y,mt)}return typeof mt=="function"&&Lc(Y,mt),typeof mt=="symbol"&&zs(Y,mt),null}function Jt(P,Y,Q,mt){if(typeof Q!="object"||Q===null)return mt;switch(Q.$$typeof){case Rl:case zl:R(P,Y,Q);var zt=Q.key;if(typeof zt!="string")break;if(mt===null){mt=new Set,mt.add(zt);break}if(!mt.has(zt)){mt.add(zt);break}Bt(Y,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",zt)});break;case li:Q=bl(Q),Jt(P,Y,Q,mt)}return mt}function Pe(P,Y,Q,mt){for(var zt=null,Te=null,Zt=null,It=Y,Wt=Y=0,nn=null;It!==null&&Wt<Q.length;Wt++){It.index>Wt?(nn=It,It=null):nn=It.sibling;var Wn=yt(P,It,Q[Wt],mt);if(Wn===null){It===null&&(It=nn);break}zt=Jt(P,Wn,Q[Wt],zt),e&&It&&Wn.alternate===null&&a(P,It),Y=v(Wn,Y,Wt),Zt===null?Te=Wn:Zt.sibling=Wn,Zt=Wn,It=nn}if(Wt===Q.length)return o(P,It),he&&ge(P,Wt),Te;if(It===null){for(;Wt<Q.length;Wt++)It=ht(P,Q[Wt],mt),It!==null&&(zt=Jt(P,It,Q[Wt],zt),Y=v(It,Y,Wt),Zt===null?Te=It:Zt.sibling=It,Zt=It);return he&&ge(P,Wt),Te}for(It=d(It);Wt<Q.length;Wt++)nn=Vt(It,P,Wt,Q[Wt],mt),nn!==null&&(zt=Jt(P,nn,Q[Wt],zt),e&&nn.alternate!==null&&It.delete(nn.key===null?Wt:nn.key),Y=v(nn,Y,Wt),Zt===null?Te=nn:Zt.sibling=nn,Zt=nn);return e&&It.forEach(function(Bo){return a(P,Bo)}),he&&ge(P,Wt),Te}function zp(P,Y,Q,mt){if(Q==null)throw Error("An iterable object provided no iterator.");for(var zt=null,Te=null,Zt=Y,It=Y=0,Wt=null,nn=null,Wn=Q.next();Zt!==null&&!Wn.done;It++,Wn=Q.next()){Zt.index>It?(Wt=Zt,Zt=null):Wt=Zt.sibling;var Bo=yt(P,Zt,Wn.value,mt);if(Bo===null){Zt===null&&(Zt=Wt);break}nn=Jt(P,Bo,Wn.value,nn),e&&Zt&&Bo.alternate===null&&a(P,Zt),Y=v(Bo,Y,It),Te===null?zt=Bo:Te.sibling=Bo,Te=Bo,Zt=Wt}if(Wn.done)return o(P,Zt),he&&ge(P,It),zt;if(Zt===null){for(;!Wn.done;It++,Wn=Q.next())Zt=ht(P,Wn.value,mt),Zt!==null&&(nn=Jt(P,Zt,Wn.value,nn),Y=v(Zt,Y,It),Te===null?zt=Zt:Te.sibling=Zt,Te=Zt);return he&&ge(P,It),zt}for(Zt=d(Zt);!Wn.done;It++,Wn=Q.next())Wt=Vt(Zt,P,It,Wn.value,mt),Wt!==null&&(nn=Jt(P,Wt,Wn.value,nn),e&&Wt.alternate!==null&&Zt.delete(Wt.key===null?It:Wt.key),Y=v(Wt,Y,It),Te===null?zt=Wt:Te.sibling=Wt,Te=Wt);return e&&Zt.forEach(function(vj){return a(P,vj)}),he&&ge(P,It),zt}function Xl(P,Y,Q,mt){if(typeof Q=="object"&&Q!==null&&Q.type===Ru&&Q.key===null&&(tr(Q,null,P),Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Rl:var zt=ma(Q._debugInfo);t:{for(var Te=Q.key;Y!==null;){if(Y.key===Te){if(Te=Q.type,Te===Ru){if(Y.tag===7){o(P,Y.sibling),mt=y(Y,Q.props.children),mt.return=P,mt._debugOwner=Q._owner,mt._debugInfo=te,tr(Q,mt,P),P=mt;break t}}else if(Y.elementType===Te||Hm(Y,Q)||typeof Te=="object"&&Te!==null&&Te.$$typeof===li&&bl(Te)===Y.type){o(P,Y.sibling),mt=y(Y,Q.props),er(mt,Q),mt.return=P,mt._debugOwner=Q._owner,mt._debugInfo=te,P=mt;break t}o(P,Y);break}else a(P,Y);Y=Y.sibling}Q.type===Ru?(mt=hr(Q.props.children,P.mode,mt,Q.key),mt.return=P,mt._debugOwner=P,mt._debugTask=P._debugTask,mt._debugInfo=te,tr(Q,mt,P),P=mt):(mt=Ud(Q,P.mode,mt),er(mt,Q),mt.return=P,mt._debugInfo=te,P=mt)}return P=C(P),te=zt,P;case zl:t:{for(zt=Q,Q=zt.key;Y!==null;){if(Y.key===Q)if(Y.tag===4&&Y.stateNode.containerInfo===zt.containerInfo&&Y.stateNode.implementation===zt.implementation){o(P,Y.sibling),mt=y(Y,zt.children||[]),mt.return=P,P=mt;break t}else{o(P,Y);break}else a(P,Y);Y=Y.sibling}mt=bf(zt,P.mode,mt),mt.return=P,P=mt}return C(P);case li:return zt=ma(Q._debugInfo),Q=bl(Q),P=Xl(P,Y,Q,mt),te=zt,P}if(Pn(Q))return zt=ma(Q._debugInfo),P=Pe(P,Y,Q,mt),te=zt,P;if(I(Q)){if(zt=ma(Q._debugInfo),Te=I(Q),typeof Te!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Zt=Te.call(Q);return Zt===Q?(P.tag!==0||Object.prototype.toString.call(P.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Zt)!=="[object Generator]")&&(uE||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),uE=!0):Q.entries!==Te||G3||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),G3=!0),P=zp(P,Y,Zt,mt),te=zt,P}if(typeof Q.then=="function")return zt=ma(Q._debugInfo),P=Xl(P,Y,hu(Q),mt),te=zt,P;if(Q.$$typeof===Rn)return Xl(P,Y,ou(P,Q),mt);jc(P,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(zt=""+Q,Y!==null&&Y.tag===6?(o(P,Y.sibling),mt=y(Y,zt),mt.return=P,P=mt):(o(P,Y),mt=Bd(zt,P.mode,mt),mt.return=P,mt._debugOwner=P,mt._debugTask=P._debugTask,mt._debugInfo=te,P=mt),C(P)):(typeof Q=="function"&&Lc(P,Q),typeof Q=="symbol"&&zs(P,Q),o(P,Y))}return function(P,Y,Q,mt){var zt=te;te=null;try{l1=0;var Te=Xl(P,Y,Q,mt);return yp=null,Te}catch(nn){if(nn===gp||nn===Fy)throw nn;var Zt=S(29,nn,null,P.mode);Zt.lanes=mt,Zt.return=P;var It=Zt._debugInfo=te;if(Zt._debugOwner=P._debugOwner,Zt._debugTask=P._debugTask,It!=null){for(var Wt=It.length-1;0<=Wt;Wt--)if(typeof It[Wt].stack=="string"){Zt._debugOwner=It[Wt],Zt._debugTask=It[Wt].debugTask;break}}return Zt}finally{te=zt}}}function K0(e,a){var o=Pn(e);return e=!o&&typeof I(e)=="function",o||e?(o=o?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",o,a,o),!1):!0}function du(){for(var e=vp,a=j3=vp=0;a<e;){var o=$s[a];$s[a++]=null;var d=$s[a];$s[a++]=null;var y=$s[a];$s[a++]=null;var v=$s[a];if($s[a++]=null,d!==null&&y!==null){var C=d.pending;C===null?y.next=y:(y.next=C.next,C.next=y),d.pending=y}v!==0&&na(o,y,v)}}function Yc(e,a,o,d){$s[vp++]=e,$s[vp++]=a,$s[vp++]=o,$s[vp++]=d,j3|=d,e.lanes|=d,e=e.alternate,e!==null&&(e.lanes|=d)}function Ph(e,a,o,d){return Yc(e,a,o,d),qc(e)}function _a(e,a){return Yc(e,null,null,a),qc(e)}function na(e,a,o){e.lanes|=o;var d=e.alternate;d!==null&&(d.lanes|=o);for(var y=!1,v=e.return;v!==null;)v.childLanes|=o,d=v.alternate,d!==null&&(d.childLanes|=o),v.tag===22&&(e=v.stateNode,e===null||e._visibility&r1||(y=!0)),e=v,v=v.return;return e.tag===3?(v=e.stateNode,y&&a!==null&&(y=31-kn(o),e=v.hiddenUpdates,d=e[y],d===null?e[y]=[a]:d.push(a),a.lane=o|536870912),v):null}function qc(e){if(S1>mj)throw Ff=S1=0,b1=r5=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Ff>gj&&(Ff=0,b1=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&Rd(e);for(var a=e,o=a.return;o!==null;)a.alternate===null&&(a.flags&4098)!==0&&Rd(e),a=o,o=a.return;return a.tag===3?a.stateNode:null}function Yh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qh(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function El(e){return{lane:e,tag:pE,payload:null,callback:null,next:null}}function Ni(e,a,o){var d=e.updateQueue;if(d===null)return null;if(d=d.shared,P3===d&&!yE){var y=nt(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
100
+ <%s>%s</%s>`,o,a,o))}function Us(e,a){var o=Ph();o!==null?o.run(K0.bind(null,e,a)):K0(e,a)}function qc(e){function a(P,Y){if(e){var Q=P.deletions;Q===null?(P.deletions=[Y],P.flags|=16):Q.push(Y)}}function o(P,Y){if(!e)return null;for(;Y!==null;)a(P,Y),Y=Y.sibling;return null}function d(P){for(var Y=new Map;P!==null;)P.key!==null?Y.set(P.key,P):Y.set(P.index,P),P=P.sibling;return Y}function y(P,Y){return P=wl(P,Y),P.index=0,P.sibling=null,P}function v(P,Y,Q){return P.index=Q,e?(Q=P.alternate,Q!==null?(Q=Q.index,Q<Y?(P.flags|=67108866,Y):Q):(P.flags|=67108866,Y)):(P.flags|=1048576,Y)}function C(P){return e&&P.alternate===null&&(P.flags|=67108866),P}function M(P,Y,Q,gt){return Y===null||Y.tag!==6?(Y=Gd(Q,P.mode,gt),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=ee,Y):(Y=y(Y,Q),Y.return=P,Y._debugInfo=ee,Y)}function B(P,Y,Q,gt){var Rt=Q.type;return Rt===Nu?(Y=ut(P,Y,Q.props.children,gt,Q.key),ar(Q,Y,P),Y):Y!==null&&(Y.elementType===Rt||wm(Y,Q)||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===oi&&_l(Rt)===Y.type)?(Y=y(Y,Q.props),ir(Y,Q),Y.return=P,Y._debugOwner=Q._owner,Y._debugInfo=ee,Y):(Y=Vd(Q,P.mode,gt),ir(Y,Q),Y.return=P,Y._debugInfo=ee,Y)}function q(P,Y,Q,gt){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Q.containerInfo||Y.stateNode.implementation!==Q.implementation?(Y=Tf(Q,P.mode,gt),Y.return=P,Y._debugInfo=ee,Y):(Y=y(Y,Q.children||[]),Y.return=P,Y._debugInfo=ee,Y)}function ut(P,Y,Q,gt,Rt){return Y===null||Y.tag!==7?(Y=mr(Q,P.mode,gt,Rt),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=ee,Y):(Y=y(Y,Q),Y.return=P,Y._debugInfo=ee,Y)}function ft(P,Y,Q){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=Gd(""+Y,P.mode,Q),Y.return=P,Y._debugOwner=P,Y._debugTask=P._debugTask,Y._debugInfo=ee,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case Ul:return Q=Vd(Y,P.mode,Q),ir(Q,Y),Q.return=P,P=ma(Y._debugInfo),Q._debugInfo=ee,ee=P,Q;case Bl:return Y=Tf(Y,P.mode,Q),Y.return=P,Y._debugInfo=ee,Y;case oi:var gt=ma(Y._debugInfo);return Y=_l(Y),P=ft(P,Y,Q),ee=gt,P}if(jn(Y)||$(Y))return Q=mr(Y,P.mode,Q,null),Q.return=P,Q._debugOwner=P,Q._debugTask=P._debugTask,P=ma(Y._debugInfo),Q._debugInfo=ee,ee=P,Q;if(typeof Y.then=="function")return gt=ma(Y._debugInfo),P=ft(P,cu(Y),Q),ee=gt,P;if(Y.$$typeof===Rn)return ft(P,lu(P,Y),Q);Pc(P,Y)}return typeof Y=="function"&&Yc(P,Y),typeof Y=="symbol"&&Us(P,Y),null}function yt(P,Y,Q,gt){var Rt=Y!==null?Y.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Rt!==null?null:M(P,Y,""+Q,gt);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Ul:return Q.key===Rt?(Rt=ma(Q._debugInfo),P=B(P,Y,Q,gt),ee=Rt,P):null;case Bl:return Q.key===Rt?q(P,Y,Q,gt):null;case oi:return Rt=ma(Q._debugInfo),Q=_l(Q),P=yt(P,Y,Q,gt),ee=Rt,P}if(jn(Q)||$(Q))return Rt!==null?null:(Rt=ma(Q._debugInfo),P=ut(P,Y,Q,gt,null),ee=Rt,P);if(typeof Q.then=="function")return Rt=ma(Q._debugInfo),P=yt(P,Y,cu(Q),gt),ee=Rt,P;if(Q.$$typeof===Rn)return yt(P,Y,lu(P,Q),gt);Pc(P,Q)}return typeof Q=="function"&&Yc(P,Q),typeof Q=="symbol"&&Us(P,Q),null}function Vt(P,Y,Q,gt,Rt){if(typeof gt=="string"&&gt!==""||typeof gt=="number"||typeof gt=="bigint")return P=P.get(Q)||null,M(Y,P,""+gt,Rt);if(typeof gt=="object"&&gt!==null){switch(gt.$$typeof){case Ul:return Q=P.get(gt.key===null?Q:gt.key)||null,P=ma(gt._debugInfo),Y=B(Y,Q,gt,Rt),ee=P,Y;case Bl:return P=P.get(gt.key===null?Q:gt.key)||null,q(Y,P,gt,Rt);case oi:var Te=ma(gt._debugInfo);return gt=_l(gt),Y=Vt(P,Y,Q,gt,Rt),ee=Te,Y}if(jn(gt)||$(gt))return Q=P.get(Q)||null,P=ma(gt._debugInfo),Y=ut(Y,Q,gt,Rt,null),ee=P,Y;if(typeof gt.then=="function")return Te=ma(gt._debugInfo),Y=Vt(P,Y,Q,cu(gt),Rt),ee=Te,Y;if(gt.$$typeof===Rn)return Vt(P,Y,Q,lu(Y,gt),Rt);Pc(Y,gt)}return typeof gt=="function"&&Yc(Y,gt),typeof gt=="symbol"&&Us(Y,gt),null}function Jt(P,Y,Q,gt){if(typeof Q!="object"||Q===null)return gt;switch(Q.$$typeof){case Ul:case Bl:R(P,Y,Q);var Rt=Q.key;if(typeof Rt!="string")break;if(gt===null){gt=new Set,gt.add(Rt);break}if(!gt.has(Rt)){gt.add(Rt);break}wt(Y,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Rt)});break;case oi:Q=_l(Q),Jt(P,Y,Q,gt)}return gt}function Xe(P,Y,Q,gt){for(var Rt=null,Te=null,Zt=null,It=Y,$t=Y=0,rn=null;It!==null&&$t<Q.length;$t++){It.index>$t?(rn=It,It=null):rn=It.sibling;var In=yt(P,It,Q[$t],gt);if(In===null){It===null&&(It=rn);break}Rt=Jt(P,In,Q[$t],Rt),e&&It&&In.alternate===null&&a(P,It),Y=v(In,Y,$t),Zt===null?Te=In:Zt.sibling=In,Zt=In,It=rn}if($t===Q.length)return o(P,It),fe&&Ut(P,$t),Te;if(It===null){for(;$t<Q.length;$t++)It=ft(P,Q[$t],gt),It!==null&&(Rt=Jt(P,It,Q[$t],Rt),Y=v(It,Y,$t),Zt===null?Te=It:Zt.sibling=It,Zt=It);return fe&&Ut(P,$t),Te}for(It=d(It);$t<Q.length;$t++)rn=Vt(It,P,$t,Q[$t],gt),rn!==null&&(Rt=Jt(P,rn,Q[$t],Rt),e&&rn.alternate!==null&&It.delete(rn.key===null?$t:rn.key),Y=v(rn,Y,$t),Zt===null?Te=rn:Zt.sibling=rn,Zt=rn);return e&&It.forEach(function(Bo){return a(P,Bo)}),fe&&Ut(P,$t),Te}function wp(P,Y,Q,gt){if(Q==null)throw Error("An iterable object provided no iterator.");for(var Rt=null,Te=null,Zt=Y,It=Y=0,$t=null,rn=null,In=Q.next();Zt!==null&&!In.done;It++,In=Q.next()){Zt.index>It?($t=Zt,Zt=null):$t=Zt.sibling;var Bo=yt(P,Zt,In.value,gt);if(Bo===null){Zt===null&&(Zt=$t);break}rn=Jt(P,Bo,In.value,rn),e&&Zt&&Bo.alternate===null&&a(P,Zt),Y=v(Bo,Y,It),Te===null?Rt=Bo:Te.sibling=Bo,Te=Bo,Zt=$t}if(In.done)return o(P,Zt),fe&&Ut(P,It),Rt;if(Zt===null){for(;!In.done;It++,In=Q.next())Zt=ft(P,In.value,gt),Zt!==null&&(rn=Jt(P,Zt,In.value,rn),Y=v(Zt,Y,It),Te===null?Rt=Zt:Te.sibling=Zt,Te=Zt);return fe&&Ut(P,It),Rt}for(Zt=d(Zt);!In.done;It++,In=Q.next())$t=Vt(Zt,P,It,In.value,gt),$t!==null&&(rn=Jt(P,$t,In.value,rn),e&&$t.alternate!==null&&Zt.delete($t.key===null?It:$t.key),Y=v($t,Y,It),Te===null?Rt=$t:Te.sibling=$t,Te=$t);return e&&Zt.forEach(function(Sj){return a(P,Sj)}),fe&&Ut(P,It),Rt}function Jl(P,Y,Q,gt){if(typeof Q=="object"&&Q!==null&&Q.type===Nu&&Q.key===null&&(ar(Q,null,P),Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Ul:var Rt=ma(Q._debugInfo);t:{for(var Te=Q.key;Y!==null;){if(Y.key===Te){if(Te=Q.type,Te===Nu){if(Y.tag===7){o(P,Y.sibling),gt=y(Y,Q.props.children),gt.return=P,gt._debugOwner=Q._owner,gt._debugInfo=ee,ar(Q,gt,P),P=gt;break t}}else if(Y.elementType===Te||wm(Y,Q)||typeof Te=="object"&&Te!==null&&Te.$$typeof===oi&&_l(Te)===Y.type){o(P,Y.sibling),gt=y(Y,Q.props),ir(gt,Q),gt.return=P,gt._debugOwner=Q._owner,gt._debugInfo=ee,P=gt;break t}o(P,Y);break}else a(P,Y);Y=Y.sibling}Q.type===Nu?(gt=mr(Q.props.children,P.mode,gt,Q.key),gt.return=P,gt._debugOwner=P,gt._debugTask=P._debugTask,gt._debugInfo=ee,ar(Q,gt,P),P=gt):(gt=Vd(Q,P.mode,gt),ir(gt,Q),gt.return=P,gt._debugInfo=ee,P=gt)}return P=C(P),ee=Rt,P;case Bl:t:{for(Rt=Q,Q=Rt.key;Y!==null;){if(Y.key===Q)if(Y.tag===4&&Y.stateNode.containerInfo===Rt.containerInfo&&Y.stateNode.implementation===Rt.implementation){o(P,Y.sibling),gt=y(Y,Rt.children||[]),gt.return=P,P=gt;break t}else{o(P,Y);break}else a(P,Y);Y=Y.sibling}gt=Tf(Rt,P.mode,gt),gt.return=P,P=gt}return C(P);case oi:return Rt=ma(Q._debugInfo),Q=_l(Q),P=Jl(P,Y,Q,gt),ee=Rt,P}if(jn(Q))return Rt=ma(Q._debugInfo),P=Xe(P,Y,Q,gt),ee=Rt,P;if($(Q)){if(Rt=ma(Q._debugInfo),Te=$(Q),typeof Te!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Zt=Te.call(Q);return Zt===Q?(P.tag!==0||Object.prototype.toString.call(P.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Zt)!=="[object Generator]")&&(cE||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),cE=!0):Q.entries!==Te||G3||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),G3=!0),P=wp(P,Y,Zt,gt),ee=Rt,P}if(typeof Q.then=="function")return Rt=ma(Q._debugInfo),P=Jl(P,Y,cu(Q),gt),ee=Rt,P;if(Q.$$typeof===Rn)return Jl(P,Y,lu(P,Q),gt);Pc(P,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Rt=""+Q,Y!==null&&Y.tag===6?(o(P,Y.sibling),gt=y(Y,Rt),gt.return=P,P=gt):(o(P,Y),gt=Gd(Rt,P.mode,gt),gt.return=P,gt._debugOwner=P,gt._debugTask=P._debugTask,gt._debugInfo=ee,P=gt),C(P)):(typeof Q=="function"&&Yc(P,Q),typeof Q=="symbol"&&Us(P,Q),o(P,Y))}return function(P,Y,Q,gt){var Rt=ee;ee=null;try{r1=0;var Te=Jl(P,Y,Q,gt);return Sp=null,Te}catch(rn){if(rn===vp||rn===Fy)throw rn;var Zt=S(29,rn,null,P.mode);Zt.lanes=gt,Zt.return=P;var It=Zt._debugInfo=ee;if(Zt._debugOwner=P._debugOwner,Zt._debugTask=P._debugTask,It!=null){for(var $t=It.length-1;0<=$t;$t--)if(typeof It[$t].stack=="string"){Zt._debugOwner=It[$t],Zt._debugTask=It[$t].debugTask;break}}return Zt}finally{ee=Rt}}}function Q0(e,a){var o=jn(e);return e=!o&&typeof $(e)=="function",o||e?(o=o?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",o,a,o),!1):!0}function fu(){for(var e=bp,a=j3=bp=0;a<e;){var o=nl[a];nl[a++]=null;var d=nl[a];nl[a++]=null;var y=nl[a];nl[a++]=null;var v=nl[a];if(nl[a++]=null,d!==null&&y!==null){var C=d.pending;C===null?y.next=y:(y.next=C.next,C.next=y),d.pending=y}v!==0&&na(o,y,v)}}function Xc(e,a,o,d){nl[bp++]=e,nl[bp++]=a,nl[bp++]=o,nl[bp++]=d,j3|=d,e.lanes|=d,e=e.alternate,e!==null&&(e.lanes|=d)}function qh(e,a,o,d){return Xc(e,a,o,d),Kc(e)}function xa(e,a){return Xc(e,null,null,a),Kc(e)}function na(e,a,o){e.lanes|=o;var d=e.alternate;d!==null&&(d.lanes|=o);for(var y=!1,v=e.return;v!==null;)v.childLanes|=o,d=v.alternate,d!==null&&(d.childLanes|=o),v.tag===22&&(e=v.stateNode,e===null||e._visibility&o1||(y=!0)),e=v,v=v.return;return e.tag===3?(v=e.stateNode,y&&a!==null&&(y=31-Fn(o),e=v.hiddenUpdates,d=e[y],d===null?e[y]=[a]:d.push(a),a.lane=o|536870912),v):null}function Kc(e){if(b1>gj)throw If=b1=0,E1=r5=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");If>yj&&(If=0,E1=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&Hd(e);for(var a=e,o=a.return;o!==null;)a.alternate===null&&(a.flags&4098)!==0&&Hd(e),a=o,o=a.return;return a.tag===3?a.stateNode:null}function Xh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kh(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xl(e){return{lane:e,tag:mE,payload:null,callback:null,next:null}}function Ri(e,a,o){var d=e.updateQueue;if(d===null)return null;if(d=d.shared,P3===d&&!vE){var y=et(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
101
101
 
102
- Please update the following component: %s`,y),yE=!0}return(de&za)!==Ra?(y=d.pending,y===null?a.next=a:(a.next=y.next,y.next=a),d.pending=a,a=qc(e),na(e,null,o),a):(Yc(e,d,a,o),qc(e))}function pu(e,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var d=a.lanes;d&=e.pendingLanes,o|=d,a.lanes=o,Pt(e,o)}}function $r(e,a){var o=e.updateQueue,d=e.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var y=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var C={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?y=v=C:v=v.next=C,o=o.next}while(o!==null);v===null?y=v=a:v=v.next=a}else y=v=a;o={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=a:e.next=a,o.lastBaseUpdate=a}function mu(){if(Y3){var e=mp;if(e!==null)throw e}}function Xc(e,a,o,d){Y3=!1;var y=e.updateQueue;$u=!1,P3=y.shared;var v=y.firstBaseUpdate,C=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var B=M,q=B.next;B.next=null,C===null?v=q:C.next=q,C=B;var ct=e.alternate;ct!==null&&(ct=ct.updateQueue,M=ct.lastBaseUpdate,M!==C&&(M===null?ct.firstBaseUpdate=q:M.next=q,ct.lastBaseUpdate=B))}if(v!==null){var ht=y.baseState;C=0,ct=q=B=null,M=v;do{var yt=M.lane&-536870913,Vt=yt!==M.lane;if(Vt?(ee&yt)===yt:(d&yt)===yt){yt!==0&&yt===jf&&(Y3=!0),ct!==null&&(ct=ct.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});t:{yt=e;var Jt=M,Pe=a,zp=o;switch(Jt.tag){case mE:if(Jt=Jt.payload,typeof Jt=="function"){hp=!0;var Xl=Jt.call(zp,ht,Pe);if(yt.mode&8){At(!0);try{Jt.call(zp,ht,Pe)}finally{At(!1)}}hp=!1,ht=Xl;break t}ht=Jt;break t;case L3:yt.flags=yt.flags&-65537|128;case pE:if(Xl=Jt.payload,typeof Xl=="function"){if(hp=!0,Jt=Xl.call(zp,ht,Pe),yt.mode&8){At(!0);try{Xl.call(zp,ht,Pe)}finally{At(!1)}}hp=!1}else Jt=Xl;if(Jt==null)break t;ht=Me({},ht,Jt);break t;case gE:$u=!0}}yt=M.callback,yt!==null&&(e.flags|=64,Vt&&(e.flags|=8192),Vt=y.callbacks,Vt===null?y.callbacks=[yt]:Vt.push(yt))}else Vt={lane:yt,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ct===null?(q=ct=Vt,B=ht):ct=ct.next=Vt,C|=yt;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;Vt=M,M=Vt.next,Vt.next=null,y.lastBaseUpdate=Vt,y.shared.pending=null}}while(!0);ct===null&&(B=ht),y.baseState=B,y.firstBaseUpdate=q,y.lastBaseUpdate=ct,v===null&&(y.shared.lanes=0),nc|=C,e.lanes=C,e.memoizedState=ht}P3=null}function Kc(e,a){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(a)}function Q0(e,a){var o=e.shared.hiddenCallbacks;if(o!==null)for(e.shared.hiddenCallbacks=null,e=0;e<o.length;e++)Kc(o[e],a)}function Z0(e,a){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)Kc(o[e],a)}function J0(e,a){var o=Ar;dt(Iy,o,e),dt(Sp,a,e),Ar=o|a.baseLanes}function Xh(e){dt(Iy,Ar,e),dt(Sp,Sp.current,e)}function Qc(e){Ar=Iy.current,lt(Sp,e),lt(Iy,e)}function Hs(e){var a=e.alternate;dt(In,In.current&bp,e),dt(gs,e,e),tl===null&&(a===null||Sp.current!==null||a.memoizedState!==null)&&(tl=e)}function Kh(e){dt(In,In.current,e),dt(gs,e,e),tl===null&&(tl=e)}function Qh(e){e.tag===22?(dt(In,In.current,e),dt(gs,e,e),tl===null&&(tl=e)):is(e)}function is(e){dt(In,In.current,e),dt(gs,gs.current,e)}function La(e){lt(gs,e),tl===e&&(tl=null),lt(In,e)}function Zc(e){for(var a=e;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Mf(o)||Id(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function Ft(){var e=ot;nl===null?nl=[e]:nl.push(e)}function Et(){var e=ot;if(nl!==null&&(Ho++,nl[Ho]!==e)){var a=nt(Qt);if(!vE.has(a)&&(vE.add(a),nl!==null)){for(var o="",d=0;d<=Ho;d++){var y=nl[d],v=d===Ho?e:y;for(y=d+1+". "+y;30>y.length;)y+=" ";y+=v+`
102
+ Please update the following component: %s`,y),vE=!0}return(he&Ha)!==za?(y=d.pending,y===null?a.next=a:(a.next=y.next,y.next=a),d.pending=a,a=Kc(e),na(e,null,o),a):(Xc(e,d,a,o),Kc(e))}function hu(e,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var d=a.lanes;d&=e.pendingLanes,o|=d,a.lanes=o,jt(e,o)}}function $r(e,a){var o=e.updateQueue,d=e.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var y=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var C={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?y=v=C:v=v.next=C,o=o.next}while(o!==null);v===null?y=v=a:v=v.next=a}else y=v=a;o={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=a:e.next=a,o.lastBaseUpdate=a}function du(){if(Y3){var e=yp;if(e!==null)throw e}}function Qc(e,a,o,d){Y3=!1;var y=e.updateQueue;Iu=!1,P3=y.shared;var v=y.firstBaseUpdate,C=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var B=M,q=B.next;B.next=null,C===null?v=q:C.next=q,C=B;var ut=e.alternate;ut!==null&&(ut=ut.updateQueue,M=ut.lastBaseUpdate,M!==C&&(M===null?ut.firstBaseUpdate=q:M.next=q,ut.lastBaseUpdate=B))}if(v!==null){var ft=y.baseState;C=0,ut=q=B=null,M=v;do{var yt=M.lane&-536870913,Vt=yt!==M.lane;if(Vt?(ne&yt)===yt:(d&yt)===yt){yt!==0&&yt===Pf&&(Y3=!0),ut!==null&&(ut=ut.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});t:{yt=e;var Jt=M,Xe=a,wp=o;switch(Jt.tag){case gE:if(Jt=Jt.payload,typeof Jt=="function"){pp=!0;var Jl=Jt.call(wp,ft,Xe);if(yt.mode&8){Wt(!0);try{Jt.call(wp,ft,Xe)}finally{Wt(!1)}}pp=!1,ft=Jl;break t}ft=Jt;break t;case L3:yt.flags=yt.flags&-65537|128;case mE:if(Jl=Jt.payload,typeof Jl=="function"){if(pp=!0,Jt=Jl.call(wp,ft,Xe),yt.mode&8){Wt(!0);try{Jl.call(wp,ft,Xe)}finally{Wt(!1)}}pp=!1}else Jt=Jl;if(Jt==null)break t;ft=Me({},ft,Jt);break t;case yE:Iu=!0}}yt=M.callback,yt!==null&&(e.flags|=64,Vt&&(e.flags|=8192),Vt=y.callbacks,Vt===null?y.callbacks=[yt]:Vt.push(yt))}else Vt={lane:yt,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ut===null?(q=ut=Vt,B=ft):ut=ut.next=Vt,C|=yt;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;Vt=M,M=Vt.next,Vt.next=null,y.lastBaseUpdate=Vt,y.shared.pending=null}}while(!0);ut===null&&(B=ft),y.baseState=B,y.firstBaseUpdate=q,y.lastBaseUpdate=ut,v===null&&(y.shared.lanes=0),tc|=C,e.lanes=C,e.memoizedState=ft}P3=null}function Zc(e,a){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(a)}function Z0(e,a){var o=e.shared.hiddenCallbacks;if(o!==null)for(e.shared.hiddenCallbacks=null,e=0;e<o.length;e++)Zc(o[e],a)}function J0(e,a){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)Zc(o[e],a)}function F0(e,a){var o=Or;ht(Iy,o,e),ht(Ep,a,e),Or=o|a.baseLanes}function Qh(e){ht(Iy,Or,e),ht(Ep,Ep.current,e)}function Jc(e){Or=Iy.current,it(Ep,e),it(Iy,e)}function Bs(e){var a=e.alternate;ht(kn,kn.current&Tp,e),ht(gs,e,e),al===null&&(a===null||Ep.current!==null||a.memoizedState!==null)&&(al=e)}function Zh(e){ht(kn,kn.current,e),ht(gs,e,e),al===null&&(al=e)}function Jh(e){e.tag===22?(ht(kn,kn.current,e),ht(gs,e,e),al===null&&(al=e)):is(e)}function is(e){ht(kn,kn.current,e),ht(gs,gs.current,e)}function La(e){it(gs,e),al===e&&(al=null),it(kn,e)}function Fc(e){for(var a=e;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Of(o)||$d(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function Ft(){var e=rt;sl===null?sl=[e]:sl.push(e)}function Et(){var e=rt;if(sl!==null&&(Ho++,sl[Ho]!==e)){var a=et(Qt);if(!SE.has(a)&&(SE.add(a),sl!==null)){for(var o="",d=0;d<=Ho;d++){var y=sl[d],v=d===Ho?e:y;for(y=d+1+". "+y;30>y.length;)y+=" ";y+=v+`
103
103
  `,o+=y}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
104
104
 
105
105
  Previous render Next render
106
106
  ------------------------------------------------------
107
107
  %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108
- `,a,o)}}}function ei(e){e==null||Pn(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",ot,typeof e)}function gu(){var e=nt(Qt);bE.has(e)||(bE.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function gn(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
108
+ `,a,o)}}}function ai(e){e==null||jn(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",rt,typeof e)}function pu(){var e=et(Qt);EE.has(e)||(EE.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function yn(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
109
109
  1. You might have mismatching versions of React and the renderer (such as React DOM)
110
110
  2. You might be breaking the Rules of Hooks
111
111
  3. You might have more than one copy of React in the same app
112
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Zh(e,a){if(c1)return!1;if(a===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",ot),!1;e.length!==a.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
112
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Fh(e,a){if(f1)return!1;if(a===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",rt),!1;e.length!==a.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
113
113
 
114
114
  Previous: %s
115
- Incoming: %s`,ot,"["+a.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<a.length&&o<e.length;o++)if(!Ti(e[o],a[o]))return!1;return!0}function gi(e,a,o,d,y,v){Ro=v,Qt=a,nl=e!==null?e._debugHookTypes:null,Ho=-1,c1=e!==null&&e.type!==a.type,(Object.prototype.toString.call(o)==="[object AsyncFunction]"||Object.prototype.toString.call(o)==="[object AsyncGeneratorFunction]")&&(v=nt(Qt),q3.has(v)||(q3.add(v),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",v===null?"An unknown Component":"<"+v+">"))),a.memoizedState=null,a.updateQueue=null,a.lanes=0,rt.H=e!==null&&e.memoizedState!==null?K3:nl!==null?EE:X3,Xf=v=(a.mode&8)!==Kt;var C=U3(o,d,y);if(Xf=!1,Tp&&(C=Jh(a,o,d,y)),v){At(!0);try{C=Jh(a,o,d,y)}finally{At(!1)}}return Jc(e,a),C}function Jc(e,a){a._debugHookTypes=nl,a.dependencies===null?zo!==null&&(a.dependencies={lanes:0,firstContext:null,_debugThenableState:zo}):a.dependencies._debugThenableState=zo,rt.H=f1;var o=qe!==null&&qe.next!==null;if(Ro=0,nl=ot=sa=qe=Qt=null,Ho=-1,e!==null&&(e.flags&65011712)!==(a.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),$y=!1,u1=0,zo=null,o)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||la||(e=e.dependencies,e!==null&&kr(e)&&(la=!0)),s1?(s1=!1,e=!0):e=!1,e&&(a=nt(a)||"Unknown",SE.has(a)||q3.has(a)||(SE.add(a),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Jh(e,a,o,d){Qt=e;var y=0;do{if(Tp&&(zo=null),u1=0,Tp=!1,y>=hj)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(y+=1,c1=!1,sa=qe=null,e.updateQueue!=null){var v=e.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}Ho=-1,rt.H=TE,v=U3(a,o,d)}while(Tp);return v}function F0(){var e=rt.H,a=e.useState()[0];return a=typeof a.then=="function"?Tl(a):a,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(Qt.flags|=1024),a}function Fh(){var e=t2!==0;return t2=0,e}function kh(e,a,o){a.updateQueue=e.updateQueue,a.flags=(a.mode&16)!==Kt?a.flags&-402655237:a.flags&-2053,e.lanes&=~o}function Fc(e){if($y){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}$y=!1}Ro=0,nl=sa=qe=Qt=null,Ho=-1,ot=null,Tp=!1,u1=t2=0,zo=null}function ga(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sa===null?Qt.memoizedState=sa=e:sa=sa.next=e,sa}function De(){if(qe===null){var e=Qt.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var a=sa===null?Qt.memoizedState:sa.next;if(a!==null)sa=a,qe=e;else{if(e===null)throw Qt.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},sa===null?Qt.memoizedState=sa=e:sa=sa.next=e}return sa}function to(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tl(e){var a=u1;return u1+=1,zo===null&&(zo=L0()),e=Gh(zo,e,a),a=Qt,(sa===null?a.memoizedState:sa.next)===null&&(a=a.alternate,rt.H=a!==null&&a.memoizedState!==null?K3:X3),e}function Ce(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tl(e);if(e.$$typeof===Rn)return Ve(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function eo(e){var a=null,o=Qt.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var d=Qt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(a={data:d.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=to(),Qt.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0||c1)for(o=a.data[a.index]=Array(e),d=0;d<e;d++)o[d]=Ry;else o.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",o.length,e);return a.index++,o}function ss(e,a){return typeof a=="function"?a(e):a}function Ih(e,a,o){var d=ga();if(o!==void 0){var y=o(a);if(Xf){At(!0);try{o(a)}finally{At(!1)}}}else y=a;return d.memoizedState=d.baseState=y,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:y},d.queue=e,e=e.dispatch=Bg.bind(null,Qt,e),[d.memoizedState,e]}function ws(e){var a=De();return Us(a,qe,e)}function Us(e,a,o){var d=e.queue;if(d===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");d.lastRenderedReducer=o;var y=e.baseQueue,v=d.pending;if(v!==null){if(y!==null){var C=y.next;y.next=v.next,v.next=C}a.baseQueue!==y&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),a.baseQueue=y=v,d.pending=null}if(v=e.baseState,y===null)e.memoizedState=v;else{a=y.next;var M=C=null,B=null,q=a,ct=!1;do{var ht=q.lane&-536870913;if(ht!==q.lane?(ee&ht)===ht:(Ro&ht)===ht){var yt=q.revertLane;if(yt===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ht===jf&&(ct=!0);else if((Ro&yt)===yt){q=q.next,yt===jf&&(ct=!0);continue}else ht={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},B===null?(M=B=ht,C=v):B=B.next=ht,Qt.lanes|=yt,nc|=yt;ht=q.action,Xf&&o(v,ht),v=q.hasEagerState?q.eagerState:o(v,ht)}else yt={lane:ht,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},B===null?(M=B=yt,C=v):B=B.next=yt,Qt.lanes|=ht,nc|=ht;q=q.next}while(q!==null&&q!==a);if(B===null?C=v:B.next=M,!Ti(v,e.memoizedState)&&(la=!0,ct&&(o=mp,o!==null)))throw o;e.memoizedState=v,e.baseState=C,e.baseQueue=B,d.lastRenderedState=v}return y===null&&(d.lanes=0),[e.memoizedState,d.dispatch]}function yu(e){var a=De(),o=a.queue;if(o===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=e;var d=o.dispatch,y=o.pending,v=a.memoizedState;if(y!==null){o.pending=null;var C=y=y.next;do v=e(v,C.action),C=C.next;while(C!==y);Ti(v,a.memoizedState)||(la=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),o.lastRenderedState=v}return[v,d]}function Wh(e,a,o){var d=Qt,y=ga();if(he){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var v=o();Ep||v===o()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Ep=!0)}else{if(v=a(),Ep||(o=a(),Ti(v,o)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Ep=!0)),Xe===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ee&127)!==0||ls(d,a,v)}return y.memoizedState=v,o={value:v,getSnapshot:a},y.queue=o,ni($h.bind(null,d,o,e),[e]),d.flags|=2048,zi(el|xi,{destroy:void 0},k0.bind(null,d,o,v,a),null),v}function nr(e,a,o){var d=Qt,y=De(),v=he;if(v){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");o=o()}else if(o=a(),!Ep){var C=a();Ti(o,C)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Ep=!0)}(C=!Ti((qe||y).memoizedState,o))&&(y.memoizedState=o,la=!0),y=y.queue;var M=$h.bind(null,d,y,e);if(Da(2048,xi,M,[e]),y.getSnapshot!==a||C||sa!==null&&sa.memoizedState.tag&el){if(d.flags|=2048,zi(el|xi,{destroy:void 0},k0.bind(null,d,y,o,a),null),Xe===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");v||(Ro&127)!==0||ls(d,a,o)}return o}function ls(e,a,o){e.flags|=16384,e={getSnapshot:a,value:o},a=Qt.updateQueue,a===null?(a=to(),Qt.updateQueue=a,a.stores=[e]):(o=a.stores,o===null?a.stores=[e]:o.push(e))}function k0(e,a,o,d){a.value=o,a.getSnapshot=d,I0(a)&&td(e)}function $h(e,a,o){return o(function(){I0(a)&&(Wi(2,"updateSyncExternalStore()",e),td(e))})}function I0(e){var a=e.getSnapshot;e=e.value;try{var o=a();return!Ti(e,o)}catch{return!0}}function td(e){var a=_a(e,2);a!==null&&Ie(a,e,2)}function kc(e){var a=ga();if(typeof e=="function"){var o=e;if(e=o(),Xf){At(!0);try{o()}finally{At(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:e},a}function vu(e){e=kc(e);var a=e.queue,o=im.bind(null,Qt,a);return a.dispatch=o,[e.memoizedState,o]}function ed(e){var a=ga();a.memoizedState=a.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Eu.bind(null,Qt,!0,o),o.dispatch=a,[e,a]}function W0(e,a){var o=De();return Ng(o,qe,e,a)}function Ng(e,a,o,d){return e.baseState=o,Us(e,qe,typeof d=="function"?d:ss)}function $0(e,a){var o=De();return qe!==null?Ng(o,qe,e,a):(o.baseState=e,[e,o.queue.dispatch])}function Og(e,a,o,d,y){if(Tu(e))throw Error("Cannot update form state while rendering.");if(e=a.action,e!==null){var v={payload:y,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){v.listeners.push(C)}};rt.T!==null?o(!0):v.isTransition=!1,d(v),o=a.pending,o===null?(v.next=a.pending=v,Oi(a,v)):(v.next=o.next,a.pending=o.next=v)}}function Oi(e,a){var o=a.action,d=a.payload,y=e.state;if(a.isTransition){var v=rt.T,C={};C._updatedFibers=new Set,rt.T=C;try{var M=o(y,d),B=rt.S;B!==null&&B(C,M),nd(e,a,M)}catch(q){ad(e,a,q)}finally{v!==null&&C.types!==null&&(v.types!==null&&v.types!==C.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),v.types=C.types),rt.T=v,v===null&&C._updatedFibers&&(e=C._updatedFibers.size,C._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{C=o(y,d),nd(e,a,C)}catch(q){ad(e,a,q)}}function nd(e,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?(rt.asyncTransitions++,o.then(ef,ef),o.then(function(d){tm(e,a,d)},function(d){return ad(e,a,d)}),a.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):tm(e,a,o)}function tm(e,a,o){a.status="fulfilled",a.value=o,Rg(a),e.state=o,a=e.pending,a!==null&&(o=a.next,o===a?e.pending=null:(o=o.next,a.next=o,Oi(e,o)))}function ad(e,a,o){var d=e.pending;if(e.pending=null,d!==null){d=d.next;do a.status="rejected",a.reason=o,Rg(a),a=a.next;while(a!==d)}e.action=null}function Rg(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function Ic(e,a){return a}function Nn(e,a){if(he){var o=Xe.formState;if(o!==null){t:{var d=Qt;if(he){if(vn){var y=oi(vn,Is);if(y){vn=gr(y),d=ps(y);break t}}As(d)}d=!1}d&&(a=o[0])}}o=ga(),o.memoizedState=o.baseState=a,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ic,lastRenderedState:a},o.queue=d,o=im.bind(null,Qt,d),d.dispatch=o,d=kc(!1);var v=Eu.bind(null,Qt,!1,d.queue);return d=ga(),y={state:a,dispatch:null,action:e,pending:null},d.queue=y,o=Og.bind(null,Qt,y,v,o),y.dispatch=o,d.memoizedState=e,[a,o,!1]}function Wc(e){var a=De();return xa(a,qe,e)}function xa(e,a,o){if(a=Us(e,a,Ic)[0],e=ws(ss)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=Tl(a)}catch(C){throw C===gp?Fy:C}else d=a;a=De();var y=a.queue,v=y.dispatch;return o!==a.memoizedState&&(Qt.flags|=2048,zi(el|xi,{destroy:void 0},zg.bind(null,y,o),null)),[d,v,e]}function zg(e,a){e.action=a}function Ri(e){var a=De(),o=qe;if(o!==null)return xa(a,o,e);De(),a=a.memoizedState,o=De();var d=o.queue.dispatch;return o.memoizedState=e,[a,d,!1]}function zi(e,a,o,d){return e={tag:e,create:o,deps:d,inst:a,next:null},a=Qt.updateQueue,a===null&&(a=to(),Qt.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=e.next=e:(d=o.next,o.next=e,e.next=d,a.lastEffect=e),e}function rs(e){var a=ga();return e={current:e},a.memoizedState=e}function Cl(e,a,o,d){var y=ga();Qt.flags|=e,y.memoizedState=zi(el|a,{destroy:void 0},o,d===void 0?null:d)}function Da(e,a,o,d){var y=De();d=d===void 0?null:d;var v=y.memoizedState.inst;qe!==null&&d!==null&&Zh(d,qe.memoizedState.deps)?y.memoizedState=zi(a,v,o,d):(Qt.flags|=e,y.memoizedState=zi(el|a,v,o,d))}function ni(e,a){(Qt.mode&16)!==Kt?Cl(276826112,xi,e,a):Cl(8390656,xi,e,a)}function Hg(e){Qt.flags|=4;var a=Qt.updateQueue;if(a===null)a=to(),Qt.updateQueue=a,a.events=[e];else{var o=a.events;o===null?a.events=[e]:o.push(e)}}function ar(e){var a=ga(),o={impl:e};return a.memoizedState=o,function(){if((de&za)!==Ra)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function ir(e){var a=De().memoizedState;return Hg({ref:a,nextImpl:e}),function(){if((de&za)!==Ra)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return a.impl.apply(void 0,arguments)}}function _l(e,a){var o=4194308;return(Qt.mode&16)!==Kt&&(o|=134217728),Cl(o,ys,e,a)}function em(e,a){if(typeof a=="function"){e=e();var o=a(e);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return a.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(a).join(", ")+"}"),e=e(),a.current=e,function(){a.current=null}}function id(e,a,o){typeof a!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null"),o=o!=null?o.concat([e]):null;var d=4194308;(Qt.mode&16)!==Kt&&(d|=134217728),Cl(d,ys,em.bind(null,a,e),o)}function sr(e,a,o){typeof a!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null"),o=o!=null?o.concat([e]):null,Da(4,ys,em.bind(null,a,e),o)}function sd(e,a){return ga().memoizedState=[e,a===void 0?null:a],e}function no(e,a){var o=De();a=a===void 0?null:a;var d=o.memoizedState;return a!==null&&Zh(a,d[1])?d[0]:(o.memoizedState=[e,a],e)}function ld(e,a){var o=ga();a=a===void 0?null:a;var d=e();if(Xf){At(!0);try{e()}finally{At(!1)}}return o.memoizedState=[d,a],d}function Su(e,a){var o=De();a=a===void 0?null:a;var d=o.memoizedState;if(a!==null&&Zh(a,d[1]))return d[0];if(d=e(),Xf){At(!0);try{e()}finally{At(!1)}}return o.memoizedState=[d,a],d}function $c(e,a){var o=ga();return tf(o,e,a)}function rd(e,a){var o=De();return ai(o,qe.memoizedState,e,a)}function nm(e,a){var o=De();return qe===null?tf(o,e,a):ai(o,qe.memoizedState,e,a)}function tf(e,a,o){return o===void 0||(Ro&1073741824)!==0&&(ee&261930)===0?e.memoizedState=a:(e.memoizedState=o,e=ly(),Qt.lanes|=e,nc|=e,o)}function ai(e,a,o,d){return Ti(o,a)?o:Sp.current!==null?(e=tf(e,o,d),Ti(e,a)||(la=!0),e):(Ro&42)===0||(Ro&1073741824)!==0&&(ee&261930)===0?(la=!0,e.memoizedState=o):(e=ly(),Qt.lanes|=e,nc|=e,a)}function ef(){rt.asyncTransitions--}function Pa(e,a,o,d,y){var v=ri();zn(v!==0&&8>v?v:8);var C=rt.T,M={};M._updatedFibers=new Set,rt.T=M,Eu(e,!1,a,o);try{var B=y(),q=rt.S;if(q!==null&&q(M,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){rt.asyncTransitions++,B.then(ef,ef);var ct=j0(B,d);bu(e,a,ct,vi(e))}else bu(e,a,d,vi(e))}catch(ht){bu(e,a,{then:function(){},status:"rejected",reason:ht},vi(e))}finally{zn(v),C!==null&&M.types!==null&&(C.types!==null&&C.types!==M.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),C.types=M.types),rt.T=C,C===null&&M._updatedFibers&&(e=M._updatedFibers.size,M._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function am(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:Gi,baseState:Gi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:Gi},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:o},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function od(){var e=kc(!1);return e=Pa.bind(null,Qt,e.queue,!0,!1),ga().memoizedState=e,[!1,e]}function wg(){var e=ws(ss)[0],a=De().memoizedState;return[typeof e=="boolean"?e:Tl(e),a]}function xl(){var e=yu(ss)[0],a=De().memoizedState;return[typeof e=="boolean"?e:Tl(e),a]}function lr(){return Ve(ji)}function nf(){var e=ga(),a=Xe.identifierPrefix;if(he){var o=_o,d=Co;o=(d&~(1<<32-kn(d)-1)).toString(32)+o,a="_"+a+"R_"+o,o=t2++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=fj++,a="_"+a+"r_"+o.toString(32)+"_";return e.memoizedState=a}function rr(){return ga().memoizedState=Ug.bind(null,Qt)}function Ug(e,a){for(var o=e.return;o!==null;){switch(o.tag){case 24:case 3:var d=vi(o),y=El(d),v=Ni(o,y,d);v!==null&&(Wi(d,"refresh()",e),Ie(v,o,d),pu(v,o,d)),e=uu(),a!=null&&v!==null&&console.error("The seed argument is not enabled outside experimental channels."),y.payload={cache:e};return}o=o.return}}function Bg(e,a,o){var d=arguments;typeof d[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=vi(e);var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};Tu(e)?Vg(a,y):(y=Ph(e,a,y,d),y!==null&&(Wi(d,"dispatch()",e),Ie(y,e,d),Gg(y,a,d)))}function im(e,a,o){var d=arguments;typeof d[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=vi(e),bu(e,a,o,d)&&Wi(d,"setState()",e)}function bu(e,a,o,d){var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Tu(e))Vg(a,y);else{var v=e.alternate;if(e.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null)){var C=rt.H;rt.H=Ll;try{var M=a.lastRenderedState,B=v(M,o);if(y.hasEagerState=!0,y.eagerState=B,Ti(B,M))return Yc(e,a,y,0),Xe===null&&du(),!1}catch{}finally{rt.H=C}}if(o=Ph(e,a,y,d),o!==null)return Ie(o,e,d),Gg(o,a,d),!0}return!1}function Eu(e,a,o,d){if(rt.T===null&&jf===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),d={lane:2,revertLane:Uh(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Tu(e)){if(a)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else a=Ph(e,o,d,2),a!==null&&(Wi(2,"setOptimistic()",e),Ie(a,e,2))}function Tu(e){var a=e.alternate;return e===Qt||a!==null&&a===Qt}function Vg(e,a){Tp=$y=!0;var o=e.pending;o===null?a.next=a:(a.next=o.next,o.next=a),e.pending=a}function Gg(e,a,o){if((o&4194048)!==0){var d=a.lanes;d&=e.pendingLanes,o|=d,a.lanes=o,Pt(e,o)}}function sm(e){if(e!==null&&typeof e!="function"){var a=String(e);HE.has(a)||(HE.add(a),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function ud(e,a,o,d){var y=e.memoizedState,v=o(d,y);if(e.mode&8){At(!0);try{v=o(d,y)}finally{At(!1)}}v===void 0&&(a=et(a)||"Component",NE.has(a)||(NE.add(a),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",a))),y=v==null?y:Me({},y,v),e.memoizedState=y,e.lanes===0&&(e.updateQueue.baseState=y)}function lm(e,a,o,d,y,v,C){var M=e.stateNode;if(typeof M.shouldComponentUpdate=="function"){if(o=M.shouldComponentUpdate(d,v,C),e.mode&8){At(!0);try{o=M.shouldComponentUpdate(d,v,C)}finally{At(!1)}}return o===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",et(a)||"Component"),o}return a.prototype&&a.prototype.isPureReactComponent?!Gc(o,d)||!Gc(y,v):!0}function ao(e,a,o,d){var y=a.state;typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,d),a.state!==y&&(e=nt(e)||"Component",_E.has(e)||(_E.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),Q3.enqueueReplaceState(a,a.state,null))}function Bs(e,a){var o=a;if("ref"in a){o={};for(var d in a)d!=="ref"&&(o[d]=a[d])}if(e=e.defaultProps){o===a&&(o=Me({},o));for(var y in e)o[y]===void 0&&(o[y]=e[y])}return o}function af(e,a){try{Cp=a.source?nt(a.source):null,Z3=null;var o=a.value;if(rt.actQueue!==null)rt.thrownErrors.push(o);else{var d=e.onUncaughtError;d(o,{componentStack:a.stack})}}catch(y){setTimeout(function(){throw y})}}function rm(e,a,o){try{Cp=o.source?nt(o.source):null,Z3=nt(a);var d=e.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function cd(e,a,o){return o=El(o),o.tag=L3,o.payload={element:null},o.callback=function(){Bt(a.source,af,e,a)},o}function fd(e){return e=El(e),e.tag=L3,e}function hd(e,a,o,d){var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var v=d.value;e.payload=function(){return y(v)},e.callback=function(){Dy(o),Bt(d.source,rm,a,o,d)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){Dy(o),Bt(d.source,rm,a,o,d),typeof y!="function"&&(ic===null?ic=new Set([this]):ic.add(this)),rj(this,d),typeof y=="function"||(o.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",nt(o)||"Unknown")})}function jg(e,a,o,d,y){if(o.flags|=32768,Tr&&Mu(e,y),d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=o.alternate,a!==null&&Ye(a,o,y,!0),he&&(_r=!0),o=gs.current,o!==null){switch(o.tag){case 31:case 13:return tl===null?Nd():o.alternate===null&&bn===Uo&&(bn=u2),o.flags&=-257,o.flags|=65536,o.lanes=y,d===ky?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([d]):a.add(d),Om(e,d,y)),!1;case 22:return o.flags|=65536,d===ky?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([d]):o.add(d)),Om(e,d,y)),!1}throw Error("Unexpected Suspense handler tag ("+o.tag+"). This is a bug in React.")}return Om(e,d,y),Nd(),!1}if(he)return _r=!0,a=gs.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,d!==_3&&ru(Ht(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:d}),o))):(d!==_3&&ru(Ht(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:d}),o)),e=e.current.alternate,e.flags|=65536,y&=-y,e.lanes|=y,d=Ht(d,o),y=cd(e.stateNode,d,y),$r(e,y),bn!==tc&&(bn=Kf)),!1;var v=Ht(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:d}),o);if(g1===null?g1=[v]:g1.push(v),bn!==tc&&(bn=Kf),a===null)return!0;d=Ht(d,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,e=y&-y,o.lanes|=e,e=cd(o.stateNode,d,e),$r(o,e),!1;case 1:if(a=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ic===null||!ic.has(v))))return o.flags|=65536,y&=-y,o.lanes|=y,y=fd(y),hd(y,e,o,d),$r(o,y),!1}o=o.return}while(o!==null);return!1}function On(e,a,o,d){a.child=e===null?dE(a,null,o,d):qf(a,e.child,o,d)}function om(e,a,o,d,y){o=o.render;var v=a.ref;if("ref"in d){var C={};for(var M in d)M!=="ref"&&(C[M]=d[M])}else C=d;return Ii(a),d=gi(e,a,o,C,v,y),M=Fh(),e!==null&&!la?(kh(e,a,y),os(e,a,y)):(he&&M&&Wl(a),a.flags|=1,On(e,a,d,y),a.child)}function um(e,a,o,d,y){if(e===null){var v=o.type;return typeof v=="function"&&!Hd(v)&&v.defaultProps===void 0&&o.compare===null?(o=co(v),a.tag=15,a.type=o,Dl(a,v),be(e,a,o,d,y)):(e=wd(o.type,null,d,a,a.mode,y),e.ref=a.ref,e.return=a,a.child=e)}if(v=e.child,!ne(e,y)){var C=v.memoizedProps;if(o=o.compare,o=o!==null?o:Gc,o(C,d)&&e.ref===a.ref)return os(e,a,y)}return a.flags|=1,e=Ol(v,d),e.ref=a.ref,e.return=a,a.child=e}function be(e,a,o,d,y){if(e!==null){var v=e.memoizedProps;if(Gc(v,d)&&e.ref===a.ref&&a.type===e.type)if(la=!1,a.pendingProps=d=v,ne(e,y))(e.flags&131072)!==0&&(la=!0);else return a.lanes=e.lanes,os(e,a,y)}return lf(e,a,o,d,y)}function dd(e,a,o,d){var y=d.children,v=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:r1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,e!==null){for(d=a.child=e.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~v}else d=0,a.child=null;return cm(e,a,v,o,d)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vc(a,v!==null?v.cachePool:null),v!==null?J0(a,v):Xh(a),Qh(a);else return d=a.lanes=536870912,cm(e,a,v!==null?v.baseLanes|o:o,o,d)}else v!==null?(Vc(a,v.cachePool),J0(a,v),is(a),a.memoizedState=null):(e!==null&&Vc(a,null),Xh(a),is(a));return On(e,a,y,o),a.child}function sf(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:r1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function cm(e,a,o,d,y){var v=Bh();return v=v===null?null:{parent:Ka?Un._currentValue:Un._currentValue2,pool:v},a.memoizedState={baseLanes:o,cachePool:v},e!==null&&Vc(a,null),Xh(a),Qh(a),e!==null&&Ye(e,a,d,!0),a.childLanes=y,null}function pd(e,a){var o=a.hidden;return o!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
115
+ Incoming: %s`,rt,"["+a.join(", ")+"]","["+e.join(", ")+"]");for(var o=0;o<a.length&&o<e.length;o++)if(!_i(e[o],a[o]))return!1;return!0}function vi(e,a,o,d,y,v){Ro=v,Qt=a,sl=e!==null?e._debugHookTypes:null,Ho=-1,f1=e!==null&&e.type!==a.type,(Object.prototype.toString.call(o)==="[object AsyncFunction]"||Object.prototype.toString.call(o)==="[object AsyncGeneratorFunction]")&&(v=et(Qt),q3.has(v)||(q3.add(v),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",v===null?"An unknown Component":"<"+v+">"))),a.memoizedState=null,a.updateQueue=null,a.lanes=0,lt.H=e!==null&&e.memoizedState!==null?K3:sl!==null?TE:X3,Qf=v=(a.mode&8)!==Kt;var C=U3(o,d,y);if(Qf=!1,_p&&(C=kh(a,o,d,y)),v){Wt(!0);try{C=kh(a,o,d,y)}finally{Wt(!1)}}return kc(e,a),C}function kc(e,a){a._debugHookTypes=sl,a.dependencies===null?zo!==null&&(a.dependencies={lanes:0,firstContext:null,_debugThenableState:zo}):a.dependencies._debugThenableState=zo,lt.H=h1;var o=Qe!==null&&Qe.next!==null;if(Ro=0,sl=rt=sa=Qe=Qt=null,Ho=-1,e!==null&&(e.flags&65011712)!==(a.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),$y=!1,c1=0,zo=null,o)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||la||(e=e.dependencies,e!==null&&kr(e)&&(la=!0)),l1?(l1=!1,e=!0):e=!1,e&&(a=et(a)||"Unknown",bE.has(a)||q3.has(a)||(bE.add(a),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function kh(e,a,o,d){Qt=e;var y=0;do{if(_p&&(zo=null),c1=0,_p=!1,y>=dj)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(y+=1,f1=!1,sa=Qe=null,e.updateQueue!=null){var v=e.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}Ho=-1,lt.H=CE,v=U3(a,o,d)}while(_p);return v}function k0(){var e=lt.H,a=e.useState()[0];return a=typeof a.then=="function"?Dl(a):a,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(Qt.flags|=1024),a}function Ih(){var e=t2!==0;return t2=0,e}function Wh(e,a,o){a.updateQueue=e.updateQueue,a.flags=(a.mode&16)!==Kt?a.flags&-402655237:a.flags&-2053,e.lanes&=~o}function Ic(e){if($y){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}$y=!1}Ro=0,sl=sa=Qe=Qt=null,Ho=-1,rt=null,_p=!1,c1=t2=0,zo=null}function ga(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sa===null?Qt.memoizedState=sa=e:sa=sa.next=e,sa}function Ae(){if(Qe===null){var e=Qt.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var a=sa===null?Qt.memoizedState:sa.next;if(a!==null)sa=a,Qe=e;else{if(e===null)throw Qt.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},sa===null?Qt.memoizedState=sa=e:sa=sa.next=e}return sa}function to(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Dl(e){var a=c1;return c1+=1,zo===null&&(zo=P0()),e=Lh(zo,e,a),a=Qt,(sa===null?a.memoizedState:sa.next)===null&&(a=a.alternate,lt.H=a!==null&&a.memoizedState!==null?K3:X3),e}function _e(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Dl(e);if(e.$$typeof===Rn)return Ge(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function eo(e){var a=null,o=Qt.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var d=Qt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(a={data:d.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=to(),Qt.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0||f1)for(o=a.data[a.index]=Array(e),d=0;d<e;d++)o[d]=Ry;else o.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",o.length,e);return a.index++,o}function ss(e,a){return typeof a=="function"?a(e):a}function $h(e,a,o){var d=ga();if(o!==void 0){var y=o(a);if(Qf){Wt(!0);try{o(a)}finally{Wt(!1)}}}else y=a;return d.memoizedState=d.baseState=y,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:y},d.queue=e,e=e.dispatch=Bg.bind(null,Qt,e),[d.memoizedState,e]}function Vs(e){var a=Ae();return Gs(a,Qe,e)}function Gs(e,a,o){var d=e.queue;if(d===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");d.lastRenderedReducer=o;var y=e.baseQueue,v=d.pending;if(v!==null){if(y!==null){var C=y.next;y.next=v.next,v.next=C}a.baseQueue!==y&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),a.baseQueue=y=v,d.pending=null}if(v=e.baseState,y===null)e.memoizedState=v;else{a=y.next;var M=C=null,B=null,q=a,ut=!1;do{var ft=q.lane&-536870913;if(ft!==q.lane?(ne&ft)===ft:(Ro&ft)===ft){var yt=q.revertLane;if(yt===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ft===Pf&&(ut=!0);else if((Ro&yt)===yt){q=q.next,yt===Pf&&(ut=!0);continue}else ft={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},B===null?(M=B=ft,C=v):B=B.next=ft,Qt.lanes|=yt,tc|=yt;ft=q.action,Qf&&o(v,ft),v=q.hasEagerState?q.eagerState:o(v,ft)}else yt={lane:ft,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},B===null?(M=B=yt,C=v):B=B.next=yt,Qt.lanes|=ft,tc|=ft;q=q.next}while(q!==null&&q!==a);if(B===null?C=v:B.next=M,!_i(v,e.memoizedState)&&(la=!0,ut&&(o=yp,o!==null)))throw o;e.memoizedState=v,e.baseState=C,e.baseQueue=B,d.lastRenderedState=v}return y===null&&(d.lanes=0),[e.memoizedState,d.dispatch]}function mu(e){var a=Ae(),o=a.queue;if(o===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");o.lastRenderedReducer=e;var d=o.dispatch,y=o.pending,v=a.memoizedState;if(y!==null){o.pending=null;var C=y=y.next;do v=e(v,C.action),C=C.next;while(C!==y);_i(v,a.memoizedState)||(la=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),o.lastRenderedState=v}return[v,d]}function td(e,a,o){var d=Qt,y=ga();if(fe){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var v=o();Cp||v===o()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Cp=!0)}else{if(v=a(),Cp||(o=a(),_i(v,o)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Cp=!0)),Ze===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ne&127)!==0||ls(d,a,v)}return y.memoizedState=v,o={value:v,getSnapshot:a},y.queue=o,ii(ed.bind(null,d,o,e),[e]),d.flags|=2048,wi(il|Ai,{destroy:void 0},I0.bind(null,d,o,v,a),null),v}function sr(e,a,o){var d=Qt,y=Ae(),v=fe;if(v){if(o===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");o=o()}else if(o=a(),!Cp){var C=a();_i(o,C)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Cp=!0)}(C=!_i((Qe||y).memoizedState,o))&&(y.memoizedState=o,la=!0),y=y.queue;var M=ed.bind(null,d,y,e);if(Aa(2048,Ai,M,[e]),y.getSnapshot!==a||C||sa!==null&&sa.memoizedState.tag&il){if(d.flags|=2048,wi(il|Ai,{destroy:void 0},I0.bind(null,d,y,o,a),null),Ze===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");v||(Ro&127)!==0||ls(d,a,o)}return o}function ls(e,a,o){e.flags|=16384,e={getSnapshot:a,value:o},a=Qt.updateQueue,a===null?(a=to(),Qt.updateQueue=a,a.stores=[e]):(o=a.stores,o===null?a.stores=[e]:o.push(e))}function I0(e,a,o,d){a.value=o,a.getSnapshot=d,W0(a)&&nd(e)}function ed(e,a,o){return o(function(){W0(a)&&(Wi(2,"updateSyncExternalStore()",e),nd(e))})}function W0(e){var a=e.getSnapshot;e=e.value;try{var o=a();return!_i(e,o)}catch{return!0}}function nd(e){var a=xa(e,2);a!==null&&en(a,e,2)}function Wc(e){var a=ga();if(typeof e=="function"){var o=e;if(e=o(),Qf){Wt(!0);try{o()}finally{Wt(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:e},a}function gu(e){e=Wc(e);var a=e.queue,o=sm.bind(null,Qt,a);return a.dispatch=o,[e.memoizedState,o]}function ad(e){var a=ga();a.memoizedState=a.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Su.bind(null,Qt,!0,o),o.dispatch=a,[e,a]}function $0(e,a){var o=Ae();return Ng(o,Qe,e,a)}function Ng(e,a,o,d){return e.baseState=o,Gs(e,Qe,typeof d=="function"?d:ss)}function tm(e,a){var o=Ae();return Qe!==null?Ng(o,Qe,e,a):(o.baseState=e,[e,o.queue.dispatch])}function Og(e,a,o,d,y){if(bu(e))throw Error("Cannot update form state while rendering.");if(e=a.action,e!==null){var v={payload:y,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){v.listeners.push(C)}};lt.T!==null?o(!0):v.isTransition=!1,d(v),o=a.pending,o===null?(v.next=a.pending=v,zi(a,v)):(v.next=o.next,a.pending=o.next=v)}}function zi(e,a){var o=a.action,d=a.payload,y=e.state;if(a.isTransition){var v=lt.T,C={};C._updatedFibers=new Set,lt.T=C;try{var M=o(y,d),B=lt.S;B!==null&&B(C,M),id(e,a,M)}catch(q){sd(e,a,q)}finally{v!==null&&C.types!==null&&(v.types!==null&&v.types!==C.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),v.types=C.types),lt.T=v,v===null&&C._updatedFibers&&(e=C._updatedFibers.size,C._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{C=o(y,d),id(e,a,C)}catch(q){sd(e,a,q)}}function id(e,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?(lt.asyncTransitions++,o.then(af,af),o.then(function(d){em(e,a,d)},function(d){return sd(e,a,d)}),a.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):em(e,a,o)}function em(e,a,o){a.status="fulfilled",a.value=o,Rg(a),e.state=o,a=e.pending,a!==null&&(o=a.next,o===a?e.pending=null:(o=o.next,a.next=o,zi(e,o)))}function sd(e,a,o){var d=e.pending;if(e.pending=null,d!==null){d=d.next;do a.status="rejected",a.reason=o,Rg(a),a=a.next;while(a!==d)}e.action=null}function Rg(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function $c(e,a){return a}function Nn(e,a){if(fe){var o=Ze.formState;if(o!==null){t:{var d=Qt;if(fe){if(Sn){var y=ci(Sn,tl);if(y){Sn=Sr(y),d=ps(y);break t}}Os(d)}d=!1}d&&(a=o[0])}}o=ga(),o.memoizedState=o.baseState=a,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$c,lastRenderedState:a},o.queue=d,o=sm.bind(null,Qt,d),d.dispatch=o,d=Wc(!1);var v=Su.bind(null,Qt,!1,d.queue);return d=ga(),y={state:a,dispatch:null,action:e,pending:null},d.queue=y,o=Og.bind(null,Qt,y,v,o),y.dispatch=o,d.memoizedState=e,[a,o,!1]}function tf(e){var a=Ae();return Da(a,Qe,e)}function Da(e,a,o){if(a=Gs(e,a,$c)[0],e=Vs(ss)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=Dl(a)}catch(C){throw C===vp?Fy:C}else d=a;a=Ae();var y=a.queue,v=y.dispatch;return o!==a.memoizedState&&(Qt.flags|=2048,wi(il|Ai,{destroy:void 0},zg.bind(null,y,o),null)),[d,v,e]}function zg(e,a){e.action=a}function Hi(e){var a=Ae(),o=Qe;if(o!==null)return Da(a,o,e);Ae(),a=a.memoizedState,o=Ae();var d=o.queue.dispatch;return o.memoizedState=e,[a,d,!1]}function wi(e,a,o,d){return e={tag:e,create:o,deps:d,inst:a,next:null},a=Qt.updateQueue,a===null&&(a=to(),Qt.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=e.next=e:(d=o.next,o.next=e,e.next=d,a.lastEffect=e),e}function rs(e){var a=ga();return e={current:e},a.memoizedState=e}function Al(e,a,o,d){var y=ga();Qt.flags|=e,y.memoizedState=wi(il|a,{destroy:void 0},o,d===void 0?null:d)}function Aa(e,a,o,d){var y=Ae();d=d===void 0?null:d;var v=y.memoizedState.inst;Qe!==null&&d!==null&&Fh(d,Qe.memoizedState.deps)?y.memoizedState=wi(a,v,o,d):(Qt.flags|=e,y.memoizedState=wi(il|a,v,o,d))}function ii(e,a){(Qt.mode&16)!==Kt?Al(276826112,Ai,e,a):Al(8390656,Ai,e,a)}function Hg(e){Qt.flags|=4;var a=Qt.updateQueue;if(a===null)a=to(),Qt.updateQueue=a,a.events=[e];else{var o=a.events;o===null?a.events=[e]:o.push(e)}}function lr(e){var a=ga(),o={impl:e};return a.memoizedState=o,function(){if((he&Ha)!==za)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return o.impl.apply(void 0,arguments)}}function rr(e){var a=Ae().memoizedState;return Hg({ref:a,nextImpl:e}),function(){if((he&Ha)!==za)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return a.impl.apply(void 0,arguments)}}function Ml(e,a){var o=4194308;return(Qt.mode&16)!==Kt&&(o|=134217728),Al(o,ys,e,a)}function nm(e,a){if(typeof a=="function"){e=e();var o=a(e);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return a.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(a).join(", ")+"}"),e=e(),a.current=e,function(){a.current=null}}function ld(e,a,o){typeof a!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null"),o=o!=null?o.concat([e]):null;var d=4194308;(Qt.mode&16)!==Kt&&(d|=134217728),Al(d,ys,nm.bind(null,a,e),o)}function or(e,a,o){typeof a!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",a!==null?typeof a:"null"),o=o!=null?o.concat([e]):null,Aa(4,ys,nm.bind(null,a,e),o)}function rd(e,a){return ga().memoizedState=[e,a===void 0?null:a],e}function no(e,a){var o=Ae();a=a===void 0?null:a;var d=o.memoizedState;return a!==null&&Fh(a,d[1])?d[0]:(o.memoizedState=[e,a],e)}function od(e,a){var o=ga();a=a===void 0?null:a;var d=e();if(Qf){Wt(!0);try{e()}finally{Wt(!1)}}return o.memoizedState=[d,a],d}function yu(e,a){var o=Ae();a=a===void 0?null:a;var d=o.memoizedState;if(a!==null&&Fh(a,d[1]))return d[0];if(d=e(),Qf){Wt(!0);try{e()}finally{Wt(!1)}}return o.memoizedState=[d,a],d}function ef(e,a){var o=ga();return nf(o,e,a)}function ud(e,a){var o=Ae();return si(o,Qe.memoizedState,e,a)}function am(e,a){var o=Ae();return Qe===null?nf(o,e,a):si(o,Qe.memoizedState,e,a)}function nf(e,a,o){return o===void 0||(Ro&1073741824)!==0&&(ne&261930)===0?e.memoizedState=a:(e.memoizedState=o,e=ly(),Qt.lanes|=e,tc|=e,o)}function si(e,a,o,d){return _i(o,a)?o:Ep.current!==null?(e=nf(e,o,d),_i(e,a)||(la=!0),e):(Ro&42)===0||(Ro&1073741824)!==0&&(ne&261930)===0?(la=!0,e.memoizedState=o):(e=ly(),Qt.lanes|=e,tc|=e,a)}function af(){lt.asyncTransitions--}function Pa(e,a,o,d,y){var v=ui();zn(v!==0&&8>v?v:8);var C=lt.T,M={};M._updatedFibers=new Set,lt.T=M,Su(e,!1,a,o);try{var B=y(),q=lt.S;if(q!==null&&q(M,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){lt.asyncTransitions++,B.then(af,af);var ut=L0(B,d);vu(e,a,ut,bi(e))}else vu(e,a,d,bi(e))}catch(ft){vu(e,a,{then:function(){},status:"rejected",reason:ft},bi(e))}finally{zn(v),C!==null&&M.types!==null&&(C.types!==null&&C.types!==M.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),C.types=M.types),lt.T=C,C===null&&M._updatedFibers&&(e=M._updatedFibers.size,M._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function im(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:Li,baseState:Li,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:Li},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:o},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function cd(){var e=Wc(!1);return e=Pa.bind(null,Qt,e.queue,!0,!1),ga().memoizedState=e,[!1,e]}function wg(){var e=Vs(ss)[0],a=Ae().memoizedState;return[typeof e=="boolean"?e:Dl(e),a]}function Nl(){var e=mu(ss)[0],a=Ae().memoizedState;return[typeof e=="boolean"?e:Dl(e),a]}function ur(){return Ge(Pi)}function sf(){var e=ga(),a=Ze.identifierPrefix;if(fe){var o=_o,d=Co;o=(d&~(1<<32-Fn(d)-1)).toString(32)+o,a="_"+a+"R_"+o,o=t2++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=hj++,a="_"+a+"r_"+o.toString(32)+"_";return e.memoizedState=a}function cr(){return ga().memoizedState=Ug.bind(null,Qt)}function Ug(e,a){for(var o=e.return;o!==null;){switch(o.tag){case 24:case 3:var d=bi(o),y=xl(d),v=Ri(o,y,d);v!==null&&(Wi(d,"refresh()",e),en(v,o,d),hu(v,o,d)),e=ru(),a!=null&&v!==null&&console.error("The seed argument is not enabled outside experimental channels."),y.payload={cache:e};return}o=o.return}}function Bg(e,a,o){var d=arguments;typeof d[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=bi(e);var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};bu(e)?Vg(a,y):(y=qh(e,a,y,d),y!==null&&(Wi(d,"dispatch()",e),en(y,e,d),Gg(y,a,d)))}function sm(e,a,o){var d=arguments;typeof d[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),d=bi(e),vu(e,a,o,d)&&Wi(d,"setState()",e)}function vu(e,a,o,d){var y={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(bu(e))Vg(a,y);else{var v=e.alternate;if(e.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null)){var C=lt.H;lt.H=Xl;try{var M=a.lastRenderedState,B=v(M,o);if(y.hasEagerState=!0,y.eagerState=B,_i(B,M))return Xc(e,a,y,0),Ze===null&&fu(),!1}catch{}finally{lt.H=C}}if(o=qh(e,a,y,d),o!==null)return en(o,e,d),Gg(o,a,d),!0}return!1}function Su(e,a,o,d){if(lt.T===null&&Pf===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),d={lane:2,revertLane:Vh(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},bu(e)){if(a)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else a=qh(e,o,d,2),a!==null&&(Wi(2,"setOptimistic()",e),en(a,e,2))}function bu(e){var a=e.alternate;return e===Qt||a!==null&&a===Qt}function Vg(e,a){_p=$y=!0;var o=e.pending;o===null?a.next=a:(a.next=o.next,o.next=a),e.pending=a}function Gg(e,a,o){if((o&4194048)!==0){var d=a.lanes;d&=e.pendingLanes,o|=d,a.lanes=o,jt(e,o)}}function lm(e){if(e!==null&&typeof e!="function"){var a=String(e);wE.has(a)||(wE.add(a),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function fd(e,a,o,d){var y=e.memoizedState,v=o(d,y);if(e.mode&8){Wt(!0);try{v=o(d,y)}finally{Wt(!1)}}v===void 0&&(a=tt(a)||"Component",OE.has(a)||(OE.add(a),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",a))),y=v==null?y:Me({},y,v),e.memoizedState=y,e.lanes===0&&(e.updateQueue.baseState=y)}function rm(e,a,o,d,y,v,C){var M=e.stateNode;if(typeof M.shouldComponentUpdate=="function"){if(o=M.shouldComponentUpdate(d,v,C),e.mode&8){Wt(!0);try{o=M.shouldComponentUpdate(d,v,C)}finally{Wt(!1)}}return o===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",tt(a)||"Component"),o}return a.prototype&&a.prototype.isPureReactComponent?!Lc(o,d)||!Lc(y,v):!0}function ao(e,a,o,d){var y=a.state;typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,d),a.state!==y&&(e=et(e)||"Component",xE.has(e)||(xE.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),Q3.enqueueReplaceState(a,a.state,null))}function js(e,a){var o=a;if("ref"in a){o={};for(var d in a)d!=="ref"&&(o[d]=a[d])}if(e=e.defaultProps){o===a&&(o=Me({},o));for(var y in e)o[y]===void 0&&(o[y]=e[y])}return o}function lf(e,a){try{xp=a.source?et(a.source):null,Z3=null;var o=a.value;if(lt.actQueue!==null)lt.thrownErrors.push(o);else{var d=e.onUncaughtError;d(o,{componentStack:a.stack})}}catch(y){setTimeout(function(){throw y})}}function om(e,a,o){try{xp=o.source?et(o.source):null,Z3=et(a);var d=e.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function hd(e,a,o){return o=xl(o),o.tag=L3,o.payload={element:null},o.callback=function(){wt(a.source,lf,e,a)},o}function dd(e){return e=xl(e),e.tag=L3,e}function pd(e,a,o,d){var y=o.type.getDerivedStateFromError;if(typeof y=="function"){var v=d.value;e.payload=function(){return y(v)},e.callback=function(){Dy(o),wt(d.source,om,a,o,d)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(e.callback=function(){Dy(o),wt(d.source,om,a,o,d),typeof y!="function"&&(nc===null?nc=new Set([this]):nc.add(this)),oj(this,d),typeof y=="function"||(o.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",et(o)||"Unknown")})}function jg(e,a,o,d,y){if(o.flags|=32768,xr&&Du(e,y),d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=o.alternate,a!==null&&Ke(a,o,y,!0),fe&&(Ar=!0),o=gs.current,o!==null){switch(o.tag){case 31:case 13:return al===null?Rd():o.alternate===null&&En===Uo&&(En=u2),o.flags&=-257,o.flags|=65536,o.lanes=y,d===ky?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([d]):a.add(d),Rm(e,d,y)),!1;case 22:return o.flags|=65536,d===ky?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([d]):o.add(d)),Rm(e,d,y)),!1}throw Error("Unexpected Suspense handler tag ("+o.tag+"). This is a bug in React.")}return Rm(e,d,y),Rd(),!1}if(fe)return Ar=!0,a=gs.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,d!==_3&&su(ea(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:d}),o))):(d!==_3&&su(ea(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:d}),o)),e=e.current.alternate,e.flags|=65536,y&=-y,e.lanes|=y,d=ea(d,o),y=hd(e.stateNode,d,y),$r(e,y),En!==Wu&&(En=Zf)),!1;var v=ea(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:d}),o);if(y1===null?y1=[v]:y1.push(v),En!==Wu&&(En=Zf),a===null)return!0;d=ea(d,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,e=y&-y,o.lanes|=e,e=hd(o.stateNode,d,e),$r(o,e),!1;case 1:if(a=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(nc===null||!nc.has(v))))return o.flags|=65536,y&=-y,o.lanes|=y,y=dd(y),pd(y,e,o,d),$r(o,y),!1}o=o.return}while(o!==null);return!1}function On(e,a,o,d){a.child=e===null?pE(a,null,o,d):Kf(a,e.child,o,d)}function um(e,a,o,d,y){o=o.render;var v=a.ref;if("ref"in d){var C={};for(var M in d)M!=="ref"&&(C[M]=d[M])}else C=d;return Ii(a),d=vi(e,a,o,C,v,y),M=Ih(),e!==null&&!la?(Wh(e,a,y),os(e,a,y)):(fe&&M&&pl(a),a.flags|=1,On(e,a,d,y),a.child)}function cm(e,a,o,d,y){if(e===null){var v=o.type;return typeof v=="function"&&!Ud(v)&&v.defaultProps===void 0&&o.compare===null?(o=co(v),a.tag=15,a.type=o,Ol(a,v),be(e,a,o,d,y)):(e=Bd(o.type,null,d,a,a.mode,y),e.ref=a.ref,e.return=a,a.child=e)}if(v=e.child,!ae(e,y)){var C=v.memoizedProps;if(o=o.compare,o=o!==null?o:Lc,o(C,d)&&e.ref===a.ref)return os(e,a,y)}return a.flags|=1,e=wl(v,d),e.ref=a.ref,e.return=a,a.child=e}function be(e,a,o,d,y){if(e!==null){var v=e.memoizedProps;if(Lc(v,d)&&e.ref===a.ref&&a.type===e.type)if(la=!1,a.pendingProps=d=v,ae(e,y))(e.flags&131072)!==0&&(la=!0);else return a.lanes=e.lanes,os(e,a,y)}return of(e,a,o,d,y)}function md(e,a,o,d){var y=d.children,v=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:o1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,e!==null){for(d=a.child=e.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~v}else d=0,a.child=null;return fm(e,a,v,o,d)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&jc(a,v!==null?v.cachePool:null),v!==null?F0(a,v):Qh(a),Jh(a);else return d=a.lanes=536870912,fm(e,a,v!==null?v.baseLanes|o:o,o,d)}else v!==null?(jc(a,v.cachePool),F0(a,v),is(a),a.memoizedState=null):(e!==null&&jc(a,null),Qh(a),is(a));return On(e,a,y,o),a.child}function rf(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:o1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function fm(e,a,o,d,y){var v=Gh();return v=v===null?null:{parent:Ka?Un._currentValue:Un._currentValue2,pool:v},a.memoizedState={baseLanes:o,cachePool:v},e!==null&&jc(a,null),Qh(a),Jh(a),e!==null&&Ke(e,a,d,!0),a.childLanes=y,null}function gd(e,a){var o=a.hidden;return o!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
116
116
  - <Activity %s>
117
- + <Activity %s>`,o===!0?"hidden":o===!1?"hidden={false}":"hidden={...}",o?'mode="hidden"':'mode="visible"'),a=uf({mode:a.mode,children:a.children},e.mode),a.ref=e.ref,e.child=a,a.return=e,a}function Lg(e,a,o){return qf(a,e.child,null,o),e=pd(a,a.pendingProps),e.flags|=2,La(a),a.memoizedState=null,e}function t3(e,a,o){var d=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,e===null){if(he){if(d.mode==="hidden")return e=pd(a,d),a.lanes=536870912,sf(null,e);if(Kh(a),(e=vn)?(o=re(e,Is),o!==null&&(d={dehydrated:o,treeContext:_c(),retryLane:536870912,hydrationErrors:null},a.memoizedState=d,d=fo(o),d.return=a,a.child=d,Qa=a,vn=null)):o=null,o===null)throw lu(a,e),As(a);return a.lanes=536870912,null}return pd(a,d)}var v=e.memoizedState;if(v!==null){var C=v.dehydrated;if(Kh(a),y)if(a.flags&256)a.flags&=-257,a=Lg(e,a,o);else if(a.memoizedState!==null)a.child=e.child,a.flags|=128,a=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(ml(),(o&536870912)!==0&&Md(a),la||Ye(e,a,o,!1),y=(o&e.childLanes)!==0,la||y){if(d=Xe,d!==null&&(C=le(d,o),C!==0&&C!==v.retryLane))throw v.retryLane=C,_a(e,C),Ie(d,e,C),J3;Nd(),a=Lg(e,a,o)}else e=v.treeContext,Na&&(vn=tp(C),Qa=a,he=!0,Ju=null,_r=!1,ms=null,Is=!1,e!==null&&O0(a,e)),a=pd(a,d),a.flags|=4096;return a}return v=e.child,d={mode:d.mode,children:d.children},(o&536870912)!==0&&(o&e.lanes)!==0&&Md(a),e=Ol(v,d),e.ref=a.ref,a.child=e,e.return=a,e}function md(e,a){var o=a.ref;if(o===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==o)&&(a.flags|=4194816)}}function lf(e,a,o,d,y){if(o.prototype&&typeof o.prototype.render=="function"){var v=et(o)||"Unknown";wE[v]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",v,v),wE[v]=!0)}return a.mode&8&&jl.recordLegacyContextWarning(a,null),e===null&&(Dl(a,a.type),o.contextTypes&&(v=et(o)||"Unknown",BE[v]||(BE[v]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",v)))),Ii(a),o=gi(e,a,o,d,void 0,y),d=Fh(),e!==null&&!la?(kh(e,a,y),os(e,a,y)):(he&&d&&Wl(a),a.flags|=1,On(e,a,o,y),a.child)}function Vs(e,a,o,d,y,v){return Ii(a),Ho=-1,c1=e!==null&&e.type!==a.type,a.updateQueue=null,o=Jh(a,d,o,y),Jc(e,a),d=Fh(),e!==null&&!la?(kh(e,a,v),os(e,a,v)):(he&&d&&Wl(a),a.flags|=1,On(e,a,o,v),a.child)}function fm(e,a,o,d,y){switch(m(a)){case!1:var v=a.stateNode,C=new a.type(a.memoizedProps,v.context).state;v.updater.enqueueSetState(v,C,null);break;case!0:a.flags|=128,a.flags|=65536,v=Error("Simulated error coming from DevTools");var M=y&-y;if(a.lanes|=M,C=Xe,C===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");M=fd(M),hd(M,C,a,Ht(v,a)),$r(a,M)}if(Ii(a),a.stateNode===null){if(C=tn,v=o.contextType,"contextType"in o&&v!==null&&(v===void 0||v.$$typeof!==Rn)&&!zE.has(o)&&(zE.add(o),M=v===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof v!="object"?" However, it is set to a "+typeof v+".":v.$$typeof===po?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(v).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",et(o)||"Component",M)),typeof v=="object"&&v!==null&&(C=Ve(v)),v=new o(d,C),a.mode&8){At(!0);try{v=new o(d,C)}finally{At(!1)}}if(C=a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Q3,a.stateNode=v,v._reactInternals=a,v._reactInternalInstance=CE,typeof o.getDerivedStateFromProps=="function"&&C===null&&(C=et(o)||"Component",xE.has(C)||(xE.add(C),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",C,v.state===null?"null":"undefined",C))),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"){var B=M=C=null;if(typeof v.componentWillMount=="function"&&v.componentWillMount.__suppressDeprecationWarning!==!0?C="componentWillMount":typeof v.UNSAFE_componentWillMount=="function"&&(C="UNSAFE_componentWillMount"),typeof v.componentWillReceiveProps=="function"&&v.componentWillReceiveProps.__suppressDeprecationWarning!==!0?M="componentWillReceiveProps":typeof v.UNSAFE_componentWillReceiveProps=="function"&&(M="UNSAFE_componentWillReceiveProps"),typeof v.componentWillUpdate=="function"&&v.componentWillUpdate.__suppressDeprecationWarning!==!0?B="componentWillUpdate":typeof v.UNSAFE_componentWillUpdate=="function"&&(B="UNSAFE_componentWillUpdate"),C!==null||M!==null||B!==null){v=et(o)||"Component";var q=typeof o.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";AE.has(v)||(AE.add(v),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
117
+ + <Activity %s>`,o===!0?"hidden":o===!1?"hidden={false}":"hidden={...}",o?'mode="hidden"':'mode="visible"'),a=ff({mode:a.mode,children:a.children},e.mode),a.ref=e.ref,e.child=a,a.return=e,a}function Lg(e,a,o){return Kf(a,e.child,null,o),e=gd(a,a.pendingProps),e.flags|=2,La(a),a.memoizedState=null,e}function t3(e,a,o){var d=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,e===null){if(fe){if(d.mode==="hidden")return e=gd(a,d),a.lanes=536870912,rf(null,e);if(Zh(a),(e=Sn)?(o=re(e,tl),o!==null&&(d={dehydrated:o,treeContext:Dc(),retryLane:536870912,hydrationErrors:null},a.memoizedState=d,d=fo(o),d.return=a,a.child=d,Qa=a,Sn=null)):o=null,o===null)throw iu(a,e),Os(a);return a.lanes=536870912,null}return gd(a,d)}var v=e.memoizedState;if(v!==null){var C=v.dehydrated;if(Zh(a),y)if(a.flags&256)a.flags&=-257,a=Lg(e,a,o);else if(a.memoizedState!==null)a.child=e.child,a.flags|=128,a=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(Sl(),(o&536870912)!==0&&Od(a),la||Ke(e,a,o,!1),y=(o&e.childLanes)!==0,la||y){if(d=Ze,d!==null&&(C=pe(d,o),C!==0&&C!==v.retryLane))throw v.retryLane=C,xa(e,C),en(d,e,C),J3;Rd(),a=Lg(e,a,o)}else e=v.treeContext,Oa&&(Sn=np(C),Qa=a,fe=!0,Qu=null,Ar=!1,ms=null,tl=!1,e!==null&&R0(a,e)),a=gd(a,d),a.flags|=4096;return a}return v=e.child,d={mode:d.mode,children:d.children},(o&536870912)!==0&&(o&e.lanes)!==0&&Od(a),e=wl(v,d),e.ref=a.ref,a.child=e,e.return=a,e}function yd(e,a){var o=a.ref;if(o===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==o)&&(a.flags|=4194816)}}function of(e,a,o,d,y){if(o.prototype&&typeof o.prototype.render=="function"){var v=tt(o)||"Unknown";UE[v]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",v,v),UE[v]=!0)}return a.mode&8&&ql.recordLegacyContextWarning(a,null),e===null&&(Ol(a,a.type),o.contextTypes&&(v=tt(o)||"Unknown",VE[v]||(VE[v]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",v)))),Ii(a),o=vi(e,a,o,d,void 0,y),d=Ih(),e!==null&&!la?(Wh(e,a,y),os(e,a,y)):(fe&&d&&pl(a),a.flags|=1,On(e,a,o,y),a.child)}function Ls(e,a,o,d,y,v){return Ii(a),Ho=-1,f1=e!==null&&e.type!==a.type,a.updateQueue=null,o=kh(a,d,o,y),kc(e,a),d=Ih(),e!==null&&!la?(Wh(e,a,v),os(e,a,v)):(fe&&d&&pl(a),a.flags|=1,On(e,a,o,v),a.child)}function hm(e,a,o,d,y){switch(m(a)){case!1:var v=a.stateNode,C=new a.type(a.memoizedProps,v.context).state;v.updater.enqueueSetState(v,C,null);break;case!0:a.flags|=128,a.flags|=65536,v=Error("Simulated error coming from DevTools");var M=y&-y;if(a.lanes|=M,C=Ze,C===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");M=dd(M),pd(M,C,a,ea(v,a)),$r(a,M)}if(Ii(a),a.stateNode===null){if(C=sn,v=o.contextType,"contextType"in o&&v!==null&&(v===void 0||v.$$typeof!==Rn)&&!HE.has(o)&&(HE.add(o),M=v===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof v!="object"?" However, it is set to a "+typeof v+".":v.$$typeof===po?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(v).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",tt(o)||"Component",M)),typeof v=="object"&&v!==null&&(C=Ge(v)),v=new o(d,C),a.mode&8){Wt(!0);try{v=new o(d,C)}finally{Wt(!1)}}if(C=a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Q3,a.stateNode=v,v._reactInternals=a,v._reactInternalInstance=_E,typeof o.getDerivedStateFromProps=="function"&&C===null&&(C=tt(o)||"Component",DE.has(C)||(DE.add(C),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",C,v.state===null?"null":"undefined",C))),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"){var B=M=C=null;if(typeof v.componentWillMount=="function"&&v.componentWillMount.__suppressDeprecationWarning!==!0?C="componentWillMount":typeof v.UNSAFE_componentWillMount=="function"&&(C="UNSAFE_componentWillMount"),typeof v.componentWillReceiveProps=="function"&&v.componentWillReceiveProps.__suppressDeprecationWarning!==!0?M="componentWillReceiveProps":typeof v.UNSAFE_componentWillReceiveProps=="function"&&(M="UNSAFE_componentWillReceiveProps"),typeof v.componentWillUpdate=="function"&&v.componentWillUpdate.__suppressDeprecationWarning!==!0?B="componentWillUpdate":typeof v.UNSAFE_componentWillUpdate=="function"&&(B="UNSAFE_componentWillUpdate"),C!==null||M!==null||B!==null){v=tt(o)||"Component";var q=typeof o.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";ME.has(v)||(ME.add(v),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
118
118
 
119
119
  %s uses %s but also contains the following legacy lifecycles:%s%s%s
120
120
 
@@ -122,8 +122,8 @@ The above lifecycles should be removed. Learn more about this warning here:
122
122
  https://react.dev/link/unsafe-component-lifecycles`,v,q,C!==null?`
123
123
  `+C:"",M!==null?`
124
124
  `+M:"",B!==null?`
125
- `+B:""))}}v=a.stateNode,C=et(o)||"Component",v.render||(o.prototype&&typeof o.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",C):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",C)),!v.getInitialState||v.getInitialState.isReactClassApproved||v.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",C),v.getDefaultProps&&!v.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",C),v.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",C),o.childContextTypes&&!RE.has(o)&&(RE.add(o),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",C)),o.contextTypes&&!OE.has(o)&&(OE.add(o),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",C)),typeof v.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",C),o.prototype&&o.prototype.isPureReactComponent&&typeof v.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",et(o)||"A pure component"),typeof v.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",C),typeof v.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",C),typeof v.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",C),typeof v.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",C),M=v.props!==d,v.props!==void 0&&M&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",C),v.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",C,C),typeof v.getSnapshotBeforeUpdate!="function"||typeof v.componentDidUpdate=="function"||DE.has(o)||(DE.add(o),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",et(o))),typeof v.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",C),typeof v.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",C),typeof o.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",C),(M=v.state)&&(typeof M!="object"||Pn(M))&&console.error("%s.state: must be set to an object or null",C),typeof v.getChildContext=="function"&&typeof o.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",C),v=a.stateNode,v.props=d,v.state=a.memoizedState,v.refs={},Yh(a),C=o.contextType,v.context=typeof C=="object"&&C!==null?Ve(C):tn,v.state===d&&(C=et(o)||"Component",ME.has(C)||(ME.add(C),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",C))),a.mode&8&&jl.recordLegacyContextWarning(a,v),jl.recordUnsafeLifecycleWarnings(a,v),v.state=a.memoizedState,C=o.getDerivedStateFromProps,typeof C=="function"&&(ud(a,o,C,d),v.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(C=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),C!==v.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",nt(a)||"Component"),Q3.enqueueReplaceState(v,v.state,null)),Xc(a,d,v,y),mu(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Kt&&(a.flags|=134217728),v=!0}else if(e===null){v=a.stateNode;var ct=a.memoizedProps;M=Bs(o,ct),v.props=M;var ht=v.context;B=o.contextType,C=tn,typeof B=="object"&&B!==null&&(C=Ve(B)),q=o.getDerivedStateFromProps,B=typeof q=="function"||typeof v.getSnapshotBeforeUpdate=="function",ct=a.pendingProps!==ct,B||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(ct||ht!==C)&&ao(a,v,d,C),$u=!1;var yt=a.memoizedState;v.state=yt,Xc(a,d,v,y),mu(),ht=a.memoizedState,ct||yt!==ht||$u?(typeof q=="function"&&(ud(a,o,q,d),ht=a.memoizedState),(M=$u||lm(a,o,M,d,yt,ht,C))?(B||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Kt&&(a.flags|=134217728)):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Kt&&(a.flags|=134217728),a.memoizedProps=d,a.memoizedState=ht),v.props=d,v.state=ht,v.context=C,v=M):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Kt&&(a.flags|=134217728),v=!1)}else{v=a.stateNode,qh(e,a),C=a.memoizedProps,B=Bs(o,C),v.props=B,q=a.pendingProps,yt=v.context,ht=o.contextType,M=tn,typeof ht=="object"&&ht!==null&&(M=Ve(ht)),ct=o.getDerivedStateFromProps,(ht=typeof ct=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(C!==q||yt!==M)&&ao(a,v,d,M),$u=!1,yt=a.memoizedState,v.state=yt,Xc(a,d,v,y),mu();var Vt=a.memoizedState;C!==q||yt!==Vt||$u||e!==null&&e.dependencies!==null&&kr(e.dependencies)?(typeof ct=="function"&&(ud(a,o,ct,d),Vt=a.memoizedState),(B=$u||lm(a,o,B,d,yt,Vt,M)||e!==null&&e.dependencies!==null&&kr(e.dependencies))?(ht||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,Vt,M),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,Vt,M)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||C===e.memoizedProps&&yt===e.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&yt===e.memoizedState||(a.flags|=1024),a.memoizedProps=d,a.memoizedState=Vt),v.props=d,v.state=Vt,v.context=M,v=B):(typeof v.componentDidUpdate!="function"||C===e.memoizedProps&&yt===e.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&yt===e.memoizedState||(a.flags|=1024),v=!1)}if(M=v,md(e,a),C=(a.flags&128)!==0,M||C){if(M=a.stateNode,Mc(a),C&&typeof o.getDerivedStateFromError!="function")o=null,Ci=-1;else if(o=$9(M),a.mode&8){At(!0);try{$9(M)}finally{At(!1)}}a.flags|=1,e!==null&&C?(a.child=qf(a,e.child,null,y),a.child=qf(a,null,o,y)):On(e,a,o,y),a.memoizedState=M.state,e=a.child}else e=os(e,a,y);return y=a.stateNode,v&&y.props!==d&&(_p||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",nt(a)||"a component"),_p=!0),e}function rf(e,a,o,d){return vl(),a.flags|=256,On(e,a,o,d),a.child}function Dl(e,a){a&&a.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
126
- %s.childContextTypes = ...`,a.displayName||a.name||"Component"),typeof a.getDerivedStateFromProps=="function"&&(e=et(a)||"Unknown",VE[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),VE[e]=!0)),typeof a.contextType=="object"&&a.contextType!==null&&(a=et(a)||"Unknown",UE[a]||(console.error("%s: Function components do not support contextType.",a),UE[a]=!0))}function of(e){return{baseLanes:e,cachePool:Vh()}}function gd(e,a,o){return e=e!==null?e.childLanes&~o:0,a&&(e|=Xi),e}function yd(e,a,o){var d=a.pendingProps;p(a)&&(a.flags|=128);var y=!1,v=(a.flags&128)!==0,C;if((C=v)||(C=e!==null&&e.memoizedState===null?!1:(In.current&o1)!==0),C&&(y=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,e===null){if(he){if(y?Hs(a):is(a),(e=vn)?(o=Le(e,Is),o!==null&&(C={dehydrated:o,treeContext:_c(),retryLane:536870912,hydrationErrors:null},a.memoizedState=C,C=fo(o),C.return=a,a.child=C,Qa=a,vn=null)):o=null,o===null)throw lu(a,e),As(a);return Id(o)?a.lanes=32:a.lanes=536870912,null}var M=d.children;return d=d.fallback,y?(is(a),y=a.mode,M=uf({mode:"hidden",children:M},y),d=hr(d,y,o,null),M.return=a,d.return=a,M.sibling=d,a.child=M,d=a.child,d.memoizedState=of(o),d.childLanes=gd(e,C,o),a.memoizedState=F3,sf(null,d)):(Hs(a),hm(a,M))}var B=e.memoizedState;if(B!==null&&(M=B.dehydrated,M!==null)){if(v)a.flags&256?(Hs(a),a.flags&=-257,a=vd(e,a,o)):a.memoizedState!==null?(is(a),a.child=e.child,a.flags|=128,a=null):(is(a),M=d.fallback,y=a.mode,d=uf({mode:"visible",children:d.children},y),M=hr(M,y,o,null),M.flags|=2,d.return=a,M.return=a,d.sibling=M,a.child=d,qf(a,e.child,null,o),d=a.child,d.memoizedState=of(o),d.childLanes=gd(e,C,o),a.memoizedState=F3,a=sf(null,d));else if(Hs(a),ml(),(o&536870912)!==0&&Md(a),Id(M))y=aa(M),C=y.digest,M=y.message,d=y.stack,y=y.componentStack,M=Error(M||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),M.stack=d||"",M.digest=C,C=y===void 0?null:y,d={value:M,source:null,stack:C},typeof C=="string"&&C3.set(M,d),ru(d),a=vd(e,a,o);else if(la||Ye(e,a,o,!1),C=(o&e.childLanes)!==0,la||C){if(C=Xe,C!==null&&(d=le(C,o),d!==0&&d!==B.retryLane))throw B.retryLane=d,_a(e,d),Ie(C,e,d),J3;Mf(M)||Nd(),a=vd(e,a,o)}else Mf(M)?(a.flags|=192,a.child=e.child,a=null):(e=B.treeContext,Na&&(vn=ep(M),Qa=a,he=!0,Ju=null,_r=!1,ms=null,Is=!1,e!==null&&O0(a,e)),a=hm(a,d.children),a.flags|=4096);return a}return y?(is(a),M=d.fallback,y=a.mode,B=e.child,v=B.sibling,d=Ol(B,{mode:"hidden",children:d.children}),d.subtreeFlags=B.subtreeFlags&65011712,v!==null?M=Ol(v,M):(M=hr(M,y,o,null),M.flags|=2),M.return=a,d.return=a,d.sibling=M,a.child=d,sf(null,d),d=a.child,M=e.child.memoizedState,M===null?M=of(o):(y=M.cachePool,y!==null?(B=Ka?Un._currentValue:Un._currentValue2,y=y.parent!==B?{parent:B,pool:B}:y):y=Vh(),M={baseLanes:M.baseLanes|o,cachePool:y}),d.memoizedState=M,d.childLanes=gd(e,C,o),a.memoizedState=F3,sf(e.child,d)):(B!==null&&(o&62914560)===o&&(o&e.lanes)!==0&&Md(a),Hs(a),o=e.child,e=o.sibling,o=Ol(o,{mode:"visible",children:d.children}),o.return=a,o.sibling=null,e!==null&&(C=a.deletions,C===null?(a.deletions=[e],a.flags|=16):C.push(e)),a.child=o,a.memoizedState=null,o)}function hm(e,a){return a=uf({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function uf(e,a){return e=S(22,e,null,a),e.lanes=0,e}function vd(e,a,o){return qf(a,e.child,null,o),e=hm(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function dm(e,a,o){e.lanes|=a;var d=e.alternate;d!==null&&(d.lanes|=a),Oc(e.return,a,o)}function Sd(e,a,o,d,y,v){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:y,treeForkCount:v}:(C.isBackwards=a,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=o,C.tailMode=y,C.treeForkCount=v)}function pm(e,a,o){var d=a.pendingProps,y=d.revealOrder,v=d.tail,C=d.children,M=In.current;if((d=(M&o1)!==0)?(M=M&bp|o1,a.flags|=128):M&=bp,dt(In,M,a),M=y??"null",y!=="forwards"&&y!=="unstable_legacy-backwards"&&y!=="together"&&y!=="independent"&&!GE[M])if(GE[M]=!0,y==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(y==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof y=="string")switch(y.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',y,y.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',y,y.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y);M=v??"null",n2[M]||(v==null?(y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&(n2[M]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):v!=="visible"&&v!=="collapsed"&&v!=="hidden"?(n2[M]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',v)):y!=="forwards"&&y!=="backwards"&&y!=="unstable_legacy-backwards"&&(n2[M]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',v)));t:if((y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&C!==void 0&&C!==null&&C!==!1)if(Pn(C)){for(M=0;M<C.length;M++)if(!K0(C[M],M))break t}else if(M=I(C),typeof M=="function"){if(M=M.call(C))for(var B=M.next(),q=0;!B.done;B=M.next()){if(!K0(B.value,q))break t;q++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',y);if(On(e,a,C,o),he?(fl(),C=Qm):C=0,!d&&e!==null&&(e.flags&128)!==0)t:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dm(e,o,a);else if(e.tag===19)dm(e,o,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break t;for(;e.sibling===null;){if(e.return===null||e.return===a)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(y){case"forwards":for(o=a.child,y=null;o!==null;)e=o.alternate,e!==null&&Zc(e)===null&&(y=o),o=o.sibling;o=y,o===null?(y=a.child,a.child=null):(y=o.sibling,o.sibling=null),Sd(a,!1,y,o,v,C);break;case"backwards":case"unstable_legacy-backwards":for(o=null,y=a.child,a.child=null;y!==null;){if(e=y.alternate,e!==null&&Zc(e)===null){a.child=y;break}e=y.sibling,y.sibling=o,o=y,y=e}Sd(a,!0,o,null,v,C);break;case"together":Sd(a,!1,null,null,void 0,C);break;default:a.memoizedState=null}return a.child}function os(e,a,o){if(e!==null&&(a.dependencies=e.dependencies),Ci=-1,nc|=a.lanes,(o&a.childLanes)===0)if(e!==null){if(Ye(e,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error("Resuming work not yet implemented.");if(a.child!==null){for(e=a.child,o=Ol(e,e.pendingProps),a.child=o,o.return=a;e.sibling!==null;)e=e.sibling,o=o.sibling=Ol(e,e.pendingProps),o.return=a;o.sibling=null}return a.child}function ne(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&kr(e)))}function e3(e,a,o){switch(a.tag){case 3:xc(a,a.stateNode.containerInfo),Ms(a,Un,e.memoizedState.cache),vl();break;case 27:case 5:Kr(a);break;case 4:xc(a,a.stateNode.containerInfo);break;case 10:Ms(a,a.type,a.memoizedProps.value);break;case 12:(o&a.childLanes)!==0&&(a.flags|=4),a.flags|=2048;var d=a.stateNode;d.effectDuration=-0,d.passiveEffectDuration=-0;break;case 31:if(a.memoizedState!==null)return a.flags|=128,Kh(a),null;break;case 13:if(d=a.memoizedState,d!==null)return d.dehydrated!==null?(Hs(a),a.flags|=128,null):(o&a.child.childLanes)!==0?yd(e,a,o):(Hs(a),e=os(e,a,o),e!==null?e.sibling:null);Hs(a);break;case 19:var y=(e.flags&128)!==0;if(d=(o&a.childLanes)!==0,d||(Ye(e,a,o,!1),d=(o&a.childLanes)!==0),y){if(d)return pm(e,a,o);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),dt(In,In.current,a),d)break;return null;case 22:return a.lanes=0,dd(e,a,o,a.pendingProps);case 24:Ms(a,Un,e.memoizedState.cache)}return os(e,a,o)}function Ya(e,a,o){if(a._debugNeedsRemount&&e!==null){o=wd(a.type,a.key,a.pendingProps,a._debugOwner||null,a.mode,a.lanes),o._debugStack=a._debugStack,o._debugTask=a._debugTask;var d=a.return;if(d===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,a.alternate=null,o.index=a.index,o.sibling=a.sibling,o.return=a.return,o.ref=a.ref,o._debugInfo=a._debugInfo,a===d.child)d.child=o;else{var y=d.child;if(y===null)throw Error("Expected parent to have a child.");for(;y.sibling!==a;)if(y=y.sibling,y===null)throw Error("Expected to find the previous sibling.");y.sibling=o}return a=d.deletions,a===null?(d.deletions=[e],d.flags|=16):a.push(e),o.flags|=2,o}if(e!==null)if(e.memoizedProps!==a.pendingProps||a.type!==e.type)la=!0;else{if(!ne(e,o)&&(a.flags&128)===0)return la=!1,e3(e,a,o);la=(e.flags&131072)!==0}else la=!1,(d=he)&&(fl(),d=(a.flags&1048576)!==0),d&&(d=a.index,fl(),qr(a,Qm,d));switch(a.lanes=0,a.tag){case 16:t:if(d=a.pendingProps,e=bl(a.elementType),a.type=e,typeof e=="function")Hd(e)?(d=Bs(e,d),a.tag=1,a.type=e=co(e),a=fm(null,a,e,d,o)):(a.tag=0,Dl(a,e),a.type=e=co(e),a=lf(null,a,e,d,o));else{if(e!=null){if(y=e.$$typeof,y===Sa){a.tag=11,a.type=e=zd(e),a=om(null,a,e,d,o);break t}else if(y===zu){a.tag=14,a=um(null,a,e,d,o);break t}}throw a="",e!==null&&typeof e=="object"&&e.$$typeof===li&&(a=" Did you wrap a component in React.lazy() more than once?"),e=et(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+e+". Lazy element type must resolve to a class or function."+a)}return a;case 0:return lf(e,a,a.type,a.pendingProps,o);case 1:return d=a.type,y=Bs(d,a.pendingProps),fm(e,a,d,y,o);case 3:t:{if(xc(a,a.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");var v=a.pendingProps;y=a.memoizedState,d=y.element,qh(e,a),Xc(a,v,null,o);var C=a.memoizedState;if(v=C.cache,Ms(a,Un,v),v!==y.cache&&pa(a,[Un],o,!0),mu(),v=C.element,Na&&y.isDehydrated)if(y={element:v,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=rf(e,a,v,o);break t}else if(v!==d){d=Ht(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),a),ru(d),a=rf(e,a,v,o);break t}else for(Na&&(vn=$d(a.stateNode.containerInfo),Qa=a,he=!0,Ju=null,_r=!1,ms=null,Is=!0),e=dE(a,null,v,o),a.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling;else{if(vl(),v===d){a=os(e,a,o);break t}On(e,a,v,o)}a=a.child}return a;case 26:if(we)return md(e,a),e===null?(e=Js(a.type,null,a.pendingProps,null))?a.memoizedState=e:he||(a.stateNode=l(a.type,a.pendingProps,Wa(Zu.current),a)):a.memoizedState=Js(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:if(T)return Kr(a),e===null&&T&&he&&(y=Wa(Zu.current),d=pi(),y=a.stateNode=z(a.type,a.pendingProps,y,d,!1),_r||(d=Rf(y,a.type,a.pendingProps,d),d!==null&&(pl(a,0).serverProps=d)),Qa=a,Is=!0,vn=np(a.type,y,vn)),On(e,a,a.pendingProps.children,o),md(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&he&&(v=pi(),d=ip(a.type,a.pendingProps,v),y=vn,(C=!y)||(C=Nf(y,a.type,a.pendingProps,Is),C!==null?(a.stateNode=C,_r||(v=Rf(C,a.type,a.pendingProps,v),v!==null&&(pl(a,0).serverProps=v)),Qa=a,vn=Wd(C),Is=!1,v=!0):v=!1,C=!v),C&&(d&&lu(a,y),As(a))),Kr(a),y=a.type,v=a.pendingProps,C=e!==null?e.memoizedProps:null,d=v.children,se(y,v)?d=null:C!==null&&se(y,C)&&(a.flags|=32),a.memoizedState!==null&&(y=gi(e,a,F0,null,null,o),Ka?ji._currentValue=y:ji._currentValue2=y),md(e,a),On(e,a,d,o),a.child;case 6:return e===null&&he&&(e=a.pendingProps,o=pi(),e=Sr(e,o),o=vn,(d=!o)||(d=v3(o,a.pendingProps,Is),d!==null?(a.stateNode=d,Qa=a,vn=null,d=!0):d=!1,d=!d),d&&(e&&lu(a,o),As(a))),null;case 13:return yd(e,a,o);case 4:return xc(a,a.stateNode.containerInfo),d=a.pendingProps,e===null?a.child=qf(a,null,d,o):On(e,a,d,o),a.child;case 11:return om(e,a,a.type,a.pendingProps,o);case 7:return On(e,a,a.pendingProps,o),a.child;case 8:return On(e,a,a.pendingProps.children,o),a.child;case 12:return a.flags|=4,a.flags|=2048,d=a.stateNode,d.effectDuration=-0,d.passiveEffectDuration=-0,On(e,a,a.pendingProps.children,o),a.child;case 10:return d=a.type,y=a.pendingProps,v=y.value,"value"in y||jE||(jE=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Ms(a,d,v),On(e,a,y.children,o),a.child;case 9:return y=a.type._context,d=a.pendingProps.children,typeof d!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Ii(a),y=Ve(y),d=U3(d,y,void 0),a.flags|=1,On(e,a,d,o),a.child;case 14:return um(e,a,a.type,a.pendingProps,o);case 15:return be(e,a,a.type,a.pendingProps,o);case 19:return pm(e,a,o);case 31:return t3(e,a,o);case 22:return dd(e,a,o,a.pendingProps);case 24:return Ii(a),d=Ve(Un),e===null?(y=Bh(),y===null&&(y=Xe,v=uu(),y.pooledCache=v,Sl(v),v!==null&&(y.pooledCacheLanes|=o),y=v),a.memoizedState={parent:d,cache:y},Yh(a),Ms(a,Un,y)):((e.lanes&o)!==0&&(qh(e,a),Xc(a,null,null,o),mu()),y=e.memoizedState,v=a.memoizedState,y.parent!==d?(y={parent:d,cache:d},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Ms(a,Un,d)):(d=v.cache,Ms(a,Un,d),d!==y.cache&&pa(a,[Un],o,!0))),On(e,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function yi(e){e.flags|=4}function bd(e){Ks&&(e.flags|=8)}function cf(e,a){if(e!==null&&e.child===a.child)return!1;if((a.flags&16)!==0)return!0;for(e=a.child;e!==null;){if((e.flags&8218)!==0||(e.subtreeFlags&8218)!==0)return!0;e=e.sibling}return!1}function or(e,a,o,d){if($e)for(o=a.child;o!==null;){if(o.tag===5||o.tag===6)Fn(e,o.stateNode);else if(!(o.tag===4||T&&o.tag===27)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return;o=o.return}o.sibling.return=o.return,o=o.sibling}else if(Ks)for(var y=a.child;y!==null;){if(y.tag===5){var v=y.stateNode;o&&d&&(v=Zs(v,y.type,y.memoizedProps)),Fn(e,v)}else if(y.tag===6)v=y.stateNode,o&&d&&(v=wn(v,y.memoizedProps)),Fn(e,v);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)v=y.child,v!==null&&(v.return=y),or(e,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===a)break;for(;y.sibling===null;){if(y.return===null||y.return===a)return;y=y.return}y.sibling.return=y.return,y=y.sibling}}function io(e,a,o,d){var y=!1;if(Ks)for(var v=a.child;v!==null;){if(v.tag===5){var C=v.stateNode;o&&d&&(C=Zs(C,v.type,v.memoizedProps)),Fd(e,C)}else if(v.tag===6)C=v.stateNode,o&&d&&(C=wn(C,v.memoizedProps)),Fd(e,C);else if(v.tag!==4){if(v.tag===22&&v.memoizedState!==null)y=v.child,y!==null&&(y.return=v),io(e,v,!0,!0),y=!0;else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===a)break;for(;v.sibling===null;){if(v.return===null||v.return===a)return y;v=v.return}v.sibling.return=v.return,v=v.sibling}return y}function mm(e,a){if(Ks&&cf(e,a)){e=a.stateNode;var o=e.containerInfo,d=Jd();io(d,a,!1,!1),e.pendingChildren=d,yi(a),qn(o,d)}}function ff(e,a,o,d){if($e)e.memoizedProps!==d&&yi(a);else if(Ks){var y=e.stateNode,v=e.memoizedProps;if((e=cf(e,a))||v!==d){var C=pi();v=wy(y,o,v,d,!e,null),v===y?a.stateNode=y:(bd(a),We(v,o,d,C)&&yi(a),a.stateNode=v,e&&or(v,a,!1,!1))}else a.stateNode=y}}function Ed(e,a,o,d,y){if((e.mode&32)!==Kt&&(o===null?Uu(a,d):Bu(a,o,d))){if(e.flags|=16777216,(y&335544128)===y||Pd(a,d))if(pr(e.stateNode,a,d))e.flags|=8192;else if(cy())e.flags|=8192;else throw Yf=ky,V3}else e.flags&=-16777217}function Al(e,a){if(h(a)){if(e.flags|=16777216,!g(a))if(cy())e.flags|=8192;else throw Yf=ky,V3}else e.flags&=-16777217}function Cu(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?at():536870912,e.lanes|=a,Jf|=a)}function so(e,a){if(!he)switch(e.tailMode){case"hidden":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:d.sibling=null}}function ze(e){var a=e.alternate!==null&&e.alternate.child===e.child,o=0,d=0;if(a)if((e.mode&2)!==Kt){for(var y=e.selfBaseDuration,v=e.child;v!==null;)o|=v.lanes|v.childLanes,d|=v.subtreeFlags&65011712,d|=v.flags&65011712,y+=v.treeBaseDuration,v=v.sibling;e.treeBaseDuration=y}else for(y=e.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=e,y=y.sibling;else if((e.mode&2)!==Kt){y=e.actualDuration,v=e.selfBaseDuration;for(var C=e.child;C!==null;)o|=C.lanes|C.childLanes,d|=C.subtreeFlags,d|=C.flags,y+=C.actualDuration,v+=C.treeBaseDuration,C=C.sibling;e.actualDuration=y,e.treeBaseDuration=v}else for(y=e.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=e,y=y.sibling;return e.subtreeFlags|=d,e.childLanes=o,a}function gm(e,a,o){var d=a.pendingProps;switch(Nh(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(a),null;case 1:return ze(a),null;case 3:return o=a.stateNode,d=null,e!==null&&(d=e.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),ki(Un,a),Xr(a),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(yl(a)?(Oh(),yi(a)):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Nc())),mm(e,a),ze(a),null;case 26:if(we){var y=a.type,v=a.memoizedState;return e===null?(yi(a),v!==null?(ze(a),Al(a,v)):(ze(a),Ed(a,y,null,d,o))):v?v!==e.memoizedState?(yi(a),ze(a),Al(a,v)):(ze(a),a.flags&=-16777217):(v=e.memoizedProps,$e?v!==d&&yi(a):ff(e,a,y,d),ze(a),Ed(a,y,v,d,o)),null}case 27:if(T){if(Qr(a),o=Wa(Zu.current),y=a.type,e!==null&&a.stateNode!=null)$e?e.memoizedProps!==d&&yi(a):ff(e,a,y,d);else{if(!d){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ze(a),null}e=pi(),yl(a)?gl(a,e):(e=z(y,d,o,e,!0),a.stateNode=e,yi(a))}return ze(a),null}case 5:if(Qr(a),y=a.type,e!==null&&a.stateNode!=null)ff(e,a,y,d);else{if(!d){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ze(a),null}if(v=pi(),yl(a))gl(a,v),bo(a.stateNode,y,d,v)&&(a.flags|=64);else{var C=Wa(Zu.current);C=Ld(y,d,C,v,a),bd(a),or(C,a,!1,!1),a.stateNode=C,We(C,y,d,v)&&yi(a)}}return ze(a),Ed(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,o),null;case 6:if(e&&a.stateNode!=null)o=e.memoizedProps,$e?o!==d&&yi(a):Ks&&(o!==d?(e=Wa(Zu.current),o=pi(),bd(a),a.stateNode=wl(d,e,o,a)):a.stateNode=e.stateNode);else{if(typeof d!="string"&&a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=Wa(Zu.current),o=pi(),yl(a)){if(!Na)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=a.stateNode,o=a.memoizedProps,y=!_r,d=null,v=Qa,v!==null)switch(v.tag){case 3:y&&(y=Xm(e,o,d),y!==null&&(pl(a,0).serverProps=y));break;case 27:case 5:d=v.memoizedProps,y&&(y=Xm(e,o,d),y!==null&&(pl(a,0).serverProps=y))}ce(e,o,a,d)||As(a,!0)}else bd(a),a.stateNode=wl(d,e,o,a)}return ze(a),null;case 31:if(o=a.memoizedState,e===null||e.memoizedState!==null){if(d=yl(a),o!==null){if(e===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Na)throw Error("Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");He(e,a),ze(a),(a.mode&2)!==Kt&&o!==null&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration))}else Oh(),vl(),(a.flags&128)===0&&(o=a.memoizedState=null),a.flags|=4,ze(a),(a.mode&2)!==Kt&&o!==null&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration));e=!1}else o=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e)return a.flags&256?(La(a),a):(La(a),null);if((a.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return ze(a),null;case 13:if(d=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(y=d,v=yl(a),y!==null&&y.dehydrated!==null){if(e===null){if(!v)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Na)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(v=a.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");bi(v,a),ze(a),(a.mode&2)!==Kt&&y!==null&&(y=a.child,y!==null&&(a.treeBaseDuration-=y.treeBaseDuration))}else Oh(),vl(),(a.flags&128)===0&&(y=a.memoizedState=null),a.flags|=4,ze(a),(a.mode&2)!==Kt&&y!==null&&(y=a.child,y!==null&&(a.treeBaseDuration-=y.treeBaseDuration));y=!1}else y=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(La(a),a):(La(a),null)}return La(a),(a.flags&128)!==0?(a.lanes=o,(a.mode&2)!==Kt&&wc(a),a):(o=d!==null,e=e!==null&&e.memoizedState!==null,o&&(d=a.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==y&&(d.flags|=2048)),o!==e&&o&&(a.child.flags|=8192),Cu(a,a.updateQueue),ze(a),(a.mode&2)!==Kt&&o&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return Xr(a),mm(e,a),e===null&&cn(a.stateNode.containerInfo),ze(a),null;case 10:return ki(a.type,a),ze(a),null;case 19:if(lt(In,a),d=a.memoizedState,d===null)return ze(a),null;if(y=(a.flags&128)!==0,v=d.rendering,v===null)if(y)so(d,!1);else{if(bn!==Uo||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(v=Zc(e),v!==null){for(a.flags|=128,so(d,!1),e=v.updateQueue,a.updateQueue=e,Cu(a,e),a.subtreeFlags=0,e=o,o=a.child;o!==null;)Ln(o,e),o=o.sibling;return dt(In,In.current&bp|o1,a),he&&ge(a,d.treeForkCount),a.child}e=e.sibling}d.tail!==null&&fe()>y1&&(a.flags|=128,y=!0,so(d,!1),a.lanes=4194304)}else{if(!y)if(e=Zc(v),e!==null){if(a.flags|=128,y=!0,e=e.updateQueue,a.updateQueue=e,Cu(a,e),so(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!he)return ze(a),null}else 2*fe()-d.renderingStartTime>y1&&o!==536870912&&(a.flags|=128,y=!0,so(d,!1),a.lanes=4194304);d.isBackwards?(v.sibling=a.child,a.child=v):(e=d.last,e!==null?e.sibling=v:a.child=v,d.last=v)}return d.tail!==null?(e=d.tail,d.rendering=e,d.tail=e.sibling,d.renderingStartTime=fe(),e.sibling=null,o=In.current,o=y?o&bp|o1:o&bp,dt(In,o,a),he&&ge(a,d.treeForkCount),e):(ze(a),null);case 22:case 23:return La(a),Qc(a),d=a.memoizedState!==null,e!==null?e.memoizedState!==null!==d&&(a.flags|=8192):d&&(a.flags|=8192),d?(o&536870912)!==0&&(a.flags&128)===0&&(ze(a),a.subtreeFlags&6&&(a.flags|=8192)):ze(a),o=a.updateQueue,o!==null&&Cu(a,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==o&&(a.flags|=2048),e!==null&&lt(Lf,a),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ki(Un,a),ze(a),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function ur(e,a){switch(Nh(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&wc(a),a):null;case 3:return ki(Un,a),Xr(a),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return Qr(a),null;case 31:if(a.memoizedState!==null){if(La(a),a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");vl()}return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&wc(a),a):null;case 13:if(La(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");vl()}return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&wc(a),a):null;case 19:return lt(In,a),null;case 4:return Xr(a),null;case 10:return ki(a.type,a),null;case 22:case 23:return La(a),Qc(a),e!==null&&lt(Lf,a),e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&wc(a),a):null;case 24:return ki(Un,a),null;case 25:return null;default:return null}}function Td(e,a){switch(Nh(a),a.tag){case 3:ki(Un,a),Xr(a);break;case 26:case 27:case 5:Qr(a);break;case 4:Xr(a);break;case 31:a.memoizedState!==null&&La(a);break;case 13:La(a);break;case 19:lt(In,a);break;case 10:ki(a.type,a);break;case 22:case 23:La(a),Qc(a),e!==null&&lt(Lf,a);break;case 24:ki(Un,a)}}function Gs(e){return(e.mode&2)!==Kt}function ym(e,a){Gs(e)?(as(),cr(a,e),ns()):cr(a,e)}function vm(e,a,o){Gs(e)?(as(),Gt(o,e,a),ns()):Gt(o,e,a)}function cr(e,a){try{var o=a.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var y=d.next;o=y;do{if((o.tag&e)===e&&(d=void 0,(e&_i)!==Wy&&(Op=!0),d=Bt(a,oj,o),(e&_i)!==Wy&&(Op=!1),d!==void 0&&typeof d!="function")){var v=void 0;v=(o.tag&ys)!==0?"useLayoutEffect":(o.tag&_i)!==0?"useInsertionEffect":"useEffect";var C=void 0;C=d===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof d.then=="function"?`
125
+ `+B:""))}}v=a.stateNode,C=tt(o)||"Component",v.render||(o.prototype&&typeof o.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",C):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",C)),!v.getInitialState||v.getInitialState.isReactClassApproved||v.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",C),v.getDefaultProps&&!v.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",C),v.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",C),o.childContextTypes&&!zE.has(o)&&(zE.add(o),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",C)),o.contextTypes&&!RE.has(o)&&(RE.add(o),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",C)),typeof v.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",C),o.prototype&&o.prototype.isPureReactComponent&&typeof v.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",tt(o)||"A pure component"),typeof v.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",C),typeof v.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",C),typeof v.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",C),typeof v.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",C),M=v.props!==d,v.props!==void 0&&M&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",C),v.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",C,C),typeof v.getSnapshotBeforeUpdate!="function"||typeof v.componentDidUpdate=="function"||AE.has(o)||(AE.add(o),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",tt(o))),typeof v.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",C),typeof v.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",C),typeof o.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",C),(M=v.state)&&(typeof M!="object"||jn(M))&&console.error("%s.state: must be set to an object or null",C),typeof v.getChildContext=="function"&&typeof o.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",C),v=a.stateNode,v.props=d,v.state=a.memoizedState,v.refs={},Xh(a),C=o.contextType,v.context=typeof C=="object"&&C!==null?Ge(C):sn,v.state===d&&(C=tt(o)||"Component",NE.has(C)||(NE.add(C),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",C))),a.mode&8&&ql.recordLegacyContextWarning(a,v),ql.recordUnsafeLifecycleWarnings(a,v),v.state=a.memoizedState,C=o.getDerivedStateFromProps,typeof C=="function"&&(fd(a,o,C,d),v.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(C=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),C!==v.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",et(a)||"Component"),Q3.enqueueReplaceState(v,v.state,null)),Qc(a,d,v,y),du(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Kt&&(a.flags|=134217728),v=!0}else if(e===null){v=a.stateNode;var ut=a.memoizedProps;M=js(o,ut),v.props=M;var ft=v.context;B=o.contextType,C=sn,typeof B=="object"&&B!==null&&(C=Ge(B)),q=o.getDerivedStateFromProps,B=typeof q=="function"||typeof v.getSnapshotBeforeUpdate=="function",ut=a.pendingProps!==ut,B||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(ut||ft!==C)&&ao(a,v,d,C),Iu=!1;var yt=a.memoizedState;v.state=yt,Qc(a,d,v,y),du(),ft=a.memoizedState,ut||yt!==ft||Iu?(typeof q=="function"&&(fd(a,o,q,d),ft=a.memoizedState),(M=Iu||rm(a,o,M,d,yt,ft,C))?(B||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Kt&&(a.flags|=134217728)):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Kt&&(a.flags|=134217728),a.memoizedProps=d,a.memoizedState=ft),v.props=d,v.state=ft,v.context=C,v=M):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),(a.mode&16)!==Kt&&(a.flags|=134217728),v=!1)}else{v=a.stateNode,Kh(e,a),C=a.memoizedProps,B=js(o,C),v.props=B,q=a.pendingProps,yt=v.context,ft=o.contextType,M=sn,typeof ft=="object"&&ft!==null&&(M=Ge(ft)),ut=o.getDerivedStateFromProps,(ft=typeof ut=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(C!==q||yt!==M)&&ao(a,v,d,M),Iu=!1,yt=a.memoizedState,v.state=yt,Qc(a,d,v,y),du();var Vt=a.memoizedState;C!==q||yt!==Vt||Iu||e!==null&&e.dependencies!==null&&kr(e.dependencies)?(typeof ut=="function"&&(fd(a,o,ut,d),Vt=a.memoizedState),(B=Iu||rm(a,o,B,d,yt,Vt,M)||e!==null&&e.dependencies!==null&&kr(e.dependencies))?(ft||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,Vt,M),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,Vt,M)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||C===e.memoizedProps&&yt===e.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&yt===e.memoizedState||(a.flags|=1024),a.memoizedProps=d,a.memoizedState=Vt),v.props=d,v.state=Vt,v.context=M,v=B):(typeof v.componentDidUpdate!="function"||C===e.memoizedProps&&yt===e.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&yt===e.memoizedState||(a.flags|=1024),v=!1)}if(M=v,yd(e,a),C=(a.flags&128)!==0,M||C){if(M=a.stateNode,Oc(a),C&&typeof o.getDerivedStateFromError!="function")o=null,xi=-1;else if(o=tE(M),a.mode&8){Wt(!0);try{tE(M)}finally{Wt(!1)}}a.flags|=1,e!==null&&C?(a.child=Kf(a,e.child,null,y),a.child=Kf(a,null,o,y)):On(e,a,o,y),a.memoizedState=M.state,e=a.child}else e=os(e,a,y);return y=a.stateNode,v&&y.props!==d&&(Dp||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",et(a)||"a component"),Dp=!0),e}function uf(e,a,o,d){return Tl(),a.flags|=256,On(e,a,o,d),a.child}function Ol(e,a){a&&a.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
126
+ %s.childContextTypes = ...`,a.displayName||a.name||"Component"),typeof a.getDerivedStateFromProps=="function"&&(e=tt(a)||"Unknown",GE[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),GE[e]=!0)),typeof a.contextType=="object"&&a.contextType!==null&&(a=tt(a)||"Unknown",BE[a]||(console.error("%s: Function components do not support contextType.",a),BE[a]=!0))}function cf(e){return{baseLanes:e,cachePool:jh()}}function vd(e,a,o){return e=e!==null?e.childLanes&~o:0,a&&(e|=Qi),e}function Sd(e,a,o){var d=a.pendingProps;p(a)&&(a.flags|=128);var y=!1,v=(a.flags&128)!==0,C;if((C=v)||(C=e!==null&&e.memoizedState===null?!1:(kn.current&u1)!==0),C&&(y=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,e===null){if(fe){if(y?Bs(a):is(a),(e=Sn)?(o=qe(e,tl),o!==null&&(C={dehydrated:o,treeContext:Dc(),retryLane:536870912,hydrationErrors:null},a.memoizedState=C,C=fo(o),C.return=a,a.child=C,Qa=a,Sn=null)):o=null,o===null)throw iu(a,e),Os(a);return $d(o)?a.lanes=32:a.lanes=536870912,null}var M=d.children;return d=d.fallback,y?(is(a),y=a.mode,M=ff({mode:"hidden",children:M},y),d=mr(d,y,o,null),M.return=a,d.return=a,M.sibling=d,a.child=M,d=a.child,d.memoizedState=cf(o),d.childLanes=vd(e,C,o),a.memoizedState=F3,rf(null,d)):(Bs(a),dm(a,M))}var B=e.memoizedState;if(B!==null&&(M=B.dehydrated,M!==null)){if(v)a.flags&256?(Bs(a),a.flags&=-257,a=bd(e,a,o)):a.memoizedState!==null?(is(a),a.child=e.child,a.flags|=128,a=null):(is(a),M=d.fallback,y=a.mode,d=ff({mode:"visible",children:d.children},y),M=mr(M,y,o,null),M.flags|=2,d.return=a,M.return=a,d.sibling=M,a.child=d,Kf(a,e.child,null,o),d=a.child,d.memoizedState=cf(o),d.childLanes=vd(e,C,o),a.memoizedState=F3,a=rf(null,d));else if(Bs(a),Sl(),(o&536870912)!==0&&Od(a),$d(M))y=aa(M),C=y.digest,M=y.message,d=y.stack,y=y.componentStack,M=Error(M||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),M.stack=d||"",M.digest=C,C=y===void 0?null:y,d={value:M,source:null,stack:C},typeof C=="string"&&C3.set(M,d),su(d),a=bd(e,a,o);else if(la||Ke(e,a,o,!1),C=(o&e.childLanes)!==0,la||C){if(C=Ze,C!==null&&(d=pe(C,o),d!==0&&d!==B.retryLane))throw B.retryLane=d,xa(e,d),en(C,e,d),J3;Of(M)||Rd(),a=bd(e,a,o)}else Of(M)?(a.flags|=192,a.child=e.child,a=null):(e=B.treeContext,Oa&&(Sn=ap(M),Qa=a,fe=!0,Qu=null,Ar=!1,ms=null,tl=!1,e!==null&&R0(a,e)),a=dm(a,d.children),a.flags|=4096);return a}return y?(is(a),M=d.fallback,y=a.mode,B=e.child,v=B.sibling,d=wl(B,{mode:"hidden",children:d.children}),d.subtreeFlags=B.subtreeFlags&65011712,v!==null?M=wl(v,M):(M=mr(M,y,o,null),M.flags|=2),M.return=a,d.return=a,d.sibling=M,a.child=d,rf(null,d),d=a.child,M=e.child.memoizedState,M===null?M=cf(o):(y=M.cachePool,y!==null?(B=Ka?Un._currentValue:Un._currentValue2,y=y.parent!==B?{parent:B,pool:B}:y):y=jh(),M={baseLanes:M.baseLanes|o,cachePool:y}),d.memoizedState=M,d.childLanes=vd(e,C,o),a.memoizedState=F3,rf(e.child,d)):(B!==null&&(o&62914560)===o&&(o&e.lanes)!==0&&Od(a),Bs(a),o=e.child,e=o.sibling,o=wl(o,{mode:"visible",children:d.children}),o.return=a,o.sibling=null,e!==null&&(C=a.deletions,C===null?(a.deletions=[e],a.flags|=16):C.push(e)),a.child=o,a.memoizedState=null,o)}function dm(e,a){return a=ff({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function ff(e,a){return e=S(22,e,null,a),e.lanes=0,e}function bd(e,a,o){return Kf(a,e.child,null,o),e=dm(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function pm(e,a,o){e.lanes|=a;var d=e.alternate;d!==null&&(d.lanes|=a),zc(e.return,a,o)}function Ed(e,a,o,d,y,v){var C=e.memoizedState;C===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:y,treeForkCount:v}:(C.isBackwards=a,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=o,C.tailMode=y,C.treeForkCount=v)}function mm(e,a,o){var d=a.pendingProps,y=d.revealOrder,v=d.tail,C=d.children,M=kn.current;if((d=(M&u1)!==0)?(M=M&Tp|u1,a.flags|=128):M&=Tp,ht(kn,M,a),M=y??"null",y!=="forwards"&&y!=="unstable_legacy-backwards"&&y!=="together"&&y!=="independent"&&!jE[M])if(jE[M]=!0,y==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(y==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof y=="string")switch(y.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',y,y.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',y,y.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',y);M=v??"null",n2[M]||(v==null?(y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&(n2[M]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):v!=="visible"&&v!=="collapsed"&&v!=="hidden"?(n2[M]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',v)):y!=="forwards"&&y!=="backwards"&&y!=="unstable_legacy-backwards"&&(n2[M]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',v)));t:if((y==="forwards"||y==="backwards"||y==="unstable_legacy-backwards")&&C!==void 0&&C!==null&&C!==!1)if(jn(C)){for(M=0;M<C.length;M++)if(!Q0(C[M],M))break t}else if(M=$(C),typeof M=="function"){if(M=M.call(C))for(var B=M.next(),q=0;!B.done;B=M.next()){if(!Q0(B.value,q))break t;q++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',y);if(On(e,a,C,o),fe?(ml(),C=Zm):C=0,!d&&e!==null&&(e.flags&128)!==0)t:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pm(e,o,a);else if(e.tag===19)pm(e,o,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break t;for(;e.sibling===null;){if(e.return===null||e.return===a)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(y){case"forwards":for(o=a.child,y=null;o!==null;)e=o.alternate,e!==null&&Fc(e)===null&&(y=o),o=o.sibling;o=y,o===null?(y=a.child,a.child=null):(y=o.sibling,o.sibling=null),Ed(a,!1,y,o,v,C);break;case"backwards":case"unstable_legacy-backwards":for(o=null,y=a.child,a.child=null;y!==null;){if(e=y.alternate,e!==null&&Fc(e)===null){a.child=y;break}e=y.sibling,y.sibling=o,o=y,y=e}Ed(a,!0,o,null,v,C);break;case"together":Ed(a,!1,null,null,void 0,C);break;default:a.memoizedState=null}return a.child}function os(e,a,o){if(e!==null&&(a.dependencies=e.dependencies),xi=-1,tc|=a.lanes,(o&a.childLanes)===0)if(e!==null){if(Ke(e,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error("Resuming work not yet implemented.");if(a.child!==null){for(e=a.child,o=wl(e,e.pendingProps),a.child=o,o.return=a;e.sibling!==null;)e=e.sibling,o=o.sibling=wl(e,e.pendingProps),o.return=a;o.sibling=null}return a.child}function ae(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&kr(e)))}function e3(e,a,o){switch(a.tag){case 3:Ac(a,a.stateNode.containerInfo),Rs(a,Un,e.memoizedState.cache),Tl();break;case 27:case 5:Kr(a);break;case 4:Ac(a,a.stateNode.containerInfo);break;case 10:Rs(a,a.type,a.memoizedProps.value);break;case 12:(o&a.childLanes)!==0&&(a.flags|=4),a.flags|=2048;var d=a.stateNode;d.effectDuration=-0,d.passiveEffectDuration=-0;break;case 31:if(a.memoizedState!==null)return a.flags|=128,Zh(a),null;break;case 13:if(d=a.memoizedState,d!==null)return d.dehydrated!==null?(Bs(a),a.flags|=128,null):(o&a.child.childLanes)!==0?Sd(e,a,o):(Bs(a),e=os(e,a,o),e!==null?e.sibling:null);Bs(a);break;case 19:var y=(e.flags&128)!==0;if(d=(o&a.childLanes)!==0,d||(Ke(e,a,o,!1),d=(o&a.childLanes)!==0),y){if(d)return mm(e,a,o);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ht(kn,kn.current,a),d)break;return null;case 22:return a.lanes=0,md(e,a,o,a.pendingProps);case 24:Rs(a,Un,e.memoizedState.cache)}return os(e,a,o)}function Ya(e,a,o){if(a._debugNeedsRemount&&e!==null){o=Bd(a.type,a.key,a.pendingProps,a._debugOwner||null,a.mode,a.lanes),o._debugStack=a._debugStack,o._debugTask=a._debugTask;var d=a.return;if(d===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,a.alternate=null,o.index=a.index,o.sibling=a.sibling,o.return=a.return,o.ref=a.ref,o._debugInfo=a._debugInfo,a===d.child)d.child=o;else{var y=d.child;if(y===null)throw Error("Expected parent to have a child.");for(;y.sibling!==a;)if(y=y.sibling,y===null)throw Error("Expected to find the previous sibling.");y.sibling=o}return a=d.deletions,a===null?(d.deletions=[e],d.flags|=16):a.push(e),o.flags|=2,o}if(e!==null)if(e.memoizedProps!==a.pendingProps||a.type!==e.type)la=!0;else{if(!ae(e,o)&&(a.flags&128)===0)return la=!1,e3(e,a,o);la=(e.flags&131072)!==0}else la=!1,(d=fe)&&(ml(),d=(a.flags&1048576)!==0),d&&(d=a.index,ml(),He(a,Zm,d));switch(a.lanes=0,a.tag){case 16:t:if(d=a.pendingProps,e=_l(a.elementType),a.type=e,typeof e=="function")Ud(e)?(d=js(e,d),a.tag=1,a.type=e=co(e),a=hm(null,a,e,d,o)):(a.tag=0,Ol(a,e),a.type=e=co(e),a=of(null,a,e,d,o));else{if(e!=null){if(y=e.$$typeof,y===Sa){a.tag=11,a.type=e=wd(e),a=um(null,a,e,d,o);break t}else if(y===Ou){a.tag=14,a=cm(null,a,e,d,o);break t}}throw a="",e!==null&&typeof e=="object"&&e.$$typeof===oi&&(a=" Did you wrap a component in React.lazy() more than once?"),e=tt(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+e+". Lazy element type must resolve to a class or function."+a)}return a;case 0:return of(e,a,a.type,a.pendingProps,o);case 1:return d=a.type,y=js(d,a.pendingProps),hm(e,a,d,y,o);case 3:t:{if(Ac(a,a.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");var v=a.pendingProps;y=a.memoizedState,d=y.element,Kh(e,a),Qc(a,v,null,o);var C=a.memoizedState;if(v=C.cache,Rs(a,Un,v),v!==y.cache&&pa(a,[Un],o,!0),du(),v=C.element,Oa&&y.isDehydrated)if(y={element:v,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=uf(e,a,v,o);break t}else if(v!==d){d=ea(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),a),su(d),a=uf(e,a,v,o);break t}else for(Oa&&(Sn=ep(a.stateNode.containerInfo),Qa=a,fe=!0,Qu=null,Ar=!1,ms=null,tl=!0),e=pE(a,null,v,o),a.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling;else{if(Tl(),v===d){a=os(e,a,o);break t}On(e,a,v,o)}a=a.child}return a;case 26:if(Be)return yd(e,a),e===null?(e=Is(a.type,null,a.pendingProps,null))?a.memoizedState=e:fe||(a.stateNode=l(a.type,a.pendingProps,ti(Ku.current),a)):a.memoizedState=Is(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:if(T)return Kr(a),e===null&&T&&fe&&(y=ti(Ku.current),d=gi(),y=a.stateNode=z(a.type,a.pendingProps,y,d,!1),Ar||(d=Hf(y,a.type,a.pendingProps,d),d!==null&&(vl(a,0).serverProps=d)),Qa=a,tl=!0,Sn=ip(a.type,y,Sn)),On(e,a,a.pendingProps.children,o),yd(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&fe&&(v=gi(),d=lp(a.type,a.pendingProps,v),y=Sn,(C=!y)||(C=Rf(y,a.type,a.pendingProps,tl),C!==null?(a.stateNode=C,Ar||(v=Hf(C,a.type,a.pendingProps,v),v!==null&&(vl(a,0).serverProps=v)),Qa=a,Sn=tp(C),tl=!1,v=!0):v=!1,C=!v),C&&(d&&iu(a,y),Os(a))),Kr(a),y=a.type,v=a.pendingProps,C=e!==null?e.memoizedProps:null,d=v.children,le(y,v)?d=null:C!==null&&le(y,C)&&(a.flags|=32),a.memoizedState!==null&&(y=vi(e,a,k0,null,null,o),Ka?Pi._currentValue=y:Pi._currentValue2=y),yd(e,a),On(e,a,d,o),a.child;case 6:return e===null&&fe&&(e=a.pendingProps,o=gi(),e=Tr(e,o),o=Sn,(d=!o)||(d=v3(o,a.pendingProps,tl),d!==null?(a.stateNode=d,Qa=a,Sn=null,d=!0):d=!1,d=!d),d&&(e&&iu(a,o),Os(a))),null;case 13:return Sd(e,a,o);case 4:return Ac(a,a.stateNode.containerInfo),d=a.pendingProps,e===null?a.child=Kf(a,null,d,o):On(e,a,d,o),a.child;case 11:return um(e,a,a.type,a.pendingProps,o);case 7:return On(e,a,a.pendingProps,o),a.child;case 8:return On(e,a,a.pendingProps.children,o),a.child;case 12:return a.flags|=4,a.flags|=2048,d=a.stateNode,d.effectDuration=-0,d.passiveEffectDuration=-0,On(e,a,a.pendingProps.children,o),a.child;case 10:return d=a.type,y=a.pendingProps,v=y.value,"value"in y||LE||(LE=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Rs(a,d,v),On(e,a,y.children,o),a.child;case 9:return y=a.type._context,d=a.pendingProps.children,typeof d!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Ii(a),y=Ge(y),d=U3(d,y,void 0),a.flags|=1,On(e,a,d,o),a.child;case 14:return cm(e,a,a.type,a.pendingProps,o);case 15:return be(e,a,a.type,a.pendingProps,o);case 19:return mm(e,a,o);case 31:return t3(e,a,o);case 22:return md(e,a,o,a.pendingProps);case 24:return Ii(a),d=Ge(Un),e===null?(y=Gh(),y===null&&(y=Ze,v=ru(),y.pooledCache=v,Cl(v),v!==null&&(y.pooledCacheLanes|=o),y=v),a.memoizedState={parent:d,cache:y},Xh(a),Rs(a,Un,y)):((e.lanes&o)!==0&&(Kh(e,a),Qc(a,null,null,o),du()),y=e.memoizedState,v=a.memoizedState,y.parent!==d?(y={parent:d,cache:d},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Rs(a,Un,d)):(d=v.cache,Rs(a,Un,d),d!==y.cache&&pa(a,[Un],o,!0))),On(e,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Si(e){e.flags|=4}function Td(e){Js&&(e.flags|=8)}function hf(e,a){if(e!==null&&e.child===a.child)return!1;if((a.flags&16)!==0)return!0;for(e=a.child;e!==null;){if((e.flags&8218)!==0||(e.subtreeFlags&8218)!==0)return!0;e=e.sibling}return!1}function fr(e,a,o,d){if(an)for(o=a.child;o!==null;){if(o.tag===5||o.tag===6)Jn(e,o.stateNode);else if(!(o.tag===4||T&&o.tag===27)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return;o=o.return}o.sibling.return=o.return,o=o.sibling}else if(Js)for(var y=a.child;y!==null;){if(y.tag===5){var v=y.stateNode;o&&d&&(v=ks(v,y.type,y.memoizedProps)),Jn(e,v)}else if(y.tag===6)v=y.stateNode,o&&d&&(v=wn(v,y.memoizedProps)),Jn(e,v);else if(y.tag!==4){if(y.tag===22&&y.memoizedState!==null)v=y.child,v!==null&&(v.return=y),fr(e,y,!0,!0);else if(y.child!==null){y.child.return=y,y=y.child;continue}}if(y===a)break;for(;y.sibling===null;){if(y.return===null||y.return===a)return;y=y.return}y.sibling.return=y.return,y=y.sibling}}function io(e,a,o,d){var y=!1;if(Js)for(var v=a.child;v!==null;){if(v.tag===5){var C=v.stateNode;o&&d&&(C=ks(C,v.type,v.memoizedProps)),Id(e,C)}else if(v.tag===6)C=v.stateNode,o&&d&&(C=wn(C,v.memoizedProps)),Id(e,C);else if(v.tag!==4){if(v.tag===22&&v.memoizedState!==null)y=v.child,y!==null&&(y.return=v),io(e,v,!0,!0),y=!0;else if(v.child!==null){v.child.return=v,v=v.child;continue}}if(v===a)break;for(;v.sibling===null;){if(v.return===null||v.return===a)return y;v=v.return}v.sibling.return=v.return,v=v.sibling}return y}function gm(e,a){if(Js&&hf(e,a)){e=a.stateNode;var o=e.containerInfo,d=kd();io(d,a,!1,!1),e.pendingChildren=d,Si(a),Pn(o,d)}}function df(e,a,o,d){if(an)e.memoizedProps!==d&&Si(a);else if(Js){var y=e.stateNode,v=e.memoizedProps;if((e=hf(e,a))||v!==d){var C=gi();v=wy(y,o,v,d,!e,null),v===y?a.stateNode=y:(Td(a),nn(v,o,d,C)&&Si(a),a.stateNode=v,e&&fr(v,a,!1,!1))}else a.stateNode=y}}function Cd(e,a,o,d,y){if((e.mode&32)!==Kt&&(o===null?Hu(a,d):wu(a,o,d))){if(e.flags|=16777216,(y&335544128)===y||qd(a,d))if(yr(e.stateNode,a,d))e.flags|=8192;else if(cy())e.flags|=8192;else throw Xf=ky,V3}else e.flags&=-16777217}function Rl(e,a){if(h(a)){if(e.flags|=16777216,!g(a))if(cy())e.flags|=8192;else throw Xf=ky,V3}else e.flags&=-16777217}function Eu(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?mt():536870912,e.lanes|=a,kf|=a)}function so(e,a){if(!fe)switch(e.tailMode){case"hidden":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:d.sibling=null}}function we(e){var a=e.alternate!==null&&e.alternate.child===e.child,o=0,d=0;if(a)if((e.mode&2)!==Kt){for(var y=e.selfBaseDuration,v=e.child;v!==null;)o|=v.lanes|v.childLanes,d|=v.subtreeFlags&65011712,d|=v.flags&65011712,y+=v.treeBaseDuration,v=v.sibling;e.treeBaseDuration=y}else for(y=e.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=e,y=y.sibling;else if((e.mode&2)!==Kt){y=e.actualDuration,v=e.selfBaseDuration;for(var C=e.child;C!==null;)o|=C.lanes|C.childLanes,d|=C.subtreeFlags,d|=C.flags,y+=C.actualDuration,v+=C.treeBaseDuration,C=C.sibling;e.actualDuration=y,e.treeBaseDuration=v}else for(y=e.child;y!==null;)o|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=e,y=y.sibling;return e.subtreeFlags|=d,e.childLanes=o,a}function ym(e,a,o){var d=a.pendingProps;switch(eu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return we(a),null;case 1:return we(a),null;case 3:return o=a.stateNode,d=null,e!==null&&(d=e.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),ki(Un,a),Xr(a),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(El(a)?(zh(),Si(a)):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Rc())),gm(e,a),we(a),null;case 26:if(Be){var y=a.type,v=a.memoizedState;return e===null?(Si(a),v!==null?(we(a),Rl(a,v)):(we(a),Cd(a,y,null,d,o))):v?v!==e.memoizedState?(Si(a),we(a),Rl(a,v)):(we(a),a.flags&=-16777217):(v=e.memoizedProps,an?v!==d&&Si(a):df(e,a,y,d),we(a),Cd(a,y,v,d,o)),null}case 27:if(T){if(Qr(a),o=ti(Ku.current),y=a.type,e!==null&&a.stateNode!=null)an?e.memoizedProps!==d&&Si(a):df(e,a,y,d);else{if(!d){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return we(a),null}e=gi(),El(a)?bl(a,e):(e=z(y,d,o,e,!0),a.stateNode=e,Si(a))}return we(a),null}case 5:if(Qr(a),y=a.type,e!==null&&a.stateNode!=null)df(e,a,y,d);else{if(!d){if(a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return we(a),null}if(v=gi(),El(a))bl(a,v),bo(a.stateNode,y,d,v)&&(a.flags|=64);else{var C=ti(Ku.current);C=Yd(y,d,C,v,a),Td(a),fr(C,a,!1,!1),a.stateNode=C,nn(C,y,d,v)&&Si(a)}}return we(a),Cd(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,o),null;case 6:if(e&&a.stateNode!=null)o=e.memoizedProps,an?o!==d&&Si(a):Js&&(o!==d?(e=ti(Ku.current),o=gi(),Td(a),a.stateNode=Gl(d,e,o,a)):a.stateNode=e.stateNode);else{if(typeof d!="string"&&a.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=ti(Ku.current),o=gi(),El(a)){if(!Oa)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=a.stateNode,o=a.memoizedProps,y=!Ar,d=null,v=Qa,v!==null)switch(v.tag){case 3:y&&(y=Km(e,o,d),y!==null&&(vl(a,0).serverProps=y));break;case 27:case 5:d=v.memoizedProps,y&&(y=Km(e,o,d),y!==null&&(vl(a,0).serverProps=y))}ue(e,o,a,d)||Os(a,!0)}else Td(a),a.stateNode=Gl(d,e,o,a)}return we(a),null;case 31:if(o=a.memoizedState,e===null||e.memoizedState!==null){if(d=El(a),o!==null){if(e===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Oa)throw Error("Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");Ue(e,a),we(a),(a.mode&2)!==Kt&&o!==null&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration))}else zh(),Tl(),(a.flags&128)===0&&(o=a.memoizedState=null),a.flags|=4,we(a),(a.mode&2)!==Kt&&o!==null&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration));e=!1}else o=Rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e)return a.flags&256?(La(a),a):(La(a),null);if((a.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return we(a),null;case 13:if(d=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(y=d,v=El(a),y!==null&&y.dehydrated!==null){if(e===null){if(!v)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!Oa)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(v=a.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Ti(v,a),we(a),(a.mode&2)!==Kt&&y!==null&&(y=a.child,y!==null&&(a.treeBaseDuration-=y.treeBaseDuration))}else zh(),Tl(),(a.flags&128)===0&&(y=a.memoizedState=null),a.flags|=4,we(a),(a.mode&2)!==Kt&&y!==null&&(y=a.child,y!==null&&(a.treeBaseDuration-=y.treeBaseDuration));y=!1}else y=Rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(La(a),a):(La(a),null)}return La(a),(a.flags&128)!==0?(a.lanes=o,(a.mode&2)!==Kt&&Bc(a),a):(o=d!==null,e=e!==null&&e.memoizedState!==null,o&&(d=a.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==y&&(d.flags|=2048)),o!==e&&o&&(a.child.flags|=8192),Eu(a,a.updateQueue),we(a),(a.mode&2)!==Kt&&o&&(e=a.child,e!==null&&(a.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return Xr(a),gm(e,a),e===null&&fn(a.stateNode.containerInfo),we(a),null;case 10:return ki(a.type,a),we(a),null;case 19:if(it(kn,a),d=a.memoizedState,d===null)return we(a),null;if(y=(a.flags&128)!==0,v=d.rendering,v===null)if(y)so(d,!1);else{if(En!==Uo||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(v=Fc(e),v!==null){for(a.flags|=128,so(d,!1),e=v.updateQueue,a.updateQueue=e,Eu(a,e),a.subtreeFlags=0,e=o,o=a.child;o!==null;)Gn(o,e),o=o.sibling;return ht(kn,kn.current&Tp|u1,a),fe&&Ut(a,d.treeForkCount),a.child}e=e.sibling}d.tail!==null&&ce()>v1&&(a.flags|=128,y=!0,so(d,!1),a.lanes=4194304)}else{if(!y)if(e=Fc(v),e!==null){if(a.flags|=128,y=!0,e=e.updateQueue,a.updateQueue=e,Eu(a,e),so(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!fe)return we(a),null}else 2*ce()-d.renderingStartTime>v1&&o!==536870912&&(a.flags|=128,y=!0,so(d,!1),a.lanes=4194304);d.isBackwards?(v.sibling=a.child,a.child=v):(e=d.last,e!==null?e.sibling=v:a.child=v,d.last=v)}return d.tail!==null?(e=d.tail,d.rendering=e,d.tail=e.sibling,d.renderingStartTime=ce(),e.sibling=null,o=kn.current,o=y?o&Tp|u1:o&Tp,ht(kn,o,a),fe&&Ut(a,d.treeForkCount),e):(we(a),null);case 22:case 23:return La(a),Jc(a),d=a.memoizedState!==null,e!==null?e.memoizedState!==null!==d&&(a.flags|=8192):d&&(a.flags|=8192),d?(o&536870912)!==0&&(a.flags&128)===0&&(we(a),a.subtreeFlags&6&&(a.flags|=8192)):we(a),o=a.updateQueue,o!==null&&Eu(a,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==o&&(a.flags|=2048),e!==null&&it(Yf,a),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ki(Un,a),we(a),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+a.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function hr(e,a){switch(eu(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&Bc(a),a):null;case 3:return ki(Un,a),Xr(a),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return Qr(a),null;case 31:if(a.memoizedState!==null){if(La(a),a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Tl()}return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&Bc(a),a):null;case 13:if(La(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Tl()}return e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&Bc(a),a):null;case 19:return it(kn,a),null;case 4:return Xr(a),null;case 10:return ki(a.type,a),null;case 22:case 23:return La(a),Jc(a),e!==null&&it(Yf,a),e=a.flags,e&65536?(a.flags=e&-65537|128,(a.mode&2)!==Kt&&Bc(a),a):null;case 24:return ki(Un,a),null;case 25:return null;default:return null}}function _d(e,a){switch(eu(a),a.tag){case 3:ki(Un,a),Xr(a);break;case 26:case 27:case 5:Qr(a);break;case 4:Xr(a);break;case 31:a.memoizedState!==null&&La(a);break;case 13:La(a);break;case 19:it(kn,a);break;case 10:ki(a.type,a);break;case 22:case 23:La(a),Jc(a),e!==null&&it(Yf,a);break;case 24:ki(Un,a)}}function Ps(e){return(e.mode&2)!==Kt}function vm(e,a){Ps(e)?(as(),dr(a,e),ns()):dr(a,e)}function Sm(e,a,o){Ps(e)?(as(),Gt(o,e,a),ns()):Gt(o,e,a)}function dr(e,a){try{var o=a.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var y=d.next;o=y;do{if((o.tag&e)===e&&(d=void 0,(e&Di)!==Wy&&(zp=!0),d=wt(a,uj,o),(e&Di)!==Wy&&(zp=!1),d!==void 0&&typeof d!="function")){var v=void 0;v=(o.tag&ys)!==0?"useLayoutEffect":(o.tag&Di)!==0?"useInsertionEffect":"useEffect";var C=void 0;C=d===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof d.then=="function"?`
127
127
 
128
128
  It looks like you wrote `+v+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
129
129
 
@@ -136,11 +136,11 @@ It looks like you wrote `+v+`(async () => ...) or returned a Promise. Instead, w
136
136
  fetchData();
137
137
  }, [someId]); // Or [] if effect doesn't need props or state
138
138
 
139
- Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+d,Bt(a,function(M,B){console.error("%s must not return anything besides a function, which is used for clean-up.%s",M,B)},v,C)}o=o.next}while(o!==y)}}catch(M){Ee(a,a.return,M)}}function Gt(e,a,o){try{var d=a.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var v=y.next;d=v;do{if((d.tag&e)===e){var C=d.inst,M=C.destroy;M!==void 0&&(C.destroy=void 0,(e&_i)!==Wy&&(Op=!0),y=a,Bt(y,uj,y,o,M),(e&_i)!==Wy&&(Op=!1))}d=d.next}while(d!==v)}}catch(B){Ee(a,a.return,B)}}function Pg(e,a){Gs(e)?(as(),cr(a,e),ns()):cr(a,e)}function Sm(e,a,o){Gs(e)?(as(),Gt(o,e,a),ns()):Gt(o,e,a)}function bm(e){var a=e.updateQueue;if(a!==null){var o=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||_p||(o.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",nt(e)||"instance"),o.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",nt(e)||"instance"));try{Bt(e,Z0,a,o)}catch(d){Ee(e,e.return,d)}}}function hf(e,a,o){return e.getSnapshotBeforeUpdate(a,o)}function n3(e,a){var o=a.memoizedProps,d=a.memoizedState;a=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||_p||(a.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",nt(e)||"instance"),a.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",nt(e)||"instance"));try{var y=Bs(e.type,o),v=Bt(e,hf,a,y,d);o=LE,v!==void 0||o.has(e.type)||(o.add(e.type),Bt(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",nt(e))})),a.__reactInternalSnapshotBeforeUpdate=v}catch(C){Ee(e,e.return,C)}}function Yg(e,a,o){o.props=Bs(e.type,e.memoizedProps),o.state=e.memoizedState,Gs(e)?(as(),Bt(e,sE,e,a,o),ns()):Bt(e,sE,e,a,o)}function a3(e){var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=Xa(e.stateNode);break;case 30:o=e.stateNode;break;default:o=e.stateNode}if(typeof a=="function")if(Gs(e))try{as(),e.refCleanup=a(o)}finally{ns()}else e.refCleanup=a(o);else typeof a=="string"?console.error("String refs are no longer supported."):a.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",nt(e)),a.current=o}}function df(e,a){try{Bt(e,a3,e)}catch(o){Ee(e,a,o)}}function js(e,a){var o=e.ref,d=e.refCleanup;if(o!==null)if(typeof d=="function")try{if(Gs(e))try{as(),Bt(e,d)}finally{ns(e)}else Bt(e,d)}catch(y){Ee(e,a,y)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o=="function")try{if(Gs(e))try{as(),Bt(e,o,null)}finally{ns(e)}else Bt(e,o,null)}catch(y){Ee(e,a,y)}else o.current=null}function Cd(e,a,o,d){var y=e.memoizedProps,v=y.id,C=y.onCommit;y=y.onRender,a=a===null?"mount":"update",Xy&&(a="nested-update"),typeof y=="function"&&y(v,a,e.actualDuration,e.treeBaseDuration,e.actualStartTime,o),typeof C=="function"&&C(v,a,d,o)}function qg(e,a,o,d){var y=e.memoizedProps;e=y.id,y=y.onPostCommit,a=a===null?"mount":"update",Xy&&(a="nested-update"),typeof y=="function"&&y(e,a,d,o)}function pf(e){var a=e.type,o=e.memoizedProps,d=e.stateNode;try{Bt(e,Ge,d,a,o,e)}catch(y){Ee(e,e.return,y)}}function _d(e,a,o){try{Bt(e,Yn,e.stateNode,e.type,o,a,e)}catch(d){Ee(e,e.return,d)}}function Xg(e){return e.tag===5||e.tag===3||(we?e.tag===26:!1)||(T?e.tag===27&&Mt(e.type):!1)||e.tag===4}function Em(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Xg(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(T&&e.tag===27&&Mt(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ml(e,a,o){var d=e.tag;if(d===5||d===6)e=e.stateNode,a?Gu(o,e,a):Ul(o,e);else if(d!==4&&(T&&d===27&&Mt(e.type)&&(o=e.stateNode,a=null),e=e.child,e!==null))for(Ml(e,a,o),e=e.sibling;e!==null;)Ml(e,a,o),e=e.sibling}function Hi(e,a,o){var d=e.tag;if(d===5||d===6)e=e.stateNode,a?Qd(o,e,a):Hn(o,e);else if(d!==4&&(T&&d===27&&Mt(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(Hi(e,a,o),e=e.sibling;e!==null;)Hi(e,a,o),e=e.sibling}function Aa(e){for(var a,o=e.return;o!==null;){if(Xg(o)){a=o;break}o=o.return}if($e){if(a==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(a.tag){case 27:if(T){a=a.stateNode,o=Em(e),Hi(e,o,a);break}case 5:o=a.stateNode,a.flags&32&&(ju(o),a.flags&=-33),a=Em(e),Hi(e,a,o);break;case 3:case 4:a=a.stateNode.containerInfo,o=Em(e),Ml(e,o,a);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function us(e,a,o){e=e.containerInfo;try{Bt(a,kd,e,o)}catch(d){Ee(a,a.return,d)}}function ya(e){var a=e.stateNode,o=e.memoizedProps;try{Bt(e,L,e.type,o,a,e)}catch(d){Ee(e,e.return,d)}}function Kg(e,a){return a.tag===31?(a=a.memoizedState,e.memoizedState!==null&&a===null):a.tag===13?(e=e.memoizedState,a=a.memoizedState,e!==null&&e.dehydrated!==null&&(a===null||a.dehydrated===null)):a.tag===3?e.memoizedState.isDehydrated&&(a.flags&256)===0:!1}function i3(e,a){for(_f(e.containerInfo),Oa=a;Oa!==null;)if(e=Oa,a=e.child,(e.subtreeFlags&1028)!==0&&a!==null)a.return=e,Oa=a;else for(;Oa!==null;){a=e=Oa;var o=a.alternate,d=a.flags;switch(a.tag){case 0:if((d&4)!==0&&(a=a.updateQueue,a=a!==null?a.events:null,a!==null))for(o=0;o<a.length;o++)d=a[o],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:(d&1024)!==0&&o!==null&&n3(a,o);break;case 3:(d&1024)!==0&&$e&&Pm(a.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(a=e.sibling,a!==null){a.return=e.return,Oa=a;break}Oa=e.return}}function Jn(e,a,o){var d=Ga(),y=Rs(),v=ts(),C=es(),M=o.flags;switch(o.tag){case 0:case 11:case 15:qa(e,o),M&4&&ym(o,ys|el);break;case 1:if(qa(e,o),M&4)if(e=o.stateNode,a===null)o.type.defaultProps||"ref"in o.memoizedProps||_p||(e.props!==o.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",nt(o)||"instance"),e.state!==o.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",nt(o)||"instance")),Gs(o)?(as(),Bt(o,B3,o,e),ns()):Bt(o,B3,o,e);else{var B=Bs(o.type,a.memoizedProps);a=a.memoizedState,o.type.defaultProps||"ref"in o.memoizedProps||_p||(e.props!==o.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",nt(o)||"instance"),e.state!==o.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",nt(o)||"instance")),Gs(o)?(as(),Bt(o,nE,o,e,B,a,e.__reactInternalSnapshotBeforeUpdate),ns()):Bt(o,nE,o,e,B,a,e.__reactInternalSnapshotBeforeUpdate)}M&64&&bm(o),M&512&&df(o,o.return);break;case 3:if(a=Os(),qa(e,o),M&64&&(M=o.updateQueue,M!==null)){if(B=null,o.child!==null)switch(o.child.tag){case 27:case 5:B=Xa(o.child.stateNode);break;case 1:B=o.child.stateNode}try{Bt(o,Z0,M,B)}catch(ct){Ee(o,o.return,ct)}}e.effectDuration+=Rc(a);break;case 27:T&&a===null&&M&4&&ya(o);case 26:case 5:if(qa(e,o),a===null){if(M&4)pf(o);else if(M&64){e=o.type,a=o.memoizedProps,B=o.stateNode;try{Bt(o,Ym,B,e,a,o)}catch(ct){Ee(o,o.return,ct)}}}M&512&&df(o,o.return);break;case 12:if(M&4){M=Os(),qa(e,o),e=o.stateNode,e.effectDuration+=cu(M);try{Bt(o,Cd,o,a,Fu,e.effectDuration)}catch(ct){Ee(o,o.return,ct)}}else qa(e,o);break;case 31:qa(e,o),M&4&&Qg(e,o);break;case 13:qa(e,o),M&4&&Zg(e,o),M&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(M=Cy.bind(null,o),Xn(e,M))));break;case 22:if(M=o.memoizedState!==null||wo,!M){a=a!==null&&a.memoizedState!==null||ra,B=wo;var q=ra;wo=M,(ra=a)&&!q?(Ps(e,o,(o.subtreeFlags&8772)!==0),(o.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&Ji(o,Lt,qt)):qa(e,o),wo=B,ra=q}break;case 30:break;default:qa(e,o)}(o.mode&2)!==Kt&&0<=Lt&&0<=qt&&((Bn||.05<Sn)&&Mn(o,Lt,qt,Sn,hn),o.alternate===null&&o.return!==null&&o.return.alternate!==null&&.05<qt-Lt&&(Kg(o.return.alternate,o.return)||ha(o,Lt,qt,"Mount"))),ti(d),$i(y),hn=v,Bn=C}function Ls(e){var a=e.alternate;a!==null&&(e.alternate=null,Ls(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&Gm(a)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cs(e,a,o){for(o=o.child;o!==null;)Tm(e,a,o),o=o.sibling}function Tm(e,a,o){if(ci&&typeof ci.onCommitFiberUnmount=="function")try{ci.onCommitFiberUnmount(op,o)}catch(q){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",q))}var d=Ga(),y=Rs(),v=ts(),C=es();switch(o.tag){case 26:if(we){ra||js(o,a),cs(e,a,o),o.memoizedState?lp(o.memoizedState):o.stateNode&&rp(o.stateNode);break}case 27:if(T){ra||js(o,a);var M=oa,B=Yi;Mt(o.type)&&(oa=o.stateNode,Yi=!1),cs(e,a,o),Bt(o,ft,o.stateNode),oa=M,Yi=B;break}case 5:ra||js(o,a);case 6:if($e){if(M=oa,B=Yi,oa=null,cs(e,a,o),oa=M,Yi=B,oa!==null)if(Yi)try{Bt(o,Zd,oa,o.stateNode)}catch(q){Ee(o,a,q)}else try{Bt(o,vo,oa,o.stateNode)}catch(q){Ee(o,a,q)}}else cs(e,a,o);break;case 18:$e&&oa!==null&&(Yi?Pu(oa,o.stateNode):Ei(oa,o.stateNode));break;case 4:$e?(M=oa,B=Yi,oa=o.stateNode.containerInfo,Yi=!0,cs(e,a,o),oa=M,Yi=B):(Ks&&us(o.stateNode,o,Jd()),cs(e,a,o));break;case 0:case 11:case 14:case 15:Gt(_i,o,a),ra||vm(o,a,ys),cs(e,a,o);break;case 1:ra||(js(o,a),M=o.stateNode,typeof M.componentWillUnmount=="function"&&Yg(o,a,M)),cs(e,a,o);break;case 21:cs(e,a,o);break;case 22:ra=(M=ra)||o.memoizedState!==null,cs(e,a,o),ra=M;break;default:cs(e,a,o)}(o.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(o,Lt,qt,Sn,hn),ti(d),$i(y),hn=v,Bn=C}function Qg(e,a){if(Na&&a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bt(a,yn,e)}catch(o){Ee(a,a.return,o)}}}function Zg(e,a){if(Na&&a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bt(a,vr,e)}catch(o){Ee(a,a.return,o)}}function s3(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new PE),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new PE),a;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function _u(e,a){var o=s3(e);a.forEach(function(d){if(!o.has(d)){if(o.add(d),Tr)if(xp!==null&&Dp!==null)Mu(Dp,xp);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var y=h3.bind(null,e,d);d.then(y,y)}})}function va(e,a){var o=a.deletions;if(o!==null)for(var d=0;d<o.length;d++){var y=e,v=a,C=o[d],M=Ga();if($e){var B=v;t:for(;B!==null;){switch(B.tag){case 27:if(T){if(Mt(B.type)){oa=B.stateNode,Yi=!1;break t}break}case 5:oa=B.stateNode,Yi=!1;break t;case 3:case 4:oa=B.stateNode.containerInfo,Yi=!0;break t}B=B.return}if(oa===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Tm(y,v,C),oa=null,Yi=!1}else Tm(y,v,C);(C.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(C,Lt,qt,"Unmount"),ti(M),y=C,v=y.alternate,v!==null&&(v.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Jg(a,e),a=a.sibling}function Jg(e,a){var o=Ga(),d=Rs(),y=ts(),v=es(),C=e.alternate,M=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:va(a,e),Ma(e),M&4&&(Gt(_i|el,e,e.return),cr(_i|el,e),vm(e,e.return,ys|el));break;case 1:va(a,e),Ma(e),M&512&&(ra||C===null||js(C,C.return)),M&64&&wo&&(M=e.updateQueue,M!==null&&(C=M.callbacks,C!==null&&(a=M.shared.hiddenCallbacks,M.shared.hiddenCallbacks=a===null?C:a.concat(C))));break;case 26:if(we){var B=Pl;va(a,e),Ma(e),M&512&&(ra||C===null||js(C,C.return)),M&4&&(M=C!==null?C.memoizedState:null,a=e.memoizedState,C===null?a===null?e.stateNode===null?e.stateNode=Uy(B,e.type,e.memoizedProps,e):qu(B,e.type,e.stateNode):e.stateNode=sp(B,a,e.memoizedProps):M!==a?(M===null?C.stateNode!==null&&rp(C.stateNode):lp(M),a===null?qu(B,e.type,e.stateNode):sp(B,a,e.memoizedProps)):a===null&&e.stateNode!==null&&_d(e,e.memoizedProps,C.memoizedProps));break}case 27:if(T){va(a,e),Ma(e),M&512&&(ra||C===null||js(C,C.return)),C!==null&&M&4&&_d(e,e.memoizedProps,C.memoizedProps);break}case 5:if(va(a,e),Ma(e),M&512&&(ra||C===null||js(C,C.return)),$e){if(e.flags&32){a=e.stateNode;try{Bt(e,ju,a)}catch(Pe){Ee(e,e.return,Pe)}}M&4&&e.stateNode!=null&&(a=e.memoizedProps,_d(e,a,C!==null?C.memoizedProps:a)),M&1024&&(k3=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."))}else Ks&&e.alternate!==null&&(e.alternate.stateNode=e.stateNode);break;case 6:if(va(a,e),Ma(e),M&4&&$e){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");M=e.memoizedProps,C=C!==null?C.memoizedProps:M,a=e.stateNode;try{Bt(e,kt,a,C,M)}catch(Pe){Ee(e,e.return,Pe)}}break;case 3:if(B=Os(),we){r();var q=Pl;Pl=br(a.containerInfo),va(a,e),Pl=q}else va(a,e);if(Ma(e),M&4){if($e&&Na&&C!==null&&C.memoizedState.isDehydrated)try{Bt(e,Bl,a.containerInfo)}catch(Pe){Ee(e,e.return,Pe)}if(Ks){M=a.containerInfo,C=a.pendingChildren;try{Bt(e,kd,M,C)}catch(Pe){Ee(e,e.return,Pe)}}}k3&&(k3=!1,Fg(e)),a.effectDuration+=Rc(B);break;case 4:we?(C=Pl,Pl=br(e.stateNode.containerInfo),va(a,e),Ma(e),Pl=C):(va(a,e),Ma(e)),M&4&&Ks&&us(e.stateNode,e,e.stateNode.pendingChildren);break;case 12:M=Os(),va(a,e),Ma(e),e.stateNode.effectDuration+=cu(M);break;case 31:va(a,e),Ma(e),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,_u(e,M)));break;case 13:va(a,e),Ma(e),e.child.flags&8192&&e.memoizedState!==null!=(C!==null&&C.memoizedState!==null)&&(p2=fe()),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,_u(e,M)));break;case 22:B=e.memoizedState!==null;var ct=C!==null&&C.memoizedState!==null,ht=wo,yt=ra;if(wo=ht||B,ra=yt||ct,va(a,e),ra=yt,wo=ht,ct&&!B&&!ht&&!yt&&(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&Ji(e,Lt,qt),Ma(e),M&8192&&(a=e.stateNode,a._visibility=B?a._visibility&~r1:a._visibility|r1,!B||C===null||ct||wo||ra||(lo(e),(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(e,Lt,qt,"Disconnect")),$e)){t:if(C=null,$e)for(a=e;;){if(a.tag===5||we&&a.tag===26){if(C===null){ct=C=a;try{q=ct.stateNode,B?Bt(ct,Lu,q):Bt(ct,Af,ct.stateNode,ct.memoizedProps)}catch(Pe){Ee(ct,ct.return,Pe)}}}else if(a.tag===6){if(C===null){ct=a;try{var Vt=ct.stateNode;B?Bt(ct,g3,Vt):Bt(ct,Hy,Vt,ct.memoizedProps)}catch(Pe){Ee(ct,ct.return,Pe)}}}else if(a.tag===18){if(C===null){ct=a;try{var Jt=ct.stateNode;B?Bt(ct,Of,Jt):Bt(ct,ui,ct.stateNode)}catch(Pe){Ee(ct,ct.return,Pe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break t;for(;a.sibling===null;){if(a.return===null||a.return===e)break t;C===a&&(C=null),a=a.return}C===a&&(C=null),a.sibling.return=a.return,a=a.sibling}}M&4&&(M=e.updateQueue,M!==null&&(C=M.retryQueue,C!==null&&(M.retryQueue=null,_u(e,C))));break;case 19:va(a,e),Ma(e),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,_u(e,M)));break;case 30:break;case 21:break;default:va(a,e),Ma(e)}(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&((Bn||.05<Sn)&&Mn(e,Lt,qt,Sn,hn),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<qt-Lt&&(Kg(e.return.alternate,e.return)||ha(e,Lt,qt,"Mount"))),ti(o),$i(d),hn=y,Bn=v}function Ma(e){var a=e.flags;if(a&2){try{Bt(e,Aa,e)}catch(o){Ee(e,e.return,o)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function Fg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;Fg(a),a.tag===5&&a.flags&1024&&Df(a.stateNode),e=e.sibling}}function qa(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Jn(e,a.alternate,a),a=a.sibling}function fr(e){var a=Ga(),o=Rs(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 14:case 15:vm(e,e.return,ys),lo(e);break;case 1:js(e,e.return);var v=e.stateNode;typeof v.componentWillUnmount=="function"&&Yg(e,e.return,v),lo(e);break;case 27:T&&Bt(e,ft,e.stateNode);case 26:case 5:js(e,e.return),lo(e);break;case 22:e.memoizedState===null&&lo(e);break;case 30:lo(e);break;default:lo(e)}(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(e,Lt,qt,Sn,hn),ti(a),$i(o),hn=d,Bn=y}function lo(e){for(e=e.child;e!==null;)fr(e),e=e.sibling}function kg(e,a,o,d){var y=Ga(),v=Rs(),C=ts(),M=es(),B=o.flags;switch(o.tag){case 0:case 11:case 15:Ps(e,o,d),ym(o,ys);break;case 1:if(Ps(e,o,d),a=o.stateNode,typeof a.componentDidMount=="function"&&Bt(o,B3,o,a),a=o.updateQueue,a!==null){e=o.stateNode;try{Bt(o,Q0,a,e)}catch(q){Ee(o,o.return,q)}}d&&B&64&&bm(o),df(o,o.return);break;case 27:T&&ya(o);case 26:case 5:Ps(e,o,d),d&&a===null&&B&4&&pf(o),df(o,o.return);break;case 12:if(d&&B&4){B=Os(),Ps(e,o,d),d=o.stateNode,d.effectDuration+=cu(B);try{Bt(o,Cd,o,a,Fu,d.effectDuration)}catch(q){Ee(o,o.return,q)}}else Ps(e,o,d);break;case 31:Ps(e,o,d),d&&B&4&&Qg(e,o);break;case 13:Ps(e,o,d),d&&B&4&&Zg(e,o);break;case 22:o.memoizedState===null&&Ps(e,o,d),df(o,o.return);break;case 30:break;default:Ps(e,o,d)}(o.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(o,Lt,qt,Sn,hn),ti(y),$i(v),hn=C,Bn=M}function Ps(e,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;)kg(e,a.alternate,a,o),a=a.sibling}function ro(e,a){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==o&&(e!=null&&Sl(e),o!=null&&Ir(o))}function Cm(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(Sl(a),e!=null&&Ir(e))}function fs(e,a,o,d,y){if(a.subtreeFlags&10256||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child))for(a=a.child;a!==null;){var v=a.sibling;Ig(e,a,o,d,v!==null?v.actualStartTime:y),a=v}}function Ig(e,a,o,d,y){var v=Ga(),C=Rs(),M=ts(),B=es(),q=Xu,ct=a.flags;switch(a.tag){case 0:case 11:case 15:(a.mode&2)!==Kt&&0<a.actualStartTime&&(a.flags&1)!==0&&di(a,a.actualStartTime,y,Ea,o),fs(e,a,o,d,y),ct&2048&&Pg(a,xi|el);break;case 1:(a.mode&2)!==Kt&&0<a.actualStartTime&&((a.flags&128)!==0?Fi(a,a.actualStartTime,y,[]):(a.flags&1)!==0&&di(a,a.actualStartTime,y,Ea,o)),fs(e,a,o,d,y);break;case 3:var ht=Os(),yt=Ea;Ea=a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)===0,fs(e,a,o,d,y),Ea=yt,ct&2048&&(o=null,a.alternate!==null&&(o=a.alternate.memoizedState.cache),d=a.memoizedState.cache,d!==o&&(Sl(d),o!=null&&Ir(o))),e.passiveEffectDuration+=Rc(ht);break;case 12:if(ct&2048){ct=Os(),fs(e,a,o,d,y),e=a.stateNode,e.passiveEffectDuration+=cu(ct);try{Bt(a,qg,a,a.alternate,Fu,e.passiveEffectDuration)}catch(Vt){Ee(a,a.return,Vt)}}else fs(e,a,o,d,y);break;case 31:ct=Ea,ht=a.alternate!==null?a.alternate.memoizedState:null,yt=a.memoizedState,ht!==null&&yt===null?(yt=a.deletions,yt!==null&&0<yt.length&&yt[0].tag===18?(Ea=!1,ht=ht.hydrationErrors,ht!==null&&Fi(a,a.actualStartTime,y,ht)):Ea=!0):Ea=!1,fs(e,a,o,d,y),Ea=ct;break;case 13:ct=Ea,ht=a.alternate!==null?a.alternate.memoizedState:null,yt=a.memoizedState,ht===null||ht.dehydrated===null||yt!==null&&yt.dehydrated!==null?Ea=!1:(yt=a.deletions,yt!==null&&0<yt.length&&yt[0].tag===18?(Ea=!1,ht=ht.hydrationErrors,ht!==null&&Fi(a,a.actualStartTime,y,ht)):Ea=!0),fs(e,a,o,d,y),Ea=ct;break;case 23:break;case 22:yt=a.stateNode,ht=a.alternate,a.memoizedState!==null?yt._visibility&Oo?fs(e,a,o,d,y):mf(e,a,o,d,y):yt._visibility&Oo?fs(e,a,o,d,y):(yt._visibility|=Oo,Ys(e,a,o,d,(a.subtreeFlags&10256)!==0||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child),y),(a.mode&2)===Kt||Ea||(e=a.actualStartTime,0<=e&&.05<y-e&&Ji(a,e,y),0<=Lt&&0<=qt&&.05<qt-Lt&&Ji(a,Lt,qt))),ct&2048&&ro(ht,a);break;case 24:fs(e,a,o,d,y),ct&2048&&Cm(a.alternate,a);break;default:fs(e,a,o,d,y)}(a.mode&2)!==Kt&&((e=!Ea&&a.alternate===null&&a.return!==null&&a.return.alternate!==null)&&(o=a.actualStartTime,0<=o&&.05<y-o&&ha(a,o,y,"Mount")),0<=Lt&&0<=qt&&((Bn||.05<Sn)&&Mn(a,Lt,qt,Sn,hn),e&&.05<qt-Lt&&ha(a,Lt,qt,"Mount"))),ti(v),$i(C),hn=M,Bn=B,Xu=q}function Ys(e,a,o,d,y,v){for(y=y&&((a.subtreeFlags&10256)!==0||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child)),a=a.child;a!==null;){var C=a.sibling;Wg(e,a,o,d,y,C!==null?C.actualStartTime:v),a=C}}function Wg(e,a,o,d,y,v){var C=Ga(),M=Rs(),B=ts(),q=es(),ct=Xu;y&&(a.mode&2)!==Kt&&0<a.actualStartTime&&(a.flags&1)!==0&&di(a,a.actualStartTime,v,Ea,o);var ht=a.flags;switch(a.tag){case 0:case 11:case 15:Ys(e,a,o,d,y,v),Pg(a,xi);break;case 23:break;case 22:var yt=a.stateNode;a.memoizedState!==null?yt._visibility&Oo?Ys(e,a,o,d,y,v):mf(e,a,o,d,v):(yt._visibility|=Oo,Ys(e,a,o,d,y,v)),y&&ht&2048&&ro(a.alternate,a);break;case 24:Ys(e,a,o,d,y,v),y&&ht&2048&&Cm(a.alternate,a);break;default:Ys(e,a,o,d,y,v)}(a.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(a,Lt,qt,Sn,hn),ti(C),$i(M),hn=B,Bn=q,Xu=ct}function mf(e,a,o,d,y){if(a.subtreeFlags&10256||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child))for(var v=a.child;v!==null;){a=v.sibling;var C=e,M=o,B=d,q=a!==null?a.actualStartTime:y,ct=Xu;(v.mode&2)!==Kt&&0<v.actualStartTime&&(v.flags&1)!==0&&di(v,v.actualStartTime,q,Ea,M);var ht=v.flags;switch(v.tag){case 22:mf(C,v,M,B,q),ht&2048&&ro(v.alternate,v);break;case 24:mf(C,v,M,B,q),ht&2048&&Cm(v.alternate,v);break;default:mf(C,v,M,B,q)}Xu=ct,v=a}}function oo(e,a,o){if(e.subtreeFlags&Ap)for(e=e.child;e!==null;)$g(e,a,o),e=e.sibling}function $g(e,a,o){switch(e.tag){case 26:if(oo(e,a,o),e.flags&Ap)if(e.memoizedState!==null)E(o,Pl,e.memoizedState,e.memoizedProps);else{var d=e.stateNode,y=e.type;e=e.memoizedProps,((a&335544128)===a||Pd(y,e))&&Yd(o,d,y,e)}break;case 5:oo(e,a,o),e.flags&Ap&&(d=e.stateNode,y=e.type,e=e.memoizedProps,((a&335544128)===a||Pd(y,e))&&Yd(o,d,y,e));break;case 3:case 4:we?(d=Pl,Pl=br(e.stateNode.containerInfo),oo(e,a,o),Pl=d):oo(e,a,o);break;case 22:e.memoizedState===null&&(d=e.alternate,d!==null&&d.memoizedState!==null?(d=Ap,Ap=16777216,oo(e,a,o),Ap=d):oo(e,a,o));break;default:oo(e,a,o)}}function ty(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function gf(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],y=Ga();Oa=d,ay(d,e),(d.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(d,Lt,qt,"Unmount"),ti(y)}ty(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ey(e),e=e.sibling}function ey(e){var a=Ga(),o=Rs(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 15:gf(e),e.flags&2048&&Sm(e,e.return,xi|el);break;case 3:var v=Os();gf(e),e.stateNode.passiveEffectDuration+=Rc(v);break;case 12:v=Os(),gf(e),e.stateNode.passiveEffectDuration+=cu(v);break;case 22:v=e.stateNode,e.memoizedState!==null&&v._visibility&Oo&&(e.return===null||e.return.tag!==13)?(v._visibility&=~Oo,xd(e),(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(e,Lt,qt,"Disconnect")):gf(e);break;default:gf(e)}(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(e,Lt,qt,Sn,hn),ti(a),$i(o),Bn=y,hn=d}function xd(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],y=Ga();Oa=d,ay(d,e),(d.mode&2)!==Kt&&0<=Lt&&0<=qt&&.05<qt-Lt&&ha(d,Lt,qt,"Unmount"),ti(y)}ty(e)}for(e=e.child;e!==null;)ny(e),e=e.sibling}function ny(e){var a=Ga(),o=Rs(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 15:Sm(e,e.return,xi),xd(e);break;case 22:var v=e.stateNode;v._visibility&Oo&&(v._visibility&=~Oo,xd(e));break;default:xd(e)}(e.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(e,Lt,qt,Sn,hn),ti(a),$i(o),Bn=y,hn=d}function ay(e,a){for(;Oa!==null;){var o=Oa,d=o,y=a,v=Ga(),C=Rs(),M=ts(),B=es();switch(d.tag){case 0:case 11:case 15:Sm(d,y,xi);break;case 23:case 22:d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(y=d.memoizedState.cachePool.pool,y!=null&&Sl(y));break;case 24:Ir(d.memoizedState.cache)}if((d.mode&2)!==Kt&&0<=Lt&&0<=qt&&(Bn||.05<Sn)&&Mn(d,Lt,qt,Sn,hn),ti(v),$i(C),Bn=B,hn=M,d=o.child,d!==null)d.return=o,Oa=d;else t:for(o=e;Oa!==null;){if(d=Oa,v=d.sibling,C=d.return,Ls(d),d===o){Oa=null;break t}if(v!==null){v.return=C,Oa=v;break t}Oa=C}}}function _m(e){var a=m3(e);if(a!=null){if(typeof a.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return a}if(e=jm(e),e===null)throw Error("Could not find React container within specified host subtree.");return e.stateNode.current}function xm(e,a){var o=e.tag;switch(a.$$typeof){case a2:if(e.type===a.value)return!0;break;case i2:t:{for(a=a.value,e=[e,0],o=0;o<e.length;){var d=e[o++],y=d.tag,v=e[o++],C=a[v];if(y!==5&&y!==26&&y!==27||!Qs(d)){for(;C!=null&&xm(d,C);)v++,C=a[v];if(v===a.length){a=!0;break t}else for(d=d.child;d!==null;)e.push(d,v),d=d.sibling}}a=!1}return a;case s2:if((o===5||o===26||o===27)&&Kd(e.stateNode,a.value))return!0;break;case r2:if((o===5||o===6||o===26||o===27)&&(e=Lm(e),e!==null&&0<=e.indexOf(a.value)))return!0;break;case l2:if((o===5||o===26||o===27)&&(e=e.memoizedProps["data-testname"],typeof e=="string"&&e.toLowerCase()===a.value.toLowerCase()))return!0;break;default:throw Error("Invalid selector type specified.")}return!1}function Dd(e){switch(e.$$typeof){case a2:return"<"+(et(e.value)||"Unknown")+">";case i2:return":has("+(Dd(e)||"")+")";case s2:return'[role="'+e.value+'"]';case r2:return'"'+e.value+'"';case l2:return'[data-testname="'+e.value+'"]';default:throw Error("Invalid selector type specified.")}}function iy(e,a){var o=[];e=[e,0];for(var d=0;d<e.length;){var y=e[d++],v=y.tag,C=e[d++],M=a[C];if(v!==5&&v!==26&&v!==27||!Qs(y)){for(;M!=null&&xm(y,M);)C++,M=a[C];if(C===a.length)o.push(y);else for(y=y.child;y!==null;)e.push(y,C),y=y.sibling}}return o}function Ad(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");e=_m(e),e=iy(e,a),a=[],e=Array.from(e);for(var o=0;o<e.length;){var d=e[o++],y=d.tag;if(y===5||y===26||y===27)Qs(d)||a.push(d.stateNode);else for(d=d.child;d!==null;)e.push(d),d=d.sibling}return a}function l3(){ds&&o2.forEach(function(e){return e()})}function sy(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||rt.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function vi(e){if((de&za)!==Ra&&ee!==0)return ee&-ee;var a=rt.T;return a!==null?(a._updatedFibers||(a._updatedFibers=new Set),a._updatedFibers.add(e),Uh()):Vm()}function ly(){if(Xi===0)if((ee&536870912)===0||he){var e=ut;ut<<=1,(ut&3932160)===0&&(ut=262144),Xi=e}else Xi=536870912;return e=gs.current,e!==null&&(e.flags|=32),Xi}function Ie(e,a,o){if(Op&&console.error("useInsertionEffect must not schedule updates."),o5&&(y2=!0),(e===Xe&&(je===Qf||je===Zf)||e.cancelPendingCommit!==null)&&(xu(e,0),Nl(e,ee,Xi,!1)),W(e,o),(de&za)!==Ra&&e===Xe){if(Cr)switch(a.tag){case 0:case 11:case 15:e=ie&&nt(ie)||"Unknown",eT.has(e)||(eT.add(e),a=nt(a)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",a,e,e));break;case 1:tT||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),tT=!0)}}else Tr&&xe(e,a,o),xy(a),e===Xe&&((de&za)===Ra&&(ac|=o),bn===tc&&Nl(e,ee,Xi,!1)),ja(e)}function Dm(e,a,o){if((de&(za|al))!==Ra)throw Error("Should not already be working.");if(ee!==0&&ie!==null){var d=ie,y=fe();switch(J9){case p1:case Qf:var v=Im;en&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Suspended",v,y,"Components ⚛",void 0,"primary-light")):console.timeStamp("Suspended",v,y,"Components ⚛",void 0,"primary-light"));break;case Zf:v=Im,en&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Action",v,y,"Components ⚛",void 0,"primary-light")):console.timeStamp("Action",v,y,"Components ⚛",void 0,"primary-light"));break;default:en&&(d=y-Im,3>d||console.timeStamp("Blocked",Im,y,"Components ⚛",void 0,5>d?"primary-light":10>d?"primary":100>d?"primary-dark":"error"))}}v=(o=!o&&(a&127)===0&&(a&e.expiredLanes)===0||Z(e,a))?r3(e,a):Mm(e,a,!0);var C=o;do{if(v===Uo){Mp&&!o&&Nl(e,a,0,!1),a=je,Im=ia(),J9=a;break}else{if(d=fe(),y=e.current.alternate,C&&!oy(y)){rn(a),y=fi,v=d,!en||v<=y||(Kn?Kn.run(console.timeStamp.bind(console,"Teared Render",y,v,me,"Scheduler ⚛","error")):console.timeStamp("Teared Render",y,v,me,"Scheduler ⚛","error")),uo(a,d),v=Mm(e,a,!1),C=!1;continue}if(v===Kf){if(C=a,e.errorRecoveryDisabledLanes&C)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){rn(a),jn(fi,d,a,Kn),uo(a,d),a=M;t:{d=e,v=C,C=g1;var B=Na&&d.current.memoizedState.isDehydrated;if(B&&(xu(d,M).flags|=256),M=Mm(d,M,!1),M!==Kf){if($3&&!B){d.errorRecoveryDisabledLanes|=v,ac|=v,v=tc;break t}d=Di,Di=C,d!==null&&(Di===null?Di=d:Di.push.apply(Di,d))}v=M}if(C=!1,v!==Kf)continue;d=fe()}}if(v===d1){rn(a),jn(fi,d,a,Kn),uo(a,d),xu(e,0),Nl(e,a,0,!0);break}t:{switch(o=e,v){case Uo:case d1:throw Error("Root did not complete. This is a bug in React.");case tc:if((a&4194048)!==a)break;case c2:rn(a),Mi(fi,d,a,Kn),uo(a,d),y=a,(y&127)!==0?Yy=d:(y&4194048)!==0&&(qy=d),Nl(o,a,Xi,!ec);break t;case Kf:Di=null;break;case u2:case YE:break;default:throw Error("Unknown root exit status.")}if(rt.actQueue!==null)Nm(o,y,a,Di,v1,d2,Xi,ac,Jf,v,null,null,fi,d);else{if((a&62914560)===a&&(C=p2+KE-fe(),10<C)){if(Nl(o,a,Xi,!ec),w(o,0,!0)!==0)break t;Yl=a,o.timeoutHandle=Vi(ry.bind(null,o,y,Di,v1,d2,a,Xi,ac,Jf,ec,v,"Throttled",fi,d),C);break t}ry(o,y,Di,v1,d2,a,Xi,ac,Jf,ec,v,null,fi,d)}}}break}while(!0);ja(e)}function ry(e,a,o,d,y,v,C,M,B,q,ct,ht,yt,Vt){e.timeoutHandle=Xs;var Jt=a.subtreeFlags,Pe=null;if((Jt&8192||(Jt&16785408)===16785408)&&(Pe=Vu(),$g(a,v,Pe),Jt=(v&62914560)===v?p2-fe():(v&4194048)===v?XE-fe():0,Jt=qd(Pe,Jt),Jt!==null)){Yl=v,e.cancelPendingCommit=Jt(Nm.bind(null,e,a,v,o,d,y,C,M,B,ct,Pe,Xd(Pe,e.containerInfo),yt,Vt)),Nl(e,v,C,!q);return}Nm(e,a,v,o,d,y,C,M,B,ct,Pe,ht,yt,Vt)}function oy(e){for(var a=e;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var y=o[d],v=y.getSnapshot;y=y.value;try{if(!Ti(v(),y))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Nl(e,a,o,d){a&=~t5,a&=~ac,e.suspendedLanes|=a,e.pingedLanes&=~a,d&&(e.warmLanes|=a),d=e.expirationTimes;for(var y=a;0<y;){var v=31-kn(y),C=1<<v;d[v]=-1,y&=~C}o!==0&&Tt(e,o,a)}function yf(){return(de&(za|al))===Ra?(Wr(0),!1):!0}function vf(){return(de&(za|al))!==Ra}function Sf(){if(ie!==null){if(je===qi)var e=ie.return;else e=ie,Rh(),Fc(e),yp=null,l1=0,e=ie;for(;e!==null;)Td(e.alternate,e),e=e.return;ie=null}}function uo(e,a){(e&127)!==0&&(Uf=a),(e&4194048)!==0&&(Mo=a)}function xu(e,a){en&&(console.timeStamp("Blocking Track",.003,.003,"Blocking","Scheduler ⚛","primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition","Scheduler ⚛","primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense","Scheduler ⚛","primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle","Scheduler ⚛","primary-light"));var o=fi;if(fi=ia(),ee!==0&&0<o){if(rn(ee),bn===u2||bn===tc)Mi(o,fi,a,Kn);else{var d=fi,y=Kn;if(en&&!(d<=o)){var v=(a&738197653)===a?"tertiary-dark":"primary-dark",C=(a&536870912)===a?"Prewarm":(a&201326741)===a?"Interrupted Hydration":"Interrupted Render";y?y.run(console.timeStamp.bind(console,C,o,d,me,"Scheduler ⚛",v)):console.timeStamp(C,o,d,me,"Scheduler ⚛",v)}}uo(ee,fi)}if(o=Kn,Kn=null,(a&127)!==0){Kn=Jm,y=0<=xr&&xr<Uf?Uf:xr,d=0<=Bf&&Bf<Uf?Uf:Bf,v=0<=d?d:0<=y?y:fi,0<=Yy&&(rn(2),Ut(Yy,v,a,o)),o=y;var M=d,B=Fm,q=0<dp,ct=ku===1,ht=ku===2;if(y=fi,d=Jm,v=A3,C=M3,en){if(me="Blocking",0<o?o>y&&(o=y):o=y,0<M?M>o&&(M=o):M=o,B!==null&&o>M){var yt=q?"secondary-light":"warning";d?d.run(console.timeStamp.bind(console,q?"Consecutive":"Event: "+B,M,o,me,"Scheduler ⚛",yt)):console.timeStamp(q?"Consecutive":"Event: "+B,M,o,me,"Scheduler ⚛",yt)}y>o&&(M=ct?"error":(a&738197653)===a?"tertiary-light":"primary-light",ct=ht?"Promise Resolved":ct?"Cascading Update":5<y-o?"Update Blocked":"Update",ht=[],C!=null&&ht.push(["Component name",C]),v!=null&&ht.push(["Method name",v]),o={start:o,end:y,detail:{devtools:{properties:ht,track:me,trackGroup:"Scheduler ⚛",color:M}}},d?d.run(performance.measure.bind(performance,ct,o)):performance.measure(ct,o))}xr=-1.1,ku=0,M3=A3=null,Yy=-1.1,dp=Bf,Bf=-1.1,Uf=ia()}if((a&4194048)!==0&&(Kn=km,y=0<=No&&No<Mo?Mo:No,o=0<=Ws&&Ws<Mo?Mo:Ws,d=0<=Iu&&Iu<Mo?Mo:Iu,v=0<=d?d:0<=o?o:fi,0<=qy&&(rn(256),Ut(qy,v,a,Kn)),ht=d,M=Vf,B=0<Wu,q=N3===2,v=fi,d=km,C=K9,ct=Q9,en&&(me="Transition",0<o?o>v&&(o=v):o=v,0<y?y>o&&(y=o):y=o,0<ht?ht>y&&(ht=y):ht=y,y>ht&&M!==null&&(yt=B?"secondary-light":"warning",d?d.run(console.timeStamp.bind(console,B?"Consecutive":"Event: "+M,ht,y,me,"Scheduler ⚛",yt)):console.timeStamp(B?"Consecutive":"Event: "+M,ht,y,me,"Scheduler ⚛",yt)),o>y&&(d?d.run(console.timeStamp.bind(console,"Action",y,o,me,"Scheduler ⚛","primary-dark")):console.timeStamp("Action",y,o,me,"Scheduler ⚛","primary-dark")),v>o&&(y=q?"Promise Resolved":5<v-o?"Update Blocked":"Update",ht=[],ct!=null&&ht.push(["Component name",ct]),C!=null&&ht.push(["Method name",C]),o={start:o,end:v,detail:{devtools:{properties:ht,track:me,trackGroup:"Scheduler ⚛",color:"primary-light"}}},d?d.run(performance.measure.bind(performance,y,o)):performance.measure(y,o))),Ws=No=-1.1,N3=0,qy=-1.1,Wu=Iu,Iu=-1.1,Mo=ia()),o=e.timeoutHandle,o!==Xs&&(e.timeoutHandle=Xs,Bm(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),Yl=0,Sf(),Xe=e,ie=o=Ol(e.current,null),ee=a,je=qi,vs=null,ec=!1,Mp=Z(e,a),$3=!1,bn=Uo,Jf=Xi=t5=ac=nc=0,Di=g1=null,d2=!1,(a&8)!==0&&(a|=a&32),d=e.entangledLanes,d!==0)for(e=e.entanglements,d&=a;0<d;)y=31-kn(d),v=1<<y,a|=e[y],d&=~v;return Ar=a,du(),e=w9(),1e3<e-H9&&(rt.recentlyCreatedOwnerStacks=0,H9=e),jl.discardPendingWarnings(),o}function uy(e,a){Qt=null,rt.H=f1,rt.getCurrentStack=null,Cr=!1,xo=null,a===gp||a===Fy?(a=Y0(),je=p1):a===V3?(a=Y0(),je=qE):je=a===J3?W3:a!==null&&typeof a=="object"&&typeof a.then=="function"?m1:f2,vs=a;var o=ie;o===null?(bn=d1,af(e,Ht(a,e.current))):o.mode&2&&zh(o)}function cy(){var e=gs.current;return e===null?!0:(ee&4194048)===ee?tl===null:(ee&62914560)===ee||(ee&536870912)!==0?e===tl:!1}function Am(){var e=rt.H;return rt.H=f1,e===null?f1:e}function fy(){var e=rt.A;return rt.A=dj,e}function Md(e){Kn===null&&(Kn=e._debugTask==null?null:e._debugTask)}function Nd(){bn=tc,ec||(ee&4194048)!==ee&&gs.current!==null||(Mp=!0),(nc&134217727)===0&&(ac&134217727)===0||Xe===null||Nl(Xe,ee,Xi,!1)}function Mm(e,a,o){var d=de;de|=za;var y=Am(),v=fy();if(Xe!==e||ee!==a){if(Tr){var C=e.memoizedUpdaters;0<C.size&&(Mu(e,ee),C.clear()),Dn(e,a)}v1=null,xu(e,a)}a=!1,C=bn;t:do try{if(je!==qi&&ie!==null){var M=ie,B=vs;switch(je){case W3:Sf(),C=c2;break t;case p1:case Qf:case Zf:case m1:gs.current===null&&(a=!0);var q=je;if(je=qi,vs=null,Du(e,M,B,q),o&&Mp){C=Uo;break t}break;default:q=je,je=qi,vs=null,Du(e,M,B,q)}}hy(),C=bn;break}catch(ct){uy(e,ct)}while(!0);return a&&e.shellSuspendCounter++,Rh(),de=d,rt.H=y,rt.A=v,ie===null&&(Xe=null,ee=0,du()),C}function hy(){for(;ie!==null;)dy(ie)}function r3(e,a){var o=de;de|=za;var d=Am(),y=fy();if(Xe!==e||ee!==a){if(Tr){var v=e.memoizedUpdaters;0<v.size&&(Mu(e,ee),v.clear()),Dn(e,a)}v1=null,y1=fe()+e5,xu(e,a)}else Mp=Z(e,a);t:do try{if(je!==qi&&ie!==null)e:switch(a=ie,v=vs,je){case f2:je=qi,vs=null,Du(e,a,v,f2);break;case Qf:case Zf:if(P0(v)){je=qi,vs=null,py(a);break}a=function(){je!==Qf&&je!==Zf||Xe!==e||(je=h2),ja(e)},v.then(a,a);break t;case p1:je=h2;break t;case qE:je=I3;break t;case h2:P0(v)?(je=qi,vs=null,py(a)):(je=qi,vs=null,Du(e,a,v,h2));break;case I3:var C=null;switch(ie.tag){case 26:C=ie.memoizedState;case 5:case 27:var M=ie,B=M.type,q=M.pendingProps;if(C?g(C):pr(M.stateNode,B,q)){je=qi,vs=null;var ct=M.sibling;if(ct!==null)ie=ct;else{var ht=M.return;ht!==null?(ie=ht,Od(ht)):ie=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}je=qi,vs=null,Du(e,a,v,I3);break;case m1:je=qi,vs=null,Du(e,a,v,m1);break;case W3:Sf(),bn=c2;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}rt.actQueue!==null?hy():o3();break}catch(yt){uy(e,yt)}while(!0);return Rh(),rt.H=d,rt.A=y,de=o,ie!==null?Uo:(Xe=null,ee=0,du(),bn)}function o3(){for(;ie!==null&&!Xt();)dy(ie)}function dy(e){var a=e.alternate;(e.mode&2)!==Kt?(Hc(e),a=Bt(e,Ya,a,e,Ar),zh(e)):a=Bt(e,Ya,a,e,Ar),e.memoizedProps=e.pendingProps,a===null?Od(e):ie=a}function py(e){var a=Bt(e,u3,e);e.memoizedProps=e.pendingProps,a===null?Od(e):ie=a}function u3(e){var a=e.alternate,o=(e.mode&2)!==Kt;switch(o&&Hc(e),e.tag){case 15:case 0:a=Vs(a,e,e.pendingProps,e.type,void 0,ee);break;case 11:a=Vs(a,e,e.pendingProps,e.type.render,e.ref,ee);break;case 5:Fc(e);default:Td(a,e),e=ie=Ln(e,Ar),a=Ya(a,e,Ar)}return o&&zh(e),a}function Du(e,a,o,d){Rh(),Fc(a),yp=null,l1=0;var y=a.return;try{if(jg(e,y,a,o,ee)){bn=d1,af(e,Ht(o,e.current)),ie=null;return}}catch(v){if(y!==null)throw ie=y,v;bn=d1,af(e,Ht(o,e.current)),ie=null;return}a.flags&32768?(he||d===f2?e=!0:Mp||(ee&536870912)!==0?e=!1:(ec=e=!0,(d===Qf||d===Zf||d===p1||d===m1)&&(d=gs.current,d!==null&&d.tag===13&&(d.flags|=16384))),my(a,e)):Od(a)}function Od(e){var a=e;do{if((a.flags&32768)!==0){my(a,ec);return}var o=a.alternate;if(e=a.return,Hc(a),o=Bt(a,gm,o,a,Ar),(a.mode&2)!==Kt&&w0(a),o!==null){ie=o;return}if(a=a.sibling,a!==null){ie=a;return}ie=a=e}while(a!==null);bn===Uo&&(bn=YE)}function my(e,a){do{var o=ur(e.alternate,e);if(o!==null){o.flags&=32767,ie=o;return}if((e.mode&2)!==Kt){w0(e),o=e.actualDuration;for(var d=e.child;d!==null;)o+=d.actualDuration,d=d.sibling;e.actualDuration=o}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(e=e.sibling,e!==null)){ie=e;return}ie=e=o}while(e!==null);bn=c2,ie=null}function Nm(e,a,o,d,y,v,C,M,B,q,ct,ht,yt,Vt){e.cancelPendingCommit=null;do Au();while(ua!==sc);if(jl.flushLegacyContextWarning(),jl.flushPendingUnsafeLifecycleWarnings(),(de&(za|al))!==Ra)throw Error("Should not already be working.");if(rn(o),q===Kf?jn(yt,Vt,o,Kn):d!==null?Ae(yt,Vt,o,d,a!==null&&a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)!==0,Kn):on(yt,Vt,o,Kn),a!==null){if(o===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),a===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(v=a.lanes|a.childLanes,v|=j3,gt(e,o,v,C,M,B),e===Xe&&(ie=Xe=null,ee=0),Np=a,lc=e,Yl=o,i5=v,l5=y,IE=d,s5=Vt,WE=ht,ql=m2,$E=null,a.actualDuration!==0||(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_y(zf,function(){return wu(),ql===m2&&(ql=a5),by(),null})):(e.callbackNode=null,e.callbackPriority=0),Ao=null,Fu=ia(),ht!==null&&Va(Vt,Fu,ht,Kn),d=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||d){d=rt.T,rt.T=null,y=ri(),zn(2),C=de,de|=al;try{i3(e,a,o)}finally{de=C,zn(y),rt.T=d}}ua=ZE,gy(),yy(),vy()}}function gy(){if(ua===ZE){ua=sc;var e=lc,a=Np,o=Yl,d=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||d){d=rt.T,rt.T=null;var y=ri();zn(2);var v=de;de|=al;try{xp=o,Dp=e,zc(),Jg(a,e),Dp=xp=null,dr(e.containerInfo)}finally{de=v,zn(y),rt.T=d}}e.current=a,ua=JE}}function yy(){if(ua===JE){ua=sc;var e=$E;if(e!==null){Fu=ia();var a=Do,o=Fu;!en||o<=a||console.timeStamp(e,a,o,me,"Scheduler ⚛","secondary-light")}e=lc,a=Np,o=Yl;var d=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||d){d=rt.T,rt.T=null;var y=ri();zn(2);var v=de;de|=al;try{xp=o,Dp=e,zc(),Jn(e,a.alternate,a),Dp=xp=null}finally{de=v,zn(y),rt.T=d}}e=s5,a=WE,Do=ia(),e=a===null?e:Fu,a=Do,o=ql===n5,d=Kn,Ao!==null?ke(e,a,Ao,!1,d):!en||a<=e||(d?d.run(console.timeStamp.bind(console,o?"Commit Interrupted View Transition":"Commit",e,a,me,"Scheduler ⚛",o?"error":"secondary-dark")):console.timeStamp(o?"Commit Interrupted View Transition":"Commit",e,a,me,"Scheduler ⚛",o?"error":"secondary-dark")),ua=FE}}function vy(){if(ua===kE||ua===FE){if(ua===kE){var e=Do;Do=ia();var a=Do,o=ql===n5;!en||a<=e||console.timeStamp(o?"Interrupted View Transition":"Starting Animation",e,a,me,"Scheduler ⚛",o?" error":"secondary-light"),ql!==n5&&(ql=QE)}ua=sc,_e(),e=lc;var d=Np;a=Yl,o=IE;var y=d.actualDuration!==0||(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0;y?ua=g2:(ua=sc,Np=lc=null,Sy(e,e.pendingLanes),Ff=0,b1=null);var v=e.pendingLanes;if(v===0&&(ic=null),y||zm(e),v=ln(a),d=d.stateNode,ci&&typeof ci.onCommitFiberRoot=="function")try{var C=(d.current.flags&128)===128;switch(v){case 2:var M=ye;break;case 8:M=Gl;break;case 32:M=zf;break;case 268435456:M=z9;break;default:M=zf}ci.onCommitFiberRoot(op,d,M,C)}catch(ht){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",ht))}if(Tr&&e.memoizedUpdaters.clear(),l3(),o!==null){C=rt.T,M=ri(),zn(2),rt.T=null;try{var B=e.onRecoverableError;for(d=0;d<o.length;d++){var q=o[d],ct=c3(q.stack);Bt(q.source,B,q.value,ct)}}finally{rt.T=C,zn(M)}}(Yl&3)!==0&&Au(),ja(e),v=e.pendingLanes,(a&261930)!==0&&(v&42)!==0?(Ky=!0,e===r5?S1++:(S1=0,r5=e)):S1=0,y||uo(a,Do),Na&&qm(),Wr(0)}}function c3(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function Sy(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,Ir(a)))}function Au(){return gy(),yy(),vy(),by()}function by(){if(ua!==g2)return!1;var e=lc,a=i5;i5=0;var o=ln(Yl),d=32>o?32:o;o=rt.T;var y=ri();try{zn(d),rt.T=null;var v=l5;l5=null,d=lc;var C=Yl;if(ua=sc,Np=lc=null,Yl=0,(de&(za|al))!==Ra)throw Error("Cannot flush passive effects while already rendering.");rn(C),o5=!0,y2=!1;var M=0;if(Ao=null,M=fe(),ql===QE){var B=Do,q=M;!en||q<=B||(Z9?Z9.run(console.timeStamp.bind(console,"Animating",B,q,me,"Scheduler ⚛","secondary-dark")):console.timeStamp("Animating",B,q,me,"Scheduler ⚛","secondary-dark"))}else{B=Do,q=M;var ct=ql===a5;!en||q<=B||(Kn?Kn.run(console.timeStamp.bind(console,ct?"Waiting for Paint":"Waiting",B,q,me,"Scheduler ⚛","secondary-light")):console.timeStamp(ct?"Waiting for Paint":"Waiting",B,q,me,"Scheduler ⚛","secondary-light"))}B=de,de|=al;var ht=d.current;zc(),ey(ht);var yt=d.current;ht=s5,zc(),Ig(d,yt,C,v,ht),zm(d),de=B;var Vt=fe();if(yt=M,ht=Kn,Ao!==null?ke(yt,Vt,Ao,!0,ht):!en||Vt<=yt||(ht?ht.run(console.timeStamp.bind(console,"Remaining Effects",yt,Vt,me,"Scheduler ⚛","secondary-dark")):console.timeStamp("Remaining Effects",yt,Vt,me,"Scheduler ⚛","secondary-dark")),uo(C,Vt),Wr(0,!1),y2?d===b1?Ff++:(Ff=0,b1=d):Ff=0,y2=o5=!1,ci&&typeof ci.onPostCommitFiberRoot=="function")try{ci.onPostCommitFiberRoot(op,d)}catch(Pe){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",Pe))}var Jt=d.current.stateNode;return Jt.effectDuration=0,Jt.passiveEffectDuration=0,!0}finally{zn(y),rt.T=o,Sy(e,a)}}function Ey(e,a,o){a=Ht(o,a),U0(a),a=cd(e.stateNode,a,2),e=Ni(e,a,2),e!==null&&(W(e,2),ja(e))}function Ee(e,a,o){if(Op=!1,e.tag===3)Ey(e,e,o);else{for(;a!==null;){if(a.tag===3){Ey(a,e,o);return}if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ic===null||!ic.has(d))){e=Ht(o,e),U0(e),o=fd(2),d=Ni(a,o,2),d!==null&&(hd(o,d,a,e),W(d,2),ja(d));return}}a=a.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
139
+ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+d,wt(a,function(M,B){console.error("%s must not return anything besides a function, which is used for clean-up.%s",M,B)},v,C)}o=o.next}while(o!==y)}}catch(M){Ee(a,a.return,M)}}function Gt(e,a,o){try{var d=a.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var v=y.next;d=v;do{if((d.tag&e)===e){var C=d.inst,M=C.destroy;M!==void 0&&(C.destroy=void 0,(e&Di)!==Wy&&(zp=!0),y=a,wt(y,cj,y,o,M),(e&Di)!==Wy&&(zp=!1))}d=d.next}while(d!==v)}}catch(B){Ee(a,a.return,B)}}function Pg(e,a){Ps(e)?(as(),dr(a,e),ns()):dr(a,e)}function bm(e,a,o){Ps(e)?(as(),Gt(o,e,a),ns()):Gt(o,e,a)}function Em(e){var a=e.updateQueue;if(a!==null){var o=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||Dp||(o.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",et(e)||"instance"),o.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",et(e)||"instance"));try{wt(e,J0,a,o)}catch(d){Ee(e,e.return,d)}}}function pf(e,a,o){return e.getSnapshotBeforeUpdate(a,o)}function n3(e,a){var o=a.memoizedProps,d=a.memoizedState;a=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||Dp||(a.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",et(e)||"instance"),a.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",et(e)||"instance"));try{var y=js(e.type,o),v=wt(e,pf,a,y,d);o=PE,v!==void 0||o.has(e.type)||(o.add(e.type),wt(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",et(e))})),a.__reactInternalSnapshotBeforeUpdate=v}catch(C){Ee(e,e.return,C)}}function Yg(e,a,o){o.props=js(e.type,e.memoizedProps),o.state=e.memoizedState,Ps(e)?(as(),wt(e,lE,e,a,o),ns()):wt(e,lE,e,a,o)}function a3(e){var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=Xa(e.stateNode);break;case 30:o=e.stateNode;break;default:o=e.stateNode}if(typeof a=="function")if(Ps(e))try{as(),e.refCleanup=a(o)}finally{ns()}else e.refCleanup=a(o);else typeof a=="string"?console.error("String refs are no longer supported."):a.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",et(e)),a.current=o}}function mf(e,a){try{wt(e,a3,e)}catch(o){Ee(e,a,o)}}function Ys(e,a){var o=e.ref,d=e.refCleanup;if(o!==null)if(typeof d=="function")try{if(Ps(e))try{as(),wt(e,d)}finally{ns(e)}else wt(e,d)}catch(y){Ee(e,a,y)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o=="function")try{if(Ps(e))try{as(),wt(e,o,null)}finally{ns(e)}else wt(e,o,null)}catch(y){Ee(e,a,y)}else o.current=null}function xd(e,a,o,d){var y=e.memoizedProps,v=y.id,C=y.onCommit;y=y.onRender,a=a===null?"mount":"update",Xy&&(a="nested-update"),typeof y=="function"&&y(v,a,e.actualDuration,e.treeBaseDuration,e.actualStartTime,o),typeof C=="function"&&C(v,a,d,o)}function qg(e,a,o,d){var y=e.memoizedProps;e=y.id,y=y.onPostCommit,a=a===null?"mount":"update",Xy&&(a="nested-update"),typeof y=="function"&&y(e,a,d,o)}function gf(e){var a=e.type,o=e.memoizedProps,d=e.stateNode;try{wt(e,je,d,a,o,e)}catch(y){Ee(e,e.return,y)}}function Dd(e,a,o){try{wt(e,Ln,e.stateNode,e.type,o,a,e)}catch(d){Ee(e,e.return,d)}}function Xg(e){return e.tag===5||e.tag===3||(Be?e.tag===26:!1)||(T?e.tag===27&&At(e.type):!1)||e.tag===4}function Tm(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Xg(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(T&&e.tag===27&&At(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zl(e,a,o){var d=e.tag;if(d===5||d===6)e=e.stateNode,a?Bu(o,e,a):jl(o,e);else if(d!==4&&(T&&d===27&&At(e.type)&&(o=e.stateNode,a=null),e=e.child,e!==null))for(zl(e,a,o),e=e.sibling;e!==null;)zl(e,a,o),e=e.sibling}function Ui(e,a,o){var d=e.tag;if(d===5||d===6)e=e.stateNode,a?Jd(o,e,a):Hn(o,e);else if(d!==4&&(T&&d===27&&At(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(Ui(e,a,o),e=e.sibling;e!==null;)Ui(e,a,o),e=e.sibling}function Ma(e){for(var a,o=e.return;o!==null;){if(Xg(o)){a=o;break}o=o.return}if(an){if(a==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(a.tag){case 27:if(T){a=a.stateNode,o=Tm(e),Ui(e,o,a);break}case 5:o=a.stateNode,a.flags&32&&(Vu(o),a.flags&=-33),a=Tm(e),Ui(e,a,o);break;case 3:case 4:a=a.stateNode.containerInfo,o=Tm(e),zl(e,o,a);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function us(e,a,o){e=e.containerInfo;try{wt(a,Wd,e,o)}catch(d){Ee(a,a.return,d)}}function ya(e){var a=e.stateNode,o=e.memoizedProps;try{wt(e,L,e.type,o,a,e)}catch(d){Ee(e,e.return,d)}}function Kg(e,a){return a.tag===31?(a=a.memoizedState,e.memoizedState!==null&&a===null):a.tag===13?(e=e.memoizedState,a=a.memoizedState,e!==null&&e.dehydrated!==null&&(a===null||a.dehydrated===null)):a.tag===3?e.memoizedState.isDehydrated&&(a.flags&256)===0:!1}function i3(e,a){for(Df(e.containerInfo),Ra=a;Ra!==null;)if(e=Ra,a=e.child,(e.subtreeFlags&1028)!==0&&a!==null)a.return=e,Ra=a;else for(;Ra!==null;){a=e=Ra;var o=a.alternate,d=a.flags;switch(a.tag){case 0:if((d&4)!==0&&(a=a.updateQueue,a=a!==null?a.events:null,a!==null))for(o=0;o<a.length;o++)d=a[o],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:(d&1024)!==0&&o!==null&&n3(a,o);break;case 3:(d&1024)!==0&&an&&Ym(a.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(a=e.sibling,a!==null){a.return=e.return,Ra=a;break}Ra=e.return}}function Zn(e,a,o){var d=Ga(),y=ws(),v=ts(),C=es(),M=o.flags;switch(o.tag){case 0:case 11:case 15:qa(e,o),M&4&&vm(o,ys|il);break;case 1:if(qa(e,o),M&4)if(e=o.stateNode,a===null)o.type.defaultProps||"ref"in o.memoizedProps||Dp||(e.props!==o.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",et(o)||"instance"),e.state!==o.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",et(o)||"instance")),Ps(o)?(as(),wt(o,B3,o,e),ns()):wt(o,B3,o,e);else{var B=js(o.type,a.memoizedProps);a=a.memoizedState,o.type.defaultProps||"ref"in o.memoizedProps||Dp||(e.props!==o.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",et(o)||"instance"),e.state!==o.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",et(o)||"instance")),Ps(o)?(as(),wt(o,aE,o,e,B,a,e.__reactInternalSnapshotBeforeUpdate),ns()):wt(o,aE,o,e,B,a,e.__reactInternalSnapshotBeforeUpdate)}M&64&&Em(o),M&512&&mf(o,o.return);break;case 3:if(a=Hs(),qa(e,o),M&64&&(M=o.updateQueue,M!==null)){if(B=null,o.child!==null)switch(o.child.tag){case 27:case 5:B=Xa(o.child.stateNode);break;case 1:B=o.child.stateNode}try{wt(o,J0,M,B)}catch(ut){Ee(o,o.return,ut)}}e.effectDuration+=Hc(a);break;case 27:T&&a===null&&M&4&&ya(o);case 26:case 5:if(qa(e,o),a===null){if(M&4)gf(o);else if(M&64){e=o.type,a=o.memoizedProps,B=o.stateNode;try{wt(o,qm,B,e,a,o)}catch(ut){Ee(o,o.return,ut)}}}M&512&&mf(o,o.return);break;case 12:if(M&4){M=Hs(),qa(e,o),e=o.stateNode,e.effectDuration+=ou(M);try{wt(o,xd,o,a,Zu,e.effectDuration)}catch(ut){Ee(o,o.return,ut)}}else qa(e,o);break;case 31:qa(e,o),M&4&&Qg(e,o);break;case 13:qa(e,o),M&4&&Zg(e,o),M&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(M=Cy.bind(null,o),Yn(e,M))));break;case 22:if(M=o.memoizedState!==null||wo,!M){a=a!==null&&a.memoizedState!==null||ra,B=wo;var q=ra;wo=M,(ra=a)&&!q?(Xs(e,o,(o.subtreeFlags&8772)!==0),(o.mode&2)!==Kt&&0<=Pt&&0<=qt&&.05<qt-Pt&&Ds(o,Pt,qt)):qa(e,o),wo=B,ra=q}break;case 30:break;default:qa(e,o)}(o.mode&2)!==Kt&&0<=Pt&&0<=qt&&((Bn||.05<bn)&&Mn(o,Pt,qt,bn,dn),o.alternate===null&&o.return!==null&&o.return.alternate!==null&&.05<qt-Pt&&(Kg(o.return.alternate,o.return)||ha(o,Pt,qt,"Mount"))),ni(d),$i(y),dn=v,Bn=C}function qs(e){var a=e.alternate;a!==null&&(e.alternate=null,qs(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&jm(a)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cs(e,a,o){for(o=o.child;o!==null;)Cm(e,a,o),o=o.sibling}function Cm(e,a,o){if(hi&&typeof hi.onCommitFiberUnmount=="function")try{hi.onCommitFiberUnmount(cp,o)}catch(q){_r||(_r=!0,console.error("React instrumentation encountered an error: %o",q))}var d=Ga(),y=ws(),v=ts(),C=es();switch(o.tag){case 26:if(Be){ra||Ys(o,a),cs(e,a,o),o.memoizedState?op(o.memoizedState):o.stateNode&&up(o.stateNode);break}case 27:if(T){ra||Ys(o,a);var M=oa,B=Xi;At(o.type)&&(oa=o.stateNode,Xi=!1),cs(e,a,o),wt(o,ct,o.stateNode),oa=M,Xi=B;break}case 5:ra||Ys(o,a);case 6:if(an){if(M=oa,B=Xi,oa=null,cs(e,a,o),oa=M,Xi=B,oa!==null)if(Xi)try{wt(o,Fd,oa,o.stateNode)}catch(q){Ee(o,a,q)}else try{wt(o,vo,oa,o.stateNode)}catch(q){Ee(o,a,q)}}else cs(e,a,o);break;case 18:an&&oa!==null&&(Xi?ju(oa,o.stateNode):Ci(oa,o.stateNode));break;case 4:an?(M=oa,B=Xi,oa=o.stateNode.containerInfo,Xi=!0,cs(e,a,o),oa=M,Xi=B):(Js&&us(o.stateNode,o,kd()),cs(e,a,o));break;case 0:case 11:case 14:case 15:Gt(Di,o,a),ra||Sm(o,a,ys),cs(e,a,o);break;case 1:ra||(Ys(o,a),M=o.stateNode,typeof M.componentWillUnmount=="function"&&Yg(o,a,M)),cs(e,a,o);break;case 21:cs(e,a,o);break;case 22:ra=(M=ra)||o.memoizedState!==null,cs(e,a,o),ra=M;break;default:cs(e,a,o)}(o.mode&2)!==Kt&&0<=Pt&&0<=qt&&(Bn||.05<bn)&&Mn(o,Pt,qt,bn,dn),ni(d),$i(y),dn=v,Bn=C}function Qg(e,a){if(Oa&&a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wt(a,vn,e)}catch(o){Ee(a,a.return,o)}}}function Zg(e,a){if(Oa&&a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wt(a,Er,e)}catch(o){Ee(a,a.return,o)}}function s3(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new YE),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new YE),a;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function Tu(e,a){var o=s3(e);a.forEach(function(d){if(!o.has(d)){if(o.add(d),xr)if(Ap!==null&&Mp!==null)Du(Mp,Ap);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var y=h3.bind(null,e,d);d.then(y,y)}})}function va(e,a){var o=a.deletions;if(o!==null)for(var d=0;d<o.length;d++){var y=e,v=a,C=o[d],M=Ga();if(an){var B=v;t:for(;B!==null;){switch(B.tag){case 27:if(T){if(At(B.type)){oa=B.stateNode,Xi=!1;break t}break}case 5:oa=B.stateNode,Xi=!1;break t;case 3:case 4:oa=B.stateNode.containerInfo,Xi=!0;break t}B=B.return}if(oa===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Cm(y,v,C),oa=null,Xi=!1}else Cm(y,v,C);(C.mode&2)!==Kt&&0<=Pt&&0<=qt&&.05<qt-Pt&&ha(C,Pt,qt,"Unmount"),ni(M),y=C,v=y.alternate,v!==null&&(v.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Jg(a,e),a=a.sibling}function Jg(e,a){var o=Ga(),d=ws(),y=ts(),v=es(),C=e.alternate,M=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:va(a,e),Na(e),M&4&&(Gt(Di|il,e,e.return),dr(Di|il,e),Sm(e,e.return,ys|il));break;case 1:va(a,e),Na(e),M&512&&(ra||C===null||Ys(C,C.return)),M&64&&wo&&(M=e.updateQueue,M!==null&&(C=M.callbacks,C!==null&&(a=M.shared.hiddenCallbacks,M.shared.hiddenCallbacks=a===null?C:a.concat(C))));break;case 26:if(Be){var B=Kl;va(a,e),Na(e),M&512&&(ra||C===null||Ys(C,C.return)),M&4&&(M=C!==null?C.memoizedState:null,a=e.memoizedState,C===null?a===null?e.stateNode===null?e.stateNode=Uy(B,e.type,e.memoizedProps,e):Pu(B,e.type,e.stateNode):e.stateNode=rp(B,a,e.memoizedProps):M!==a?(M===null?C.stateNode!==null&&up(C.stateNode):op(M),a===null?Pu(B,e.type,e.stateNode):rp(B,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Dd(e,e.memoizedProps,C.memoizedProps));break}case 27:if(T){va(a,e),Na(e),M&512&&(ra||C===null||Ys(C,C.return)),C!==null&&M&4&&Dd(e,e.memoizedProps,C.memoizedProps);break}case 5:if(va(a,e),Na(e),M&512&&(ra||C===null||Ys(C,C.return)),an){if(e.flags&32){a=e.stateNode;try{wt(e,Vu,a)}catch(Xe){Ee(e,e.return,Xe)}}M&4&&e.stateNode!=null&&(a=e.memoizedProps,Dd(e,a,C!==null?C.memoizedProps:a)),M&1024&&(k3=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."))}else Js&&e.alternate!==null&&(e.alternate.stateNode=e.stateNode);break;case 6:if(va(a,e),Na(e),M&4&&an){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");M=e.memoizedProps,C=C!==null?C.memoizedProps:M,a=e.stateNode;try{wt(e,kt,a,C,M)}catch(Xe){Ee(e,e.return,Xe)}}break;case 3:if(B=Hs(),Be){r();var q=Kl;Kl=Cr(a.containerInfo),va(a,e),Kl=q}else va(a,e);if(Na(e),M&4){if(an&&Oa&&C!==null&&C.memoizedState.isDehydrated)try{wt(e,Ll,a.containerInfo)}catch(Xe){Ee(e,e.return,Xe)}if(Js){M=a.containerInfo,C=a.pendingChildren;try{wt(e,Wd,M,C)}catch(Xe){Ee(e,e.return,Xe)}}}k3&&(k3=!1,Fg(e)),a.effectDuration+=Hc(B);break;case 4:Be?(C=Kl,Kl=Cr(e.stateNode.containerInfo),va(a,e),Na(e),Kl=C):(va(a,e),Na(e)),M&4&&Js&&us(e.stateNode,e,e.stateNode.pendingChildren);break;case 12:M=Hs(),va(a,e),Na(e),e.stateNode.effectDuration+=ou(M);break;case 31:va(a,e),Na(e),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,Tu(e,M)));break;case 13:va(a,e),Na(e),e.child.flags&8192&&e.memoizedState!==null!=(C!==null&&C.memoizedState!==null)&&(p2=ce()),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,Tu(e,M)));break;case 22:B=e.memoizedState!==null;var ut=C!==null&&C.memoizedState!==null,ft=wo,yt=ra;if(wo=ft||B,ra=yt||ut,va(a,e),ra=yt,wo=ft,ut&&!B&&!ft&&!yt&&(e.mode&2)!==Kt&&0<=Pt&&0<=qt&&.05<qt-Pt&&Ds(e,Pt,qt),Na(e),M&8192&&(a=e.stateNode,a._visibility=B?a._visibility&~o1:a._visibility|o1,!B||C===null||ut||wo||ra||(lo(e),(e.mode&2)!==Kt&&0<=Pt&&0<=qt&&.05<qt-Pt&&ha(e,Pt,qt,"Disconnect")),an)){t:if(C=null,an)for(a=e;;){if(a.tag===5||Be&&a.tag===26){if(C===null){ut=C=a;try{q=ut.stateNode,B?wt(ut,Gu,q):wt(ut,Nf,ut.stateNode,ut.memoizedProps)}catch(Xe){Ee(ut,ut.return,Xe)}}}else if(a.tag===6){if(C===null){ut=a;try{var Vt=ut.stateNode;B?wt(ut,g3,Vt):wt(ut,Hy,Vt,ut.memoizedProps)}catch(Xe){Ee(ut,ut.return,Xe)}}}else if(a.tag===18){if(C===null){ut=a;try{var Jt=ut.stateNode;B?wt(ut,zf,Jt):wt(ut,fi,ut.stateNode)}catch(Xe){Ee(ut,ut.return,Xe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break t;for(;a.sibling===null;){if(a.return===null||a.return===e)break t;C===a&&(C=null),a=a.return}C===a&&(C=null),a.sibling.return=a.return,a=a.sibling}}M&4&&(M=e.updateQueue,M!==null&&(C=M.retryQueue,C!==null&&(M.retryQueue=null,Tu(e,C))));break;case 19:va(a,e),Na(e),M&4&&(M=e.updateQueue,M!==null&&(e.updateQueue=null,Tu(e,M)));break;case 30:break;case 21:break;default:va(a,e),Na(e)}(e.mode&2)!==Kt&&0<=Pt&&0<=qt&&((Bn||.05<bn)&&Mn(e,Pt,qt,bn,dn),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<qt-Pt&&(Kg(e.return.alternate,e.return)||ha(e,Pt,qt,"Mount"))),ni(o),$i(d),dn=y,Bn=v}function Na(e){var a=e.flags;if(a&2){try{wt(e,Ma,e)}catch(o){Ee(e,e.return,o)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function Fg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;Fg(a),a.tag===5&&a.flags&1024&&Mf(a.stateNode),e=e.sibling}}function qa(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Zn(e,a.alternate,a),a=a.sibling}function pr(e){var a=Ga(),o=ws(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 14:case 15:Sm(e,e.return,ys),lo(e);break;case 1:Ys(e,e.return);var v=e.stateNode;typeof v.componentWillUnmount=="function"&&Yg(e,e.return,v),lo(e);break;case 27:T&&wt(e,ct,e.stateNode);case 26:case 5:Ys(e,e.return),lo(e);break;case 22:e.memoizedState===null&&lo(e);break;case 30:lo(e);break;default:lo(e)}(e.mode&2)!==Kt&&0<=Pt&&0<=qt&&(Bn||.05<bn)&&Mn(e,Pt,qt,bn,dn),ni(a),$i(o),dn=d,Bn=y}function lo(e){for(e=e.child;e!==null;)pr(e),e=e.sibling}function kg(e,a,o,d){var y=Ga(),v=ws(),C=ts(),M=es(),B=o.flags;switch(o.tag){case 0:case 11:case 15:Xs(e,o,d),vm(o,ys);break;case 1:if(Xs(e,o,d),a=o.stateNode,typeof a.componentDidMount=="function"&&wt(o,B3,o,a),a=o.updateQueue,a!==null){e=o.stateNode;try{wt(o,Z0,a,e)}catch(q){Ee(o,o.return,q)}}d&&B&64&&Em(o),mf(o,o.return);break;case 27:T&&ya(o);case 26:case 5:Xs(e,o,d),d&&a===null&&B&4&&gf(o),mf(o,o.return);break;case 12:if(d&&B&4){B=Hs(),Xs(e,o,d),d=o.stateNode,d.effectDuration+=ou(B);try{wt(o,xd,o,a,Zu,d.effectDuration)}catch(q){Ee(o,o.return,q)}}else Xs(e,o,d);break;case 31:Xs(e,o,d),d&&B&4&&Qg(e,o);break;case 13:Xs(e,o,d),d&&B&4&&Zg(e,o);break;case 22:o.memoizedState===null&&Xs(e,o,d),mf(o,o.return);break;case 30:break;default:Xs(e,o,d)}(o.mode&2)!==Kt&&0<=Pt&&0<=qt&&(Bn||.05<bn)&&Mn(o,Pt,qt,bn,dn),ni(y),$i(v),dn=C,Bn=M}function Xs(e,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;)kg(e,a.alternate,a,o),a=a.sibling}function ro(e,a){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==o&&(e!=null&&Cl(e),o!=null&&Ir(o))}function _m(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(Cl(a),e!=null&&Ir(e))}function fs(e,a,o,d,y){if(a.subtreeFlags&10256||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child))for(a=a.child;a!==null;){var v=a.sibling;Ig(e,a,o,d,v!==null?v.actualStartTime:y),a=v}}function Ig(e,a,o,d,y){var v=Ga(),C=ws(),M=ts(),B=es(),q=Yu,ut=a.flags;switch(a.tag){case 0:case 11:case 15:(a.mode&2)!==Kt&&0<a.actualStartTime&&(a.flags&1)!==0&&$a(a,a.actualStartTime,y,Ea,o),fs(e,a,o,d,y),ut&2048&&Pg(a,Ai|il);break;case 1:(a.mode&2)!==Kt&&0<a.actualStartTime&&((a.flags&128)!==0?As(a,a.actualStartTime,y,[]):(a.flags&1)!==0&&$a(a,a.actualStartTime,y,Ea,o)),fs(e,a,o,d,y);break;case 3:var ft=Hs(),yt=Ea;Ea=a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)===0,fs(e,a,o,d,y),Ea=yt,ut&2048&&(o=null,a.alternate!==null&&(o=a.alternate.memoizedState.cache),d=a.memoizedState.cache,d!==o&&(Cl(d),o!=null&&Ir(o))),e.passiveEffectDuration+=Hc(ft);break;case 12:if(ut&2048){ut=Hs(),fs(e,a,o,d,y),e=a.stateNode,e.passiveEffectDuration+=ou(ut);try{wt(a,qg,a,a.alternate,Zu,e.passiveEffectDuration)}catch(Vt){Ee(a,a.return,Vt)}}else fs(e,a,o,d,y);break;case 31:ut=Ea,ft=a.alternate!==null?a.alternate.memoizedState:null,yt=a.memoizedState,ft!==null&&yt===null?(yt=a.deletions,yt!==null&&0<yt.length&&yt[0].tag===18?(Ea=!1,ft=ft.hydrationErrors,ft!==null&&As(a,a.actualStartTime,y,ft)):Ea=!0):Ea=!1,fs(e,a,o,d,y),Ea=ut;break;case 13:ut=Ea,ft=a.alternate!==null?a.alternate.memoizedState:null,yt=a.memoizedState,ft===null||ft.dehydrated===null||yt!==null&&yt.dehydrated!==null?Ea=!1:(yt=a.deletions,yt!==null&&0<yt.length&&yt[0].tag===18?(Ea=!1,ft=ft.hydrationErrors,ft!==null&&As(a,a.actualStartTime,y,ft)):Ea=!0),fs(e,a,o,d,y),Ea=ut;break;case 23:break;case 22:yt=a.stateNode,ft=a.alternate,a.memoizedState!==null?yt._visibility&Oo?fs(e,a,o,d,y):yf(e,a,o,d,y):yt._visibility&Oo?fs(e,a,o,d,y):(yt._visibility|=Oo,Ks(e,a,o,d,(a.subtreeFlags&10256)!==0||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child),y),(a.mode&2)===Kt||Ea||(e=a.actualStartTime,0<=e&&.05<y-e&&Ds(a,e,y),0<=Pt&&0<=qt&&.05<qt-Pt&&Ds(a,Pt,qt))),ut&2048&&ro(ft,a);break;case 24:fs(e,a,o,d,y),ut&2048&&_m(a.alternate,a);break;default:fs(e,a,o,d,y)}(a.mode&2)!==Kt&&((e=!Ea&&a.alternate===null&&a.return!==null&&a.return.alternate!==null)&&(o=a.actualStartTime,0<=o&&.05<y-o&&ha(a,o,y,"Mount")),0<=Pt&&0<=qt&&((Bn||.05<bn)&&Mn(a,Pt,qt,bn,dn),e&&.05<qt-Pt&&ha(a,Pt,qt,"Mount"))),ni(v),$i(C),dn=M,Bn=B,Yu=q}function Ks(e,a,o,d,y,v){for(y=y&&((a.subtreeFlags&10256)!==0||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child)),a=a.child;a!==null;){var C=a.sibling;Wg(e,a,o,d,y,C!==null?C.actualStartTime:v),a=C}}function Wg(e,a,o,d,y,v){var C=Ga(),M=ws(),B=ts(),q=es(),ut=Yu;y&&(a.mode&2)!==Kt&&0<a.actualStartTime&&(a.flags&1)!==0&&$a(a,a.actualStartTime,v,Ea,o);var ft=a.flags;switch(a.tag){case 0:case 11:case 15:Ks(e,a,o,d,y,v),Pg(a,Ai);break;case 23:break;case 22:var yt=a.stateNode;a.memoizedState!==null?yt._visibility&Oo?Ks(e,a,o,d,y,v):yf(e,a,o,d,v):(yt._visibility|=Oo,Ks(e,a,o,d,y,v)),y&&ft&2048&&ro(a.alternate,a);break;case 24:Ks(e,a,o,d,y,v),y&&ft&2048&&_m(a.alternate,a);break;default:Ks(e,a,o,d,y,v)}(a.mode&2)!==Kt&&0<=Pt&&0<=qt&&(Bn||.05<bn)&&Mn(a,Pt,qt,bn,dn),ni(C),$i(M),dn=B,Bn=q,Yu=ut}function yf(e,a,o,d,y){if(a.subtreeFlags&10256||a.actualDuration!==0&&(a.alternate===null||a.alternate.child!==a.child))for(var v=a.child;v!==null;){a=v.sibling;var C=e,M=o,B=d,q=a!==null?a.actualStartTime:y,ut=Yu;(v.mode&2)!==Kt&&0<v.actualStartTime&&(v.flags&1)!==0&&$a(v,v.actualStartTime,q,Ea,M);var ft=v.flags;switch(v.tag){case 22:yf(C,v,M,B,q),ft&2048&&ro(v.alternate,v);break;case 24:yf(C,v,M,B,q),ft&2048&&_m(v.alternate,v);break;default:yf(C,v,M,B,q)}Yu=ut,v=a}}function oo(e,a,o){if(e.subtreeFlags&Np)for(e=e.child;e!==null;)$g(e,a,o),e=e.sibling}function $g(e,a,o){switch(e.tag){case 26:if(oo(e,a,o),e.flags&Np)if(e.memoizedState!==null)E(o,Kl,e.memoizedState,e.memoizedProps);else{var d=e.stateNode,y=e.type;e=e.memoizedProps,((a&335544128)===a||qd(y,e))&&Xd(o,d,y,e)}break;case 5:oo(e,a,o),e.flags&Np&&(d=e.stateNode,y=e.type,e=e.memoizedProps,((a&335544128)===a||qd(y,e))&&Xd(o,d,y,e));break;case 3:case 4:Be?(d=Kl,Kl=Cr(e.stateNode.containerInfo),oo(e,a,o),Kl=d):oo(e,a,o);break;case 22:e.memoizedState===null&&(d=e.alternate,d!==null&&d.memoizedState!==null?(d=Np,Np=16777216,oo(e,a,o),Np=d):oo(e,a,o));break;default:oo(e,a,o)}}function ty(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function vf(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],y=Ga();Ra=d,ay(d,e),(d.mode&2)!==Kt&&0<=Pt&&0<=qt&&.05<qt-Pt&&ha(d,Pt,qt,"Unmount"),ni(y)}ty(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ey(e),e=e.sibling}function ey(e){var a=Ga(),o=ws(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 15:vf(e),e.flags&2048&&bm(e,e.return,Ai|il);break;case 3:var v=Hs();vf(e),e.stateNode.passiveEffectDuration+=Hc(v);break;case 12:v=Hs(),vf(e),e.stateNode.passiveEffectDuration+=ou(v);break;case 22:v=e.stateNode,e.memoizedState!==null&&v._visibility&Oo&&(e.return===null||e.return.tag!==13)?(v._visibility&=~Oo,Ad(e),(e.mode&2)!==Kt&&0<=Pt&&0<=qt&&.05<qt-Pt&&ha(e,Pt,qt,"Disconnect")):vf(e);break;default:vf(e)}(e.mode&2)!==Kt&&0<=Pt&&0<=qt&&(Bn||.05<bn)&&Mn(e,Pt,qt,bn,dn),ni(a),$i(o),Bn=y,dn=d}function Ad(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],y=Ga();Ra=d,ay(d,e),(d.mode&2)!==Kt&&0<=Pt&&0<=qt&&.05<qt-Pt&&ha(d,Pt,qt,"Unmount"),ni(y)}ty(e)}for(e=e.child;e!==null;)ny(e),e=e.sibling}function ny(e){var a=Ga(),o=ws(),d=ts(),y=es();switch(e.tag){case 0:case 11:case 15:bm(e,e.return,Ai),Ad(e);break;case 22:var v=e.stateNode;v._visibility&Oo&&(v._visibility&=~Oo,Ad(e));break;default:Ad(e)}(e.mode&2)!==Kt&&0<=Pt&&0<=qt&&(Bn||.05<bn)&&Mn(e,Pt,qt,bn,dn),ni(a),$i(o),Bn=y,dn=d}function ay(e,a){for(;Ra!==null;){var o=Ra,d=o,y=a,v=Ga(),C=ws(),M=ts(),B=es();switch(d.tag){case 0:case 11:case 15:bm(d,y,Ai);break;case 23:case 22:d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(y=d.memoizedState.cachePool.pool,y!=null&&Cl(y));break;case 24:Ir(d.memoizedState.cache)}if((d.mode&2)!==Kt&&0<=Pt&&0<=qt&&(Bn||.05<bn)&&Mn(d,Pt,qt,bn,dn),ni(v),$i(C),Bn=B,dn=M,d=o.child,d!==null)d.return=o,Ra=d;else t:for(o=e;Ra!==null;){if(d=Ra,v=d.sibling,C=d.return,qs(d),d===o){Ra=null;break t}if(v!==null){v.return=C,Ra=v;break t}Ra=C}}}function xm(e){var a=m3(e);if(a!=null){if(typeof a.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return a}if(e=Lm(e),e===null)throw Error("Could not find React container within specified host subtree.");return e.stateNode.current}function Dm(e,a){var o=e.tag;switch(a.$$typeof){case a2:if(e.type===a.value)return!0;break;case i2:t:{for(a=a.value,e=[e,0],o=0;o<e.length;){var d=e[o++],y=d.tag,v=e[o++],C=a[v];if(y!==5&&y!==26&&y!==27||!Fs(d)){for(;C!=null&&Dm(d,C);)v++,C=a[v];if(v===a.length){a=!0;break t}else for(d=d.child;d!==null;)e.push(d,v),d=d.sibling}}a=!1}return a;case s2:if((o===5||o===26||o===27)&&Zd(e.stateNode,a.value))return!0;break;case r2:if((o===5||o===6||o===26||o===27)&&(e=Pm(e),e!==null&&0<=e.indexOf(a.value)))return!0;break;case l2:if((o===5||o===26||o===27)&&(e=e.memoizedProps["data-testname"],typeof e=="string"&&e.toLowerCase()===a.value.toLowerCase()))return!0;break;default:throw Error("Invalid selector type specified.")}return!1}function Md(e){switch(e.$$typeof){case a2:return"<"+(tt(e.value)||"Unknown")+">";case i2:return":has("+(Md(e)||"")+")";case s2:return'[role="'+e.value+'"]';case r2:return'"'+e.value+'"';case l2:return'[data-testname="'+e.value+'"]';default:throw Error("Invalid selector type specified.")}}function iy(e,a){var o=[];e=[e,0];for(var d=0;d<e.length;){var y=e[d++],v=y.tag,C=e[d++],M=a[C];if(v!==5&&v!==26&&v!==27||!Fs(y)){for(;M!=null&&Dm(y,M);)C++,M=a[C];if(C===a.length)o.push(y);else for(y=y.child;y!==null;)e.push(y,C),y=y.sibling}}return o}function Nd(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");e=xm(e),e=iy(e,a),a=[],e=Array.from(e);for(var o=0;o<e.length;){var d=e[o++],y=d.tag;if(y===5||y===26||y===27)Fs(d)||a.push(d.stateNode);else for(d=d.child;d!==null;)e.push(d),d=d.sibling}return a}function l3(){ds&&o2.forEach(function(e){return e()})}function sy(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||lt.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function bi(e){if((he&Ha)!==za&&ne!==0)return ne&-ne;var a=lt.T;return a!==null?(a._updatedFibers||(a._updatedFibers=new Set),a._updatedFibers.add(e),Vh()):Gm()}function ly(){if(Qi===0)if((ne&536870912)===0||fe){var e=ot;ot<<=1,(ot&3932160)===0&&(ot=262144),Qi=e}else Qi=536870912;return e=gs.current,e!==null&&(e.flags|=32),Qi}function en(e,a,o){if(zp&&console.error("useInsertionEffect must not schedule updates."),o5&&(y2=!0),(e===Ze&&(Le===Jf||Le===Ff)||e.cancelPendingCommit!==null)&&(Cu(e,0),Hl(e,ne,Qi,!1)),I(e,o),(he&Ha)!==za&&e===Ze){if(Dr)switch(a.tag){case 0:case 11:case 15:e=se&&et(se)||"Unknown",nT.has(e)||(nT.add(e),a=et(a)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",a,e,e));break;case 1:eT||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),eT=!0)}}else xr&&Se(e,a,o),xy(a),e===Ze&&((he&Ha)===za&&(ec|=o),En===Wu&&Hl(e,ne,Qi,!1)),ja(e)}function Am(e,a,o){if((he&(Ha|ll))!==za)throw Error("Should not already be working.");if(ne!==0&&se!==null){var d=se,y=ce();switch(F9){case m1:case Jf:var v=Wm;ln&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Suspended",v,y,"Components ⚛",void 0,"primary-light")):console.timeStamp("Suspended",v,y,"Components ⚛",void 0,"primary-light"));break;case Ff:v=Wm,ln&&((d=d._debugTask)?d.run(console.timeStamp.bind(console,"Action",v,y,"Components ⚛",void 0,"primary-light")):console.timeStamp("Action",v,y,"Components ⚛",void 0,"primary-light"));break;default:ln&&(d=y-Wm,3>d||console.timeStamp("Blocked",Wm,y,"Components ⚛",void 0,5>d?"primary-light":10>d?"primary":100>d?"primary-dark":"error"))}}v=(o=!o&&(a&127)===0&&(a&e.expiredLanes)===0||J(e,a))?r3(e,a):Nm(e,a,!0);var C=o;do{if(v===Uo){Op&&!o&&Hl(e,a,0,!1),a=Le,Wm=ia(),F9=a;break}else{if(d=ce(),y=e.current.alternate,C&&!oy(y)){tn(a),y=di,v=d,!ln||v<=y||(qn?qn.run(console.timeStamp.bind(console,"Teared Render",y,v,me,"Scheduler ⚛","error")):console.timeStamp("Teared Render",y,v,me,"Scheduler ⚛","error")),uo(a,d),v=Nm(e,a,!1),C=!1;continue}if(v===Zf){if(C=a,e.errorRecoveryDisabledLanes&C)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){tn(a),da(di,d,a,qn),uo(a,d),a=M;t:{d=e,v=C,C=y1;var B=Oa&&d.current.memoizedState.isDehydrated;if(B&&(Cu(d,M).flags|=256),M=Nm(d,M,!1),M!==Zf){if($3&&!B){d.errorRecoveryDisabledLanes|=v,ec|=v,v=Wu;break t}d=Mi,Mi=C,d!==null&&(Mi===null?Mi=d:Mi.push.apply(Mi,d))}v=M}if(C=!1,v!==Zf)continue;d=ce()}}if(v===p1){tn(a),da(di,d,a,qn),uo(a,d),Cu(e,0),Hl(e,a,0,!0);break}t:{switch(o=e,v){case Uo:case p1:throw Error("Root did not complete. This is a bug in React.");case Wu:if((a&4194048)!==a)break;case c2:tn(a),mi(di,d,a,qn),uo(a,d),y=a,(y&127)!==0?Yy=d:(y&4194048)!==0&&(qy=d),Hl(o,a,Qi,!$u);break t;case Zf:Mi=null;break;case u2:case qE:break;default:throw Error("Unknown root exit status.")}if(lt.actQueue!==null)Om(o,y,a,Mi,S1,d2,Qi,ec,kf,v,null,null,di,d);else{if((a&62914560)===a&&(C=p2+QE-ce(),10<C)){if(Hl(o,a,Qi,!$u),H(o,0,!0)!==0)break t;Ql=a,o.timeoutHandle=ji(ry.bind(null,o,y,Mi,S1,d2,a,Qi,ec,kf,$u,v,"Throttled",di,d),C);break t}ry(o,y,Mi,S1,d2,a,Qi,ec,kf,$u,v,null,di,d)}}}break}while(!0);ja(e)}function ry(e,a,o,d,y,v,C,M,B,q,ut,ft,yt,Vt){e.timeoutHandle=Zs;var Jt=a.subtreeFlags,Xe=null;if((Jt&8192||(Jt&16785408)===16785408)&&(Xe=Uu(),$g(a,v,Xe),Jt=(v&62914560)===v?p2-ce():(v&4194048)===v?KE-ce():0,Jt=Kd(Xe,Jt),Jt!==null)){Ql=v,e.cancelPendingCommit=Jt(Om.bind(null,e,a,v,o,d,y,C,M,B,ut,Xe,Qd(Xe,e.containerInfo),yt,Vt)),Hl(e,v,C,!q);return}Om(e,a,v,o,d,y,C,M,B,ut,Xe,ft,yt,Vt)}function oy(e){for(var a=e;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var y=o[d],v=y.getSnapshot;y=y.value;try{if(!_i(v(),y))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Hl(e,a,o,d){a&=~t5,a&=~ec,e.suspendedLanes|=a,e.pingedLanes&=~a,d&&(e.warmLanes|=a),d=e.expirationTimes;for(var y=a;0<y;){var v=31-Fn(y),C=1<<v;d[v]=-1,y&=~C}o!==0&&bt(e,o,a)}function Sf(){return(he&(Ha|ll))===za?(Wr(0),!1):!0}function bf(){return(he&(Ha|ll))!==za}function Ef(){if(se!==null){if(Le===Ki)var e=se.return;else e=se,Hh(),Ic(e),Sp=null,r1=0,e=se;for(;e!==null;)_d(e.alternate,e),e=e.return;se=null}}function uo(e,a){(e&127)!==0&&(Vf=a),(e&4194048)!==0&&(Mo=a)}function Cu(e,a){ln&&(console.timeStamp("Blocking Track",.003,.003,"Blocking","Scheduler ⚛","primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition","Scheduler ⚛","primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense","Scheduler ⚛","primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle","Scheduler ⚛","primary-light"));var o=di;if(di=ia(),ne!==0&&0<o){if(tn(ne),En===u2||En===Wu)mi(o,di,a,qn);else{var d=di,y=qn;if(ln&&!(d<=o)){var v=(a&738197653)===a?"tertiary-dark":"primary-dark",C=(a&536870912)===a?"Prewarm":(a&201326741)===a?"Interrupted Hydration":"Interrupted Render";y?y.run(console.timeStamp.bind(console,C,o,d,me,"Scheduler ⚛",v)):console.timeStamp(C,o,d,me,"Scheduler ⚛",v)}}uo(ne,di)}if(o=qn,qn=null,(a&127)!==0){qn=Fm,y=0<=Mr&&Mr<Vf?Vf:Mr,d=0<=Gf&&Gf<Vf?Vf:Gf,v=0<=d?d:0<=y?y:di,0<=Yy&&(tn(2),Ht(Yy,v,a,o)),o=y;var M=d,B=km,q=0<mp,ut=Ju===1,ft=Ju===2;if(y=di,d=Fm,v=A3,C=M3,ln){if(me="Blocking",0<o?o>y&&(o=y):o=y,0<M?M>o&&(M=o):M=o,B!==null&&o>M){var yt=q?"secondary-light":"warning";d?d.run(console.timeStamp.bind(console,q?"Consecutive":"Event: "+B,M,o,me,"Scheduler ⚛",yt)):console.timeStamp(q?"Consecutive":"Event: "+B,M,o,me,"Scheduler ⚛",yt)}y>o&&(M=ut?"error":(a&738197653)===a?"tertiary-light":"primary-light",ut=ft?"Promise Resolved":ut?"Cascading Update":5<y-o?"Update Blocked":"Update",ft=[],C!=null&&ft.push(["Component name",C]),v!=null&&ft.push(["Method name",v]),o={start:o,end:y,detail:{devtools:{properties:ft,track:me,trackGroup:"Scheduler ⚛",color:M}}},d?d.run(performance.measure.bind(performance,ut,o)):performance.measure(ut,o))}Mr=-1.1,Ju=0,M3=A3=null,Yy=-1.1,mp=Gf,Gf=-1.1,Vf=ia()}if((a&4194048)!==0&&(qn=Im,y=0<=No&&No<Mo?Mo:No,o=0<=el&&el<Mo?Mo:el,d=0<=Fu&&Fu<Mo?Mo:Fu,v=0<=d?d:0<=o?o:di,0<=qy&&(tn(256),Ht(qy,v,a,qn)),ft=d,M=jf,B=0<ku,q=N3===2,v=di,d=Im,C=Q9,ut=Z9,ln&&(me="Transition",0<o?o>v&&(o=v):o=v,0<y?y>o&&(y=o):y=o,0<ft?ft>y&&(ft=y):ft=y,y>ft&&M!==null&&(yt=B?"secondary-light":"warning",d?d.run(console.timeStamp.bind(console,B?"Consecutive":"Event: "+M,ft,y,me,"Scheduler ⚛",yt)):console.timeStamp(B?"Consecutive":"Event: "+M,ft,y,me,"Scheduler ⚛",yt)),o>y&&(d?d.run(console.timeStamp.bind(console,"Action",y,o,me,"Scheduler ⚛","primary-dark")):console.timeStamp("Action",y,o,me,"Scheduler ⚛","primary-dark")),v>o&&(y=q?"Promise Resolved":5<v-o?"Update Blocked":"Update",ft=[],ut!=null&&ft.push(["Component name",ut]),C!=null&&ft.push(["Method name",C]),o={start:o,end:v,detail:{devtools:{properties:ft,track:me,trackGroup:"Scheduler ⚛",color:"primary-light"}}},d?d.run(performance.measure.bind(performance,y,o)):performance.measure(y,o))),el=No=-1.1,N3=0,qy=-1.1,ku=Fu,Fu=-1.1,Mo=ia()),o=e.timeoutHandle,o!==Zs&&(e.timeoutHandle=Zs,Vm(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),Ql=0,Ef(),Ze=e,se=o=wl(e.current,null),ne=a,Le=Ki,vs=null,$u=!1,Op=J(e,a),$3=!1,En=Uo,kf=Qi=t5=ec=tc=0,Mi=y1=null,d2=!1,(a&8)!==0&&(a|=a&32),d=e.entangledLanes,d!==0)for(e=e.entanglements,d&=a;0<d;)y=31-Fn(d),v=1<<y,a|=e[y],d&=~v;return Or=a,fu(),e=U9(),1e3<e-w9&&(lt.recentlyCreatedOwnerStacks=0,w9=e),ql.discardPendingWarnings(),o}function uy(e,a){Qt=null,lt.H=h1,lt.getCurrentStack=null,Dr=!1,xo=null,a===vp||a===Fy?(a=q0(),Le=m1):a===V3?(a=q0(),Le=XE):Le=a===J3?W3:a!==null&&typeof a=="object"&&typeof a.then=="function"?g1:f2,vs=a;var o=se;o===null?(En=p1,lf(e,ea(a,e.current))):o.mode&2&&wh(o)}function cy(){var e=gs.current;return e===null?!0:(ne&4194048)===ne?al===null:(ne&62914560)===ne||(ne&536870912)!==0?e===al:!1}function Mm(){var e=lt.H;return lt.H=h1,e===null?h1:e}function fy(){var e=lt.A;return lt.A=pj,e}function Od(e){qn===null&&(qn=e._debugTask==null?null:e._debugTask)}function Rd(){En=Wu,$u||(ne&4194048)!==ne&&gs.current!==null||(Op=!0),(tc&134217727)===0&&(ec&134217727)===0||Ze===null||Hl(Ze,ne,Qi,!1)}function Nm(e,a,o){var d=he;he|=Ha;var y=Mm(),v=fy();if(Ze!==e||ne!==a){if(xr){var C=e.memoizedUpdaters;0<C.size&&(Du(e,ne),C.clear()),Qn(e,a)}S1=null,Cu(e,a)}a=!1,C=En;t:do try{if(Le!==Ki&&se!==null){var M=se,B=vs;switch(Le){case W3:Ef(),C=c2;break t;case m1:case Jf:case Ff:case g1:gs.current===null&&(a=!0);var q=Le;if(Le=Ki,vs=null,_u(e,M,B,q),o&&Op){C=Uo;break t}break;default:q=Le,Le=Ki,vs=null,_u(e,M,B,q)}}hy(),C=En;break}catch(ut){uy(e,ut)}while(!0);return a&&e.shellSuspendCounter++,Hh(),he=d,lt.H=y,lt.A=v,se===null&&(Ze=null,ne=0,fu()),C}function hy(){for(;se!==null;)dy(se)}function r3(e,a){var o=he;he|=Ha;var d=Mm(),y=fy();if(Ze!==e||ne!==a){if(xr){var v=e.memoizedUpdaters;0<v.size&&(Du(e,ne),v.clear()),Qn(e,a)}S1=null,v1=ce()+e5,Cu(e,a)}else Op=J(e,a);t:do try{if(Le!==Ki&&se!==null)e:switch(a=se,v=vs,Le){case f2:Le=Ki,vs=null,_u(e,a,v,f2);break;case Jf:case Ff:if(Y0(v)){Le=Ki,vs=null,py(a);break}a=function(){Le!==Jf&&Le!==Ff||Ze!==e||(Le=h2),ja(e)},v.then(a,a);break t;case m1:Le=h2;break t;case XE:Le=I3;break t;case h2:Y0(v)?(Le=Ki,vs=null,py(a)):(Le=Ki,vs=null,_u(e,a,v,h2));break;case I3:var C=null;switch(se.tag){case 26:C=se.memoizedState;case 5:case 27:var M=se,B=M.type,q=M.pendingProps;if(C?g(C):yr(M.stateNode,B,q)){Le=Ki,vs=null;var ut=M.sibling;if(ut!==null)se=ut;else{var ft=M.return;ft!==null?(se=ft,zd(ft)):se=null}break e}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Le=Ki,vs=null,_u(e,a,v,I3);break;case g1:Le=Ki,vs=null,_u(e,a,v,g1);break;case W3:Ef(),En=c2;break t;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}lt.actQueue!==null?hy():o3();break}catch(yt){uy(e,yt)}while(!0);return Hh(),lt.H=d,lt.A=y,he=o,se!==null?Uo:(Ze=null,ne=0,fu(),En)}function o3(){for(;se!==null&&!Xt();)dy(se)}function dy(e){var a=e.alternate;(e.mode&2)!==Kt?(Uc(e),a=wt(e,Ya,a,e,Or),wh(e)):a=wt(e,Ya,a,e,Or),e.memoizedProps=e.pendingProps,a===null?zd(e):se=a}function py(e){var a=wt(e,u3,e);e.memoizedProps=e.pendingProps,a===null?zd(e):se=a}function u3(e){var a=e.alternate,o=(e.mode&2)!==Kt;switch(o&&Uc(e),e.tag){case 15:case 0:a=Ls(a,e,e.pendingProps,e.type,void 0,ne);break;case 11:a=Ls(a,e,e.pendingProps,e.type.render,e.ref,ne);break;case 5:Ic(e);default:_d(a,e),e=se=Gn(e,Or),a=Ya(a,e,Or)}return o&&wh(e),a}function _u(e,a,o,d){Hh(),Ic(a),Sp=null,r1=0;var y=a.return;try{if(jg(e,y,a,o,ne)){En=p1,lf(e,ea(o,e.current)),se=null;return}}catch(v){if(y!==null)throw se=y,v;En=p1,lf(e,ea(o,e.current)),se=null;return}a.flags&32768?(fe||d===f2?e=!0:Op||(ne&536870912)!==0?e=!1:($u=e=!0,(d===Jf||d===Ff||d===m1||d===g1)&&(d=gs.current,d!==null&&d.tag===13&&(d.flags|=16384))),my(a,e)):zd(a)}function zd(e){var a=e;do{if((a.flags&32768)!==0){my(a,$u);return}var o=a.alternate;if(e=a.return,Uc(a),o=wt(a,ym,o,a,Or),(a.mode&2)!==Kt&&U0(a),o!==null){se=o;return}if(a=a.sibling,a!==null){se=a;return}se=a=e}while(a!==null);En===Uo&&(En=qE)}function my(e,a){do{var o=hr(e.alternate,e);if(o!==null){o.flags&=32767,se=o;return}if((e.mode&2)!==Kt){U0(e),o=e.actualDuration;for(var d=e.child;d!==null;)o+=d.actualDuration,d=d.sibling;e.actualDuration=o}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(e=e.sibling,e!==null)){se=e;return}se=e=o}while(e!==null);En=c2,se=null}function Om(e,a,o,d,y,v,C,M,B,q,ut,ft,yt,Vt){e.cancelPendingCommit=null;do xu();while(ua!==ac);if(ql.flushLegacyContextWarning(),ql.flushPendingUnsafeLifecycleWarnings(),(he&(Ha|ll))!==za)throw Error("Should not already be working.");if(tn(o),q===Zf?da(yt,Vt,o,qn):d!==null?De(yt,Vt,o,d,a!==null&&a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)!==0,qn):gn(yt,Vt,o,qn),a!==null){if(o===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),a===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(v=a.lanes|a.childLanes,v|=j3,vt(e,o,v,C,M,B),e===Ze&&(se=Ze=null,ne=0),Rp=a,ic=e,Ql=o,i5=v,l5=y,WE=d,s5=Vt,$E=ft,Zl=m2,tT=null,a.actualDuration!==0||(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_y(wf,function(){return zu(),Zl===m2&&(Zl=a5),by(),null})):(e.callbackNode=null,e.callbackPriority=0),Ao=null,Zu=ia(),ft!==null&&Va(Vt,Zu,ft,qn),d=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||d){d=lt.T,lt.T=null,y=ui(),zn(2),C=he,he|=ll;try{i3(e,a,o)}finally{he=C,zn(y),lt.T=d}}ua=JE,gy(),yy(),vy()}}function gy(){if(ua===JE){ua=ac;var e=ic,a=Rp,o=Ql,d=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||d){d=lt.T,lt.T=null;var y=ui();zn(2);var v=he;he|=ll;try{Ap=o,Mp=e,wc(),Jg(a,e),Mp=Ap=null,gr(e.containerInfo)}finally{he=v,zn(y),lt.T=d}}e.current=a,ua=FE}}function yy(){if(ua===FE){ua=ac;var e=tT;if(e!==null){Zu=ia();var a=Do,o=Zu;!ln||o<=a||console.timeStamp(e,a,o,me,"Scheduler ⚛","secondary-light")}e=ic,a=Rp,o=Ql;var d=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||d){d=lt.T,lt.T=null;var y=ui();zn(2);var v=he;he|=ll;try{Ap=o,Mp=e,wc(),Zn(e,a.alternate,a),Mp=Ap=null}finally{he=v,zn(y),lt.T=d}}e=s5,a=$E,Do=ia(),e=a===null?e:Zu,a=Do,o=Zl===n5,d=qn,Ao!==null?Ye(e,a,Ao,!1,d):!ln||a<=e||(d?d.run(console.timeStamp.bind(console,o?"Commit Interrupted View Transition":"Commit",e,a,me,"Scheduler ⚛",o?"error":"secondary-dark")):console.timeStamp(o?"Commit Interrupted View Transition":"Commit",e,a,me,"Scheduler ⚛",o?"error":"secondary-dark")),ua=kE}}function vy(){if(ua===IE||ua===kE){if(ua===IE){var e=Do;Do=ia();var a=Do,o=Zl===n5;!ln||a<=e||console.timeStamp(o?"Interrupted View Transition":"Starting Animation",e,a,me,"Scheduler ⚛",o?" error":"secondary-light"),Zl!==n5&&(Zl=ZE)}ua=ac,xe(),e=ic;var d=Rp;a=Ql,o=WE;var y=d.actualDuration!==0||(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0;y?ua=g2:(ua=ac,Rp=ic=null,Sy(e,e.pendingLanes),If=0,E1=null);var v=e.pendingLanes;if(v===0&&(nc=null),y||Hm(e),v=We(a),d=d.stateNode,hi&&typeof hi.onCommitFiberRoot=="function")try{var C=(d.current.flags&128)===128;switch(v){case 2:var M=ge;break;case 8:M=Yl;break;case 32:M=wf;break;case 268435456:M=H9;break;default:M=wf}hi.onCommitFiberRoot(cp,d,M,C)}catch(ft){_r||(_r=!0,console.error("React instrumentation encountered an error: %o",ft))}if(xr&&e.memoizedUpdaters.clear(),l3(),o!==null){C=lt.T,M=ui(),zn(2),lt.T=null;try{var B=e.onRecoverableError;for(d=0;d<o.length;d++){var q=o[d],ut=c3(q.stack);wt(q.source,B,q.value,ut)}}finally{lt.T=C,zn(M)}}(Ql&3)!==0&&xu(),ja(e),v=e.pendingLanes,(a&261930)!==0&&(v&42)!==0?(Ky=!0,e===r5?b1++:(b1=0,r5=e)):b1=0,y||uo(a,Do),Oa&&Xm(),Wr(0)}}function c3(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function Sy(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,Ir(a)))}function xu(){return gy(),yy(),vy(),by()}function by(){if(ua!==g2)return!1;var e=ic,a=i5;i5=0;var o=We(Ql),d=32>o?32:o;o=lt.T;var y=ui();try{zn(d),lt.T=null;var v=l5;l5=null,d=ic;var C=Ql;if(ua=ac,Rp=ic=null,Ql=0,(he&(Ha|ll))!==za)throw Error("Cannot flush passive effects while already rendering.");tn(C),o5=!0,y2=!1;var M=0;if(Ao=null,M=ce(),Zl===ZE){var B=Do,q=M;!ln||q<=B||(J9?J9.run(console.timeStamp.bind(console,"Animating",B,q,me,"Scheduler ⚛","secondary-dark")):console.timeStamp("Animating",B,q,me,"Scheduler ⚛","secondary-dark"))}else{B=Do,q=M;var ut=Zl===a5;!ln||q<=B||(qn?qn.run(console.timeStamp.bind(console,ut?"Waiting for Paint":"Waiting",B,q,me,"Scheduler ⚛","secondary-light")):console.timeStamp(ut?"Waiting for Paint":"Waiting",B,q,me,"Scheduler ⚛","secondary-light"))}B=he,he|=ll;var ft=d.current;wc(),ey(ft);var yt=d.current;ft=s5,wc(),Ig(d,yt,C,v,ft),Hm(d),he=B;var Vt=ce();if(yt=M,ft=qn,Ao!==null?Ye(yt,Vt,Ao,!0,ft):!ln||Vt<=yt||(ft?ft.run(console.timeStamp.bind(console,"Remaining Effects",yt,Vt,me,"Scheduler ⚛","secondary-dark")):console.timeStamp("Remaining Effects",yt,Vt,me,"Scheduler ⚛","secondary-dark")),uo(C,Vt),Wr(0,!1),y2?d===E1?If++:(If=0,E1=d):If=0,y2=o5=!1,hi&&typeof hi.onPostCommitFiberRoot=="function")try{hi.onPostCommitFiberRoot(cp,d)}catch(Xe){_r||(_r=!0,console.error("React instrumentation encountered an error: %o",Xe))}var Jt=d.current.stateNode;return Jt.effectDuration=0,Jt.passiveEffectDuration=0,!0}finally{zn(y),lt.T=o,Sy(e,a)}}function Ey(e,a,o){a=ea(o,a),B0(a),a=hd(e.stateNode,a,2),e=Ri(e,a,2),e!==null&&(I(e,2),ja(e))}function Ee(e,a,o){if(zp=!1,e.tag===3)Ey(e,e,o);else{for(;a!==null;){if(a.tag===3){Ey(a,e,o);return}if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(nc===null||!nc.has(d))){e=ea(o,e),B0(e),o=dd(2),d=Ri(a,o,2),d!==null&&(pd(o,d,a,e),I(d,2),ja(d));return}}a=a.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
140
140
 
141
141
  Error message:
142
142
 
143
- %s`,o)}}function Om(e,a,o){var d=e.pingCache;if(d===null){d=e.pingCache=new pj;var y=new Set;d.set(a,y)}else y=d.get(a),y===void 0&&(y=new Set,d.set(a,y));y.has(o)||($3=!0,y.add(o),d=f3.bind(null,e,a,o),Tr&&Mu(e,o),a.then(d,d))}function f3(e,a,o){var d=e.pingCache;d!==null&&d.delete(a),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,(o&127)!==0?0>xr&&(Uf=xr=ia(),Jm=Py("Promise Resolved"),ku=2):(o&4194048)!==0&&0>Ws&&(Mo=Ws=ia(),km=Py("Promise Resolved"),N3=2),sy()&&rt.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
143
+ %s`,o)}}function Rm(e,a,o){var d=e.pingCache;if(d===null){d=e.pingCache=new mj;var y=new Set;d.set(a,y)}else y=d.get(a),y===void 0&&(y=new Set,d.set(a,y));y.has(o)||($3=!0,y.add(o),d=f3.bind(null,e,a,o),xr&&Du(e,o),a.then(d,d))}function f3(e,a,o){var d=e.pingCache;d!==null&&d.delete(a),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,(o&127)!==0?0>Mr&&(Vf=Mr=ia(),Fm=Py("Promise Resolved"),Ju=2):(o&4194048)!==0&&0>el&&(Mo=el=ia(),Im=Py("Promise Resolved"),N3=2),sy()&&lt.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
144
144
 
145
145
  When testing, code that resolves suspended data should be wrapped into act(...):
146
146
 
@@ -149,7 +149,7 @@ act(() => {
149
149
  });
150
150
  /* assert on the output */
151
151
 
152
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),Xe===e&&(ee&o)===o&&(bn===tc||bn===u2&&(ee&62914560)===ee&&fe()-p2<KE?(de&za)===Ra&&xu(e,0):t5|=o,Jf===ee&&(Jf=0)),ja(e)}function Ty(e,a){a===0&&(a=at()),e=_a(e,a),e!==null&&(W(e,a),ja(e))}function Cy(e){var a=e.memoizedState,o=0;a!==null&&(o=a.retryLane),Ty(e,o)}function h3(e,a){var o=0;switch(e.tag){case 31:case 13:var d=e.stateNode,y=e.memoizedState;y!==null&&(o=y.retryLane);break;case 19:d=e.stateNode;break;case 22:d=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}d!==null&&d.delete(a),Ty(e,o)}function Rm(e,a,o){if((a.subtreeFlags&67117056)!==0)for(a=a.child;a!==null;){var d=e,y=a,v=y.type===Gd;v=o||v,y.tag!==22?y.flags&67108864?v&&Bt(y,wi,d,y):Rm(d,y,v):y.memoizedState===null&&(v&&y.flags&8192?Bt(y,wi,d,y):y.subtreeFlags&67108864&&Bt(y,Rm,d,y,v)),a=a.sibling}}function wi(e,a){At(!0);try{fr(a),ny(a),kg(e,a.alternate,a,!1),Wg(e,a,0,null,!1,0)}finally{At(!1)}}function zm(e){var a=!0;e.current.mode&24||(a=!1),Rm(e,e.current,a)}function Rd(e){if((de&za)===Ra){var a=e.tag;if(a===3||a===1||a===0||a===11||a===14||a===15){if(a=nt(e)||"ReactComponent",v2!==null){if(v2.has(a))return;v2.add(a)}else v2=new Set([a]);Bt(e,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function Mu(e,a){Tr&&e.memoizedUpdaters.forEach(function(o){xe(e,o,a)})}function _y(e,a){var o=rt.actQueue;return o!==null?(o.push(a),yj):jt(e,a)}function xy(e){sy()&&rt.actQueue===null&&Bt(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
152
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),Ze===e&&(ne&o)===o&&(En===Wu||En===u2&&(ne&62914560)===ne&&ce()-p2<QE?(he&Ha)===za&&Cu(e,0):t5|=o,kf===ne&&(kf=0)),ja(e)}function Ty(e,a){a===0&&(a=mt()),e=xa(e,a),e!==null&&(I(e,a),ja(e))}function Cy(e){var a=e.memoizedState,o=0;a!==null&&(o=a.retryLane),Ty(e,o)}function h3(e,a){var o=0;switch(e.tag){case 31:case 13:var d=e.stateNode,y=e.memoizedState;y!==null&&(o=y.retryLane);break;case 19:d=e.stateNode;break;case 22:d=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}d!==null&&d.delete(a),Ty(e,o)}function zm(e,a,o){if((a.subtreeFlags&67117056)!==0)for(a=a.child;a!==null;){var d=e,y=a,v=y.type===Ld;v=o||v,y.tag!==22?y.flags&67108864?v&&wt(y,Bi,d,y):zm(d,y,v):y.memoizedState===null&&(v&&y.flags&8192?wt(y,Bi,d,y):y.subtreeFlags&67108864&&wt(y,zm,d,y,v)),a=a.sibling}}function Bi(e,a){Wt(!0);try{pr(a),ny(a),kg(e,a.alternate,a,!1),Wg(e,a,0,null,!1,0)}finally{Wt(!1)}}function Hm(e){var a=!0;e.current.mode&24||(a=!1),zm(e,e.current,a)}function Hd(e){if((he&Ha)===za){var a=e.tag;if(a===3||a===1||a===0||a===11||a===14||a===15){if(a=et(e)||"ReactComponent",v2!==null){if(v2.has(a))return;v2.add(a)}else v2=new Set([a]);wt(e,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function Du(e,a){xr&&e.memoizedUpdaters.forEach(function(o){Se(e,o,a)})}function _y(e,a){var o=lt.actQueue;return o!==null?(o.push(a),vj):Lt(e,a)}function xy(e){sy()&&lt.actQueue===null&&wt(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
153
153
 
154
154
  When testing, code that causes React state updates should be wrapped into act(...):
155
155
 
@@ -158,11 +158,11 @@ act(() => {
158
158
  });
159
159
  /* assert on the output */
160
160
 
161
- This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,nt(e))})}function co(e){if(il===null)return e;var a=il(e);return a===void 0?e:a.current}function zd(e){if(il===null)return e;var a=il(e);return a===void 0?e!=null&&typeof e.render=="function"&&(a=co(e.render),e.render!==a)?(a={$$typeof:Sa,render:a},e.displayName!==void 0&&(a.displayName=e.displayName),a):e:a.current}function Hm(e,a){if(il===null)return!1;var o=e.elementType;a=a.type;var d=!1,y=typeof a=="object"&&a!==null?a.$$typeof:null;switch(e.tag){case 1:typeof a=="function"&&(d=!0);break;case 0:(typeof a=="function"||y===li)&&(d=!0);break;case 11:(y===Sa||y===li)&&(d=!0);break;case 14:case 15:(y===zu||y===li)&&(d=!0);break;default:return!1}return!!(d&&(e=il(o),e!==void 0&&e===il(a)))}function Dy(e){il!==null&&typeof WeakSet=="function"&&(Rp===null&&(Rp=new WeakSet),Rp.add(e))}function Ay(e,a,o){do{var d=e,y=d.alternate,v=d.child,C=d.sibling,M=d.tag;d=d.type;var B=null;switch(M){case 0:case 15:case 1:B=d;break;case 11:B=d.render}if(il===null)throw Error("Expected resolveFamily to be set during hot reload.");var q=!1;if(d=!1,B!==null&&(B=il(B),B!==void 0&&(o.has(B)?d=!0:a.has(B)&&(M===1?d=!0:q=!0))),Rp!==null&&(Rp.has(e)||y!==null&&Rp.has(y))&&(d=!0),d&&(e._debugNeedsRemount=!0),(d||q)&&(y=_a(e,2),y!==null&&Ie(y,e,2)),v===null||d||Ay(v,a,o),C===null)break;e=C}while(!0)}function d3(e,a,o,d){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,nT||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Hd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ol(e,a){var o=e.alternate;switch(o===null?(o=S(e.tag,a,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o._debugOwner=e._debugOwner,o._debugStack=e._debugStack,o._debugTask=e._debugTask,o._debugHookTypes=e._debugHookTypes,o.alternate=e,e.alternate=o):(o.pendingProps=a,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null,o.actualDuration=-0,o.actualStartTime=-1.1),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,a=e.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext,_debugThenableState:a._debugThenableState},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o.selfBaseDuration=e.selfBaseDuration,o.treeBaseDuration=e.treeBaseDuration,o._debugInfo=e._debugInfo,o._debugNeedsRemount=e._debugNeedsRemount,o.tag){case 0:case 15:o.type=co(e.type);break;case 1:o.type=co(e.type);break;case 11:o.type=zd(e.type)}return o}function Ln(e,a){e.flags&=65011714;var o=e.alternate;return o===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,a=o.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext,_debugThenableState:a._debugThenableState},e.selfBaseDuration=o.selfBaseDuration,e.treeBaseDuration=o.treeBaseDuration),e}function wd(e,a,o,d,y,v){var C=0,M=e;if(typeof e=="function")Hd(e)&&(C=1),M=co(M);else if(typeof e=="string")we&&T?(C=pi(),C=Vl(e,o,C)?26:vt(e)?27:5):we?(C=pi(),C=Vl(e,o,C)?26:5):C=T&&vt(e)?27:5;else t:switch(e){case Cf:return a=S(31,o,a,y),a.elementType=Cf,a.lanes=v,a;case Ru:return hr(o.children,y,v,a);case Gd:C=8,y|=24;break;case wm:return e=o,d=y,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),a=S(12,e,a,d|2),a.elementType=wm,a.lanes=v,a.stateNode={effectDuration:0,passiveEffectDuration:0},a;case jd:return a=S(13,o,a,y),a.elementType=jd,a.lanes=v,a;case Um:return a=S(19,o,a,y),a.elementType=Um,a.lanes=v,a;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rn:C=10;break t;case po:C=9;break t;case Sa:C=11,M=zd(M);break t;case zu:C=14;break t;case li:C=16,M=null;break t}M="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?o="null":Pn(e)?o="array":e!==void 0&&e.$$typeof===Rl?(o="<"+(et(e.type)||"Unknown")+" />",M=" Did you accidentally export a JSX literal instead of a component?"):o=typeof e,C=d?typeof d.tag=="number"?nt(d):typeof d.name=="string"?d.name:null:null,C&&(M+=`
161
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,et(e))})}function co(e){if(rl===null)return e;var a=rl(e);return a===void 0?e:a.current}function wd(e){if(rl===null)return e;var a=rl(e);return a===void 0?e!=null&&typeof e.render=="function"&&(a=co(e.render),e.render!==a)?(a={$$typeof:Sa,render:a},e.displayName!==void 0&&(a.displayName=e.displayName),a):e:a.current}function wm(e,a){if(rl===null)return!1;var o=e.elementType;a=a.type;var d=!1,y=typeof a=="object"&&a!==null?a.$$typeof:null;switch(e.tag){case 1:typeof a=="function"&&(d=!0);break;case 0:(typeof a=="function"||y===oi)&&(d=!0);break;case 11:(y===Sa||y===oi)&&(d=!0);break;case 14:case 15:(y===Ou||y===oi)&&(d=!0);break;default:return!1}return!!(d&&(e=rl(o),e!==void 0&&e===rl(a)))}function Dy(e){rl!==null&&typeof WeakSet=="function"&&(Hp===null&&(Hp=new WeakSet),Hp.add(e))}function Ay(e,a,o){do{var d=e,y=d.alternate,v=d.child,C=d.sibling,M=d.tag;d=d.type;var B=null;switch(M){case 0:case 15:case 1:B=d;break;case 11:B=d.render}if(rl===null)throw Error("Expected resolveFamily to be set during hot reload.");var q=!1;if(d=!1,B!==null&&(B=rl(B),B!==void 0&&(o.has(B)?d=!0:a.has(B)&&(M===1?d=!0:q=!0))),Hp!==null&&(Hp.has(e)||y!==null&&Hp.has(y))&&(d=!0),d&&(e._debugNeedsRemount=!0),(d||q)&&(y=xa(e,2),y!==null&&en(y,e,2)),v===null||d||Ay(v,a,o),C===null)break;e=C}while(!0)}function d3(e,a,o,d){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,aT||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Ud(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wl(e,a){var o=e.alternate;switch(o===null?(o=S(e.tag,a,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o._debugOwner=e._debugOwner,o._debugStack=e._debugStack,o._debugTask=e._debugTask,o._debugHookTypes=e._debugHookTypes,o.alternate=e,e.alternate=o):(o.pendingProps=a,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null,o.actualDuration=-0,o.actualStartTime=-1.1),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,a=e.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext,_debugThenableState:a._debugThenableState},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o.selfBaseDuration=e.selfBaseDuration,o.treeBaseDuration=e.treeBaseDuration,o._debugInfo=e._debugInfo,o._debugNeedsRemount=e._debugNeedsRemount,o.tag){case 0:case 15:o.type=co(e.type);break;case 1:o.type=co(e.type);break;case 11:o.type=wd(e.type)}return o}function Gn(e,a){e.flags&=65011714;var o=e.alternate;return o===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,a=o.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext,_debugThenableState:a._debugThenableState},e.selfBaseDuration=o.selfBaseDuration,e.treeBaseDuration=o.treeBaseDuration),e}function Bd(e,a,o,d,y,v){var C=0,M=e;if(typeof e=="function")Ud(e)&&(C=1),M=co(M);else if(typeof e=="string")Be&&T?(C=gi(),C=Pl(e,o,C)?26:St(e)?27:5):Be?(C=gi(),C=Pl(e,o,C)?26:5):C=T&&St(e)?27:5;else t:switch(e){case xf:return a=S(31,o,a,y),a.elementType=xf,a.lanes=v,a;case Nu:return mr(o.children,y,v,a);case Ld:C=8,y|=24;break;case Um:return e=o,d=y,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),a=S(12,e,a,d|2),a.elementType=Um,a.lanes=v,a.stateNode={effectDuration:0,passiveEffectDuration:0},a;case Pd:return a=S(13,o,a,y),a.elementType=Pd,a.lanes=v,a;case Bm:return a=S(19,o,a,y),a.elementType=Bm,a.lanes=v,a;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rn:C=10;break t;case po:C=9;break t;case Sa:C=11,M=wd(M);break t;case Ou:C=14;break t;case oi:C=16,M=null;break t}M="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?o="null":jn(e)?o="array":e!==void 0&&e.$$typeof===Ul?(o="<"+(tt(e.type)||"Unknown")+" />",M=" Did you accidentally export a JSX literal instead of a component?"):o=typeof e,C=d?typeof d.tag=="number"?et(d):typeof d.name=="string"?d.name:null:null,C&&(M+=`
162
162
 
163
- Check the render method of \``+C+"`."),C=29,o=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(o+"."+M)),M=null}return a=S(C,o,a,y),a.elementType=e,a.type=M,a.lanes=v,a._debugOwner=d,a}function Ud(e,a,o){return a=wd(e.type,e.key,e.props,e._owner,a,o),a._debugOwner=e._owner,a._debugStack=e._debugStack,a._debugTask=e._debugTask,a}function hr(e,a,o,d){return e=S(7,e,d,a),e.lanes=o,e}function Bd(e,a,o){return e=S(6,e,null,a),e.lanes=o,e}function fo(e){var a=S(18,null,null,Kt);return a.stateNode=e,a}function bf(e,a,o){return a=S(4,e.children!==null?e.children:[],e.key,a),a.lanes=o,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}function Nu(e,a,o,d,y,v,C,M,B){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Xs,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=v,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],a=0;31>a;a++)e.push(new Set);this._debugRootType=o?"hydrateRoot()":"createRoot()"}function ho(e,a,o,d,y,v,C,M,B,q,ct,ht){return e=new Nu(e,a,o,C,B,q,ct,ht,M),a=1,v===!0&&(a|=24),v=S(3,null,null,a|2),e.current=v,v.stateNode=e,a=uu(),Sl(a),e.pooledCache=a,Sl(a),v.memoizedState={element:d,isDehydrated:o,cache:a},Yh(v),e}function ii(e){return""+e}function My(e){return e?(e=tn,e):tn}function Ny(e,a,o,d){return Ef(a.current,2,e,a,o,d),2}function Ef(e,a,o,d,y,v){if(ci&&typeof ci.onScheduleFiberRoot=="function")try{ci.onScheduleFiberRoot(op,d,o)}catch(C){Er||(Er=!0,console.error("React instrumentation encountered an error: %o",C))}y=My(y),d.context===null?d.context=y:d.pendingContext=y,Cr&&xo!==null&&!iT&&(iT=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
163
+ Check the render method of \``+C+"`."),C=29,o=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(o+"."+M)),M=null}return a=S(C,o,a,y),a.elementType=e,a.type=M,a.lanes=v,a._debugOwner=d,a}function Vd(e,a,o){return a=Bd(e.type,e.key,e.props,e._owner,a,o),a._debugOwner=e._owner,a._debugStack=e._debugStack,a._debugTask=e._debugTask,a}function mr(e,a,o,d){return e=S(7,e,d,a),e.lanes=o,e}function Gd(e,a,o){return e=S(6,e,null,a),e.lanes=o,e}function fo(e){var a=S(18,null,null,Kt);return a.stateNode=e,a}function Tf(e,a,o){return a=S(4,e.children!==null?e.children:[],e.key,a),a.lanes=o,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}function Au(e,a,o,d,y,v,C,M,B){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Zs,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.hiddenUpdates=pt(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=v,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],a=0;31>a;a++)e.push(new Set);this._debugRootType=o?"hydrateRoot()":"createRoot()"}function ho(e,a,o,d,y,v,C,M,B,q,ut,ft){return e=new Au(e,a,o,C,B,q,ut,ft,M),a=1,v===!0&&(a|=24),v=S(3,null,null,a|2),e.current=v,v.stateNode=e,a=ru(),Cl(a),e.pooledCache=a,Cl(a),v.memoizedState={element:d,isDehydrated:o,cache:a},Xh(v),e}function li(e){return""+e}function My(e){return e?(e=sn,e):sn}function Ny(e,a,o,d){return Cf(a.current,2,e,a,o,d),2}function Cf(e,a,o,d,y,v){if(hi&&typeof hi.onScheduleFiberRoot=="function")try{hi.onScheduleFiberRoot(cp,d,o)}catch(C){_r||(_r=!0,console.error("React instrumentation encountered an error: %o",C))}y=My(y),d.context===null?d.context=y:d.pendingContext=y,Dr&&xo!==null&&!sT&&(sT=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
164
164
 
165
- Check the render method of %s.`,nt(xo)||"Unknown")),d=El(a),d.payload={element:o},v=v===void 0?null:v,v!==null&&(typeof v!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",v),d.callback=v),o=Ni(e,d,a),o!==null&&(Wi(a,"root.render()",null),Ie(o,e,a),pu(o,e,a))}function Tf(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<a?o:a}}function Ou(e,a){Tf(e,a),(e=e.alternate)&&Tf(e,a)}function Vd(){return xo}var ae={},p3=H,si=J2(),Me=Object.assign,Oy=Symbol.for("react.element"),Rl=Symbol.for("react.transitional.element"),zl=Symbol.for("react.portal"),Ru=Symbol.for("react.fragment"),Gd=Symbol.for("react.strict_mode"),wm=Symbol.for("react.profiler"),po=Symbol.for("react.consumer"),Rn=Symbol.for("react.context"),Sa=Symbol.for("react.forward_ref"),jd=Symbol.for("react.suspense"),Um=Symbol.for("react.suspense_list"),zu=Symbol.for("react.memo"),li=Symbol.for("react.lazy"),Cf=Symbol.for("react.activity"),Ry=Symbol.for("react.memo_cache_sentinel"),mo=Symbol.iterator,Hu=Symbol.for("react.client.reference"),Pn=Array.isArray,rt=p3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ui=t.rendererVersion,Bi=t.rendererPackageName,Hl=t.extraDevToolsConfig,Xa=t.getPublicInstance,qs=t.getRootHostContext,ba=t.getChildHostContext,_f=t.prepareForCommit,dr=t.resetAfterCommit,Ld=t.createInstance;t.cloneMutableInstance;var Fn=t.appendInitialChild,We=t.finalizeInitialChildren,se=t.shouldSetTextContent,wl=t.createTextInstance;t.cloneMutableTextInstance;var Vi=t.scheduleTimeout,Bm=t.cancelTimeout,Xs=t.noTimeout,Ka=t.isPrimaryRenderer;t.warnsIfNotActing;var $e=t.supportsMutation,Ks=t.supportsPersistence,Na=t.supportsHydration,m3=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var cn=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var zn=t.setCurrentUpdatePriority,ri=t.getCurrentUpdatePriority,Vm=t.resolveUpdatePriority,wu=t.trackSchedulerEvent,go=t.resolveEventType,hs=t.resolveEventTimeStamp,xf=t.shouldAttemptEagerTransition,Gm=t.detachDeletedInstance;t.requestPostPaintCallback;var Uu=t.maySuspendCommit,Bu=t.maySuspendCommitOnUpdate,Pd=t.maySuspendCommitInSyncRender,pr=t.preloadInstance,Vu=t.startSuspendingCommit,Yd=t.suspendInstance;t.suspendOnActiveViewTransition;var qd=t.waitForCommitToBeReady,Xd=t.getSuspendedCommitReason,Gi=t.NotPendingTransition,ji=t.HostTransitionContext,Df=t.resetFormInstance,yo=t.bindToConsole,zy=t.supportsMicrotasks,Li=t.scheduleMicrotask,ds=t.supportsTestSelectors,jm=t.findFiberRoot,mr=t.getBoundingRect,Lm=t.getTextContent,Qs=t.isHiddenSubtree,Kd=t.matchAccessibilityRole,Si=t.setFocusIfFocusable,Pi=t.setupIntersectionObserver,Hn=t.appendChild,Ul=t.appendChildToContainer,kt=t.commitTextUpdate,Ge=t.commitMount,Yn=t.commitUpdate,Qd=t.insertBefore,Gu=t.insertInContainerBefore,vo=t.removeChild,Zd=t.removeChildFromContainer,ju=t.resetTextContent,Lu=t.hideInstance,g3=t.hideTextInstance,Af=t.unhideInstance,Hy=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var Pm=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var wy=t.cloneInstance,Jd=t.createContainerChildSet,Fd=t.appendChildToContainerChildSet,qn=t.finalizeContainerChildren,kd=t.replaceContainerChildren,Zs=t.cloneHiddenInstance,wn=t.cloneHiddenTextInstance,Mf=t.isSuspenseInstancePending,Id=t.isSuspenseInstanceFallback,aa=t.getSuspenseInstanceFallbackErrorDetails,Xn=t.registerSuspenseInstanceRetry,oi=t.canHydrateFormStateMarker,ps=t.isFormStateMarkerMatching,gr=t.getNextHydratableSibling,y3=t.getNextHydratableSiblingAfterSingleton,Wd=t.getFirstHydratableChild,$d=t.getFirstHydratableChildWithinContainer,tp=t.getFirstHydratableChildWithinActivityInstance,ep=t.getFirstHydratableChildWithinSuspenseInstance,np=t.getFirstHydratableChildWithinSingleton,Nf=t.canHydrateInstance,v3=t.canHydrateTextInstance,re=t.canHydrateActivityInstance,Le=t.canHydrateSuspenseInstance,oe=t.hydrateInstance,ce=t.hydrateTextInstance,He=t.hydrateActivityInstance,bi=t.hydrateSuspenseInstance,yr=t.getNextHydratableInstanceAfterActivityInstance,So=t.getNextHydratableInstanceAfterSuspenseInstance,Ym=t.commitHydratedInstance,Bl=t.commitHydratedContainer,yn=t.commitHydratedActivityInstance,vr=t.commitHydratedSuspenseInstance,bo=t.finalizeHydratedChildren,qm=t.flushHydrationEvents;t.clearActivityBoundary;var Ei=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var Pu=t.clearSuspenseBoundaryFromContainer,Of=t.hideDehydratedBoundary,ui=t.unhideDehydratedBoundary,ap=t.shouldDeleteUnhydratedTailInstances,Rf=t.diffHydratedPropsForDevWarnings,Xm=t.diffHydratedTextForDevWarnings,Yu=t.describeHydratableInstanceForDevWarnings,ip=t.validateHydratableInstance,Sr=t.validateHydratableTextInstance,we=t.supportsResources,Vl=t.isHostHoistableType,br=t.getHoistableRoot,Js=t.getResource,sp=t.acquireResource,lp=t.releaseResource,Uy=t.hydrateHoistable,qu=t.mountHoistable,rp=t.unmountHoistable,l=t.createHoistableInstance,r=t.prepareToCommitHoistables,h=t.mayResourceSuspendCommit,g=t.preloadResource,E=t.suspendResource,T=t.supportsSingletons,z=t.resolveSingletonInstance,L=t.acquireSingletonInstance,ft=t.releaseSingletonInstance,vt=t.isHostSingletonType,Mt=t.isSingletonScope,xt=[],Rt=[],Yt=-1,tn={};Object.freeze(tn);var kn=Math.clz32?Math.clz32:pt,Eo=Math.log,it=Math.LN2,J=256,ut=262144,_t=4194304,jt=si.unstable_scheduleCallback,fn=si.unstable_cancelCallback,Xt=si.unstable_shouldYield,_e=si.unstable_requestPaint,fe=si.unstable_now,ye=si.unstable_ImmediatePriority,Gl=si.unstable_UserBlockingPriority,zf=si.unstable_NormalPriority,z9=si.unstable_IdlePriority,WG=si.log,$G=si.unstable_setDisableYieldValue,op=null,ci=null,Er=!1,Tr=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",H9=0;if(typeof performance=="object"&&typeof performance.now=="function")var tj=performance,w9=function(){return tj.now()};else{var ej=Date;w9=function(){return ej.now()}}var Ti=typeof Object.is=="function"?Object.is:ue,U9=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},S3=Object.prototype.hasOwnProperty,en=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",me="Blocking",Xu=!1,To={color:"primary",properties:null,tooltipText:"",track:"Components ⚛"},Ku={start:-0,end:-0,detail:{devtools:To}},nj=["Changed Props",""],aj=["Changed Props","This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."],Km=0,B9,V9,G9,j9,L9,P9,Y9;mn.__reactDisabledLog=!0;var b3,q9,E3=!1,T3=new(typeof WeakMap=="function"?WeakMap:Map),C3=new WeakMap,up=[],cp=0,By=null,Qm=0,Fs=[],ks=0,Hf=null,Co=1,_o="",Qu=bt(null),Zm=bt(null),Zu=bt(null),Vy=bt(null),X9=/["'&<>\n\t]|^\s|\s$/,xo=null,Cr=!1,Qa=null,vn=null,he=!1,_r=!1,ms=null,Ju=null,Is=!1,_3=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Kt=0,Gy=bt(null),x3=bt(null),D3=bt(null),jy={},Ly=null,fp=null,hp=!1,ij=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(o,d){e.push(d)}};this.abort=function(){a.aborted=!0,e.forEach(function(o){return o()})}},sj=si.unstable_scheduleCallback,lj=si.unstable_NormalPriority,Un={$$typeof:Rn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},ia=si.unstable_now,Py=console.createTask?console.createTask:function(){return null},fi=-0,Fu=-0,Do=-0,Ao=null,Ci=-1.1,wf=-0,Sn=-0,Lt=-1.1,qt=-1.1,hn=null,Bn=!1,Uf=-0,xr=-1.1,Jm=null,ku=0,A3=null,M3=null,Bf=-1.1,Fm=null,dp=-1.1,Yy=-1.1,Mo=-0,No=-1.1,Ws=-1.1,N3=0,km=null,K9=null,Q9=null,Iu=-1.1,Vf=null,Wu=-1.1,qy=-1.1,Z9=null,J9=0,Im=-1.1,Xy=!1,Ky=!1,Qy=null,pp=null,O3=!1,R3=!1,Zy=!1,z3=!1,Gf=0,H3={},Wm=null,w3=0,jf=0,mp=null,F9=rt.S;rt.S=function(e,a){if(XE=fe(),typeof a=="object"&&a!==null&&typeof a.then=="function"){if(0>No&&0>Ws){No=ia();var o=hs(),d=go();(o!==Wu||d!==Vf)&&(Wu=-1.1),Iu=o,Vf=d}Ag(e,a)}F9!==null&&F9(e,a)};var Lf=bt(null),jl={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},$m=[],t1=[],e1=[],n1=[],a1=[],i1=[],Pf=new Set;jl.recordUnsafeLifecycleWarnings=function(e,a){Pf.has(e.type)||(typeof a.componentWillMount=="function"&&a.componentWillMount.__suppressDeprecationWarning!==!0&&$m.push(e),e.mode&8&&typeof a.UNSAFE_componentWillMount=="function"&&t1.push(e),typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&e1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillReceiveProps=="function"&&n1.push(e),typeof a.componentWillUpdate=="function"&&a.componentWillUpdate.__suppressDeprecationWarning!==!0&&a1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillUpdate=="function"&&i1.push(e))},jl.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<$m.length&&($m.forEach(function(M){e.add(nt(M)||"Component"),Pf.add(M.type)}),$m=[]);var a=new Set;0<t1.length&&(t1.forEach(function(M){a.add(nt(M)||"Component"),Pf.add(M.type)}),t1=[]);var o=new Set;0<e1.length&&(e1.forEach(function(M){o.add(nt(M)||"Component"),Pf.add(M.type)}),e1=[]);var d=new Set;0<n1.length&&(n1.forEach(function(M){d.add(nt(M)||"Component"),Pf.add(M.type)}),n1=[]);var y=new Set;0<a1.length&&(a1.forEach(function(M){y.add(nt(M)||"Component"),Pf.add(M.type)}),a1=[]);var v=new Set;if(0<i1.length&&(i1.forEach(function(M){v.add(nt(M)||"Component"),Pf.add(M.type)}),i1=[]),0<a.size){var C=O(a);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
165
+ Check the render method of %s.`,et(xo)||"Unknown")),d=xl(a),d.payload={element:o},v=v===void 0?null:v,v!==null&&(typeof v!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",v),d.callback=v),o=Ri(e,d,a),o!==null&&(Wi(a,"root.render()",null),en(o,e,a),hu(o,e,a))}function _f(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<a?o:a}}function Mu(e,a){_f(e,a),(e=e.alternate)&&_f(e,a)}function jd(){return xo}var ie={},p3=w,ri=J2(),Me=Object.assign,Oy=Symbol.for("react.element"),Ul=Symbol.for("react.transitional.element"),Bl=Symbol.for("react.portal"),Nu=Symbol.for("react.fragment"),Ld=Symbol.for("react.strict_mode"),Um=Symbol.for("react.profiler"),po=Symbol.for("react.consumer"),Rn=Symbol.for("react.context"),Sa=Symbol.for("react.forward_ref"),Pd=Symbol.for("react.suspense"),Bm=Symbol.for("react.suspense_list"),Ou=Symbol.for("react.memo"),oi=Symbol.for("react.lazy"),xf=Symbol.for("react.activity"),Ry=Symbol.for("react.memo_cache_sentinel"),mo=Symbol.iterator,Ru=Symbol.for("react.client.reference"),jn=Array.isArray,lt=p3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Vi=t.rendererVersion,Gi=t.rendererPackageName,Vl=t.extraDevToolsConfig,Xa=t.getPublicInstance,Qs=t.getRootHostContext,ba=t.getChildHostContext,Df=t.prepareForCommit,gr=t.resetAfterCommit,Yd=t.createInstance;t.cloneMutableInstance;var Jn=t.appendInitialChild,nn=t.finalizeInitialChildren,le=t.shouldSetTextContent,Gl=t.createTextInstance;t.cloneMutableTextInstance;var ji=t.scheduleTimeout,Vm=t.cancelTimeout,Zs=t.noTimeout,Ka=t.isPrimaryRenderer;t.warnsIfNotActing;var an=t.supportsMutation,Js=t.supportsPersistence,Oa=t.supportsHydration,m3=t.getInstanceFromNode;t.beforeActiveInstanceBlur;var fn=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var zn=t.setCurrentUpdatePriority,ui=t.getCurrentUpdatePriority,Gm=t.resolveUpdatePriority,zu=t.trackSchedulerEvent,go=t.resolveEventType,hs=t.resolveEventTimeStamp,Af=t.shouldAttemptEagerTransition,jm=t.detachDeletedInstance;t.requestPostPaintCallback;var Hu=t.maySuspendCommit,wu=t.maySuspendCommitOnUpdate,qd=t.maySuspendCommitInSyncRender,yr=t.preloadInstance,Uu=t.startSuspendingCommit,Xd=t.suspendInstance;t.suspendOnActiveViewTransition;var Kd=t.waitForCommitToBeReady,Qd=t.getSuspendedCommitReason,Li=t.NotPendingTransition,Pi=t.HostTransitionContext,Mf=t.resetFormInstance,yo=t.bindToConsole,zy=t.supportsMicrotasks,Yi=t.scheduleMicrotask,ds=t.supportsTestSelectors,Lm=t.findFiberRoot,vr=t.getBoundingRect,Pm=t.getTextContent,Fs=t.isHiddenSubtree,Zd=t.matchAccessibilityRole,Ei=t.setFocusIfFocusable,qi=t.setupIntersectionObserver,Hn=t.appendChild,jl=t.appendChildToContainer,kt=t.commitTextUpdate,je=t.commitMount,Ln=t.commitUpdate,Jd=t.insertBefore,Bu=t.insertInContainerBefore,vo=t.removeChild,Fd=t.removeChildFromContainer,Vu=t.resetTextContent,Gu=t.hideInstance,g3=t.hideTextInstance,Nf=t.unhideInstance,Hy=t.unhideTextInstance;t.cancelViewTransitionName,t.cancelRootViewTransitionName,t.restoreRootViewTransitionName,t.cloneRootViewTransitionContainer,t.removeRootViewTransitionClone,t.measureClonedInstance,t.hasInstanceChanged,t.hasInstanceAffectedParent,t.startViewTransition,t.startGestureTransition,t.stopViewTransition,t.getCurrentGestureOffset,t.createViewTransitionInstance;var Ym=t.clearContainer;t.createFragmentInstance,t.updateFragmentInstanceFiber,t.commitNewChildToFragmentInstance,t.deleteChildFromFragmentInstance;var wy=t.cloneInstance,kd=t.createContainerChildSet,Id=t.appendChildToContainerChildSet,Pn=t.finalizeContainerChildren,Wd=t.replaceContainerChildren,ks=t.cloneHiddenInstance,wn=t.cloneHiddenTextInstance,Of=t.isSuspenseInstancePending,$d=t.isSuspenseInstanceFallback,aa=t.getSuspenseInstanceFallbackErrorDetails,Yn=t.registerSuspenseInstanceRetry,ci=t.canHydrateFormStateMarker,ps=t.isFormStateMarkerMatching,Sr=t.getNextHydratableSibling,y3=t.getNextHydratableSiblingAfterSingleton,tp=t.getFirstHydratableChild,ep=t.getFirstHydratableChildWithinContainer,np=t.getFirstHydratableChildWithinActivityInstance,ap=t.getFirstHydratableChildWithinSuspenseInstance,ip=t.getFirstHydratableChildWithinSingleton,Rf=t.canHydrateInstance,v3=t.canHydrateTextInstance,re=t.canHydrateActivityInstance,qe=t.canHydrateSuspenseInstance,oe=t.hydrateInstance,ue=t.hydrateTextInstance,Ue=t.hydrateActivityInstance,Ti=t.hydrateSuspenseInstance,br=t.getNextHydratableInstanceAfterActivityInstance,So=t.getNextHydratableInstanceAfterSuspenseInstance,qm=t.commitHydratedInstance,Ll=t.commitHydratedContainer,vn=t.commitHydratedActivityInstance,Er=t.commitHydratedSuspenseInstance,bo=t.finalizeHydratedChildren,Xm=t.flushHydrationEvents;t.clearActivityBoundary;var Ci=t.clearSuspenseBoundary;t.clearActivityBoundaryFromContainer;var ju=t.clearSuspenseBoundaryFromContainer,zf=t.hideDehydratedBoundary,fi=t.unhideDehydratedBoundary,sp=t.shouldDeleteUnhydratedTailInstances,Hf=t.diffHydratedPropsForDevWarnings,Km=t.diffHydratedTextForDevWarnings,Lu=t.describeHydratableInstanceForDevWarnings,lp=t.validateHydratableInstance,Tr=t.validateHydratableTextInstance,Be=t.supportsResources,Pl=t.isHostHoistableType,Cr=t.getHoistableRoot,Is=t.getResource,rp=t.acquireResource,op=t.releaseResource,Uy=t.hydrateHoistable,Pu=t.mountHoistable,up=t.unmountHoistable,l=t.createHoistableInstance,r=t.prepareToCommitHoistables,h=t.mayResourceSuspendCommit,g=t.preloadResource,E=t.suspendResource,T=t.supportsSingletons,z=t.resolveSingletonInstance,L=t.acquireSingletonInstance,ct=t.releaseSingletonInstance,St=t.isHostSingletonType,At=t.isSingletonScope,xt=[],Ot=[],Yt=-1,sn={};Object.freeze(sn);var Fn=Math.clz32?Math.clz32:dt,Eo=Math.log,at=Math.LN2,Z=256,ot=262144,_t=4194304,Lt=ri.unstable_scheduleCallback,hn=ri.unstable_cancelCallback,Xt=ri.unstable_shouldYield,xe=ri.unstable_requestPaint,ce=ri.unstable_now,ge=ri.unstable_ImmediatePriority,Yl=ri.unstable_UserBlockingPriority,wf=ri.unstable_NormalPriority,H9=ri.unstable_IdlePriority,$G=ri.log,tj=ri.unstable_setDisableYieldValue,cp=null,hi=null,_r=!1,xr=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",w9=0;if(typeof performance=="object"&&typeof performance.now=="function")var ej=performance,U9=function(){return ej.now()};else{var nj=Date;U9=function(){return nj.now()}}var _i=typeof Object.is=="function"?Object.is:Bt,B9=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},S3=Object.prototype.hasOwnProperty,ln=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",me="Blocking",Yu=!1,To={color:"primary",properties:null,tooltipText:"",track:"Components ⚛"},qu={start:-0,end:-0,detail:{devtools:To}},aj=["Changed Props",""],ij=["Changed Props","This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner."],Qm=0,V9,G9,j9,L9,P9,Y9,q9;ta.__reactDisabledLog=!0;var b3,X9,E3=!1,T3=new(typeof WeakMap=="function"?WeakMap:Map),C3=new WeakMap,fp=[],hp=0,By=null,Zm=0,Ws=[],$s=0,Uf=null,Co=1,_o="",Xu=Tt(null),Jm=Tt(null),Ku=Tt(null),Vy=Tt(null),K9=/["'&<>\n\t]|^\s|\s$/,xo=null,Dr=!1,Qa=null,Sn=null,fe=!1,Ar=!1,ms=null,Qu=null,tl=!1,_3=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Kt=0,Gy=Tt(null),x3=Tt(null),D3=Tt(null),jy={},Ly=null,dp=null,pp=!1,sj=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(o,d){e.push(d)}};this.abort=function(){a.aborted=!0,e.forEach(function(o){return o()})}},lj=ri.unstable_scheduleCallback,rj=ri.unstable_NormalPriority,Un={$$typeof:Rn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},ia=ri.unstable_now,Py=console.createTask?console.createTask:function(){return null},di=-0,Zu=-0,Do=-0,Ao=null,xi=-1.1,Bf=-0,bn=-0,Pt=-1.1,qt=-1.1,dn=null,Bn=!1,Vf=-0,Mr=-1.1,Fm=null,Ju=0,A3=null,M3=null,Gf=-1.1,km=null,mp=-1.1,Yy=-1.1,Mo=-0,No=-1.1,el=-1.1,N3=0,Im=null,Q9=null,Z9=null,Fu=-1.1,jf=null,ku=-1.1,qy=-1.1,J9=null,F9=0,Wm=-1.1,Xy=!1,Ky=!1,Qy=null,gp=null,O3=!1,R3=!1,Zy=!1,z3=!1,Lf=0,H3={},$m=null,w3=0,Pf=0,yp=null,k9=lt.S;lt.S=function(e,a){if(KE=ce(),typeof a=="object"&&a!==null&&typeof a.then=="function"){if(0>No&&0>el){No=ia();var o=hs(),d=go();(o!==ku||d!==jf)&&(ku=-1.1),Fu=o,jf=d}Ag(e,a)}k9!==null&&k9(e,a)};var Yf=Tt(null),ql={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},t1=[],e1=[],n1=[],a1=[],i1=[],s1=[],qf=new Set;ql.recordUnsafeLifecycleWarnings=function(e,a){qf.has(e.type)||(typeof a.componentWillMount=="function"&&a.componentWillMount.__suppressDeprecationWarning!==!0&&t1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillMount=="function"&&e1.push(e),typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&n1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillReceiveProps=="function"&&a1.push(e),typeof a.componentWillUpdate=="function"&&a.componentWillUpdate.__suppressDeprecationWarning!==!0&&i1.push(e),e.mode&8&&typeof a.UNSAFE_componentWillUpdate=="function"&&s1.push(e))},ql.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<t1.length&&(t1.forEach(function(M){e.add(et(M)||"Component"),qf.add(M.type)}),t1=[]);var a=new Set;0<e1.length&&(e1.forEach(function(M){a.add(et(M)||"Component"),qf.add(M.type)}),e1=[]);var o=new Set;0<n1.length&&(n1.forEach(function(M){o.add(et(M)||"Component"),qf.add(M.type)}),n1=[]);var d=new Set;0<a1.length&&(a1.forEach(function(M){d.add(et(M)||"Component"),qf.add(M.type)}),a1=[]);var y=new Set;0<i1.length&&(i1.forEach(function(M){y.add(et(M)||"Component"),qf.add(M.type)}),i1=[]);var v=new Set;if(0<s1.length&&(s1.forEach(function(M){v.add(et(M)||"Component"),qf.add(M.type)}),s1=[]),0<a.size){var C=O(a);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
166
166
 
167
167
  * Move code with side effects to componentDidMount, and set initial state in the constructor.
168
168
 
@@ -191,17 +191,17 @@ Please update the following components: %s`,C)),0<y.size&&(C=O(y),console.warn(`
191
191
  * Move data fetching code or side effects to componentDidUpdate.
192
192
  * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
193
193
 
194
- Please update the following components: %s`,C))};var Jy=new Map,k9=new Set;jl.recordLegacyContextWarning=function(e,a){for(var o=null,d=e;d!==null;)d.mode&8&&(o=d),d=d.return;o===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!k9.has(e.type)&&(d=Jy.get(o),e.type.contextTypes!=null||e.type.childContextTypes!=null||a!==null&&typeof a.getChildContext=="function")&&(d===void 0&&(d=[],Jy.set(o,d)),d.push(e))},jl.flushLegacyContextWarning=function(){Jy.forEach(function(e){if(e.length!==0){var a=e[0],o=new Set;e.forEach(function(y){o.add(nt(y)||"Component"),k9.add(y.type)});var d=O(o);Bt(a,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
194
+ Please update the following components: %s`,C))};var Jy=new Map,I9=new Set;ql.recordLegacyContextWarning=function(e,a){for(var o=null,d=e;d!==null;)d.mode&8&&(o=d),d=d.return;o===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!I9.has(e.type)&&(d=Jy.get(o),e.type.contextTypes!=null||e.type.childContextTypes!=null||a!==null&&typeof a.getChildContext=="function")&&(d===void 0&&(d=[],Jy.set(o,d)),d.push(e))},ql.flushLegacyContextWarning=function(){Jy.forEach(function(e){if(e.length!==0){var a=e[0],o=new Set;e.forEach(function(y){o.add(et(y)||"Component"),I9.add(y.type)});var d=O(o);wt(a,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
195
195
 
196
196
  The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
197
197
 
198
198
  Please update the following components: %s
199
199
 
200
- Learn more about this warning here: https://react.dev/link/legacy-context`,d)})}})},jl.discardPendingWarnings=function(){$m=[],t1=[],e1=[],n1=[],a1=[],i1=[],Jy=new Map};var I9={react_stack_bottom_frame:function(e,a,o){var d=Cr;Cr=!0;try{return e(a,o)}finally{Cr=d}}},U3=I9.react_stack_bottom_frame.bind(I9),W9={react_stack_bottom_frame:function(e){var a=Cr;Cr=!0;try{return e.render()}finally{Cr=a}}},$9=W9.react_stack_bottom_frame.bind(W9),tE={react_stack_bottom_frame:function(e,a){try{a.componentDidMount()}catch(o){Ee(e,e.return,o)}}},B3=tE.react_stack_bottom_frame.bind(tE),eE={react_stack_bottom_frame:function(e,a,o,d,y){try{a.componentDidUpdate(o,d,y)}catch(v){Ee(e,e.return,v)}}},nE=eE.react_stack_bottom_frame.bind(eE),aE={react_stack_bottom_frame:function(e,a){var o=a.stack;e.componentDidCatch(a.value,{componentStack:o!==null?o:""})}},rj=aE.react_stack_bottom_frame.bind(aE),iE={react_stack_bottom_frame:function(e,a,o){try{o.componentWillUnmount()}catch(d){Ee(e,a,d)}}},sE=iE.react_stack_bottom_frame.bind(iE),lE={react_stack_bottom_frame:function(e){var a=e.create;return e=e.inst,a=a(),e.destroy=a}},oj=lE.react_stack_bottom_frame.bind(lE),rE={react_stack_bottom_frame:function(e,a,o){try{o()}catch(d){Ee(e,a,d)}}},uj=rE.react_stack_bottom_frame.bind(rE),oE={react_stack_bottom_frame:function(e){var a=e._init;return a(e._payload)}},cj=oE.react_stack_bottom_frame.bind(oE),gp=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),V3=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Fy=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),ky={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Yf=null,s1=!1,yp=null,l1=0,te=null,G3,uE=G3=!1,cE={},fE={},hE={};R=function(e,a,o){if(o!==null&&typeof o=="object"&&o._store&&(!o._store.validated&&o.key==null||o._store.validated===2)){if(typeof o._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");o._store.validated=1;var d=nt(e),y=d||"null";if(!cE[y]){cE[y]=!0,o=o._owner,e=e._debugOwner;var v="";e&&typeof e.tag=="number"&&(y=nt(e))&&(v=`
200
+ Learn more about this warning here: https://react.dev/link/legacy-context`,d)})}})},ql.discardPendingWarnings=function(){t1=[],e1=[],n1=[],a1=[],i1=[],s1=[],Jy=new Map};var W9={react_stack_bottom_frame:function(e,a,o){var d=Dr;Dr=!0;try{return e(a,o)}finally{Dr=d}}},U3=W9.react_stack_bottom_frame.bind(W9),$9={react_stack_bottom_frame:function(e){var a=Dr;Dr=!0;try{return e.render()}finally{Dr=a}}},tE=$9.react_stack_bottom_frame.bind($9),eE={react_stack_bottom_frame:function(e,a){try{a.componentDidMount()}catch(o){Ee(e,e.return,o)}}},B3=eE.react_stack_bottom_frame.bind(eE),nE={react_stack_bottom_frame:function(e,a,o,d,y){try{a.componentDidUpdate(o,d,y)}catch(v){Ee(e,e.return,v)}}},aE=nE.react_stack_bottom_frame.bind(nE),iE={react_stack_bottom_frame:function(e,a){var o=a.stack;e.componentDidCatch(a.value,{componentStack:o!==null?o:""})}},oj=iE.react_stack_bottom_frame.bind(iE),sE={react_stack_bottom_frame:function(e,a,o){try{o.componentWillUnmount()}catch(d){Ee(e,a,d)}}},lE=sE.react_stack_bottom_frame.bind(sE),rE={react_stack_bottom_frame:function(e){var a=e.create;return e=e.inst,a=a(),e.destroy=a}},uj=rE.react_stack_bottom_frame.bind(rE),oE={react_stack_bottom_frame:function(e,a,o){try{o()}catch(d){Ee(e,a,d)}}},cj=oE.react_stack_bottom_frame.bind(oE),uE={react_stack_bottom_frame:function(e){var a=e._init;return a(e._payload)}},fj=uE.react_stack_bottom_frame.bind(uE),vp=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),V3=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Fy=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),ky={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Xf=null,l1=!1,Sp=null,r1=0,ee=null,G3,cE=G3=!1,fE={},hE={},dE={};R=function(e,a,o){if(o!==null&&typeof o=="object"&&o._store&&(!o._store.validated&&o.key==null||o._store.validated===2)){if(typeof o._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");o._store.validated=1;var d=et(e),y=d||"null";if(!fE[y]){fE[y]=!0,o=o._owner,e=e._debugOwner;var v="";e&&typeof e.tag=="number"&&(y=et(e))&&(v=`
201
201
 
202
202
  Check the render method of \``+y+"`."),v||d&&(v=`
203
203
 
204
- Check the top-level render call using <`+d+">.");var C="";o!=null&&e!==o&&(d=null,typeof o.tag=="number"?d=nt(o):typeof o.name=="string"&&(d=o.name),d&&(C=" It was passed a child from "+d+".")),Bt(a,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',v,C)})}}};var qf=Pc(!0),dE=Pc(!1),r1=1,Oo=2,$s=[],vp=0,j3=0,pE=0,mE=1,gE=2,L3=3,$u=!1,yE=!1,P3=null,Y3=!1,Sp=bt(null),Iy=bt(0),gs=bt(null),tl=null,bp=1,o1=2,In=bt(0),Wy=0,el=1,_i=2,ys=4,xi=8,Ep,vE=new Set,SE=new Set,q3=new Set,bE=new Set,Ro=0,Qt=null,qe=null,sa=null,$y=!1,Tp=!1,Xf=!1,t2=0,u1=0,zo=null,fj=0,hj=25,ot=null,nl=null,Ho=-1,c1=!1,f1={readContext:Ve,use:Ce,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useLayoutEffect:gn,useInsertionEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useSyncExternalStore:gn,useId:gn,useHostTransitionStatus:gn,useFormState:gn,useActionState:gn,useOptimistic:gn,useMemoCache:gn,useCacheRefresh:gn};f1.useEffectEvent=gn;var X3=null,EE=null,K3=null,TE=null,Dr=null,Ll=null,e2=null;X3={readContext:function(e){return Ve(e)},use:Ce,useCallback:function(e,a){return ot="useCallback",Ft(),ei(a),sd(e,a)},useContext:function(e){return ot="useContext",Ft(),Ve(e)},useEffect:function(e,a){return ot="useEffect",Ft(),ei(a),ni(e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",Ft(),ei(o),id(e,a,o)},useInsertionEffect:function(e,a){ot="useInsertionEffect",Ft(),ei(a),Cl(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",Ft(),ei(a),_l(e,a)},useMemo:function(e,a){ot="useMemo",Ft(),ei(a);var o=rt.H;rt.H=Dr;try{return ld(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",Ft();var d=rt.H;rt.H=Dr;try{return Ih(e,a,o)}finally{rt.H=d}},useRef:function(e){return ot="useRef",Ft(),rs(e)},useState:function(e){ot="useState",Ft();var a=rt.H;rt.H=Dr;try{return vu(e)}finally{rt.H=a}},useDebugValue:function(){ot="useDebugValue",Ft()},useDeferredValue:function(e,a){return ot="useDeferredValue",Ft(),$c(e,a)},useTransition:function(){return ot="useTransition",Ft(),od()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",Ft(),Wh(e,a,o)},useId:function(){return ot="useId",Ft(),nf()},useFormState:function(e,a){return ot="useFormState",Ft(),gu(),Nn(e,a)},useActionState:function(e,a){return ot="useActionState",Ft(),Nn(e,a)},useOptimistic:function(e){return ot="useOptimistic",Ft(),ed(e)},useHostTransitionStatus:lr,useMemoCache:eo,useCacheRefresh:function(){return ot="useCacheRefresh",Ft(),rr()},useEffectEvent:function(e){return ot="useEffectEvent",Ft(),ar(e)}},EE={readContext:function(e){return Ve(e)},use:Ce,useCallback:function(e,a){return ot="useCallback",Et(),sd(e,a)},useContext:function(e){return ot="useContext",Et(),Ve(e)},useEffect:function(e,a){return ot="useEffect",Et(),ni(e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",Et(),id(e,a,o)},useInsertionEffect:function(e,a){ot="useInsertionEffect",Et(),Cl(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",Et(),_l(e,a)},useMemo:function(e,a){ot="useMemo",Et();var o=rt.H;rt.H=Dr;try{return ld(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=rt.H;rt.H=Dr;try{return Ih(e,a,o)}finally{rt.H=d}},useRef:function(e){return ot="useRef",Et(),rs(e)},useState:function(e){ot="useState",Et();var a=rt.H;rt.H=Dr;try{return vu(e)}finally{rt.H=a}},useDebugValue:function(){ot="useDebugValue",Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",Et(),$c(e,a)},useTransition:function(){return ot="useTransition",Et(),od()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",Et(),Wh(e,a,o)},useId:function(){return ot="useId",Et(),nf()},useActionState:function(e,a){return ot="useActionState",Et(),Nn(e,a)},useFormState:function(e,a){return ot="useFormState",Et(),gu(),Nn(e,a)},useOptimistic:function(e){return ot="useOptimistic",Et(),ed(e)},useHostTransitionStatus:lr,useMemoCache:eo,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),rr()},useEffectEvent:function(e){return ot="useEffectEvent",Et(),ar(e)}},K3={readContext:function(e){return Ve(e)},use:Ce,useCallback:function(e,a){return ot="useCallback",Et(),no(e,a)},useContext:function(e){return ot="useContext",Et(),Ve(e)},useEffect:function(e,a){ot="useEffect",Et(),Da(2048,xi,e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",Et(),sr(e,a,o)},useInsertionEffect:function(e,a){return ot="useInsertionEffect",Et(),Da(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",Et(),Da(4,ys,e,a)},useMemo:function(e,a){ot="useMemo",Et();var o=rt.H;rt.H=Ll;try{return Su(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=rt.H;rt.H=Ll;try{return ws(e,a,o)}finally{rt.H=d}},useRef:function(){return ot="useRef",Et(),De().memoizedState},useState:function(){ot="useState",Et();var e=rt.H;rt.H=Ll;try{return ws(ss)}finally{rt.H=e}},useDebugValue:function(){ot="useDebugValue",Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",Et(),rd(e,a)},useTransition:function(){return ot="useTransition",Et(),wg()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",Et(),nr(e,a,o)},useId:function(){return ot="useId",Et(),De().memoizedState},useFormState:function(e){return ot="useFormState",Et(),gu(),Wc(e)},useActionState:function(e){return ot="useActionState",Et(),Wc(e)},useOptimistic:function(e,a){return ot="useOptimistic",Et(),W0(e,a)},useHostTransitionStatus:lr,useMemoCache:eo,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),De().memoizedState},useEffectEvent:function(e){return ot="useEffectEvent",Et(),ir(e)}},TE={readContext:function(e){return Ve(e)},use:Ce,useCallback:function(e,a){return ot="useCallback",Et(),no(e,a)},useContext:function(e){return ot="useContext",Et(),Ve(e)},useEffect:function(e,a){ot="useEffect",Et(),Da(2048,xi,e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",Et(),sr(e,a,o)},useInsertionEffect:function(e,a){return ot="useInsertionEffect",Et(),Da(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",Et(),Da(4,ys,e,a)},useMemo:function(e,a){ot="useMemo",Et();var o=rt.H;rt.H=e2;try{return Su(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=rt.H;rt.H=e2;try{return yu(e,a,o)}finally{rt.H=d}},useRef:function(){return ot="useRef",Et(),De().memoizedState},useState:function(){ot="useState",Et();var e=rt.H;rt.H=e2;try{return yu(ss)}finally{rt.H=e}},useDebugValue:function(){ot="useDebugValue",Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",Et(),nm(e,a)},useTransition:function(){return ot="useTransition",Et(),xl()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",Et(),nr(e,a,o)},useId:function(){return ot="useId",Et(),De().memoizedState},useFormState:function(e){return ot="useFormState",Et(),gu(),Ri(e)},useActionState:function(e){return ot="useActionState",Et(),Ri(e)},useOptimistic:function(e,a){return ot="useOptimistic",Et(),$0(e,a)},useHostTransitionStatus:lr,useMemoCache:eo,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),De().memoizedState},useEffectEvent:function(e){return ot="useEffectEvent",Et(),ir(e)}},Dr={readContext:function(e){return A(),Ve(e)},use:function(e){return D(),Ce(e)},useCallback:function(e,a){return ot="useCallback",D(),Ft(),sd(e,a)},useContext:function(e){return ot="useContext",D(),Ft(),Ve(e)},useEffect:function(e,a){return ot="useEffect",D(),Ft(),ni(e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",D(),Ft(),id(e,a,o)},useInsertionEffect:function(e,a){ot="useInsertionEffect",D(),Ft(),Cl(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",D(),Ft(),_l(e,a)},useMemo:function(e,a){ot="useMemo",D(),Ft();var o=rt.H;rt.H=Dr;try{return ld(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Ft();var d=rt.H;rt.H=Dr;try{return Ih(e,a,o)}finally{rt.H=d}},useRef:function(e){return ot="useRef",D(),Ft(),rs(e)},useState:function(e){ot="useState",D(),Ft();var a=rt.H;rt.H=Dr;try{return vu(e)}finally{rt.H=a}},useDebugValue:function(){ot="useDebugValue",D(),Ft()},useDeferredValue:function(e,a){return ot="useDeferredValue",D(),Ft(),$c(e,a)},useTransition:function(){return ot="useTransition",D(),Ft(),od()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",D(),Ft(),Wh(e,a,o)},useId:function(){return ot="useId",D(),Ft(),nf()},useFormState:function(e,a){return ot="useFormState",D(),Ft(),Nn(e,a)},useActionState:function(e,a){return ot="useActionState",D(),Ft(),Nn(e,a)},useOptimistic:function(e){return ot="useOptimistic",D(),Ft(),ed(e)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:lr,useCacheRefresh:function(){return ot="useCacheRefresh",Ft(),rr()},useEffectEvent:function(e){return ot="useEffectEvent",D(),Ft(),ar(e)}},Ll={readContext:function(e){return A(),Ve(e)},use:function(e){return D(),Ce(e)},useCallback:function(e,a){return ot="useCallback",D(),Et(),no(e,a)},useContext:function(e){return ot="useContext",D(),Et(),Ve(e)},useEffect:function(e,a){ot="useEffect",D(),Et(),Da(2048,xi,e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",D(),Et(),sr(e,a,o)},useInsertionEffect:function(e,a){return ot="useInsertionEffect",D(),Et(),Da(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",D(),Et(),Da(4,ys,e,a)},useMemo:function(e,a){ot="useMemo",D(),Et();var o=rt.H;rt.H=Ll;try{return Su(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Et();var d=rt.H;rt.H=Ll;try{return ws(e,a,o)}finally{rt.H=d}},useRef:function(){return ot="useRef",D(),Et(),De().memoizedState},useState:function(){ot="useState",D(),Et();var e=rt.H;rt.H=Ll;try{return ws(ss)}finally{rt.H=e}},useDebugValue:function(){ot="useDebugValue",D(),Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",D(),Et(),rd(e,a)},useTransition:function(){return ot="useTransition",D(),Et(),wg()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",D(),Et(),nr(e,a,o)},useId:function(){return ot="useId",D(),Et(),De().memoizedState},useFormState:function(e){return ot="useFormState",D(),Et(),Wc(e)},useActionState:function(e){return ot="useActionState",D(),Et(),Wc(e)},useOptimistic:function(e,a){return ot="useOptimistic",D(),Et(),W0(e,a)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:lr,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),De().memoizedState},useEffectEvent:function(e){return ot="useEffectEvent",D(),Et(),ir(e)}},e2={readContext:function(e){return A(),Ve(e)},use:function(e){return D(),Ce(e)},useCallback:function(e,a){return ot="useCallback",D(),Et(),no(e,a)},useContext:function(e){return ot="useContext",D(),Et(),Ve(e)},useEffect:function(e,a){ot="useEffect",D(),Et(),Da(2048,xi,e,a)},useImperativeHandle:function(e,a,o){return ot="useImperativeHandle",D(),Et(),sr(e,a,o)},useInsertionEffect:function(e,a){return ot="useInsertionEffect",D(),Et(),Da(4,_i,e,a)},useLayoutEffect:function(e,a){return ot="useLayoutEffect",D(),Et(),Da(4,ys,e,a)},useMemo:function(e,a){ot="useMemo",D(),Et();var o=rt.H;rt.H=Ll;try{return Su(e,a)}finally{rt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Et();var d=rt.H;rt.H=Ll;try{return yu(e,a,o)}finally{rt.H=d}},useRef:function(){return ot="useRef",D(),Et(),De().memoizedState},useState:function(){ot="useState",D(),Et();var e=rt.H;rt.H=Ll;try{return yu(ss)}finally{rt.H=e}},useDebugValue:function(){ot="useDebugValue",D(),Et()},useDeferredValue:function(e,a){return ot="useDeferredValue",D(),Et(),nm(e,a)},useTransition:function(){return ot="useTransition",D(),Et(),xl()},useSyncExternalStore:function(e,a,o){return ot="useSyncExternalStore",D(),Et(),nr(e,a,o)},useId:function(){return ot="useId",D(),Et(),De().memoizedState},useFormState:function(e){return ot="useFormState",D(),Et(),Ri(e)},useActionState:function(e){return ot="useActionState",D(),Et(),Ri(e)},useOptimistic:function(e,a){return ot="useOptimistic",D(),Et(),$0(e,a)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:lr,useCacheRefresh:function(){return ot="useCacheRefresh",Et(),De().memoizedState},useEffectEvent:function(e){return ot="useEffectEvent",D(),Et(),ir(e)}};var CE={},_E=new Set,xE=new Set,DE=new Set,AE=new Set,ME=new Set,NE=new Set,OE=new Set,RE=new Set,zE=new Set,HE=new Set;Object.freeze(CE);var Q3={enqueueSetState:function(e,a,o){e=e._reactInternals;var d=vi(e),y=El(d);y.payload=a,o!=null&&(sm(o),y.callback=o),a=Ni(e,y,d),a!==null&&(Wi(d,"this.setState()",e),Ie(a,e,d),pu(a,e,d))},enqueueReplaceState:function(e,a,o){e=e._reactInternals;var d=vi(e),y=El(d);y.tag=mE,y.payload=a,o!=null&&(sm(o),y.callback=o),a=Ni(e,y,d),a!==null&&(Wi(d,"this.replaceState()",e),Ie(a,e,d),pu(a,e,d))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var o=vi(e),d=El(o);d.tag=gE,a!=null&&(sm(a),d.callback=a),a=Ni(e,d,o),a!==null&&(Wi(o,"this.forceUpdate()",e),Ie(a,e,o),pu(a,e,o))}},Cp=null,Z3=null,J3=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),la=!1,wE={},UE={},BE={},VE={},_p=!1,GE={},n2={},F3={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},jE=!1,LE=null;LE=new Set;var wo=!1,ra=!1,k3=!1,PE=typeof WeakSet=="function"?WeakSet:Set,Oa=null,xp=null,Dp=null,oa=null,Yi=!1,Pl=null,Ea=!1,Ap=8192,dj={getCacheForType:function(e){var a=Ve(Un),o=a.data.get(e);return o===void 0&&(o=e(),a.data.set(e,o)),o},cacheSignal:function(){return Ve(Un).controller.signal},getOwner:function(){return xo}},a2=0,i2=1,s2=2,l2=3,r2=4;if(typeof Symbol=="function"&&Symbol.for){var h1=Symbol.for;a2=h1("selector.component"),i2=h1("selector.has_pseudo_class"),s2=h1("selector.role"),l2=h1("selector.test_id"),r2=h1("selector.text")}var o2=[],pj=typeof WeakMap=="function"?WeakMap:Map,Ra=0,za=2,al=4,Uo=0,d1=1,Kf=2,u2=3,tc=4,c2=6,YE=5,de=Ra,Xe=null,ie=null,ee=0,qi=0,f2=1,Qf=2,p1=3,qE=4,I3=5,m1=6,h2=7,W3=8,Zf=9,je=qi,vs=null,ec=!1,Mp=!1,$3=!1,Ar=0,bn=Uo,nc=0,ac=0,t5=0,Xi=0,Jf=0,g1=null,Di=null,d2=!1,p2=0,XE=0,KE=300,y1=1/0,e5=500,v1=null,Kn=null,ic=null,m2=0,n5=1,a5=2,QE=3,sc=0,ZE=1,JE=2,FE=3,kE=4,g2=5,ua=0,lc=null,Np=null,Yl=0,i5=0,s5=-0,l5=null,IE=null,WE=null,ql=m2,$E=null,mj=50,S1=0,r5=null,o5=!1,y2=!1,gj=50,Ff=0,b1=null,Op=!1,v2=null,tT=!1,eT=new Set,yj={},il=null,Rp=null,nT=!1;try{var aT=Object.preventExtensions({})}catch{nT=!0}var iT=!1,sT={},lT=null,rT=null,oT=null,uT=null,cT=null,fT=null,hT=null,dT=null,pT=null,mT=null;return lT=function(e,a,o,d){a=i(e,a),a!==null&&(o=s(a.memoizedState,o,0,d),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=_a(e,2),o!==null&&Ie(o,e,2))},rT=function(e,a,o){a=i(e,a),a!==null&&(o=f(a.memoizedState,o,0),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=_a(e,2),o!==null&&Ie(o,e,2))},oT=function(e,a,o,d){a=i(e,a),a!==null&&(o=u(a.memoizedState,o,d),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=_a(e,2),o!==null&&Ie(o,e,2))},uT=function(e,a,o){e.pendingProps=s(e.memoizedProps,a,0,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=_a(e,2),a!==null&&Ie(a,e,2)},cT=function(e,a){e.pendingProps=f(e.memoizedProps,a,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=_a(e,2),a!==null&&Ie(a,e,2)},fT=function(e,a,o){e.pendingProps=u(e.memoizedProps,a,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=_a(e,2),a!==null&&Ie(a,e,2)},hT=function(e){var a=_a(e,2);a!==null&&Ie(a,e,2)},dT=function(e){var a=at(),o=_a(e,a);o!==null&&Ie(o,e,a)},pT=function(e){m=e},mT=function(e){p=e},ae.attemptContinuousHydration=function(e){if(e.tag===13||e.tag===31){var a=_a(e,67108864);a!==null&&Ie(a,e,67108864),Ou(e,67108864)}},ae.attemptHydrationAtCurrentPriority=function(e){if(e.tag===13||e.tag===31){var a=vi(e);a=xn(a);var o=_a(e,a);o!==null&&Ie(o,e,a),Ou(e,a)}},ae.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if(e=e.stateNode,e.current.memoizedState.isDehydrated){var a=tt(e.pendingLanes);if(a!==0){for(e.pendingLanes|=2,e.entangledLanes|=2;a;){var o=1<<31-kn(a);e.entanglements[1]|=o,a&=~o}ja(e),(de&(za|al))===Ra&&(y1=fe()+e5,Wr(0))}}break;case 31:case 13:a=_a(e,2),a!==null&&Ie(a,e,2),yf(),Ou(e,2)}},ae.batchedUpdates=function(e,a){return e(a)},ae.createComponentSelector=function(e){return{$$typeof:a2,value:e}},ae.createContainer=function(e,a,o,d,y,v,C,M,B,q){return ho(e,a,!1,null,o,d,v,null,C,M,B,q)},ae.createHasPseudoClassSelector=function(e){return{$$typeof:i2,value:e}},ae.createHydrationContainer=function(e,a,o,d,y,v,C,M,B,q,ct,ht,yt,Vt){return e=ho(o,d,!0,e,y,v,M,Vt,B,q,ct,ht),e.context=My(null),o=e.current,d=vi(o),d=xn(d),y=El(d),y.callback=a??null,Ni(o,y,d),Wi(d,"hydrateRoot()",null),a=d,e.current.lanes=a,W(e,a),ja(e),e},ae.createPortal=function(e,a,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{ii(d);var y=!1}catch{y=!0}return y&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object"),ii(d)),{$$typeof:zl,key:d==null?null:""+d,children:e,containerInfo:a,implementation:o}},ae.createRoleSelector=function(e){return{$$typeof:s2,value:e}},ae.createTestNameSelector=function(e){return{$$typeof:l2,value:e}},ae.createTextSelector=function(e){return{$$typeof:r2,value:e}},ae.defaultOnCaughtError=function(e){var a=Cp?"The above error occurred in the <"+Cp+"> component.":"The above error occurred in one of your React components.",o="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Z3||"Anonymous")+".");typeof e=="object"&&e!==null&&typeof e.environmentName=="string"?yo("error",[`%o
204
+ Check the top-level render call using <`+d+">.");var C="";o!=null&&e!==o&&(d=null,typeof o.tag=="number"?d=et(o):typeof o.name=="string"&&(d=o.name),d&&(C=" It was passed a child from "+d+".")),wt(a,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',v,C)})}}};var Kf=qc(!0),pE=qc(!1),o1=1,Oo=2,nl=[],bp=0,j3=0,mE=0,gE=1,yE=2,L3=3,Iu=!1,vE=!1,P3=null,Y3=!1,Ep=Tt(null),Iy=Tt(0),gs=Tt(null),al=null,Tp=1,u1=2,kn=Tt(0),Wy=0,il=1,Di=2,ys=4,Ai=8,Cp,SE=new Set,bE=new Set,q3=new Set,EE=new Set,Ro=0,Qt=null,Qe=null,sa=null,$y=!1,_p=!1,Qf=!1,t2=0,c1=0,zo=null,hj=0,dj=25,rt=null,sl=null,Ho=-1,f1=!1,h1={readContext:Ge,use:_e,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useLayoutEffect:yn,useInsertionEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useSyncExternalStore:yn,useId:yn,useHostTransitionStatus:yn,useFormState:yn,useActionState:yn,useOptimistic:yn,useMemoCache:yn,useCacheRefresh:yn};h1.useEffectEvent=yn;var X3=null,TE=null,K3=null,CE=null,Nr=null,Xl=null,e2=null;X3={readContext:function(e){return Ge(e)},use:_e,useCallback:function(e,a){return rt="useCallback",Ft(),ai(a),rd(e,a)},useContext:function(e){return rt="useContext",Ft(),Ge(e)},useEffect:function(e,a){return rt="useEffect",Ft(),ai(a),ii(e,a)},useImperativeHandle:function(e,a,o){return rt="useImperativeHandle",Ft(),ai(o),ld(e,a,o)},useInsertionEffect:function(e,a){rt="useInsertionEffect",Ft(),ai(a),Al(4,Di,e,a)},useLayoutEffect:function(e,a){return rt="useLayoutEffect",Ft(),ai(a),Ml(e,a)},useMemo:function(e,a){rt="useMemo",Ft(),ai(a);var o=lt.H;lt.H=Nr;try{return od(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){rt="useReducer",Ft();var d=lt.H;lt.H=Nr;try{return $h(e,a,o)}finally{lt.H=d}},useRef:function(e){return rt="useRef",Ft(),rs(e)},useState:function(e){rt="useState",Ft();var a=lt.H;lt.H=Nr;try{return gu(e)}finally{lt.H=a}},useDebugValue:function(){rt="useDebugValue",Ft()},useDeferredValue:function(e,a){return rt="useDeferredValue",Ft(),ef(e,a)},useTransition:function(){return rt="useTransition",Ft(),cd()},useSyncExternalStore:function(e,a,o){return rt="useSyncExternalStore",Ft(),td(e,a,o)},useId:function(){return rt="useId",Ft(),sf()},useFormState:function(e,a){return rt="useFormState",Ft(),pu(),Nn(e,a)},useActionState:function(e,a){return rt="useActionState",Ft(),Nn(e,a)},useOptimistic:function(e){return rt="useOptimistic",Ft(),ad(e)},useHostTransitionStatus:ur,useMemoCache:eo,useCacheRefresh:function(){return rt="useCacheRefresh",Ft(),cr()},useEffectEvent:function(e){return rt="useEffectEvent",Ft(),lr(e)}},TE={readContext:function(e){return Ge(e)},use:_e,useCallback:function(e,a){return rt="useCallback",Et(),rd(e,a)},useContext:function(e){return rt="useContext",Et(),Ge(e)},useEffect:function(e,a){return rt="useEffect",Et(),ii(e,a)},useImperativeHandle:function(e,a,o){return rt="useImperativeHandle",Et(),ld(e,a,o)},useInsertionEffect:function(e,a){rt="useInsertionEffect",Et(),Al(4,Di,e,a)},useLayoutEffect:function(e,a){return rt="useLayoutEffect",Et(),Ml(e,a)},useMemo:function(e,a){rt="useMemo",Et();var o=lt.H;lt.H=Nr;try{return od(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){rt="useReducer",Et();var d=lt.H;lt.H=Nr;try{return $h(e,a,o)}finally{lt.H=d}},useRef:function(e){return rt="useRef",Et(),rs(e)},useState:function(e){rt="useState",Et();var a=lt.H;lt.H=Nr;try{return gu(e)}finally{lt.H=a}},useDebugValue:function(){rt="useDebugValue",Et()},useDeferredValue:function(e,a){return rt="useDeferredValue",Et(),ef(e,a)},useTransition:function(){return rt="useTransition",Et(),cd()},useSyncExternalStore:function(e,a,o){return rt="useSyncExternalStore",Et(),td(e,a,o)},useId:function(){return rt="useId",Et(),sf()},useActionState:function(e,a){return rt="useActionState",Et(),Nn(e,a)},useFormState:function(e,a){return rt="useFormState",Et(),pu(),Nn(e,a)},useOptimistic:function(e){return rt="useOptimistic",Et(),ad(e)},useHostTransitionStatus:ur,useMemoCache:eo,useCacheRefresh:function(){return rt="useCacheRefresh",Et(),cr()},useEffectEvent:function(e){return rt="useEffectEvent",Et(),lr(e)}},K3={readContext:function(e){return Ge(e)},use:_e,useCallback:function(e,a){return rt="useCallback",Et(),no(e,a)},useContext:function(e){return rt="useContext",Et(),Ge(e)},useEffect:function(e,a){rt="useEffect",Et(),Aa(2048,Ai,e,a)},useImperativeHandle:function(e,a,o){return rt="useImperativeHandle",Et(),or(e,a,o)},useInsertionEffect:function(e,a){return rt="useInsertionEffect",Et(),Aa(4,Di,e,a)},useLayoutEffect:function(e,a){return rt="useLayoutEffect",Et(),Aa(4,ys,e,a)},useMemo:function(e,a){rt="useMemo",Et();var o=lt.H;lt.H=Xl;try{return yu(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){rt="useReducer",Et();var d=lt.H;lt.H=Xl;try{return Vs(e,a,o)}finally{lt.H=d}},useRef:function(){return rt="useRef",Et(),Ae().memoizedState},useState:function(){rt="useState",Et();var e=lt.H;lt.H=Xl;try{return Vs(ss)}finally{lt.H=e}},useDebugValue:function(){rt="useDebugValue",Et()},useDeferredValue:function(e,a){return rt="useDeferredValue",Et(),ud(e,a)},useTransition:function(){return rt="useTransition",Et(),wg()},useSyncExternalStore:function(e,a,o){return rt="useSyncExternalStore",Et(),sr(e,a,o)},useId:function(){return rt="useId",Et(),Ae().memoizedState},useFormState:function(e){return rt="useFormState",Et(),pu(),tf(e)},useActionState:function(e){return rt="useActionState",Et(),tf(e)},useOptimistic:function(e,a){return rt="useOptimistic",Et(),$0(e,a)},useHostTransitionStatus:ur,useMemoCache:eo,useCacheRefresh:function(){return rt="useCacheRefresh",Et(),Ae().memoizedState},useEffectEvent:function(e){return rt="useEffectEvent",Et(),rr(e)}},CE={readContext:function(e){return Ge(e)},use:_e,useCallback:function(e,a){return rt="useCallback",Et(),no(e,a)},useContext:function(e){return rt="useContext",Et(),Ge(e)},useEffect:function(e,a){rt="useEffect",Et(),Aa(2048,Ai,e,a)},useImperativeHandle:function(e,a,o){return rt="useImperativeHandle",Et(),or(e,a,o)},useInsertionEffect:function(e,a){return rt="useInsertionEffect",Et(),Aa(4,Di,e,a)},useLayoutEffect:function(e,a){return rt="useLayoutEffect",Et(),Aa(4,ys,e,a)},useMemo:function(e,a){rt="useMemo",Et();var o=lt.H;lt.H=e2;try{return yu(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){rt="useReducer",Et();var d=lt.H;lt.H=e2;try{return mu(e,a,o)}finally{lt.H=d}},useRef:function(){return rt="useRef",Et(),Ae().memoizedState},useState:function(){rt="useState",Et();var e=lt.H;lt.H=e2;try{return mu(ss)}finally{lt.H=e}},useDebugValue:function(){rt="useDebugValue",Et()},useDeferredValue:function(e,a){return rt="useDeferredValue",Et(),am(e,a)},useTransition:function(){return rt="useTransition",Et(),Nl()},useSyncExternalStore:function(e,a,o){return rt="useSyncExternalStore",Et(),sr(e,a,o)},useId:function(){return rt="useId",Et(),Ae().memoizedState},useFormState:function(e){return rt="useFormState",Et(),pu(),Hi(e)},useActionState:function(e){return rt="useActionState",Et(),Hi(e)},useOptimistic:function(e,a){return rt="useOptimistic",Et(),tm(e,a)},useHostTransitionStatus:ur,useMemoCache:eo,useCacheRefresh:function(){return rt="useCacheRefresh",Et(),Ae().memoizedState},useEffectEvent:function(e){return rt="useEffectEvent",Et(),rr(e)}},Nr={readContext:function(e){return A(),Ge(e)},use:function(e){return D(),_e(e)},useCallback:function(e,a){return rt="useCallback",D(),Ft(),rd(e,a)},useContext:function(e){return rt="useContext",D(),Ft(),Ge(e)},useEffect:function(e,a){return rt="useEffect",D(),Ft(),ii(e,a)},useImperativeHandle:function(e,a,o){return rt="useImperativeHandle",D(),Ft(),ld(e,a,o)},useInsertionEffect:function(e,a){rt="useInsertionEffect",D(),Ft(),Al(4,Di,e,a)},useLayoutEffect:function(e,a){return rt="useLayoutEffect",D(),Ft(),Ml(e,a)},useMemo:function(e,a){rt="useMemo",D(),Ft();var o=lt.H;lt.H=Nr;try{return od(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){rt="useReducer",D(),Ft();var d=lt.H;lt.H=Nr;try{return $h(e,a,o)}finally{lt.H=d}},useRef:function(e){return rt="useRef",D(),Ft(),rs(e)},useState:function(e){rt="useState",D(),Ft();var a=lt.H;lt.H=Nr;try{return gu(e)}finally{lt.H=a}},useDebugValue:function(){rt="useDebugValue",D(),Ft()},useDeferredValue:function(e,a){return rt="useDeferredValue",D(),Ft(),ef(e,a)},useTransition:function(){return rt="useTransition",D(),Ft(),cd()},useSyncExternalStore:function(e,a,o){return rt="useSyncExternalStore",D(),Ft(),td(e,a,o)},useId:function(){return rt="useId",D(),Ft(),sf()},useFormState:function(e,a){return rt="useFormState",D(),Ft(),Nn(e,a)},useActionState:function(e,a){return rt="useActionState",D(),Ft(),Nn(e,a)},useOptimistic:function(e){return rt="useOptimistic",D(),Ft(),ad(e)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:ur,useCacheRefresh:function(){return rt="useCacheRefresh",Ft(),cr()},useEffectEvent:function(e){return rt="useEffectEvent",D(),Ft(),lr(e)}},Xl={readContext:function(e){return A(),Ge(e)},use:function(e){return D(),_e(e)},useCallback:function(e,a){return rt="useCallback",D(),Et(),no(e,a)},useContext:function(e){return rt="useContext",D(),Et(),Ge(e)},useEffect:function(e,a){rt="useEffect",D(),Et(),Aa(2048,Ai,e,a)},useImperativeHandle:function(e,a,o){return rt="useImperativeHandle",D(),Et(),or(e,a,o)},useInsertionEffect:function(e,a){return rt="useInsertionEffect",D(),Et(),Aa(4,Di,e,a)},useLayoutEffect:function(e,a){return rt="useLayoutEffect",D(),Et(),Aa(4,ys,e,a)},useMemo:function(e,a){rt="useMemo",D(),Et();var o=lt.H;lt.H=Xl;try{return yu(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){rt="useReducer",D(),Et();var d=lt.H;lt.H=Xl;try{return Vs(e,a,o)}finally{lt.H=d}},useRef:function(){return rt="useRef",D(),Et(),Ae().memoizedState},useState:function(){rt="useState",D(),Et();var e=lt.H;lt.H=Xl;try{return Vs(ss)}finally{lt.H=e}},useDebugValue:function(){rt="useDebugValue",D(),Et()},useDeferredValue:function(e,a){return rt="useDeferredValue",D(),Et(),ud(e,a)},useTransition:function(){return rt="useTransition",D(),Et(),wg()},useSyncExternalStore:function(e,a,o){return rt="useSyncExternalStore",D(),Et(),sr(e,a,o)},useId:function(){return rt="useId",D(),Et(),Ae().memoizedState},useFormState:function(e){return rt="useFormState",D(),Et(),tf(e)},useActionState:function(e){return rt="useActionState",D(),Et(),tf(e)},useOptimistic:function(e,a){return rt="useOptimistic",D(),Et(),$0(e,a)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:ur,useCacheRefresh:function(){return rt="useCacheRefresh",Et(),Ae().memoizedState},useEffectEvent:function(e){return rt="useEffectEvent",D(),Et(),rr(e)}},e2={readContext:function(e){return A(),Ge(e)},use:function(e){return D(),_e(e)},useCallback:function(e,a){return rt="useCallback",D(),Et(),no(e,a)},useContext:function(e){return rt="useContext",D(),Et(),Ge(e)},useEffect:function(e,a){rt="useEffect",D(),Et(),Aa(2048,Ai,e,a)},useImperativeHandle:function(e,a,o){return rt="useImperativeHandle",D(),Et(),or(e,a,o)},useInsertionEffect:function(e,a){return rt="useInsertionEffect",D(),Et(),Aa(4,Di,e,a)},useLayoutEffect:function(e,a){return rt="useLayoutEffect",D(),Et(),Aa(4,ys,e,a)},useMemo:function(e,a){rt="useMemo",D(),Et();var o=lt.H;lt.H=Xl;try{return yu(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){rt="useReducer",D(),Et();var d=lt.H;lt.H=Xl;try{return mu(e,a,o)}finally{lt.H=d}},useRef:function(){return rt="useRef",D(),Et(),Ae().memoizedState},useState:function(){rt="useState",D(),Et();var e=lt.H;lt.H=Xl;try{return mu(ss)}finally{lt.H=e}},useDebugValue:function(){rt="useDebugValue",D(),Et()},useDeferredValue:function(e,a){return rt="useDeferredValue",D(),Et(),am(e,a)},useTransition:function(){return rt="useTransition",D(),Et(),Nl()},useSyncExternalStore:function(e,a,o){return rt="useSyncExternalStore",D(),Et(),sr(e,a,o)},useId:function(){return rt="useId",D(),Et(),Ae().memoizedState},useFormState:function(e){return rt="useFormState",D(),Et(),Hi(e)},useActionState:function(e){return rt="useActionState",D(),Et(),Hi(e)},useOptimistic:function(e,a){return rt="useOptimistic",D(),Et(),tm(e,a)},useMemoCache:function(e){return D(),eo(e)},useHostTransitionStatus:ur,useCacheRefresh:function(){return rt="useCacheRefresh",Et(),Ae().memoizedState},useEffectEvent:function(e){return rt="useEffectEvent",D(),Et(),rr(e)}};var _E={},xE=new Set,DE=new Set,AE=new Set,ME=new Set,NE=new Set,OE=new Set,RE=new Set,zE=new Set,HE=new Set,wE=new Set;Object.freeze(_E);var Q3={enqueueSetState:function(e,a,o){e=e._reactInternals;var d=bi(e),y=xl(d);y.payload=a,o!=null&&(lm(o),y.callback=o),a=Ri(e,y,d),a!==null&&(Wi(d,"this.setState()",e),en(a,e,d),hu(a,e,d))},enqueueReplaceState:function(e,a,o){e=e._reactInternals;var d=bi(e),y=xl(d);y.tag=gE,y.payload=a,o!=null&&(lm(o),y.callback=o),a=Ri(e,y,d),a!==null&&(Wi(d,"this.replaceState()",e),en(a,e,d),hu(a,e,d))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var o=bi(e),d=xl(o);d.tag=yE,a!=null&&(lm(a),d.callback=a),a=Ri(e,d,o),a!==null&&(Wi(o,"this.forceUpdate()",e),en(a,e,o),hu(a,e,o))}},xp=null,Z3=null,J3=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),la=!1,UE={},BE={},VE={},GE={},Dp=!1,jE={},n2={},F3={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},LE=!1,PE=null;PE=new Set;var wo=!1,ra=!1,k3=!1,YE=typeof WeakSet=="function"?WeakSet:Set,Ra=null,Ap=null,Mp=null,oa=null,Xi=!1,Kl=null,Ea=!1,Np=8192,pj={getCacheForType:function(e){var a=Ge(Un),o=a.data.get(e);return o===void 0&&(o=e(),a.data.set(e,o)),o},cacheSignal:function(){return Ge(Un).controller.signal},getOwner:function(){return xo}},a2=0,i2=1,s2=2,l2=3,r2=4;if(typeof Symbol=="function"&&Symbol.for){var d1=Symbol.for;a2=d1("selector.component"),i2=d1("selector.has_pseudo_class"),s2=d1("selector.role"),l2=d1("selector.test_id"),r2=d1("selector.text")}var o2=[],mj=typeof WeakMap=="function"?WeakMap:Map,za=0,Ha=2,ll=4,Uo=0,p1=1,Zf=2,u2=3,Wu=4,c2=6,qE=5,he=za,Ze=null,se=null,ne=0,Ki=0,f2=1,Jf=2,m1=3,XE=4,I3=5,g1=6,h2=7,W3=8,Ff=9,Le=Ki,vs=null,$u=!1,Op=!1,$3=!1,Or=0,En=Uo,tc=0,ec=0,t5=0,Qi=0,kf=0,y1=null,Mi=null,d2=!1,p2=0,KE=0,QE=300,v1=1/0,e5=500,S1=null,qn=null,nc=null,m2=0,n5=1,a5=2,ZE=3,ac=0,JE=1,FE=2,kE=3,IE=4,g2=5,ua=0,ic=null,Rp=null,Ql=0,i5=0,s5=-0,l5=null,WE=null,$E=null,Zl=m2,tT=null,gj=50,b1=0,r5=null,o5=!1,y2=!1,yj=50,If=0,E1=null,zp=!1,v2=null,eT=!1,nT=new Set,vj={},rl=null,Hp=null,aT=!1;try{var iT=Object.preventExtensions({})}catch{aT=!0}var sT=!1,lT={},rT=null,oT=null,uT=null,cT=null,fT=null,hT=null,dT=null,pT=null,mT=null,gT=null;return rT=function(e,a,o,d){a=i(e,a),a!==null&&(o=s(a.memoizedState,o,0,d),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=xa(e,2),o!==null&&en(o,e,2))},oT=function(e,a,o){a=i(e,a),a!==null&&(o=f(a.memoizedState,o,0),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=xa(e,2),o!==null&&en(o,e,2))},uT=function(e,a,o,d){a=i(e,a),a!==null&&(o=u(a.memoizedState,o,d),a.memoizedState=o,a.baseState=o,e.memoizedProps=Me({},e.memoizedProps),o=xa(e,2),o!==null&&en(o,e,2))},cT=function(e,a,o){e.pendingProps=s(e.memoizedProps,a,0,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=xa(e,2),a!==null&&en(a,e,2)},fT=function(e,a){e.pendingProps=f(e.memoizedProps,a,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=xa(e,2),a!==null&&en(a,e,2)},hT=function(e,a,o){e.pendingProps=u(e.memoizedProps,a,o),e.alternate&&(e.alternate.pendingProps=e.pendingProps),a=xa(e,2),a!==null&&en(a,e,2)},dT=function(e){var a=xa(e,2);a!==null&&en(a,e,2)},pT=function(e){var a=mt(),o=xa(e,a);o!==null&&en(o,e,a)},mT=function(e){m=e},gT=function(e){p=e},ie.attemptContinuousHydration=function(e){if(e.tag===13||e.tag===31){var a=xa(e,67108864);a!==null&&en(a,e,67108864),Mu(e,67108864)}},ie.attemptHydrationAtCurrentPriority=function(e){if(e.tag===13||e.tag===31){var a=bi(e);a=An(a);var o=xa(e,a);o!==null&&en(o,e,a),Mu(e,a)}},ie.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if(e=e.stateNode,e.current.memoizedState.isDehydrated){var a=nt(e.pendingLanes);if(a!==0){for(e.pendingLanes|=2,e.entangledLanes|=2;a;){var o=1<<31-Fn(a);e.entanglements[1]|=o,a&=~o}ja(e),(he&(Ha|ll))===za&&(v1=ce()+e5,Wr(0))}}break;case 31:case 13:a=xa(e,2),a!==null&&en(a,e,2),Sf(),Mu(e,2)}},ie.batchedUpdates=function(e,a){return e(a)},ie.createComponentSelector=function(e){return{$$typeof:a2,value:e}},ie.createContainer=function(e,a,o,d,y,v,C,M,B,q){return ho(e,a,!1,null,o,d,v,null,C,M,B,q)},ie.createHasPseudoClassSelector=function(e){return{$$typeof:i2,value:e}},ie.createHydrationContainer=function(e,a,o,d,y,v,C,M,B,q,ut,ft,yt,Vt){return e=ho(o,d,!0,e,y,v,M,Vt,B,q,ut,ft),e.context=My(null),o=e.current,d=bi(o),d=An(d),y=xl(d),y.callback=a??null,Ri(o,y,d),Wi(d,"hydrateRoot()",null),a=d,e.current.lanes=a,I(e,a),ja(e),e},ie.createPortal=function(e,a,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{li(d);var y=!1}catch{y=!0}return y&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object"),li(d)),{$$typeof:Bl,key:d==null?null:""+d,children:e,containerInfo:a,implementation:o}},ie.createRoleSelector=function(e){return{$$typeof:s2,value:e}},ie.createTestNameSelector=function(e){return{$$typeof:l2,value:e}},ie.createTextSelector=function(e){return{$$typeof:r2,value:e}},ie.defaultOnCaughtError=function(e){var a=xp?"The above error occurred in the <"+xp+"> component.":"The above error occurred in one of your React components.",o="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Z3||"Anonymous")+".");typeof e=="object"&&e!==null&&typeof e.environmentName=="string"?yo("error",[`%o
205
205
 
206
206
  %s
207
207
 
@@ -211,24 +211,24 @@ Check the top-level render call using <`+d+">.");var C="";o!=null&&e!==o&&(d=nul
211
211
  %s
212
212
 
213
213
  %s
214
- `,e,a,o)},ae.defaultOnRecoverableError=function(e){U9(e)},ae.defaultOnUncaughtError=function(e){U9(e),console.warn(`%s
214
+ `,e,a,o)},ie.defaultOnRecoverableError=function(e){B9(e)},ie.defaultOnUncaughtError=function(e){B9(e),console.warn(`%s
215
215
 
216
216
  %s
217
- `,Cp?"An error occurred in the <"+Cp+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
218
- Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)},ae.deferredUpdates=function(e){var a=rt.T,o=ri();try{return zn(32),rt.T=null,e()}finally{zn(o),rt.T=a}},ae.discreteUpdates=function(e,a,o,d,y){var v=rt.T,C=ri();try{return zn(2),rt.T=null,e(a,o,d,y)}finally{zn(C),rt.T=v,de===Ra&&(y1=fe()+e5)}},ae.findAllNodes=Ad,ae.findBoundingRects=function(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");a=Ad(e,a),e=[];for(var o=0;o<a.length;o++)e.push(mr(a[o]));for(a=e.length-1;0<a;a--){o=e[a];for(var d=o.x,y=d+o.width,v=o.y,C=v+o.height,M=a-1;0<=M;M--)if(a!==M){var B=e[M],q=B.x,ct=q+B.width,ht=B.y,yt=ht+B.height;if(d>=q&&v>=ht&&y<=ct&&C<=yt){e.splice(a,1);break}else if(d!==q||o.width!==B.width||yt<v||ht>C){if(!(v!==ht||o.height!==B.height||ct<d||q>y)){q>d&&(B.width+=q-d,B.x=d),ct<y&&(B.width=y-q),e.splice(a,1);break}}else{ht>v&&(B.height+=ht-v,B.y=v),yt<C&&(B.height=C-ht),e.splice(a,1);break}}}return e},ae.findHostInstance=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=F(a),e===null?null:Xa(e.stateNode)},ae.findHostInstanceWithNoPortals=function(e){return e=V(e),e=e!==null?st(e):null,e===null?null:Xa(e.stateNode)},ae.findHostInstanceWithWarning=function(e,a){var o=e._reactInternals;if(o===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));if(e=F(o),e===null)return null;if(e.mode&8){var d=nt(o)||"Component";sT[d]||(sT[d]=!0,Bt(e,function(){o.mode&8?console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",a,a,d):console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",a,a,d)}))}return Xa(e.stateNode)},ae.flushPassiveEffects=Au,ae.flushSyncFromReconciler=function(e){var a=de;de|=1;var o=rt.T,d=ri();try{if(zn(2),rt.T=null,e)return e()}finally{zn(d),rt.T=o,de=a,(de&(za|al))===Ra&&Wr(0)}},ae.flushSyncWork=yf,ae.focusWithin=function(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");for(e=_m(e),a=iy(e,a),a=Array.from(a),e=0;e<a.length;){var o=a[e++],d=o.tag;if(!Qs(o)){if((d===5||d===26||d===27)&&Si(o.stateNode))return!0;for(o=o.child;o!==null;)a.push(o),o=o.sibling}}return!1},ae.getFindAllNodesFailureDescription=function(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");var o=0,d=[];e=[_m(e),0];for(var y=0;y<e.length;){var v=e[y++],C=v.tag,M=e[y++],B=a[M];if((C!==5&&C!==26&&C!==27||!Qs(v))&&(xm(v,B)&&(d.push(Dd(B)),M++,M>o&&(o=M)),M<a.length))for(v=v.child;v!==null;)e.push(v,M),v=v.sibling}if(o<a.length){for(e=[];o<a.length;o++)e.push(Dd(a[o]));return`findAllNodes was able to match part of the selector:
217
+ `,xp?"An error occurred in the <"+xp+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
218
+ Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)},ie.deferredUpdates=function(e){var a=lt.T,o=ui();try{return zn(32),lt.T=null,e()}finally{zn(o),lt.T=a}},ie.discreteUpdates=function(e,a,o,d,y){var v=lt.T,C=ui();try{return zn(2),lt.T=null,e(a,o,d,y)}finally{zn(C),lt.T=v,he===za&&(v1=ce()+e5)}},ie.findAllNodes=Nd,ie.findBoundingRects=function(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");a=Nd(e,a),e=[];for(var o=0;o<a.length;o++)e.push(vr(a[o]));for(a=e.length-1;0<a;a--){o=e[a];for(var d=o.x,y=d+o.width,v=o.y,C=v+o.height,M=a-1;0<=M;M--)if(a!==M){var B=e[M],q=B.x,ut=q+B.width,ft=B.y,yt=ft+B.height;if(d>=q&&v>=ft&&y<=ut&&C<=yt){e.splice(a,1);break}else if(d!==q||o.width!==B.width||yt<v||ft>C){if(!(v!==ft||o.height!==B.height||ut<d||q>y)){q>d&&(B.width+=q-d,B.x=d),ut<y&&(B.width=y-q),e.splice(a,1);break}}else{ft>v&&(B.height+=ft-v,B.y=v),yt<C&&(B.height=C-ft),e.splice(a,1);break}}}return e},ie.findHostInstance=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=F(a),e===null?null:Xa(e.stateNode)},ie.findHostInstanceWithNoPortals=function(e){return e=V(e),e=e!==null?st(e):null,e===null?null:Xa(e.stateNode)},ie.findHostInstanceWithWarning=function(e,a){var o=e._reactInternals;if(o===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));if(e=F(o),e===null)return null;if(e.mode&8){var d=et(o)||"Component";lT[d]||(lT[d]=!0,wt(e,function(){o.mode&8?console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",a,a,d):console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",a,a,d)}))}return Xa(e.stateNode)},ie.flushPassiveEffects=xu,ie.flushSyncFromReconciler=function(e){var a=he;he|=1;var o=lt.T,d=ui();try{if(zn(2),lt.T=null,e)return e()}finally{zn(d),lt.T=o,he=a,(he&(Ha|ll))===za&&Wr(0)}},ie.flushSyncWork=Sf,ie.focusWithin=function(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");for(e=xm(e),a=iy(e,a),a=Array.from(a),e=0;e<a.length;){var o=a[e++],d=o.tag;if(!Fs(o)){if((d===5||d===26||d===27)&&Ei(o.stateNode))return!0;for(o=o.child;o!==null;)a.push(o),o=o.sibling}}return!1},ie.getFindAllNodesFailureDescription=function(e,a){if(!ds)throw Error("Test selector API is not supported by this renderer.");var o=0,d=[];e=[xm(e),0];for(var y=0;y<e.length;){var v=e[y++],C=v.tag,M=e[y++],B=a[M];if((C!==5&&C!==26&&C!==27||!Fs(v))&&(Dm(v,B)&&(d.push(Md(B)),M++,M>o&&(o=M)),M<a.length))for(v=v.child;v!==null;)e.push(v,M),v=v.sibling}if(o<a.length){for(e=[];o<a.length;o++)e.push(Md(a[o]));return`findAllNodes was able to match part of the selector:
219
219
  `+(d.join(" > ")+`
220
220
 
221
221
  No matching component was found for:
222
- `)+e.join(" > ")}return null},ae.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 27:case 5:return Xa(e.child.stateNode);default:return e.child.stateNode}},ae.injectIntoDevTools=function(){var e={bundleType:1,version:Ui,rendererPackageName:Bi,currentDispatcherRef:rt,reconcilerVersion:"19.2.0"};return Hl!==null&&(e.rendererConfig=Hl),e.overrideHookState=lT,e.overrideHookStateDeletePath=rT,e.overrideHookStateRenamePath=oT,e.overrideProps=uT,e.overridePropsDeletePath=cT,e.overridePropsRenamePath=fT,e.scheduleUpdate=hT,e.scheduleRetry=dT,e.setErrorHandler=pT,e.setSuspenseHandler=mT,e.scheduleRefresh=_,e.scheduleRoot=b,e.setRefreshHandler=x,e.getCurrentFiber=Vd,Be(e)},ae.isAlreadyRendering=vf,ae.observeVisibleRects=function(e,a,o,d){function y(){var q=Ad(e,a);v.forEach(function(ct){0>q.indexOf(ct)&&B(ct)}),q.forEach(function(ct){0>v.indexOf(ct)&&M(ct)})}if(!ds)throw Error("Test selector API is not supported by this renderer.");var v=Ad(e,a);o=Pi(v,o,d);var C=o.disconnect,M=o.observe,B=o.unobserve;return o2.push(y),{disconnect:function(){var q=o2.indexOf(y);0<=q&&o2.splice(q,1),C()}}},ae.shouldError=function(e){return m(e)},ae.shouldSuspend=function(e){return p(e)},ae.startHostTransition=function(e,a,o,d){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var y=am(e).queue;xg(e),Pa(e,y,a,Gi,o===null?N:function(){rt.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var v=am(e);return v.next===null&&(v=e.alternate.memoizedState),bu(e,v.next.queue,{},vi(e)),o(d)})},ae.updateContainer=function(e,a,o,d){var y=a.current,v=vi(y);return Ef(y,v,e,a,o,d),v},ae.updateContainerSync=Ny,ae},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0}))})(F2)),F2.exports}var y4;function Q_(){return y4||(y4=1,process.env.NODE_ENV==="production"?G1.exports=X_():G1.exports=K_()),G1.exports}var Z_=Q_();const J_=X2(Z_);var L1={exports:{}},zr={};var v4;function F_(){return v4||(v4=1,zr.ConcurrentRoot=1,zr.ContinuousEventPriority=8,zr.DefaultEventPriority=32,zr.DiscreteEventPriority=2,zr.IdleEventPriority=268435456,zr.LegacyRoot=0,zr.NoEventPriority=0),zr}var Hr={};var S4;function k_(){return S4||(S4=1,process.env.NODE_ENV!=="production"&&(Hr.ConcurrentRoot=1,Hr.ContinuousEventPriority=8,Hr.DefaultEventPriority=32,Hr.DiscreteEventPriority=2,Hr.IdleEventPriority=268435456,Hr.LegacyRoot=0,Hr.NoEventPriority=0)),Hr}var b4;function I_(){return b4||(b4=1,process.env.NODE_ENV==="production"?L1.exports=F_():L1.exports=k_()),L1.exports}var P1=I_();const E4={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let T4=!1,C4=!1;const Y1=".react-konva-event",W_=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
222
+ `)+e.join(" > ")}return null},ie.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 27:case 5:return Xa(e.child.stateNode);default:return e.child.stateNode}},ie.injectIntoDevTools=function(){var e={bundleType:1,version:Vi,rendererPackageName:Gi,currentDispatcherRef:lt,reconcilerVersion:"19.2.0"};return Vl!==null&&(e.rendererConfig=Vl),e.overrideHookState=rT,e.overrideHookStateDeletePath=oT,e.overrideHookStateRenamePath=uT,e.overrideProps=cT,e.overridePropsDeletePath=fT,e.overridePropsRenamePath=hT,e.scheduleUpdate=dT,e.scheduleRetry=pT,e.setErrorHandler=mT,e.setSuspenseHandler=gT,e.scheduleRefresh=_,e.scheduleRoot=b,e.setRefreshHandler=x,e.getCurrentFiber=jd,ze(e)},ie.isAlreadyRendering=bf,ie.observeVisibleRects=function(e,a,o,d){function y(){var q=Nd(e,a);v.forEach(function(ut){0>q.indexOf(ut)&&B(ut)}),q.forEach(function(ut){0>v.indexOf(ut)&&M(ut)})}if(!ds)throw Error("Test selector API is not supported by this renderer.");var v=Nd(e,a);o=qi(v,o,d);var C=o.disconnect,M=o.observe,B=o.unobserve;return o2.push(y),{disconnect:function(){var q=o2.indexOf(y);0<=q&&o2.splice(q,1),C()}}},ie.shouldError=function(e){return m(e)},ie.shouldSuspend=function(e){return p(e)},ie.startHostTransition=function(e,a,o,d){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var y=im(e).queue;xg(e),Pa(e,y,a,Li,o===null?N:function(){lt.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var v=im(e);return v.next===null&&(v=e.alternate.memoizedState),vu(e,v.next.queue,{},bi(e)),o(d)})},ie.updateContainer=function(e,a,o,d){var y=a.current,v=bi(y);return Cf(y,v,e,a,o,d),v},ie.updateContainerSync=Ny,ie},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0}))})(F2)),F2.exports}var y4;function Z_(){return y4||(y4=1,process.env.NODE_ENV==="production"?j1.exports=K_():j1.exports=Q_()),j1.exports}var J_=Z_();const F_=X2(J_);var P1={exports:{}},Ur={};var v4;function k_(){return v4||(v4=1,Ur.ConcurrentRoot=1,Ur.ContinuousEventPriority=8,Ur.DefaultEventPriority=32,Ur.DiscreteEventPriority=2,Ur.IdleEventPriority=268435456,Ur.LegacyRoot=0,Ur.NoEventPriority=0),Ur}var Br={};var S4;function I_(){return S4||(S4=1,process.env.NODE_ENV!=="production"&&(Br.ConcurrentRoot=1,Br.ContinuousEventPriority=8,Br.DefaultEventPriority=32,Br.DiscreteEventPriority=2,Br.IdleEventPriority=268435456,Br.LegacyRoot=0,Br.NoEventPriority=0)),Br}var b4;function W_(){return b4||(b4=1,process.env.NODE_ENV==="production"?P1.exports=k_():P1.exports=I_()),P1.exports}var Y1=W_();const E4={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let T4=!1,C4=!1;const q1=".react-konva-event",$_=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
223
223
  Position of a node will be changed during drag&drop, so you should update state of the react app as well.
224
224
  Consider to add onDragMove or onDragEnd events.
225
225
  For more info see: https://github.com/konvajs/react-konva/issues/256
226
- `,$_=`ReactKonva: You are using "zIndex" attribute for a Konva node.
226
+ `,tx=`ReactKonva: You are using "zIndex" attribute for a Konva node.
227
227
  react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
228
228
  For more info see: https://github.com/konvajs/react-konva/issues/194
229
- `,tx={};function q1(n,t,i=tx){if(!T4&&"zIndex"in t&&(console.warn($_),T4=!0),!C4&&t.draggable){var s=t.x!==void 0||t.y!==void 0,u=t.onDragEnd||t.onDragMove;s&&!u&&(console.warn(W_),C4=!0)}for(var c in i)if(!E4[c]){var f=c.slice(0,2)==="on",p=i[c]!==t[c];if(f&&p){var m=c.substr(2).toLowerCase();m.substr(0,7)==="content"&&(m="content"+m.substr(7,1).toUpperCase()+m.substr(8)),n.off(m,i[c])}var S=!t.hasOwnProperty(c);S&&n.setAttr(c,void 0)}var b=t._useStrictMode,_={},x=!1;const D={};for(var c in t)if(!E4[c]){var f=c.slice(0,2)==="on",A=i[c]!==t[c];if(f&&A){var m=c.substr(2).toLowerCase();m.substr(0,7)==="content"&&(m="content"+m.substr(7,1).toUpperCase()+m.substr(8)),t[c]&&(D[m]=t[c])}!f&&(t[c]!==i[c]||b&&t[c]!==n.getAttr(c))&&(x=!0,_[c]=t[c])}x&&(n.setAttrs(_),Xo(n));for(var m in D)n.off(m+Y1),n.on(m+Y1,D[m])}function Xo(n){if(!Ot.autoDrawEnabled){var t=n.getLayer()||n.getStage();t&&t.batchDraw()}}var k2=J2();const _4={},ex={};$f.Node.prototype._applyProps=q1;let x4=P1.DefaultEventPriority;function nx(n,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}n.add(t),Xo(n)}function ax(n,t,i){let s=$f[n];s||(console.error(`Konva has no node with the type ${n}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${n}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),s=$f.Group);const u={},c={};for(var f in t)if(f!=="ref"){var p=f.slice(0,2)==="on";p?c[f]=t[f]:u[f]=t[f]}const m=new s(u);return q1(m,c),m}function ix(n,t,i){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${n}"`)}function sx(n,t,i){return!1}function lx(n){return n}function rx(){return null}function ox(){return null}function ux(n,t,i,s){return ex}function cx(){}function fx(n){}function hx(n,t){return!1}function dx(){return _4}function px(){return _4}const mx=setTimeout,gx=clearTimeout,yx=!0,vx=n=>{n()},Sx=-1;function bx(n,t){return!1}const Ex=!1,Tx=!1,Cx=!0,_x=!1,xx=!1;function Dx(n,t){t.parent===n?t.moveToTop():n.add(t),Xo(n)}function Ax(n,t){t.parent===n?t.moveToTop():n.add(t),Xo(n)}function D4(n,t,i){t._remove(),n.add(t),t.setZIndex(i.getZIndex()),Xo(n)}function Mx(n,t,i){D4(n,t,i)}function Nx(n,t){t.destroy(),t.off(Y1),Xo(n)}function Ox(n,t){t.destroy(),t.off(Y1),Xo(n)}function Rx(n,t,i){console.error(`Text components are not yet supported in ReactKonva. You text is: "${i}"`)}function zx(n,t,i){}function Hx(n,t,i,s){q1(n,s,i)}function wx(n){n.hide(),Xo(n)}function Ux(n){}function Bx(n,t){(t.visible==null||t.visible)&&n.show()}function Vx(n,t){}function Gx(n){}function jx(){}function Lx(){return null}function Px(){}function Yx(){}function qx(){return P1.DefaultEventPriority}function Xx(){}function Kx(){return null}function Qx(n){x4=n}function Zx(){return x4}function Jx(){return P1.DiscreteEventPriority}function Fx(){return!1}function kx(){}function Ix(){return null}function Wx(){return-1.1}function $x(){}function tD(){return!1}function eD(){return!0}function nD(){}function aD(){}function iD(){return null}const sD=null,lD=H.createContext(null);function rD(){}const oD=Object.freeze(Object.defineProperty({__proto__:null,HostTransitionContext:lD,NotPendingTransition:sD,afterActiveInstanceBlur:Yx,appendChild:Dx,appendChildToContainer:Ax,appendInitialChild:nx,beforeActiveInstanceBlur:Px,cancelTimeout:gx,clearContainer:Gx,commitMount:zx,commitTextUpdate:Rx,commitUpdate:Hx,createInstance:ax,createTextInstance:ix,detachDeletedInstance:jx,finalizeInitialChildren:sx,getChildHostContext:px,getCurrentEventPriority:qx,getCurrentUpdatePriority:Zx,getInstanceFromNode:Lx,getInstanceFromScope:Kx,getPublicInstance:lx,getRootHostContext:dx,hideInstance:wx,hideTextInstance:Ux,idlePriority:k2.unstable_IdlePriority,insertBefore:D4,insertInContainerBefore:Mx,isPrimaryRenderer:Ex,maySuspendCommit:tD,noTimeout:Sx,now:k2.unstable_now,preloadInstance:eD,prepareForCommit:rx,preparePortalMount:ox,prepareScopeUpdate:Xx,prepareUpdate:ux,removeChild:Nx,removeChildFromContainer:Ox,requestPostPaintCallback:$x,resetAfterCommit:cx,resetFormInstance:rD,resetTextContent:fx,resolveEventTimeStamp:Wx,resolveEventType:Ix,resolveUpdatePriority:Jx,run:k2.unstable_runWithPriority,scheduleMicrotask:vx,scheduleTimeout:mx,setCurrentUpdatePriority:Qx,shouldAttemptEagerTransition:Fx,shouldDeprioritizeSubtree:hx,shouldSetTextContent:bx,startSuspendingCommit:nD,supportsHydration:xx,supportsMicrotasks:yx,supportsMutation:Cx,supportsPersistence:_x,suspendInstance:aD,trackSchedulerEvent:kx,unhideInstance:Bx,unhideTextInstance:Vx,waitForCommitToBeReady:iD,warnsIfNotActing:Tx},Symbol.toStringTag,{value:"Module"}));function A4(n,t,i){if(!n)return;if(i(n)===!0)return n;let s=n.child;for(;s;){const u=A4(s,t,i);if(u)return u;s=s.sibling}}function M4(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const I2=M4(Ha.createContext(null));class N4 extends Ha.Component{render(){return Ha.createElement(I2.Provider,{value:this._reactInternals},this.props.children)}}function uD(){const n=Ha.useContext(I2);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=Ha.useId();return Ha.useMemo(()=>{for(const i of[n,n?.alternate]){if(!i)continue;const s=A4(i,!1,u=>{let c=u.memoizedState;for(;c;){if(c.memoizedState===t)return!0;c=c.next}});if(s)return s}},[n,t])}const cD=Symbol.for("react.context"),fD=n=>n!==null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===cD;function hD(){const n=uD(),[t]=Ha.useState(()=>new Map);t.clear();let i=n;for(;i;){const s=i.type;fD(s)&&s!==I2&&!t.has(s)&&t.set(s,Ha.use(M4(s))),i=i.return}return t}function dD(){const n=hD();return Ha.useMemo(()=>Array.from(n.keys()).reduce((t,i)=>s=>Ha.createElement(t,null,Ha.createElement(i.Provider,{...s,value:n.get(i)})),t=>Ha.createElement(N4,{...t})),[n])}if(H.version.indexOf("19")===-1)throw new Error("react-konva version 19 is only compatible with React 19. Make sure to have the last version of react-konva and react or downgrade react-konva to version 18.");function pD(n){const t=H.useRef({});return H.useLayoutEffect(()=>{t.current=n}),H.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const mD=()=>{const n=H.useRef(0);return H.useMemo(()=>{n.current++},[]),n.current>1},gD=n=>{const t=H.useRef(null),i=H.useRef(null),s=H.useRef(null),u=pD(n),c=dD(),f=H.useRef(null),p=b=>{const{forwardedRef:_}=n;_&&(typeof _=="function"?_(b):_.current=b)},m=mD(),S=()=>{p(null),X1.updateContainer(null,s.current,null),i.current?.destroy(),i.current=null};return H.useLayoutEffect(()=>(f.current&&(clearTimeout(f.current),f.current=null),i.current?p(i.current):(i.current=new $f.Stage({width:n.width,height:n.height,container:t.current}),p(i.current),s.current=X1.createContainer(i.current,P1.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null),X1.updateContainer(H.createElement(c,{},n.children),s.current,null,()=>{})),()=>{m?f.current=setTimeout(S,0):S()}),[]),H.useLayoutEffect(()=>{p(i.current),q1(i.current,n,u),X1.updateContainer(H.createElement(c,{},n.children),s.current,null)}),H.createElement("div",{ref:t,id:n.id,accessKey:n.accessKey,className:n.className,role:n.role,style:n.style,tabIndex:n.tabIndex,title:n.title})},yD="Layer",vD="Group",O4="Rect",R4="Circle",z4="Line",SD="Image",bD="Path",X1=J_(oD),ED=H.forwardRef((n,t)=>H.createElement(N4,{},H.createElement(gD,{...n,forwardedRef:t}))),K1=n=>n==null?!1:typeof n=="object",H4=n=>n instanceof Date,w4=n=>typeof n=="function",U4=n=>{const t=typeof n;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},W2=n=>{if(!K1(n))return n;const t={},i=Object.keys(n);for(let s=0,u=i.length;s<u;s++){const c=i[s],f=n[c];U4(f)||w4(f)?t[c]=f:H4(f)?t[c]=new Date(f.getTime()):Array.isArray(f)?t[c]=$2(f):K1(f)&&(t[c]=W2(f))}return t},$2=n=>{let t=n.length;const i=new Array(t);for(;t--!==0;){const s=n[t];U4(s)||w4(s)?i[t]=s:H4(s)?i[t]=new Date(s.getTime()):K1(s)&&!Array.isArray(s)?i[t]=W2(s):Array.isArray(s)?i[t]=$2(s):i[t]=s}return i},TD=n=>K1(n)?Array.isArray(n)?$2(n):W2(n):n;function CD(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var B4,V4;function _D(){return V4||(V4=1,B4=function n(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var s,u,c;if(Array.isArray(t)){if(s=t.length,s!=i.length)return!1;for(u=s;u--!==0;)if(!n(t[u],i[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(c=Object.keys(t),s=c.length,s!==Object.keys(i).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;for(u=s;u--!==0;){var f=c[u];if(!n(t[f],i[f]))return!1}return!0}return t!==t&&i!==i}),B4}var xD=_D();const DD=CD(xD),AD=n=>new Promise((t,i)=>{const s=new FileReader;s.onload=()=>{const u=s.result?.toString()||void 0;t(u)},s.onerror=()=>{s.abort(),i(new Error("Error reading file."))},s.readAsDataURL(n)});function MD(n,t){for(let i=n.length;i--!==0;)if(!DD(n[i],t[i]))return!0;return!1}const tv=(n,t)=>{const i=H.useRef([]),s=i.current.length>0&&i.current[0]&&MD(i.current[0],t);return(i.current.length===0||s)&&(i.current=[TD(t),n()]),i.current[1]},ND=()=>{throw new Error("useEvent should not be called before the component is mounted")},Q1=n=>{const t=H.useRef(ND);H.useInsertionEffect(()=>{t.current=n},[n]);const i=H.useRef(null);return i.current||(i.current=function(){return t.current?.apply(this,arguments)}),i.current},OD=n=>{const[t,i]=H.useState(n),s=H.useRef(n);return s.current!==t&&(s.current=t),[t,i,s]},RD=n=>setTimeout(n,1),zD=({width:n,height:t,label:i="Click to Choose a File",source:s,showPreviewOnFileLoad:u=!0,cropRadius:c=30,cropColor:f="white",closeColor:p="white",shadingColor:m="grey",shadingOpacity:S=.4,onEdit:b,onRemove:_})=>{const[x,D]=H.useState(n||t||0),[A,N]=H.useState(t||n||0),[R,O]=H.useState(0),[U,j]=H.useState(1),[V,F]=H.useState(c),[$,st]=H.useState(!0),[I,et]=H.useState(),nt=H.useRef(void 0),bt=H.useRef(0),lt=H.useRef(0),dt=H.useRef(0),pt=H.useRef(void 0),tt=H.useRef(null),w=H.useRef(null),Z=H.useRef(null),K=H.useRef(null),at=H.useRef(null),St=H.useId();H.useEffect(()=>{if(!n&&!t)throw new Error("Either width or height must be set to a value greater than zero.");if(n&&t)throw new Error("Both width and height cannot be set together, set one or the other.");O(t||n)},[n,t]),H.useEffect(()=>{s&&s!==nt.current&&W(s)},[s]);const W=Ut=>{const Ae=new Image;Ae.crossOrigin="Anonymous",Ae.onload=()=>{Pt(Ae)},Ae.src=Ut,nt.current=Ut},gt=async Ut=>{if(Ut.target.files){const Ae=await AD(Ut.target.files[0]);Ae&&W(Ae)}},Tt=()=>{et(void 0),st(!0),F(c),j(1),_?.(),b?.()},Pt=Ut=>{const Ae=Ut.width,jn=Ut.height,Va=jn/Ae;let ke,mn;t&&!n?(ke=t||jn,mn=ke/Va):n?(mn=n,ke=mn*Va||jn):(ke=jn,mn=ke/Va),Ut.width=mn,Ut.height=ke;const eu=Math.max(c,Math.min(mn,ke)/3),Lr=ke/jn;lt.current=mn/2,dt.current=ke/2,pt.current={x:lt.current/Lr,y:lt.current/Lr},w.current&&Z.current&&(rn(lt.current,dt.current),w.current.x(lt.current),Z.current.x(lt.current),w.current.y(dt.current),Z.current.y(dt.current)),st(!1),F(eu),j(Lr),D(mn),N(ke),et(Ut),u&&RD(()=>b?.(Mi()))},le=(Ut=0)=>w.current?w.current.radius()-Ut:V-Ut,xn=Ut=>w.current?w.current.x()-le(Ut)<0:!1,xe=Ut=>w.current?w.current.y()-le(Ut)<0:!1,Dn=Ut=>w.current&&tt.current?w.current.x()+le(Ut)>tt.current.width():!1,ln=Ut=>w.current&&tt.current?w.current.y()+le(Ut)>tt.current.height():!1,Be=Ut=>!xn(Ut)&&!Dn(Ut)&&!ln(Ut)&&!xe(Ut),At=Ut=>w.current?le(Ut)>=c?Ut:w.current.radius()-c:le(Ut)>=c?Ut:V-c,ue=()=>w.current?w.current.radius()+1:V+1,ta=()=>w.current&&tt.current?tt.current.width()-w.current.radius()-1:x-V-1,ea=()=>w.current&&tt.current?tt.current.height()-w.current.radius()-1:A-V-1,An=Ut=>w.current?Ut+w.current.radius()*.86:Ut+V*.86,Ba=Ut=>w.current?Ut-w.current.radius()*.5:Ut-V*.5,rn=(Ut,Ae)=>{K.current&&at.current&&(K.current.x(An(Ut)-8),K.current.y(Ba(Ae)-8),at.current.x(An(Ut)-8),at.current.y(Ba(Ae)-10))},ha=()=>{if(w.current&&Z.current){const Ut=xn()?ue():Dn()?ta():w.current.x(),Ae=xe()?ue():ln()?ea():w.current.y();rn(Ut,Ae),pt.current={x:Ut/U,y:Ae/U},w.current.fillPatternOffset(pt.current),w.current.x(Ut),Z.current.x(Ut),w.current.y(Ae),Z.current.y(Ae)}},Ji=Ut=>{if(Z.current&&w.current&&K.current){const Ae=Ut>0||Be(Ut)?Ut:0;Z.current.radius(Z.current.radius()-At(Ae)),w.current.radius(w.current.radius()-At(Ae)),ha()}},di=Ut=>{tt.current&&(tt.current.container().style.cursor="nesw-resize"),bt.current=Ut.evt.y},Fi=Ut=>{const Ae=Ut.evt.y,jn=Ae?Ae-bt.current:void 0,Va=Ut.evt.movementY||jn||0;bt.current=Ae,Ji(Va),w.current&&rn(w.current.x(),w.current.y())},Mn=()=>{tt.current&&(tt.current.container().style.cursor="default"),b?.(Mi())},on=()=>{b?.(Mi())},Mi=()=>{if(w.current){const Ut=w.current.radius()*2;return w.current.toDataURL({x:w.current.x()-w.current.radius(),y:w.current.y()-w.current.radius(),width:Ut,height:Ut,mimeType:"image/png",quality:1})}};return X.jsx("div",{children:$?X.jsx("div",{style:{width:R,height:R},className:"bsc:relative bsc:border-solid bsc:border-2",children:X.jsxs("div",{className:"bsc:absolute bsc:max-w-[80%] bsc:w-full bsc:top-1/2 bsc:left-1/2 bsc:-translate-1/2 bsc:text-center",children:[X.jsx("input",{type:"file",name:St,id:St,onChange:gt,className:"bsc:invisible bsc:absolute bsc:pointer-events-none"}),X.jsx("label",{htmlFor:St,className:"bsc:cursor-pointer",children:i})]})}):X.jsx(ED,{ref:tt,width:x,height:A,children:X.jsxs(yD,{children:[X.jsx(SD,{image:I}),X.jsx(O4,{x:0,y:0,width:x,height:A,fill:m,opacity:S}),X.jsxs(vD,{x:3,y:3,onClick:Tt,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="pointer")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},children:[X.jsx(z4,{points:[5,5,20,20],stroke:p,strokeWidth:4}),X.jsx(z4,{points:[5,20,20,5],stroke:p,strokeWidth:4})]}),X.jsx(R4,{ref:Z,x:lt.current,y:dt.current,radius:V,stroke:f,strokeWidth:4,strokeScaleEnabled:!0,dashEnabled:!0,dash:[10,5]}),X.jsx(R4,{ref:w,x:lt.current,y:dt.current,radius:V,draggable:!0,fillPatternImage:I,fillPatternScale:{x:U,y:U},fillPatternOffset:pt.current,onDragMove:ha,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="move")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},onDragEnd:on}),X.jsx(O4,{ref:K,x:lt.current+V*.86-8,y:dt.current+V*-.5-8,width:16,height:16,draggable:!0,onMouseEnter:()=>{tt.current&&(tt.current.container().style.cursor="nesw-resize")},onMouseLeave:()=>{tt.current&&(tt.current.container().style.cursor="default")},onDragStart:di,onDragMove:Fi,onDragEnd:Mn}),X.jsx(bD,{ref:at,x:lt.current+V*.86-8,y:dt.current+V*-.5-10,data:"M47.624,0.124l12.021,9.73L44.5,24.5l10,10l14.661-15.161l9.963,12.285v-31.5H47.624z M24.5,44.5 L9.847,59.653L0,47.5V79h31.5l-12.153-9.847L34.5,54.5L24.5,44.5z",fill:f,scale:{x:.2,y:.2}})]})})})},G4=H.createContext(void 0),j4=()=>H.useContext(G4),HD=({overlayKeepOnScreen:n=!0,useAnimations:t=!0,mobileMediaQuery:i,tabletMediaQuery:s,desktopMediaQuery:u,isValidScrollableElement:c,children:f})=>{const p={overlayKeepOnScreen:n,useAnimations:t,mobileMediaQuery:i,tabletMediaQuery:s,desktopMediaQuery:u,isValidScrollableElement:c};return X.jsx(G4.Provider,{value:p,children:f})};var Za=(n=>(n[n.Vertical=0]="Vertical",n[n.Horizontal=1]="Horizontal",n))(Za||{}),Es=(n=>(n[n.Right=0]="Right",n[n.Left=1]="Left",n))(Es||{}),ev={exports:{}};var L4;function wD(){return L4||(L4=1,(function(n){(function(){var t={}.hasOwnProperty;function i(){for(var c="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(c=u(c,s(p)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var p in c)t.call(c,p)&&c[p]&&(f=u(f,p));return f}function u(c,f){return f?c?c+" "+f:c+f:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(ev)),ev.exports}var UD=wD();const Se=X2(UD);var nh=(n=>(n[n.Focus=0]="Focus",n[n.FocusWithin=1]="FocusWithin",n))(nh||{});const kp=(n=1)=>H.useMemo(()=>Se("bsc:dark:ring-mono-light-2 bsc:dark:ring-offset-mono-dark-1",{"bsc:focus-within:ring-3 bsc:focus-within:ring-primary-2 bsc:focus-within:ring-offset-2 focus-within:bsc-ring-opacity-50":n===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":n===0}),[n]),BD=(n,t)=>{const i=H.useRef(null),{buttonType:s,buttonStyle:u="curved",type:c="button",disabled:f=!1,form:p,fullWidth:m=!1,onClick:S,className:b,children:_}=n,x=()=>{i.current?.click()};H.useImperativeHandle(t,()=>({click:x}));const D=kp(nh.Focus),A=Se("bc-button bsc:max-sm:p-4 bsc:md:p-2 bsc:dark:bg-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:text-mono-dark-1",D,{"bsc:w-full":m,"bc-disabled bsc:bg-gray-3 bsc:text-gray-2 bsc:pointer-events-none":f,"bsc:bg-primary-1 bsc:text-white bsc:hover:bg-primary-2 bsc:focus:ring-primary-1":s==="primary","bsc:bg-primary-2 bsc:text-white bsc:hover:bg-primary-3 bsc:focus:ring-primary-2":s==="secondary","bsc:bg-info bsc:text-white bsc:focus:ring-info":s==="info","bsc:bg-success bsc:text-white bsc:focus:ring-success":s==="success","bsc:bg-warning bsc:text-white bsc:focus:ring-warning":s==="warning","bsc:bg-error bsc:text-white bsc:focus:ring-error":s==="error","bsc:rounded-md":u==="curved","bsc:rounded-full bsc:px-4!":u==="round"},b);return X.jsx("button",{ref:i,type:c,onClick:S,disabled:f,form:p,className:A,children:_})},Ql=H.forwardRef(BD);var nv={exports:{}},Ip={},P4;function VD(){if(P4)return Ip;P4=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(s,u,c){var f=null;if(c!==void 0&&(f=""+c),u.key!==void 0&&(f=""+u.key),"key"in u){c={};for(var p in u)p!=="key"&&(c[p]=u[p])}else c=u;return u=c.ref,{$$typeof:n,type:s,key:f,ref:u!==void 0?u:null,props:c}}return Ip.Fragment=t,Ip.jsx=i,Ip.jsxs=i,Ip}var Z1={},Y4;function GD(){return Y4||(Y4=1,process.env.NODE_ENV!=="production"&&(function(){function n(W){if(W==null)return null;if(typeof W=="function")return W.$$typeof===bt?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case R:return"Fragment";case U:return"Profiler";case O:return"StrictMode";case $:return"Suspense";case st:return"SuspenseList";case nt:return"Activity"}if(typeof W=="object")switch(typeof W.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case N:return"Portal";case V:return W.displayName||"Context";case j:return(W._context.displayName||"Context")+".Consumer";case F:var gt=W.render;return W=W.displayName,W||(W=gt.displayName||gt.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case I:return gt=W.displayName||null,gt!==null?gt:n(W.type)||"Memo";case et:gt=W._payload,W=W._init;try{return n(W(gt))}catch{}}return null}function t(W){return""+W}function i(W){try{t(W);var gt=!1}catch{gt=!0}if(gt){gt=console;var Tt=gt.error,Pt=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return Tt.call(gt,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Pt),t(W)}}function s(W){if(W===R)return"<>";if(typeof W=="object"&&W!==null&&W.$$typeof===et)return"<...>";try{var gt=n(W);return gt?"<"+gt+">":"<...>"}catch{return"<...>"}}function u(){var W=lt.A;return W===null?null:W.getOwner()}function c(){return Error("react-stack-top-frame")}function f(W){if(dt.call(W,"key")){var gt=Object.getOwnPropertyDescriptor(W,"key").get;if(gt&&gt.isReactWarning)return!1}return W.key!==void 0}function p(W,gt){function Tt(){w||(w=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",gt))}Tt.isReactWarning=!0,Object.defineProperty(W,"key",{get:Tt,configurable:!0})}function m(){var W=n(this.type);return Z[W]||(Z[W]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),W=this.props.ref,W!==void 0?W:null}function S(W,gt,Tt,Pt,le,xn){var xe=Tt.ref;return W={$$typeof:A,type:W,key:gt,props:Tt,_owner:Pt},(xe!==void 0?xe:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:m}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:xn}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function b(W,gt,Tt,Pt,le,xn){var xe=gt.children;if(xe!==void 0)if(Pt)if(pt(xe)){for(Pt=0;Pt<xe.length;Pt++)_(xe[Pt]);Object.freeze&&Object.freeze(xe)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _(xe);if(dt.call(gt,"key")){xe=n(W);var Dn=Object.keys(gt).filter(function(Be){return Be!=="key"});Pt=0<Dn.length?"{key: someKey, "+Dn.join(": ..., ")+": ...}":"{key: someKey}",St[xe+Pt]||(Dn=0<Dn.length?"{"+Dn.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
229
+ `,ex={};function X1(n,t,i=ex){if(!T4&&"zIndex"in t&&(console.warn(tx),T4=!0),!C4&&t.draggable){var s=t.x!==void 0||t.y!==void 0,u=t.onDragEnd||t.onDragMove;s&&!u&&(console.warn($_),C4=!0)}for(var c in i)if(!E4[c]){var f=c.slice(0,2)==="on",p=i[c]!==t[c];if(f&&p){var m=c.substr(2).toLowerCase();m.substr(0,7)==="content"&&(m="content"+m.substr(7,1).toUpperCase()+m.substr(8)),n.off(m,i[c])}var S=!t.hasOwnProperty(c);S&&n.setAttr(c,void 0)}var b=t._useStrictMode,_={},x=!1;const D={};for(var c in t)if(!E4[c]){var f=c.slice(0,2)==="on",A=i[c]!==t[c];if(f&&A){var m=c.substr(2).toLowerCase();m.substr(0,7)==="content"&&(m="content"+m.substr(7,1).toUpperCase()+m.substr(8)),t[c]&&(D[m]=t[c])}!f&&(t[c]!==i[c]||b&&t[c]!==n.getAttr(c))&&(x=!0,_[c]=t[c])}x&&(n.setAttrs(_),Xo(n));for(var m in D)n.off(m+q1),n.on(m+q1,D[m])}function Xo(n){if(!Nt.autoDrawEnabled){var t=n.getLayer()||n.getStage();t&&t.batchDraw()}}var k2=J2();const _4={},nx={};eh.Node.prototype._applyProps=X1;let x4=Y1.DefaultEventPriority;function ax(n,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}n.add(t),Xo(n)}function ix(n,t,i){let s=eh[n];s||(console.error(`Konva has no node with the type ${n}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${n}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),s=eh.Group);const u={},c={};for(var f in t)if(f!=="ref"){var p=f.slice(0,2)==="on";p?c[f]=t[f]:u[f]=t[f]}const m=new s(u);return X1(m,c),m}function sx(n,t,i){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${n}"`)}function lx(n,t,i){return!1}function rx(n){return n}function ox(){return null}function ux(){return null}function cx(n,t,i,s){return nx}function fx(){}function hx(n){}function dx(n,t){return!1}function px(){return _4}function mx(){return _4}const gx=setTimeout,yx=clearTimeout,vx=!0,Sx=n=>{n()},bx=-1;function Ex(n,t){return!1}const Tx=!1,Cx=!1,_x=!0,xx=!1,Dx=!1;function Ax(n,t){t.parent===n?t.moveToTop():n.add(t),Xo(n)}function Mx(n,t){t.parent===n?t.moveToTop():n.add(t),Xo(n)}function D4(n,t,i){t._remove(),n.add(t),t.setZIndex(i.getZIndex()),Xo(n)}function Nx(n,t,i){D4(n,t,i)}function Ox(n,t){t.destroy(),t.off(q1),Xo(n)}function Rx(n,t){t.destroy(),t.off(q1),Xo(n)}function zx(n,t,i){console.error(`Text components are not yet supported in ReactKonva. You text is: "${i}"`)}function Hx(n,t,i){}function wx(n,t,i,s){X1(n,s,i)}function Ux(n){n.hide(),Xo(n)}function Bx(n){}function Vx(n,t){(t.visible==null||t.visible)&&n.show()}function Gx(n,t){}function jx(n){}function Lx(){}function Px(){return null}function Yx(){}function qx(){}function Xx(){return Y1.DefaultEventPriority}function Kx(){}function Qx(){return null}function Zx(n){x4=n}function Jx(){return x4}function Fx(){return Y1.DiscreteEventPriority}function kx(){return!1}function Ix(){}function Wx(){return null}function $x(){return-1.1}function tD(){}function eD(){return!1}function nD(){return!0}function aD(){}function iD(){}function sD(){return null}const lD=null,rD=w.createContext(null);function oD(){}const uD=Object.freeze(Object.defineProperty({__proto__:null,HostTransitionContext:rD,NotPendingTransition:lD,afterActiveInstanceBlur:qx,appendChild:Ax,appendChildToContainer:Mx,appendInitialChild:ax,beforeActiveInstanceBlur:Yx,cancelTimeout:yx,clearContainer:jx,commitMount:Hx,commitTextUpdate:zx,commitUpdate:wx,createInstance:ix,createTextInstance:sx,detachDeletedInstance:Lx,finalizeInitialChildren:lx,getChildHostContext:mx,getCurrentEventPriority:Xx,getCurrentUpdatePriority:Jx,getInstanceFromNode:Px,getInstanceFromScope:Qx,getPublicInstance:rx,getRootHostContext:px,hideInstance:Ux,hideTextInstance:Bx,idlePriority:k2.unstable_IdlePriority,insertBefore:D4,insertInContainerBefore:Nx,isPrimaryRenderer:Tx,maySuspendCommit:eD,noTimeout:bx,now:k2.unstable_now,preloadInstance:nD,prepareForCommit:ox,preparePortalMount:ux,prepareScopeUpdate:Kx,prepareUpdate:cx,removeChild:Ox,removeChildFromContainer:Rx,requestPostPaintCallback:tD,resetAfterCommit:fx,resetFormInstance:oD,resetTextContent:hx,resolveEventTimeStamp:$x,resolveEventType:Wx,resolveUpdatePriority:Fx,run:k2.unstable_runWithPriority,scheduleMicrotask:Sx,scheduleTimeout:gx,setCurrentUpdatePriority:Zx,shouldAttemptEagerTransition:kx,shouldDeprioritizeSubtree:dx,shouldSetTextContent:Ex,startSuspendingCommit:aD,supportsHydration:Dx,supportsMicrotasks:vx,supportsMutation:_x,supportsPersistence:xx,suspendInstance:iD,trackSchedulerEvent:Ix,unhideInstance:Vx,unhideTextInstance:Gx,waitForCommitToBeReady:sD,warnsIfNotActing:Cx},Symbol.toStringTag,{value:"Module"}));function A4(n,t,i){if(!n)return;if(i(n)===!0)return n;let s=n.child;for(;s;){const u=A4(s,t,i);if(u)return u;s=s.sibling}}function M4(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const I2=M4(wa.createContext(null));class N4 extends wa.Component{render(){return wa.createElement(I2.Provider,{value:this._reactInternals},this.props.children)}}function cD(){const n=wa.useContext(I2);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=wa.useId();return wa.useMemo(()=>{for(const i of[n,n?.alternate]){if(!i)continue;const s=A4(i,!1,u=>{let c=u.memoizedState;for(;c;){if(c.memoizedState===t)return!0;c=c.next}});if(s)return s}},[n,t])}const fD=Symbol.for("react.context"),hD=n=>n!==null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===fD;function dD(){const n=cD(),[t]=wa.useState(()=>new Map);t.clear();let i=n;for(;i;){const s=i.type;hD(s)&&s!==I2&&!t.has(s)&&t.set(s,wa.use(M4(s))),i=i.return}return t}function pD(){const n=dD();return wa.useMemo(()=>Array.from(n.keys()).reduce((t,i)=>s=>wa.createElement(t,null,wa.createElement(i.Provider,{...s,value:n.get(i)})),t=>wa.createElement(N4,{...t})),[n])}if(w.version.indexOf("19")===-1)throw new Error("react-konva version 19 is only compatible with React 19. Make sure to have the last version of react-konva and react or downgrade react-konva to version 18.");function mD(n){const t=w.useRef({});return w.useLayoutEffect(()=>{t.current=n}),w.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const gD=()=>{const n=w.useRef(0);return w.useMemo(()=>{n.current++},[]),n.current>1},yD=n=>{const t=w.useRef(null),i=w.useRef(null),s=w.useRef(null),u=mD(n),c=pD(),f=w.useRef(null),p=b=>{const{forwardedRef:_}=n;_&&(typeof _=="function"?_(b):_.current=b)},m=gD(),S=()=>{p(null),K1.updateContainer(null,s.current,null),i.current?.destroy(),i.current=null};return w.useLayoutEffect(()=>(f.current&&(clearTimeout(f.current),f.current=null),i.current?p(i.current):(i.current=new eh.Stage({width:n.width,height:n.height,container:t.current}),p(i.current),s.current=K1.createContainer(i.current,Y1.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null),K1.updateContainer(w.createElement(c,{},n.children),s.current,null,()=>{})),()=>{m?f.current=setTimeout(S,0):S()}),[]),w.useLayoutEffect(()=>{p(i.current),X1(i.current,n,u),K1.updateContainer(w.createElement(c,{},n.children),s.current,null)}),w.createElement("div",{ref:t,id:n.id,accessKey:n.accessKey,className:n.className,role:n.role,style:n.style,tabIndex:n.tabIndex,title:n.title})},vD="Layer",SD="Group",O4="Rect",R4="Circle",z4="Line",bD="Image",ED="Path",K1=F_(uD),TD=w.forwardRef((n,t)=>w.createElement(N4,{},w.createElement(yD,{...n,forwardedRef:t}))),Q1=n=>n==null?!1:typeof n=="object",H4=n=>n instanceof Date,w4=n=>typeof n=="function",U4=n=>{const t=typeof n;return t==="string"||t==="number"||t==="boolean"||t==="bigint"},W2=n=>{if(!Q1(n))return n;const t={},i=Object.keys(n);for(let s=0,u=i.length;s<u;s++){const c=i[s],f=n[c];U4(f)||w4(f)?t[c]=f:H4(f)?t[c]=new Date(f.getTime()):Array.isArray(f)?t[c]=$2(f):Q1(f)&&(t[c]=W2(f))}return t},$2=n=>{let t=n.length;const i=new Array(t);for(;t--!==0;){const s=n[t];U4(s)||w4(s)?i[t]=s:H4(s)?i[t]=new Date(s.getTime()):Q1(s)&&!Array.isArray(s)?i[t]=W2(s):Array.isArray(s)?i[t]=$2(s):i[t]=s}return i},CD=n=>Q1(n)?Array.isArray(n)?$2(n):W2(n):n;function _D(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var B4,V4;function xD(){return V4||(V4=1,B4=function n(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var s,u,c;if(Array.isArray(t)){if(s=t.length,s!=i.length)return!1;for(u=s;u--!==0;)if(!n(t[u],i[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(c=Object.keys(t),s=c.length,s!==Object.keys(i).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;for(u=s;u--!==0;){var f=c[u];if(!n(t[f],i[f]))return!1}return!0}return t!==t&&i!==i}),B4}var DD=xD();const AD=_D(DD),MD=n=>new Promise((t,i)=>{const s=new FileReader;s.onload=()=>{const u=s.result?.toString()||void 0;t(u)},s.onerror=()=>{s.abort(),i(new Error("Error reading file."))},s.readAsDataURL(n)});function ND(n,t){for(let i=n.length;i--!==0;)if(!AD(n[i],t[i]))return!0;return!1}const tv=(n,t)=>{const i=w.useRef([]),s=i.current.length>0&&i.current[0]&&ND(i.current[0],t);return(i.current.length===0||s)&&(i.current=[CD(t),n()]),i.current[1]},OD=()=>{throw new Error("useEvent should not be called before the component is mounted")},Z1=n=>{const t=w.useRef(OD);w.useInsertionEffect(()=>{t.current=n},[n]);const i=w.useRef(null);return i.current||(i.current=function(){return t.current?.apply(this,arguments)}),i.current},RD=n=>{const[t,i]=w.useState(n),s=w.useRef(n);return s.current!==t&&(s.current=t),[t,i,s]},zD=n=>setTimeout(n,1),HD=({width:n,height:t,label:i="Click to Choose a File",source:s,showPreviewOnFileLoad:u=!0,cropRadius:c=30,cropColor:f="white",closeColor:p="white",shadingColor:m="grey",shadingOpacity:S=.4,onEdit:b,onRemove:_})=>{const[x,D]=w.useState(n||t||0),[A,N]=w.useState(t||n||0),[R,O]=w.useState(0),[U,j]=w.useState(1),[V,F]=w.useState(c),[W,st]=w.useState(!0),[$,tt]=w.useState(),et=w.useRef(void 0),Tt=w.useRef(0),it=w.useRef(0),ht=w.useRef(0),dt=w.useRef(void 0),nt=w.useRef(null),H=w.useRef(null),J=w.useRef(null),K=w.useRef(null),mt=w.useRef(null),pt=w.useId();w.useEffect(()=>{if(!n&&!t)throw new Error("Either width or height must be set to a value greater than zero.");if(n&&t)throw new Error("Both width and height cannot be set together, set one or the other.");O(t||n)},[n,t]),w.useEffect(()=>{s&&s!==et.current&&I(s)},[s]);const I=Ht=>{const De=new Image;De.crossOrigin="Anonymous",De.onload=()=>{jt(De)},De.src=Ht,et.current=Ht},vt=async Ht=>{if(Ht.target.files){const De=await MD(Ht.target.files[0]);De&&I(De)}},bt=()=>{tt(void 0),st(!0),F(c),j(1),_?.(),b?.()},jt=Ht=>{const De=Ht.width,da=Ht.height,Va=da/De;let Ye,ta;t&&!n?(Ye=t||da,ta=Ye/Va):n?(ta=n,Ye=ta*Va||da):(Ye=da,ta=Ye/Va),Ht.width=ta,Ht.height=Ye;const Ms=Math.max(c,Math.min(ta,Ye)/3),er=Ye/da;it.current=ta/2,ht.current=Ye/2,dt.current={x:it.current/er,y:it.current/er},H.current&&J.current&&(tn(it.current,ht.current),H.current.x(it.current),J.current.x(it.current),H.current.y(ht.current),J.current.y(ht.current)),st(!1),F(Ms),j(er),D(ta),N(Ye),tt(Ht),u&&zD(()=>b?.(mi()))},pe=(Ht=0)=>H.current?H.current.radius()-Ht:V-Ht,An=Ht=>H.current?H.current.x()-pe(Ht)<0:!1,Se=Ht=>H.current?H.current.y()-pe(Ht)<0:!1,Qn=Ht=>H.current&&nt.current?H.current.x()+pe(Ht)>nt.current.width():!1,We=Ht=>H.current&&nt.current?H.current.y()+pe(Ht)>nt.current.height():!1,ze=Ht=>!An(Ht)&&!Qn(Ht)&&!We(Ht)&&!Se(Ht),Wt=Ht=>H.current?pe(Ht)>=c?Ht:H.current.radius()-c:pe(Ht)>=c?Ht:V-c,Bt=()=>H.current?H.current.radius()+1:V+1,Ce=()=>H.current&&nt.current?nt.current.width()-H.current.radius()-1:x-V-1,$n=()=>H.current&&nt.current?nt.current.height()-H.current.radius()-1:A-V-1,$e=Ht=>H.current?Ht+H.current.radius()*.86:Ht+V*.86,Wa=Ht=>H.current?Ht-H.current.radius()*.5:Ht-V*.5,tn=(Ht,De)=>{K.current&&mt.current&&(K.current.x($e(Ht)-8),K.current.y(Wa(De)-8),mt.current.x($e(Ht)-8),mt.current.y(Wa(De)-10))},ha=()=>{if(H.current&&J.current){const Ht=An()?Bt():Qn()?Ce():H.current.x(),De=Se()?Bt():We()?$n():H.current.y();tn(Ht,De),dt.current={x:Ht/U,y:De/U},H.current.fillPatternOffset(dt.current),H.current.x(Ht),J.current.x(Ht),H.current.y(De),J.current.y(De)}},Ds=Ht=>{if(J.current&&H.current&&K.current){const De=Ht>0||ze(Ht)?Ht:0;J.current.radius(J.current.radius()-Wt(De)),H.current.radius(H.current.radius()-Wt(De)),ha()}},$a=Ht=>{nt.current&&(nt.current.container().style.cursor="nesw-resize"),Tt.current=Ht.evt.y},As=Ht=>{const De=Ht.evt.y,da=De?De-Tt.current:void 0,Va=Ht.evt.movementY||da||0;Tt.current=De,Ds(Va),H.current&&tn(H.current.x(),H.current.y())},Mn=()=>{nt.current&&(nt.current.container().style.cursor="default"),b?.(mi())},gn=()=>{b?.(mi())},mi=()=>{if(H.current){const Ht=H.current.radius()*2;return H.current.toDataURL({x:H.current.x()-H.current.radius(),y:H.current.y()-H.current.radius(),width:Ht,height:Ht,mimeType:"image/png",quality:1})}};return X.jsx("div",{children:W?X.jsx("div",{style:{width:R,height:R},className:"bsc:relative bsc:border-solid bsc:border-2",children:X.jsxs("div",{className:"bsc:absolute bsc:max-w-[80%] bsc:w-full bsc:top-1/2 bsc:left-1/2 bsc:-translate-1/2 bsc:text-center",children:[X.jsx("input",{type:"file",name:pt,id:pt,onChange:vt,className:"bsc:invisible bsc:absolute bsc:pointer-events-none"}),X.jsx("label",{htmlFor:pt,className:"bsc:cursor-pointer",children:i})]})}):X.jsx(TD,{ref:nt,width:x,height:A,children:X.jsxs(vD,{children:[X.jsx(bD,{image:$}),X.jsx(O4,{x:0,y:0,width:x,height:A,fill:m,opacity:S}),X.jsxs(SD,{x:3,y:3,onClick:bt,onMouseEnter:()=>{nt.current&&(nt.current.container().style.cursor="pointer")},onMouseLeave:()=>{nt.current&&(nt.current.container().style.cursor="default")},children:[X.jsx(z4,{points:[5,5,20,20],stroke:p,strokeWidth:4}),X.jsx(z4,{points:[5,20,20,5],stroke:p,strokeWidth:4})]}),X.jsx(R4,{ref:J,x:it.current,y:ht.current,radius:V,stroke:f,strokeWidth:4,strokeScaleEnabled:!0,dashEnabled:!0,dash:[10,5]}),X.jsx(R4,{ref:H,x:it.current,y:ht.current,radius:V,draggable:!0,fillPatternImage:$,fillPatternScale:{x:U,y:U},fillPatternOffset:dt.current,onDragMove:ha,onMouseEnter:()=>{nt.current&&(nt.current.container().style.cursor="move")},onMouseLeave:()=>{nt.current&&(nt.current.container().style.cursor="default")},onDragEnd:gn}),X.jsx(O4,{ref:K,x:it.current+V*.86-8,y:ht.current+V*-.5-8,width:16,height:16,draggable:!0,onMouseEnter:()=>{nt.current&&(nt.current.container().style.cursor="nesw-resize")},onMouseLeave:()=>{nt.current&&(nt.current.container().style.cursor="default")},onDragStart:$a,onDragMove:As,onDragEnd:Mn}),X.jsx(ED,{ref:mt,x:it.current+V*.86-8,y:ht.current+V*-.5-10,data:"M47.624,0.124l12.021,9.73L44.5,24.5l10,10l14.661-15.161l9.963,12.285v-31.5H47.624z M24.5,44.5 L9.847,59.653L0,47.5V79h31.5l-12.153-9.847L34.5,54.5L24.5,44.5z",fill:f,scale:{x:.2,y:.2}})]})})})},G4=w.createContext(void 0),j4=()=>w.useContext(G4),wD=({overlayKeepOnScreen:n=!0,useAnimations:t=!0,mobileMediaQuery:i,tabletMediaQuery:s,desktopMediaQuery:u,isValidScrollableElement:c,children:f})=>{const p={overlayKeepOnScreen:n,useAnimations:t,mobileMediaQuery:i,tabletMediaQuery:s,desktopMediaQuery:u,isValidScrollableElement:c};return X.jsx(G4.Provider,{value:p,children:f})};var Za=(n=>(n[n.Vertical=0]="Vertical",n[n.Horizontal=1]="Horizontal",n))(Za||{}),Es=(n=>(n[n.Right=0]="Right",n[n.Left=1]="Left",n))(Es||{}),ev={exports:{}};var L4;function UD(){return L4||(L4=1,(function(n){(function(){var t={}.hasOwnProperty;function i(){for(var c="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(c=u(c,s(p)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var p in c)t.call(c,p)&&c[p]&&(f=u(f,p));return f}function u(c,f){return f?c?c+" "+f:c+f:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(ev)),ev.exports}var BD=UD();const ve=X2(BD);var ih=(n=>(n[n.Focus=0]="Focus",n[n.FocusWithin=1]="FocusWithin",n))(ih||{});const Wp=(n=1)=>w.useMemo(()=>ve("bsc:dark:ring-mono-light-2 bsc:dark:ring-offset-mono-dark-1",{"bsc:focus-within:ring-3 bsc:focus-within:ring-primary-2 bsc:focus-within:ring-offset-2 focus-within:bsc-ring-opacity-50":n===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":n===0}),[n]),VD=(n,t)=>{const i=w.useRef(null),{buttonType:s,buttonStyle:u="curved",type:c="button",disabled:f=!1,form:p,fullWidth:m=!1,onClick:S,className:b,children:_}=n,x=()=>{i.current?.click()};w.useImperativeHandle(t,()=>({click:x}));const D=Wp(ih.Focus),A=ve("bc-button bsc:max-sm:p-4 bsc:md:p-2 bsc:dark:bg-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:text-mono-dark-1",D,{"bsc:w-full":m,"bc-disabled bsc:bg-gray-3 bsc:text-gray-2 bsc:pointer-events-none":f,"bsc:bg-primary-1 bsc:text-white bsc:hover:bg-primary-2 bsc:focus:ring-primary-1":s==="primary","bsc:bg-primary-2 bsc:text-white bsc:hover:bg-primary-3 bsc:focus:ring-primary-2":s==="secondary","bsc:bg-info bsc:text-white bsc:focus:ring-info":s==="info","bsc:bg-success bsc:text-white bsc:focus:ring-success":s==="success","bsc:bg-warning bsc:text-white bsc:focus:ring-warning":s==="warning","bsc:bg-error bsc:text-white bsc:focus:ring-error":s==="error","bsc:rounded-md":u==="curved","bsc:rounded-full bsc:px-4!":u==="round"},b);return X.jsx("button",{ref:i,type:c,onClick:S,disabled:f,form:p,className:A,children:_})},kl=w.forwardRef(VD);var nv={exports:{}},$p={},P4;function GD(){if(P4)return $p;P4=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(s,u,c){var f=null;if(c!==void 0&&(f=""+c),u.key!==void 0&&(f=""+u.key),"key"in u){c={};for(var p in u)p!=="key"&&(c[p]=u[p])}else c=u;return u=c.ref,{$$typeof:n,type:s,key:f,ref:u!==void 0?u:null,props:c}}return $p.Fragment=t,$p.jsx=i,$p.jsxs=i,$p}var J1={},Y4;function jD(){return Y4||(Y4=1,process.env.NODE_ENV!=="production"&&(function(){function n(I){if(I==null)return null;if(typeof I=="function")return I.$$typeof===Tt?null:I.displayName||I.name||null;if(typeof I=="string")return I;switch(I){case R:return"Fragment";case U:return"Profiler";case O:return"StrictMode";case W:return"Suspense";case st:return"SuspenseList";case et:return"Activity"}if(typeof I=="object")switch(typeof I.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),I.$$typeof){case N:return"Portal";case V:return I.displayName||"Context";case j:return(I._context.displayName||"Context")+".Consumer";case F:var vt=I.render;return I=I.displayName,I||(I=vt.displayName||vt.name||"",I=I!==""?"ForwardRef("+I+")":"ForwardRef"),I;case $:return vt=I.displayName||null,vt!==null?vt:n(I.type)||"Memo";case tt:vt=I._payload,I=I._init;try{return n(I(vt))}catch{}}return null}function t(I){return""+I}function i(I){try{t(I);var vt=!1}catch{vt=!0}if(vt){vt=console;var bt=vt.error,jt=typeof Symbol=="function"&&Symbol.toStringTag&&I[Symbol.toStringTag]||I.constructor.name||"Object";return bt.call(vt,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",jt),t(I)}}function s(I){if(I===R)return"<>";if(typeof I=="object"&&I!==null&&I.$$typeof===tt)return"<...>";try{var vt=n(I);return vt?"<"+vt+">":"<...>"}catch{return"<...>"}}function u(){var I=it.A;return I===null?null:I.getOwner()}function c(){return Error("react-stack-top-frame")}function f(I){if(ht.call(I,"key")){var vt=Object.getOwnPropertyDescriptor(I,"key").get;if(vt&&vt.isReactWarning)return!1}return I.key!==void 0}function p(I,vt){function bt(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",vt))}bt.isReactWarning=!0,Object.defineProperty(I,"key",{get:bt,configurable:!0})}function m(){var I=n(this.type);return J[I]||(J[I]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),I=this.props.ref,I!==void 0?I:null}function S(I,vt,bt,jt,pe,An){var Se=bt.ref;return I={$$typeof:A,type:I,key:vt,props:bt,_owner:jt},(Se!==void 0?Se:null)!==null?Object.defineProperty(I,"ref",{enumerable:!1,get:m}):Object.defineProperty(I,"ref",{enumerable:!1,value:null}),I._store={},Object.defineProperty(I._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(I,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(I,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:pe}),Object.defineProperty(I,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:An}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I}function b(I,vt,bt,jt,pe,An){var Se=vt.children;if(Se!==void 0)if(jt)if(dt(Se)){for(jt=0;jt<Se.length;jt++)_(Se[jt]);Object.freeze&&Object.freeze(Se)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _(Se);if(ht.call(vt,"key")){Se=n(I);var Qn=Object.keys(vt).filter(function(ze){return ze!=="key"});jt=0<Qn.length?"{key: someKey, "+Qn.join(": ..., ")+": ...}":"{key: someKey}",pt[Se+jt]||(Qn=0<Qn.length?"{"+Qn.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
230
230
  let props = %s;
231
231
  <%s {...props} />
232
232
  React keys must be passed directly to JSX without using spread:
233
233
  let props = %s;
234
- <%s key={someKey} {...props} />`,Pt,xe,Dn,xe),St[xe+Pt]=!0)}if(xe=null,Tt!==void 0&&(i(Tt),xe=""+Tt),f(gt)&&(i(gt.key),xe=""+gt.key),"key"in gt){Tt={};for(var ln in gt)ln!=="key"&&(Tt[ln]=gt[ln])}else Tt=gt;return xe&&p(Tt,typeof W=="function"?W.displayName||W.name||"Unknown":W),S(W,xe,Tt,u(),le,xn)}function _(W){x(W)?W._store&&(W._store.validated=1):typeof W=="object"&&W!==null&&W.$$typeof===et&&(W._payload.status==="fulfilled"?x(W._payload.value)&&W._payload.value._store&&(W._payload.value._store.validated=1):W._store&&(W._store.validated=1))}function x(W){return typeof W=="object"&&W!==null&&W.$$typeof===A}var D=H,A=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),V=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),st=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),et=Symbol.for("react.lazy"),nt=Symbol.for("react.activity"),bt=Symbol.for("react.client.reference"),lt=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,dt=Object.prototype.hasOwnProperty,pt=Array.isArray,tt=console.createTask?console.createTask:function(){return null};D={react_stack_bottom_frame:function(W){return W()}};var w,Z={},K=D.react_stack_bottom_frame.bind(D,c)(),at=tt(s(c)),St={};Z1.Fragment=R,Z1.jsx=function(W,gt,Tt){var Pt=1e4>lt.recentlyCreatedOwnerStacks++;return b(W,gt,Tt,!1,Pt?Error("react-stack-top-frame"):K,Pt?tt(s(W)):at)},Z1.jsxs=function(W,gt,Tt){var Pt=1e4>lt.recentlyCreatedOwnerStacks++;return b(W,gt,Tt,!0,Pt?Error("react-stack-top-frame"):K,Pt?tt(s(W)):at)}})()),Z1}var q4;function jD(){return q4||(q4=1,process.env.NODE_ENV==="production"?nv.exports=VD():nv.exports=GD()),nv.exports}var Ja=jD();function LD(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X4,K4;function PD(){return K4||(K4=1,X4=function n(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var s,u,c;if(Array.isArray(t)){if(s=t.length,s!=i.length)return!1;for(u=s;u--!==0;)if(!n(t[u],i[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(c=Object.keys(t),s=c.length,s!==Object.keys(i).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;for(u=s;u--!==0;){var f=c[u];if(!n(t[f],i[f]))return!1}return!0}return t!==t&&i!==i}),X4}var YD=PD();const qD=LD(YD),XD=()=>{throw new Error("useEvent should not be called before the component is mounted")},Wp=n=>{const t=H.useRef(XD);H.useInsertionEffect(()=>{t.current=n},[n]);const i=H.useRef(null);return i.current||(i.current=function(){return t.current?.apply(this,arguments)}),i.current},Q4=n=>{const t=H.useRef(void 0);let i=!1;t.current!==void 0&&(i=!qD(t.current,n));const s={changed:i,previousValue:t.current};return t.current=n,s},KD=n=>typeof n=="function",QD=n=>{const[t,i]=H.useState({value:n,initial:!0}),s=H.useRef(n);return[t,u=>{if(!KD(u))i({value:u,initial:!1});else{const c=u(s.current);s.current=c,i({value:c,initial:!1})}}]},ZD=n=>{const[t,i]=QD(n),s=H.useRef({value:n,initial:!0});return s.current!==t&&(s.current=t),[t,i,s]},Z4=H.createContext(void 0),J1=()=>H.useContext(Z4),av=({id:n,name:t,value:i,type:s,checked:u,readOnly:c,onChange:f})=>Ja.jsx("input",{id:n,name:t,value:i,type:s,checked:u,onChange:f,readOnly:c,disabled:c,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function JD(n){const t=Object.keys(n),i={};for(let s=0,u=t.length;s<u;s++){const c=t[s];if(c){const f=n[c],p=c.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`);typeof f=="boolean"?f&&(i[`data-${p}`]=!0):i[`data-${p}`]=n[c]}}return i}const $p=({wrapperElement:n,renderProps:t,elementProps:i,innerWrapperElement:s,className:u,children:c})=>{if(typeof c=="function")return s?Ja.jsxs(Ja.Fragment,{children:[s,c(t)]}):c(t);{const f=s?Ja.jsxs(Ja.Fragment,{children:[s,c]}):c;return H.createElement(n,Object.assign({},t?JD(t):{},i,{className:u}),f)}};var FD=Symbol.for("preact-signals");function iv(){if(ah>1)ah--;else{for(var n,t=!1;t0!==void 0;){var i=t0;for(t0=void 0,sv++;i!==void 0;){var s=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&k4(i))try{i.c()}catch(u){t||(n=u,t=!0)}i=s}}if(sv=0,ah--,t)throw n}}var Ue=void 0;function J4(n){var t=Ue;Ue=void 0;try{return n()}finally{Ue=t}}var t0=void 0,ah=0,sv=0,F1=0;function F4(n){if(Ue!==void 0){var t=n.n;if(t===void 0||t.t!==Ue)return t={i:0,S:n,p:Ue.s,n:void 0,t:Ue,e:void 0,x:void 0,r:t},Ue.s!==void 0&&(Ue.s.n=t),Ue.s=t,n.n=t,32&Ue.f&&n.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ue.s,t.n=void 0,Ue.s.n=t,Ue.s=t),t}}function Fa(n,t){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Fa.prototype.brand=FD,Fa.prototype.h=function(){return!0},Fa.prototype.S=function(n){var t=this,i=this.t;i!==n&&n.e===void 0&&(n.x=i,this.t=n,i!==void 0?i.e=n:J4(function(){var s;(s=t.W)==null||s.call(t)}))},Fa.prototype.U=function(n){var t=this;if(this.t!==void 0){var i=n.e,s=n.x;i!==void 0&&(i.x=s,n.e=void 0),s!==void 0&&(s.e=i,n.x=void 0),n===this.t&&(this.t=s,s===void 0&&J4(function(){var u;(u=t.Z)==null||u.call(t)}))}},Fa.prototype.subscribe=function(n){var t=this;return rv(function(){var i=t.value,s=Ue;Ue=void 0;try{n(i)}finally{Ue=s}},{name:"sub"})},Fa.prototype.valueOf=function(){return this.value},Fa.prototype.toString=function(){return this.value+""},Fa.prototype.toJSON=function(){return this.value},Fa.prototype.peek=function(){var n=Ue;Ue=void 0;try{return this.value}finally{Ue=n}},Object.defineProperty(Fa.prototype,"value",{get:function(){var n=F4(this);return n!==void 0&&(n.i=this.i),this.v},set:function(n){if(n!==this.v){if(sv>100)throw new Error("Cycle detected");this.v=n,this.i++,F1++,ah++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{iv()}}}});function kD(n,t){return new Fa(n,t)}function k4(n){for(var t=n.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function I4(n){for(var t=n.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){n.s=t;break}}}function W4(n){for(var t=n.s,i=void 0;t!==void 0;){var s=t.p;t.i===-1?(t.S.U(t),s!==void 0&&(s.n=t.n),t.n!==void 0&&(t.n.p=s)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=s}n.s=i}function ih(n,t){Fa.call(this,void 0),this.x=n,this.s=void 0,this.g=F1-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}ih.prototype=new Fa,ih.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===F1))return!0;if(this.g=F1,this.f|=1,this.i>0&&!k4(this))return this.f&=-2,!0;var n=Ue;try{I4(this),Ue=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return Ue=n,W4(this),this.f&=-2,!0},ih.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Fa.prototype.S.call(this,n)},ih.prototype.U=function(n){if(this.t!==void 0&&(Fa.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},ih.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(ih.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var n=F4(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}});function $4(n){var t=n.u;if(n.u=void 0,typeof t=="function"){ah++;var i=Ue;Ue=void 0;try{t()}catch(s){throw n.f&=-2,n.f|=8,lv(n),s}finally{Ue=i,iv()}}}function lv(n){for(var t=n.s;t!==void 0;t=t.n)t.S.U(t);n.x=void 0,n.s=void 0,$4(n)}function ID(n){if(Ue!==this)throw new Error("Out-of-order effect");W4(this),Ue=n,this.f&=-2,8&this.f&&lv(this),iv()}function sh(n,t){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t?.name}sh.prototype.c=function(){var n=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{n()}},sh.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,$4(this),I4(this),ah++;var n=Ue;return Ue=this,ID.bind(this,n)},sh.prototype.N=function(){2&this.f||(this.f|=2,this.o=t0,t0=this)},sh.prototype.d=function(){this.f|=8,1&this.f||lv(this)},sh.prototype.dispose=function(){this.d()};function rv(n,t){var i=new sh(n,t);try{i.c()}catch(u){throw i.d(),u}var s=i.d.bind(i);return s[Symbol.dispose]=s,s}var ov={exports:{}},uv={},t6;function WD(){if(t6)return uv;t6=1;var n=H;function t(_,x){return _===x&&(_!==0||1/_===1/x)||_!==_&&x!==x}var i=typeof Object.is=="function"?Object.is:t,s=n.useState,u=n.useEffect,c=n.useLayoutEffect,f=n.useDebugValue;function p(_,x){var D=x(),A=s({inst:{value:D,getSnapshot:x}}),N=A[0].inst,R=A[1];return c(function(){N.value=D,N.getSnapshot=x,m(N)&&R({inst:N})},[_,D,x]),u(function(){return m(N)&&R({inst:N}),_(function(){m(N)&&R({inst:N})})},[_]),f(D),D}function m(_){var x=_.getSnapshot;_=_.value;try{var D=x();return!i(_,D)}catch{return!0}}function S(_,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:p;return uv.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,uv}var e6={},n6;function $D(){return n6||(n6=1,process.env.NODE_ENV!=="production"&&(function(){function n(D,A){return D===A&&(D!==0||1/D===1/A)||D!==D&&A!==A}function t(D,A){b||u.startTransition===void 0||(b=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var N=A();if(!_){var R=A();c(N,R)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_=!0)}R=f({inst:{value:N,getSnapshot:A}});var O=R[0].inst,U=R[1];return m(function(){O.value=N,O.getSnapshot=A,i(O)&&U({inst:O})},[D,N,A]),p(function(){return i(O)&&U({inst:O}),D(function(){i(O)&&U({inst:O})})},[D]),S(N),N}function i(D){var A=D.getSnapshot;D=D.value;try{var N=A();return!c(D,N)}catch{return!0}}function s(D,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u=H,c=typeof Object.is=="function"?Object.is:n,f=u.useState,p=u.useEffect,m=u.useLayoutEffect,S=u.useDebugValue,b=!1,_=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;e6.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),e6}var a6;function tA(){return a6||(a6=1,process.env.NODE_ENV==="production"?ov.exports=WD():ov.exports=$D()),ov.exports}var eA=tA(),nA=H.version.split(".").map(Number)[0],i6=[],aA=Symbol.for(nA>=19?"react.transitional.element":"react.element"),pc,s6=Symbol.dispose||Symbol.for("Symbol.dispose");function cv(n,t){var i=t.effect.S();return pc=t,iA.bind(t,n,i)}function iA(n,t){t(),pc=n}var l6,fv,r6=function(){},sA=((l6={o:0,effect:{s:void 0,c:function(){},S:function(){return r6},d:function(){}},subscribe:function(){return r6},getSnapshot:function(){return 0},S:function(){},f:function(){}})[s6]=function(){},l6),lA=Promise.prototype.then.bind(Promise.resolve());function rA(){fv||(fv=lA(oA))}function oA(){var n;fv=void 0,(n=pc)==null||n.f()}function uA(n){rA();var t=H.useRef();t.current==null&&(typeof window>"u"?t.current=sA:t.current=(function(s){var u,c,f,p,m=0,S=rv(function(){c=this});return c.c=function(){m=m+1|0,p&&p()},(u={o:s,effect:c,subscribe:function(b){return p=b,function(){m=m+1|0,p=void 0,S()}},getSnapshot:function(){return m},S:function(){if(pc!=null){var b=pc.o,_=this.o;b==0&&_==0||b==0&&_==1?(pc.f(),f=cv(void 0,this)):b==1&&_==0||b==2&&_==0||(f=cv(pc,this))}else f=cv(void 0,this)},f:function(){var b=f;f=void 0,b?.()}})[s6]=function(){this.f()},u})(n));var i=t.current;return eA.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot),i.S(),i}Object.defineProperties(Fa.prototype,{$$typeof:{configurable:!0,value:aA},type:{configurable:!0,value:function(n){var t=n.data,i=uA(1);try{return t.value}finally{i.f()}}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});function Ko(n,t){return H.useMemo(function(){return kD(n,t)},i6)}function lh(n,t){var i=H.useRef(n);i.current=n,H.useEffect(function(){return rv(function(){return i.current()},t)},i6)}const o6=H.createContext(void 0),u6=()=>H.useContext(o6),cA=(n,t)=>{const{name:i,value:s,checked:u=!1,partial:c=!1,readOnly:f=!1,onChange:p,children:m,className:S}=n,[b,_]=H.useState(i),[x,D]=H.useState(f),A=H.useRef(void 0),N=H.useRef(void 0),R=H.useRef(void 0),O=H.useRef(void 0),U=H.useRef(void 0),j=H.useRef(void 0),V=u6(),F=J1(),$=H.useId(),st=H.useMemo(()=>F?.sharedId||n.id||$,[F?.sharedId,n.id,$]),[I,et,nt]=ZD({checked:!1,partial:!1}),bt=Q4(u),lt=Q4(c);H.useEffect(()=>{if(I.initial)et({checked:c?!1:u,partial:c});else{const Z=bt.changed?u:I.value.checked,K=lt.changed?c:I.value.partial;et({checked:K?!1:Z,partial:K})}},[u,c]),H.useEffect(()=>{D(f)},[f]),H.useEffect(()=>{V&&(A.current=V.nameSignal,N.current=V.valueSignal,R.current=V.readOnlySignal,O.current=V.useComparator,U.current=V.compare,j.current=V.onCheckboxChange)},[V]),lh(()=>{if(N.current)if(O.current?.value&&U.current){const Z=U.current,K=N.current.value?.some(at=>Z(s,at))??!1;et(at=>({...at,checked:K}))}else{const Z=N.current.value?.some(K=>s===K)??!1;et(K=>({...K,checked:Z}))}}),lh(()=>{A.current&&_(A.current.value)}),lh(()=>{R.current&&D(R.current.value??!1)});const dt=Wp(Z=>{const K=nt.current?.value.partial===!0?!0:Z.target.checked;et({checked:K,partial:!1}),j.current?j.current({originalEvent:Z,name:b,value:s,checked:K}):p?.({originalEvent:Z,name:b,value:s,checked:K})}),pt=Z=>{const K={checked:Z?!1:nt.current?.value.checked??!1,partial:Z};et(K)},tt=Z=>{et({checked:Z,partial:!1})};H.useImperativeHandle(t,()=>({setPartiallyChecked:pt,setChecked:tt}));const w=b&&Ja.jsx(av,{id:st,name:b,type:"checkbox",checked:I.value.checked,readOnly:x,onChange:dt});return $p({wrapperElement:"label",renderProps:{...I.value,readOnly:x},elementProps:{htmlFor:st},className:S,innerWrapperElement:w,children:m})},c6=H.memo(H.forwardRef(cA)),fA=(n,t)=>n&&t&&typeof n=="object"&&typeof t=="object"&&"value"in n&&"value"in t?n.value===t.value:n===t,f6=(n=fA)=>Wp((t,i)=>{if(typeof n=="string"){const s=n;return t?.[s]===i?.[s]}return n(t,i)}),h6=({props:n,children:t})=>Ja.jsx(o6.Provider,{value:n,children:t}),hA=({name:n,value:t,comparator:i,readOnly:s=!1,onChange:u,className:c,children:f})=>{const p=Ko(),m=Ko(),S=Ko(),b=Ko(),_=f6(i),x=Wp(A=>{if(A){const{checked:N}=A,R=A.value;if(m.value)if(i)if(N)m.value.findIndex(O=>_(R,O))===-1&&m.value.push(R);else{const O=m.value.filter(U=>!_(R,U));m.value=[...O]}else if(N)m.value.indexOf(R)===-1&&m.value.push(R);else{const O=m.value.filter(U=>U!==R);m.value=[...O]}else N&&(m.value=[R])}u?.({originalEvent:A?.originalEvent,name:n,value:m.value})}),D=H.useMemo(()=>({nameSignal:p,valueSignal:m,readOnlySignal:S,useComparator:b,compare:_,onCheckboxChange:x}),[]);return H.useEffect(()=>{p.value=n},[n]),H.useEffect(()=>{m.value=t},[t]),H.useEffect(()=>{S.value=s},[s]),H.useEffect(()=>{b.value=i!==void 0},[i]),Ja.jsx("div",{className:c,children:Ja.jsx(h6,{props:D,children:f})})},d6=H.memo(hA),rh=({className:n,children:t})=>{const i=H.useId(),s=H.useMemo(()=>({sharedId:i}),[i]),u=Ja.jsx(Z4.Provider,{value:s,children:t});return $p({wrapperElement:"div",className:n,children:u})},dA=({htmlFor:n,className:t,children:i})=>{const s=J1(),u=H.useMemo(()=>s?.sharedId||n,[s?.sharedId,n]);return $p({wrapperElement:"label",elementProps:{htmlFor:u},className:t,children:i})};var p6={exports:{}},m6;function pA(){return m6||(m6=1,(function(n){(function(){var t={}.hasOwnProperty;function i(){for(var c="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(c=u(c,s(p)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var p in c)t.call(c,p)&&c[p]&&(f=u(f,p));return f}function u(c,f){return f?c?c+" "+f:c+f:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(p6)),p6.exports}pA();const mA=({intersectionObserver:n,resizeObserver:t,page:i,height:s,children:u})=>{const c=H.useRef(void 0);H.useEffect(()=>()=>{c.current&&(n?.unobserve(c.current),t?.unobserve(c.current))},[]),H.useEffect(()=>(c.current&&n?.observe(c.current),()=>{c.current&&n&&n.unobserve(c.current)}),[n]);const f=m=>{c.current&&(n?.unobserve(c.current),t?.unobserve(c.current)),n?.observe(m),t?.observe(m),c.current=m},p=s?{height:`${s}px`}:{};return Ja.jsx("div",{"data-page":i,"data-name":"page",style:p,ref:m=>{m&&f(m)},children:u})};H.memo(mA);const gA=({intersectionObserver:n,page:t})=>{const i=H.useRef(void 0);H.useEffect(()=>()=>{i.current&&n?.unobserve(i.current)},[]);const s=u=>{i.current&&n?.unobserve(i.current),n?.observe(u),i.current=u};return Ja.jsx("div",{"data-page":t,"data-name":"marker",ref:u=>{u&&s(u)}})};H.memo(gA);const yA=({name:n,value:t,comparator:i,readOnly:s=!1,onChange:u,className:c,children:f})=>{const p=Ko(),m=Ko(),S=Ko(),b=Ko(),_=f6(i),x=H.useMemo(()=>({nameSignal:p,valueSignal:m,readOnlySignal:S,useComparator:b,compare:_}),[]);H.useEffect(()=>{p.value=n},[n]),H.useEffect(()=>{m.value=t},[t]),H.useEffect(()=>{S.value=s},[s]),H.useEffect(()=>{b.value=i!==void 0},[i]);const D=Wp(A=>{u?.({originalEvent:A,name:n,value:m.value})});return Ja.jsx("div",{className:c,onChange:D,children:Ja.jsx(h6,{props:x,children:f})})},g6=H.memo(yA),vA=({value:n,className:t,children:i})=>{const[s,u]=H.useState(),[c,f]=H.useState(!1),[p,m]=H.useState(!1),S=H.useRef(void 0),b=H.useRef(void 0),_=H.useRef(void 0),x=H.useRef(void 0),D=H.useRef(void 0),A=u6(),N=J1(),R=H.useId(),O=H.useMemo(()=>N?.sharedId||R,[N?.sharedId,R]);H.useEffect(()=>{A&&(S.current=A.nameSignal,b.current=A.valueSignal,_.current=A.readOnlySignal,x.current=A.useComparator,D.current=A.compare)},[A]),lh(()=>{x&&b.current&&D.current?f(D.current(n,b.current.value)):f(n===b.current?.value)}),lh(()=>{u(S.current?.value)}),lh(()=>{m(_.current?.value??!1)});const U=Wp(j=>{j.target.checked&&b.current&&(b.current.value=n)});return $p({wrapperElement:"label",renderProps:{checked:c,readOnly:p},elementProps:{htmlFor:O},className:t,innerWrapperElement:s?Ja.jsx(av,{id:O,name:s,type:"radio",value:n,checked:c,readOnly:p,onChange:U}):null,children:i})},y6=H.memo(vA),SA=(n,t)=>{const{id:i,name:s,value:u,toggled:c=!1,readOnly:f,onChange:p,children:m,className:S}=n,[b,_]=H.useState(c),x=J1(),D=H.useId(),A=H.useMemo(()=>x?.sharedId||i||D,[x?.sharedId,i,D]);H.useEffect(()=>{_(c)},[c]);const N=O=>{_(O.target.checked),p?.({originalEvent:O,name:s,value:u,checked:O.target.checked})},R=O=>{_(O)};return H.useImperativeHandle(t,()=>({setToggled:R})),$p({wrapperElement:"label",renderProps:{toggled:b,readOnly:f},elementProps:{htmlFor:A},className:S,innerWrapperElement:Ja.jsx(av,{id:A,name:s,type:"checkbox",checked:b,readOnly:f,onChange:N}),children:m})},bA=H.memo(H.forwardRef(SA)),hv=n=>{const[t,i]=H.useState(!0),s=j4();return H.useEffect(()=>{s&&s.useAnimations!==void 0?i(s.useAnimations):n!==void 0&&i(n)},[s,n]),t},wr=({label:n,htmlFor:t,readOnly:i=!1,className:s})=>{const u=Se("bc-label",{"bsc:text-black bsc:dark:text-mono-light-1":!i,"bc-read-only bsc:text-gray-4 bsc:dark:text-mono-light-3 bsc:pointer-events-none":i},s);return X.jsx(dA,{htmlFor:t,className:u,children:n})},EA=(n,t)=>{const{name:i,label:s,value:u,readOnly:c=!1,checked:f=!1,partial:p=!1,labelLocation:m=Es.Right,className:S,useAnimation:b,onChange:_}=n,x=hv(b),D=Se("bc-checkbox-wrapper bsc:flex bsc:items-center bsc:group/wrapper bsc:*:cursor-pointer bsc:has-data-read-only:text-gray-4 bsc:dark:has-data-read-only:text-mono-light-3 bsc:has-data-read-only:pointer-events-none",S),A=Se("bc-checkbox-label bsc:peer-data-read-only:text-gray-4 bsc:dark:peer-data-read-only:text-mono-light-3",{"bsc:ml-2":m===Es.Right,"bsc:mr-2":m===Es.Left}),N=kp(nh.FocusWithin),R=Se("bc-checkbox-outer bsc:group/checkbox bsc:peer bsc:rounded bsc:*:block bsc:*:size-[21px]","bsc:inset-shadow-[0_0_0_1px] bsc:inset-shadow-gray-2 bsc:dark:inset-shadow-[0_0_0_1px] bsc:dark:inset-shadow-mono-light-2","bsc:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:group-hover/wrapper:not-data-checked:inset-shadow-gray-4","bsc:dark:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:[transition:box-shadow_0.3s]",N),O=Se("bc-checkbox-svg bsc:rounded bsc:stroke-mono-light-1 bsc:stroke-2 bsc:[stroke-linecap:round]","bsc:[stroke-linejoin:round] bsc:dark:stroke-mono-dark-3 bsc:[transform:scale(0)]","bsc:group-data-checked/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-checked/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:fill-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:fill-mono-light-3","bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:bg-primary-1 bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:fill-primary-1 bsc:group-data-partial/checkbox:bg-primary-1 bsc:group-data-partial/checkbox:fill-primary-1 bsc:dark:group-data-checked/checkbox:bg-mono-light-1 bsc:dark:group-data-checked/checkbox:fill-mono-light-1 bsc:dark:group-data-partial/checkbox:bg-mono-light-1 bsc:dark:group-data-partial/checkbox:fill-mono-light-1",{"bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-partial/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-checked/checkbox:group-data-read-only/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:group-data-read-only/checkbox:[transform:scale(1)]":x,"bsc:group-data-checked/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:[transform:scale(1)]":!x});return X.jsxs(rh,{className:D,children:[s&&m===Es.Left&&X.jsx(wr,{label:s,readOnly:c,className:A}),X.jsx(c6,{ref:t,name:i,value:u,checked:f,partial:p,readOnly:c,className:R,onChange:_,children:X.jsxs("svg",{viewBox:"0 0 21 21",className:O,children:[X.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),X.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),s&&m===Es.Right&&X.jsx(wr,{label:s,readOnly:c,className:A})]})},v6=H.memo(H.forwardRef(EA)),TA=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,orientation:p=Za.Vertical,className:m,onChange:S})=>{const[b,_]=H.useState([]),x=tv(()=>s,[s]);H.useEffect(()=>{_(i??[])},[i]);const D=U=>{if(U){const{value:j}=U;_(j??[]),S?.({name:n,value:j})}},A=(U,j)=>X.jsx(v6,{label:U[u],value:U[c],className:"bsc:mr-3"},`${n}_checkbox_${j}`),N=Se("bsc:flex bsc:flex-col bsc:gap-1",m),R=Se("bsc:flex bsc:gap-1",{"bsc:flex-col":p===Za.Vertical}),O=U=>X.jsx(d6,{name:n,value:b,readOnly:f,onChange:D,className:R,children:U.map(A)});return X.jsxs("div",{className:N,children:[t&&X.jsx(wr,{label:t,readOnly:f}),x&&O(x)]})},CA=H.memo(TA);var S6=typeof global=="object"&&global&&global.Object===Object&&global,_A=typeof self=="object"&&self&&self.Object===Object&&self,rl=S6||_A||Function("return this")(),oh=rl.Symbol,b6=Object.prototype,xA=b6.hasOwnProperty,DA=b6.toString,e0=oh?oh.toStringTag:void 0;function AA(n){var t=xA.call(n,e0),i=n[e0];try{n[e0]=void 0;var s=!0}catch{}var u=DA.call(n);return s&&(t?n[e0]=i:delete n[e0]),u}var MA=Object.prototype,NA=MA.toString;function OA(n){return NA.call(n)}var RA="[object Null]",zA="[object Undefined]",E6=oh?oh.toStringTag:void 0;function uh(n){return n==null?n===void 0?zA:RA:E6&&E6 in Object(n)?AA(n):OA(n)}function ch(n){return n!=null&&typeof n=="object"}var HA="[object Symbol]";function wA(n){return typeof n=="symbol"||ch(n)&&uh(n)==HA}var dv=Array.isArray,UA=/\s/;function BA(n){for(var t=n.length;t--&&UA.test(n.charAt(t)););return t}var VA=/^\s+/;function GA(n){return n&&n.slice(0,BA(n)+1).replace(VA,"")}function Qo(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}var T6=NaN,jA=/^[-+]0x[0-9a-f]+$/i,LA=/^0b[01]+$/i,PA=/^0o[0-7]+$/i,YA=parseInt;function C6(n){if(typeof n=="number")return n;if(wA(n))return T6;if(Qo(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Qo(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=GA(n);var i=LA.test(n);return i||PA.test(n)?YA(n.slice(2),i?2:8):jA.test(n)?T6:+n}var qA="[object AsyncFunction]",XA="[object Function]",KA="[object GeneratorFunction]",QA="[object Proxy]";function _6(n){if(!Qo(n))return!1;var t=uh(n);return t==XA||t==KA||t==qA||t==QA}var pv=rl["__core-js_shared__"],x6=(function(){var n=/[^.]+$/.exec(pv&&pv.keys&&pv.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function ZA(n){return!!x6&&x6 in n}var JA=Function.prototype,FA=JA.toString;function mc(n){if(n!=null){try{return FA.call(n)}catch{}try{return n+""}catch{}}return""}var kA=/[\\^$.*+?()[\]{}|]/g,IA=/^\[object .+?Constructor\]$/,WA=Function.prototype,$A=Object.prototype,tM=WA.toString,eM=$A.hasOwnProperty,nM=RegExp("^"+tM.call(eM).replace(kA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function aM(n){if(!Qo(n)||ZA(n))return!1;var t=_6(n)?nM:IA;return t.test(mc(n))}function iM(n,t){return n?.[t]}function gc(n,t){var i=iM(n,t);return aM(i)?i:void 0}var mv=gc(rl,"WeakMap"),D6=Object.create,sM=(function(){function n(){}return function(t){if(!Qo(t))return{};if(D6)return D6(t);n.prototype=t;var i=new n;return n.prototype=void 0,i}})(),A6=(function(){try{var n=gc(Object,"defineProperty");return n({},"",{}),n}catch{}})();function lM(n,t){for(var i=-1,s=n==null?0:n.length;++i<s&&t(n[i],i,n)!==!1;);return n}var rM=9007199254740991,oM=/^(?:0|[1-9]\d*)$/;function uM(n,t){var i=typeof n;return t=t??rM,!!t&&(i=="number"||i!="symbol"&&oM.test(n))&&n>-1&&n%1==0&&n<t}function cM(n,t,i){t=="__proto__"&&A6?A6(n,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[t]=i}function M6(n,t){return n===t||n!==n&&t!==t}var fM=Object.prototype,hM=fM.hasOwnProperty;function dM(n,t,i){var s=n[t];(!(hM.call(n,t)&&M6(s,i))||i===void 0&&!(t in n))&&cM(n,t,i)}var pM=9007199254740991;function N6(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=pM}function mM(n){return n!=null&&N6(n.length)&&!_6(n)}var gM=Object.prototype;function O6(n){var t=n&&n.constructor,i=typeof t=="function"&&t.prototype||gM;return n===i}function yM(n,t){for(var i=-1,s=Array(n);++i<n;)s[i]=t(i);return s}var vM="[object Arguments]";function R6(n){return ch(n)&&uh(n)==vM}var z6=Object.prototype,SM=z6.hasOwnProperty,bM=z6.propertyIsEnumerable,EM=R6((function(){return arguments})())?R6:function(n){return ch(n)&&SM.call(n,"callee")&&!bM.call(n,"callee")};function TM(){return!1}var H6=typeof $t=="object"&&$t&&!$t.nodeType&&$t,w6=H6&&typeof module=="object"&&module&&!module.nodeType&&module,CM=w6&&w6.exports===H6,U6=CM?rl.Buffer:void 0,_M=U6?U6.isBuffer:void 0,B6=_M||TM,xM="[object Arguments]",DM="[object Array]",AM="[object Boolean]",MM="[object Date]",NM="[object Error]",OM="[object Function]",RM="[object Map]",zM="[object Number]",HM="[object Object]",wM="[object RegExp]",UM="[object Set]",BM="[object String]",VM="[object WeakMap]",GM="[object ArrayBuffer]",jM="[object DataView]",LM="[object Float32Array]",PM="[object Float64Array]",YM="[object Int8Array]",qM="[object Int16Array]",XM="[object Int32Array]",KM="[object Uint8Array]",QM="[object Uint8ClampedArray]",ZM="[object Uint16Array]",JM="[object Uint32Array]",sn={};sn[LM]=sn[PM]=sn[YM]=sn[qM]=sn[XM]=sn[KM]=sn[QM]=sn[ZM]=sn[JM]=!0,sn[xM]=sn[DM]=sn[GM]=sn[AM]=sn[jM]=sn[MM]=sn[NM]=sn[OM]=sn[RM]=sn[zM]=sn[HM]=sn[wM]=sn[UM]=sn[BM]=sn[VM]=!1;function FM(n){return ch(n)&&N6(n.length)&&!!sn[uh(n)]}function gv(n){return function(t){return n(t)}}var V6=typeof $t=="object"&&$t&&!$t.nodeType&&$t,n0=V6&&typeof module=="object"&&module&&!module.nodeType&&module,kM=n0&&n0.exports===V6,yv=kM&&S6.process,fh=(function(){try{var n=n0&&n0.require&&n0.require("util").types;return n||yv&&yv.binding&&yv.binding("util")}catch{}})(),G6=fh&&fh.isTypedArray,IM=G6?gv(G6):FM,WM=Object.prototype,$M=WM.hasOwnProperty;function tN(n,t){var i=dv(n),s=!i&&EM(n),u=!i&&!s&&B6(n),c=!i&&!s&&!u&&IM(n),f=i||s||u||c,p=f?yM(n.length,String):[],m=p.length;for(var S in n)$M.call(n,S)&&!(f&&(S=="length"||u&&(S=="offset"||S=="parent")||c&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||uM(S,m)))&&p.push(S);return p}function j6(n,t){return function(i){return n(t(i))}}var eN=j6(Object.keys,Object),nN=Object.prototype,aN=nN.hasOwnProperty;function iN(n){if(!O6(n))return eN(n);var t=[];for(var i in Object(n))aN.call(n,i)&&i!="constructor"&&t.push(i);return t}function sN(n){return mM(n)?tN(n):iN(n)}var a0=gc(Object,"create");function lN(){this.__data__=a0?a0(null):{},this.size=0}function rN(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}var oN="__lodash_hash_undefined__",uN=Object.prototype,cN=uN.hasOwnProperty;function fN(n){var t=this.__data__;if(a0){var i=t[n];return i===oN?void 0:i}return cN.call(t,n)?t[n]:void 0}var hN=Object.prototype,dN=hN.hasOwnProperty;function pN(n){var t=this.__data__;return a0?t[n]!==void 0:dN.call(t,n)}var mN="__lodash_hash_undefined__";function gN(n,t){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=a0&&t===void 0?mN:t,this}function yc(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}yc.prototype.clear=lN,yc.prototype.delete=rN,yc.prototype.get=fN,yc.prototype.has=pN,yc.prototype.set=gN;function yN(){this.__data__=[],this.size=0}function k1(n,t){for(var i=n.length;i--;)if(M6(n[i][0],t))return i;return-1}var vN=Array.prototype,SN=vN.splice;function bN(n){var t=this.__data__,i=k1(t,n);if(i<0)return!1;var s=t.length-1;return i==s?t.pop():SN.call(t,i,1),--this.size,!0}function EN(n){var t=this.__data__,i=k1(t,n);return i<0?void 0:t[i][1]}function TN(n){return k1(this.__data__,n)>-1}function CN(n,t){var i=this.__data__,s=k1(i,n);return s<0?(++this.size,i.push([n,t])):i[s][1]=t,this}function Ur(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}Ur.prototype.clear=yN,Ur.prototype.delete=bN,Ur.prototype.get=EN,Ur.prototype.has=TN,Ur.prototype.set=CN;var i0=gc(rl,"Map");function _N(){this.size=0,this.__data__={hash:new yc,map:new(i0||Ur),string:new yc}}function xN(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function I1(n,t){var i=n.__data__;return xN(t)?i[typeof t=="string"?"string":"hash"]:i.map}function DN(n){var t=I1(this,n).delete(n);return this.size-=t?1:0,t}function AN(n){return I1(this,n).get(n)}function MN(n){return I1(this,n).has(n)}function NN(n,t){var i=I1(this,n),s=i.size;return i.set(n,t),this.size+=i.size==s?0:1,this}function hh(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}hh.prototype.clear=_N,hh.prototype.delete=DN,hh.prototype.get=AN,hh.prototype.has=MN,hh.prototype.set=NN;function ON(n,t){for(var i=-1,s=t.length,u=n.length;++i<s;)n[u+i]=t[i];return n}var RN=j6(Object.getPrototypeOf,Object);function zN(){this.__data__=new Ur,this.size=0}function HN(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}function wN(n){return this.__data__.get(n)}function UN(n){return this.__data__.has(n)}var BN=200;function VN(n,t){var i=this.__data__;if(i instanceof Ur){var s=i.__data__;if(!i0||s.length<BN-1)return s.push([n,t]),this.size=++i.size,this;i=this.__data__=new hh(s)}return i.set(n,t),this.size=i.size,this}function dh(n){var t=this.__data__=new Ur(n);this.size=t.size}dh.prototype.clear=zN,dh.prototype.delete=HN,dh.prototype.get=wN,dh.prototype.has=UN,dh.prototype.set=VN;var L6=typeof $t=="object"&&$t&&!$t.nodeType&&$t,P6=L6&&typeof module=="object"&&module&&!module.nodeType&&module,GN=P6&&P6.exports===L6,Y6=GN?rl.Buffer:void 0;Y6&&Y6.allocUnsafe;function jN(n,t){return n.slice()}function LN(n,t){for(var i=-1,s=n==null?0:n.length,u=0,c=[];++i<s;){var f=n[i];t(f,i,n)&&(c[u++]=f)}return c}function PN(){return[]}var YN=Object.prototype,qN=YN.propertyIsEnumerable,q6=Object.getOwnPropertySymbols,XN=q6?function(n){return n==null?[]:(n=Object(n),LN(q6(n),function(t){return qN.call(n,t)}))}:PN;function KN(n,t,i){var s=t(n);return dv(n)?s:ON(s,i(n))}function QN(n){return KN(n,sN,XN)}var vv=gc(rl,"DataView"),Sv=gc(rl,"Promise"),bv=gc(rl,"Set"),X6="[object Map]",ZN="[object Object]",K6="[object Promise]",Q6="[object Set]",Z6="[object WeakMap]",J6="[object DataView]",JN=mc(vv),FN=mc(i0),kN=mc(Sv),IN=mc(bv),WN=mc(mv),Br=uh;(vv&&Br(new vv(new ArrayBuffer(1)))!=J6||i0&&Br(new i0)!=X6||Sv&&Br(Sv.resolve())!=K6||bv&&Br(new bv)!=Q6||mv&&Br(new mv)!=Z6)&&(Br=function(n){var t=uh(n),i=t==ZN?n.constructor:void 0,s=i?mc(i):"";if(s)switch(s){case JN:return J6;case FN:return X6;case kN:return K6;case IN:return Q6;case WN:return Z6}return t});var $N=Object.prototype,tO=$N.hasOwnProperty;function eO(n){var t=n.length,i=new n.constructor(t);return t&&typeof n[0]=="string"&&tO.call(n,"index")&&(i.index=n.index,i.input=n.input),i}var F6=rl.Uint8Array;function Ev(n){var t=new n.constructor(n.byteLength);return new F6(t).set(new F6(n)),t}function nO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.byteLength)}var aO=/\w*$/;function iO(n){var t=new n.constructor(n.source,aO.exec(n));return t.lastIndex=n.lastIndex,t}var k6=oh?oh.prototype:void 0,I6=k6?k6.valueOf:void 0;function sO(n){return I6?Object(I6.call(n)):{}}function lO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.length)}var rO="[object Boolean]",oO="[object Date]",uO="[object Map]",cO="[object Number]",fO="[object RegExp]",hO="[object Set]",dO="[object String]",pO="[object Symbol]",mO="[object ArrayBuffer]",gO="[object DataView]",yO="[object Float32Array]",vO="[object Float64Array]",SO="[object Int8Array]",bO="[object Int16Array]",EO="[object Int32Array]",TO="[object Uint8Array]",CO="[object Uint8ClampedArray]",_O="[object Uint16Array]",xO="[object Uint32Array]";function DO(n,t,i){var s=n.constructor;switch(t){case mO:return Ev(n);case rO:case oO:return new s(+n);case gO:return nO(n);case yO:case vO:case SO:case bO:case EO:case TO:case CO:case _O:case xO:return lO(n);case uO:return new s;case cO:case dO:return new s(n);case fO:return iO(n);case hO:return new s;case pO:return sO(n)}}function AO(n){return typeof n.constructor=="function"&&!O6(n)?sM(RN(n)):{}}var MO="[object Map]";function NO(n){return ch(n)&&Br(n)==MO}var W6=fh&&fh.isMap,OO=W6?gv(W6):NO,RO="[object Set]";function zO(n){return ch(n)&&Br(n)==RO}var $6=fh&&fh.isSet,HO=$6?gv($6):zO,tb="[object Arguments]",wO="[object Array]",UO="[object Boolean]",BO="[object Date]",VO="[object Error]",eb="[object Function]",GO="[object GeneratorFunction]",jO="[object Map]",LO="[object Number]",nb="[object Object]",PO="[object RegExp]",YO="[object Set]",qO="[object String]",XO="[object Symbol]",KO="[object WeakMap]",QO="[object ArrayBuffer]",ZO="[object DataView]",JO="[object Float32Array]",FO="[object Float64Array]",kO="[object Int8Array]",IO="[object Int16Array]",WO="[object Int32Array]",$O="[object Uint8Array]",tR="[object Uint8ClampedArray]",eR="[object Uint16Array]",nR="[object Uint32Array]",Je={};Je[tb]=Je[wO]=Je[QO]=Je[ZO]=Je[UO]=Je[BO]=Je[JO]=Je[FO]=Je[kO]=Je[IO]=Je[WO]=Je[jO]=Je[LO]=Je[nb]=Je[PO]=Je[YO]=Je[qO]=Je[XO]=Je[$O]=Je[tR]=Je[eR]=Je[nR]=!0,Je[VO]=Je[eb]=Je[KO]=!1;function W1(n,t,i,s,u,c){var f;if(f!==void 0)return f;if(!Qo(n))return n;var p=dv(n);if(p)f=eO(n);else{var m=Br(n),S=m==eb||m==GO;if(B6(n))return jN(n);if(m==nb||m==tb||S&&!u)f=S?{}:AO(n);else{if(!Je[m])return u?n:{};f=DO(n,m)}}c||(c=new dh);var b=c.get(n);if(b)return b;c.set(n,f),HO(n)?n.forEach(function(D){f.add(W1(D,t,i,D,n,c))}):OO(n)&&n.forEach(function(D,A){f.set(A,W1(D,t,i,A,n,c))});var _=QN,x=p?void 0:_(n);return lM(x||n,function(D,A){x&&(A=D,D=n[A]),dM(f,A,W1(D,t,i,A,n,c))}),f}var aR=1,iR=4;function sR(n){return W1(n,aR|iR)}var Tv=function(){return rl.Date.now()},lR="Expected a function",rR=Math.max,oR=Math.min;function s0(n,t,i){var s,u,c,f,p,m,S=0,b=!1,_=!1,x=!0;if(typeof n!="function")throw new TypeError(lR);t=C6(t)||0,Qo(i)&&(b=!!i.leading,_="maxWait"in i,c=_?rR(C6(i.maxWait)||0,t):c,x="trailing"in i?!!i.trailing:x);function D($){var st=s,I=u;return s=u=void 0,S=$,f=n.apply(I,st),f}function A($){return S=$,p=setTimeout(O,t),b?D($):f}function N($){var st=$-m,I=$-S,et=t-st;return _?oR(et,c-I):et}function R($){var st=$-m,I=$-S;return m===void 0||st>=t||st<0||_&&I>=c}function O(){var $=Tv();if(R($))return U($);p=setTimeout(O,N($))}function U($){return p=void 0,x&&s?D($):(s=u=void 0,f)}function j(){p!==void 0&&clearTimeout(p),S=0,s=m=u=p=void 0}function V(){return p===void 0?f:U(Tv())}function F(){var $=Tv(),st=R($);if(s=arguments,u=this,m=$,st){if(p===void 0)return A(m);if(_)return clearTimeout(p),p=setTimeout(O,t),D(m)}return p===void 0&&(p=setTimeout(O,t)),f}return F.cancel=j,F.flush=V,F}var uR="Expected a function";function cR(n,t,i){var s=!0,u=!0;if(typeof n!="function")throw new TypeError(uR);return Qo(i)&&(s="leading"in i?!0:s,u="trailing"in i?!!i.trailing:u),s0(n,t,{leading:s,maxWait:t,trailing:u})}const fR=(n,t)=>{const{value:i,readOnly:s=!1,debounceTime:u=800,fillContainer:c=!0,leftElement:f,rightElement:p,className:m,leftElementClassName:S,rightElementClassName:b,isSingleLine:_=!0,allowSingleLineScroll:x=!1,inputMode:D,placeholder:A,onFocus:N,onBlur:R,onInput:O,onInnerTextChange:U,onInnerHTMLChange:j,onElementCreate:V,onLeftElementClick:F,onRightElementClick:$}=n,st=H.useRef("bsc:grow bsc:focus:outline-hidden"),I=H.useRef("bsc:text-gray-4"),et=H.useRef(void 0),nt=H.useCallback(Tt=>{const Pt=Tt.target,le=Pt.innerHTML;Pt.className=`${st.current}`,A&&le===A&&(Pt.innerHTML=""),N?.(Tt)},[A,N]),bt=H.useCallback(Tt=>{const Pt=Tt.target.innerHTML;if(A&&Pt===""){const le=Tt.target;le.innerHTML=A,le.className=`${st.current} ${I.current}`}R?.(Tt)},[A,R]),lt=H.useCallback(Tt=>{et.current?.removeEventListener("focus",nt),et.current?.removeEventListener("blur",bt),A&&Tt&&Tt!==document.activeElement&&Tt.innerHTML===""&&(Tt.innerHTML=A,Tt.className=`${st.current} ${I.current}`),Tt.addEventListener("focus",nt),Tt.addEventListener("blur",bt),et.current=Tt},[A]),dt=H.useCallback(Tt=>{V?.(Tt)},[V]),pt=Tt=>{F?.(Tt)},tt=Tt=>{$?.(Tt)},w=s0(Tt=>{O?.(Tt),U?.(Tt.target.innerText),j?.(Tt.target.innerHTML)},u),Z=H.useCallback(Tt=>{et.current&&(et.current.innerText=Tt)},[]),K=H.useCallback(Tt=>{et.current&&(et.current.innerHTML=Tt)},[]),at=H.useCallback(()=>{et.current?.focus()},[]);H.useImperativeHandle(t,()=>({inputElement:et.current,setInnerText:Z,setInnerHTML:K,focus:at}));const St=Se({"bsc:w-full ":c},"bsc:flex bsc:flex-row bsc:items-center bsc:shadow-sm bsc:border bsc:border-solid bsc:border-gray-3 bsc:dark:border-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:rounded-md bsc:p-2",{"bsc:overflow-x-auto bsc:overflow-y-hidden bsc:whitespace-pre":_&&x,"bsc:overflow-hidden bsc:whitespace-pre":_&&!x},m),W=Se("bsc:shrink",{"bsc:mr-2":f},S),gt=Se("bsc:shrink",{"bsc:ml-2":p},b);return X.jsxs("div",{className:St,ref:Tt=>{Tt&&dt(Tt)},children:[f&&X.jsx("div",{className:W,onClick:pt,children:f}),X.jsx("div",{ref:Tt=>{Tt&&lt(Tt)},className:st.current,contentEditable:!s,suppressContentEditableWarning:!0,inputMode:D,onInput:w,children:i}),p&&X.jsx("div",{className:gt,onClick:tt,children:p})]})},$1=H.forwardRef(fR);function Oe(n){const t=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&t==="[object Date]"?new n.constructor(+n):typeof n=="number"||t==="[object Number]"||typeof n=="string"||t==="[object String]"?new Date(n):new Date(NaN)}function Fe(n,t){return n instanceof Date?new n.constructor(t):new Date(t)}function ph(n,t){const i=Oe(n);return isNaN(t)?Fe(n,NaN):(t&&i.setDate(i.getDate()+t),i)}function Zo(n,t){const i=Oe(n);if(isNaN(t))return Fe(n,NaN);if(!t)return i;const s=i.getDate(),u=Fe(n,i.getTime());u.setMonth(i.getMonth()+t+1,0);const c=u.getDate();return s>=c?u:(i.setFullYear(u.getFullYear(),u.getMonth(),s),i)}const ab=6048e5,Cv=6e4,_v=36e5,hR=1e3;let dR={};function l0(){return dR}function Jo(n,t){const i=l0(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,u=Oe(n),c=u.getDay(),f=(c<s?7:0)+c-s;return u.setDate(u.getDate()-f),u.setHours(0,0,0,0),u}function mh(n){return Jo(n,{weekStartsOn:1})}function pR(n){const t=Oe(n),i=t.getFullYear(),s=Fe(n,0);s.setFullYear(i+1,0,4),s.setHours(0,0,0,0);const u=mh(s),c=Fe(n,0);c.setFullYear(i,0,4),c.setHours(0,0,0,0);const f=mh(c);return t.getTime()>=u.getTime()?i+1:t.getTime()>=f.getTime()?i:i-1}function ib(n){const t=Oe(n);return t.setHours(0,0,0,0),t}function sb(n){const t=Oe(n),i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return i.setUTCFullYear(t.getFullYear()),+n-+i}function mR(n){const t=pR(n),i=Fe(n,0);return i.setFullYear(t,0,4),i.setHours(0,0,0,0),mh(i)}function r0(n,t){return Zo(n,t*12)}function lb(n,t){const i=ib(n),s=ib(t);return+i==+s}function gR(n){const t=Oe(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(23,59,59,999),t}function yR(n,t){const i=Oe(n.start),s=Oe(n.end);let u=+i>+s;const c=u?+i:+s,f=u?s:i;f.setHours(0,0,0,0);let p=1;const m=[];for(;+f<=c;)m.push(Oe(f)),f.setDate(f.getDate()+p),f.setHours(0,0,0,0);return u?m.reverse():m}function rb(n){const t=Oe(n);return t.setDate(1),t.setHours(0,0,0,0),t}function vR(n,t){const i=Oe(n.start),s=Oe(n.end);let u=+i>+s;const c=u?+i:+s,f=u?s:i;f.setHours(0,0,0,0),f.setMonth(0,1);let p=1;const m=[];for(;+f<=c;)m.push(Oe(f)),f.setFullYear(f.getFullYear()+p);return u?m.reverse():m}const SR={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bR=(n,t,i)=>{let s;const u=SR[n];return typeof u=="string"?s=u:t===1?s=u.one:s=u.other.replace("{{count}}",t.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s};function xv(n){return(t={})=>{const i=t.width?String(t.width):n.defaultWidth;return n.formats[i]||n.formats[n.defaultWidth]}}const ER={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},TR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},CR={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_R={date:xv({formats:ER,defaultWidth:"full"}),time:xv({formats:TR,defaultWidth:"full"}),dateTime:xv({formats:CR,defaultWidth:"full"})},xR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},DR=(n,t,i,s)=>xR[n];function o0(n){return(t,i)=>{const s=i?.context?String(i.context):"standalone";let u;if(s==="formatting"&&n.formattingValues){const f=n.defaultFormattingWidth||n.defaultWidth,p=i?.width?String(i.width):f;u=n.formattingValues[p]||n.formattingValues[f]}else{const f=n.defaultWidth,p=i?.width?String(i.width):n.defaultWidth;u=n.values[p]||n.values[f]}const c=n.argumentCallback?n.argumentCallback(t):t;return u[c]}}const AR={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},NR={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OR={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},RR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},zR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},HR={ordinalNumber:(n,t)=>{const i=Number(n),s=i%100;if(s>20||s<10)switch(s%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:o0({values:AR,defaultWidth:"wide"}),quarter:o0({values:MR,defaultWidth:"wide",argumentCallback:n=>n-1}),month:o0({values:NR,defaultWidth:"wide"}),day:o0({values:OR,defaultWidth:"wide"}),dayPeriod:o0({values:RR,defaultWidth:"wide",formattingValues:zR,defaultFormattingWidth:"wide"})};function u0(n){return(t,i={})=>{const s=i.width,u=s&&n.matchPatterns[s]||n.matchPatterns[n.defaultMatchWidth],c=t.match(u);if(!c)return null;const f=c[0],p=s&&n.parsePatterns[s]||n.parsePatterns[n.defaultParseWidth],m=Array.isArray(p)?UR(p,_=>_.test(f)):wR(p,_=>_.test(f));let S;S=n.valueCallback?n.valueCallback(m):m,S=i.valueCallback?i.valueCallback(S):S;const b=t.slice(f.length);return{value:S,rest:b}}}function wR(n,t){for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&t(n[i]))return i}function UR(n,t){for(let i=0;i<n.length;i++)if(t(n[i]))return i}function BR(n){return(t,i={})=>{const s=t.match(n.matchPattern);if(!s)return null;const u=s[0],c=t.match(n.parsePattern);if(!c)return null;let f=n.valueCallback?n.valueCallback(c[0]):c[0];f=i.valueCallback?i.valueCallback(f):f;const p=t.slice(u.length);return{value:f,rest:p}}}const VR=/^(\d+)(th|st|nd|rd)?/i,GR=/\d+/i,jR={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LR={any:[/^b/i,/^(a|c)/i]},PR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YR={any:[/1/i,/2/i,/3/i,/4/i]},qR={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},XR={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},KR={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},QR={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ZR={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},JR={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},FR={ordinalNumber:BR({matchPattern:VR,parsePattern:GR,valueCallback:n=>parseInt(n,10)}),era:u0({matchPatterns:jR,defaultMatchWidth:"wide",parsePatterns:LR,defaultParseWidth:"any"}),quarter:u0({matchPatterns:PR,defaultMatchWidth:"wide",parsePatterns:YR,defaultParseWidth:"any",valueCallback:n=>n+1}),month:u0({matchPatterns:qR,defaultMatchWidth:"wide",parsePatterns:XR,defaultParseWidth:"any"}),day:u0({matchPatterns:KR,defaultMatchWidth:"wide",parsePatterns:QR,defaultParseWidth:"any"}),dayPeriod:u0({matchPatterns:ZR,defaultMatchWidth:"any",parsePatterns:JR,defaultParseWidth:"any"})},kR={code:"en-US",formatDistance:bR,formatLong:_R,formatRelative:DR,localize:HR,match:FR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function IR(n){const t=Oe(n),i=+mh(t)-+mR(t);return Math.round(i/ab)+1}function ob(n,t){const i=Oe(n),s=i.getFullYear(),u=l0(),c=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,f=Fe(n,0);f.setFullYear(s+1,0,c),f.setHours(0,0,0,0);const p=Jo(f,t),m=Fe(n,0);m.setFullYear(s,0,c),m.setHours(0,0,0,0);const S=Jo(m,t);return i.getTime()>=p.getTime()?s+1:i.getTime()>=S.getTime()?s:s-1}function WR(n,t){const i=l0(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=ob(n,t),c=Fe(n,0);return c.setFullYear(u,0,s),c.setHours(0,0,0,0),Jo(c,t)}function $R(n,t){const i=Oe(n),s=+Jo(i,t)-+WR(i,t);return Math.round(s/ab)+1}const ub=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},cb=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},fb={p:cb,P:(n,t)=>{const i=n.match(/(P+)(p+)?/)||[],s=i[1],u=i[2];if(!u)return ub(n,t);let c;switch(s){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",ub(s,t)).replace("{{time}}",cb(u,t))}},tz=/^D+$/,ez=/^Y+$/,nz=["D","DD","YY","YYYY"];function az(n){return tz.test(n)}function iz(n){return ez.test(n)}function hb(n,t,i){const s=sz(n,t,i);if(console.warn(s),nz.includes(n))throw new RangeError(s)}function sz(n,t,i){const s=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${s} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Dv(n){return Oe(n).getDay()}function db(n){const t=Oe(n),i=t.getFullYear(),s=t.getMonth(),u=Fe(n,0);return u.setFullYear(i,s+1,0),u.setHours(0,0,0,0),u.getDate()}function lz(){return Object.assign({},l0())}function rz(n){let i=Oe(n).getDay();return i===0&&(i=7),i}function oz(n){const t=Oe(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(0,0,0,0),t}function uz(n,t){const i=Oe(n),s=Oe(t);return+i<+s}function cz(n,t){const i=t instanceof Date?Fe(t,0):new t(0);return i.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),i.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),i}const fz=10;class pb{subPriority=0;validate(t,i){return!0}}class hz extends pb{constructor(t,i,s,u,c){super(),this.value=t,this.validateValue=i,this.setValue=s,this.priority=u,c&&(this.subPriority=c)}validate(t,i){return this.validateValue(t,this.value,i)}set(t,i,s){return this.setValue(t,i,this.value,s)}}class dz extends pb{priority=fz;subPriority=-1;set(t,i){return i.timestampIsSet?t:Fe(t,cz(t,Date))}}class Re{run(t,i,s,u){const c=this.parse(t,i,s,u);return c?{setter:new hz(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,i,s){return!0}}class pz extends Re{priority=140;parse(t,i,s){switch(i){case"G":case"GG":case"GGG":return s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"});case"GGGGG":return s.era(t,{width:"narrow"});default:return s.era(t,{width:"wide"})||s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"})}}set(t,i,s){return i.era=s,t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Qn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Zl={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Zn(n,t){return n&&{value:t(n.value),rest:n.rest}}function Tn(n,t){const i=t.match(n);return i?{value:parseInt(i[0],10),rest:t.slice(i[0].length)}:null}function Jl(n,t){const i=t.match(n);if(!i)return null;if(i[0]==="Z")return{value:0,rest:t.slice(1)};const s=i[1]==="+"?1:-1,u=i[2]?parseInt(i[2],10):0,c=i[3]?parseInt(i[3],10):0,f=i[5]?parseInt(i[5],10):0;return{value:s*(u*_v+c*Cv+f*hR),rest:t.slice(i[0].length)}}function mb(n){return Tn(Qn.anyDigitsSigned,n)}function Vn(n,t){switch(n){case 1:return Tn(Qn.singleDigit,t);case 2:return Tn(Qn.twoDigits,t);case 3:return Tn(Qn.threeDigits,t);case 4:return Tn(Qn.fourDigits,t);default:return Tn(new RegExp("^\\d{1,"+n+"}"),t)}}function tg(n,t){switch(n){case 1:return Tn(Qn.singleDigitSigned,t);case 2:return Tn(Qn.twoDigitsSigned,t);case 3:return Tn(Qn.threeDigitsSigned,t);case 4:return Tn(Qn.fourDigitsSigned,t);default:return Tn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Av(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gb(n,t){const i=t>0,s=i?t:1-t;let u;if(s<=50)u=n||100;else{const c=s+50,f=Math.trunc(c/100)*100,p=n>=c%100;u=n+f-(p?100:0)}return i?u:1-u}function yb(n){return n%400===0||n%4===0&&n%100!==0}class mz extends Re{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,i,s){const u=c=>({year:c,isTwoDigitYear:i==="yy"});switch(i){case"y":return Zn(Vn(4,t),u);case"yo":return Zn(s.ordinalNumber(t,{unit:"year"}),u);default:return Zn(Vn(i.length,t),u)}}validate(t,i){return i.isTwoDigitYear||i.year>0}set(t,i,s){const u=t.getFullYear();if(s.isTwoDigitYear){const f=gb(s.year,u);return t.setFullYear(f,0,1),t.setHours(0,0,0,0),t}const c=!("era"in i)||i.era===1?s.year:1-s.year;return t.setFullYear(c,0,1),t.setHours(0,0,0,0),t}}class gz extends Re{priority=130;parse(t,i,s){const u=c=>({year:c,isTwoDigitYear:i==="YY"});switch(i){case"Y":return Zn(Vn(4,t),u);case"Yo":return Zn(s.ordinalNumber(t,{unit:"year"}),u);default:return Zn(Vn(i.length,t),u)}}validate(t,i){return i.isTwoDigitYear||i.year>0}set(t,i,s,u){const c=ob(t,u);if(s.isTwoDigitYear){const p=gb(s.year,c);return t.setFullYear(p,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),Jo(t,u)}const f=!("era"in i)||i.era===1?s.year:1-s.year;return t.setFullYear(f,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),Jo(t,u)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class yz extends Re{priority=130;parse(t,i){return tg(i==="R"?4:i.length,t)}set(t,i,s){const u=Fe(t,0);return u.setFullYear(s,0,4),u.setHours(0,0,0,0),mh(u)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class vz extends Re{priority=130;parse(t,i){return tg(i==="u"?4:i.length,t)}set(t,i,s){return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Sz extends Re{priority=120;parse(t,i,s){switch(i){case"Q":case"QQ":return Vn(i.length,t);case"Qo":return s.ordinalNumber(t,{unit:"quarter"});case"QQQ":return s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(t,{width:"narrow",context:"formatting"});default:return s.quarter(t,{width:"wide",context:"formatting"})||s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=1&&i<=4}set(t,i,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class bz extends Re{priority=120;parse(t,i,s){switch(i){case"q":case"qq":return Vn(i.length,t);case"qo":return s.ordinalNumber(t,{unit:"quarter"});case"qqq":return s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(t,{width:"narrow",context:"standalone"});default:return s.quarter(t,{width:"wide",context:"standalone"})||s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=1&&i<=4}set(t,i,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Ez extends Re{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,i,s){const u=c=>c-1;switch(i){case"M":return Zn(Tn(Qn.month,t),u);case"MM":return Zn(Vn(2,t),u);case"Mo":return Zn(s.ordinalNumber(t,{unit:"month"}),u);case"MMM":return s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(t,{width:"narrow",context:"formatting"});default:return s.month(t,{width:"wide",context:"formatting"})||s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}class Tz extends Re{priority=110;parse(t,i,s){const u=c=>c-1;switch(i){case"L":return Zn(Tn(Qn.month,t),u);case"LL":return Zn(Vn(2,t),u);case"Lo":return Zn(s.ordinalNumber(t,{unit:"month"}),u);case"LLL":return s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(t,{width:"narrow",context:"standalone"});default:return s.month(t,{width:"wide",context:"standalone"})||s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Cz(n,t,i){const s=Oe(n),u=$R(s,i)-t;return s.setDate(s.getDate()-u*7),s}class _z extends Re{priority=100;parse(t,i,s){switch(i){case"w":return Tn(Qn.week,t);case"wo":return s.ordinalNumber(t,{unit:"week"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=53}set(t,i,s,u){return Jo(Cz(t,s,u),u)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function xz(n,t){const i=Oe(n),s=IR(i)-t;return i.setDate(i.getDate()-s*7),i}class Dz extends Re{priority=100;parse(t,i,s){switch(i){case"I":return Tn(Qn.week,t);case"Io":return s.ordinalNumber(t,{unit:"week"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=53}set(t,i,s){return mh(xz(t,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Az=[31,28,31,30,31,30,31,31,30,31,30,31],Mz=[31,29,31,30,31,30,31,31,30,31,30,31];class Nz extends Re{priority=90;subPriority=1;parse(t,i,s){switch(i){case"d":return Tn(Qn.date,t);case"do":return s.ordinalNumber(t,{unit:"date"});default:return Vn(i.length,t)}}validate(t,i){const s=t.getFullYear(),u=yb(s),c=t.getMonth();return u?i>=1&&i<=Mz[c]:i>=1&&i<=Az[c]}set(t,i,s){return t.setDate(s),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Oz extends Re{priority=90;subpriority=1;parse(t,i,s){switch(i){case"D":case"DD":return Tn(Qn.dayOfYear,t);case"Do":return s.ordinalNumber(t,{unit:"date"});default:return Vn(i.length,t)}}validate(t,i){const s=t.getFullYear();return yb(s)?i>=1&&i<=366:i>=1&&i<=365}set(t,i,s){return t.setMonth(0,s),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Mv(n,t,i){const s=l0(),u=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=Oe(n),f=c.getDay(),m=(t%7+7)%7,S=7-u,b=t<0||t>6?t-(f+S)%7:(m+S)%7-(f+S)%7;return ph(c,b)}class Rz extends Re{priority=90;parse(t,i,s){switch(i){case"E":case"EE":case"EEE":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class zz extends Re{priority=90;parse(t,i,s,u){const c=f=>{const p=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+p};switch(i){case"e":case"ee":return Zn(Vn(i.length,t),c);case"eo":return Zn(s.ordinalNumber(t,{unit:"day"}),c);case"eee":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeeee":return s.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Hz extends Re{priority=90;parse(t,i,s,u){const c=f=>{const p=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+p};switch(i){case"c":case"cc":return Zn(Vn(i.length,t),c);case"co":return Zn(s.ordinalNumber(t,{unit:"day"}),c);case"ccc":return s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"ccccc":return s.day(t,{width:"narrow",context:"standalone"});case"cccccc":return s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});default:return s.day(t,{width:"wide",context:"standalone"})||s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function wz(n,t){const i=Oe(n),s=rz(i),u=t-s;return ph(i,u)}class Uz extends Re{priority=90;parse(t,i,s){const u=c=>c===0?7:c;switch(i){case"i":case"ii":return Vn(i.length,t);case"io":return s.ordinalNumber(t,{unit:"day"});case"iii":return Zn(s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u);case"iiiii":return Zn(s.day(t,{width:"narrow",context:"formatting"}),u);case"iiiiii":return Zn(s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u);default:return Zn(s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u)}}validate(t,i){return i>=1&&i<=7}set(t,i,s){return t=wz(t,s),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Bz extends Re{priority=80;parse(t,i,s){switch(i){case"a":case"aa":case"aaa":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Vz extends Re{priority=80;parse(t,i,s){switch(i){case"b":case"bb":case"bbb":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class Gz extends Re{priority=80;parse(t,i,s){switch(i){case"B":case"BB":case"BBB":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class jz extends Re{priority=70;parse(t,i,s){switch(i){case"h":return Tn(Qn.hour12h,t);case"ho":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=12}set(t,i,s){const u=t.getHours()>=12;return u&&s<12?t.setHours(s+12,0,0,0):!u&&s===12?t.setHours(0,0,0,0):t.setHours(s,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class Lz extends Re{priority=70;parse(t,i,s){switch(i){case"H":return Tn(Qn.hour23h,t);case"Ho":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=23}set(t,i,s){return t.setHours(s,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Pz extends Re{priority=70;parse(t,i,s){switch(i){case"K":return Tn(Qn.hour11h,t);case"Ko":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.getHours()>=12&&s<12?t.setHours(s+12,0,0,0):t.setHours(s,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class Yz extends Re{priority=70;parse(t,i,s){switch(i){case"k":return Tn(Qn.hour24h,t);case"ko":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=24}set(t,i,s){const u=s<=24?s%24:s;return t.setHours(u,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class qz extends Re{priority=60;parse(t,i,s){switch(i){case"m":return Tn(Qn.minute,t);case"mo":return s.ordinalNumber(t,{unit:"minute"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=59}set(t,i,s){return t.setMinutes(s,0,0),t}incompatibleTokens=["t","T"]}class Xz extends Re{priority=50;parse(t,i,s){switch(i){case"s":return Tn(Qn.second,t);case"so":return s.ordinalNumber(t,{unit:"second"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=59}set(t,i,s){return t.setSeconds(s,0),t}incompatibleTokens=["t","T"]}class Kz extends Re{priority=30;parse(t,i){const s=u=>Math.trunc(u*Math.pow(10,-i.length+3));return Zn(Vn(i.length,t),s)}set(t,i,s){return t.setMilliseconds(s),t}incompatibleTokens=["t","T"]}class Qz extends Re{priority=10;parse(t,i){switch(i){case"X":return Jl(Zl.basicOptionalMinutes,t);case"XX":return Jl(Zl.basic,t);case"XXXX":return Jl(Zl.basicOptionalSeconds,t);case"XXXXX":return Jl(Zl.extendedOptionalSeconds,t);default:return Jl(Zl.extended,t)}}set(t,i,s){return i.timestampIsSet?t:Fe(t,t.getTime()-sb(t)-s)}incompatibleTokens=["t","T","x"]}class Zz extends Re{priority=10;parse(t,i){switch(i){case"x":return Jl(Zl.basicOptionalMinutes,t);case"xx":return Jl(Zl.basic,t);case"xxxx":return Jl(Zl.basicOptionalSeconds,t);case"xxxxx":return Jl(Zl.extendedOptionalSeconds,t);default:return Jl(Zl.extended,t)}}set(t,i,s){return i.timestampIsSet?t:Fe(t,t.getTime()-sb(t)-s)}incompatibleTokens=["t","T","X"]}class Jz extends Re{priority=40;parse(t){return mb(t)}set(t,i,s){return[Fe(t,s*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Fz extends Re{priority=20;parse(t){return mb(t)}set(t,i,s){return[Fe(t,s),{timestampIsSet:!0}]}incompatibleTokens="*"}const kz={G:new pz,y:new mz,Y:new gz,R:new yz,u:new vz,Q:new Sz,q:new bz,M:new Ez,L:new Tz,w:new _z,I:new Dz,d:new Nz,D:new Oz,E:new Rz,e:new zz,c:new Hz,i:new Uz,a:new Bz,b:new Vz,B:new Gz,h:new jz,H:new Lz,K:new Pz,k:new Yz,m:new qz,s:new Xz,S:new Kz,X:new Qz,x:new Zz,t:new Jz,T:new Fz},Iz=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Wz=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$z=/^'([^]*?)'?$/,tH=/''/g,eH=/\S/,nH=/[a-zA-Z]/;function Fl(n,t,i,s){const u=lz(),c=s?.locale??u.locale??kR,f=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,p=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??u.weekStartsOn??u.locale?.options?.weekStartsOn??0;if(t==="")return n===""?Oe(i):Fe(i,NaN);const m={firstWeekContainsDate:f,weekStartsOn:p,locale:c},S=[new dz],b=t.match(Wz).map(N=>{const R=N[0];if(R in fb){const O=fb[R];return O(N,c.formatLong)}return N}).join("").match(Iz),_=[];for(let N of b){!s?.useAdditionalWeekYearTokens&&iz(N)&&hb(N,t,n),!s?.useAdditionalDayOfYearTokens&&az(N)&&hb(N,t,n);const R=N[0],O=kz[R];if(O){const{incompatibleTokens:U}=O;if(Array.isArray(U)){const V=_.find(F=>U.includes(F.token)||F.token===R);if(V)throw new RangeError(`The format string mustn't contain \`${V.fullToken}\` and \`${N}\` at the same time`)}else if(O.incompatibleTokens==="*"&&_.length>0)throw new RangeError(`The format string mustn't contain \`${N}\` and any other token at the same time`);_.push({token:R,fullToken:N});const j=O.run(n,N,c.match,m);if(!j)return Fe(i,NaN);S.push(j.setter),n=j.rest}else{if(R.match(nH))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");if(N==="''"?N="'":R==="'"&&(N=aH(N)),n.indexOf(N)===0)n=n.slice(N.length);else return Fe(i,NaN)}}if(n.length>0&&eH.test(n))return Fe(i,NaN);const x=S.map(N=>N.priority).sort((N,R)=>R-N).filter((N,R,O)=>O.indexOf(N)===R).map(N=>S.filter(R=>R.priority===N).sort((R,O)=>O.subPriority-R.subPriority)).map(N=>N[0]);let D=Oe(i);if(isNaN(D.getTime()))return Fe(i,NaN);const A={};for(const N of x){if(!N.validate(D,m))return Fe(i,NaN);const R=N.set(D,A,m);Array.isArray(R)?(D=R[0],Object.assign(A,R[1])):D=R}return Fe(i,D)}function aH(n){return n.match($z)[1].replace(tH,"'")}function iH(n){return lb(n,Date.now())}function sH(n,t){return ph(n,-t)}function lH(n,t){let i=t-Dv(n);return i<=0&&(i+=7),ph(n,i)}function rH(n,t){const s=fH(n);let u;if(s.date){const m=hH(s.date,2);u=dH(m.restDateString,m.year)}if(!u||isNaN(u.getTime()))return new Date(NaN);const c=u.getTime();let f=0,p;if(s.time&&(f=pH(s.time),isNaN(f)))return new Date(NaN);if(s.timezone){if(p=mH(s.timezone),isNaN(p))return new Date(NaN)}else{const m=new Date(c+f),S=new Date(0);return S.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),S.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),S}return new Date(c+f+p)}const eg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},oH=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,uH=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,cH=/^([+-])(\d{2})(?::?(\d{2}))?$/;function fH(n){const t={},i=n.split(eg.dateTimeDelimiter);let s;if(i.length>2)return t;if(/:/.test(i[0])?s=i[0]:(t.date=i[0],s=i[1],eg.timeZoneDelimiter.test(t.date)&&(t.date=n.split(eg.timeZoneDelimiter)[0],s=n.substr(t.date.length,n.length))),s){const u=eg.timezone.exec(s);u?(t.time=s.replace(u[1],""),t.timezone=u[1]):t.time=s}return t}function hH(n,t){const i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),s=n.match(i);if(!s)return{year:NaN,restDateString:""};const u=s[1]?parseInt(s[1]):null,c=s[2]?parseInt(s[2]):null;return{year:c===null?u:c*100,restDateString:n.slice((s[1]||s[2]).length)}}function dH(n,t){if(t===null)return new Date(NaN);const i=n.match(oH);if(!i)return new Date(NaN);const s=!!i[4],u=c0(i[1]),c=c0(i[2])-1,f=c0(i[3]),p=c0(i[4]),m=c0(i[5])-1;if(s)return bH(t,p,m)?gH(t,p,m):new Date(NaN);{const S=new Date(0);return!vH(t,c,f)||!SH(t,u)?new Date(NaN):(S.setUTCFullYear(t,c,Math.max(u,f)),S)}}function c0(n){return n?parseInt(n):1}function pH(n){const t=n.match(uH);if(!t)return NaN;const i=Nv(t[1]),s=Nv(t[2]),u=Nv(t[3]);return EH(i,s,u)?i*_v+s*Cv+u*1e3:NaN}function Nv(n){return n&&parseFloat(n.replace(",","."))||0}function mH(n){if(n==="Z")return 0;const t=n.match(cH);if(!t)return 0;const i=t[1]==="+"?-1:1,s=parseInt(t[2]),u=t[3]&&parseInt(t[3])||0;return TH(s,u)?i*(s*_v+u*Cv):NaN}function gH(n,t,i){const s=new Date(0);s.setUTCFullYear(n,0,4);const u=s.getUTCDay()||7,c=(t-1)*7+i+1-u;return s.setUTCDate(s.getUTCDate()+c),s}const yH=[31,null,31,30,31,30,31,31,30,31,30,31];function vb(n){return n%400===0||n%4===0&&n%100!==0}function vH(n,t,i){return t>=0&&t<=11&&i>=1&&i<=(yH[t]||(vb(n)?29:28))}function SH(n,t){return t>=1&&t<=(vb(n)?366:365)}function bH(n,t,i){return t>=1&&t<=53&&i>=0&&i<=6}function EH(n,t,i){return n===24?t===0&&i===0:i>=0&&i<60&&t>=0&&t<60&&n>=0&&n<25}function TH(n,t){return t>=0&&t<=59}function CH(n,t){const i=Oe(n),s=i.getFullYear(),u=i.getDate(),c=Fe(n,0);c.setFullYear(s,t,15),c.setHours(0,0,0,0);const f=db(c);return i.setMonth(t,Math.min(u,f)),i}function _H(n,t){const i=Oe(n);return isNaN(+i)?Fe(n,NaN):(i.setFullYear(t),i)}function Ov(n,t){return Zo(n,-t)}function Rv(n,t){return r0(n,-t)}function xH(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function DH(n,t,i){const s=[];for(let u=n;u<=t;u++)s.push(i?i(u):u);return s}function AH(n,t){const i=n.target;return i?!t.isSameNode(i)&&!t.contains(i):!1}function MH(n,t){return n.isSameNode(t)||n.contains(t)}function NH(n,t){const i=Object.entries(t),s=getComputedStyle(n);for(let u=0,c=i.length;u<c;u++){const[f,p]=i[u];if(typeof p=="string"&&p.indexOf(",")>-1){if(!p.split(",").map(S=>S.trim()).includes(s[f]))return!1}else if(s[f]!==p)return!1}return!0}function OH(n,t){const i=Object.entries(t),s=getComputedStyle(n);for(let u=0,c=i.length;u<c;u++){const[f,p]=i[u];if(typeof p=="string"&&p.indexOf(",")>-1){if(p.split(",").map(S=>S.trim()).includes(s[f]))return!0}else if(s[f]===p)return!0}return!1}function Sb(n,t,i=!1,s){if(i&&NH(n,t)){if(!s||s?.(n)===!0)return n}else if(!i&&OH(n,t)&&(!s||s?.(n)===!0))return n;return n.parentElement?Sb(n.parentElement,t,i,s):n}function bb(n,t){const i=Array.from(document.querySelectorAll("body *")),s=[];for(let u=0,c=i.length;u<c;u++){const f=getComputedStyle(i[u]);f[n]&&t(f[n])&&s.push(f[n])}return s}function Ej(n){return n}function RH(n){const t=document.documentElement;Object.keys(n).forEach(i=>{t.style.setProperty(i,n[i])})}function zH(n){return{"--theme-bsc-primary-1":n.primary1,"--theme-bsc-primary-2":n.primary2,"--theme-bsc-primary-3":n.primary3,"--theme-bsc-primary-4":n.primary4,"--theme-bsc-primary-5":n.primary5,"--theme-bsc-gray-1":n.gray1||"#303030","--theme-bsc-gray-2":n.gray2||"#5f5f5f","--theme-bsc-gray-3":n.gray3||"#8f8f8f","--theme-bsc-gray-4":n.gray4||"#bebebe","--theme-bsc-gray-5":n.gray5||"#eee","--theme-bsc-black":n.black||"#000","--theme-bsc-white":n.white||"#fff","--theme-bsc-mono-dark-1":n.monoDark1||"#222","--theme-bsc-mono-dark-2":n.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":n.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":n.monoLight1||"#fefefe","--theme-bsc-mono-light-2":n.monoLight2||"#eee","--theme-bsc-mono-light-3":n.monoLight3||"#ccc","--theme-bsc-info":n.info||"#2e7ff8","--theme-bsc-success":n.success||"#53ae0c","--theme-bsc-warning":n.warning||"#ff6914","--theme-bsc-error":n.error||"#f01616"}}var ka=(n=>(n[n.Regular=24]="Regular",n[n.Small=20]="Small",n))(ka||{});const Eb=({className:n})=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:n,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),HH=({className:n})=>{const t=Se("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},wH=({className:n})=>{const t=Se("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},UH=({className:n})=>{const t=Se("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},BH=({className:n})=>{const t=Se("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},VH=({className:n})=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:n,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),Ts=({icon:n,size:t=ka.Regular,onClick:i,className:s})=>{const u=H.useRef({calendar:Eb,chevronDown:HH,chevronLeft:wH,chevronRight:UH,chevronUp:BH,close:VH}),c=H.useMemo(()=>u.current[n]||Eb,[n]),f=Se({"bsc:h-[24px] bsc:w-[24px]":t===ka.Regular,"bsc:h-[20px] bsc:w-[20px]":t===ka.Small},s);return X.jsx("div",{onClick:i,children:X.jsx(c,{className:f})})},vc=({template:n,props:t,children:i})=>n(t,i);function GH(n,t){if(t===n)return!1;const i=Object.values(t),s=Object.values(n);if(i.length!==s.length||i.some((c,f)=>c!==s[f]))return!0;const u=Object.keys(n);return Object.keys(t).some((c,f)=>c!==u[f])}function jH(n,t){return n.matches[t]=!1,n.mediaQueries[t]={},n}function Tb(n){const t=Object.keys(n);return typeof window>"u"?t.reduce(jH,{mediaQueries:{},matches:{}}):t.reduce((i,s)=>{const u=window.matchMedia(n[s]);return i.mediaQueries[s]=u,i.matches[s]=u.matches,i},{mediaQueries:{},matches:{}})}function LH(n,t){function i(s,u){return s[u]=n.mediaQueries[u].matches,s}switch(t.type){case"updateMatches":return{matches:Object.keys(n.mediaQueries).reduce(i,{}),mediaQueries:n.mediaQueries};case"setQueries":return Tb(t.queries)}}function PH(n){const t=Ha.useRef(n),[i,s]=Ha.useReducer(LH,n,Tb);Ha.useEffect(()=>{GH(n,t.current)&&(s({type:"setQueries",queries:n}),t.current=n)},[n]);function u(){return s({type:"updateMatches"})}function c(m){const S=u;return typeof m.addListener<"u"?m.addListener(S):m.addEventListener("change",S),S}Ha.useEffect(()=>{const m=Object.values(i.mediaQueries),S=m.map(c);function b(_,x){typeof _.addListener<"u"?_.removeListener(S[x]):_.removeEventListener("change",S[x])}return()=>{m.forEach(b)}},[i.mediaQueries]);const{matches:f}=i,p=Ha.useMemo(()=>Object.values(f),[f]);return{matches:f,matchesAny:p.some(Boolean),matchesAll:p.length>0&&p.every(Boolean)}}function ng(n){return PH(YH(n)).matchesAll}const zv={};function YH(n){return zv[n]===void 0&&(zv[n]={default:n}),zv[n]}const Hv=({mobileQuery:n="screen and (max-device-width: 40rem)",tabletQuery:t="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:i="screen and (min-device-width: 64rem)",mobileMarkup:s,aboveMobileMarkup:u,tabletMarkup:c,desktopMarkup:f})=>{const p=ng(n),m=ng(t),S=ng(i);return p&&s?s:!p&&u?u:m&&c?c:S&&f?f:(console.error("Invalid media settings"),null)};function Cb(n,t,i){const s=c=>{const f=c.target,p=n.style.display!=="hidden";n&&p&&!MH(n,f)&&!u(i,f)?t(!1):t(!0)},u=(c,f)=>{if(!c)return!1;for(let p=0,m=c.length;p<m;p++)if(c[p].isSameNode(f)||c[p].contains(f))return!0;return!1};return document.addEventListener("mousedown",s),s}function _b(n){document.removeEventListener("mousedown",n)}function xb(n){return n.target?n.target:n}const Db=H.createContext({});function qH(n){const t=H.useRef(null);return t.current===null&&(t.current=n()),t.current}const wv=typeof window<"u",XH=wv?H.useLayoutEffect:H.useEffect,Uv=H.createContext(null);function Bv(n,t){n.indexOf(t)===-1&&n.push(t)}function Vv(n,t){const i=n.indexOf(t);i>-1&&n.splice(i,1)}const Vr=(n,t,i)=>i>t?t:i<n?n:i;function Gv(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}let gh=()=>{},Gr=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(gh=(n,t,i)=>{!n&&typeof console<"u"&&console.warn(Gv(t,i))},Gr=(n,t,i)=>{if(!n)throw new Error(Gv(t,i))});const jr={},Ab=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function Mb(n){return typeof n=="object"&&n!==null}const Nb=n=>/^0[^.\s]+$/u.test(n);function jv(n){let t;return()=>(t===void 0&&(t=n()),t)}const Cs=n=>n,KH=(n,t)=>i=>t(n(i)),f0=(...n)=>n.reduce(KH),h0=(n,t,i)=>{const s=t-n;return s===0?1:(i-n)/s};class Lv{constructor(){this.subscriptions=[]}add(t){return Bv(this.subscriptions,t),()=>Vv(this.subscriptions,t)}notify(t,i,s){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](t,i,s);else for(let c=0;c<u;c++){const f=this.subscriptions[c];f&&f(t,i,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ol=n=>n*1e3,_s=n=>n/1e3;function Ob(n,t){return t?n*(1e3/t):0}const Rb=new Set;function Pv(n,t,i){n||Rb.has(t)||(console.warn(Gv(t,i)),Rb.add(t))}const zb=(n,t,i)=>(((1-3*i+3*t)*n+(3*i-6*t))*n+3*t)*n,QH=1e-7,ZH=12;function JH(n,t,i,s,u){let c,f,p=0;do f=t+(i-t)/2,c=zb(f,s,u)-n,c>0?i=f:t=f;while(Math.abs(c)>QH&&++p<ZH);return f}function d0(n,t,i,s){if(n===t&&i===s)return Cs;const u=c=>JH(c,0,1,n,i);return c=>c===0||c===1?c:zb(u(c),t,s)}const Hb=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,wb=n=>t=>1-n(1-t),Ub=d0(.33,1.53,.69,.99),Yv=wb(Ub),Bb=Hb(Yv),Vb=n=>(n*=2)<1?.5*Yv(n):.5*(2-Math.pow(2,-10*(n-1))),qv=n=>1-Math.sin(Math.acos(n)),Gb=wb(qv),jb=Hb(qv),FH=d0(.42,0,1,1),kH=d0(0,0,.58,1),Lb=d0(.42,0,.58,1),IH=n=>Array.isArray(n)&&typeof n[0]!="number",Pb=n=>Array.isArray(n)&&typeof n[0]=="number",Yb={linear:Cs,easeIn:FH,easeInOut:Lb,easeOut:kH,circIn:qv,circInOut:jb,circOut:Gb,backIn:Yv,backInOut:Bb,backOut:Ub,anticipate:Vb},WH=n=>typeof n=="string",qb=n=>{if(Pb(n)){Gr(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,i,s,u]=n;return d0(t,i,s,u)}else if(WH(n))return Gr(Yb[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),Yb[n];return n},ag=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function $H(n,t){let i=new Set,s=new Set,u=!1,c=!1;const f=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function m(b){f.has(b)&&(S.schedule(b),n()),b(p)}const S={schedule:(b,_=!1,x=!1)=>{const A=x&&u?i:s;return _&&f.add(b),A.has(b)||A.add(b),b},cancel:b=>{s.delete(b),f.delete(b)},process:b=>{if(p=b,u){c=!0;return}u=!0,[i,s]=[s,i],i.forEach(m),i.clear(),u=!1,c&&(c=!1,S.process(b))}};return S}const tw=40;function Xb(n,t){let i=!1,s=!0;const u={delta:0,timestamp:0,isProcessing:!1},c=()=>i=!0,f=ag.reduce((j,V)=>(j[V]=$H(c),j),{}),{setup:p,read:m,resolveKeyframes:S,preUpdate:b,update:_,preRender:x,render:D,postRender:A}=f,N=()=>{const j=jr.useManualTiming?u.timestamp:performance.now();i=!1,jr.useManualTiming||(u.delta=s?1e3/60:Math.max(Math.min(j-u.timestamp,tw),1)),u.timestamp=j,u.isProcessing=!0,p.process(u),m.process(u),S.process(u),b.process(u),_.process(u),x.process(u),D.process(u),A.process(u),u.isProcessing=!1,i&&t&&(s=!1,n(N))},R=()=>{i=!0,s=!0,u.isProcessing||n(N)};return{schedule:ag.reduce((j,V)=>{const F=f[V];return j[V]=($,st=!1,I=!1)=>(i||R(),F.schedule($,st,I)),j},{}),cancel:j=>{for(let V=0;V<ag.length;V++)f[ag[V]].cancel(j)},state:u,steps:f}}const{schedule:dn,cancel:Fo,state:wa,steps:Xv}=Xb(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cs,!0);let ig;function ew(){ig=void 0}const Ai={now:()=>(ig===void 0&&Ai.set(wa.isProcessing||jr.useManualTiming?wa.timestamp:performance.now()),ig),set:n=>{ig=n,queueMicrotask(ew)}},Kb=n=>t=>typeof t=="string"&&t.startsWith(n),Qb=Kb("--"),nw=Kb("var(--"),Kv=n=>nw(n)?aw.test(n.split("/*")[0].trim()):!1,aw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zb(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const yh={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},p0={...yh,transform:n=>Vr(0,1,n)},sg={...yh,default:1},m0=n=>Math.round(n*1e5)/1e5,Qv=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iw(n){return n==null}const sw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zv=(n,t)=>i=>!!(typeof i=="string"&&sw.test(i)&&i.startsWith(n)||t&&!iw(i)&&Object.prototype.hasOwnProperty.call(i,t)),Jb=(n,t,i)=>s=>{if(typeof s!="string")return s;const[u,c,f,p]=s.match(Qv);return{[n]:parseFloat(u),[t]:parseFloat(c),[i]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},lw=n=>Vr(0,255,n),Jv={...yh,transform:n=>Math.round(lw(n))},Sc={test:Zv("rgb","red"),parse:Jb("red","green","blue"),transform:({red:n,green:t,blue:i,alpha:s=1})=>"rgba("+Jv.transform(n)+", "+Jv.transform(t)+", "+Jv.transform(i)+", "+m0(p0.transform(s))+")"};function rw(n){let t="",i="",s="",u="";return n.length>5?(t=n.substring(1,3),i=n.substring(3,5),s=n.substring(5,7),u=n.substring(7,9)):(t=n.substring(1,2),i=n.substring(2,3),s=n.substring(3,4),u=n.substring(4,5),t+=t,i+=i,s+=s,u+=u),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:u?parseInt(u,16)/255:1}}const Fv={test:Zv("#"),parse:rw,transform:Sc.transform},g0=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),ko=g0("deg"),kl=g0("%"),wt=g0("px"),ow=g0("vh"),uw=g0("vw"),Fb={...kl,parse:n=>kl.parse(n)/100,transform:n=>kl.transform(n*100)},vh={test:Zv("hsl","hue"),parse:Jb("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:i,alpha:s=1})=>"hsla("+Math.round(n)+", "+kl.transform(m0(t))+", "+kl.transform(m0(i))+", "+m0(p0.transform(s))+")"},$n={test:n=>Sc.test(n)||Fv.test(n)||vh.test(n),parse:n=>Sc.test(n)?Sc.parse(n):vh.test(n)?vh.parse(n):Fv.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Sc.transform(n):vh.transform(n),getAnimatableNone:n=>{const t=$n.parse(n);return t.alpha=0,$n.transform(t)}},cw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fw(n){return isNaN(n)&&typeof n=="string"&&(n.match(Qv)?.length||0)+(n.match(cw)?.length||0)>0}const kb="number",Ib="color",hw="var",dw="var(",Wb="${}",pw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function y0(n){const t=n.toString(),i=[],s={color:[],number:[],var:[]},u=[];let c=0;const p=t.replace(pw,m=>($n.test(m)?(s.color.push(c),u.push(Ib),i.push($n.parse(m))):m.startsWith(dw)?(s.var.push(c),u.push(hw),i.push(m)):(s.number.push(c),u.push(kb),i.push(parseFloat(m))),++c,Wb)).split(Wb);return{values:i,split:p,indexes:s,types:u}}function $b(n){return y0(n).values}function t8(n){const{split:t,types:i}=y0(n),s=t.length;return u=>{let c="";for(let f=0;f<s;f++)if(c+=t[f],u[f]!==void 0){const p=i[f];p===kb?c+=m0(u[f]):p===Ib?c+=$n.transform(u[f]):c+=u[f]}return c}}const mw=n=>typeof n=="number"?0:$n.test(n)?$n.getAnimatableNone(n):n;function gw(n){const t=$b(n);return t8(n)(t.map(mw))}const Io={test:fw,parse:$b,createTransformer:t8,getAnimatableNone:gw};function kv(n,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(t-n)*6*i:i<1/2?t:i<2/3?n+(t-n)*(2/3-i)*6:n}function yw({hue:n,saturation:t,lightness:i,alpha:s}){n/=360,t/=100,i/=100;let u=0,c=0,f=0;if(!t)u=c=f=i;else{const p=i<.5?i*(1+t):i+t-i*t,m=2*i-p;u=kv(m,p,n+1/3),c=kv(m,p,n),f=kv(m,p,n-1/3)}return{red:Math.round(u*255),green:Math.round(c*255),blue:Math.round(f*255),alpha:s}}function lg(n,t){return i=>i>0?t:n}const Cn=(n,t,i)=>n+(t-n)*i,Iv=(n,t,i)=>{const s=n*n,u=i*(t*t-s)+s;return u<0?0:Math.sqrt(u)},vw=[Fv,Sc,vh],Sw=n=>vw.find(t=>t.test(n));function e8(n){const t=Sw(n);if(gh(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let i=t.parse(n);return t===vh&&(i=yw(i)),i}const n8=(n,t)=>{const i=e8(n),s=e8(t);if(!i||!s)return lg(n,t);const u={...i};return c=>(u.red=Iv(i.red,s.red,c),u.green=Iv(i.green,s.green,c),u.blue=Iv(i.blue,s.blue,c),u.alpha=Cn(i.alpha,s.alpha,c),Sc.transform(u))},Wv=new Set(["none","hidden"]);function bw(n,t){return Wv.has(n)?i=>i<=0?n:t:i=>i>=1?t:n}function Ew(n,t){return i=>Cn(n,t,i)}function $v(n){return typeof n=="number"?Ew:typeof n=="string"?Kv(n)?lg:$n.test(n)?n8:_w:Array.isArray(n)?a8:typeof n=="object"?$n.test(n)?n8:Tw:lg}function a8(n,t){const i=[...n],s=i.length,u=n.map((c,f)=>$v(c)(c,t[f]));return c=>{for(let f=0;f<s;f++)i[f]=u[f](c);return i}}function Tw(n,t){const i={...n,...t},s={};for(const u in i)n[u]!==void 0&&t[u]!==void 0&&(s[u]=$v(n[u])(n[u],t[u]));return u=>{for(const c in s)i[c]=s[c](u);return i}}function Cw(n,t){const i=[],s={color:0,var:0,number:0};for(let u=0;u<t.values.length;u++){const c=t.types[u],f=n.indexes[c][s[c]],p=n.values[f]??0;i[u]=p,s[c]++}return i}const _w=(n,t)=>{const i=Io.createTransformer(t),s=y0(n),u=y0(t);return s.indexes.var.length===u.indexes.var.length&&s.indexes.color.length===u.indexes.color.length&&s.indexes.number.length>=u.indexes.number.length?Wv.has(n)&&!u.values.length||Wv.has(t)&&!s.values.length?bw(n,t):f0(a8(Cw(s,u),u.values),i):(gh(!0,`Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),lg(n,t))};function i8(n,t,i){return typeof n=="number"&&typeof t=="number"&&typeof i=="number"?Cn(n,t,i):$v(n)(n,t)}const xw=n=>{const t=({timestamp:i})=>n(i);return{start:(i=!0)=>dn.update(t,i),stop:()=>Fo(t),now:()=>wa.isProcessing?wa.timestamp:Ai.now()}},s8=(n,t,i=10)=>{let s="";const u=Math.max(Math.round(t/i),2);for(let c=0;c<u;c++)s+=Math.round(n(c/(u-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},rg=2e4;function tS(n){let t=0;const i=50;let s=n.next(t);for(;!s.done&&t<rg;)t+=i,s=n.next(t);return t>=rg?1/0:t}function Dw(n,t=100,i){const s=i({...n,keyframes:[0,t]}),u=Math.min(tS(s),rg);return{type:"keyframes",ease:c=>s.next(u*c).value/t,duration:_s(u)}}const Aw=5;function l8(n,t,i){const s=Math.max(t-Aw,0);return Ob(i-n(s),t-s)}const _n={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},eS=.001;function Mw({duration:n=_n.duration,bounce:t=_n.bounce,velocity:i=_n.velocity,mass:s=_n.mass}){let u,c;gh(n<=ol(_n.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let f=1-t;f=Vr(_n.minDamping,_n.maxDamping,f),n=Vr(_n.minDuration,_n.maxDuration,_s(n)),f<1?(u=S=>{const b=S*f,_=b*n,x=b-i,D=nS(S,f),A=Math.exp(-_);return eS-x/D*A},c=S=>{const _=S*f*n,x=_*i+i,D=Math.pow(f,2)*Math.pow(S,2)*n,A=Math.exp(-_),N=nS(Math.pow(S,2),f);return(-u(S)+eS>0?-1:1)*((x-D)*A)/N}):(u=S=>{const b=Math.exp(-S*n),_=(S-i)*n+1;return-eS+b*_},c=S=>{const b=Math.exp(-S*n),_=(i-S)*(n*n);return b*_});const p=5/n,m=Ow(u,c,p);if(n=ol(n),isNaN(m))return{stiffness:_n.stiffness,damping:_n.damping,duration:n};{const S=Math.pow(m,2)*s;return{stiffness:S,damping:f*2*Math.sqrt(s*S),duration:n}}}const Nw=12;function Ow(n,t,i){let s=i;for(let u=1;u<Nw;u++)s=s-n(s)/t(s);return s}function nS(n,t){return n*Math.sqrt(1-t*t)}const Rw=["duration","bounce"],zw=["stiffness","damping","mass"];function r8(n,t){return t.some(i=>n[i]!==void 0)}function Hw(n){let t={velocity:_n.velocity,stiffness:_n.stiffness,damping:_n.damping,mass:_n.mass,isResolvedFromDuration:!1,...n};if(!r8(n,zw)&&r8(n,Rw))if(n.visualDuration){const i=n.visualDuration,s=2*Math.PI/(i*1.2),u=s*s,c=2*Vr(.05,1,1-(n.bounce||0))*Math.sqrt(u);t={...t,mass:_n.mass,stiffness:u,damping:c}}else{const i=Mw(n);t={...t,...i,mass:_n.mass},t.isResolvedFromDuration=!0}return t}function og(n=_n.visualDuration,t=_n.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:s,restDelta:u}=i;const c=i.keyframes[0],f=i.keyframes[i.keyframes.length-1],p={done:!1,value:c},{stiffness:m,damping:S,mass:b,duration:_,velocity:x,isResolvedFromDuration:D}=Hw({...i,velocity:-_s(i.velocity||0)}),A=x||0,N=S/(2*Math.sqrt(m*b)),R=f-c,O=_s(Math.sqrt(m/b)),U=Math.abs(R)<5;s||(s=U?_n.restSpeed.granular:_n.restSpeed.default),u||(u=U?_n.restDelta.granular:_n.restDelta.default);let j;if(N<1){const F=nS(O,N);j=$=>{const st=Math.exp(-N*O*$);return f-st*((A+N*O*R)/F*Math.sin(F*$)+R*Math.cos(F*$))}}else if(N===1)j=F=>f-Math.exp(-O*F)*(R+(A+O*R)*F);else{const F=O*Math.sqrt(N*N-1);j=$=>{const st=Math.exp(-N*O*$),I=Math.min(F*$,300);return f-st*((A+N*O*R)*Math.sinh(I)+F*R*Math.cosh(I))/F}}const V={calculatedDuration:D&&_||null,next:F=>{const $=j(F);if(D)p.done=F>=_;else{let st=F===0?A:0;N<1&&(st=F===0?ol(A):l8(j,F,$));const I=Math.abs(st)<=s,et=Math.abs(f-$)<=u;p.done=I&&et}return p.value=p.done?f:$,p},toString:()=>{const F=Math.min(tS(V),rg),$=s8(st=>V.next(F*st).value,F,30);return F+"ms "+$},toTransition:()=>{}};return V}og.applyToOptions=n=>{const t=Dw(n,100,og);return n.ease=t.ease,n.duration=ol(t.duration),n.type="keyframes",n};function aS({keyframes:n,velocity:t=0,power:i=.8,timeConstant:s=325,bounceDamping:u=10,bounceStiffness:c=500,modifyTarget:f,min:p,max:m,restDelta:S=.5,restSpeed:b}){const _=n[0],x={done:!1,value:_},D=I=>p!==void 0&&I<p||m!==void 0&&I>m,A=I=>p===void 0?m:m===void 0||Math.abs(p-I)<Math.abs(m-I)?p:m;let N=i*t;const R=_+N,O=f===void 0?R:f(R);O!==R&&(N=O-_);const U=I=>-N*Math.exp(-I/s),j=I=>O+U(I),V=I=>{const et=U(I),nt=j(I);x.done=Math.abs(et)<=S,x.value=x.done?O:nt};let F,$;const st=I=>{D(x.value)&&(F=I,$=og({keyframes:[x.value,A(x.value)],velocity:l8(j,I,x.value),damping:u,stiffness:c,restDelta:S,restSpeed:b}))};return st(0),{calculatedDuration:null,next:I=>{let et=!1;return!$&&F===void 0&&(et=!0,V(I),st(I)),F!==void 0&&I>=F?$.next(I-F):(!et&&V(I),x)}}}function ww(n,t,i){const s=[],u=i||jr.mix||i8,c=n.length-1;for(let f=0;f<c;f++){let p=u(n[f],n[f+1]);if(t){const m=Array.isArray(t)?t[f]||Cs:t;p=f0(m,p)}s.push(p)}return s}function Uw(n,t,{clamp:i=!0,ease:s,mixer:u}={}){const c=n.length;if(Gr(c===t.length,"Both input and output ranges must be the same length","range-length"),c===1)return()=>t[0];if(c===2&&t[0]===t[1])return()=>t[1];const f=n[0]===n[1];n[0]>n[c-1]&&(n=[...n].reverse(),t=[...t].reverse());const p=ww(t,s,u),m=p.length,S=b=>{if(f&&b<n[0])return t[0];let _=0;if(m>1)for(;_<n.length-2&&!(b<n[_+1]);_++);const x=h0(n[_],n[_+1],b);return p[_](x)};return i?b=>S(Vr(n[0],n[c-1],b)):S}function Bw(n,t){const i=n[n.length-1];for(let s=1;s<=t;s++){const u=h0(0,t,s);n.push(Cn(i,1,u))}}function Vw(n){const t=[0];return Bw(t,n.length-1),t}function Gw(n,t){return n.map(i=>i*t)}function jw(n,t){return n.map(()=>t||Lb).splice(0,n.length-1)}function Sh({duration:n=300,keyframes:t,times:i,ease:s="easeInOut"}){const u=IH(s)?s.map(qb):qb(s),c={done:!1,value:t[0]},f=Gw(i&&i.length===t.length?i:Vw(t),n),p=Uw(f,t,{ease:Array.isArray(u)?u:jw(t,u)});return{calculatedDuration:n,next:m=>(c.value=p(m),c.done=m>=n,c)}}const Lw=n=>n!==null;function iS(n,{repeat:t,repeatType:i="loop"},s,u=1){const c=n.filter(Lw),p=u<0||t&&i!=="loop"&&t%2===1?0:c.length-1;return!p||s===void 0?c[p]:s}const Pw={decay:aS,inertia:aS,tween:Sh,keyframes:Sh,spring:og};function o8(n){typeof n.type=="string"&&(n.type=Pw[n.type])}class sS{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,i){return this.finished.then(t,i)}}const Yw=n=>n/100;class lS extends sS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:i}=this.options;i&&i.updatedAt!==Ai.now()&&this.tick(Ai.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;o8(t);const{type:i=Sh,repeat:s=0,repeatDelay:u=0,repeatType:c,velocity:f=0}=t;let{keyframes:p}=t;const m=i||Sh;process.env.NODE_ENV!=="production"&&m!==Sh&&Gr(p.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${p}`,"spring-two-frames"),m!==Sh&&typeof p[0]!="number"&&(this.mixKeyframes=f0(Yw,i8(p[0],p[1])),p=[0,100]);const S=m({...t,keyframes:p});c==="mirror"&&(this.mirroredGenerator=m({...t,keyframes:[...p].reverse(),velocity:-f})),S.calculatedDuration===null&&(S.calculatedDuration=tS(S));const{calculatedDuration:b}=S;this.calculatedDuration=b,this.resolvedDuration=b+u,this.totalDuration=this.resolvedDuration*(s+1)-u,this.generator=S}updateTime(t){const i=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(t,i=!1){const{generator:s,totalDuration:u,mixKeyframes:c,mirroredGenerator:f,resolvedDuration:p,calculatedDuration:m}=this;if(this.startTime===null)return s.next(0);const{delay:S=0,keyframes:b,repeat:_,repeatType:x,repeatDelay:D,type:A,onUpdate:N,finalKeyframe:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),i?this.currentTime=t:this.updateTime(t);const O=this.currentTime-S*(this.playbackSpeed>=0?1:-1),U=this.playbackSpeed>=0?O<0:O>u;this.currentTime=Math.max(O,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let j=this.currentTime,V=s;if(_){const I=Math.min(this.currentTime,u)/p;let et=Math.floor(I),nt=I%1;!nt&&I>=1&&(nt=1),nt===1&&et--,et=Math.min(et,_+1),et%2&&(x==="reverse"?(nt=1-nt,D&&(nt-=D/p)):x==="mirror"&&(V=f)),j=Vr(0,1,nt)*p}const F=U?{done:!1,value:b[0]}:V.next(j);c&&(F.value=c(F.value));let{done:$}=F;!U&&m!==null&&($=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const st=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return st&&A!==aS&&(F.value=iS(b,this.options,R,this.speed)),N&&N(F.value),st&&this.finish(),F}then(t,i){return this.finished.then(t,i)}get duration(){return _s(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+_s(t)}get time(){return _s(this.currentTime)}set time(t){t=ol(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ai.now());const i=this.playbackSpeed!==t;this.playbackSpeed=t,i&&(this.time=_s(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=xw,startTime:i}=this.options;this.driver||(this.driver=t(u=>this.tick(u))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=i??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ai.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function qw(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}const bc=n=>n*180/Math.PI,rS=n=>{const t=bc(Math.atan2(n[1],n[0]));return oS(t)},Xw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:rS,rotateZ:rS,skewX:n=>bc(Math.atan(n[1])),skewY:n=>bc(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},oS=n=>(n=n%360,n<0&&(n+=360),n),u8=rS,c8=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),f8=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),Kw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:c8,scaleY:f8,scale:n=>(c8(n)+f8(n))/2,rotateX:n=>oS(bc(Math.atan2(n[6],n[5]))),rotateY:n=>oS(bc(Math.atan2(-n[2],n[0]))),rotateZ:u8,rotate:u8,skewX:n=>bc(Math.atan(n[4])),skewY:n=>bc(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function uS(n){return n.includes("scale")?1:0}function cS(n,t){if(!n||n==="none")return uS(t);const i=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,u;if(i)s=Kw,u=i;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Xw,u=p}if(!u)return uS(t);const c=s[t],f=u[1].split(",").map(Zw);return typeof c=="function"?c(f):f[c]}const Qw=(n,t)=>{const{transform:i="none"}=getComputedStyle(n);return cS(i,t)};function Zw(n){return parseFloat(n.trim())}const bh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Eh=new Set(bh),h8=n=>n===yh||n===wt,Jw=new Set(["x","y","z"]),Fw=bh.filter(n=>!Jw.has(n));function kw(n){const t=[];return Fw.forEach(i=>{const s=n.getValue(i);s!==void 0&&(t.push([i,s.get()]),s.set(i.startsWith("scale")?1:0))}),t}const Wo={width:({x:n},{paddingLeft:t="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(t)-parseFloat(i),height:({y:n},{paddingTop:t="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(t)-parseFloat(i),top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>cS(t,"x"),y:(n,{transform:t})=>cS(t,"y")};Wo.translateX=Wo.x,Wo.translateY=Wo.y;const Ec=new Set;let fS=!1,hS=!1,dS=!1;function d8(){if(hS){const n=Array.from(Ec).filter(s=>s.needsMeasurement),t=new Set(n.map(s=>s.element)),i=new Map;t.forEach(s=>{const u=kw(s);u.length&&(i.set(s,u),s.render())}),n.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const u=i.get(s);u&&u.forEach(([c,f])=>{s.getValue(c)?.set(f)})}),n.forEach(s=>s.measureEndState()),n.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}hS=!1,fS=!1,Ec.forEach(n=>n.complete(dS)),Ec.clear()}function p8(){Ec.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(hS=!0)})}function Iw(){dS=!0,p8(),d8(),dS=!1}class pS{constructor(t,i,s,u,c,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=s,this.motionValue=u,this.element=c,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Ec.add(this),fS||(fS=!0,dn.read(p8),dn.resolveKeyframes(d8))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:s,motionValue:u}=this;if(t[0]===null){const c=u?.get(),f=t[t.length-1];if(c!==void 0)t[0]=c;else if(s&&i){const p=s.readValue(i,f);p!=null&&(t[0]=p)}t[0]===void 0&&(t[0]=f),u&&c===void 0&&u.set(t[0])}qw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ec.delete(this)}cancel(){this.state==="scheduled"&&(Ec.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ww=n=>n.startsWith("--");function $w(n,t,i){Ww(t)?n.style.setProperty(t,i):n.style[t]=i}const tU=jv(()=>window.ScrollTimeline!==void 0),eU={};function nU(n,t){const i=jv(n);return()=>eU[t]??i()}const m8=nU(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),v0=([n,t,i,s])=>`cubic-bezier(${n}, ${t}, ${i}, ${s})`,g8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:v0([0,.65,.55,1]),circOut:v0([.55,0,1,.45]),backIn:v0([.31,.01,.66,-.59]),backOut:v0([.33,1.53,.69,.99])};function y8(n,t){if(n)return typeof n=="function"?m8()?s8(n,t):"ease-out":Pb(n)?v0(n):Array.isArray(n)?n.map(i=>y8(i,t)||g8.easeOut):g8[n]}function aU(n,t,i,{delay:s=0,duration:u=300,repeat:c=0,repeatType:f="loop",ease:p="easeOut",times:m}={},S=void 0){const b={[t]:i};m&&(b.offset=m);const _=y8(p,u);Array.isArray(_)&&(b.easing=_);const x={delay:s,duration:u,easing:Array.isArray(_)?"linear":_,fill:"both",iterations:c+1,direction:f==="reverse"?"alternate":"normal"};return S&&(x.pseudoElement=S),n.animate(b,x)}function v8(n){return typeof n=="function"&&"applyToOptions"in n}function iU({type:n,...t}){return v8(n)&&m8()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class sU extends sS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:i,name:s,keyframes:u,pseudoElement:c,allowFlatten:f=!1,finalKeyframe:p,onComplete:m}=t;this.isPseudoElement=!!c,this.allowFlatten=f,this.options=t,Gr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const S=iU(t);this.animation=aU(i,s,u,S,c),S.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const b=iS(u,this.options,p,this.speed);this.updateMotionValue?this.updateMotionValue(b):$w(i,s,b),this.animation.cancel()}m?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return _s(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+_s(t)}get time(){return _s(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ol(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&tU()?(this.animation.timeline=t,Cs):i(this)}}const S8={anticipate:Vb,backInOut:Bb,circInOut:jb};function lU(n){return n in S8}function rU(n){typeof n.ease=="string"&&lU(n.ease)&&(n.ease=S8[n.ease])}const b8=10;class oU extends sU{constructor(t){rU(t),o8(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:i,onUpdate:s,onComplete:u,element:c,...f}=this.options;if(!i)return;if(t!==void 0){i.set(t);return}const p=new lS({...f,autoplay:!1}),m=ol(this.finishedTime??this.time);i.setWithVelocity(p.sample(m-b8).value,p.sample(m).value,b8),p.stop()}}const E8=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Io.test(n)||n==="0")&&!n.startsWith("url("));function uU(n){const t=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==t)return!0}function cU(n,t,i,s){const u=n[0];if(u===null)return!1;if(t==="display"||t==="visibility")return!0;const c=n[n.length-1],f=E8(u,t),p=E8(c,t);return gh(f===p,`You are trying to animate ${t} from "${u}" to "${c}". "${f?c:u}" is not an animatable value.`,"value-not-animatable"),!f||!p?!1:uU(n)||(i==="spring"||v8(i))&&s}function mS(n){n.duration=0,n.type="keyframes"}const fU=new Set(["opacity","clipPath","filter","transform"]),hU=jv(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function dU(n){const{motionValue:t,name:i,repeatDelay:s,repeatType:u,damping:c,type:f}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:S}=t.owner.getProps();return hU()&&i&&fU.has(i)&&(i!=="transform"||!S)&&!m&&!s&&u!=="mirror"&&c!==0&&f!=="inertia"}const pU=40;class mU extends sS{constructor({autoplay:t=!0,delay:i=0,type:s="keyframes",repeat:u=0,repeatDelay:c=0,repeatType:f="loop",keyframes:p,name:m,motionValue:S,element:b,..._}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ai.now();const x={autoplay:t,delay:i,type:s,repeat:u,repeatDelay:c,repeatType:f,name:m,motionValue:S,element:b,..._},D=b?.KeyframeResolver||pS;this.keyframeResolver=new D(p,(A,N,R)=>this.onKeyframesResolved(A,N,x,!R),m,S,b),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,i,s,u){this.keyframeResolver=void 0;const{name:c,type:f,velocity:p,delay:m,isHandoff:S,onUpdate:b}=s;this.resolvedAt=Ai.now(),cU(t,c,f,p)||((jr.instantAnimations||!m)&&b?.(iS(t,s,i)),t[0]=t[t.length-1],mS(s),s.repeat=0);const x={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>pU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...s,keyframes:t},D=!S&&dU(x)?new oU({...x,element:x.motionValue.owner.current}):new lS(x);D.finished.then(()=>this.notifyFinished()).catch(Cs),this.pendingTimeline&&(this.stopTimeline=D.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=D}get finished(){return this._animation?this.animation.finished:this._finished}then(t,i){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Iw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const gU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yU(n){const t=gU.exec(n);if(!t)return[,];const[,i,s,u]=t;return[`--${i??s}`,u]}const vU=4;function T8(n,t,i=1){Gr(i<=vU,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,u]=yU(n);if(!s)return;const c=window.getComputedStyle(t).getPropertyValue(s);if(c){const f=c.trim();return Ab(f)?parseFloat(f):f}return Kv(u)?T8(u,t,i+1):u}function gS(n,t){return n?.[t]??n?.default??n}const C8=new Set(["width","height","top","left","right","bottom",...bh]),SU={test:n=>n==="auto",parse:n=>n},_8=n=>t=>t.test(n),x8=[yh,wt,kl,ko,uw,ow,SU],D8=n=>x8.find(_8(n));function bU(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Nb(n):!0}const EU=new Set(["brightness","contrast","saturate","opacity"]);function TU(n){const[t,i]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[s]=i.match(Qv)||[];if(!s)return n;const u=i.replace(s,"");let c=EU.has(t)?1:0;return s!==i&&(c*=100),t+"("+c+u+")"}const CU=/\b([a-z-]*)\(.*?\)/gu,yS={...Io,getAnimatableNone:n=>{const t=n.match(CU);return t?t.map(TU).join(" "):n}},A8={...yh,transform:Math.round},vS={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,top:wt,right:wt,bottom:wt,left:wt,inset:wt,insetBlock:wt,insetBlockStart:wt,insetBlockEnd:wt,insetInline:wt,insetInlineStart:wt,insetInlineEnd:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,paddingBlock:wt,paddingBlockStart:wt,paddingBlockEnd:wt,paddingInline:wt,paddingInlineStart:wt,paddingInlineEnd:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,marginBlock:wt,marginBlockStart:wt,marginBlockEnd:wt,marginInline:wt,marginInlineStart:wt,marginInlineEnd:wt,backgroundPositionX:wt,backgroundPositionY:wt,...{rotate:ko,rotateX:ko,rotateY:ko,rotateZ:ko,scale:sg,scaleX:sg,scaleY:sg,scaleZ:sg,skew:ko,skewX:ko,skewY:ko,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:p0,originX:Fb,originY:Fb,originZ:wt},zIndex:A8,fillOpacity:p0,strokeOpacity:p0,numOctaves:A8},_U={...vS,color:$n,backgroundColor:$n,outlineColor:$n,fill:$n,stroke:$n,borderColor:$n,borderTopColor:$n,borderRightColor:$n,borderBottomColor:$n,borderLeftColor:$n,filter:yS,WebkitFilter:yS},M8=n=>_U[n];function N8(n,t){let i=M8(n);return i!==yS&&(i=Io),i.getAnimatableNone?i.getAnimatableNone(t):void 0}const xU=new Set(["auto","none","0"]);function DU(n,t,i){let s=0,u;for(;s<n.length&&!u;){const c=n[s];typeof c=="string"&&!xU.has(c)&&y0(c).values.length&&(u=n[s]),s++}if(u&&i)for(const c of t)n[c]=N8(i,u)}class AU extends pS{constructor(t,i,s,u,c){super(t,i,s,u,c,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:i,name:s}=this;if(!i||!i.current)return;super.readKeyframes();for(let b=0;b<t.length;b++){let _=t[b];if(typeof _=="string"&&(_=_.trim(),Kv(_))){const x=T8(_,i.current);x!==void 0&&(t[b]=x),b===t.length-1&&(this.finalKeyframe=_)}}if(this.resolveNoneKeyframes(),!C8.has(s)||t.length!==2)return;const[u,c]=t,f=D8(u),p=D8(c),m=Zb(u),S=Zb(c);if(m!==S&&Wo[s]){this.needsMeasurement=!0;return}if(f!==p)if(h8(f)&&h8(p))for(let b=0;b<t.length;b++){const _=t[b];typeof _=="string"&&(t[b]=parseFloat(_))}else Wo[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:i}=this,s=[];for(let u=0;u<t.length;u++)(t[u]===null||bU(t[u]))&&s.push(u);s.length&&DU(t,s,i)}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Wo[s](t.measureViewportBox(),window.getComputedStyle(t.current)),i[0]=this.measuredOrigin;const u=i[i.length-1];u!==void 0&&t.getValue(s,u).jump(u,!1)}measureEndState(){const{element:t,name:i,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const u=t.getValue(i);u&&u.jump(this.measuredOrigin,!1);const c=s.length-1,f=s[c];s[c]=Wo[i](t.measureViewportBox(),window.getComputedStyle(t.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),this.removedTransforms?.length&&this.removedTransforms.forEach(([p,m])=>{t.getValue(p).set(m)}),this.resolveNoneKeyframes()}}function MU(n,t,i){if(n instanceof EventTarget)return[n];if(typeof n=="string"){let s=document;const u=i?.[n]??s.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}const O8=(n,t)=>t&&typeof n=="number"?t.transform(n):n;function NU(n){return Mb(n)&&"offsetHeight"in n}const R8=30,OU=n=>!isNaN(parseFloat(n));class RU{constructor(t,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const u=Ai.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=Ai.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=OU(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Pv(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,i){this.events[t]||(this.events[t]=new Lv);const s=this.events[t].add(i);return t==="change"?()=>{s(),dn.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,i,s){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,i=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ai.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>R8)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,R8);return Ob(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=t(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Th(n,t){return new RU(n,t)}const{schedule:SS}=Xb(queueMicrotask,!1),ul={x:!1,y:!1};function z8(){return ul.x||ul.y}function zU(n){return n==="x"||n==="y"?ul[n]?null:(ul[n]=!0,()=>{ul[n]=!1}):ul.x||ul.y?null:(ul.x=ul.y=!0,()=>{ul.x=ul.y=!1})}function H8(n,t){const i=MU(n),s=new AbortController,u={passive:!0,...t,signal:s.signal};return[i,u,()=>s.abort()]}function w8(n){return!(n.pointerType==="touch"||z8())}function HU(n,t,i={}){const[s,u,c]=H8(n,i),f=p=>{if(!w8(p))return;const{target:m}=p,S=t(m,p);if(typeof S!="function"||!m)return;const b=_=>{w8(_)&&(S(_),m.removeEventListener("pointerleave",b))};m.addEventListener("pointerleave",b,u)};return s.forEach(p=>{p.addEventListener("pointerenter",f,u)}),c}const U8=(n,t)=>t?n===t?!0:U8(n,t.parentElement):!1,bS=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,wU=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function B8(n){return wU.has(n.tagName)||n.isContentEditable===!0}const ug=new WeakSet;function V8(n){return t=>{t.key==="Enter"&&n(t)}}function ES(n,t){n.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const UU=(n,t)=>{const i=n.currentTarget;if(!i)return;const s=V8(()=>{if(ug.has(i))return;ES(i,"down");const u=V8(()=>{ES(i,"up")}),c=()=>ES(i,"cancel");i.addEventListener("keyup",u,t),i.addEventListener("blur",c,t)});i.addEventListener("keydown",s,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),t)};function G8(n){return bS(n)&&!z8()}function BU(n,t,i={}){const[s,u,c]=H8(n,i),f=p=>{const m=p.currentTarget;if(!G8(p))return;ug.add(m);const S=t(m,p),b=(D,A)=>{window.removeEventListener("pointerup",_),window.removeEventListener("pointercancel",x),ug.has(m)&&ug.delete(m),G8(D)&&typeof S=="function"&&S(D,{success:A})},_=D=>{b(D,m===window||m===document||i.useGlobalTarget||U8(m,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",_,u),window.addEventListener("pointercancel",x,u)};return s.forEach(p=>{(i.useGlobalTarget?window:p).addEventListener("pointerdown",f,u),NU(p)&&(p.addEventListener("focus",S=>UU(S,u)),!B8(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),c}function j8(n){return Mb(n)&&"ownerSVGElement"in n}function VU(n){return j8(n)&&n.tagName==="svg"}const Ia=n=>!!(n&&n.getVelocity),GU=[...x8,$n,Io],jU=n=>GU.find(_8(n)),L8=H.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function LU(n=!0){const t=H.useContext(Uv);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:u}=t,c=H.useId();H.useEffect(()=>{if(n)return u(c)},[n]);const f=H.useCallback(()=>n&&s&&s(c),[c,s,n]);return!i&&s?[!1,f]:[!0]}const P8=H.createContext({strict:!1}),Y8={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ch={};for(const n in Y8)Ch[n]={isEnabled:t=>Y8[n].some(i=>!!t[i])};function PU(n){for(const t in n)Ch[t]={...Ch[t],...n[t]}}const YU=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cg(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||YU.has(n)}let q8=n=>!cg(n);function qU(n){typeof n=="function"&&(q8=t=>t.startsWith("on")?!cg(t):n(t))}try{qU(require("@emotion/is-prop-valid").default)}catch{}function XU(n,t,i){const s={};for(const u in n)u==="values"&&typeof n.values=="object"||(q8(u)||i===!0&&cg(u)||!t&&!cg(u)||n.draggable&&u.startsWith("onDrag"))&&(s[u]=n[u]);return s}const fg=H.createContext({});function hg(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function S0(n){return typeof n=="string"||Array.isArray(n)}const TS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],CS=["initial",...TS];function dg(n){return hg(n.animate)||CS.some(t=>S0(n[t]))}function X8(n){return!!(dg(n)||n.variants)}function KU(n,t){if(dg(n)){const{initial:i,animate:s}=n;return{initial:i===!1||S0(i)?i:void 0,animate:S0(s)?s:void 0}}return n.inherit!==!1?t:{}}function QU(n){const{initial:t,animate:i}=KU(n,H.useContext(fg));return H.useMemo(()=>({initial:t,animate:i}),[K8(t),K8(i)])}function K8(n){return Array.isArray(n)?n.join(" "):n}function Q8(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}const b0={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(wt.test(n))n=parseFloat(n);else return n;const i=Q8(n,t.target.x),s=Q8(n,t.target.y);return`${i}% ${s}%`}},ZU={correct:(n,{treeScale:t,projectionDelta:i})=>{const s=n,u=Io.parse(n);if(u.length>5)return s;const c=Io.createTransformer(n),f=typeof u[0]!="number"?1:0,p=i.x.scale*t.x,m=i.y.scale*t.y;u[0+f]/=p,u[1+f]/=m;const S=Cn(p,m,.5);return typeof u[2+f]=="number"&&(u[2+f]/=S),typeof u[3+f]=="number"&&(u[3+f]/=S),c(u)}},_S={borderRadius:{...b0,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:b0,borderTopRightRadius:b0,borderBottomLeftRadius:b0,borderBottomRightRadius:b0,boxShadow:ZU};function Z8(n,{layout:t,layoutId:i}){return Eh.has(n)||n.startsWith("origin")||(t||i!==void 0)&&(!!_S[n]||n==="opacity")}const JU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},FU=bh.length;function kU(n,t,i){let s="",u=!0;for(let c=0;c<FU;c++){const f=bh[c],p=n[f];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(f.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const S=O8(p,vS[f]);if(!m){u=!1;const b=JU[f]||f;s+=`${b}(${S}) `}i&&(t[f]=S)}}return s=s.trim(),i?s=i(t,u?"":s):u&&(s="none"),s}function xS(n,t,i){const{style:s,vars:u,transformOrigin:c}=n;let f=!1,p=!1;for(const m in t){const S=t[m];if(Eh.has(m)){f=!0;continue}else if(Qb(m)){u[m]=S;continue}else{const b=O8(S,vS[m]);m.startsWith("origin")?(p=!0,c[m]=b):s[m]=b}}if(t.transform||(f||i?s.transform=kU(t,n.transform,i):s.transform&&(s.transform="none")),p){const{originX:m="50%",originY:S="50%",originZ:b=0}=c;s.transformOrigin=`${m} ${S} ${b}`}}const DS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function J8(n,t,i){for(const s in t)!Ia(t[s])&&!Z8(s,i)&&(n[s]=t[s])}function IU({transformTemplate:n},t){return H.useMemo(()=>{const i=DS();return xS(i,t,n),Object.assign({},i.vars,i.style)},[t])}function WU(n,t){const i=n.style||{},s={};return J8(s,i,n),Object.assign(s,IU(n,t)),s}function $U(n,t){const i={},s=WU(n,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=s,i}const tB={offset:"stroke-dashoffset",array:"stroke-dasharray"},eB={offset:"strokeDashoffset",array:"strokeDasharray"};function nB(n,t,i=1,s=0,u=!0){n.pathLength=1;const c=u?tB:eB;n[c.offset]=wt.transform(-s);const f=wt.transform(t),p=wt.transform(i);n[c.array]=`${f} ${p}`}const aB=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function F8(n,{attrX:t,attrY:i,attrScale:s,pathLength:u,pathSpacing:c=1,pathOffset:f=0,...p},m,S,b){if(xS(n,p,S),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:x}=n;_.transform&&(x.transform=_.transform,delete _.transform),(x.transform||_.transformOrigin)&&(x.transformOrigin=_.transformOrigin??"50% 50%",delete _.transformOrigin),x.transform&&(x.transformBox=b?.transformBox??"fill-box",delete _.transformBox);for(const D of aB)_[D]!==void 0&&(x[D]=_[D],delete _[D]);t!==void 0&&(_.x=t),i!==void 0&&(_.y=i),s!==void 0&&(_.scale=s),u!==void 0&&nB(_,u,c,f,!1)}const k8=()=>({...DS(),attrs:{}}),I8=n=>typeof n=="string"&&n.toLowerCase()==="svg";function iB(n,t,i,s){const u=H.useMemo(()=>{const c=k8();return F8(c,t,I8(s),n.transformTemplate,n.style),{...c.attrs,style:{...c.style}}},[t]);if(n.style){const c={};J8(c,n.style,n),u.style={...c,...u.style}}return u}const sB=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function AS(n){return typeof n!="string"||n.includes("-")?!1:!!(sB.indexOf(n)>-1||/[A-Z]/u.test(n))}function lB(n,t,i,{latestValues:s},u,c=!1,f){const m=(f??AS(n)?iB:$U)(t,s,u,n),S=XU(t,typeof n=="string",c),b=n!==H.Fragment?{...S,...m,ref:i}:{},{children:_}=t,x=H.useMemo(()=>Ia(_)?_.get():_,[_]);return H.createElement(n,{...b,children:x})}function W8(n){const t=[{},{}];return n?.values.forEach((i,s)=>{t[0][s]=i.get(),t[1][s]=i.getVelocity()}),t}function MS(n,t,i,s){if(typeof t=="function"){const[u,c]=W8(s);t=t(i!==void 0?i:n.custom,u,c)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[u,c]=W8(s);t=t(i!==void 0?i:n.custom,u,c)}return t}function pg(n){return Ia(n)?n.get():n}function rB({scrapeMotionValuesFromProps:n,createRenderState:t},i,s,u){return{latestValues:oB(i,s,u,n),renderState:t()}}function oB(n,t,i,s){const u={},c=s(n,{});for(const x in c)u[x]=pg(c[x]);let{initial:f,animate:p}=n;const m=dg(n),S=X8(n);t&&S&&!m&&n.inherit!==!1&&(f===void 0&&(f=t.initial),p===void 0&&(p=t.animate));let b=i?i.initial===!1:!1;b=b||f===!1;const _=b?p:f;if(_&&typeof _!="boolean"&&!hg(_)){const x=Array.isArray(_)?_:[_];for(let D=0;D<x.length;D++){const A=MS(n,x[D]);if(A){const{transitionEnd:N,transition:R,...O}=A;for(const U in O){let j=O[U];if(Array.isArray(j)){const V=b?j.length-1:0;j=j[V]}j!==null&&(u[U]=j)}for(const U in N)u[U]=N[U]}}}return u}const $8=n=>(t,i)=>{const s=H.useContext(fg),u=H.useContext(Uv),c=()=>rB(n,t,s,u);return i?c():qH(c)};function NS(n,t,i){const{style:s}=n,u={};for(const c in s)(Ia(s[c])||t.style&&Ia(t.style[c])||Z8(c,n)||i?.getValue(c)?.liveStyle!==void 0)&&(u[c]=s[c]);return u}const uB=$8({scrapeMotionValuesFromProps:NS,createRenderState:DS});function t7(n,t,i){const s=NS(n,t,i);for(const u in n)if(Ia(n[u])||Ia(t[u])){const c=bh.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;s[c]=n[u]}return s}const cB=$8({scrapeMotionValuesFromProps:t7,createRenderState:k8}),fB=Symbol.for("motionComponentSymbol");function hB(n,t,i){const s=H.useRef(i);H.useInsertionEffect(()=>{s.current=i});const u=H.useRef(null);return H.useCallback(c=>{c&&n.onMount?.(c),t&&(c?t.mount(c):t.unmount());const f=s.current;if(typeof f=="function")if(c){const p=f(c);typeof p=="function"&&(u.current=p)}else u.current?(u.current(),u.current=null):f(c);else f&&(f.current=c)},[t])}const OS=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),e7="data-"+OS("framerAppearId"),n7=H.createContext({});function E0(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function dB(n,t,i,s,u,c){const{visualElement:f}=H.useContext(fg),p=H.useContext(P8),m=H.useContext(Uv),S=H.useContext(L8).reducedMotion,b=H.useRef(null);s=s||p.renderer,!b.current&&s&&(b.current=s(n,{visualState:t,parent:f,props:i,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:S,isSVG:c}));const _=b.current,x=H.useContext(n7);_&&!_.projection&&u&&(_.type==="html"||_.type==="svg")&&pB(b.current,i,u,x);const D=H.useRef(!1);H.useInsertionEffect(()=>{_&&D.current&&_.update(i,m)});const A=i[e7],N=H.useRef(!!A&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return XH(()=>{_&&(D.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),N.current&&_.animationState&&_.animationState.animateChanges())}),H.useEffect(()=>{_&&(!N.current&&_.animationState&&_.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),N.current=!1),_.enteringChildren=void 0)}),_}function pB(n,t,i,s){const{layoutId:u,layout:c,drag:f,dragConstraints:p,layoutScroll:m,layoutRoot:S,layoutCrossfade:b}=t;n.projection=new i(n.latestValues,t["data-framer-portal-id"]?void 0:a7(n.parent)),n.projection.setOptions({layoutId:u,layout:c,alwaysMeasureLayout:!!f||p&&E0(p),visualElement:n,animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,crossfade:b,layoutScroll:m,layoutRoot:S})}function a7(n){if(n)return n.options.allowProjection!==!1?n.projection:a7(n.parent)}function RS(n,{forwardMotionProps:t=!1,type:i}={},s,u){s&&PU(s);const c=i?i==="svg":AS(n),f=c?cB:uB;function p(S,b){let _;const x={...H.useContext(L8),...S,layoutId:mB(S)},{isStatic:D}=x,A=QU(S),N=f(S,D);if(!D&&wv){gB(x,s);const R=yB(x);_=R.MeasureLayout,A.visualElement=dB(n,N,x,u,R.ProjectionNode,c)}return X.jsxs(fg.Provider,{value:A,children:[_&&A.visualElement?X.jsx(_,{visualElement:A.visualElement,...x}):null,lB(n,S,hB(N,A.visualElement,b),N,D,t,c)]})}p.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=H.forwardRef(p);return m[fB]=n,m}function mB({layoutId:n}){const t=H.useContext(Db).id;return t&&n!==void 0?t+"-"+n:n}function gB(n,t){const i=H.useContext(P8).strict;if(process.env.NODE_ENV!=="production"&&t&&i){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?gh(!1,s,"lazy-strict-mode"):Gr(!1,s,"lazy-strict-mode")}}function yB(n){const{drag:t,layout:i}=Ch;if(!t&&!i)return{};const s={...t,...i};return{MeasureLayout:t?.isEnabled(n)||i?.isEnabled(n)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function vB(n,t){if(typeof Proxy>"u")return RS;const i=new Map,s=(c,f)=>RS(c,f,n,t),u=(c,f)=>(process.env.NODE_ENV!=="production"&&Pv(!1,"motion() is deprecated. Use motion.create() instead."),s(c,f));return new Proxy(u,{get:(c,f)=>f==="create"?s:(i.has(f)||i.set(f,RS(f,void 0,n,t)),i.get(f))})}function i7({top:n,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:n,max:s}}}function SB({x:n,y:t}){return{top:t.min,right:n.max,bottom:t.max,left:n.min}}function bB(n,t){if(!t)return n;const i=t({x:n.left,y:n.top}),s=t({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}function zS(n){return n===void 0||n===1}function HS({scale:n,scaleX:t,scaleY:i}){return!zS(n)||!zS(t)||!zS(i)}function Tc(n){return HS(n)||s7(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function s7(n){return l7(n.x)||l7(n.y)}function l7(n){return n&&n!=="0%"}function mg(n,t,i){const s=n-i,u=t*s;return i+u}function r7(n,t,i,s,u){return u!==void 0&&(n=mg(n,u,s)),mg(n,i,s)+t}function wS(n,t=0,i=1,s,u){n.min=r7(n.min,t,i,s,u),n.max=r7(n.max,t,i,s,u)}function o7(n,{x:t,y:i}){wS(n.x,t.translate,t.scale,t.originPoint),wS(n.y,i.translate,i.scale,i.originPoint)}const u7=.999999999999,c7=1.0000000000001;function EB(n,t,i,s=!1){const u=i.length;if(!u)return;t.x=t.y=1;let c,f;for(let p=0;p<u;p++){c=i[p],f=c.projectionDelta;const{visualElement:m}=c.options;m&&m.props.style&&m.props.style.display==="contents"||(s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&xh(n,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),f&&(t.x*=f.x.scale,t.y*=f.y.scale,o7(n,f)),s&&Tc(c.latestValues)&&xh(n,c.latestValues))}t.x<c7&&t.x>u7&&(t.x=1),t.y<c7&&t.y>u7&&(t.y=1)}function _h(n,t){n.min=n.min+t,n.max=n.max+t}function f7(n,t,i,s,u=.5){const c=Cn(n.min,n.max,u);wS(n,t,i,c,s)}function xh(n,t){f7(n.x,t.x,t.scaleX,t.scale,t.originX),f7(n.y,t.y,t.scaleY,t.scale,t.originY)}function h7(n,t){return i7(bB(n.getBoundingClientRect(),t))}function TB(n,t,i){const s=h7(n,i),{scroll:u}=t;return u&&(_h(s.x,u.offset.x),_h(s.y,u.offset.y)),s}const d7=()=>({translate:0,scale:1,origin:0,originPoint:0}),Dh=()=>({x:d7(),y:d7()}),p7=()=>({min:0,max:0}),fa=()=>({x:p7(),y:p7()}),US={current:null},m7={current:!1};function CB(){if(m7.current=!0,!!wv)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>US.current=n.matches;n.addEventListener("change",t),t()}else US.current=!1}const _B=new WeakMap;function xB(n,t,i){for(const s in t){const u=t[s],c=i[s];if(Ia(u))n.addValue(s,u);else if(Ia(c))n.addValue(s,Th(u,{owner:n}));else if(c!==u)if(n.hasValue(s)){const f=n.getValue(s);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=n.getStaticValue(s);n.addValue(s,Th(f!==void 0?f:u,{owner:n}))}}for(const s in i)t[s]===void 0&&n.removeValue(s);return t}const g7=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DB{scrapeMotionValuesFromProps(t,i,s){return{}}constructor({parent:t,props:i,presenceContext:s,reducedMotionConfig:u,blockInitialAnimation:c,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pS,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=Ai.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,dn.render(this.render,!1,!0))};const{latestValues:m,renderState:S}=f;this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=S,this.parent=t,this.props=i,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!c,this.isControllingVariants=dg(i),this.isVariantNode=X8(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const x in _){const D=_[x];m[x]!==void 0&&Ia(D)&&D.set(m[x])}}mount(t){this.current=t,_B.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(m7.current||CB(),this.shouldReduceMotion=US.current),process.env.NODE_ENV!=="production"&&Pv(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Fo(this.notifyUpdate),Fo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const i=this.features[t];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,i){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Eh.has(t);s&&this.onBindTransform&&this.onBindTransform();const u=i.on("change",f=>{this.latestValues[t]=f,this.props.onUpdate&&dn.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{u(),c&&c(),i.owner&&i.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ch){const i=Ch[t];if(!i)continue;const{isEnabled:s,Feature:u}=i;if(!this.features[t]&&u&&s(this.props)&&(this.features[t]=new u(this)),this.features[t]){const c=this.features[t];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fa()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let s=0;s<g7.length;s++){const u=g7[s];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const c="on"+u,f=t[c];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=xB(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const s=this.values.get(t);i!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&i!==void 0&&(s=Th(i===null?void 0:i,{owner:this}),this.addValue(t,s)),s}readValue(t,i){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Ab(s)||Nb(s))?s=parseFloat(s):!jU(s)&&Io.test(i)&&(s=N8(t,i)),this.setBaseTarget(t,Ia(s)?s.get():s)),Ia(s)?s.get():s}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const c=MS(this.props,i,this.presenceContext?.custom);c&&(s=c[t])}if(i&&s!==void 0)return s;const u=this.getBaseTargetFromProps(this.props,t);return u!==void 0&&!Ia(u)?u:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new Lv),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}scheduleRenderMicrotask(){SS.render(this.render)}}class y7 extends DB{constructor(){super(...arguments),this.KeyframeResolver=AU}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){return t.style?t.style[i]:void 0}removeValueFromRenderState(t,{vars:i,style:s}){delete i[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ia(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function v7(n,{style:t,vars:i},s,u){const c=n.style;let f;for(f in t)c[f]=t[f];u?.applyProjectionStyles(c,s);for(f in i)c.setProperty(f,i[f])}function AB(n){return window.getComputedStyle(n)}class MB extends y7{constructor(){super(...arguments),this.type="html",this.renderInstance=v7}readValueFromInstance(t,i){if(Eh.has(i))return this.projection?.isProjecting?uS(i):Qw(t,i);{const s=AB(t),u=(Qb(i)?s.getPropertyValue(i):s[i])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(t,{transformPagePoint:i}){return h7(t,i)}build(t,i,s){xS(t,i,s.transformTemplate)}scrapeMotionValuesFromProps(t,i,s){return NS(t,i,s)}}const S7=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function NB(n,t,i,s){v7(n,t,void 0,s);for(const u in t.attrs)n.setAttribute(S7.has(u)?u:OS(u),t.attrs[u])}class OB extends y7{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fa}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(Eh.has(i)){const s=M8(i);return s&&s.default||0}return i=S7.has(i)?i:OS(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,s){return t7(t,i,s)}build(t,i,s){F8(t,i,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,i,s,u){NB(t,i,s,u)}mount(t){this.isSVGTag=I8(t.tagName),super.mount(t)}}const RB=(n,t)=>t.isSVG??AS(n)?new OB(t):new MB(t,{allowProjection:n!==H.Fragment});function Ah(n,t,i){const s=n.getProps();return MS(s,t,i!==void 0?i:s.custom,n)}const BS=n=>Array.isArray(n);function zB(n,t,i){n.hasValue(t)?n.getValue(t).set(i):n.addValue(t,Th(i))}function HB(n){return BS(n)?n[n.length-1]||0:n}function wB(n,t){const i=Ah(n,t);let{transitionEnd:s={},transition:u={},...c}=i||{};c={...c,...s};for(const f in c){const p=HB(c[f]);zB(n,f,p)}}function UB(n){return!!(Ia(n)&&n.add)}function VS(n,t){const i=n.getValue("willChange");if(UB(i))return i.add(t);if(!i&&jr.WillChange){const s=new jr.WillChange("auto");n.addValue("willChange",s),s.add(t)}}function b7(n){return n.props[e7]}const BB=n=>n!==null;function VB(n,{repeat:t,repeatType:i="loop"},s){const u=n.filter(BB),c=t&&i!=="loop"&&t%2===1?0:u.length-1;return u[c]}const GB={type:"spring",stiffness:500,damping:25,restSpeed:10},jB=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),LB={type:"keyframes",duration:.8},PB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},YB=(n,{keyframes:t})=>t.length>2?LB:Eh.has(n)?n.startsWith("scale")?jB(t[1]):GB:PB;function qB({when:n,delay:t,delayChildren:i,staggerChildren:s,staggerDirection:u,repeat:c,repeatType:f,repeatDelay:p,from:m,elapsed:S,...b}){return!!Object.keys(b).length}const GS=(n,t,i,s={},u,c)=>f=>{const p=gS(s,n)||{},m=p.delay||s.delay||0;let{elapsed:S=0}=s;S=S-ol(m);const b={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...p,delay:-S,onUpdate:x=>{t.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:n,motionValue:t,element:c?void 0:u};qB(p)||Object.assign(b,YB(n,b)),b.duration&&(b.duration=ol(b.duration)),b.repeatDelay&&(b.repeatDelay=ol(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let _=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(mS(b),b.delay===0&&(_=!0)),(jr.instantAnimations||jr.skipAnimations)&&(_=!0,mS(b),b.delay=0),b.allowFlatten=!p.type&&!p.ease,_&&!c&&t.get()!==void 0){const x=VB(b.keyframes,p);if(x!==void 0){dn.update(()=>{b.onUpdate(x),b.onComplete()});return}}return p.isSync?new lS(b):new mU(b)};function XB({protectedKeys:n,needsAnimating:t},i){const s=n.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,s}function E7(n,t,{delay:i=0,transitionOverride:s,type:u}={}){let{transition:c=n.getDefaultTransition(),transitionEnd:f,...p}=t;s&&(c=s);const m=[],S=u&&n.animationState&&n.animationState.getState()[u];for(const b in p){const _=n.getValue(b,n.latestValues[b]??null),x=p[b];if(x===void 0||S&&XB(S,b))continue;const D={delay:i,...gS(c||{},b)},A=_.get();if(A!==void 0&&!_.isAnimating&&!Array.isArray(x)&&x===A&&!D.velocity)continue;let N=!1;if(window.MotionHandoffAnimation){const O=b7(n);if(O){const U=window.MotionHandoffAnimation(O,b,dn);U!==null&&(D.startTime=U,N=!0)}}VS(n,b),_.start(GS(b,_,x,n.shouldReduceMotion&&C8.has(b)?{type:!1}:D,n,N));const R=_.animation;R&&m.push(R)}return f&&Promise.all(m).then(()=>{dn.update(()=>{f&&wB(n,f)})}),m}function T7(n,t,i,s=0,u=1){const c=Array.from(n).sort((S,b)=>S.sortNodePosition(b)).indexOf(t),f=n.size,p=(f-1)*s;return typeof i=="function"?i(c,f):u===1?c*s:p-c*s}function jS(n,t,i={}){const s=Ah(n,t,i.type==="exit"?n.presenceContext?.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(u=i.transitionOverride);const c=s?()=>Promise.all(E7(n,s,i)):()=>Promise.resolve(),f=n.variantChildren&&n.variantChildren.size?(m=0)=>{const{delayChildren:S=0,staggerChildren:b,staggerDirection:_}=u;return KB(n,t,m,S,b,_,i)}:()=>Promise.resolve(),{when:p}=u;if(p){const[m,S]=p==="beforeChildren"?[c,f]:[f,c];return m().then(()=>S())}else return Promise.all([c(),f(i.delay)])}function KB(n,t,i=0,s=0,u=0,c=1,f){const p=[];for(const m of n.variantChildren)m.notify("AnimationStart",t),p.push(jS(m,t,{...f,delay:i+(typeof s=="function"?0:s)+T7(n.variantChildren,m,s,u,c)}).then(()=>m.notify("AnimationComplete",t)));return Promise.all(p)}function QB(n,t,i={}){n.notify("AnimationStart",t);let s;if(Array.isArray(t)){const u=t.map(c=>jS(n,c,i));s=Promise.all(u)}else if(typeof t=="string")s=jS(n,t,i);else{const u=typeof t=="function"?Ah(n,t,i.custom):t;s=Promise.all(E7(n,u,i))}return s.then(()=>{n.notify("AnimationComplete",t)})}function C7(n,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==n.length)return!1;for(let s=0;s<i;s++)if(t[s]!==n[s])return!1;return!0}const ZB=CS.length;function _7(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?_7(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const t={};for(let i=0;i<ZB;i++){const s=CS[i],u=n.props[s];(S0(u)||u===!1)&&(t[s]=u)}return t}const JB=[...TS].reverse(),FB=TS.length;function kB(n){return t=>Promise.all(t.map(({animation:i,options:s})=>QB(n,i,s)))}function IB(n){let t=kB(n),i=x7(),s=!0;const u=m=>(S,b)=>{const _=Ah(n,b,m==="exit"?n.presenceContext?.custom:void 0);if(_){const{transition:x,transitionEnd:D,...A}=_;S={...S,...A,...D}}return S};function c(m){t=m(n)}function f(m){const{props:S}=n,b=_7(n.parent)||{},_=[],x=new Set;let D={},A=1/0;for(let R=0;R<FB;R++){const O=JB[R],U=i[O],j=S[O]!==void 0?S[O]:b[O],V=S0(j),F=O===m?U.isActive:null;F===!1&&(A=R);let $=j===b[O]&&j!==S[O]&&V;if($&&s&&n.manuallyAnimateOnMount&&($=!1),U.protectedKeys={...D},!U.isActive&&F===null||!j&&!U.prevProp||hg(j)||typeof j=="boolean")continue;const st=WB(U.prevProp,j);let I=st||O===m&&U.isActive&&!$&&V||R>A&&V,et=!1;const nt=Array.isArray(j)?j:[j];let bt=nt.reduce(u(O),{});F===!1&&(bt={});const{prevResolvedValues:lt={}}=U,dt={...lt,...bt},pt=Z=>{I=!0,x.has(Z)&&(et=!0,x.delete(Z)),U.needsAnimating[Z]=!0;const K=n.getValue(Z);K&&(K.liveStyle=!1)};for(const Z in dt){const K=bt[Z],at=lt[Z];if(D.hasOwnProperty(Z))continue;let St=!1;BS(K)&&BS(at)?St=!C7(K,at):St=K!==at,St?K!=null?pt(Z):x.add(Z):K!==void 0&&x.has(Z)?pt(Z):U.protectedKeys[Z]=!0}U.prevProp=j,U.prevResolvedValues=bt,U.isActive&&(D={...D,...bt}),s&&n.blockInitialAnimation&&(I=!1);const tt=$&&st;I&&(!tt||et)&&_.push(...nt.map(Z=>{const K={type:O};if(typeof Z=="string"&&s&&!tt&&n.manuallyAnimateOnMount&&n.parent){const{parent:at}=n,St=Ah(at,Z);if(at.enteringChildren&&St){const{delayChildren:W}=St.transition||{};K.delay=T7(at.enteringChildren,n,W)}}return{animation:Z,options:K}}))}if(x.size){const R={};if(typeof S.initial!="boolean"){const O=Ah(n,Array.isArray(S.initial)?S.initial[0]:S.initial);O&&O.transition&&(R.transition=O.transition)}x.forEach(O=>{const U=n.getBaseTarget(O),j=n.getValue(O);j&&(j.liveStyle=!0),R[O]=U??null}),_.push({animation:R})}let N=!!_.length;return s&&(S.initial===!1||S.initial===S.animate)&&!n.manuallyAnimateOnMount&&(N=!1),s=!1,N?t(_):Promise.resolve()}function p(m,S){if(i[m].isActive===S)return Promise.resolve();n.variantChildren?.forEach(_=>_.animationState?.setActive(m,S)),i[m].isActive=S;const b=f(m);for(const _ in i)i[_].protectedKeys={};return b}return{animateChanges:f,setActive:p,setAnimateFunction:c,getState:()=>i,reset:()=>{i=x7()}}}function WB(n,t){return typeof t=="string"?t!==n:Array.isArray(t)?!C7(t,n):!1}function Cc(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function x7(){return{animate:Cc(!0),whileInView:Cc(),whileHover:Cc(),whileTap:Cc(),whileDrag:Cc(),whileFocus:Cc(),exit:Cc()}}class $o{constructor(t){this.isMounted=!1,this.node=t}update(){}}class $B extends $o{constructor(t){super(t),t.animationState||(t.animationState=IB(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();hg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let tV=0;class eV extends $o{constructor(){super(...arguments),this.id=tV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const u=this.node.animationState.setActive("exit",!t);i&&!t&&u.then(()=>{i(this.id)})}mount(){const{register:t,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const nV={animation:{Feature:$B},exit:{Feature:eV}};function T0(n,t,i,s={passive:!0}){return n.addEventListener(t,i,s),()=>n.removeEventListener(t,i)}function C0(n){return{point:{x:n.pageX,y:n.pageY}}}const aV=n=>t=>bS(t)&&n(t,C0(t));function _0(n,t,i,s){return T0(n,t,aV(i),s)}const D7=1e-4,iV=1-D7,sV=1+D7,A7=.01,lV=0-A7,rV=0+A7;function hi(n){return n.max-n.min}function oV(n,t,i){return Math.abs(n-t)<=i}function M7(n,t,i,s=.5){n.origin=s,n.originPoint=Cn(t.min,t.max,n.origin),n.scale=hi(i)/hi(t),n.translate=Cn(i.min,i.max,n.origin)-n.originPoint,(n.scale>=iV&&n.scale<=sV||isNaN(n.scale))&&(n.scale=1),(n.translate>=lV&&n.translate<=rV||isNaN(n.translate))&&(n.translate=0)}function x0(n,t,i,s){M7(n.x,t.x,i.x,s?s.originX:void 0),M7(n.y,t.y,i.y,s?s.originY:void 0)}function N7(n,t,i){n.min=i.min+t.min,n.max=n.min+hi(t)}function uV(n,t,i){N7(n.x,t.x,i.x),N7(n.y,t.y,i.y)}function O7(n,t,i){n.min=t.min-i.min,n.max=n.min+hi(t)}function gg(n,t,i){O7(n.x,t.x,i.x),O7(n.y,t.y,i.y)}function xs(n){return[n("x"),n("y")]}const R7=({current:n})=>n?n.ownerDocument.defaultView:null,z7=(n,t)=>Math.abs(n-t);function cV(n,t){const i=z7(n.x,t.x),s=z7(n.y,t.y);return Math.sqrt(i**2+s**2)}class H7{constructor(t,i,{transformPagePoint:s,contextWindow:u=window,dragSnapToOrigin:c=!1,distanceThreshold:f=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=PS(this.lastMoveEventInfo,this.history),D=this.startEvent!==null,A=cV(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!D&&!A)return;const{point:N}=x,{timestamp:R}=wa;this.history.push({...N,timestamp:R});const{onStart:O,onMove:U}=this.handlers;D||(O&&O(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),U&&U(this.lastMoveEvent,x)},this.handlePointerMove=(x,D)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=LS(D,this.transformPagePoint),dn.update(this.updatePoint,!0)},this.handlePointerUp=(x,D)=>{this.end();const{onEnd:A,onSessionEnd:N,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=PS(x.type==="pointercancel"?this.lastMoveEventInfo:LS(D,this.transformPagePoint),this.history);this.startEvent&&A&&A(x,O),N&&N(x,O)},!bS(t))return;this.dragSnapToOrigin=c,this.handlers=i,this.transformPagePoint=s,this.distanceThreshold=f,this.contextWindow=u||window;const p=C0(t),m=LS(p,this.transformPagePoint),{point:S}=m,{timestamp:b}=wa;this.history=[{...S,timestamp:b}];const{onSessionStart:_}=i;_&&_(t,PS(m,this.history)),this.removeListeners=f0(_0(this.contextWindow,"pointermove",this.handlePointerMove),_0(this.contextWindow,"pointerup",this.handlePointerUp),_0(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fo(this.updatePoint)}}function LS(n,t){return t?{point:t(n.point)}:n}function w7(n,t){return{x:n.x-t.x,y:n.y-t.y}}function PS({point:n},t){return{point:n,delta:w7(n,U7(t)),offset:w7(n,fV(t)),velocity:hV(t,.1)}}function fV(n){return n[0]}function U7(n){return n[n.length-1]}function hV(n,t){if(n.length<2)return{x:0,y:0};let i=n.length-1,s=null;const u=U7(n);for(;i>=0&&(s=n[i],!(u.timestamp-s.timestamp>ol(t)));)i--;if(!s)return{x:0,y:0};const c=_s(u.timestamp-s.timestamp);if(c===0)return{x:0,y:0};const f={x:(u.x-s.x)/c,y:(u.y-s.y)/c};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function dV(n,{min:t,max:i},s){return t!==void 0&&n<t?n=s?Cn(t,n,s.min):Math.max(n,t):i!==void 0&&n>i&&(n=s?Cn(i,n,s.max):Math.min(n,i)),n}function B7(n,t,i){return{min:t!==void 0?n.min+t:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function pV(n,{top:t,left:i,bottom:s,right:u}){return{x:B7(n.x,i,u),y:B7(n.y,t,s)}}function V7(n,t){let i=t.min-n.min,s=t.max-n.max;return t.max-t.min<n.max-n.min&&([i,s]=[s,i]),{min:i,max:s}}function mV(n,t){return{x:V7(n.x,t.x),y:V7(n.y,t.y)}}function gV(n,t){let i=.5;const s=hi(n),u=hi(t);return u>s?i=h0(t.min,t.max-s,n.min):s>u&&(i=h0(n.min,n.max-u,t.min)),Vr(0,1,i)}function yV(n,t){const i={};return t.min!==void 0&&(i.min=t.min-n.min),t.max!==void 0&&(i.max=t.max-n.min),i}const YS=.35;function vV(n=YS){return n===!1?n=0:n===!0&&(n=YS),{x:G7(n,"left","right"),y:G7(n,"top","bottom")}}function G7(n,t,i){return{min:j7(n,t),max:j7(n,i)}}function j7(n,t){return typeof n=="number"?n:n[t]||0}const SV=new WeakMap;class bV{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=fa(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:i=!1,distanceThreshold:s}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const c=_=>{i?(this.stopAnimation(),this.snapToCursor(C0(_).point)):this.pauseAnimation()},f=(_,x)=>{this.stopAnimation();const{drag:D,dragPropagation:A,onDragStart:N}=this.getProps();if(D&&!A&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zU(D),!this.openDragLock))return;this.latestPointerEvent=_,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xs(O=>{let U=this.getAxisMotionValue(O).get()||0;if(kl.test(U)){const{projection:j}=this.visualElement;if(j&&j.layout){const V=j.layout.layoutBox[O];V&&(U=hi(V)*(parseFloat(U)/100))}}this.originPoint[O]=U}),N&&dn.postRender(()=>N(_,x)),VS(this.visualElement,"transform");const{animationState:R}=this.visualElement;R&&R.setActive("whileDrag",!0)},p=(_,x)=>{this.latestPointerEvent=_,this.latestPanInfo=x;const{dragPropagation:D,dragDirectionLock:A,onDirectionLock:N,onDrag:R}=this.getProps();if(!D&&!this.openDragLock)return;const{offset:O}=x;if(A&&this.currentDirection===null){this.currentDirection=EV(O),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",x.point,O),this.updateAxis("y",x.point,O),this.visualElement.render(),R&&R(_,x)},m=(_,x)=>{this.latestPointerEvent=_,this.latestPanInfo=x,this.stop(_,x),this.latestPointerEvent=null,this.latestPanInfo=null},S=()=>xs(_=>this.getAnimationState(_)==="paused"&&this.getAxisMotionValue(_).animation?.play()),{dragSnapToOrigin:b}=this.getProps();this.panSession=new H7(t,{onSessionStart:c,onStart:f,onMove:p,onSessionEnd:m,resumeAnimation:S},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:s,contextWindow:R7(this.visualElement)})}stop(t,i){const s=t||this.latestPointerEvent,u=i||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!u||!s)return;const{velocity:f}=u;this.startAnimation(f);const{onDragEnd:p}=this.getProps();p&&dn.postRender(()=>p(s,u))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(t,i,s){const{drag:u}=this.getProps();if(!s||!yg(t,u,this.currentDirection))return;const c=this.getAxisMotionValue(t);let f=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(f=dV(f,this.constraints[t],this.elastic[t])),c.set(f)}resolveConstraints(){const{dragConstraints:t,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,u=this.constraints;t&&E0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=pV(s.layoutBox,t):this.constraints=!1,this.elastic=vV(i),u!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&xs(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=yV(s.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!E0(t))return!1;const s=t.current;Gr(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const c=TB(s,u.root,this.visualElement.getTransformPagePoint());let f=mV(u.layout.layoutBox,c);if(i){const p=i(SB(f));this.hasMutatedConstraints=!!p,p&&(f=i7(p))}return f}startAnimation(t){const{drag:i,dragMomentum:s,dragElastic:u,dragTransition:c,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},S=xs(b=>{if(!yg(b,i,this.currentDirection))return;let _=m&&m[b]||{};f&&(_={min:0,max:0});const x=u?200:1e6,D=u?40:1e7,A={type:"inertia",velocity:s?t[b]:0,bounceStiffness:x,bounceDamping:D,timeConstant:750,restDelta:1,restSpeed:10,...c,..._};return this.startAxisValueAnimation(b,A)});return Promise.all(S).then(p)}startAxisValueAnimation(t,i){const s=this.getAxisMotionValue(t);return VS(this.visualElement,t),s.start(GS(t,s,0,i,this.visualElement,!1))}stopAnimation(){xs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){xs(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),u=s[i];return u||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){xs(i=>{const{drag:s}=this.getProps();if(!yg(i,s,this.currentDirection))return;const{projection:u}=this.visualElement,c=this.getAxisMotionValue(i);if(u&&u.layout){const{min:f,max:p}=u.layout.layoutBox[i],m=c.get()||0;c.set(t[i]-Cn(f,p,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:s}=this.visualElement;if(!E0(i)||!s||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};xs(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const m=p.get();u[f]=gV({min:m,max:m},this.constraints[f])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),xs(f=>{if(!yg(f,t,null))return;const p=this.getAxisMotionValue(f),{min:m,max:S}=this.constraints[f];p.set(Cn(m,S,u[f]))})}addListeners(){if(!this.visualElement.current)return;SV.set(this.visualElement,this);const t=this.visualElement.current,i=_0(t,"pointerdown",m=>{const{drag:S,dragListener:b=!0}=this.getProps();S&&b&&!B8(m.target)&&this.start(m)}),s=()=>{const{dragConstraints:m}=this.getProps();E0(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,c=u.addEventListener("measure",s);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),dn.read(s);const f=T0(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:S})=>{this.isDragging&&S&&(xs(b=>{const _=this.getAxisMotionValue(b);_&&(this.originPoint[b]+=m[b].translate,_.set(_.get()+m[b].translate))}),this.visualElement.render())}));return()=>{f(),i(),c(),p&&p()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:s=!1,dragPropagation:u=!1,dragConstraints:c=!1,dragElastic:f=YS,dragMomentum:p=!0}=t;return{...t,drag:i,dragDirectionLock:s,dragPropagation:u,dragConstraints:c,dragElastic:f,dragMomentum:p}}}function yg(n,t,i){return(t===!0||t===n)&&(i===null||i===n)}function EV(n,t=10){let i=null;return Math.abs(n.y)>t?i="y":Math.abs(n.x)>t&&(i="x"),i}class TV extends $o{constructor(t){super(t),this.removeGroupControls=Cs,this.removeListeners=Cs,this.controls=new bV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Cs}update(){const{dragControls:t}=this.node.getProps(),{dragControls:i}=this.node.prevProps||{};t!==i&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const L7=n=>(t,i)=>{n&&dn.postRender(()=>n(t,i))};class CV extends $o{constructor(){super(...arguments),this.removePointerDownListener=Cs}onPointerDown(t){this.session=new H7(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:R7(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:s,onPanEnd:u}=this.node.getProps();return{onSessionStart:L7(t),onStart:L7(i),onMove:s,onEnd:(c,f)=>{delete this.session,u&&dn.postRender(()=>u(c,f))}}}mount(){this.removePointerDownListener=_0(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const vg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let qS=!1;class _V extends H.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s,layoutId:u}=this.props,{projection:c}=t;c&&(i.group&&i.group.add(c),s&&s.register&&u&&s.register(c),qS&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,onExitComplete:()=>this.safeToRemove()})),vg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:s,drag:u,isPresent:c}=this.props,{projection:f}=s;return f&&(f.isPresent=c,qS=!0,u||t.layoutDependency!==i||i===void 0||t.isPresent!==c?f.willUpdate():this.safeToRemove(),t.isPresent!==c&&(c?f.promote():f.relegate()||dn.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),SS.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s}=this.props,{projection:u}=t;qS=!0,u&&(u.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(u),s&&s.deregister&&s.deregister(u))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function P7(n){const[t,i]=LU(),s=H.useContext(Db);return X.jsx(_V,{...n,layoutGroup:s,switchLayoutGroup:H.useContext(n7),isPresent:t,safeToRemove:i})}function xV(n,t,i){const s=Ia(n)?n:Th(n);return s.start(GS("",s,t,i)),s.animation}const DV=(n,t)=>n.depth-t.depth;class AV{constructor(){this.children=[],this.isDirty=!1}add(t){Bv(this.children,t),this.isDirty=!0}remove(t){Vv(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(DV),this.isDirty=!1,this.children.forEach(t)}}function MV(n,t){const i=Ai.now(),s=({timestamp:u})=>{const c=u-i;c>=t&&(Fo(s),n(c-t))};return dn.setup(s,!0),()=>Fo(s)}const Y7=["TopLeft","TopRight","BottomLeft","BottomRight"],NV=Y7.length,q7=n=>typeof n=="string"?parseFloat(n):n,X7=n=>typeof n=="number"||wt.test(n);function OV(n,t,i,s,u,c){u?(n.opacity=Cn(0,i.opacity??1,RV(s)),n.opacityExit=Cn(t.opacity??1,0,zV(s))):c&&(n.opacity=Cn(t.opacity??1,i.opacity??1,s));for(let f=0;f<NV;f++){const p=`border${Y7[f]}Radius`;let m=K7(t,p),S=K7(i,p);if(m===void 0&&S===void 0)continue;m||(m=0),S||(S=0),m===0||S===0||X7(m)===X7(S)?(n[p]=Math.max(Cn(q7(m),q7(S),s),0),(kl.test(S)||kl.test(m))&&(n[p]+="%")):n[p]=S}(t.rotate||i.rotate)&&(n.rotate=Cn(t.rotate||0,i.rotate||0,s))}function K7(n,t){return n[t]!==void 0?n[t]:n.borderRadius}const RV=Q7(0,.5,Gb),zV=Q7(.5,.95,Cs);function Q7(n,t,i){return s=>s<n?0:s>t?1:i(h0(n,t,s))}function Z7(n,t){n.min=t.min,n.max=t.max}function cl(n,t){Z7(n.x,t.x),Z7(n.y,t.y)}function J7(n,t){n.translate=t.translate,n.scale=t.scale,n.originPoint=t.originPoint,n.origin=t.origin}function F7(n,t,i,s,u){return n-=t,n=mg(n,1/i,s),u!==void 0&&(n=mg(n,1/u,s)),n}function HV(n,t=0,i=1,s=.5,u,c=n,f=n){if(kl.test(t)&&(t=parseFloat(t),t=Cn(f.min,f.max,t/100)-f.min),typeof t!="number")return;let p=Cn(c.min,c.max,s);n===c&&(p-=t),n.min=F7(n.min,t,i,p,u),n.max=F7(n.max,t,i,p,u)}function k7(n,t,[i,s,u],c,f){HV(n,t[i],t[s],t[u],t.scale,c,f)}const wV=["x","scaleX","originX"],UV=["y","scaleY","originY"];function I7(n,t,i,s){k7(n.x,t,wV,i?i.x:void 0,s?s.x:void 0),k7(n.y,t,UV,i?i.y:void 0,s?s.y:void 0)}function W7(n){return n.translate===0&&n.scale===1}function $7(n){return W7(n.x)&&W7(n.y)}function t9(n,t){return n.min===t.min&&n.max===t.max}function BV(n,t){return t9(n.x,t.x)&&t9(n.y,t.y)}function e9(n,t){return Math.round(n.min)===Math.round(t.min)&&Math.round(n.max)===Math.round(t.max)}function n9(n,t){return e9(n.x,t.x)&&e9(n.y,t.y)}function a9(n){return hi(n.x)/hi(n.y)}function i9(n,t){return n.translate===t.translate&&n.scale===t.scale&&n.originPoint===t.originPoint}class VV{constructor(){this.members=[]}add(t){Bv(this.members,t),t.scheduleRender()}remove(t){if(Vv(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){const i=this.members.findIndex(u=>t===u);if(i===0)return!1;let s;for(let u=i;u>=0;u--){const c=this.members[u];if(c.isPresent!==!1){s=c;break}}return s?(this.promote(s),!0):!1}promote(t,i){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,i&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:u}=t.options;u===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:i,resumingFrom:s}=t;i.onExitComplete&&i.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function GV(n,t,i){let s="";const u=n.x.translate/t.x,c=n.y.translate/t.y,f=i?.z||0;if((u||c||f)&&(s=`translate3d(${u}px, ${c}px, ${f}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:S,rotate:b,rotateX:_,rotateY:x,skewX:D,skewY:A}=i;S&&(s=`perspective(${S}px) ${s}`),b&&(s+=`rotate(${b}deg) `),_&&(s+=`rotateX(${_}deg) `),x&&(s+=`rotateY(${x}deg) `),D&&(s+=`skewX(${D}deg) `),A&&(s+=`skewY(${A}deg) `)}const p=n.x.scale*t.x,m=n.y.scale*t.y;return(p!==1||m!==1)&&(s+=`scale(${p}, ${m})`),s||"none"}const XS=["","X","Y","Z"],jV=1e3;let LV=0;function KS(n,t,i,s){const{latestValues:u}=t;u[n]&&(i[n]=u[n],t.setStaticValue(n,0),s&&(s[n]=0))}function s9(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:t}=n.options;if(!t)return;const i=b7(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:u,layoutId:c}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",dn,!(u||c))}const{parent:s}=n;s&&!s.hasCheckedOptimisedAppear&&s9(s)}function l9({attachResizeListener:n,defaultParent:t,measureScroll:i,checkIsScrollRoot:s,resetTransform:u}){return class{constructor(f={},p=t?.()){this.id=LV++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(qV),this.nodes.forEach(ZV),this.nodes.forEach(JV),this.nodes.forEach(XV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new AV)}addEventListener(f,p){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Lv),this.eventHandlers.get(f).add(p)}notifyListeners(f,...p){const m=this.eventHandlers.get(f);m&&m.notify(...p)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=j8(f)&&!VU(f),this.instance=f;const{layoutId:p,layout:m,visualElement:S}=this.options;if(S&&!S.current&&S.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||p)&&(this.isLayoutDirty=!0),n){let b,_=0;const x=()=>this.root.updateBlockedByResize=!1;dn.read(()=>{_=window.innerWidth}),n(f,()=>{const D=window.innerWidth;D!==_&&(_=D,this.root.updateBlockedByResize=!0,b&&b(),b=MV(x,250),vg.hasAnimatedSinceResize&&(vg.hasAnimatedSinceResize=!1,this.nodes.forEach(u9)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&S&&(p||m)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeLayoutChanged:x,layout:D})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||S.getDefaultTransition()||$V,{onLayoutAnimationStart:N,onLayoutAnimationComplete:R}=S.getProps(),O=!this.targetLayout||!n9(this.targetLayout,D),U=!_&&x;if(this.options.layoutRoot||this.resumeFrom||U||_&&(O||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const j={...gS(A,"layout"),onPlay:N,onComplete:R};(S.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j),this.setAnimationOrigin(b,U)}else _||u9(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=D})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(FV),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s9(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const _=this.path[b];_.shouldResetTransform=!0,_.updateScroll("snapshot"),_.options.layoutRoot&&_.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const S=this.getTransformTemplate();this.prevTransformTemplateValue=S?S(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(r9);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(o9);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(QV),this.nodes.forEach(PV),this.nodes.forEach(YV)):this.nodes.forEach(o9),this.clearAllSnapshots();const p=Ai.now();wa.delta=Vr(0,1e3/60,p-wa.timestamp),wa.timestamp=p,wa.isProcessing=!0,Xv.update.process(wa),Xv.preRender.process(wa),Xv.render.process(wa),wa.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,SS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(KV),this.sharedNodes.forEach(kV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!hi(this.snapshot.measuredBox.x)&&!hi(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=fa(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(p=!1),p&&this.instance){const m=s(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!$7(this.projectionDelta),m=this.getTransformTemplate(),S=m?m(this.latestValues,""):void 0,b=S!==this.prevTransformTemplateValue;f&&this.instance&&(p||Tc(this.latestValues)||b)&&(u(this.instance,S),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return f&&(m=this.removeTransform(m)),tG(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:f}=this.options;if(!f)return fa();const p=f.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(eG))){const{scroll:S}=this.root;S&&(_h(p.x,S.offset.x),_h(p.y,S.offset.y))}return p}removeElementScroll(f){const p=fa();if(cl(p,f),this.scroll?.wasRoot)return p;for(let m=0;m<this.path.length;m++){const S=this.path[m],{scroll:b,options:_}=S;S!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&cl(p,f),_h(p.x,b.offset.x),_h(p.y,b.offset.y))}return p}applyTransform(f,p=!1){const m=fa();cl(m,f);for(let S=0;S<this.path.length;S++){const b=this.path[S];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&xh(m,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),Tc(b.latestValues)&&xh(m,b.latestValues)}return Tc(this.latestValues)&&xh(m,this.latestValues),m}removeTransform(f){const p=fa();cl(p,f);for(let m=0;m<this.path.length;m++){const S=this.path[m];if(!S.instance||!Tc(S.latestValues))continue;HS(S.latestValues)&&S.updateSnapshot();const b=fa(),_=S.measurePageBox();cl(b,_),I7(p,S.latestValues,S.snapshot?S.snapshot.layoutBox:void 0,b)}return Tc(this.latestValues)&&I7(p,this.latestValues),p}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==wa.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(f||m&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!this.layout||!(b||_))return;this.resolvedRelativeTargetAt=wa.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=fa(),this.targetWithTransforms=fa()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):cl(this.target,this.layout.layoutBox),o7(this.target,this.targetDelta)):cl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||HS(this.parent.latestValues)||s7(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,p,m){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=fa(),this.relativeTargetOrigin=fa(),gg(this.relativeTargetOrigin,p,m),cl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const f=this.getLead(),p=!!this.resumingFrom||this!==f;let m=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===wa.timestamp&&(m=!1),m)return;const{layout:S,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(S||b))return;cl(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,x=this.treeScale.y;EB(this.layoutCorrected,this.treeScale,this.path,p),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=fa());const{target:D}=f;if(!D){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(J7(this.prevProjectionDelta.x,this.projectionDelta.x),J7(this.prevProjectionDelta.y,this.projectionDelta.y)),x0(this.projectionDelta,this.layoutCorrected,D,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==x||!i9(this.projectionDelta.x,this.prevProjectionDelta.x)||!i9(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",D))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){if(this.options.visualElement?.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Dh(),this.projectionDelta=Dh(),this.projectionDeltaWithTransform=Dh()}setAnimationOrigin(f,p=!1){const m=this.snapshot,S=m?m.latestValues:{},b={...this.latestValues},_=Dh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=fa(),D=m?m.source:void 0,A=this.layout?this.layout.source:void 0,N=D!==A,R=this.getStack(),O=!R||R.members.length<=1,U=!!(N&&!O&&this.options.crossfade===!0&&!this.path.some(WV));this.animationProgress=0;let j;this.mixTargetDelta=V=>{const F=V/1e3;c9(_.x,f.x,F),c9(_.y,f.y,F),this.setTargetDelta(_),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gg(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),IV(this.relativeTarget,this.relativeTargetOrigin,x,F),j&&BV(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=fa()),cl(j,this.relativeTarget)),N&&(this.animationValues=b,OV(b,S,this.latestValues,F,U,O)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Fo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dn.update(()=>{vg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Th(0)),this.currentAnimation=xV(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),f.onUpdate&&f.onUpdate(p)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jV),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:m,layout:S,latestValues:b}=f;if(!(!p||!m||!S)){if(this!==f&&this.layout&&S&&m9(this.options.animationType,this.layout.layoutBox,S.layoutBox)){m=this.target||fa();const _=hi(this.layout.layoutBox.x);m.x.min=f.target.x.min,m.x.max=m.x.min+_;const x=hi(this.layout.layoutBox.y);m.y.min=f.target.y.min,m.y.max=m.y.min+x}cl(p,m),xh(p,b),x0(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new VV),this.sharedNodes.get(f).add(p);const S=p.options.initialPromotionConfig;p.promote({transition:S?S.transition:void 0,preserveFollowOpacity:S&&S.shouldPreserveFollowOpacity?S.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){const{layoutId:f}=this.options;return f?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:f}=this.options;return f?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:m}={}){const S=this.getStack();S&&S.promote(this,m),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:m}=f;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const S={};m.z&&KS("z",f,S,this.animationValues);for(let b=0;b<XS.length;b++)KS(`rotate${XS[b]}`,f,S,this.animationValues),KS(`skew${XS[b]}`,f,S,this.animationValues);f.render();for(const b in S)f.setStaticValue(b,S[b]),this.animationValues&&(this.animationValues[b]=S[b]);f.scheduleRender()}applyProjectionStyles(f,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=pg(p?.pointerEvents)||"",f.transform=m?m(this.latestValues,""):"none";return}const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=pg(p?.pointerEvents)||""),this.hasProjected&&!Tc(this.latestValues)&&(f.transform=m?m({},""):"none",this.hasProjected=!1);return}f.visibility="";const b=S.animationValues||S.latestValues;this.applyTransformsToTarget();let _=GV(this.projectionDeltaWithTransform,this.treeScale,b);m&&(_=m(b,_)),f.transform=_;const{x,y:D}=this.projectionDelta;f.transformOrigin=`${x.origin*100}% ${D.origin*100}% 0`,S.animationValues?f.opacity=S===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:f.opacity=S===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const A in _S){if(b[A]===void 0)continue;const{correct:N,applyTo:R,isCSSVariable:O}=_S[A],U=_==="none"?b[A]:N(b[A],S);if(R){const j=R.length;for(let V=0;V<j;V++)f[R[V]]=U}else O?this.options.visualElement.renderState.vars[A]=U:f[A]=U}this.options.layoutId&&(f.pointerEvents=S===this?pg(p?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>f.currentAnimation?.stop()),this.root.nodes.forEach(r9),this.root.sharedNodes.clear()}}}function PV(n){n.updateLayout()}function YV(n){const t=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=n.layout,{animationType:u}=n.options,c=t.source!==n.layout.source;u==="size"?xs(b=>{const _=c?t.measuredBox[b]:t.layoutBox[b],x=hi(_);_.min=i[b].min,_.max=_.min+x}):m9(u,t.layoutBox,i)&&xs(b=>{const _=c?t.measuredBox[b]:t.layoutBox[b],x=hi(i[b]);_.max=_.min+x,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+x)});const f=Dh();x0(f,i,t.layoutBox);const p=Dh();c?x0(p,n.applyTransform(s,!0),t.measuredBox):x0(p,i,t.layoutBox);const m=!$7(f);let S=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:x}=b;if(_&&x){const D=fa();gg(D,t.layoutBox,_.layoutBox);const A=fa();gg(A,i,x.layoutBox),n9(D,A)||(S=!0),b.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=D,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:p,layoutDelta:f,hasLayoutChanged:m,hasRelativeLayoutChanged:S})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function qV(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function XV(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function KV(n){n.clearSnapshot()}function r9(n){n.clearMeasurements()}function o9(n){n.isLayoutDirty=!1}function QV(n){const{visualElement:t}=n.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),n.resetTransform()}function u9(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function ZV(n){n.resolveTargetDelta()}function JV(n){n.calcProjection()}function FV(n){n.resetSkewAndRotation()}function kV(n){n.removeLeadSnapshot()}function c9(n,t,i){n.translate=Cn(t.translate,0,i),n.scale=Cn(t.scale,1,i),n.origin=t.origin,n.originPoint=t.originPoint}function f9(n,t,i,s){n.min=Cn(t.min,i.min,s),n.max=Cn(t.max,i.max,s)}function IV(n,t,i,s){f9(n.x,t.x,i.x,s),f9(n.y,t.y,i.y,s)}function WV(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const $V={duration:.45,ease:[.4,0,.1,1]},h9=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),d9=h9("applewebkit/")&&!h9("chrome/")?Math.round:Cs;function p9(n){n.min=d9(n.min),n.max=d9(n.max)}function tG(n){p9(n.x),p9(n.y)}function m9(n,t,i){return n==="position"||n==="preserve-aspect"&&!oV(a9(t),a9(i),.2)}function eG(n){return n!==n.root&&n.scroll?.wasRoot}const nG=l9({attachResizeListener:(n,t)=>T0(n,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),QS={current:void 0},g9=l9({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!QS.current){const n=new nG({});n.mount(window),n.setOptions({layoutScroll:!0}),QS.current=n}return QS.current},resetTransform:(n,t)=>{n.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),aG={pan:{Feature:CV},drag:{Feature:TV,ProjectionNode:g9,MeasureLayout:P7}};function y9(n,t,i){const{props:s}=n;n.animationState&&s.whileHover&&n.animationState.setActive("whileHover",i==="Start");const u="onHover"+i,c=s[u];c&&dn.postRender(()=>c(t,C0(t)))}class iG extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=HU(t,(i,s)=>(y9(this.node,s,"Start"),u=>y9(this.node,u,"End"))))}unmount(){}}class sG extends $o{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=f0(T0(this.node.current,"focus",()=>this.onFocus()),T0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v9(n,t,i){const{props:s}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&s.whileTap&&n.animationState.setActive("whileTap",i==="Start");const u="onTap"+(i==="End"?"":i),c=s[u];c&&dn.postRender(()=>c(t,C0(t)))}class lG extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=BU(t,(i,s)=>(v9(this.node,s,"Start"),(u,{success:c})=>v9(this.node,u,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ZS=new WeakMap,JS=new WeakMap,rG=n=>{const t=ZS.get(n.target);t&&t(n)},oG=n=>{n.forEach(rG)};function uG({root:n,...t}){const i=n||document;JS.has(i)||JS.set(i,{});const s=JS.get(i),u=JSON.stringify(t);return s[u]||(s[u]=new IntersectionObserver(oG,{root:n,...t})),s[u]}function cG(n,t,i){const s=uG(t);return ZS.set(n,i),s.observe(n),()=>{ZS.delete(n),s.unobserve(n)}}const fG={some:0,all:1};class hG extends $o{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:i,margin:s,amount:u="some",once:c}=t,f={root:i?i.current:void 0,rootMargin:s,threshold:typeof u=="number"?u:fG[u]},p=m=>{const{isIntersecting:S}=m;if(this.isInView===S||(this.isInView=S,c&&!S&&this.hasEnteredView))return;S&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",S);const{onViewportEnter:b,onViewportLeave:_}=this.node.getProps(),x=S?b:_;x&&x(m)};return cG(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(dG(t,i))&&this.startObserver()}unmount(){}}function dG({viewport:n={}},{viewport:t={}}={}){return i=>n[i]!==t[i]}const pG={...nV,...{inView:{Feature:hG},tap:{Feature:lG},focus:{Feature:sG},hover:{Feature:iG}},...aG,...{layout:{ProjectionNode:g9,MeasureLayout:P7}}},S9=vB(pG,RB),b9=({visible:n,target:t,appendTo:i=document.body,unmountWhenHidden:s=!1,transitionDuration:u=400,showTransitionOptions:c="easeInOut",hideTransitionOptions:f="linear",approveText:p="DONE",shown:m,hidden:S,isClickedWithin:b,children:_})=>{const[x,D]=H.useState(-1),[A,N]=H.useState(-1),[R,O]=H.useState(n),[U,j]=H.useState(!0),V=H.useRef(100),F=H.useRef(101),$=H.useRef(void 0),st=H.useRef(void 0),I=H.useRef(void 0),et=H.useRef(!1),nt=u/1e3;H.useEffect(()=>{t&&($.current=xb(t));const gt=bb("zIndex",Tt=>Tt==="auto"||Tt==="-1"?!1:parseInt(Tt)>100).map(Tt=>parseInt(Tt,10));gt.length>0&&(V.current=Math.max(...gt)+1,F.current=Math.max(...gt)+2),j(!1),O(n)},[n,t]);const bt=gt=>{st.current=gt},lt=()=>{N(V.current),D(F.current),et.current=!0},dt=()=>{if(!st.current)return;m?.();let gt;$.current&&(gt=[$.current]);const Tt=Pt=>{Pt?b?.():(j(!1),O(!1))};I.current=Cb(st.current,Tt,gt)},pt=()=>{I.current&&_b(I.current)},tt=()=>{N(-1),D(-1),S?.()},w=Q1(()=>{R?lt():pt()}),Z=Q1(()=>{R?dt():tt(),j(!0)}),K={opacity:.5},at={opacity:0},St={opacity:1,pointerEvents:"auto"},W={opacity:0,pointerEvents:"none"};return et.current&&!R&&s===!0&&U?null:vT.createPortal(X.jsxs("div",{children:[X.jsx(S9.div,{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:A},initial:!1,animate:R?K:at}),X.jsxs(S9.div,{ref:gt=>{gt&&bt(gt)},className:"dark:bsc-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:x},initial:!1,animate:R?St:W,transition:{duration:nt,ease:R?c:f},onAnimationStart:w,onAnimationComplete:Z,children:[X.jsx("div",{className:"bsc:w-full",children:_}),X.jsx(X.Fragment,{children:X.jsx(Ql,{buttonType:"primary",fullWidth:!0,onClick:()=>O(!1),className:"bsc:text-xs bsc:font-bold",children:p})})]})]}),i)};var E9=(n=>(n[n.TopLeft=0]="TopLeft",n[n.TopRight=1]="TopRight",n[n.BottomLeft=2]="BottomLeft",n[n.BottomRight=3]="BottomRight",n))(E9||{}),T9=(n=>(n[n.TopLeft=0]="TopLeft",n[n.TopRight=1]="TopRight",n[n.BottomLeft=2]="BottomLeft",n[n.BottomRight=3]="BottomRight",n))(T9||{});class pn{static positionToTarget(t,i=2){const s=t.getBoundingClientRect();let u=0,c=0;const f=window.scrollY;switch(i){case 2:u=s.top+s.height+f,c=s.left;break;case 0:u=s.top+f,c=s.left;break;case 3:u=s.top+s.height+f,c=s.left+s.width;break;case 1:u=s.top+f,c=s.left+s.width}return{top:u,left:c}}static positionElementToTarget(t,i,s=0,u=2){let{left:c,top:f}=pn.positionToTarget(i,u);const p=t.getBoundingClientRect();switch(s){case 0:break;case 1:c=c-p.width;break;case 2:f=f-p.height;break;case 3:f=f-p.height,c=c-p.width;break}return{top:f,left:c}}static canPositionElementOnScreenWithTarget(t,i){const s=pn.getScreenDimensions(),u=t.getBoundingClientRect(),c=pn.positionElementToTarget(t,i,0,2);if(c.left+u.width<s.width&&c.top+u.height<s.height||pn.positionElementToTarget(t,i,1,3).left>=0&&c.top+u.height<s.height)return!0;const p=pn.positionElementToTarget(t,i,2,0);if(p.left+u.width<s.width&&p.top>=0)return!0;const m=pn.positionElementToTarget(t,i,3,1);return m.left>=0&&m.top>=0}static canPositionElementOnScreen(t){const i=pn.getScreenDimensions(),s=t.getBoundingClientRect();return s.width<=i.width&&s.height<=i.height}static positionElementToTargetOnScreen(t,i,s=0,u=2){const{left:c,top:f}=pn.positionElementToTarget(t,i,s,u),p=t.getBoundingClientRect(),m=pn.determineOffScreenLocation(p);if(m){if(s===0&&u===2){if(m.right&&!m.bottom)return pn.positionElementToTarget(t,i,1,3);if(m.bottom&&!m.right)return pn.positionElementToTarget(t,i,2,0);if(m.right&&m.bottom)return pn.positionElementToTarget(t,i,3,1)}else if(s===1&&u===3){if(m.left&&!m.bottom)return pn.positionElementToTarget(t,i,0,2);if(m.bottom&&!m.left)return pn.positionElementToTarget(t,i,3,1);if(m.left&&m.bottom)return pn.positionElementToTarget(t,i,2,0)}}return{top:f,left:c}}static determineOffScreenLocation(t){const i=pn.getScreenDimensions(),s={left:t.left<0,top:t.top<0,right:t.left+t.width>i.width,bottom:t.top+t.height>i.height};return s.left||s.top||s.right||s.bottom?s:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const C9=({visible:n,target:t,targetPosition:i=E9.BottomLeft,elementAlignment:s=T9.TopLeft,shouldTargetCloseOverlay:u=!0,shouldMatchTargetWidth:c=!1,shouldScrollCloseOverlay:f=!1,shouldCheckZIndex:p=!1,shouldRemainOnScreen:m=!1,unmountWhenHidden:S=!1,transitionDuration:b=400,showTransitionOptions:_="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:D,hidden:A,isClickedWithin:N,markupCreated:R,children:O})=>{const[U,j]=H.useState(-1),[V,F]=H.useState(n),[$,st]=H.useState(!1),I=H.useRef(!1),et=H.useRef(100),nt=H.useRef({left:0,top:0,width:0}),bt=H.useRef(void 0),lt=H.useRef(void 0),dt=H.useRef(void 0),pt=H.useRef(void 0),tt=H.useRef(void 0),w=H.useRef(void 0),Z=H.useRef(!1),K=j4();H.useEffect(()=>(m===!0&&(w.current=new ResizeObserver(at)),()=>{m===!0&&(lt.current&&w.current?.unobserve(lt.current),w.current?.disconnect())}),[]),H.useEffect(()=>{if(t&&(bt.current=xb(t),f)){const Be=K?.isValidScrollableElement;dt.current=Sb(bt.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,Be),dt.current.tagName.toLowerCase()==="html"&&(dt.current=document)}if(p){const Be=bb("zIndex",At=>parseInt(At)>=100).map(At=>parseInt(At));Be.length>0&&(et.current=Math.max(...Be)+1)}n!==void 0&&F(n)},[t,n,f,p]);const at=Be=>{if(lt.current){const At=pn.getScreenDimensions(),ue=Be[Be.length-1].target,ta=ue.getBoundingClientRect(),ea=pn.determineOffScreenLocation(ta);if(ea){if(bt.current&&pn.canPositionElementOnScreenWithTarget(ue,bt.current)){const An=pn.positionElementToTargetOnScreen(lt.current,bt.current,s,i);nt.current={...nt.current,...An}}else ea.right?nt.current.left=At.width-ta.width:ea.left&&(nt.current.left=0),ea.bottom?nt.current.top=At.height-ta.height:ea.top&&(nt.current.top=0);St()}}},St=s0(()=>{I.current=!I.current,st(I.current)},20),W=()=>{j(et.current)},gt=()=>{if(!lt.current)return;D?.();let Be;!u&&bt.current&&(Be=[bt.current]);const At=ue=>{ue?N?.():F(!1)};pt.current=Cb(lt.current,At,Be),f&&(tt.current=cR(ue=>lt.current&&AH(ue,lt.current)&&F(!1),100,{leading:!0}),dt.current&&dt.current.addEventListener("scroll",tt.current)),Z.current=!0},Tt=()=>{dt.current&&tt.current&&(dt.current.removeEventListener("scroll",tt.current),tt.current=void 0),pt.current&&_b(pt.current)},Pt=()=>{j(-1),A?.()},le=Be=>{if(m===!0&&lt.current&&w.current?.unobserve(lt.current),lt.current=Be,R?.(Be),bt.current){const At=pn.positionElementToTarget(lt.current,bt.current,s,i);nt.current={...At,width:bt.current.offsetWidth},m===!0&&(pn.canPositionElementOnScreenWithTarget(lt.current,bt.current)||pn.canPositionElementOnScreen(lt.current))&&w.current?.observe(lt.current)}},xn=Q1(()=>{V?W():Tt()}),xe=Q1(()=>{V?gt():Pt()}),Dn=H.useMemo(()=>V?{transition:`opacity ${b}ms ${_}`,pointerEvents:"auto",opacity:1}:{transition:`opacity ${b}ms ${x}`,pointerEvents:"none",opacity:0},[V]),ln=H.useMemo(()=>{const Be={top:`${nt.current.top}px`,left:`${nt.current.left}px`,zIndex:U};return c&&(Be.width=`${nt.current.width}px`),Be},[$,U,c]);return Z.current&&!V&&S===!0?null:X.jsx("div",{onTransitionStart:xn,onTransitionEnd:xe,children:X.jsx("div",{className:"bsc:fixed bsc:border! bsc:border-solid! bsc:border-black bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...ln,...Dn},ref:Be=>{Be&&le(Be)},children:O})})};let Sg;const mG=new Uint8Array(16);function gG(){if(!Sg&&(Sg=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sg))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sg(mG)}const Ua=[];for(let n=0;n<256;++n)Ua.push((n+256).toString(16).slice(1));function yG(n,t=0){return Ua[n[t+0]]+Ua[n[t+1]]+Ua[n[t+2]]+Ua[n[t+3]]+"-"+Ua[n[t+4]]+Ua[n[t+5]]+"-"+Ua[n[t+6]]+Ua[n[t+7]]+"-"+Ua[n[t+8]]+Ua[n[t+9]]+"-"+Ua[n[t+10]]+Ua[n[t+11]]+Ua[n[t+12]]+Ua[n[t+13]]+Ua[n[t+14]]+Ua[n[t+15]]}const _9={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function vG(n,t,i){if(_9.randomUUID&&!n)return _9.randomUUID();n=n||{};const s=n.random||(n.rng||gG)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,yG(s)}class D0{static create(t){const i=[];let s=0;for(let u=0,c=t.formatParts.length;u<c;u++){const f=t.formatParts[u],p=s,m=p+f.characterCount;i.push({startPosition:p,endPosition:m,...f}),s=m}return i}}class SG{instanceCollection;formatPartList;inputSlotCollection;currentPartIndex=0;currentPartIndices=[];currentCursorPosition=0;highlightCursorPosition=0;currentCursorStartPosition=-1;currentCursorEndPosition=-1;inputElement;inputSelection=null;inputRange;textNode;constructor(t,i){this.instanceCollection=A0.getInstance(),this.formatPartList=D0.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&this.inputRange?.startOffset===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,i){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let s,u,c=!0;i===void 0?(s=t,u=t):t<i?(s=t,u=i):(c=!1,s=i,u=t),this.inputRange.setStart(this.textNode,s),this.inputRange.setEnd(this.textNode,u),this.currentPartIndices=[],s===u?(this.currentCursorPosition=u,this.highlightCursorPosition=u,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(c?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=u:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==u&&(this.highlightCursorPosition=u):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==u?this.highlightCursorPosition=u:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s),this.currentCursorStartPosition=s,this.currentCursorEndPosition=u,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){const t=window.getSelection(),i=t?.getRangeAt(0);if(this.inputElement&&t&&i){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,p=>{const m=document.createRange();return m.selectNodeContents(p),m.compareBoundaryPoints(Range.END_TO_END,i)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let u=0;for(;s.nextNode();)u+=s.currentNode.textContent?.length||0;i.startContainer.nodeType===Node.TEXT_NODE&&(u+=i.startOffset);const c=this.inputSlotCollection.getLastSlotWithData(),f=c.startPosition+c.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(u>f?f:u):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length;this.setCursorSelection(i)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const t=this.currentCursorPosition-1;let i=this.formatPartList[this.currentPartIndex];if(t>=i.startPosition&&t<=i.endPosition)this.setCursorSelection(t);else for(let s=this.currentPartIndex-1;s>=0;s--)if(i=this.formatPartList[s],t>=i.startPosition&&t<=i.endPosition){i.isSeparator?this.setCursorSelection(this.formatPartList[s-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length;if(this.currentCursorPosition<i&&!this.isSelection){const s=this.currentCursorPosition+1;let u=this.formatPartList[this.currentPartIndex];if(s>=u.startPosition&&s<=u.endPosition)this.setCursorSelection(s);else for(let c=this.currentPartIndex+1,f=this.formatPartList.length;c<f;c++)if(u=this.formatPartList[c],s>=u.startPosition&&s<=u.endPosition){u.isSeparator?this.setCursorSelection(this.formatPartList[c+1].startPosition):this.setCursorSelection(s);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let i=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,s=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,u=this.formatPartList[this.currentPartIndex];if(i>=u.startPosition&&i<=u.endPosition||t&&s>=u.startPosition&&s<=u.endPosition)this.setCursorSelection(i,s);else for(let c=this.currentPartIndex-1;c>=0;c--)if(u=this.formatPartList[c],i>=u.startPosition&&i<=u.endPosition||t&&s>=u.startPosition&&s<=u.endPosition){u.isSeparator?(t?s=this.formatPartList[c-1].endPosition:i=this.formatPartList[c-1].endPosition,this.setCursorSelection(i,s)):this.setCursorSelection(i,s);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length,s=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<i||s){let u=s?this.highlightCursorPosition+1:this.currentCursorStartPosition,c=s?this.currentCursorEndPosition:this.currentCursorEndPosition+1,f=this.formatPartList[this.currentPartIndex];if(c>=f.startPosition&&c<=f.endPosition||s&&u>=f.startPosition&&u<=f.endPosition)this.setCursorSelection(u,c);else for(let p=this.currentPartIndex+1,m=this.formatPartList.length;p<m;p++)if(f=this.formatPartList[p],c>=f.startPosition&&c<=f.endPosition||s&&u>=f.startPosition&&u<=f.endPosition){f.isSeparator?(s?u=this.formatPartList[p+1].startPosition:c=this.formatPartList[p+1].startPosition,this.setCursorSelection(u,c)):this.setCursorSelection(u,c);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const i=this.formatPartList[t];if(this.currentCursorPosition>=i.startPosition&&this.currentCursorPosition<=i.endPosition){if(i.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const i=this.formatPartList[t];if(this.highlightCursorPosition>=i.startPosition&&this.highlightCursorPosition<=i.endPosition){if(i.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,i=this.formatPartList.length;t<i;t++){const s=this.formatPartList[t];s.isSeparator||(s.startPosition>=this.currentCursorStartPosition&&s.startPosition<=this.currentCursorEndPosition||s.endPosition>=this.currentCursorStartPosition&&s.endPosition<=this.currentCursorEndPosition||s.startPosition<this.currentCursorStartPosition&&s.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}createInputRangeSelection(){this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),this.inputSelection?.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),this.inputSelection?.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class bG{static create(t){const i=[];for(let s=0,u=t.length;s<u;s++){const c=t[s];c.isSeparator||i.push({partIndex:s,partText:"",isComplete:!1,...c})}return i}}class EG{inputSlots;constructor(t){this.inputSlots=bG.create(D0.create(t))}clearAllSlots(){for(let t=0,i=this.inputSlots.length;t<i;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(i=>i.partIndex===t)}getSlots(t){return this.inputSlots.filter(i=>t.includes(i.partIndex))}getSlotsFromCursorPosition(t){let i=-1;for(let s=0,u=this.inputSlots.length;s<u;s++){const c=this.inputSlots[s];if(t>=c.startPosition&&t<=c.endPosition){i=c.partIndex;break}}return i>-1?this.inputSlots.filter(s=>s.partIndex>=i):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(t){const i=this.inputSlots.findIndex(s=>s.partIndex===t);if(i>-1&&i+1<this.inputSlots.length)return this.inputSlots[i+1]}getPreviousSlot(t){const i=this.inputSlots.findIndex(s=>s.partIndex===t);if(i>-1&&i-1>=0)return this.inputSlots[i-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(s=>!s.isComplete);let i=t;for(let s=t+1,u=this.inputSlots.length;s<u;s++)this.inputSlots[s].partText.length>0&&(i=s);return this.inputSlots[i>-1?i:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class A0{static instance;static getInstance(){return this.instance||(this.instance=new TG),this.instance}}class TG{navigatorInstances;inputSlotInstances;constructor(){this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,i){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new SG(i,t)),this.navigatorInstances[t]}getInputSlotInstance(t,i){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new EG(i)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class FS{instanceCollection;formatPartList;inputSlotCollection;inputElement;constructor(t,i){this.instanceCollection=A0.getInstance(),this.formatPartList=D0.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t)}setInputElement(t){this.inputElement=t}render(){let t="";for(let i=0,s=this.formatPartList.length;i<s;i++){const u=this.formatPartList[i];if(u.isSeparator)t+=u.inputText;else{const c=this.inputSlotCollection.getSlot(i);c&&(t+=c.partText+c.inputText?.repeat(c.characterCount-c.partText.length))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var Il=(n=>(n[n.Text=0]="Text",n[n.Numeric=1]="Numeric",n))(Il||{});class x9{numberKeys=["0","1","2","3","4","5","6","7","8","9"];movementKeys=["ArrowLeft","ArrowRight","Home","End","a"];editingKeys=["Backspace","Delete"];ignoreKeys=["Shift","Alt","Control","Fn","Meta"];isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class CG{_currentIndex=0;index=0;formatParts;get currentIndex(){return this._currentIndex}constructor(t){this.formatParts=D0.create(t)}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class _G{formatParts;constructor(t){this.formatParts=D0.create(t)}getUniqueSeparators(){const t=[],i=this.formatParts.filter(s=>s.isSeparator);for(let s=0,u=i.length;s<u;s++){const c=i[s];c.inputText&&!t.includes(c.inputText)&&t.push(c.inputText)}return t}}class D9{constructor(t,i){this.format=t,this.instanceCollection=A0.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(i,t),this.keyTypeChecker=new x9,this.formatRenderer=new FS(t,i),this.formatPartList=new CG(t),this.partEntryList=new _G(t)}instanceCollection;inputSlotCollection;formatNavigator;keyTypeChecker;formatRenderer;formatPartList;partEntryList;setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let i=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(this.formatPartList.peek()?.isSeparator===!0){const u=this.formatPartList.currentIndex,c=this.formatPartList.next();if(c&&c.inputText){const f=t.indexOf(c.inputText,i),p=this.inputSlotCollection.getSlot(u);if(p&&f>-1){const m=f-i>p.characterCount?i+p.characterCount:f;p.partText=t.substring(i,m),this.processSlotRules(p),i=f+c.characterCount}}}else{const u=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);u&&(u.partText=t.substring(i,i+u.characterCount),this.processSlotRules(u))}}}processPastedValue(t,i=!1){i&&this.processSelectionEditRules();const s=this.formatNavigator.getCursorPosition(),u=this.inputSlotCollection.getSlotsFromCursorPosition(s);if(u){const c=s-u[0].startPosition,f=u[0].partText.substring(0,c);let p=u[0].partText.substring(c);u[0].partText="";for(let _=1,x=u.length;_<x;_++)p+=u[_].partText,u[_].partText="";const m=this.removeSeparatorsFromValue(t),S=f+m+p;let b=0;for(let _=0,x=u.length;_<x;_++){const D=u[_];D.partText=S.substring(b,D.characterCount+b),b+=D.characterCount,this.processSlotRules(D)}}}removeSeparatorsFromValue(t){let i=t;const s=this.partEntryList.getUniqueSeparators();for(let u=0,c=s.length;u<c;u++){const f=s[u];i=i.replaceAll(f,"")}return i}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!i)return;const s=this.formatNavigator.getCursorPosition(),u=s-i.startPosition,c=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(i.startPosition===s))i.partText=i.partText.substring(0,u-1)+i.partText.substring(u),c&&this.shiftFormatParts(i),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(i,!0);else{this.processSlotRules(i,!0);const p=this.inputSlotCollection.getPreviousSlot(i.partIndex);p&&(p.partText=p.partText.substring(0,p.partText.length-1),c&&this.shiftFormatParts(p),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(p.startPosition+p.partText.length),this.processSlotRules(p,!0))}break}case"Delete":i.partText=i.partText.substring(0,u)+i.partText.substring(u+1),c&&this.shiftFormatParts(i),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(i,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const i=this.formatNavigator.getCursorStartPosition(),s=this.formatNavigator.getCursorEndPosition();for(let u=0,c=t.length;u<c;u++){const f=t[u];f.startPosition>=i&&f.endPosition<=s?f.partText="":f.startPosition>=i&&f.endPosition>s?f.partText=f.partText.substring(s-f.startPosition):f.startPosition<i&&f.endPosition<=s?f.partText=f.partText.substring(0,i-f.startPosition):f.startPosition<i&&f.endPosition>s&&(f.partText=f.partText.substring(0,i-f.startPosition)+f.partText.substring(s-f.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(i);for(let u=0,c=t.length;u<c;u++)this.processSlotRules(t[u])}shiftFormatParts(t){let i=t,s;for(;(s=this.inputSlotCollection.getNextSlot(i.partIndex))!==void 0;){const u=s.partText.substring(0,1);s.partText=s.partText.substring(1),i.partText=i.partText+u,i=s}}processInputRules(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!i)return;const{key:s}=t,u=i.characterCount,c=i.partText;if(i.valueType===Il.Numeric){if(!this.keyTypeChecker.isNumberKey(s))return;const f=i.maximumValue,p=i.exceedingMaximumValueCausesTab||!1,m=i.padWithZeros||!1,S=parseInt(this.createNewValue(i,s));if(f&&S>f)if(p){m&&(i.partText=i.partText.padStart(u,"0")),i.isComplete=!0;const b=this.inputSlotCollection.getNextSlot(i.partIndex);b&&!b.isComplete&&(b.partText=s),this.formatRenderer.render(),b&&this.formatNavigator.setCursorPosition(b.isComplete?b.startPosition:b.startPosition+1)}else return;else c.length+1===u?(this.addToInputSlot(s),i.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):c.length+1<u&&(this.addToInputSlot(s),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else c.length+1===u?(this.addToInputSlot(s),i.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(s),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());i&&(i.partText=this.createNewValue(i,t))}createNewValue(t,i){const s=t.partText,u=this.formatNavigator.getCursorPosition();if(u>=t.startPosition+t.partText.length)return s+i;{const c=u-t.startPosition;return s.substring(0,c)+i+s.substring(c)}}processSlotRules(t,i=!1){const s=t.characterCount,u=t.allCharactersRequired||!1;if(t.valueType===Il.Numeric){const c=t.minimumValue,f=t.maximumValue;if(u)t.isComplete=t.partText.length===s;else if(c!==void 0&&f!==void 0){const p=t.padWithZeros||!1,m=parseInt(t.partText);t.isComplete=m>=c&&m<=f,t.isComplete&&p&&!i&&(t.partText=t.partText.padStart(s,"0"))}else t.isComplete=t.partText.length>0}else u?t.isComplete=t.partText.length===s:t.isComplete=t.partText.length>0}}class xG{constructor(t,i){this.format=t,this.instanceCollection=A0.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(i,t),this.ruleProcessor=new D9(t,i),this.keyTypeChecker=new x9,this.formatRenderer=new FS(t,i)}instanceCollection;formatNavigator;ruleProcessor;keyTypeChecker;formatRenderer;setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:i,metaKey:s,ctrlKey:u,shiftKey:c}=t;switch(i){case"ArrowLeft":c?this.formatNavigator.moveHighlightLeft():s?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":c?this.formatNavigator.moveHighlightRight():s?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(s||u)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class DG{constructor(t,i=""){this.inputValue=i,this.instanceId=vG(),this.instanceCollection=A0.getInstance(),this.keyProcessor=new xG(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new FS(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new D9(t,this.instanceId)}instanceId;instanceCollection;keyProcessor;formatNavigator;formatRenderer;inputSlotCollection;inputRuleProcessor;previousOutputValue="";inputElementSet=!1;isInputFocused=!1;inputElement;onFormatChange;inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange()))}}dispose(){this.instanceCollection.removeInstances(this.instanceId)}renderFormat(t=!1){setTimeout(()=>{this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=this.inputElement?.innerHTML),t&&this.inputElement?.innerHTML&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const AG=(n,t)=>{const{value:i="",format:s,readOnly:u=!1,debounceTime:c=800,fillContainer:f=!0,leftElement:p,rightElement:m,className:S,leftElementClassName:b,rightElementClassName:_,isSingleLine:x=!1,allowSingleLineScroll:D=!1,isInputValid:A,onChange:N,onFocus:R,onBlur:O,onElementCreate:U,onLeftElementClick:j,onRightElementClick:V}=n,[F,$]=H.useState(!0),st=H.useRef(void 0),I=H.useRef(void 0),et=H.useRef(void 0),nt=H.useRef(!1);H.useEffect(()=>(document.addEventListener("mouseup",w),()=>{et.current?.dispose(),document.removeEventListener("mouseup",w)}),[]),H.useEffect(()=>{et.current?.inputValuePassed(i)},[i]),H.useEffect(()=>{et.current?.dispose(),s&&(et.current=new DG(s,i),I.current&&et.current?.inputElementCreated(I.current),et.current?.registerFormatChangeEvent(bt))},[s]);const bt=H.useCallback(gt=>{A?A(gt)?($(!0),N?.(gt)):$(!1):N?.(gt)},[N]),lt=H.useCallback(gt=>{et.current?.inputFocused(),R?.(gt)},[R]),dt=H.useCallback(gt=>{et.current?.inputBlurred(),O?.(gt)},[O]),pt=H.useCallback(()=>{nt.current=!0},[]),tt=H.useCallback(()=>{if(nt.current)nt.current=!1,et.current?.mouseUpHandler();else{const gt=new MouseEvent("mouseup");document.dispatchEvent(gt)}},[]),w=H.useCallback(()=>{nt.current&&(nt.current=!1,et.current?.mouseUpHandler())},[]),Z=H.useCallback(gt=>{et.current?.keyDownHandler(gt)},[]),K=H.useCallback(gt=>{gt.preventDefault(),gt.stopPropagation();const Tt=gt.clipboardData?.getData("text/plain");Tt&&et.current?.pastedValue(Tt)},[]),at=H.useCallback(gt=>{st.current?.inputElement?.removeEventListener("keydown",Z),st.current?.inputElement?.removeEventListener("mousedown",pt),st.current?.inputElement?.removeEventListener("mouseup",tt),st.current?.inputElement?.removeEventListener("paste",K),st.current=gt,st.current?.inputElement?.addEventListener("keydown",Z),st.current?.inputElement?.addEventListener("mousedown",pt),st.current?.inputElement?.addEventListener("mouseup",tt),st.current?.inputElement?.addEventListener("paste",K),I.current=st.current?.inputElement},[]),St=H.useCallback(()=>{st.current?.focus()},[]);H.useImperativeHandle(t,()=>({focus:St}));const W=Se(S,{"bsc:border-error!":!F});return X.jsx($1,{ref:gt=>{gt&&at(gt)},readOnly:u,debounceTime:c,fillContainer:f,leftElement:p,rightElement:m,className:W,leftElementClassName:b,rightElementClassName:_,isSingleLine:x,allowSingleLineScroll:D,onFocus:lt,onBlur:dt,onElementCreate:U,onLeftElementClick:j,onRightElementClick:V})},A9=H.forwardRef(AG),kS=H.createContext(void 0);function M9(n,t,i=!0){const s=db(n),u=rb(n),c=oz(n);let f=Dv(u)-(t.options?.weekStartsOn||0);f=f===-1?6:f;const p=Dv(c)-(t.options?.weekStartsOn||0),m=yR({start:u,end:c}),S=s+f>35?6:5,b=N9(S,7,{dayValue:null,isCurrent:!0});let _=1;for(let x=0,D=S;x<D;x++){for(let A=x>0?0:f;A<7;A++){const N=m[_-1];if(N.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),b[x][A].dayValue=N,++_>s)break}if(_>s)break}if(f>0&&i)for(let x=0;x<f;x++)b[0][x].dayValue=sH(u,f-x),b[0][x].isCurrent=!1;if(p>-1&&i)for(let x=6;x>p;x--)b[S-1][x].dayValue=ph(c,x-p),b[S-1][x].isCurrent=!1;return b}function N9(n,t,i){const s=[];for(let u=0,c=n;u<c;u++){const f=[];for(let p=0,m=t;p<m;p++){const S=MG(i)?i:{...i};f.push(S)}s.push(f)}return s}function MG(n){const t=typeof n;return t==="string"||t==="number"||t==="boolean"||n instanceof Date}function NG(n){const t=lH(new Date,n.options?.weekStartsOn||0),i=[];for(let s=0;s<7;s++)i.push(ph(t,s).toLocaleDateString(n.code,{weekday:"short"}));return i}function OG(n){const t=new Date(Date.UTC(2020,0,1)),i=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let s=0;for(let u=0;u<3;u++)for(let c=0;c<4;c++)i[u][c]={monthNumber:s,monthName:Zo(t,s++).toLocaleDateString(n.code,{month:"short"})};return i}function RG(n,t){const i=new Date(n.getTime()),s=Math.floor(i.getFullYear()/10)*10;i.setFullYear(s);const u=vR({start:i,end:r0(i,9)}),c=N9(3,4,"");let f=0;for(let p=0;p<3;p++)for(let m=0;m<4&&(c[p][m]=u[f++].toLocaleDateString(t.code,{year:"numeric"}),f!==u.length);m++);return c}function zG(n){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(n.code)}function HG(n,t,i){return n.getTime()>=t.getTime()&&n.getTime()<=i.getTime()}function M0(n,t){const i=rH(n);if(isNaN(i.valueOf())){let s=Fl(n,"P pp",new Date,{locale:t});return!isNaN(s.valueOf())||(s=Fl(n,"Pp",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P HH:mm",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P HH:mm:ss",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"P p",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"pp",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Fl(n,"p",new Date,{locale:t}),!isNaN(s.valueOf()))?s:void 0}return i}function IS(n,t){const i=n.split("-");if(i.length!==2)return;const s=M0(i[0].trim(),t);if(!s)return;const u=M0(i[1].trim(),t);if(u)return[s,u]}var Qe=(n=>(n[n.DateTime=0]="DateTime",n[n.DateOnly=1]="DateOnly",n[n.TimeOnly=2]="TimeOnly",n[n.DateRange=3]="DateRange",n))(Qe||{}),Ta=(n=>(n[n.DaySelector=0]="DaySelector",n[n.MonthSelector=1]="MonthSelector",n[n.YearSelector=2]="YearSelector",n[n.TimeSelector=3]="TimeSelector",n[n.DateRangeSelector=4]="DateRangeSelector",n))(Ta||{}),Mh=(n=>(n[n.Day=0]="Day",n[n.Month=1]="Month",n[n.Year=2]="Year",n[n.Range=3]="Range",n))(Mh||{}),N0=(n=>(n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n))(N0||{}),Gn=(n=>(n[n.TwelveHour=0]="TwelveHour",n[n.TwentyFourHour=1]="TwentyFourHour",n))(Gn||{}),tu=(n=>(n[n.Normal=0]="Normal",n[n.Range=1]="Range",n))(tu||{}),bg=(n=>(n[n.Right=0]="Right",n[n.Left=1]="Left",n[n.None=2]="None",n))(bg||{}),pe=(n=>(n[n.SetDateSelector=0]="SetDateSelector",n[n.SetViewDate=1]="SetViewDate",n[n.SetSelectedDate=2]="SetSelectedDate",n[n.SetSelectedDateRange=3]="SetSelectedDateRange",n[n.SetSelectedStartDate=4]="SetSelectedStartDate",n[n.SetSelectedEndDate=5]="SetSelectedEndDate",n[n.SetTimeFormat=6]="SetTimeFormat",n[n.ClearDates=7]="ClearDates",n[n.InitializeDates=8]="InitializeDates",n))(pe||{});const wG=(n,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...n,currentSelector:t.dateSelector,currentViewDate:t.viewDate||n.currentViewDate}:{...n};case 1:return{...n,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...n,selectedDate:t.selectedDate||n.selectedDate,currentViewDate:t.viewDate||n.currentViewDate};case 3:return{...n,selectedStartDate:t.selectedStartDate||n.selectedStartDate,selectedEndDate:t.selectedEndDate||n.selectedEndDate};case 4:return{...n,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...n,selectedEndDate:t.selectedEndDate};case 6:return{...n,timeFormat:t.timeFormat||n.timeFormat};case 7:return{currentSelector:n.currentSelector,currentViewDate:n.currentViewDate,timeFormat:n.timeFormat,dateInitialized:!0};case 8:{const i={...n,currentViewDate:UG(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...i,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...i,selectedDate:t.initialDate}}default:return{...n,currentSelector:Ta.DaySelector}}};function UG(n){return n?Array.isArray(n)?n[0]:n:new Date}const WS=(n,t,i)=>{const s=H.useCallback(m=>{i({type:pe.SetViewDate,viewDate:Zo(t,m)})},[t]),u=H.useCallback(m=>{i({type:pe.SetViewDate,viewDate:Ov(t,m)})},[t]),c=H.useCallback(m=>{i({type:pe.SetViewDate,viewDate:r0(t,m)})},[t]),f=H.useCallback(m=>{i({type:pe.SetViewDate,viewDate:Rv(t,m)})},[t]),p=H.useCallback(m=>{i({type:pe.SetDateSelector,dateSelector:m})},[]);return{...n,incrementViewMonths:s,decrementViewMonths:u,incrementViewYears:c,decrementViewYears:f,setDateSelector:p}},Eg=({viewDate:n,selectedDate:t,selectedStartDate:i,selectedEndDate:s,selectionMode:u=tu.Normal,locale:c,onDateSelected:f,selectableDate:p,isValidDate:m,dispatcher:S})=>{const[b,_]=H.useState(!1),[x,D]=H.useState(),[A,N]=H.useState(),[R,O]=H.useState(),[U,j]=H.useState(),V=H.useRef(void 0),F=H.useRef(void 0),$=H.useContext(kS),st=H.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]);H.useEffect(()=>{V.current=c,F.current=NG(V.current),_(!0)},[]),H.useEffect(()=>{n&&V.current&&O(M9(n,V.current,u===tu.Normal))},[n,b]),H.useEffect(()=>{j(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),H.useEffect(()=>{D(i?new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0).getTime():void 0),N(s?new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59).getTime():void 0)},[i,s]),H.useEffect(()=>{V.current&&c&&(V.current=c,O(M9(n,V.current,u===tu.Normal)))},[c]);const I=pt=>{if(u===tu.Normal)S?.({type:pe.SetSelectedDate,selectedDate:pt,viewDate:pt}),f?.(pt);else{if(!f)throw new Error("Range selection mode requires onDateSelected to be set");!i||uz(pt,i)?f(pt):i&&!s?f(pt,{setEndDate:!0}):i&&s&&f(pt)}},et=pt=>U?.toLocaleDateString()===pt.toLocaleDateString(),nt=pt=>{if(x&&A){const tt=pt.getTime();return tt>=x&&tt<=A}return!1},bt=WS({viewDate:n,selectedDate:t,selectedStartDate:i,selectedEndDate:s,selectionMode:u,locale:c,weekDays:F.current,monthMatrix:R,selectableDate:p,isValidDate:m,onDateClicked:I,isSelectedDate:et,isInSelectedDateRange:nt},n,S),dt=st||((pt,tt)=>X.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:tt}));return X.jsx(vc,{props:bt,template:dt,children:X.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[F.current?.map((pt,tt)=>X.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:pt},tt)),R?.map((pt,tt)=>pt.map((w,Z)=>{const K=w.dayValue!==null&&(p===void 0||p(w.dayValue)),at=Se("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!w.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":w&&w.dayValue&&(U&&et(w.dayValue)||x&&!A&&lb(x,w.dayValue)||x&&A&&nt(w.dayValue)),"bsc:cursor-pointer":K,"bsc:text-error bsc:cursor-not-allowed":!K,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":w.dayValue&&iH(w.dayValue)&&!(et(w.dayValue)||nt(w.dayValue))},"bc-dt-date-cell");return X.jsx("div",{className:at,onClick:()=>w&&w.dayValue&&K&&(m===void 0||m(w.dayValue))&&I(w.dayValue),children:w.dayValue?.getDate().toLocaleString(V.current?.code)},tt.toString()+Z.toString())}))]})})},Tg=({title:n,scrollerType:t,onTitleClicked:i,onMovePrevious:s,onMoveNext:u,viewDate:c,dispatcher:f})=>{const m=H.useContext(kS).dateScrollerTemplate,S=WS({title:n,scrollerType:t,onTitleClicked:i,onMovePrevious:s,onMoveNext:u},c,f),b="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1! bsc:hover:text-white! bsc:dark:hover:bg-mono-light-3!",x=m||((D,A)=>X.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:A}));return X.jsxs(vc,{props:S,template:x,children:[X.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:X.jsx(Ql,{className:b,onClick:s,children:X.jsx(Ts,{icon:"chevronLeft",size:ka.Regular})})}),X.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",onClick:i,children:n}),X.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:X.jsx(Ql,{className:b,onClick:u,children:X.jsx(Ts,{icon:"chevronRight",size:ka.Regular})})})]})},BG=({selectedDate:n,viewDate:t,locale:i,showTimeSelector:s,selectableDate:u,isValidDate:c,onChange:f,dispatcher:p})=>{const m=()=>{t&&p({type:pe.SetViewDate,viewDate:Ov(t,1)})},S=()=>{t&&p({type:pe.SetViewDate,viewDate:Zo(t,1)})},b=()=>{p({type:pe.SetDateSelector,dateSelector:Ta.MonthSelector})},_=()=>{p({type:pe.SetDateSelector,dateSelector:Ta.TimeSelector})},x=()=>t?t.toLocaleDateString(i.code,{month:"long",year:"numeric"}):"";return X.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[X.jsx(Tg,{title:x(),scrollerType:Mh.Day,onTitleClicked:b,onMovePrevious:m,onMoveNext:S,viewDate:t,dispatcher:p}),X.jsx(Eg,{viewDate:t,selectedDate:n,locale:i,selectableDate:u,isValidDate:c,onDateSelected:f,dispatcher:p}),s&&X.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:X.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:_,children:n?.toLocaleTimeString(i.code)||zG(i)})})]})},VG=({viewDate:n,locale:t,dateSelection:i=Qe.DateTime,dispatcher:s})=>{const u=H.useRef(OG(t)),c=()=>{const b=Rv(n,1);s({type:pe.SetViewDate,viewDate:b})},f=()=>{const b=r0(n,1);s({type:pe.SetViewDate,viewDate:b})},p=b=>{s({type:pe.SetDateSelector,dateSelector:i!==Qe.DateRange?Ta.DaySelector:Ta.DateRangeSelector,viewDate:CH(n,b)})},m=()=>n.toLocaleDateString(t.code,{year:"numeric"}),S=()=>{s({type:pe.SetDateSelector,dateSelector:Ta.YearSelector})};return X.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[X.jsx(Tg,{title:m(),scrollerType:Mh.Month,onTitleClicked:S,onMovePrevious:c,onMoveNext:f,viewDate:n,dispatcher:s}),X.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:u.current.map((b,_)=>b.map((x,D)=>X.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>p(x.monthNumber),children:x.monthName},_.toString()+D.toString())))})]})},GG=({viewDate:n,selectedStartDate:t,selectedEndDate:i,locale:s,onChange:u,dispatcher:c})=>{const f=ng("screen and (max-device-width: 40rem)"),p=Zo(n,1),m=(D,A)=>{!A||!A.setEndDate?c({type:pe.SetSelectedStartDate,selectedStartDate:D}):(c({type:pe.SetSelectedEndDate,selectedEndDate:D}),t&&u&&u([t,D]))},S=()=>{c({type:pe.SetDateSelector,dateSelector:Ta.MonthSelector})},b=()=>f?`${n.toLocaleDateString(s.code,{month:"long"})} ${n.toLocaleDateString(s.code,{year:"numeric"})}`:`${n.toLocaleDateString(s.code,{month:"long"})} ${n.toLocaleDateString(s.code,{year:"numeric"})} - ${p.toLocaleDateString(s.code,{month:"long"})} ${p.toLocaleDateString(s.code,{year:"numeric"})}`,_=()=>{n&&c({type:pe.SetViewDate,viewDate:Ov(n,1)})},x=()=>{n&&c({type:pe.SetViewDate,viewDate:Zo(n,1)})};return X.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[X.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:X.jsx(Tg,{title:b(),scrollerType:Mh.Range,onTitleClicked:S,onMovePrevious:_,onMoveNext:x,viewDate:n,dispatcher:c})}),X.jsx("div",{className:"bsc-flex-grow",children:X.jsx(Hv,{mobileMarkup:X.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:X.jsx(Eg,{viewDate:n,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})}),aboveMobileMarkup:X.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[X.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:X.jsx(Eg,{viewDate:n,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})}),X.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:X.jsx(Eg,{viewDate:p,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})})]})})})]})},jG=({viewDate:n,showDateSelector:t,locale:i,timeFormat:s=Gn.TwelveHour,timeConstraints:u,onChange:c,dispatcher:f})=>{const p=H.useRef(s===Gn.TwelveHour?11:23),m=H.useRef(s===Gn.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]),S=H.useRef(DH(0,59,pt=>pt.toString().padStart(2,"0"))),b=H.useRef(["AM","PM"]),_=H.useRef(sR(n)),x=pt=>pt>11?pt-12:pt,[D,A]=H.useState(x(n.getHours())),[N,R]=H.useState(n.getMinutes()),[O,U]=H.useState(n.getHours()<=12?0:1),j=H.useRef(n.toLocaleDateString(i.code));H.useEffect(()=>{const pt=n.getHours(),tt=n.getMinutes();if(pt!==D&&A(s===Gn.TwelveHour?x(pt):pt),tt!==N&&R(tt),s===Gn.TwelveHour){const w=pt<=11?0:1;w!==O&&U(w)}},[n]);const V=()=>{const pt=u?.hours?.step||1,tt=D<p.current?D+pt:0;A(tt),et(tt,N,O)},F=()=>{const pt=u?.hours?.step||1,tt=D>0?D-pt:p.current;A(tt),et(tt,N,O)},$=()=>{const pt=u?.minutes?.step||1,tt=N+pt<(u?.minutes?.max||59)?N+pt:u?.minutes?.min||0;R(tt),et(D,tt,O)},st=()=>{const pt=u?.minutes?.step||1,tt=N-pt>=(u?.minutes?.min||0)?N-pt:(u?.minutes?.max||60)-pt;R(tt),et(D,tt,O)},I=()=>{const pt=O===0?1:0;U(pt),et(D,N,pt)},et=(pt,tt,w)=>{const Z=s===Gn.TwelveHour&&w===1?pt+12:pt;_.current.setHours(Z,tt),f({type:pe.SetSelectedDate,selectedDate:_.current,viewDate:_.current}),c?.(_.current)},nt=()=>{f({type:pe.SetDateSelector,dateSelector:Ta.DaySelector})},bt=Se("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":s===Gn.TwelveHour,"bsc:grid-cols-3":s===Gn.TwentyFourHour}),lt=Se("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":s===Gn.TwelveHour,"bsc:col-span-3":s===Gn.TwentyFourHour}),dt="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return X.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:s===Gn.TwelveHour?"15rem":"11rem"},children:X.jsxs("div",{className:bt,children:[t&&X.jsx("div",{className:lt,onClick:nt,children:j.current}),X.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:V,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),X.jsx("div",{}),X.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:$,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),s===Gn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:I,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),X.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:m.current[D]}),X.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),X.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:S.current[N]}),s===Gn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:b.current[O]}),X.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:F,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})}),X.jsx("div",{}),X.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:st,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})}),s===Gn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(Ql,{className:dt,onClick:I,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})})]})})},LG=({viewDate:n,locale:t,dispatcher:i})=>{const s=RG(n,t),u=()=>{const m=Rv(n,10);i({type:pe.SetViewDate,viewDate:m})},c=()=>{const m=r0(n,10);i({type:pe.SetViewDate,viewDate:m})},f=m=>{const S=parseInt(m);i({type:pe.SetDateSelector,dateSelector:Ta.MonthSelector,viewDate:_H(n,S)})},p=()=>`${s[0][0].toString()} - ${s[2][1].toString()}`;return X.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[X.jsx(Tg,{title:p(),scrollerType:Mh.Year,onMovePrevious:u,onMoveNext:c,viewDate:n,dispatcher:i}),X.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:X.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:s.map((m,S)=>m.map((b,_)=>b.length>0?X.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>f(b),children:b},S.toString()+_.toString()):X.jsx("div",{},S.toString()+_.toString())))})})]})};class PG{constructor(t,i){this.dateSelection=t;const s=2023,u=12,c=20,p=new Date(s,u-1,c).toLocaleDateString(i,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=p.replace(`${s}`,"YYYY").replace(`${u}`,"MM").replace(`${c}`,"DD");const m=new Date,S=18,b=24,_=37,x=317;m.setHours(S,b,_,x);const D=m.toLocaleTimeString(i);this.use24HourTime=D.startsWith("18"),this.timeFormat=D.replace(`${this.use24HourTime?S:"6"}`,"HH").replace(`${b}`,"MM").replace(`${_}`,"SS").replace(`${x}`,"LLL"),this.createDateParts()}dateFormat;timeFormat;use24HourTime;monthPart;dayPart;yearPart;twelveHourPart;twentyFourHourPart;minutePart;meridianPart;get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case Qe.DateOnly:return this.createDateFormat(t);case Qe.TimeOnly:return this.createTimeFormat(t);case Qe.DateRange:return this.createDateRangeFormat(t);case Qe.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const i=[];this.dateFormat.startsWith("MM")?i.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?i.push(...this.createDayMonthYearFormatParts()):i.push(...this.createYearMonthDayFormatParts());const s={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...i,s,...i),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const i={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(i),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),i=t.indexOf("DD"),s=t.substring(0,i);t=t.replace(s,"").replace("DD","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("YYYY"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.monthPart,u,this.dayPart,c,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),i=t.indexOf("MM"),s=t.substring(0,i);t=t.replace(s,"").replace("MM","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("YYYY"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.dayPart,u,this.monthPart,c,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),i=t.indexOf("MM"),s=t.substring(0,i);t=t.replace(s,"").replace("MM","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("DD"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.yearPart,u,this.monthPart,c,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),i=t.indexOf("MM"),s=t.substring(0,i),u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0},c={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,u,this.minutePart,c,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),i=t.indexOf("MM"),s=t.substring(0,i),u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.twentyFourHourPart,u,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:Il.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:Il.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:Il.Text,possibleValues:["AM","PM"]}}}const YG=(n,t)=>{const[i,s]=H.useState(),u=H.useRef(void 0);return H.useEffect(()=>{t&&!i&&(u.current=new PG(n,t),s(u.current.createInputFormat()))},[t]),[i,u.current?.is24HourTime]},qG=({value:n,readOnly:t=!1,label:i,useDefaultDateValue:s=!1,useFormattedInput:u=!1,allowClear:c=!1,closeSelector:f=!1,locale:p,className:m,dateSelection:S=Qe.DateTime,dateFormat:b,timeConstraints:_,icon:x,iconPosition:D=bg.Right,inputElement:A,selectableDate:N,isValidDate:R,onChange:O,onError:U,calendarTemplate:j,dateScrollerTemplate:V,inputTemplate:F,wrapperTemplate:$})=>{const[st,I]=H.useState(!1),[et,nt]=H.useState(),[bt,lt]=H.useState(),[dt,pt,tt]=OD(S),w=H.useRef(void 0),Z=H.useRef(!1),K=H.useRef(p||xH()),at=H.useRef(void 0),St=H.useRef(void 0),W=H.useRef(void 0),gt=H.useRef(null),Tt=H.useRef(null),[Pt,le]=YG(S,et),xn=yT.useDateLocale(K.current),xe=H.useRef({calendarTemplate:j,dateScrollerTemplate:V});H.useEffect(()=>{nt(xn.code),at.current=xn;const Ht=ln();ue(n||s?{type:pe.InitializeDates,initialDate:Array.isArray(Ht)?Ht[0]:Ht}:{type:pe.SetViewDate,viewDate:Array.isArray(Ht)?Ht[0]:Ht})},[xn]),H.useEffect(()=>{if(n){const Ht=ln();ue({type:pe.InitializeDates,initialDate:Ht})}else ue({type:pe.ClearDates})},[n,at.current]),H.useEffect(()=>{le&&ue({type:pe.SetTimeFormat,timeFormat:le?Gn.TwentyFourHour:Gn.TwelveHour})},[le]),H.useEffect(()=>{A&&(St.current=A)},[A]),H.useEffect(()=>{ue({type:pe.SetDateSelector,dateSelector:Dn()})},[dt]);const Dn=H.useCallback(()=>tt.current===Qe.TimeOnly?Ta.TimeSelector:tt.current===Qe.DateTime||tt.current===Qe.DateOnly?Ta.DaySelector:Ta.DateRangeSelector,[]),ln=()=>{const Ht=new Date;return Ht.setHours(0,0,0,0),n?typeof n=="string"?tt.current!==Qe.DateRange?M0(n,at.current):IS(n,at.current):n:Ht},Be={currentSelector:Dn(),currentViewDate:new Date,timeFormat:Gn.TwelveHour,dateInitialized:!1},[At,ue]=H.useReducer(wG,Be),ta=()=>{Mi(),I(!0)},ea=H.useMemo(()=>s0(()=>{I(!1)},250),[]),An=H.useMemo(()=>s0(()=>{ea.cancel()},5),[ea]),Ba=Ht=>{const ge=Ht.target.innerText;Ji(ge)},rn=Ht=>{if(Ht){const ge=tt.current!==Qe.DateRange?M0(Ht,at.current):IS(Ht,at.current);if(ge)if(R){const qr=Array.isArray(ge)?ge.every(Wl=>R(Wl)):R(ge);return!qr&&U&&U(ge),qr}else return!0;else return!1}else return!0},ha=Ht=>{Ji(Ht||"")},Ji=Ht=>{const ge=tt.current!==Qe.DateRange?M0(Ht,at.current):IS(Ht,at.current);ge?(Array.isArray(ge)?(HG(ge[0],rb(At.currentViewDate),gR(Zo(At.currentViewDate,1)))||ue({type:pe.SetViewDate,viewDate:ge[0]}),ue({type:pe.SetSelectedDateRange,selectedStartDate:ge[0],selectedEndDate:ge[1]})):ue({type:pe.SetSelectedDate,selectedDate:ge,viewDate:ge}),O?.(ge)):Ht===""&&(ue({type:pe.ClearDates}),O?.())},di=Ht=>{tt.current===Qe.DateOnly&&f===!0&&I(!1),O?.(Ht)},Fi=()=>{Mi(),I(!st),Tt.current?Tt.current.focus():gt.current&&gt.current.focus()},Mn=()=>{ue({type:pe.ClearDates}),I(!1),O?.()},on=(Ht,ge)=>{(!St.current||w.current!==ge)&&(St.current=Ht,w.current=ge,Z.current=!0)},Mi=()=>{(!W.current||Z.current)&&St.current&&(W.current=St.current,lt(St.current),Z.current=!1)},Ut=()=>{I(!1),ue({type:pe.SetDateSelector,dateSelector:Dn()})},Ae=()=>{switch(b){case N0.Short:return"short";case N0.Medium:return"medium";case N0.Long:return"long";default:return}},jn=()=>{const Ht=Ae();switch(tt.current){case Qe.DateTime:return At.selectedDate?Ht?At.selectedDate.toLocaleString(at.current?.code,{dateStyle:Ht,timeStyle:Ht}):At.selectedDate.toLocaleString(at.current?.code):"";case Qe.DateOnly:return At.selectedDate?Ht?At.selectedDate.toLocaleDateString(at.current?.code,{dateStyle:Ht}):At.selectedDate.toLocaleDateString(at.current?.code):"";case Qe.TimeOnly:return At.selectedDate?Ht?At.selectedDate.toLocaleTimeString(at.current?.code,{timeStyle:Ht,hour12:At.timeFormat===Gn.TwelveHour,hourCycle:At.timeFormat===Gn.TwentyFourHour?"h23":void 0}):At.selectedDate.toLocaleTimeString(at.current?.code,{hour12:At.timeFormat===Gn.TwelveHour,hourCycle:At.timeFormat===Gn.TwentyFourHour?"h23":void 0}):"";case Qe.DateRange:return At.selectedStartDate&&At.selectedEndDate?Ht?`${At.selectedStartDate.toLocaleDateString(at.current?.code,{dateStyle:Ht})} - ${At.selectedEndDate.toLocaleDateString(at.current?.code,{dateStyle:Ht})}`:`${At.selectedStartDate.toLocaleDateString(at.current?.code)} - ${At.selectedEndDate.toLocaleDateString(at.current?.code)}`:"";default:return At.selectedDate?Ht?At.selectedDate.toLocaleString(at.current?.code,{dateStyle:Ht,timeStyle:Ht}):At.selectedDate.toLocaleString(at.current?.code):""}},Va=dt===Qe.DateTime||dt===Qe.DateOnly||dt===Qe.DateRange,ke=dt===Qe.DateTime||dt===Qe.TimeOnly,mn=D===bg.None?{}:D===bg.Right?{rightElement:X.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[c&&!t&&X.jsx("div",{children:X.jsx(Ts,{icon:"close",size:ka.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Mn})}),X.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Fi,children:x||X.jsx(Ts,{icon:"calendar",size:ka.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:X.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[X.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Fi,children:x||X.jsx(Ts,{icon:"calendar",size:ka.Small,className:t?void 0:"bsc:cursor-pointer"})}),c&&!t&&X.jsx("div",{children:X.jsx(Ts,{icon:"close",size:ka.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Mn})})]}),leftElementClassName:"bsc:justify-center"},eu={setDateSelector:Ht=>pt(Ht)},nu=$||((Ht,ge)=>X.jsx(X.Fragment,{children:ge})),da=()=>X.jsx(vc,{props:eu,template:nu,children:X.jsxs(X.Fragment,{children:[At.currentSelector===Ta.DaySelector&&Va&&At.dateInitialized&&at.current&&X.jsx(BG,{selectedDate:At.selectedDate,viewDate:At.currentViewDate,locale:at.current,showTimeSelector:tt.current===Qe.DateTime,selectableDate:N,isValidDate:R,dispatcher:ue,onChange:di}),At.currentSelector===Ta.MonthSelector&&Va&&At.dateInitialized&&at.current&&X.jsx(VG,{viewDate:At.currentViewDate,locale:at.current,dateSelection:tt.current,dispatcher:ue}),At.currentSelector===Ta.YearSelector&&Va&&At.dateInitialized&&at.current&&X.jsx(LG,{viewDate:At.currentViewDate,locale:at.current,dispatcher:ue}),At.currentSelector===Ta.TimeSelector&&ke&&At.dateInitialized&&at.current&&X.jsx(jG,{viewDate:At.currentViewDate,showDateSelector:tt.current===Qe.DateTime,locale:at.current,timeFormat:At.timeFormat,timeConstraints:_,onChange:O,dispatcher:ue}),At.currentSelector===Ta.DateRangeSelector&&Va&&At.dateInitialized&&at.current&&X.jsx(GG,{viewDate:At.currentViewDate,selectedStartDate:At.selectedStartDate,selectedEndDate:At.selectedEndDate,locale:at.current,onChange:O,dispatcher:ue})]})}),Pr=WS({label:i,readOnly:t,allowClear:c,getValue:jn,onFocus:ta,onInput:Ba,iconPosition:D,iconElement:mn.rightElement||mn.leftElement},At.currentViewDate,ue),Yr=F||((Ht,ge)=>X.jsx(X.Fragment,{children:ge})),au=Se("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",m);return X.jsx(kS.Provider,{value:xe.current,children:X.jsxs("div",{className:"bc-date-time",children:[i&&X.jsx(wr,{label:i,readOnly:t,className:"bc-dt-label"}),X.jsx(Hv,{mobileMarkup:X.jsxs(X.Fragment,{children:[X.jsx(vc,{props:Pr,template:Yr,children:X.jsx($1,{ref:gt,value:jn(),readOnly:t,inputMode:"none",className:au,onFocus:ta,onElementCreate:Ht=>on(Ht,!1),...mn})}),X.jsx(b9,{visible:st,target:bt,hidden:Ut,unmountWhenHidden:!0,children:da()})]}),aboveMobileMarkup:X.jsxs(X.Fragment,{children:[X.jsx(vc,{props:Pr,template:Yr,children:u===!1?X.jsx($1,{ref:gt,value:jn(),readOnly:t,className:au,onFocus:ta,onBlur:ea,onInput:Ba,onElementCreate:Ht=>on(Ht,!1),...mn}):X.jsx(A9,{ref:Tt,value:jn(),readOnly:t,className:au,format:Pt,isInputValid:rn,onFocus:ta,onBlur:ea,onChange:ha,onElementCreate:Ht=>on(Ht,!0),...mn})}),X.jsx(C9,{visible:st,target:bt,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:Ut,isClickedWithin:An,unmountWhenHidden:!1,children:da()})]})})]})})};var $S,O9;function XG(){if(O9)return $S;O9=1;function n(D,A){var N,R;if(typeof A=="function")R=A(D),R!==void 0&&(D=R);else if(Array.isArray(A))for(N=0;N<A.length;N++)R=A[N](D),R!==void 0&&(D=R);return D}function t(D,A){return D[0]==="-"&&Array.isArray(A)&&/^-\d+$/.test(D)?A.length+parseInt(D,10):D}function i(D){return/^\d+$/.test(D)}function s(D){return Object.prototype.toString.call(D)==="[object Object]"}function u(D){return Object(D)===D}function c(D){return Object.keys(D).length===0}var f=["__proto__","prototype","constructor"],p=function(D){return f.indexOf(D)===-1};function m(D,A){D.indexOf("[")>=0&&(D=D.replace(/\[/g,A).replace(/]/g,""));var N=D.split(A),R=N.filter(p);if(R.length!==N.length)throw Error("Refusing to update blacklisted property "+D);return N}var S=Object.prototype.hasOwnProperty;function b(D,A,N,R){if(!(this instanceof b))return new b(D,A,N,R);typeof A>"u"&&(A=!1),typeof N>"u"&&(N=!0),typeof R>"u"&&(R=!0),this.separator=D||".",this.override=A,this.useArray=N,this.useBrackets=R,this.keepArray=!1,this.cleanup=[]}var _=new b(".",!1,!0,!0);function x(D){return function(){return _[D].apply(_,arguments)}}return b.prototype._fill=function(D,A,N,R){var O=D.shift();if(D.length>0){if(A[O]=A[O]||(this.useArray&&i(D[0])?[]:{}),!u(A[O]))if(this.override)A[O]={};else{if(!(u(N)&&c(N)))throw new Error("Trying to redefine `"+O+"` which is a "+typeof A[O]);return}this._fill(D,A[O],N,R)}else{if(!this.override&&u(A[O])&&!c(A[O])){if(!(u(N)&&c(N)))throw new Error("Trying to redefine non-empty obj['"+O+"']");return}A[O]=n(N,R)}},b.prototype.object=function(D,A){var N=this;return Object.keys(D).forEach(function(R){var O=A===void 0?null:A[R],U=m(R,N.separator).join(N.separator);U.indexOf(N.separator)!==-1?(N._fill(U.split(N.separator),D,D[R],O),delete D[R]):D[R]=n(D[R],O)}),D},b.prototype.str=function(D,A,N,R){var O=m(D,this.separator).join(this.separator);return D.indexOf(this.separator)!==-1?this._fill(O.split(this.separator),N,A,R):N[D]=n(A,R),N},b.prototype.pick=function(D,A,N,R){var O,U,j,V,F;for(U=m(D,this.separator),O=0;O<U.length;O++)if(V=t(U[O],A),A&&typeof A=="object"&&V in A){if(O===U.length-1)return N?(j=A[V],R&&Array.isArray(A)?A.splice(V,1):delete A[V],Array.isArray(A)&&(F=U.slice(0,-1).join("."),this.cleanup.indexOf(F)===-1&&this.cleanup.push(F)),j):A[V];A=A[V]}else return;return N&&Array.isArray(A)&&(A=A.filter(function($){return $!==void 0})),A},b.prototype.delete=function(D,A){return this.remove(D,A,!0)},b.prototype.remove=function(D,A,N){var R;if(this.cleanup=[],Array.isArray(D)){for(R=0;R<D.length;R++)this.pick(D[R],A,!0,N);return N||this._cleanup(A),A}else return this.pick(D,A,!0,N)},b.prototype._cleanup=function(D){var A,N,R,O;if(this.cleanup.length){for(N=0;N<this.cleanup.length;N++)R=this.cleanup[N].split("."),O=R.splice(0,-1).join("."),A=O?this.pick(O,D):D,A=A[R[0]].filter(function(U){return U!==void 0}),this.set(this.cleanup[N],A,D);this.cleanup=[]}},b.prototype.del=b.prototype.remove,b.prototype.move=function(D,A,N,R,O){return typeof R=="function"||Array.isArray(R)?this.set(A,n(this.pick(D,N,!0),R),N,O):(O=R,this.set(A,this.pick(D,N,!0),N,O)),N},b.prototype.transfer=function(D,A,N,R,O,U){return typeof O=="function"||Array.isArray(O)?this.set(A,n(this.pick(D,N,!0),O),R,U):(U=O,this.set(A,this.pick(D,N,!0),R,U)),R},b.prototype.copy=function(D,A,N,R,O,U){return typeof O=="function"||Array.isArray(O)?this.set(A,n(JSON.parse(JSON.stringify(this.pick(D,N,!1))),O),R,U):(U=O,this.set(A,this.pick(D,N,!1),R,U)),R},b.prototype.set=function(D,A,N,R){var O,U,j,V;if(typeof A>"u")return N;for(j=m(D,this.separator),O=0;O<j.length;O++){if(V=j[O],O===j.length-1)if(R&&s(A)&&s(N[V]))for(U in A)S.call(A,U)&&(N[V][U]=A[U]);else if(R&&Array.isArray(N[V])&&Array.isArray(A))for(var F=0;F<A.length;F++)N[j[O]].push(A[F]);else N[V]=A;else(!S.call(N,V)||!s(N[V])&&!Array.isArray(N[V]))&&(/^\d+$/.test(j[O+1])?N[V]=[]:N[V]={});N=N[V]}return N},b.prototype.transform=function(D,A,N){return A=A||{},N=N||{},Object.keys(D).forEach((function(R){this.set(D[R],this.pick(R,A),N)}).bind(this)),N},b.prototype.dot=function(D,A,N){A=A||{},N=N||[];var R=Array.isArray(D);return Object.keys(D).forEach((function(O){var U=R&&this.useBrackets?"["+O+"]":O;if(u(D[O])&&(s(D[O])&&!c(D[O])||Array.isArray(D[O])&&!this.keepArray&&D[O].length!==0))if(R&&this.useBrackets){var j=N[N.length-1]||"";return this.dot(D[O],A,N.slice(0,-1).concat(j+U))}else return this.dot(D[O],A,N.concat(U));else R&&this.useBrackets?A[N.join(this.separator).concat("["+O+"]")]=D[O]:A[N.concat(U).join(this.separator)]=D[O]}).bind(this)),A},b.pick=x("pick"),b.move=x("move"),b.transfer=x("transfer"),b.transform=x("transform"),b.copy=x("copy"),b.object=x("object"),b.str=x("str"),b.set=x("set"),b.delete=x("delete"),b.del=b.remove=x("remove"),b.dot=x("dot"),["override","overwrite"].forEach(function(D){Object.defineProperty(b,D,{get:function(){return _.override},set:function(A){_.override=!!A}})}),["useArray","keepArray","useBrackets"].forEach(function(D){Object.defineProperty(b,D,{get:function(){return _[D]},set:function(A){_[D]=A}})}),b._process=n,$S=b,$S}var KG=XG();const R9=X2(KG),QG=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,orientation:p=Za.Horizontal,isMultiSelect:m=!1,className:S,onChange:b,itemTemplate:_})=>{const[x,D]=H.useState(),[A,N]=H.useState([]),R=tv(()=>s,[s]),O=H.useId();H.useEffect(()=>{if(m){const lt=Array.isArray(i)?i.map(dt=>dt.toString()):i?[String(i)]:void 0;N(lt??[])}else i&&D(i.toString())},[i]);const U=lt=>m?A.findIndex(dt=>dt===lt)>-1:x===lt,j=lt=>{const dt=lt.toString();if(m){const pt=U(dt);let tt;pt?tt=A.filter(w=>w!=dt):tt=[...A,dt],N(tt),b?.({name:n,value:tt})}else dt!==x&&(D(dt),b?.({name:n,value:dt}))},V=lt=>{Array.isArray(lt?.value)?N(lt?.value??[]):D(lt?.value),b?.(lt)},F=kp(nh.FocusWithin),$=H.useCallback((lt,dt)=>X.jsx(X.Fragment,{children:dt}),[]),st=_||$,I=(lt,dt,pt)=>{const tt=`element_${O}_${dt}`,w=R9.pick(u,lt),Z=String(R9.pick(c,lt)),K=dt===0,at=dt===pt.length-1,St=Se("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-data-checked:bg-primary-1 bsc:dark:has-data-checked:bg-mono-light-1 bsc:has-data-checked:text-white bsc:dark:has-data-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!f,"bc-read-only bsc:has-data-checked:bg-primary-4 bsc:dark:has-data-checked:bg-mono-light-3 bsc:has-data-checked:text-gray-5 bsc:dark:has-data-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":f,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":K&&p===Za.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":at&&p===Za.Horizontal,"bsc:border-t bsc:border-b":!K&&!at&&p===Za.Horizontal,"bsc:border-l":!K&&p===Za.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":K&&p===Za.Vertical,"bsc:border bsc:rounded-b-md":at&&p===Za.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!K&&!at&&p===Za.Vertical},F),W={itemId:tt,selectedValue:m?A:x,itemText:w,itemValue:Z,itemData:lt,itemStyles:St,isSelected:U(Z),isFirstItem:K,isLastItem:at,onItemChanged:j};return m?X.jsx(vc,{props:W,template:st,children:X.jsx(rh,{className:St,children:X.jsx(c6,{value:Z,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:w})})},tt):X.jsx(vc,{props:W,template:st,children:X.jsx(rh,{className:St,children:X.jsx(y6,{value:Z,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:w})})},tt)},et=Se("bsc:flex bsc:flex-col bsc:gap-2",S),nt=Se("bsc:flex",{"bsc:flex-col bsc:w-max":p===Za.Vertical}),bt=lt=>m?X.jsx(d6,{name:n,value:A,readOnly:f,onChange:V,className:nt,children:lt.map(I)}):X.jsx(g6,{name:n,value:x,readOnly:f,onChange:V,className:nt,children:lt.map(I)});return X.jsxs(rh,{className:et,children:[t&&X.jsx(wr,{label:t,readOnly:f}),R&&bt(R)]})},ZG=H.memo(QG),JG=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,labelLocation:p=Es.Right,orientation:m=Za.Vertical,className:S,useAnimation:b,onChange:_})=>{const x=tv(()=>s,[s]),D=H.useId(),A=hv(b),N=kp(nh.FocusWithin),R=Se("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",S),O=Se("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":m===Za.Vertical,"bsc:*:pr-2":m===Za.Horizontal}),U=Se("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":f}),j=Se("bc-radio-item bsc:group bsc:relative bsc:*:size-[21px] bsc:rounded-full",{"bsc:ml-2":p===Es.Left,"bsc:mr-2":p===Es.Right,"bc-read-only":f},N),V=Se("bc-radio-item-svg bsc:stroke-2 bsc:fill-none bsc:rounded-full bsc:stroke-gray-1 bsc:dark:stroke-mono-light-2 bsc:group-data-read-only:stroke-gray-4 bsc:dark:group-data-read-only:stroke-mono-light-3"),F=Se("bsc:group-data-checked:fill-primary-1 bsc:dark:group-data-checked:fill-mono-light-2 bsc:group-data-checked:group-data-read-only:fill-primary-4 bsc:dark:group-data-checked:group-data-read-only:fill-mono-light-3",{"bsc:group-data-checked:animate-bounce":!f&&A}),$=Se("bsc:invisible bsc:group-data-checked:visible bsc:group-data-checked:fill-white bsc:dark:group-data-checked:fill-mono-dark-1",{"bsc:group-data-checked:animate-bounce":!f&&A}),st=(I,et)=>{const nt=I[u],bt=I[c];return X.jsxs(rh,{className:U,children:[p===Es.Left&&X.jsx(wr,{label:nt,readOnly:f}),X.jsx(y6,{value:bt,className:j,children:X.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:V,children:[X.jsx("circle",{cx:15,cy:15,r:15,className:F}),X.jsx("circle",{cx:"50%",cy:"50%",r:7,className:$})]})}),p===Es.Right&&X.jsx(wr,{label:nt,readOnly:f})]},`radio_${D}_item${et}`)};return X.jsxs("div",{className:R,children:[t&&X.jsx(wr,{label:t,readOnly:f}),X.jsx(g6,{name:n,value:i,readOnly:f,onChange:_,className:O,children:x&&x.map(st)})]})},FG=H.memo(JG),kG=({name:n,label:t,value:i,checked:s=!1,readOnly:u=!1,useAnimation:c,className:f,onChange:p})=>{const m=hv(c),S=Se("bc-toggle-wrapper bsc:flex bsc:flex-col",f),b=kp(nh.FocusWithin),_=Se("bc-toggle-container bsc:group bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!u,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":u},b),x=Se("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:group-data-toggled:translate-x-[35px] bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!u,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":u,"bsc:[transition:0.3s]":!u&&m});return X.jsxs(rh,{className:S,children:[t&&X.jsx(wr,{label:t,readOnly:u}),X.jsx(bA,{name:n,value:i,toggled:s,onChange:p,className:_,children:X.jsx("div",{className:x})})]})},IG=H.memo(kG);$t.AvatarEditor=zD,$t.BeeSoftProvider=HD,$t.Button=Ql,$t.Checkbox=v6,$t.CheckboxGroup=CA,$t.ContentEditableInput=$1,$t.DateFormatType=N0,$t.DateScrollerType=Mh,$t.DateSelectionType=Qe,$t.DateTime=qG,$t.FormGroupItemOrientation=Za,$t.FormattedInput=A9,$t.GroupButton=ZG,$t.MediaQuery=Hv,$t.MobileOverlayPanel=b9,$t.OverlayPanel=C9,$t.RadioButton=FG,$t.SelectionLabelLocation=Es,$t.Toggle=IG,$t.applyBeeSoftTheme=RH,$t.createBeeSoftTheme=zH,Object.defineProperty($t,Symbol.toStringTag,{value:"Module"})}));
234
+ <%s key={someKey} {...props} />`,jt,Se,Qn,Se),pt[Se+jt]=!0)}if(Se=null,bt!==void 0&&(i(bt),Se=""+bt),f(vt)&&(i(vt.key),Se=""+vt.key),"key"in vt){bt={};for(var We in vt)We!=="key"&&(bt[We]=vt[We])}else bt=vt;return Se&&p(bt,typeof I=="function"?I.displayName||I.name||"Unknown":I),S(I,Se,bt,u(),pe,An)}function _(I){x(I)?I._store&&(I._store.validated=1):typeof I=="object"&&I!==null&&I.$$typeof===tt&&(I._payload.status==="fulfilled"?x(I._payload.value)&&I._payload.value._store&&(I._payload.value._store.validated=1):I._store&&(I._store.validated=1))}function x(I){return typeof I=="object"&&I!==null&&I.$$typeof===A}var D=w,A=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),V=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),st=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),tt=Symbol.for("react.lazy"),et=Symbol.for("react.activity"),Tt=Symbol.for("react.client.reference"),it=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ht=Object.prototype.hasOwnProperty,dt=Array.isArray,nt=console.createTask?console.createTask:function(){return null};D={react_stack_bottom_frame:function(I){return I()}};var H,J={},K=D.react_stack_bottom_frame.bind(D,c)(),mt=nt(s(c)),pt={};J1.Fragment=R,J1.jsx=function(I,vt,bt){var jt=1e4>it.recentlyCreatedOwnerStacks++;return b(I,vt,bt,!1,jt?Error("react-stack-top-frame"):K,jt?nt(s(I)):mt)},J1.jsxs=function(I,vt,bt){var jt=1e4>it.recentlyCreatedOwnerStacks++;return b(I,vt,bt,!0,jt?Error("react-stack-top-frame"):K,jt?nt(s(I)):mt)}})()),J1}var q4;function LD(){return q4||(q4=1,process.env.NODE_ENV==="production"?nv.exports=GD():nv.exports=jD()),nv.exports}var Ja=LD();function PD(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X4,K4;function YD(){return K4||(K4=1,X4=function n(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var s,u,c;if(Array.isArray(t)){if(s=t.length,s!=i.length)return!1;for(u=s;u--!==0;)if(!n(t[u],i[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(c=Object.keys(t),s=c.length,s!==Object.keys(i).length)return!1;for(u=s;u--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[u]))return!1;for(u=s;u--!==0;){var f=c[u];if(!n(t[f],i[f]))return!1}return!0}return t!==t&&i!==i}),X4}var qD=YD();const XD=PD(qD),KD=()=>{throw new Error("useEvent should not be called before the component is mounted")},t0=n=>{const t=w.useRef(KD);w.useInsertionEffect(()=>{t.current=n},[n]);const i=w.useRef(null);return i.current||(i.current=function(){return t.current?.apply(this,arguments)}),i.current},Q4=n=>{const t=w.useRef(void 0);let i=!1;t.current!==void 0&&(i=!XD(t.current,n));const s={changed:i,previousValue:t.current};return t.current=n,s},QD=n=>typeof n=="function",ZD=n=>{const[t,i]=w.useState({value:n,initial:!0}),s=w.useRef(n);return[t,u=>{if(!QD(u))i({value:u,initial:!1});else{const c=u(s.current);s.current=c,i({value:c,initial:!1})}}]},JD=n=>{const[t,i]=ZD(n),s=w.useRef({value:n,initial:!0});return s.current!==t&&(s.current=t),[t,i,s]},Z4=w.createContext(void 0),F1=()=>w.useContext(Z4),av=({id:n,name:t,value:i,type:s,checked:u,readOnly:c,onChange:f})=>Ja.jsx("input",{id:n,name:t,value:i,type:s,checked:u,onChange:f,readOnly:c,disabled:c,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function FD(n){const t=Object.keys(n),i={};for(let s=0,u=t.length;s<u;s++){const c=t[s];if(c){const f=n[c],p=c.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`);typeof f=="boolean"?f&&(i[`data-${p}`]=!0):i[`data-${p}`]=n[c]}}return i}const e0=({wrapperElement:n,renderProps:t,elementProps:i,innerWrapperElement:s,className:u,children:c})=>{if(typeof c=="function")return s?Ja.jsxs(Ja.Fragment,{children:[s,c(t)]}):c(t);{const f=s?Ja.jsxs(Ja.Fragment,{children:[s,c]}):c;return w.createElement(n,Object.assign({},t?FD(t):{},i,{className:u}),f)}};var kD=Symbol.for("preact-signals");function iv(){if(sh>1)sh--;else{for(var n,t=!1;n0!==void 0;){var i=n0;for(n0=void 0,sv++;i!==void 0;){var s=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&k4(i))try{i.c()}catch(u){t||(n=u,t=!0)}i=s}}if(sv=0,sh--,t)throw n}}var Ve=void 0;function J4(n){var t=Ve;Ve=void 0;try{return n()}finally{Ve=t}}var n0=void 0,sh=0,sv=0,k1=0;function F4(n){if(Ve!==void 0){var t=n.n;if(t===void 0||t.t!==Ve)return t={i:0,S:n,p:Ve.s,n:void 0,t:Ve,e:void 0,x:void 0,r:t},Ve.s!==void 0&&(Ve.s.n=t),Ve.s=t,n.n=t,32&Ve.f&&n.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ve.s,t.n=void 0,Ve.s.n=t,Ve.s=t),t}}function Fa(n,t){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Fa.prototype.brand=kD,Fa.prototype.h=function(){return!0},Fa.prototype.S=function(n){var t=this,i=this.t;i!==n&&n.e===void 0&&(n.x=i,this.t=n,i!==void 0?i.e=n:J4(function(){var s;(s=t.W)==null||s.call(t)}))},Fa.prototype.U=function(n){var t=this;if(this.t!==void 0){var i=n.e,s=n.x;i!==void 0&&(i.x=s,n.e=void 0),s!==void 0&&(s.e=i,n.x=void 0),n===this.t&&(this.t=s,s===void 0&&J4(function(){var u;(u=t.Z)==null||u.call(t)}))}},Fa.prototype.subscribe=function(n){var t=this;return rv(function(){var i=t.value,s=Ve;Ve=void 0;try{n(i)}finally{Ve=s}},{name:"sub"})},Fa.prototype.valueOf=function(){return this.value},Fa.prototype.toString=function(){return this.value+""},Fa.prototype.toJSON=function(){return this.value},Fa.prototype.peek=function(){var n=Ve;Ve=void 0;try{return this.value}finally{Ve=n}},Object.defineProperty(Fa.prototype,"value",{get:function(){var n=F4(this);return n!==void 0&&(n.i=this.i),this.v},set:function(n){if(n!==this.v){if(sv>100)throw new Error("Cycle detected");this.v=n,this.i++,k1++,sh++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{iv()}}}});function ID(n,t){return new Fa(n,t)}function k4(n){for(var t=n.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function I4(n){for(var t=n.s;t!==void 0;t=t.n){var i=t.S.n;if(i!==void 0&&(t.r=i),t.S.n=t,t.i=-1,t.n===void 0){n.s=t;break}}}function W4(n){for(var t=n.s,i=void 0;t!==void 0;){var s=t.p;t.i===-1?(t.S.U(t),s!==void 0&&(s.n=t.n),t.n!==void 0&&(t.n.p=s)):i=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=s}n.s=i}function lh(n,t){Fa.call(this,void 0),this.x=n,this.s=void 0,this.g=k1-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}lh.prototype=new Fa,lh.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===k1))return!0;if(this.g=k1,this.f|=1,this.i>0&&!k4(this))return this.f&=-2,!0;var n=Ve;try{I4(this),Ve=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(i){this.v=i,this.f|=16,this.i++}return Ve=n,W4(this),this.f&=-2,!0},lh.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Fa.prototype.S.call(this,n)},lh.prototype.U=function(n){if(this.t!==void 0&&(Fa.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},lh.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(lh.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var n=F4(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}});function $4(n){var t=n.u;if(n.u=void 0,typeof t=="function"){sh++;var i=Ve;Ve=void 0;try{t()}catch(s){throw n.f&=-2,n.f|=8,lv(n),s}finally{Ve=i,iv()}}}function lv(n){for(var t=n.s;t!==void 0;t=t.n)t.S.U(t);n.x=void 0,n.s=void 0,$4(n)}function WD(n){if(Ve!==this)throw new Error("Out-of-order effect");W4(this),Ve=n,this.f&=-2,8&this.f&&lv(this),iv()}function rh(n,t){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t?.name}rh.prototype.c=function(){var n=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{n()}},rh.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,$4(this),I4(this),sh++;var n=Ve;return Ve=this,WD.bind(this,n)},rh.prototype.N=function(){2&this.f||(this.f|=2,this.o=n0,n0=this)},rh.prototype.d=function(){this.f|=8,1&this.f||lv(this)},rh.prototype.dispose=function(){this.d()};function rv(n,t){var i=new rh(n,t);try{i.c()}catch(u){throw i.d(),u}var s=i.d.bind(i);return s[Symbol.dispose]=s,s}var ov={exports:{}},uv={},t6;function $D(){if(t6)return uv;t6=1;var n=w;function t(_,x){return _===x&&(_!==0||1/_===1/x)||_!==_&&x!==x}var i=typeof Object.is=="function"?Object.is:t,s=n.useState,u=n.useEffect,c=n.useLayoutEffect,f=n.useDebugValue;function p(_,x){var D=x(),A=s({inst:{value:D,getSnapshot:x}}),N=A[0].inst,R=A[1];return c(function(){N.value=D,N.getSnapshot=x,m(N)&&R({inst:N})},[_,D,x]),u(function(){return m(N)&&R({inst:N}),_(function(){m(N)&&R({inst:N})})},[_]),f(D),D}function m(_){var x=_.getSnapshot;_=_.value;try{var D=x();return!i(_,D)}catch{return!0}}function S(_,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:p;return uv.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,uv}var e6={},n6;function tA(){return n6||(n6=1,process.env.NODE_ENV!=="production"&&(function(){function n(D,A){return D===A&&(D!==0||1/D===1/A)||D!==D&&A!==A}function t(D,A){b||u.startTransition===void 0||(b=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var N=A();if(!_){var R=A();c(N,R)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_=!0)}R=f({inst:{value:N,getSnapshot:A}});var O=R[0].inst,U=R[1];return m(function(){O.value=N,O.getSnapshot=A,i(O)&&U({inst:O})},[D,N,A]),p(function(){return i(O)&&U({inst:O}),D(function(){i(O)&&U({inst:O})})},[D]),S(N),N}function i(D){var A=D.getSnapshot;D=D.value;try{var N=A();return!c(D,N)}catch{return!0}}function s(D,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u=w,c=typeof Object.is=="function"?Object.is:n,f=u.useState,p=u.useEffect,m=u.useLayoutEffect,S=u.useDebugValue,b=!1,_=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;e6.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),e6}var a6;function eA(){return a6||(a6=1,process.env.NODE_ENV==="production"?ov.exports=$D():ov.exports=tA()),ov.exports}var nA=eA(),aA=w.version.split(".").map(Number)[0],i6=[],iA=Symbol.for(aA>=19?"react.transitional.element":"react.element"),hc,s6=Symbol.dispose||Symbol.for("Symbol.dispose");function cv(n,t){var i=t.effect.S();return hc=t,sA.bind(t,n,i)}function sA(n,t){t(),hc=n}var l6,fv,r6=function(){},lA=((l6={o:0,effect:{s:void 0,c:function(){},S:function(){return r6},d:function(){}},subscribe:function(){return r6},getSnapshot:function(){return 0},S:function(){},f:function(){}})[s6]=function(){},l6),rA=Promise.prototype.then.bind(Promise.resolve());function oA(){fv||(fv=rA(uA))}function uA(){var n;fv=void 0,(n=hc)==null||n.f()}function cA(n){oA();var t=w.useRef();t.current==null&&(typeof window>"u"?t.current=lA:t.current=(function(s){var u,c,f,p,m=0,S=rv(function(){c=this});return c.c=function(){m=m+1|0,p&&p()},(u={o:s,effect:c,subscribe:function(b){return p=b,function(){m=m+1|0,p=void 0,S()}},getSnapshot:function(){return m},S:function(){if(hc!=null){var b=hc.o,_=this.o;b==0&&_==0||b==0&&_==1?(hc.f(),f=cv(void 0,this)):b==1&&_==0||b==2&&_==0||(f=cv(hc,this))}else f=cv(void 0,this)},f:function(){var b=f;f=void 0,b?.()}})[s6]=function(){this.f()},u})(n));var i=t.current;return nA.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot),i.S(),i}Object.defineProperties(Fa.prototype,{$$typeof:{configurable:!0,value:iA},type:{configurable:!0,value:function(n){var t=n.data,i=cA(1);try{return t.value}finally{i.f()}}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});function Ko(n,t){return w.useMemo(function(){return ID(n,t)},i6)}function oh(n,t){var i=w.useRef(n);i.current=n,w.useEffect(function(){return rv(function(){return i.current()},t)},i6)}const o6=w.createContext(void 0),u6=()=>w.useContext(o6),fA=(n,t)=>{const{name:i,value:s,checked:u=!1,partial:c=!1,readOnly:f=!1,onChange:p,children:m,className:S}=n,[b,_]=w.useState(i),[x,D]=w.useState(f),A=w.useRef(void 0),N=w.useRef(void 0),R=w.useRef(void 0),O=w.useRef(void 0),U=w.useRef(void 0),j=w.useRef(void 0),V=u6(),F=F1(),W=w.useId(),st=w.useMemo(()=>F?.sharedId||n.id||W,[F?.sharedId,n.id,W]),[$,tt,et]=JD({checked:!1,partial:!1}),Tt=Q4(u),it=Q4(c);w.useEffect(()=>{if($.initial)tt({checked:c?!1:u,partial:c});else{const J=Tt.changed?u:$.value.checked,K=it.changed?c:$.value.partial;tt({checked:K?!1:J,partial:K})}},[u,c]),w.useEffect(()=>{D(f)},[f]),w.useEffect(()=>{V&&(A.current=V.nameSignal,N.current=V.valueSignal,R.current=V.readOnlySignal,O.current=V.useComparator,U.current=V.compare,j.current=V.onCheckboxChange)},[V]),oh(()=>{if(N.current)if(O.current?.value&&U.current){const J=U.current,K=N.current.value?.some(mt=>J(s,mt))??!1;tt(mt=>({...mt,checked:K}))}else{const J=N.current.value?.some(K=>s===K)??!1;tt(K=>({...K,checked:J}))}}),oh(()=>{A.current&&_(A.current.value)}),oh(()=>{R.current&&D(R.current.value??!1)});const ht=t0(J=>{const K=et.current?.value.partial===!0?!0:J.target.checked;tt({checked:K,partial:!1}),j.current?j.current({originalEvent:J,name:b,value:s,checked:K}):p?.({originalEvent:J,name:b,value:s,checked:K})}),dt=J=>{const K={checked:J?!1:et.current?.value.checked??!1,partial:J};tt(K)},nt=J=>{tt({checked:J,partial:!1})};w.useImperativeHandle(t,()=>({setPartiallyChecked:dt,setChecked:nt}));const H=b&&Ja.jsx(av,{id:st,name:b,type:"checkbox",checked:$.value.checked,readOnly:x,onChange:ht});return e0({wrapperElement:"label",renderProps:{...$.value,readOnly:x},elementProps:{htmlFor:st},className:S,innerWrapperElement:H,children:m})},c6=w.memo(w.forwardRef(fA)),hA=(n,t)=>n&&t&&typeof n=="object"&&typeof t=="object"&&"value"in n&&"value"in t?n.value===t.value:n===t,f6=(n=hA)=>t0((t,i)=>{if(typeof n=="string"){const s=n;return t?.[s]===i?.[s]}return n(t,i)}),h6=({props:n,children:t})=>Ja.jsx(o6.Provider,{value:n,children:t}),dA=({name:n,value:t,comparator:i,readOnly:s=!1,onChange:u,className:c,children:f})=>{const p=Ko(),m=Ko(),S=Ko(),b=Ko(),_=f6(i),x=t0(A=>{if(A){const{checked:N}=A,R=A.value;if(m.value)if(i)if(N)m.value.findIndex(O=>_(R,O))===-1&&m.value.push(R);else{const O=m.value.filter(U=>!_(R,U));m.value=[...O]}else if(N)m.value.indexOf(R)===-1&&m.value.push(R);else{const O=m.value.filter(U=>U!==R);m.value=[...O]}else N&&(m.value=[R])}u?.({originalEvent:A?.originalEvent,name:n,value:m.value})}),D=w.useMemo(()=>({nameSignal:p,valueSignal:m,readOnlySignal:S,useComparator:b,compare:_,onCheckboxChange:x}),[]);return w.useEffect(()=>{p.value=n},[n]),w.useEffect(()=>{m.value=t},[t]),w.useEffect(()=>{S.value=s},[s]),w.useEffect(()=>{b.value=i!==void 0},[i]),Ja.jsx("div",{className:c,children:Ja.jsx(h6,{props:D,children:f})})},d6=w.memo(dA),uh=({className:n,children:t})=>{const i=w.useId(),s=w.useMemo(()=>({sharedId:i}),[i]),u=Ja.jsx(Z4.Provider,{value:s,children:t});return e0({wrapperElement:"div",className:n,children:u})},pA=({htmlFor:n,className:t,children:i})=>{const s=F1(),u=w.useMemo(()=>s?.sharedId||n,[s?.sharedId,n]);return e0({wrapperElement:"label",elementProps:{htmlFor:u},className:t,children:i})};var p6={exports:{}},m6;function mA(){return m6||(m6=1,(function(n){(function(){var t={}.hasOwnProperty;function i(){for(var c="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(c=u(c,s(p)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var f="";for(var p in c)t.call(c,p)&&c[p]&&(f=u(f,p));return f}function u(c,f){return f?c?c+" "+f:c+f:c}n.exports?(i.default=i,n.exports=i):window.classNames=i})()})(p6)),p6.exports}mA();const gA=({intersectionObserver:n,resizeObserver:t,page:i,height:s,children:u})=>{const c=w.useRef(void 0);w.useEffect(()=>()=>{c.current&&(n?.unobserve(c.current),t?.unobserve(c.current))},[]),w.useEffect(()=>(c.current&&n?.observe(c.current),()=>{c.current&&n&&n.unobserve(c.current)}),[n]);const f=m=>{c.current&&(n?.unobserve(c.current),t?.unobserve(c.current)),n?.observe(m),t?.observe(m),c.current=m},p=s?{height:`${s}px`}:{};return Ja.jsx("div",{"data-page":i,"data-name":"page",style:p,ref:m=>{m&&f(m)},children:u})};w.memo(gA);const yA=({intersectionObserver:n,page:t})=>{const i=w.useRef(void 0);w.useEffect(()=>()=>{i.current&&n?.unobserve(i.current)},[]);const s=u=>{i.current&&n?.unobserve(i.current),n?.observe(u),i.current=u};return Ja.jsx("div",{"data-page":t,"data-name":"marker",ref:u=>{u&&s(u)}})};w.memo(yA);const vA=({name:n,value:t,comparator:i,readOnly:s=!1,onChange:u,className:c,children:f})=>{const p=Ko(),m=Ko(),S=Ko(),b=Ko(),_=f6(i),x=w.useMemo(()=>({nameSignal:p,valueSignal:m,readOnlySignal:S,useComparator:b,compare:_}),[]);w.useEffect(()=>{p.value=n},[n]),w.useEffect(()=>{m.value=t},[t]),w.useEffect(()=>{S.value=s},[s]),w.useEffect(()=>{b.value=i!==void 0},[i]);const D=t0(A=>{u?.({originalEvent:A,name:n,value:m.value})});return Ja.jsx("div",{className:c,onChange:D,children:Ja.jsx(h6,{props:x,children:f})})},g6=w.memo(vA),SA=({value:n,className:t,children:i})=>{const[s,u]=w.useState(),[c,f]=w.useState(!1),[p,m]=w.useState(!1),S=w.useRef(void 0),b=w.useRef(void 0),_=w.useRef(void 0),x=w.useRef(void 0),D=w.useRef(void 0),A=u6(),N=F1(),R=w.useId(),O=w.useMemo(()=>N?.sharedId||R,[N?.sharedId,R]);w.useEffect(()=>{A&&(S.current=A.nameSignal,b.current=A.valueSignal,_.current=A.readOnlySignal,x.current=A.useComparator,D.current=A.compare)},[A]),oh(()=>{x&&b.current&&D.current?f(D.current(n,b.current.value)):f(n===b.current?.value)}),oh(()=>{u(S.current?.value)}),oh(()=>{m(_.current?.value??!1)});const U=t0(j=>{j.target.checked&&b.current&&(b.current.value=n)});return e0({wrapperElement:"label",renderProps:{checked:c,readOnly:p},elementProps:{htmlFor:O},className:t,innerWrapperElement:s?Ja.jsx(av,{id:O,name:s,type:"radio",value:n,checked:c,readOnly:p,onChange:U}):null,children:i})},y6=w.memo(SA),bA=(n,t)=>{const{id:i,name:s,value:u,toggled:c=!1,readOnly:f,onChange:p,children:m,className:S}=n,[b,_]=w.useState(c),x=F1(),D=w.useId(),A=w.useMemo(()=>x?.sharedId||i||D,[x?.sharedId,i,D]);w.useEffect(()=>{_(c)},[c]);const N=O=>{_(O.target.checked),p?.({originalEvent:O,name:s,value:u,checked:O.target.checked})},R=O=>{_(O)};return w.useImperativeHandle(t,()=>({setToggled:R})),e0({wrapperElement:"label",renderProps:{toggled:b,readOnly:f},elementProps:{htmlFor:A},className:S,innerWrapperElement:Ja.jsx(av,{id:A,name:s,type:"checkbox",checked:b,readOnly:f,onChange:N}),children:m})},EA=w.memo(w.forwardRef(bA)),hv=n=>{const[t,i]=w.useState(!0),s=j4();return w.useEffect(()=>{s&&s.useAnimations!==void 0?i(s.useAnimations):n!==void 0&&i(n)},[s,n]),t},Vr=({label:n,htmlFor:t,readOnly:i=!1,className:s})=>{const u=ve("bc-label",{"bsc:text-black bsc:dark:text-mono-light-1":!i,"bc-read-only bsc:text-gray-4 bsc:dark:text-mono-light-3 bsc:pointer-events-none":i},s);return X.jsx(pA,{htmlFor:t,className:u,children:n})},TA=(n,t)=>{const{name:i,label:s,value:u,readOnly:c=!1,checked:f=!1,partial:p=!1,labelLocation:m=Es.Right,className:S,useAnimation:b,onChange:_}=n,x=hv(b),D=ve("bc-checkbox-wrapper bsc:flex bsc:items-center bsc:group/wrapper bsc:*:cursor-pointer bsc:has-data-read-only:text-gray-4 bsc:dark:has-data-read-only:text-mono-light-3 bsc:has-data-read-only:pointer-events-none",S),A=ve("bc-checkbox-label bsc:peer-data-read-only:text-gray-4 bsc:dark:peer-data-read-only:text-mono-light-3",{"bsc:ml-2":m===Es.Right,"bsc:mr-2":m===Es.Left}),N=Wp(ih.FocusWithin),R=ve("bc-checkbox-outer bsc:group/checkbox bsc:peer bsc:rounded bsc:*:block bsc:*:size-[21px]","bsc:inset-shadow-[0_0_0_1px] bsc:inset-shadow-gray-2 bsc:dark:inset-shadow-[0_0_0_1px] bsc:dark:inset-shadow-mono-light-2","bsc:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:group-hover/wrapper:not-data-checked:inset-shadow-gray-4","bsc:dark:group-hover/wrapper:not-data-checked:inset-shadow-[0_0_0_2px] bsc:[transition:box-shadow_0.3s]",N),O=ve("bc-checkbox-svg bsc:rounded bsc:stroke-mono-light-1 bsc:stroke-2 bsc:[stroke-linecap:round]","bsc:[stroke-linejoin:round] bsc:dark:stroke-mono-dark-3 bsc:[transform:scale(0)]","bsc:group-data-checked/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-checked/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:bg-primary-4 bsc:group-data-partial/checkbox:group-data-read-only/checkbox:fill-primary-4 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-checked/checkbox:group-data-read-only/checkbox:fill-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:bg-mono-light-3 bsc:dark:group-data-partial/checkbox:group-data-read-only/checkbox:fill-mono-light-3","bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:bg-primary-1 bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:fill-primary-1 bsc:group-data-partial/checkbox:bg-primary-1 bsc:group-data-partial/checkbox:fill-primary-1 bsc:dark:group-data-checked/checkbox:bg-mono-light-1 bsc:dark:group-data-checked/checkbox:fill-mono-light-1 bsc:dark:group-data-partial/checkbox:bg-mono-light-1 bsc:dark:group-data-partial/checkbox:fill-mono-light-1",{"bsc:group-data-checked/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-partial/checkbox:group-not-data-read-only/checkbox:animate-bounce bsc:group-data-checked/checkbox:group-data-read-only/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:group-data-read-only/checkbox:[transform:scale(1)]":x,"bsc:group-data-checked/checkbox:[transform:scale(1)] bsc:group-data-partial/checkbox:[transform:scale(1)]":!x});return X.jsxs(uh,{className:D,children:[s&&m===Es.Left&&X.jsx(Vr,{label:s,readOnly:c,className:A}),X.jsx(c6,{ref:t,name:i,value:u,checked:f,partial:p,readOnly:c,className:R,onChange:_,children:X.jsxs("svg",{viewBox:"0 0 21 21",className:O,children:[X.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),X.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),s&&m===Es.Right&&X.jsx(Vr,{label:s,readOnly:c,className:A})]})},v6=w.memo(w.forwardRef(TA)),CA=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,orientation:p=Za.Vertical,className:m,onChange:S})=>{const[b,_]=w.useState([]),x=tv(()=>s,[s]);w.useEffect(()=>{_(i??[])},[i]);const D=U=>{if(U){const{value:j}=U;_(j??[]),S?.({name:n,value:j})}},A=(U,j)=>X.jsx(v6,{label:U[u],value:U[c],className:"bsc:mr-3"},`${n}_checkbox_${j}`),N=ve("bsc:flex bsc:flex-col bsc:gap-1",m),R=ve("bsc:flex bsc:gap-1",{"bsc:flex-col":p===Za.Vertical}),O=U=>X.jsx(d6,{name:n,value:b,readOnly:f,onChange:D,className:R,children:U.map(A)});return X.jsxs("div",{className:N,children:[t&&X.jsx(Vr,{label:t,readOnly:f}),x&&O(x)]})},_A=w.memo(CA);var S6=typeof global=="object"&&global&&global.Object===Object&&global,xA=typeof self=="object"&&self&&self.Object===Object&&self,cl=S6||xA||Function("return this")(),ch=cl.Symbol,b6=Object.prototype,DA=b6.hasOwnProperty,AA=b6.toString,a0=ch?ch.toStringTag:void 0;function MA(n){var t=DA.call(n,a0),i=n[a0];try{n[a0]=void 0;var s=!0}catch{}var u=AA.call(n);return s&&(t?n[a0]=i:delete n[a0]),u}var NA=Object.prototype,OA=NA.toString;function RA(n){return OA.call(n)}var zA="[object Null]",HA="[object Undefined]",E6=ch?ch.toStringTag:void 0;function fh(n){return n==null?n===void 0?HA:zA:E6&&E6 in Object(n)?MA(n):RA(n)}function hh(n){return n!=null&&typeof n=="object"}var wA="[object Symbol]";function UA(n){return typeof n=="symbol"||hh(n)&&fh(n)==wA}var dv=Array.isArray,BA=/\s/;function VA(n){for(var t=n.length;t--&&BA.test(n.charAt(t)););return t}var GA=/^\s+/;function jA(n){return n&&n.slice(0,VA(n)+1).replace(GA,"")}function Qo(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}var T6=NaN,LA=/^[-+]0x[0-9a-f]+$/i,PA=/^0b[01]+$/i,YA=/^0o[0-7]+$/i,qA=parseInt;function C6(n){if(typeof n=="number")return n;if(UA(n))return T6;if(Qo(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=Qo(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=jA(n);var i=PA.test(n);return i||YA.test(n)?qA(n.slice(2),i?2:8):LA.test(n)?T6:+n}var XA="[object AsyncFunction]",KA="[object Function]",QA="[object GeneratorFunction]",ZA="[object Proxy]";function _6(n){if(!Qo(n))return!1;var t=fh(n);return t==KA||t==QA||t==XA||t==ZA}var pv=cl["__core-js_shared__"],x6=(function(){var n=/[^.]+$/.exec(pv&&pv.keys&&pv.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function JA(n){return!!x6&&x6 in n}var FA=Function.prototype,kA=FA.toString;function dc(n){if(n!=null){try{return kA.call(n)}catch{}try{return n+""}catch{}}return""}var IA=/[\\^$.*+?()[\]{}|]/g,WA=/^\[object .+?Constructor\]$/,$A=Function.prototype,tM=Object.prototype,eM=$A.toString,nM=tM.hasOwnProperty,aM=RegExp("^"+eM.call(nM).replace(IA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function iM(n){if(!Qo(n)||JA(n))return!1;var t=_6(n)?aM:WA;return t.test(dc(n))}function sM(n,t){return n?.[t]}function pc(n,t){var i=sM(n,t);return iM(i)?i:void 0}var mv=pc(cl,"WeakMap"),D6=Object.create,lM=(function(){function n(){}return function(t){if(!Qo(t))return{};if(D6)return D6(t);n.prototype=t;var i=new n;return n.prototype=void 0,i}})(),A6=(function(){try{var n=pc(Object,"defineProperty");return n({},"",{}),n}catch{}})();function rM(n,t){for(var i=-1,s=n==null?0:n.length;++i<s&&t(n[i],i,n)!==!1;);return n}var oM=9007199254740991,uM=/^(?:0|[1-9]\d*)$/;function cM(n,t){var i=typeof n;return t=t??oM,!!t&&(i=="number"||i!="symbol"&&uM.test(n))&&n>-1&&n%1==0&&n<t}function fM(n,t,i){t=="__proto__"&&A6?A6(n,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[t]=i}function M6(n,t){return n===t||n!==n&&t!==t}var hM=Object.prototype,dM=hM.hasOwnProperty;function pM(n,t,i){var s=n[t];(!(dM.call(n,t)&&M6(s,i))||i===void 0&&!(t in n))&&fM(n,t,i)}var mM=9007199254740991;function N6(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=mM}function gM(n){return n!=null&&N6(n.length)&&!_6(n)}var yM=Object.prototype;function O6(n){var t=n&&n.constructor,i=typeof t=="function"&&t.prototype||yM;return n===i}function vM(n,t){for(var i=-1,s=Array(n);++i<n;)s[i]=t(i);return s}var SM="[object Arguments]";function R6(n){return hh(n)&&fh(n)==SM}var z6=Object.prototype,bM=z6.hasOwnProperty,EM=z6.propertyIsEnumerable,TM=R6((function(){return arguments})())?R6:function(n){return hh(n)&&bM.call(n,"callee")&&!EM.call(n,"callee")};function CM(){return!1}var H6=typeof te=="object"&&te&&!te.nodeType&&te,w6=H6&&typeof module=="object"&&module&&!module.nodeType&&module,_M=w6&&w6.exports===H6,U6=_M?cl.Buffer:void 0,xM=U6?U6.isBuffer:void 0,B6=xM||CM,DM="[object Arguments]",AM="[object Array]",MM="[object Boolean]",NM="[object Date]",OM="[object Error]",RM="[object Function]",zM="[object Map]",HM="[object Number]",wM="[object Object]",UM="[object RegExp]",BM="[object Set]",VM="[object String]",GM="[object WeakMap]",jM="[object ArrayBuffer]",LM="[object DataView]",PM="[object Float32Array]",YM="[object Float64Array]",qM="[object Int8Array]",XM="[object Int16Array]",KM="[object Int32Array]",QM="[object Uint8Array]",ZM="[object Uint8ClampedArray]",JM="[object Uint16Array]",FM="[object Uint32Array]",un={};un[PM]=un[YM]=un[qM]=un[XM]=un[KM]=un[QM]=un[ZM]=un[JM]=un[FM]=!0,un[DM]=un[AM]=un[jM]=un[MM]=un[LM]=un[NM]=un[OM]=un[RM]=un[zM]=un[HM]=un[wM]=un[UM]=un[BM]=un[VM]=un[GM]=!1;function kM(n){return hh(n)&&N6(n.length)&&!!un[fh(n)]}function gv(n){return function(t){return n(t)}}var V6=typeof te=="object"&&te&&!te.nodeType&&te,i0=V6&&typeof module=="object"&&module&&!module.nodeType&&module,IM=i0&&i0.exports===V6,yv=IM&&S6.process,dh=(function(){try{var n=i0&&i0.require&&i0.require("util").types;return n||yv&&yv.binding&&yv.binding("util")}catch{}})(),G6=dh&&dh.isTypedArray,WM=G6?gv(G6):kM,$M=Object.prototype,tN=$M.hasOwnProperty;function eN(n,t){var i=dv(n),s=!i&&TM(n),u=!i&&!s&&B6(n),c=!i&&!s&&!u&&WM(n),f=i||s||u||c,p=f?vM(n.length,String):[],m=p.length;for(var S in n)tN.call(n,S)&&!(f&&(S=="length"||u&&(S=="offset"||S=="parent")||c&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||cM(S,m)))&&p.push(S);return p}function j6(n,t){return function(i){return n(t(i))}}var nN=j6(Object.keys,Object),aN=Object.prototype,iN=aN.hasOwnProperty;function sN(n){if(!O6(n))return nN(n);var t=[];for(var i in Object(n))iN.call(n,i)&&i!="constructor"&&t.push(i);return t}function lN(n){return gM(n)?eN(n):sN(n)}var s0=pc(Object,"create");function rN(){this.__data__=s0?s0(null):{},this.size=0}function oN(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}var uN="__lodash_hash_undefined__",cN=Object.prototype,fN=cN.hasOwnProperty;function hN(n){var t=this.__data__;if(s0){var i=t[n];return i===uN?void 0:i}return fN.call(t,n)?t[n]:void 0}var dN=Object.prototype,pN=dN.hasOwnProperty;function mN(n){var t=this.__data__;return s0?t[n]!==void 0:pN.call(t,n)}var gN="__lodash_hash_undefined__";function yN(n,t){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=s0&&t===void 0?gN:t,this}function mc(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}mc.prototype.clear=rN,mc.prototype.delete=oN,mc.prototype.get=hN,mc.prototype.has=mN,mc.prototype.set=yN;function vN(){this.__data__=[],this.size=0}function I1(n,t){for(var i=n.length;i--;)if(M6(n[i][0],t))return i;return-1}var SN=Array.prototype,bN=SN.splice;function EN(n){var t=this.__data__,i=I1(t,n);if(i<0)return!1;var s=t.length-1;return i==s?t.pop():bN.call(t,i,1),--this.size,!0}function TN(n){var t=this.__data__,i=I1(t,n);return i<0?void 0:t[i][1]}function CN(n){return I1(this.__data__,n)>-1}function _N(n,t){var i=this.__data__,s=I1(i,n);return s<0?(++this.size,i.push([n,t])):i[s][1]=t,this}function Gr(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}Gr.prototype.clear=vN,Gr.prototype.delete=EN,Gr.prototype.get=TN,Gr.prototype.has=CN,Gr.prototype.set=_N;var l0=pc(cl,"Map");function xN(){this.size=0,this.__data__={hash:new mc,map:new(l0||Gr),string:new mc}}function DN(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function W1(n,t){var i=n.__data__;return DN(t)?i[typeof t=="string"?"string":"hash"]:i.map}function AN(n){var t=W1(this,n).delete(n);return this.size-=t?1:0,t}function MN(n){return W1(this,n).get(n)}function NN(n){return W1(this,n).has(n)}function ON(n,t){var i=W1(this,n),s=i.size;return i.set(n,t),this.size+=i.size==s?0:1,this}function ph(n){var t=-1,i=n==null?0:n.length;for(this.clear();++t<i;){var s=n[t];this.set(s[0],s[1])}}ph.prototype.clear=xN,ph.prototype.delete=AN,ph.prototype.get=MN,ph.prototype.has=NN,ph.prototype.set=ON;function RN(n,t){for(var i=-1,s=t.length,u=n.length;++i<s;)n[u+i]=t[i];return n}var zN=j6(Object.getPrototypeOf,Object);function HN(){this.__data__=new Gr,this.size=0}function wN(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}function UN(n){return this.__data__.get(n)}function BN(n){return this.__data__.has(n)}var VN=200;function GN(n,t){var i=this.__data__;if(i instanceof Gr){var s=i.__data__;if(!l0||s.length<VN-1)return s.push([n,t]),this.size=++i.size,this;i=this.__data__=new ph(s)}return i.set(n,t),this.size=i.size,this}function mh(n){var t=this.__data__=new Gr(n);this.size=t.size}mh.prototype.clear=HN,mh.prototype.delete=wN,mh.prototype.get=UN,mh.prototype.has=BN,mh.prototype.set=GN;var L6=typeof te=="object"&&te&&!te.nodeType&&te,P6=L6&&typeof module=="object"&&module&&!module.nodeType&&module,jN=P6&&P6.exports===L6,Y6=jN?cl.Buffer:void 0;Y6&&Y6.allocUnsafe;function LN(n,t){return n.slice()}function PN(n,t){for(var i=-1,s=n==null?0:n.length,u=0,c=[];++i<s;){var f=n[i];t(f,i,n)&&(c[u++]=f)}return c}function YN(){return[]}var qN=Object.prototype,XN=qN.propertyIsEnumerable,q6=Object.getOwnPropertySymbols,KN=q6?function(n){return n==null?[]:(n=Object(n),PN(q6(n),function(t){return XN.call(n,t)}))}:YN;function QN(n,t,i){var s=t(n);return dv(n)?s:RN(s,i(n))}function ZN(n){return QN(n,lN,KN)}var vv=pc(cl,"DataView"),Sv=pc(cl,"Promise"),bv=pc(cl,"Set"),X6="[object Map]",JN="[object Object]",K6="[object Promise]",Q6="[object Set]",Z6="[object WeakMap]",J6="[object DataView]",FN=dc(vv),kN=dc(l0),IN=dc(Sv),WN=dc(bv),$N=dc(mv),jr=fh;(vv&&jr(new vv(new ArrayBuffer(1)))!=J6||l0&&jr(new l0)!=X6||Sv&&jr(Sv.resolve())!=K6||bv&&jr(new bv)!=Q6||mv&&jr(new mv)!=Z6)&&(jr=function(n){var t=fh(n),i=t==JN?n.constructor:void 0,s=i?dc(i):"";if(s)switch(s){case FN:return J6;case kN:return X6;case IN:return K6;case WN:return Q6;case $N:return Z6}return t});var tO=Object.prototype,eO=tO.hasOwnProperty;function nO(n){var t=n.length,i=new n.constructor(t);return t&&typeof n[0]=="string"&&eO.call(n,"index")&&(i.index=n.index,i.input=n.input),i}var F6=cl.Uint8Array;function Ev(n){var t=new n.constructor(n.byteLength);return new F6(t).set(new F6(n)),t}function aO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.byteLength)}var iO=/\w*$/;function sO(n){var t=new n.constructor(n.source,iO.exec(n));return t.lastIndex=n.lastIndex,t}var k6=ch?ch.prototype:void 0,I6=k6?k6.valueOf:void 0;function lO(n){return I6?Object(I6.call(n)):{}}function rO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.length)}var oO="[object Boolean]",uO="[object Date]",cO="[object Map]",fO="[object Number]",hO="[object RegExp]",dO="[object Set]",pO="[object String]",mO="[object Symbol]",gO="[object ArrayBuffer]",yO="[object DataView]",vO="[object Float32Array]",SO="[object Float64Array]",bO="[object Int8Array]",EO="[object Int16Array]",TO="[object Int32Array]",CO="[object Uint8Array]",_O="[object Uint8ClampedArray]",xO="[object Uint16Array]",DO="[object Uint32Array]";function AO(n,t,i){var s=n.constructor;switch(t){case gO:return Ev(n);case oO:case uO:return new s(+n);case yO:return aO(n);case vO:case SO:case bO:case EO:case TO:case CO:case _O:case xO:case DO:return rO(n);case cO:return new s;case fO:case pO:return new s(n);case hO:return sO(n);case dO:return new s;case mO:return lO(n)}}function MO(n){return typeof n.constructor=="function"&&!O6(n)?lM(zN(n)):{}}var NO="[object Map]";function OO(n){return hh(n)&&jr(n)==NO}var W6=dh&&dh.isMap,RO=W6?gv(W6):OO,zO="[object Set]";function HO(n){return hh(n)&&jr(n)==zO}var $6=dh&&dh.isSet,wO=$6?gv($6):HO,tb="[object Arguments]",UO="[object Array]",BO="[object Boolean]",VO="[object Date]",GO="[object Error]",eb="[object Function]",jO="[object GeneratorFunction]",LO="[object Map]",PO="[object Number]",nb="[object Object]",YO="[object RegExp]",qO="[object Set]",XO="[object String]",KO="[object Symbol]",QO="[object WeakMap]",ZO="[object ArrayBuffer]",JO="[object DataView]",FO="[object Float32Array]",kO="[object Float64Array]",IO="[object Int8Array]",WO="[object Int16Array]",$O="[object Int32Array]",tR="[object Uint8Array]",eR="[object Uint8ClampedArray]",nR="[object Uint16Array]",aR="[object Uint32Array]",ke={};ke[tb]=ke[UO]=ke[ZO]=ke[JO]=ke[BO]=ke[VO]=ke[FO]=ke[kO]=ke[IO]=ke[WO]=ke[$O]=ke[LO]=ke[PO]=ke[nb]=ke[YO]=ke[qO]=ke[XO]=ke[KO]=ke[tR]=ke[eR]=ke[nR]=ke[aR]=!0,ke[GO]=ke[eb]=ke[QO]=!1;function $1(n,t,i,s,u,c){var f;if(f!==void 0)return f;if(!Qo(n))return n;var p=dv(n);if(p)f=nO(n);else{var m=jr(n),S=m==eb||m==jO;if(B6(n))return LN(n);if(m==nb||m==tb||S&&!u)f=S?{}:MO(n);else{if(!ke[m])return u?n:{};f=AO(n,m)}}c||(c=new mh);var b=c.get(n);if(b)return b;c.set(n,f),wO(n)?n.forEach(function(D){f.add($1(D,t,i,D,n,c))}):RO(n)&&n.forEach(function(D,A){f.set(A,$1(D,t,i,A,n,c))});var _=ZN,x=p?void 0:_(n);return rM(x||n,function(D,A){x&&(A=D,D=n[A]),pM(f,A,$1(D,t,i,A,n,c))}),f}var iR=1,sR=4;function lR(n){return $1(n,iR|sR)}var Tv=function(){return cl.Date.now()},rR="Expected a function",oR=Math.max,uR=Math.min;function r0(n,t,i){var s,u,c,f,p,m,S=0,b=!1,_=!1,x=!0;if(typeof n!="function")throw new TypeError(rR);t=C6(t)||0,Qo(i)&&(b=!!i.leading,_="maxWait"in i,c=_?oR(C6(i.maxWait)||0,t):c,x="trailing"in i?!!i.trailing:x);function D(W){var st=s,$=u;return s=u=void 0,S=W,f=n.apply($,st),f}function A(W){return S=W,p=setTimeout(O,t),b?D(W):f}function N(W){var st=W-m,$=W-S,tt=t-st;return _?uR(tt,c-$):tt}function R(W){var st=W-m,$=W-S;return m===void 0||st>=t||st<0||_&&$>=c}function O(){var W=Tv();if(R(W))return U(W);p=setTimeout(O,N(W))}function U(W){return p=void 0,x&&s?D(W):(s=u=void 0,f)}function j(){p!==void 0&&clearTimeout(p),S=0,s=m=u=p=void 0}function V(){return p===void 0?f:U(Tv())}function F(){var W=Tv(),st=R(W);if(s=arguments,u=this,m=W,st){if(p===void 0)return A(m);if(_)return clearTimeout(p),p=setTimeout(O,t),D(m)}return p===void 0&&(p=setTimeout(O,t)),f}return F.cancel=j,F.flush=V,F}var cR="Expected a function";function fR(n,t,i){var s=!0,u=!0;if(typeof n!="function")throw new TypeError(cR);return Qo(i)&&(s="leading"in i?!0:s,u="trailing"in i?!!i.trailing:u),r0(n,t,{leading:s,maxWait:t,trailing:u})}const hR=(n,t)=>{const{value:i,readOnly:s=!1,debounceTime:u=800,fillContainer:c=!0,leftElement:f,rightElement:p,className:m,leftElementClassName:S,rightElementClassName:b,isSingleLine:_=!0,allowSingleLineScroll:x=!1,inputMode:D,placeholder:A,onFocus:N,onBlur:R,onInput:O,onInnerTextChange:U,onInnerHTMLChange:j,onElementCreate:V,onLeftElementClick:F,onRightElementClick:W}=n,st=w.useRef("bsc:grow bsc:focus:outline-hidden"),$=w.useRef("bsc:text-gray-4"),tt=w.useRef(void 0),et=w.useCallback(bt=>{const jt=bt.target,pe=jt.innerHTML;jt.className=`${st.current}`,A&&pe===A&&(jt.innerHTML=""),N?.(bt)},[A,N]),Tt=w.useCallback(bt=>{const jt=bt.target.innerHTML;if(A&&jt===""){const pe=bt.target;pe.innerHTML=A,pe.className=`${st.current} ${$.current}`}R?.(bt)},[A,R]),it=w.useCallback(bt=>{tt.current?.removeEventListener("focus",et),tt.current?.removeEventListener("blur",Tt),A&&bt&&bt!==document.activeElement&&bt.innerHTML===""&&(bt.innerHTML=A,bt.className=`${st.current} ${$.current}`),bt.addEventListener("focus",et),bt.addEventListener("blur",Tt),tt.current=bt},[A]),ht=w.useCallback(bt=>{V?.(bt)},[V]),dt=bt=>{F?.(bt)},nt=bt=>{W?.(bt)},H=r0(bt=>{O?.(bt),U?.(bt.target.innerText),j?.(bt.target.innerHTML)},u),J=w.useCallback(bt=>{tt.current&&(tt.current.innerText=bt)},[]),K=w.useCallback(bt=>{tt.current&&(tt.current.innerHTML=bt)},[]),mt=w.useCallback(()=>{tt.current?.focus()},[]);w.useImperativeHandle(t,()=>({inputElement:tt.current,setInnerText:J,setInnerHTML:K,focus:mt}));const pt=ve({"bsc:w-full ":c},"bsc:flex bsc:flex-row bsc:items-center bsc:shadow-sm bsc:border bsc:border-solid bsc:border-gray-3 bsc:dark:border-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:rounded-md bsc:p-2",{"bsc:overflow-x-auto bsc:overflow-y-hidden bsc:whitespace-pre":_&&x,"bsc:overflow-hidden bsc:whitespace-pre":_&&!x},m),I=ve("bsc:shrink",{"bsc:mr-2":f},S),vt=ve("bsc:shrink",{"bsc:ml-2":p},b);return X.jsxs("div",{className:pt,ref:bt=>{bt&&ht(bt)},children:[f&&X.jsx("div",{className:I,onClick:dt,children:f}),X.jsx("div",{ref:bt=>{bt&&it(bt)},className:st.current,contentEditable:!s,suppressContentEditableWarning:!0,inputMode:D,onInput:H,children:i}),p&&X.jsx("div",{className:vt,onClick:nt,children:p})]})},tg=w.forwardRef(hR);function Oe(n){const t=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&t==="[object Date]"?new n.constructor(+n):typeof n=="number"||t==="[object Number]"||typeof n=="string"||t==="[object String]"?new Date(n):new Date(NaN)}function Ie(n,t){return n instanceof Date?new n.constructor(t):new Date(t)}function gh(n,t){const i=Oe(n);return isNaN(t)?Ie(n,NaN):(t&&i.setDate(i.getDate()+t),i)}function Zo(n,t){const i=Oe(n);if(isNaN(t))return Ie(n,NaN);if(!t)return i;const s=i.getDate(),u=Ie(n,i.getTime());u.setMonth(i.getMonth()+t+1,0);const c=u.getDate();return s>=c?u:(i.setFullYear(u.getFullYear(),u.getMonth(),s),i)}const ab=6048e5,Cv=6e4,_v=36e5,dR=1e3;let pR={};function o0(){return pR}function Jo(n,t){const i=o0(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,u=Oe(n),c=u.getDay(),f=(c<s?7:0)+c-s;return u.setDate(u.getDate()-f),u.setHours(0,0,0,0),u}function yh(n){return Jo(n,{weekStartsOn:1})}function mR(n){const t=Oe(n),i=t.getFullYear(),s=Ie(n,0);s.setFullYear(i+1,0,4),s.setHours(0,0,0,0);const u=yh(s),c=Ie(n,0);c.setFullYear(i,0,4),c.setHours(0,0,0,0);const f=yh(c);return t.getTime()>=u.getTime()?i+1:t.getTime()>=f.getTime()?i:i-1}function ib(n){const t=Oe(n);return t.setHours(0,0,0,0),t}function sb(n){const t=Oe(n),i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return i.setUTCFullYear(t.getFullYear()),+n-+i}function gR(n){const t=mR(n),i=Ie(n,0);return i.setFullYear(t,0,4),i.setHours(0,0,0,0),yh(i)}function u0(n,t){return Zo(n,t*12)}function lb(n,t){const i=ib(n),s=ib(t);return+i==+s}function yR(n){const t=Oe(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(23,59,59,999),t}function vR(n,t){const i=Oe(n.start),s=Oe(n.end);let u=+i>+s;const c=u?+i:+s,f=u?s:i;f.setHours(0,0,0,0);let p=1;const m=[];for(;+f<=c;)m.push(Oe(f)),f.setDate(f.getDate()+p),f.setHours(0,0,0,0);return u?m.reverse():m}function rb(n){const t=Oe(n);return t.setDate(1),t.setHours(0,0,0,0),t}function SR(n,t){const i=Oe(n.start),s=Oe(n.end);let u=+i>+s;const c=u?+i:+s,f=u?s:i;f.setHours(0,0,0,0),f.setMonth(0,1);let p=1;const m=[];for(;+f<=c;)m.push(Oe(f)),f.setFullYear(f.getFullYear()+p);return u?m.reverse():m}const bR={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ER=(n,t,i)=>{let s;const u=bR[n];return typeof u=="string"?s=u:t===1?s=u.one:s=u.other.replace("{{count}}",t.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s};function xv(n){return(t={})=>{const i=t.width?String(t.width):n.defaultWidth;return n.formats[i]||n.formats[n.defaultWidth]}}const TR={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},CR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_R={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xR={date:xv({formats:TR,defaultWidth:"full"}),time:xv({formats:CR,defaultWidth:"full"}),dateTime:xv({formats:_R,defaultWidth:"full"})},DR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},AR=(n,t,i,s)=>DR[n];function c0(n){return(t,i)=>{const s=i?.context?String(i.context):"standalone";let u;if(s==="formatting"&&n.formattingValues){const f=n.defaultFormattingWidth||n.defaultWidth,p=i?.width?String(i.width):f;u=n.formattingValues[p]||n.formattingValues[f]}else{const f=n.defaultWidth,p=i?.width?String(i.width):n.defaultWidth;u=n.values[p]||n.values[f]}const c=n.argumentCallback?n.argumentCallback(t):t;return u[c]}}const MR={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},NR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OR={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},RR={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},HR={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wR={ordinalNumber:(n,t)=>{const i=Number(n),s=i%100;if(s>20||s<10)switch(s%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:c0({values:MR,defaultWidth:"wide"}),quarter:c0({values:NR,defaultWidth:"wide",argumentCallback:n=>n-1}),month:c0({values:OR,defaultWidth:"wide"}),day:c0({values:RR,defaultWidth:"wide"}),dayPeriod:c0({values:zR,defaultWidth:"wide",formattingValues:HR,defaultFormattingWidth:"wide"})};function f0(n){return(t,i={})=>{const s=i.width,u=s&&n.matchPatterns[s]||n.matchPatterns[n.defaultMatchWidth],c=t.match(u);if(!c)return null;const f=c[0],p=s&&n.parsePatterns[s]||n.parsePatterns[n.defaultParseWidth],m=Array.isArray(p)?BR(p,_=>_.test(f)):UR(p,_=>_.test(f));let S;S=n.valueCallback?n.valueCallback(m):m,S=i.valueCallback?i.valueCallback(S):S;const b=t.slice(f.length);return{value:S,rest:b}}}function UR(n,t){for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&t(n[i]))return i}function BR(n,t){for(let i=0;i<n.length;i++)if(t(n[i]))return i}function VR(n){return(t,i={})=>{const s=t.match(n.matchPattern);if(!s)return null;const u=s[0],c=t.match(n.parsePattern);if(!c)return null;let f=n.valueCallback?n.valueCallback(c[0]):c[0];f=i.valueCallback?i.valueCallback(f):f;const p=t.slice(u.length);return{value:f,rest:p}}}const GR=/^(\d+)(th|st|nd|rd)?/i,jR=/\d+/i,LR={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},PR={any:[/^b/i,/^(a|c)/i]},YR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qR={any:[/1/i,/2/i,/3/i,/4/i]},XR={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},KR={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},QR={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ZR={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},JR={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},FR={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},kR={ordinalNumber:VR({matchPattern:GR,parsePattern:jR,valueCallback:n=>parseInt(n,10)}),era:f0({matchPatterns:LR,defaultMatchWidth:"wide",parsePatterns:PR,defaultParseWidth:"any"}),quarter:f0({matchPatterns:YR,defaultMatchWidth:"wide",parsePatterns:qR,defaultParseWidth:"any",valueCallback:n=>n+1}),month:f0({matchPatterns:XR,defaultMatchWidth:"wide",parsePatterns:KR,defaultParseWidth:"any"}),day:f0({matchPatterns:QR,defaultMatchWidth:"wide",parsePatterns:ZR,defaultParseWidth:"any"}),dayPeriod:f0({matchPatterns:JR,defaultMatchWidth:"any",parsePatterns:FR,defaultParseWidth:"any"})},IR={code:"en-US",formatDistance:ER,formatLong:xR,formatRelative:AR,localize:wR,match:kR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function WR(n){const t=Oe(n),i=+yh(t)-+gR(t);return Math.round(i/ab)+1}function ob(n,t){const i=Oe(n),s=i.getFullYear(),u=o0(),c=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,f=Ie(n,0);f.setFullYear(s+1,0,c),f.setHours(0,0,0,0);const p=Jo(f,t),m=Ie(n,0);m.setFullYear(s,0,c),m.setHours(0,0,0,0);const S=Jo(m,t);return i.getTime()>=p.getTime()?s+1:i.getTime()>=S.getTime()?s:s-1}function $R(n,t){const i=o0(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=ob(n,t),c=Ie(n,0);return c.setFullYear(u,0,s),c.setHours(0,0,0,0),Jo(c,t)}function tz(n,t){const i=Oe(n),s=+Jo(i,t)-+$R(i,t);return Math.round(s/ab)+1}const ub=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},cb=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},fb={p:cb,P:(n,t)=>{const i=n.match(/(P+)(p+)?/)||[],s=i[1],u=i[2];if(!u)return ub(n,t);let c;switch(s){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",ub(s,t)).replace("{{time}}",cb(u,t))}},ez=/^D+$/,nz=/^Y+$/,az=["D","DD","YY","YYYY"];function iz(n){return ez.test(n)}function sz(n){return nz.test(n)}function hb(n,t,i){const s=lz(n,t,i);if(console.warn(s),az.includes(n))throw new RangeError(s)}function lz(n,t,i){const s=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${s} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Dv(n){return Oe(n).getDay()}function db(n){const t=Oe(n),i=t.getFullYear(),s=t.getMonth(),u=Ie(n,0);return u.setFullYear(i,s+1,0),u.setHours(0,0,0,0),u.getDate()}function rz(){return Object.assign({},o0())}function oz(n){let i=Oe(n).getDay();return i===0&&(i=7),i}function uz(n){const t=Oe(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(0,0,0,0),t}function cz(n,t){const i=Oe(n),s=Oe(t);return+i<+s}function fz(n,t){const i=t instanceof Date?Ie(t,0):new t(0);return i.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),i.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),i}const hz=10;class pb{subPriority=0;validate(t,i){return!0}}class dz extends pb{constructor(t,i,s,u,c){super(),this.value=t,this.validateValue=i,this.setValue=s,this.priority=u,c&&(this.subPriority=c)}validate(t,i){return this.validateValue(t,this.value,i)}set(t,i,s){return this.setValue(t,i,this.value,s)}}class pz extends pb{priority=hz;subPriority=-1;set(t,i){return i.timestampIsSet?t:Ie(t,fz(t,Date))}}class Re{run(t,i,s,u){const c=this.parse(t,i,s,u);return c?{setter:new dz(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,i,s){return!0}}class mz extends Re{priority=140;parse(t,i,s){switch(i){case"G":case"GG":case"GGG":return s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"});case"GGGGG":return s.era(t,{width:"narrow"});default:return s.era(t,{width:"wide"})||s.era(t,{width:"abbreviated"})||s.era(t,{width:"narrow"})}}set(t,i,s){return i.era=s,t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Xn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Il={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Kn(n,t){return n&&{value:t(n.value),rest:n.rest}}function Cn(n,t){const i=t.match(n);return i?{value:parseInt(i[0],10),rest:t.slice(i[0].length)}:null}function Wl(n,t){const i=t.match(n);if(!i)return null;if(i[0]==="Z")return{value:0,rest:t.slice(1)};const s=i[1]==="+"?1:-1,u=i[2]?parseInt(i[2],10):0,c=i[3]?parseInt(i[3],10):0,f=i[5]?parseInt(i[5],10):0;return{value:s*(u*_v+c*Cv+f*dR),rest:t.slice(i[0].length)}}function mb(n){return Cn(Xn.anyDigitsSigned,n)}function Vn(n,t){switch(n){case 1:return Cn(Xn.singleDigit,t);case 2:return Cn(Xn.twoDigits,t);case 3:return Cn(Xn.threeDigits,t);case 4:return Cn(Xn.fourDigits,t);default:return Cn(new RegExp("^\\d{1,"+n+"}"),t)}}function eg(n,t){switch(n){case 1:return Cn(Xn.singleDigitSigned,t);case 2:return Cn(Xn.twoDigitsSigned,t);case 3:return Cn(Xn.threeDigitsSigned,t);case 4:return Cn(Xn.fourDigitsSigned,t);default:return Cn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Av(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gb(n,t){const i=t>0,s=i?t:1-t;let u;if(s<=50)u=n||100;else{const c=s+50,f=Math.trunc(c/100)*100,p=n>=c%100;u=n+f-(p?100:0)}return i?u:1-u}function yb(n){return n%400===0||n%4===0&&n%100!==0}class gz extends Re{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,i,s){const u=c=>({year:c,isTwoDigitYear:i==="yy"});switch(i){case"y":return Kn(Vn(4,t),u);case"yo":return Kn(s.ordinalNumber(t,{unit:"year"}),u);default:return Kn(Vn(i.length,t),u)}}validate(t,i){return i.isTwoDigitYear||i.year>0}set(t,i,s){const u=t.getFullYear();if(s.isTwoDigitYear){const f=gb(s.year,u);return t.setFullYear(f,0,1),t.setHours(0,0,0,0),t}const c=!("era"in i)||i.era===1?s.year:1-s.year;return t.setFullYear(c,0,1),t.setHours(0,0,0,0),t}}class yz extends Re{priority=130;parse(t,i,s){const u=c=>({year:c,isTwoDigitYear:i==="YY"});switch(i){case"Y":return Kn(Vn(4,t),u);case"Yo":return Kn(s.ordinalNumber(t,{unit:"year"}),u);default:return Kn(Vn(i.length,t),u)}}validate(t,i){return i.isTwoDigitYear||i.year>0}set(t,i,s,u){const c=ob(t,u);if(s.isTwoDigitYear){const p=gb(s.year,c);return t.setFullYear(p,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),Jo(t,u)}const f=!("era"in i)||i.era===1?s.year:1-s.year;return t.setFullYear(f,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),Jo(t,u)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class vz extends Re{priority=130;parse(t,i){return eg(i==="R"?4:i.length,t)}set(t,i,s){const u=Ie(t,0);return u.setFullYear(s,0,4),u.setHours(0,0,0,0),yh(u)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Sz extends Re{priority=130;parse(t,i){return eg(i==="u"?4:i.length,t)}set(t,i,s){return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class bz extends Re{priority=120;parse(t,i,s){switch(i){case"Q":case"QQ":return Vn(i.length,t);case"Qo":return s.ordinalNumber(t,{unit:"quarter"});case"QQQ":return s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(t,{width:"narrow",context:"formatting"});default:return s.quarter(t,{width:"wide",context:"formatting"})||s.quarter(t,{width:"abbreviated",context:"formatting"})||s.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=1&&i<=4}set(t,i,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Ez extends Re{priority=120;parse(t,i,s){switch(i){case"q":case"qq":return Vn(i.length,t);case"qo":return s.ordinalNumber(t,{unit:"quarter"});case"qqq":return s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(t,{width:"narrow",context:"standalone"});default:return s.quarter(t,{width:"wide",context:"standalone"})||s.quarter(t,{width:"abbreviated",context:"standalone"})||s.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=1&&i<=4}set(t,i,s){return t.setMonth((s-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Tz extends Re{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,i,s){const u=c=>c-1;switch(i){case"M":return Kn(Cn(Xn.month,t),u);case"MM":return Kn(Vn(2,t),u);case"Mo":return Kn(s.ordinalNumber(t,{unit:"month"}),u);case"MMM":return s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(t,{width:"narrow",context:"formatting"});default:return s.month(t,{width:"wide",context:"formatting"})||s.month(t,{width:"abbreviated",context:"formatting"})||s.month(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}}class Cz extends Re{priority=110;parse(t,i,s){const u=c=>c-1;switch(i){case"L":return Kn(Cn(Xn.month,t),u);case"LL":return Kn(Vn(2,t),u);case"Lo":return Kn(s.ordinalNumber(t,{unit:"month"}),u);case"LLL":return s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(t,{width:"narrow",context:"standalone"});default:return s.month(t,{width:"wide",context:"standalone"})||s.month(t,{width:"abbreviated",context:"standalone"})||s.month(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.setMonth(s,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function _z(n,t,i){const s=Oe(n),u=tz(s,i)-t;return s.setDate(s.getDate()-u*7),s}class xz extends Re{priority=100;parse(t,i,s){switch(i){case"w":return Cn(Xn.week,t);case"wo":return s.ordinalNumber(t,{unit:"week"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=53}set(t,i,s,u){return Jo(_z(t,s,u),u)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Dz(n,t){const i=Oe(n),s=WR(i)-t;return i.setDate(i.getDate()-s*7),i}class Az extends Re{priority=100;parse(t,i,s){switch(i){case"I":return Cn(Xn.week,t);case"Io":return s.ordinalNumber(t,{unit:"week"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=53}set(t,i,s){return yh(Dz(t,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Mz=[31,28,31,30,31,30,31,31,30,31,30,31],Nz=[31,29,31,30,31,30,31,31,30,31,30,31];class Oz extends Re{priority=90;subPriority=1;parse(t,i,s){switch(i){case"d":return Cn(Xn.date,t);case"do":return s.ordinalNumber(t,{unit:"date"});default:return Vn(i.length,t)}}validate(t,i){const s=t.getFullYear(),u=yb(s),c=t.getMonth();return u?i>=1&&i<=Nz[c]:i>=1&&i<=Mz[c]}set(t,i,s){return t.setDate(s),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Rz extends Re{priority=90;subpriority=1;parse(t,i,s){switch(i){case"D":case"DD":return Cn(Xn.dayOfYear,t);case"Do":return s.ordinalNumber(t,{unit:"date"});default:return Vn(i.length,t)}}validate(t,i){const s=t.getFullYear();return yb(s)?i>=1&&i<=366:i>=1&&i<=365}set(t,i,s){return t.setMonth(0,s),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Mv(n,t,i){const s=o0(),u=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,c=Oe(n),f=c.getDay(),m=(t%7+7)%7,S=7-u,b=t<0||t>6?t-(f+S)%7:(m+S)%7-(f+S)%7;return gh(c,b)}class zz extends Re{priority=90;parse(t,i,s){switch(i){case"E":case"EE":case"EEE":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Hz extends Re{priority=90;parse(t,i,s,u){const c=f=>{const p=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+p};switch(i){case"e":case"ee":return Kn(Vn(i.length,t),c);case"eo":return Kn(s.ordinalNumber(t,{unit:"day"}),c);case"eee":return s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});case"eeeee":return s.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"});default:return s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class wz extends Re{priority=90;parse(t,i,s,u){const c=f=>{const p=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+p};switch(i){case"c":case"cc":return Kn(Vn(i.length,t),c);case"co":return Kn(s.ordinalNumber(t,{unit:"day"}),c);case"ccc":return s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});case"ccccc":return s.day(t,{width:"narrow",context:"standalone"});case"cccccc":return s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"});default:return s.day(t,{width:"wide",context:"standalone"})||s.day(t,{width:"abbreviated",context:"standalone"})||s.day(t,{width:"short",context:"standalone"})||s.day(t,{width:"narrow",context:"standalone"})}}validate(t,i){return i>=0&&i<=6}set(t,i,s,u){return t=Mv(t,s,u),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Uz(n,t){const i=Oe(n),s=oz(i),u=t-s;return gh(i,u)}class Bz extends Re{priority=90;parse(t,i,s){const u=c=>c===0?7:c;switch(i){case"i":case"ii":return Vn(i.length,t);case"io":return s.ordinalNumber(t,{unit:"day"});case"iii":return Kn(s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u);case"iiiii":return Kn(s.day(t,{width:"narrow",context:"formatting"}),u);case"iiiiii":return Kn(s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u);default:return Kn(s.day(t,{width:"wide",context:"formatting"})||s.day(t,{width:"abbreviated",context:"formatting"})||s.day(t,{width:"short",context:"formatting"})||s.day(t,{width:"narrow",context:"formatting"}),u)}}validate(t,i){return i>=1&&i<=7}set(t,i,s){return t=Uz(t,s),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Vz extends Re{priority=80;parse(t,i,s){switch(i){case"a":case"aa":case"aaa":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Gz extends Re{priority=80;parse(t,i,s){switch(i){case"b":case"bb":case"bbb":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class jz extends Re{priority=80;parse(t,i,s){switch(i){case"B":case"BB":case"BBB":return s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(t,{width:"narrow",context:"formatting"});default:return s.dayPeriod(t,{width:"wide",context:"formatting"})||s.dayPeriod(t,{width:"abbreviated",context:"formatting"})||s.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,i,s){return t.setHours(Av(s),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Lz extends Re{priority=70;parse(t,i,s){switch(i){case"h":return Cn(Xn.hour12h,t);case"ho":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=12}set(t,i,s){const u=t.getHours()>=12;return u&&s<12?t.setHours(s+12,0,0,0):!u&&s===12?t.setHours(0,0,0,0):t.setHours(s,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class Pz extends Re{priority=70;parse(t,i,s){switch(i){case"H":return Cn(Xn.hour23h,t);case"Ho":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=23}set(t,i,s){return t.setHours(s,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Yz extends Re{priority=70;parse(t,i,s){switch(i){case"K":return Cn(Xn.hour11h,t);case"Ko":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=11}set(t,i,s){return t.getHours()>=12&&s<12?t.setHours(s+12,0,0,0):t.setHours(s,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class qz extends Re{priority=70;parse(t,i,s){switch(i){case"k":return Cn(Xn.hour24h,t);case"ko":return s.ordinalNumber(t,{unit:"hour"});default:return Vn(i.length,t)}}validate(t,i){return i>=1&&i<=24}set(t,i,s){const u=s<=24?s%24:s;return t.setHours(u,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class Xz extends Re{priority=60;parse(t,i,s){switch(i){case"m":return Cn(Xn.minute,t);case"mo":return s.ordinalNumber(t,{unit:"minute"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=59}set(t,i,s){return t.setMinutes(s,0,0),t}incompatibleTokens=["t","T"]}class Kz extends Re{priority=50;parse(t,i,s){switch(i){case"s":return Cn(Xn.second,t);case"so":return s.ordinalNumber(t,{unit:"second"});default:return Vn(i.length,t)}}validate(t,i){return i>=0&&i<=59}set(t,i,s){return t.setSeconds(s,0),t}incompatibleTokens=["t","T"]}class Qz extends Re{priority=30;parse(t,i){const s=u=>Math.trunc(u*Math.pow(10,-i.length+3));return Kn(Vn(i.length,t),s)}set(t,i,s){return t.setMilliseconds(s),t}incompatibleTokens=["t","T"]}class Zz extends Re{priority=10;parse(t,i){switch(i){case"X":return Wl(Il.basicOptionalMinutes,t);case"XX":return Wl(Il.basic,t);case"XXXX":return Wl(Il.basicOptionalSeconds,t);case"XXXXX":return Wl(Il.extendedOptionalSeconds,t);default:return Wl(Il.extended,t)}}set(t,i,s){return i.timestampIsSet?t:Ie(t,t.getTime()-sb(t)-s)}incompatibleTokens=["t","T","x"]}class Jz extends Re{priority=10;parse(t,i){switch(i){case"x":return Wl(Il.basicOptionalMinutes,t);case"xx":return Wl(Il.basic,t);case"xxxx":return Wl(Il.basicOptionalSeconds,t);case"xxxxx":return Wl(Il.extendedOptionalSeconds,t);default:return Wl(Il.extended,t)}}set(t,i,s){return i.timestampIsSet?t:Ie(t,t.getTime()-sb(t)-s)}incompatibleTokens=["t","T","X"]}class Fz extends Re{priority=40;parse(t){return mb(t)}set(t,i,s){return[Ie(t,s*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class kz extends Re{priority=20;parse(t){return mb(t)}set(t,i,s){return[Ie(t,s),{timestampIsSet:!0}]}incompatibleTokens="*"}const Iz={G:new mz,y:new gz,Y:new yz,R:new vz,u:new Sz,Q:new bz,q:new Ez,M:new Tz,L:new Cz,w:new xz,I:new Az,d:new Oz,D:new Rz,E:new zz,e:new Hz,c:new wz,i:new Bz,a:new Vz,b:new Gz,B:new jz,h:new Lz,H:new Pz,K:new Yz,k:new qz,m:new Xz,s:new Kz,S:new Qz,X:new Zz,x:new Jz,t:new Fz,T:new kz},Wz=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$z=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tH=/^'([^]*?)'?$/,eH=/''/g,nH=/\S/,aH=/[a-zA-Z]/;function Ni(n,t,i,s){const u=rz(),c=s?.locale??u.locale??IR,f=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??u.firstWeekContainsDate??u.locale?.options?.firstWeekContainsDate??1,p=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??u.weekStartsOn??u.locale?.options?.weekStartsOn??0;if(t==="")return n===""?Oe(i):Ie(i,NaN);const m={firstWeekContainsDate:f,weekStartsOn:p,locale:c},S=[new pz],b=t.match($z).map(N=>{const R=N[0];if(R in fb){const O=fb[R];return O(N,c.formatLong)}return N}).join("").match(Wz),_=[];for(let N of b){!s?.useAdditionalWeekYearTokens&&sz(N)&&hb(N,t,n),!s?.useAdditionalDayOfYearTokens&&iz(N)&&hb(N,t,n);const R=N[0],O=Iz[R];if(O){const{incompatibleTokens:U}=O;if(Array.isArray(U)){const V=_.find(F=>U.includes(F.token)||F.token===R);if(V)throw new RangeError(`The format string mustn't contain \`${V.fullToken}\` and \`${N}\` at the same time`)}else if(O.incompatibleTokens==="*"&&_.length>0)throw new RangeError(`The format string mustn't contain \`${N}\` and any other token at the same time`);_.push({token:R,fullToken:N});const j=O.run(n,N,c.match,m);if(!j)return Ie(i,NaN);S.push(j.setter),n=j.rest}else{if(R.match(aH))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");if(N==="''"?N="'":R==="'"&&(N=iH(N)),n.indexOf(N)===0)n=n.slice(N.length);else return Ie(i,NaN)}}if(n.length>0&&nH.test(n))return Ie(i,NaN);const x=S.map(N=>N.priority).sort((N,R)=>R-N).filter((N,R,O)=>O.indexOf(N)===R).map(N=>S.filter(R=>R.priority===N).sort((R,O)=>O.subPriority-R.subPriority)).map(N=>N[0]);let D=Oe(i);if(isNaN(D.getTime()))return Ie(i,NaN);const A={};for(const N of x){if(!N.validate(D,m))return Ie(i,NaN);const R=N.set(D,A,m);Array.isArray(R)?(D=R[0],Object.assign(A,R[1])):D=R}return Ie(i,D)}function iH(n){return n.match(tH)[1].replace(eH,"'")}function sH(n){return lb(n,Date.now())}function lH(n,t){return gh(n,-t)}function rH(n,t){let i=t-Dv(n);return i<=0&&(i+=7),gh(n,i)}function oH(n,t){const s=hH(n);let u;if(s.date){const m=dH(s.date,2);u=pH(m.restDateString,m.year)}if(!u||isNaN(u.getTime()))return new Date(NaN);const c=u.getTime();let f=0,p;if(s.time&&(f=mH(s.time),isNaN(f)))return new Date(NaN);if(s.timezone){if(p=gH(s.timezone),isNaN(p))return new Date(NaN)}else{const m=new Date(c+f),S=new Date(0);return S.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),S.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),S}return new Date(c+f+p)}const ng={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},uH=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,cH=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,fH=/^([+-])(\d{2})(?::?(\d{2}))?$/;function hH(n){const t={},i=n.split(ng.dateTimeDelimiter);let s;if(i.length>2)return t;if(/:/.test(i[0])?s=i[0]:(t.date=i[0],s=i[1],ng.timeZoneDelimiter.test(t.date)&&(t.date=n.split(ng.timeZoneDelimiter)[0],s=n.substr(t.date.length,n.length))),s){const u=ng.timezone.exec(s);u?(t.time=s.replace(u[1],""),t.timezone=u[1]):t.time=s}return t}function dH(n,t){const i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),s=n.match(i);if(!s)return{year:NaN,restDateString:""};const u=s[1]?parseInt(s[1]):null,c=s[2]?parseInt(s[2]):null;return{year:c===null?u:c*100,restDateString:n.slice((s[1]||s[2]).length)}}function pH(n,t){if(t===null)return new Date(NaN);const i=n.match(uH);if(!i)return new Date(NaN);const s=!!i[4],u=h0(i[1]),c=h0(i[2])-1,f=h0(i[3]),p=h0(i[4]),m=h0(i[5])-1;if(s)return EH(t,p,m)?yH(t,p,m):new Date(NaN);{const S=new Date(0);return!SH(t,c,f)||!bH(t,u)?new Date(NaN):(S.setUTCFullYear(t,c,Math.max(u,f)),S)}}function h0(n){return n?parseInt(n):1}function mH(n){const t=n.match(cH);if(!t)return NaN;const i=Nv(t[1]),s=Nv(t[2]),u=Nv(t[3]);return TH(i,s,u)?i*_v+s*Cv+u*1e3:NaN}function Nv(n){return n&&parseFloat(n.replace(",","."))||0}function gH(n){if(n==="Z")return 0;const t=n.match(fH);if(!t)return 0;const i=t[1]==="+"?-1:1,s=parseInt(t[2]),u=t[3]&&parseInt(t[3])||0;return CH(s,u)?i*(s*_v+u*Cv):NaN}function yH(n,t,i){const s=new Date(0);s.setUTCFullYear(n,0,4);const u=s.getUTCDay()||7,c=(t-1)*7+i+1-u;return s.setUTCDate(s.getUTCDate()+c),s}const vH=[31,null,31,30,31,30,31,31,30,31,30,31];function vb(n){return n%400===0||n%4===0&&n%100!==0}function SH(n,t,i){return t>=0&&t<=11&&i>=1&&i<=(vH[t]||(vb(n)?29:28))}function bH(n,t){return t>=1&&t<=(vb(n)?366:365)}function EH(n,t,i){return t>=1&&t<=53&&i>=0&&i<=6}function TH(n,t,i){return n===24?t===0&&i===0:i>=0&&i<60&&t>=0&&t<60&&n>=0&&n<25}function CH(n,t){return t>=0&&t<=59}function _H(n,t){const i=Oe(n),s=i.getFullYear(),u=i.getDate(),c=Ie(n,0);c.setFullYear(s,t,15),c.setHours(0,0,0,0);const f=db(c);return i.setMonth(t,Math.min(u,f)),i}function xH(n,t){const i=Oe(n);return isNaN(+i)?Ie(n,NaN):(i.setFullYear(t),i)}function Ov(n,t){return Zo(n,-t)}function Rv(n,t){return u0(n,-t)}function DH(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function AH(n,t,i){const s=[];for(let u=n;u<=t;u++)s.push(i?i(u):u);return s}function MH(n,t){const i=n.target;return i?!t.isSameNode(i)&&!t.contains(i):!1}function NH(n,t){return n.isSameNode(t)||n.contains(t)}function OH(n,t){const i=Object.entries(t),s=getComputedStyle(n);for(let u=0,c=i.length;u<c;u++){const[f,p]=i[u];if(typeof p=="string"&&p.indexOf(",")>-1){if(!p.split(",").map(S=>S.trim()).includes(s[f]))return!1}else if(s[f]!==p)return!1}return!0}function RH(n,t){const i=Object.entries(t),s=getComputedStyle(n);for(let u=0,c=i.length;u<c;u++){const[f,p]=i[u];if(typeof p=="string"&&p.indexOf(",")>-1){if(p.split(",").map(S=>S.trim()).includes(s[f]))return!0}else if(s[f]===p)return!0}return!1}function Sb(n,t,i=!1,s){if(i&&OH(n,t)){if(!s||s?.(n)===!0)return n}else if(!i&&RH(n,t)&&(!s||s?.(n)===!0))return n;return n.parentElement?Sb(n.parentElement,t,i,s):n}function bb(n,t){const i=Array.from(document.querySelectorAll("body *")),s=[];for(let u=0,c=i.length;u<c;u++){const f=getComputedStyle(i[u]);f[n]&&t(f[n])&&s.push(f[n])}return s}function Tj(n){return n}function zH(n){const t=document.documentElement;Object.keys(n).forEach(i=>{t.style.setProperty(i,n[i])})}function HH(n){return{"--theme-bsc-primary-1":n.primary1,"--theme-bsc-primary-2":n.primary2,"--theme-bsc-primary-3":n.primary3,"--theme-bsc-primary-4":n.primary4,"--theme-bsc-primary-5":n.primary5,"--theme-bsc-gray-1":n.gray1||"#303030","--theme-bsc-gray-2":n.gray2||"#5f5f5f","--theme-bsc-gray-3":n.gray3||"#8f8f8f","--theme-bsc-gray-4":n.gray4||"#bebebe","--theme-bsc-gray-5":n.gray5||"#eee","--theme-bsc-black":n.black||"#000","--theme-bsc-white":n.white||"#fff","--theme-bsc-mono-dark-1":n.monoDark1||"#222","--theme-bsc-mono-dark-2":n.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":n.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":n.monoLight1||"#fefefe","--theme-bsc-mono-light-2":n.monoLight2||"#eee","--theme-bsc-mono-light-3":n.monoLight3||"#ccc","--theme-bsc-info":n.info||"#2e7ff8","--theme-bsc-success":n.success||"#53ae0c","--theme-bsc-warning":n.warning||"#ff6914","--theme-bsc-error":n.error||"#f01616"}}var ka=(n=>(n[n.Regular=24]="Regular",n[n.Small=20]="Small",n))(ka||{});const Eb=({className:n})=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:n,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"})}),wH=({className:n})=>{const t=ve("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},UH=({className:n})=>{const t=ve("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},BH=({className:n})=>{const t=ve("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},VH=({className:n})=>{const t=ve("bsc:h-6 bsc:w-6",n);return X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},GH=({className:n})=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:n,children:X.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),Ts=({icon:n,size:t=ka.Regular,onClick:i,className:s})=>{const u=w.useRef({calendar:Eb,chevronDown:wH,chevronLeft:UH,chevronRight:BH,chevronUp:VH,close:GH}),c=w.useMemo(()=>u.current[n]||Eb,[n]),f=ve({"bsc:h-[24px] bsc:w-[24px]":t===ka.Regular,"bsc:h-[20px] bsc:w-[20px]":t===ka.Small},s);return X.jsx("div",{onClick:i,children:X.jsx(c,{className:f})})},gc=({template:n,props:t,children:i})=>n(t,i);function jH(n,t){if(t===n)return!1;const i=Object.values(t),s=Object.values(n);if(i.length!==s.length||i.some((c,f)=>c!==s[f]))return!0;const u=Object.keys(n);return Object.keys(t).some((c,f)=>c!==u[f])}function LH(n,t){return n.matches[t]=!1,n.mediaQueries[t]={},n}function Tb(n){const t=Object.keys(n);return typeof window>"u"?t.reduce(LH,{mediaQueries:{},matches:{}}):t.reduce((i,s)=>{const u=window.matchMedia(n[s]);return i.mediaQueries[s]=u,i.matches[s]=u.matches,i},{mediaQueries:{},matches:{}})}function PH(n,t){function i(s,u){return s[u]=n.mediaQueries[u].matches,s}switch(t.type){case"updateMatches":return{matches:Object.keys(n.mediaQueries).reduce(i,{}),mediaQueries:n.mediaQueries};case"setQueries":return Tb(t.queries)}}function YH(n){const t=wa.useRef(n),[i,s]=wa.useReducer(PH,n,Tb);wa.useEffect(()=>{jH(n,t.current)&&(s({type:"setQueries",queries:n}),t.current=n)},[n]);function u(){return s({type:"updateMatches"})}function c(m){const S=u;return typeof m.addListener<"u"?m.addListener(S):m.addEventListener("change",S),S}wa.useEffect(()=>{const m=Object.values(i.mediaQueries),S=m.map(c);function b(_,x){typeof _.addListener<"u"?_.removeListener(S[x]):_.removeEventListener("change",S[x])}return()=>{m.forEach(b)}},[i.mediaQueries]);const{matches:f}=i,p=wa.useMemo(()=>Object.values(f),[f]);return{matches:f,matchesAny:p.some(Boolean),matchesAll:p.length>0&&p.every(Boolean)}}function ag(n){return YH(qH(n)).matchesAll}const zv={};function qH(n){return zv[n]===void 0&&(zv[n]={default:n}),zv[n]}const Hv=({mobileQuery:n="screen and (max-device-width: 40rem)",tabletQuery:t="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:i="screen and (min-device-width: 64rem)",mobileMarkup:s,aboveMobileMarkup:u,tabletMarkup:c,desktopMarkup:f})=>{const p=ag(n),m=ag(t),S=ag(i);return p&&s?s:!p&&u?u:m&&c?c:S&&f?f:(console.error("Invalid media settings"),null)};function Cb(n,t,i){const s=c=>{const f=c.target,p=n.style.display!=="hidden";n&&p&&!NH(n,f)&&!u(i,f)?t(!1):t(!0)},u=(c,f)=>{if(!c)return!1;for(let p=0,m=c.length;p<m;p++)if(c[p].isSameNode(f)||c[p].contains(f))return!0;return!1};return document.addEventListener("mousedown",s),s}function _b(n){document.removeEventListener("mousedown",n)}function xb(n){return n.target?n.target:n}const Db=w.createContext({});function XH(n){const t=w.useRef(null);return t.current===null&&(t.current=n()),t.current}const wv=typeof window<"u",KH=wv?w.useLayoutEffect:w.useEffect,Uv=w.createContext(null);function Bv(n,t){n.indexOf(t)===-1&&n.push(t)}function Vv(n,t){const i=n.indexOf(t);i>-1&&n.splice(i,1)}const Lr=(n,t,i)=>i>t?t:i<n?n:i;function Gv(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}let vh=()=>{},Pr=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(vh=(n,t,i)=>{!n&&typeof console<"u"&&console.warn(Gv(t,i))},Pr=(n,t,i)=>{if(!n)throw new Error(Gv(t,i))});const Yr={},Ab=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function Mb(n){return typeof n=="object"&&n!==null}const Nb=n=>/^0[^.\s]+$/u.test(n);function jv(n){let t;return()=>(t===void 0&&(t=n()),t)}const Cs=n=>n,QH=(n,t)=>i=>t(n(i)),d0=(...n)=>n.reduce(QH),p0=(n,t,i)=>{const s=t-n;return s===0?1:(i-n)/s};class Lv{constructor(){this.subscriptions=[]}add(t){return Bv(this.subscriptions,t),()=>Vv(this.subscriptions,t)}notify(t,i,s){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](t,i,s);else for(let c=0;c<u;c++){const f=this.subscriptions[c];f&&f(t,i,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const fl=n=>n*1e3,_s=n=>n/1e3;function Ob(n,t){return t?n*(1e3/t):0}const Rb=new Set;function Pv(n,t,i){n||Rb.has(t)||(console.warn(Gv(t,i)),Rb.add(t))}const zb=(n,t,i)=>(((1-3*i+3*t)*n+(3*i-6*t))*n+3*t)*n,ZH=1e-7,JH=12;function FH(n,t,i,s,u){let c,f,p=0;do f=t+(i-t)/2,c=zb(f,s,u)-n,c>0?i=f:t=f;while(Math.abs(c)>ZH&&++p<JH);return f}function m0(n,t,i,s){if(n===t&&i===s)return Cs;const u=c=>FH(c,0,1,n,i);return c=>c===0||c===1?c:zb(u(c),t,s)}const Hb=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,wb=n=>t=>1-n(1-t),Ub=m0(.33,1.53,.69,.99),Yv=wb(Ub),Bb=Hb(Yv),Vb=n=>(n*=2)<1?.5*Yv(n):.5*(2-Math.pow(2,-10*(n-1))),qv=n=>1-Math.sin(Math.acos(n)),Gb=wb(qv),jb=Hb(qv),kH=m0(.42,0,1,1),IH=m0(0,0,.58,1),Lb=m0(.42,0,.58,1),WH=n=>Array.isArray(n)&&typeof n[0]!="number",Pb=n=>Array.isArray(n)&&typeof n[0]=="number",Yb={linear:Cs,easeIn:kH,easeInOut:Lb,easeOut:IH,circIn:qv,circInOut:jb,circOut:Gb,backIn:Yv,backInOut:Bb,backOut:Ub,anticipate:Vb},$H=n=>typeof n=="string",qb=n=>{if(Pb(n)){Pr(n.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,i,s,u]=n;return m0(t,i,s,u)}else if($H(n))return Pr(Yb[n]!==void 0,`Invalid easing type '${n}'`,"invalid-easing-type"),Yb[n];return n},ig=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tw(n,t){let i=new Set,s=new Set,u=!1,c=!1;const f=new WeakSet;let p={delta:0,timestamp:0,isProcessing:!1};function m(b){f.has(b)&&(S.schedule(b),n()),b(p)}const S={schedule:(b,_=!1,x=!1)=>{const A=x&&u?i:s;return _&&f.add(b),A.has(b)||A.add(b),b},cancel:b=>{s.delete(b),f.delete(b)},process:b=>{if(p=b,u){c=!0;return}u=!0,[i,s]=[s,i],i.forEach(m),i.clear(),u=!1,c&&(c=!1,S.process(b))}};return S}const ew=40;function Xb(n,t){let i=!1,s=!0;const u={delta:0,timestamp:0,isProcessing:!1},c=()=>i=!0,f=ig.reduce((j,V)=>(j[V]=tw(c),j),{}),{setup:p,read:m,resolveKeyframes:S,preUpdate:b,update:_,preRender:x,render:D,postRender:A}=f,N=()=>{const j=Yr.useManualTiming?u.timestamp:performance.now();i=!1,Yr.useManualTiming||(u.delta=s?1e3/60:Math.max(Math.min(j-u.timestamp,ew),1)),u.timestamp=j,u.isProcessing=!0,p.process(u),m.process(u),S.process(u),b.process(u),_.process(u),x.process(u),D.process(u),A.process(u),u.isProcessing=!1,i&&t&&(s=!1,n(N))},R=()=>{i=!0,s=!0,u.isProcessing||n(N)};return{schedule:ig.reduce((j,V)=>{const F=f[V];return j[V]=(W,st=!1,$=!1)=>(i||R(),F.schedule(W,st,$)),j},{}),cancel:j=>{for(let V=0;V<ig.length;V++)f[ig[V]].cancel(j)},state:u,steps:f}}const{schedule:pn,cancel:Fo,state:Ua,steps:Xv}=Xb(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cs,!0);let sg;function nw(){sg=void 0}const Oi={now:()=>(sg===void 0&&Oi.set(Ua.isProcessing||Yr.useManualTiming?Ua.timestamp:performance.now()),sg),set:n=>{sg=n,queueMicrotask(nw)}},Kb=n=>t=>typeof t=="string"&&t.startsWith(n),Qb=Kb("--"),aw=Kb("var(--"),Kv=n=>aw(n)?iw.test(n.split("/*")[0].trim()):!1,iw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zb(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const Sh={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},g0={...Sh,transform:n=>Lr(0,1,n)},lg={...Sh,default:1},y0=n=>Math.round(n*1e5)/1e5,Qv=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sw(n){return n==null}const lw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zv=(n,t)=>i=>!!(typeof i=="string"&&lw.test(i)&&i.startsWith(n)||t&&!sw(i)&&Object.prototype.hasOwnProperty.call(i,t)),Jb=(n,t,i)=>s=>{if(typeof s!="string")return s;const[u,c,f,p]=s.match(Qv);return{[n]:parseFloat(u),[t]:parseFloat(c),[i]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},rw=n=>Lr(0,255,n),Jv={...Sh,transform:n=>Math.round(rw(n))},yc={test:Zv("rgb","red"),parse:Jb("red","green","blue"),transform:({red:n,green:t,blue:i,alpha:s=1})=>"rgba("+Jv.transform(n)+", "+Jv.transform(t)+", "+Jv.transform(i)+", "+y0(g0.transform(s))+")"};function ow(n){let t="",i="",s="",u="";return n.length>5?(t=n.substring(1,3),i=n.substring(3,5),s=n.substring(5,7),u=n.substring(7,9)):(t=n.substring(1,2),i=n.substring(2,3),s=n.substring(3,4),u=n.substring(4,5),t+=t,i+=i,s+=s,u+=u),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:u?parseInt(u,16)/255:1}}const Fv={test:Zv("#"),parse:ow,transform:yc.transform},v0=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),ko=v0("deg"),$l=v0("%"),zt=v0("px"),uw=v0("vh"),cw=v0("vw"),Fb={...$l,parse:n=>$l.parse(n)/100,transform:n=>$l.transform(n*100)},bh={test:Zv("hsl","hue"),parse:Jb("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:i,alpha:s=1})=>"hsla("+Math.round(n)+", "+$l.transform(y0(t))+", "+$l.transform(y0(i))+", "+y0(g0.transform(s))+")"},Wn={test:n=>yc.test(n)||Fv.test(n)||bh.test(n),parse:n=>yc.test(n)?yc.parse(n):bh.test(n)?bh.parse(n):Fv.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?yc.transform(n):bh.transform(n),getAnimatableNone:n=>{const t=Wn.parse(n);return t.alpha=0,Wn.transform(t)}},fw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hw(n){return isNaN(n)&&typeof n=="string"&&(n.match(Qv)?.length||0)+(n.match(fw)?.length||0)>0}const kb="number",Ib="color",dw="var",pw="var(",Wb="${}",mw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function S0(n){const t=n.toString(),i=[],s={color:[],number:[],var:[]},u=[];let c=0;const p=t.replace(mw,m=>(Wn.test(m)?(s.color.push(c),u.push(Ib),i.push(Wn.parse(m))):m.startsWith(pw)?(s.var.push(c),u.push(dw),i.push(m)):(s.number.push(c),u.push(kb),i.push(parseFloat(m))),++c,Wb)).split(Wb);return{values:i,split:p,indexes:s,types:u}}function $b(n){return S0(n).values}function t8(n){const{split:t,types:i}=S0(n),s=t.length;return u=>{let c="";for(let f=0;f<s;f++)if(c+=t[f],u[f]!==void 0){const p=i[f];p===kb?c+=y0(u[f]):p===Ib?c+=Wn.transform(u[f]):c+=u[f]}return c}}const gw=n=>typeof n=="number"?0:Wn.test(n)?Wn.getAnimatableNone(n):n;function yw(n){const t=$b(n);return t8(n)(t.map(gw))}const Io={test:hw,parse:$b,createTransformer:t8,getAnimatableNone:yw};function kv(n,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(t-n)*6*i:i<1/2?t:i<2/3?n+(t-n)*(2/3-i)*6:n}function vw({hue:n,saturation:t,lightness:i,alpha:s}){n/=360,t/=100,i/=100;let u=0,c=0,f=0;if(!t)u=c=f=i;else{const p=i<.5?i*(1+t):i+t-i*t,m=2*i-p;u=kv(m,p,n+1/3),c=kv(m,p,n),f=kv(m,p,n-1/3)}return{red:Math.round(u*255),green:Math.round(c*255),blue:Math.round(f*255),alpha:s}}function rg(n,t){return i=>i>0?t:n}const _n=(n,t,i)=>n+(t-n)*i,Iv=(n,t,i)=>{const s=n*n,u=i*(t*t-s)+s;return u<0?0:Math.sqrt(u)},Sw=[Fv,yc,bh],bw=n=>Sw.find(t=>t.test(n));function e8(n){const t=bw(n);if(vh(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let i=t.parse(n);return t===bh&&(i=vw(i)),i}const n8=(n,t)=>{const i=e8(n),s=e8(t);if(!i||!s)return rg(n,t);const u={...i};return c=>(u.red=Iv(i.red,s.red,c),u.green=Iv(i.green,s.green,c),u.blue=Iv(i.blue,s.blue,c),u.alpha=_n(i.alpha,s.alpha,c),yc.transform(u))},Wv=new Set(["none","hidden"]);function Ew(n,t){return Wv.has(n)?i=>i<=0?n:t:i=>i>=1?t:n}function Tw(n,t){return i=>_n(n,t,i)}function $v(n){return typeof n=="number"?Tw:typeof n=="string"?Kv(n)?rg:Wn.test(n)?n8:xw:Array.isArray(n)?a8:typeof n=="object"?Wn.test(n)?n8:Cw:rg}function a8(n,t){const i=[...n],s=i.length,u=n.map((c,f)=>$v(c)(c,t[f]));return c=>{for(let f=0;f<s;f++)i[f]=u[f](c);return i}}function Cw(n,t){const i={...n,...t},s={};for(const u in i)n[u]!==void 0&&t[u]!==void 0&&(s[u]=$v(n[u])(n[u],t[u]));return u=>{for(const c in s)i[c]=s[c](u);return i}}function _w(n,t){const i=[],s={color:0,var:0,number:0};for(let u=0;u<t.values.length;u++){const c=t.types[u],f=n.indexes[c][s[c]],p=n.values[f]??0;i[u]=p,s[c]++}return i}const xw=(n,t)=>{const i=Io.createTransformer(t),s=S0(n),u=S0(t);return s.indexes.var.length===u.indexes.var.length&&s.indexes.color.length===u.indexes.color.length&&s.indexes.number.length>=u.indexes.number.length?Wv.has(n)&&!u.values.length||Wv.has(t)&&!s.values.length?Ew(n,t):d0(a8(_w(s,u),u.values),i):(vh(!0,`Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),rg(n,t))};function i8(n,t,i){return typeof n=="number"&&typeof t=="number"&&typeof i=="number"?_n(n,t,i):$v(n)(n,t)}const Dw=n=>{const t=({timestamp:i})=>n(i);return{start:(i=!0)=>pn.update(t,i),stop:()=>Fo(t),now:()=>Ua.isProcessing?Ua.timestamp:Oi.now()}},s8=(n,t,i=10)=>{let s="";const u=Math.max(Math.round(t/i),2);for(let c=0;c<u;c++)s+=Math.round(n(c/(u-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},og=2e4;function tS(n){let t=0;const i=50;let s=n.next(t);for(;!s.done&&t<og;)t+=i,s=n.next(t);return t>=og?1/0:t}function Aw(n,t=100,i){const s=i({...n,keyframes:[0,t]}),u=Math.min(tS(s),og);return{type:"keyframes",ease:c=>s.next(u*c).value/t,duration:_s(u)}}const Mw=5;function l8(n,t,i){const s=Math.max(t-Mw,0);return Ob(i-n(s),t-s)}const xn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},eS=.001;function Nw({duration:n=xn.duration,bounce:t=xn.bounce,velocity:i=xn.velocity,mass:s=xn.mass}){let u,c;vh(n<=fl(xn.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let f=1-t;f=Lr(xn.minDamping,xn.maxDamping,f),n=Lr(xn.minDuration,xn.maxDuration,_s(n)),f<1?(u=S=>{const b=S*f,_=b*n,x=b-i,D=nS(S,f),A=Math.exp(-_);return eS-x/D*A},c=S=>{const _=S*f*n,x=_*i+i,D=Math.pow(f,2)*Math.pow(S,2)*n,A=Math.exp(-_),N=nS(Math.pow(S,2),f);return(-u(S)+eS>0?-1:1)*((x-D)*A)/N}):(u=S=>{const b=Math.exp(-S*n),_=(S-i)*n+1;return-eS+b*_},c=S=>{const b=Math.exp(-S*n),_=(i-S)*(n*n);return b*_});const p=5/n,m=Rw(u,c,p);if(n=fl(n),isNaN(m))return{stiffness:xn.stiffness,damping:xn.damping,duration:n};{const S=Math.pow(m,2)*s;return{stiffness:S,damping:f*2*Math.sqrt(s*S),duration:n}}}const Ow=12;function Rw(n,t,i){let s=i;for(let u=1;u<Ow;u++)s=s-n(s)/t(s);return s}function nS(n,t){return n*Math.sqrt(1-t*t)}const zw=["duration","bounce"],Hw=["stiffness","damping","mass"];function r8(n,t){return t.some(i=>n[i]!==void 0)}function ww(n){let t={velocity:xn.velocity,stiffness:xn.stiffness,damping:xn.damping,mass:xn.mass,isResolvedFromDuration:!1,...n};if(!r8(n,Hw)&&r8(n,zw))if(n.visualDuration){const i=n.visualDuration,s=2*Math.PI/(i*1.2),u=s*s,c=2*Lr(.05,1,1-(n.bounce||0))*Math.sqrt(u);t={...t,mass:xn.mass,stiffness:u,damping:c}}else{const i=Nw(n);t={...t,...i,mass:xn.mass},t.isResolvedFromDuration=!0}return t}function ug(n=xn.visualDuration,t=xn.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:s,restDelta:u}=i;const c=i.keyframes[0],f=i.keyframes[i.keyframes.length-1],p={done:!1,value:c},{stiffness:m,damping:S,mass:b,duration:_,velocity:x,isResolvedFromDuration:D}=ww({...i,velocity:-_s(i.velocity||0)}),A=x||0,N=S/(2*Math.sqrt(m*b)),R=f-c,O=_s(Math.sqrt(m/b)),U=Math.abs(R)<5;s||(s=U?xn.restSpeed.granular:xn.restSpeed.default),u||(u=U?xn.restDelta.granular:xn.restDelta.default);let j;if(N<1){const F=nS(O,N);j=W=>{const st=Math.exp(-N*O*W);return f-st*((A+N*O*R)/F*Math.sin(F*W)+R*Math.cos(F*W))}}else if(N===1)j=F=>f-Math.exp(-O*F)*(R+(A+O*R)*F);else{const F=O*Math.sqrt(N*N-1);j=W=>{const st=Math.exp(-N*O*W),$=Math.min(F*W,300);return f-st*((A+N*O*R)*Math.sinh($)+F*R*Math.cosh($))/F}}const V={calculatedDuration:D&&_||null,next:F=>{const W=j(F);if(D)p.done=F>=_;else{let st=F===0?A:0;N<1&&(st=F===0?fl(A):l8(j,F,W));const $=Math.abs(st)<=s,tt=Math.abs(f-W)<=u;p.done=$&&tt}return p.value=p.done?f:W,p},toString:()=>{const F=Math.min(tS(V),og),W=s8(st=>V.next(F*st).value,F,30);return F+"ms "+W},toTransition:()=>{}};return V}ug.applyToOptions=n=>{const t=Aw(n,100,ug);return n.ease=t.ease,n.duration=fl(t.duration),n.type="keyframes",n};function aS({keyframes:n,velocity:t=0,power:i=.8,timeConstant:s=325,bounceDamping:u=10,bounceStiffness:c=500,modifyTarget:f,min:p,max:m,restDelta:S=.5,restSpeed:b}){const _=n[0],x={done:!1,value:_},D=$=>p!==void 0&&$<p||m!==void 0&&$>m,A=$=>p===void 0?m:m===void 0||Math.abs(p-$)<Math.abs(m-$)?p:m;let N=i*t;const R=_+N,O=f===void 0?R:f(R);O!==R&&(N=O-_);const U=$=>-N*Math.exp(-$/s),j=$=>O+U($),V=$=>{const tt=U($),et=j($);x.done=Math.abs(tt)<=S,x.value=x.done?O:et};let F,W;const st=$=>{D(x.value)&&(F=$,W=ug({keyframes:[x.value,A(x.value)],velocity:l8(j,$,x.value),damping:u,stiffness:c,restDelta:S,restSpeed:b}))};return st(0),{calculatedDuration:null,next:$=>{let tt=!1;return!W&&F===void 0&&(tt=!0,V($),st($)),F!==void 0&&$>=F?W.next($-F):(!tt&&V($),x)}}}function Uw(n,t,i){const s=[],u=i||Yr.mix||i8,c=n.length-1;for(let f=0;f<c;f++){let p=u(n[f],n[f+1]);if(t){const m=Array.isArray(t)?t[f]||Cs:t;p=d0(m,p)}s.push(p)}return s}function Bw(n,t,{clamp:i=!0,ease:s,mixer:u}={}){const c=n.length;if(Pr(c===t.length,"Both input and output ranges must be the same length","range-length"),c===1)return()=>t[0];if(c===2&&t[0]===t[1])return()=>t[1];const f=n[0]===n[1];n[0]>n[c-1]&&(n=[...n].reverse(),t=[...t].reverse());const p=Uw(t,s,u),m=p.length,S=b=>{if(f&&b<n[0])return t[0];let _=0;if(m>1)for(;_<n.length-2&&!(b<n[_+1]);_++);const x=p0(n[_],n[_+1],b);return p[_](x)};return i?b=>S(Lr(n[0],n[c-1],b)):S}function Vw(n,t){const i=n[n.length-1];for(let s=1;s<=t;s++){const u=p0(0,t,s);n.push(_n(i,1,u))}}function Gw(n){const t=[0];return Vw(t,n.length-1),t}function jw(n,t){return n.map(i=>i*t)}function Lw(n,t){return n.map(()=>t||Lb).splice(0,n.length-1)}function Eh({duration:n=300,keyframes:t,times:i,ease:s="easeInOut"}){const u=WH(s)?s.map(qb):qb(s),c={done:!1,value:t[0]},f=jw(i&&i.length===t.length?i:Gw(t),n),p=Bw(f,t,{ease:Array.isArray(u)?u:Lw(t,u)});return{calculatedDuration:n,next:m=>(c.value=p(m),c.done=m>=n,c)}}const Pw=n=>n!==null;function iS(n,{repeat:t,repeatType:i="loop"},s,u=1){const c=n.filter(Pw),p=u<0||t&&i!=="loop"&&t%2===1?0:c.length-1;return!p||s===void 0?c[p]:s}const Yw={decay:aS,inertia:aS,tween:Eh,keyframes:Eh,spring:ug};function o8(n){typeof n.type=="string"&&(n.type=Yw[n.type])}class sS{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,i){return this.finished.then(t,i)}}const qw=n=>n/100;class lS extends sS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:i}=this.options;i&&i.updatedAt!==Oi.now()&&this.tick(Oi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;o8(t);const{type:i=Eh,repeat:s=0,repeatDelay:u=0,repeatType:c,velocity:f=0}=t;let{keyframes:p}=t;const m=i||Eh;process.env.NODE_ENV!=="production"&&m!==Eh&&Pr(p.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${p}`,"spring-two-frames"),m!==Eh&&typeof p[0]!="number"&&(this.mixKeyframes=d0(qw,i8(p[0],p[1])),p=[0,100]);const S=m({...t,keyframes:p});c==="mirror"&&(this.mirroredGenerator=m({...t,keyframes:[...p].reverse(),velocity:-f})),S.calculatedDuration===null&&(S.calculatedDuration=tS(S));const{calculatedDuration:b}=S;this.calculatedDuration=b,this.resolvedDuration=b+u,this.totalDuration=this.resolvedDuration*(s+1)-u,this.generator=S}updateTime(t){const i=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=i}tick(t,i=!1){const{generator:s,totalDuration:u,mixKeyframes:c,mirroredGenerator:f,resolvedDuration:p,calculatedDuration:m}=this;if(this.startTime===null)return s.next(0);const{delay:S=0,keyframes:b,repeat:_,repeatType:x,repeatDelay:D,type:A,onUpdate:N,finalKeyframe:R}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),i?this.currentTime=t:this.updateTime(t);const O=this.currentTime-S*(this.playbackSpeed>=0?1:-1),U=this.playbackSpeed>=0?O<0:O>u;this.currentTime=Math.max(O,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let j=this.currentTime,V=s;if(_){const $=Math.min(this.currentTime,u)/p;let tt=Math.floor($),et=$%1;!et&&$>=1&&(et=1),et===1&&tt--,tt=Math.min(tt,_+1),tt%2&&(x==="reverse"?(et=1-et,D&&(et-=D/p)):x==="mirror"&&(V=f)),j=Lr(0,1,et)*p}const F=U?{done:!1,value:b[0]}:V.next(j);c&&(F.value=c(F.value));let{done:W}=F;!U&&m!==null&&(W=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const st=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&W);return st&&A!==aS&&(F.value=iS(b,this.options,R,this.speed)),N&&N(F.value),st&&this.finish(),F}then(t,i){return this.finished.then(t,i)}get duration(){return _s(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+_s(t)}get time(){return _s(this.currentTime)}set time(t){t=fl(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Oi.now());const i=this.playbackSpeed!==t;this.playbackSpeed=t,i&&(this.time=_s(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Dw,startTime:i}=this.options;this.driver||(this.driver=t(u=>this.tick(u))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=i??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Oi.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Xw(n){for(let t=1;t<n.length;t++)n[t]??(n[t]=n[t-1])}const vc=n=>n*180/Math.PI,rS=n=>{const t=vc(Math.atan2(n[1],n[0]));return oS(t)},Kw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:rS,rotateZ:rS,skewX:n=>vc(Math.atan(n[1])),skewY:n=>vc(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},oS=n=>(n=n%360,n<0&&(n+=360),n),u8=rS,c8=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),f8=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),Qw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:c8,scaleY:f8,scale:n=>(c8(n)+f8(n))/2,rotateX:n=>oS(vc(Math.atan2(n[6],n[5]))),rotateY:n=>oS(vc(Math.atan2(-n[2],n[0]))),rotateZ:u8,rotate:u8,skewX:n=>vc(Math.atan(n[4])),skewY:n=>vc(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function uS(n){return n.includes("scale")?1:0}function cS(n,t){if(!n||n==="none")return uS(t);const i=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,u;if(i)s=Qw,u=i;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Kw,u=p}if(!u)return uS(t);const c=s[t],f=u[1].split(",").map(Jw);return typeof c=="function"?c(f):f[c]}const Zw=(n,t)=>{const{transform:i="none"}=getComputedStyle(n);return cS(i,t)};function Jw(n){return parseFloat(n.trim())}const Th=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ch=new Set(Th),h8=n=>n===Sh||n===zt,Fw=new Set(["x","y","z"]),kw=Th.filter(n=>!Fw.has(n));function Iw(n){const t=[];return kw.forEach(i=>{const s=n.getValue(i);s!==void 0&&(t.push([i,s.get()]),s.set(i.startsWith("scale")?1:0))}),t}const Wo={width:({x:n},{paddingLeft:t="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(t)-parseFloat(i),height:({y:n},{paddingTop:t="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(t)-parseFloat(i),top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>cS(t,"x"),y:(n,{transform:t})=>cS(t,"y")};Wo.translateX=Wo.x,Wo.translateY=Wo.y;const Sc=new Set;let fS=!1,hS=!1,dS=!1;function d8(){if(hS){const n=Array.from(Sc).filter(s=>s.needsMeasurement),t=new Set(n.map(s=>s.element)),i=new Map;t.forEach(s=>{const u=Iw(s);u.length&&(i.set(s,u),s.render())}),n.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const u=i.get(s);u&&u.forEach(([c,f])=>{s.getValue(c)?.set(f)})}),n.forEach(s=>s.measureEndState()),n.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}hS=!1,fS=!1,Sc.forEach(n=>n.complete(dS)),Sc.clear()}function p8(){Sc.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(hS=!0)})}function Ww(){dS=!0,p8(),d8(),dS=!1}class pS{constructor(t,i,s,u,c,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=s,this.motionValue=u,this.element=c,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(Sc.add(this),fS||(fS=!0,pn.read(p8),pn.resolveKeyframes(d8))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:s,motionValue:u}=this;if(t[0]===null){const c=u?.get(),f=t[t.length-1];if(c!==void 0)t[0]=c;else if(s&&i){const p=s.readValue(i,f);p!=null&&(t[0]=p)}t[0]===void 0&&(t[0]=f),u&&c===void 0&&u.set(t[0])}Xw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Sc.delete(this)}cancel(){this.state==="scheduled"&&(Sc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $w=n=>n.startsWith("--");function tU(n,t,i){$w(t)?n.style.setProperty(t,i):n.style[t]=i}const eU=jv(()=>window.ScrollTimeline!==void 0),nU={};function aU(n,t){const i=jv(n);return()=>nU[t]??i()}const m8=aU(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),b0=([n,t,i,s])=>`cubic-bezier(${n}, ${t}, ${i}, ${s})`,g8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:b0([0,.65,.55,1]),circOut:b0([.55,0,1,.45]),backIn:b0([.31,.01,.66,-.59]),backOut:b0([.33,1.53,.69,.99])};function y8(n,t){if(n)return typeof n=="function"?m8()?s8(n,t):"ease-out":Pb(n)?b0(n):Array.isArray(n)?n.map(i=>y8(i,t)||g8.easeOut):g8[n]}function iU(n,t,i,{delay:s=0,duration:u=300,repeat:c=0,repeatType:f="loop",ease:p="easeOut",times:m}={},S=void 0){const b={[t]:i};m&&(b.offset=m);const _=y8(p,u);Array.isArray(_)&&(b.easing=_);const x={delay:s,duration:u,easing:Array.isArray(_)?"linear":_,fill:"both",iterations:c+1,direction:f==="reverse"?"alternate":"normal"};return S&&(x.pseudoElement=S),n.animate(b,x)}function v8(n){return typeof n=="function"&&"applyToOptions"in n}function sU({type:n,...t}){return v8(n)&&m8()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lU extends sS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:i,name:s,keyframes:u,pseudoElement:c,allowFlatten:f=!1,finalKeyframe:p,onComplete:m}=t;this.isPseudoElement=!!c,this.allowFlatten=f,this.options=t,Pr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const S=sU(t);this.animation=iU(i,s,u,S,c),S.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const b=iS(u,this.options,p,this.speed);this.updateMotionValue?this.updateMotionValue(b):tU(i,s,b),this.animation.cancel()}m?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return _s(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+_s(t)}get time(){return _s(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=fl(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&eU()?(this.animation.timeline=t,Cs):i(this)}}const S8={anticipate:Vb,backInOut:Bb,circInOut:jb};function rU(n){return n in S8}function oU(n){typeof n.ease=="string"&&rU(n.ease)&&(n.ease=S8[n.ease])}const b8=10;class uU extends lU{constructor(t){oU(t),o8(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:i,onUpdate:s,onComplete:u,element:c,...f}=this.options;if(!i)return;if(t!==void 0){i.set(t);return}const p=new lS({...f,autoplay:!1}),m=fl(this.finishedTime??this.time);i.setWithVelocity(p.sample(m-b8).value,p.sample(m).value,b8),p.stop()}}const E8=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Io.test(n)||n==="0")&&!n.startsWith("url("));function cU(n){const t=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==t)return!0}function fU(n,t,i,s){const u=n[0];if(u===null)return!1;if(t==="display"||t==="visibility")return!0;const c=n[n.length-1],f=E8(u,t),p=E8(c,t);return vh(f===p,`You are trying to animate ${t} from "${u}" to "${c}". "${f?c:u}" is not an animatable value.`,"value-not-animatable"),!f||!p?!1:cU(n)||(i==="spring"||v8(i))&&s}function mS(n){n.duration=0,n.type="keyframes"}const hU=new Set(["opacity","clipPath","filter","transform"]),dU=jv(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pU(n){const{motionValue:t,name:i,repeatDelay:s,repeatType:u,damping:c,type:f}=n;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:S}=t.owner.getProps();return dU()&&i&&hU.has(i)&&(i!=="transform"||!S)&&!m&&!s&&u!=="mirror"&&c!==0&&f!=="inertia"}const mU=40;class gU extends sS{constructor({autoplay:t=!0,delay:i=0,type:s="keyframes",repeat:u=0,repeatDelay:c=0,repeatType:f="loop",keyframes:p,name:m,motionValue:S,element:b,..._}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Oi.now();const x={autoplay:t,delay:i,type:s,repeat:u,repeatDelay:c,repeatType:f,name:m,motionValue:S,element:b,..._},D=b?.KeyframeResolver||pS;this.keyframeResolver=new D(p,(A,N,R)=>this.onKeyframesResolved(A,N,x,!R),m,S,b),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,i,s,u){this.keyframeResolver=void 0;const{name:c,type:f,velocity:p,delay:m,isHandoff:S,onUpdate:b}=s;this.resolvedAt=Oi.now(),fU(t,c,f,p)||((Yr.instantAnimations||!m)&&b?.(iS(t,s,i)),t[0]=t[t.length-1],mS(s),s.repeat=0);const x={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>mU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...s,keyframes:t},D=!S&&pU(x)?new uU({...x,element:x.motionValue.owner.current}):new lS(x);D.finished.then(()=>this.notifyFinished()).catch(Cs),this.pendingTimeline&&(this.stopTimeline=D.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=D}get finished(){return this._animation?this.animation.finished:this._finished}then(t,i){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ww()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const yU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vU(n){const t=yU.exec(n);if(!t)return[,];const[,i,s,u]=t;return[`--${i??s}`,u]}const SU=4;function T8(n,t,i=1){Pr(i<=SU,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,u]=vU(n);if(!s)return;const c=window.getComputedStyle(t).getPropertyValue(s);if(c){const f=c.trim();return Ab(f)?parseFloat(f):f}return Kv(u)?T8(u,t,i+1):u}function gS(n,t){return n?.[t]??n?.default??n}const C8=new Set(["width","height","top","left","right","bottom",...Th]),bU={test:n=>n==="auto",parse:n=>n},_8=n=>t=>t.test(n),x8=[Sh,zt,$l,ko,cw,uw,bU],D8=n=>x8.find(_8(n));function EU(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Nb(n):!0}const TU=new Set(["brightness","contrast","saturate","opacity"]);function CU(n){const[t,i]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[s]=i.match(Qv)||[];if(!s)return n;const u=i.replace(s,"");let c=TU.has(t)?1:0;return s!==i&&(c*=100),t+"("+c+u+")"}const _U=/\b([a-z-]*)\(.*?\)/gu,yS={...Io,getAnimatableNone:n=>{const t=n.match(_U);return t?t.map(CU).join(" "):n}},A8={...Sh,transform:Math.round},vS={borderWidth:zt,borderTopWidth:zt,borderRightWidth:zt,borderBottomWidth:zt,borderLeftWidth:zt,borderRadius:zt,radius:zt,borderTopLeftRadius:zt,borderTopRightRadius:zt,borderBottomRightRadius:zt,borderBottomLeftRadius:zt,width:zt,maxWidth:zt,height:zt,maxHeight:zt,top:zt,right:zt,bottom:zt,left:zt,inset:zt,insetBlock:zt,insetBlockStart:zt,insetBlockEnd:zt,insetInline:zt,insetInlineStart:zt,insetInlineEnd:zt,padding:zt,paddingTop:zt,paddingRight:zt,paddingBottom:zt,paddingLeft:zt,paddingBlock:zt,paddingBlockStart:zt,paddingBlockEnd:zt,paddingInline:zt,paddingInlineStart:zt,paddingInlineEnd:zt,margin:zt,marginTop:zt,marginRight:zt,marginBottom:zt,marginLeft:zt,marginBlock:zt,marginBlockStart:zt,marginBlockEnd:zt,marginInline:zt,marginInlineStart:zt,marginInlineEnd:zt,backgroundPositionX:zt,backgroundPositionY:zt,...{rotate:ko,rotateX:ko,rotateY:ko,rotateZ:ko,scale:lg,scaleX:lg,scaleY:lg,scaleZ:lg,skew:ko,skewX:ko,skewY:ko,distance:zt,translateX:zt,translateY:zt,translateZ:zt,x:zt,y:zt,z:zt,perspective:zt,transformPerspective:zt,opacity:g0,originX:Fb,originY:Fb,originZ:zt},zIndex:A8,fillOpacity:g0,strokeOpacity:g0,numOctaves:A8},xU={...vS,color:Wn,backgroundColor:Wn,outlineColor:Wn,fill:Wn,stroke:Wn,borderColor:Wn,borderTopColor:Wn,borderRightColor:Wn,borderBottomColor:Wn,borderLeftColor:Wn,filter:yS,WebkitFilter:yS},M8=n=>xU[n];function N8(n,t){let i=M8(n);return i!==yS&&(i=Io),i.getAnimatableNone?i.getAnimatableNone(t):void 0}const DU=new Set(["auto","none","0"]);function AU(n,t,i){let s=0,u;for(;s<n.length&&!u;){const c=n[s];typeof c=="string"&&!DU.has(c)&&S0(c).values.length&&(u=n[s]),s++}if(u&&i)for(const c of t)n[c]=N8(i,u)}class MU extends pS{constructor(t,i,s,u,c){super(t,i,s,u,c,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:i,name:s}=this;if(!i||!i.current)return;super.readKeyframes();for(let b=0;b<t.length;b++){let _=t[b];if(typeof _=="string"&&(_=_.trim(),Kv(_))){const x=T8(_,i.current);x!==void 0&&(t[b]=x),b===t.length-1&&(this.finalKeyframe=_)}}if(this.resolveNoneKeyframes(),!C8.has(s)||t.length!==2)return;const[u,c]=t,f=D8(u),p=D8(c),m=Zb(u),S=Zb(c);if(m!==S&&Wo[s]){this.needsMeasurement=!0;return}if(f!==p)if(h8(f)&&h8(p))for(let b=0;b<t.length;b++){const _=t[b];typeof _=="string"&&(t[b]=parseFloat(_))}else Wo[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:i}=this,s=[];for(let u=0;u<t.length;u++)(t[u]===null||EU(t[u]))&&s.push(u);s.length&&AU(t,s,i)}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Wo[s](t.measureViewportBox(),window.getComputedStyle(t.current)),i[0]=this.measuredOrigin;const u=i[i.length-1];u!==void 0&&t.getValue(s,u).jump(u,!1)}measureEndState(){const{element:t,name:i,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const u=t.getValue(i);u&&u.jump(this.measuredOrigin,!1);const c=s.length-1,f=s[c];s[c]=Wo[i](t.measureViewportBox(),window.getComputedStyle(t.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),this.removedTransforms?.length&&this.removedTransforms.forEach(([p,m])=>{t.getValue(p).set(m)}),this.resolveNoneKeyframes()}}function NU(n,t,i){if(n instanceof EventTarget)return[n];if(typeof n=="string"){let s=document;const u=i?.[n]??s.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}const O8=(n,t)=>t&&typeof n=="number"?t.transform(n):n;function OU(n){return Mb(n)&&"offsetHeight"in n}const R8=30,RU=n=>!isNaN(parseFloat(n));class zU{constructor(t,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const u=Oi.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=Oi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=RU(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Pv(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,i){this.events[t]||(this.events[t]=new Lv);const s=this.events[t].add(i);return t==="change"?()=>{s(),pn.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,i,s){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,i=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Oi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>R8)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,R8);return Ob(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=t(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _h(n,t){return new zU(n,t)}const{schedule:SS}=Xb(queueMicrotask,!1),hl={x:!1,y:!1};function z8(){return hl.x||hl.y}function HU(n){return n==="x"||n==="y"?hl[n]?null:(hl[n]=!0,()=>{hl[n]=!1}):hl.x||hl.y?null:(hl.x=hl.y=!0,()=>{hl.x=hl.y=!1})}function H8(n,t){const i=NU(n),s=new AbortController,u={passive:!0,...t,signal:s.signal};return[i,u,()=>s.abort()]}function w8(n){return!(n.pointerType==="touch"||z8())}function wU(n,t,i={}){const[s,u,c]=H8(n,i),f=p=>{if(!w8(p))return;const{target:m}=p,S=t(m,p);if(typeof S!="function"||!m)return;const b=_=>{w8(_)&&(S(_),m.removeEventListener("pointerleave",b))};m.addEventListener("pointerleave",b,u)};return s.forEach(p=>{p.addEventListener("pointerenter",f,u)}),c}const U8=(n,t)=>t?n===t?!0:U8(n,t.parentElement):!1,bS=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,UU=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function B8(n){return UU.has(n.tagName)||n.isContentEditable===!0}const cg=new WeakSet;function V8(n){return t=>{t.key==="Enter"&&n(t)}}function ES(n,t){n.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const BU=(n,t)=>{const i=n.currentTarget;if(!i)return;const s=V8(()=>{if(cg.has(i))return;ES(i,"down");const u=V8(()=>{ES(i,"up")}),c=()=>ES(i,"cancel");i.addEventListener("keyup",u,t),i.addEventListener("blur",c,t)});i.addEventListener("keydown",s,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),t)};function G8(n){return bS(n)&&!z8()}function VU(n,t,i={}){const[s,u,c]=H8(n,i),f=p=>{const m=p.currentTarget;if(!G8(p))return;cg.add(m);const S=t(m,p),b=(D,A)=>{window.removeEventListener("pointerup",_),window.removeEventListener("pointercancel",x),cg.has(m)&&cg.delete(m),G8(D)&&typeof S=="function"&&S(D,{success:A})},_=D=>{b(D,m===window||m===document||i.useGlobalTarget||U8(m,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",_,u),window.addEventListener("pointercancel",x,u)};return s.forEach(p=>{(i.useGlobalTarget?window:p).addEventListener("pointerdown",f,u),OU(p)&&(p.addEventListener("focus",S=>BU(S,u)),!B8(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),c}function j8(n){return Mb(n)&&"ownerSVGElement"in n}function GU(n){return j8(n)&&n.tagName==="svg"}const Ia=n=>!!(n&&n.getVelocity),jU=[...x8,Wn,Io],LU=n=>jU.find(_8(n)),L8=w.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function PU(n=!0){const t=w.useContext(Uv);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:s,register:u}=t,c=w.useId();w.useEffect(()=>{if(n)return u(c)},[n]);const f=w.useCallback(()=>n&&s&&s(c),[c,s,n]);return!i&&s?[!1,f]:[!0]}const P8=w.createContext({strict:!1}),Y8={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},xh={};for(const n in Y8)xh[n]={isEnabled:t=>Y8[n].some(i=>!!t[i])};function YU(n){for(const t in n)xh[t]={...xh[t],...n[t]}}const qU=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function fg(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||qU.has(n)}let q8=n=>!fg(n);function XU(n){typeof n=="function"&&(q8=t=>t.startsWith("on")?!fg(t):n(t))}try{XU(require("@emotion/is-prop-valid").default)}catch{}function KU(n,t,i){const s={};for(const u in n)u==="values"&&typeof n.values=="object"||(q8(u)||i===!0&&fg(u)||!t&&!fg(u)||n.draggable&&u.startsWith("onDrag"))&&(s[u]=n[u]);return s}const hg=w.createContext({});function dg(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function E0(n){return typeof n=="string"||Array.isArray(n)}const TS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],CS=["initial",...TS];function pg(n){return dg(n.animate)||CS.some(t=>E0(n[t]))}function X8(n){return!!(pg(n)||n.variants)}function QU(n,t){if(pg(n)){const{initial:i,animate:s}=n;return{initial:i===!1||E0(i)?i:void 0,animate:E0(s)?s:void 0}}return n.inherit!==!1?t:{}}function ZU(n){const{initial:t,animate:i}=QU(n,w.useContext(hg));return w.useMemo(()=>({initial:t,animate:i}),[K8(t),K8(i)])}function K8(n){return Array.isArray(n)?n.join(" "):n}function Q8(n,t){return t.max===t.min?0:n/(t.max-t.min)*100}const T0={correct:(n,t)=>{if(!t.target)return n;if(typeof n=="string")if(zt.test(n))n=parseFloat(n);else return n;const i=Q8(n,t.target.x),s=Q8(n,t.target.y);return`${i}% ${s}%`}},JU={correct:(n,{treeScale:t,projectionDelta:i})=>{const s=n,u=Io.parse(n);if(u.length>5)return s;const c=Io.createTransformer(n),f=typeof u[0]!="number"?1:0,p=i.x.scale*t.x,m=i.y.scale*t.y;u[0+f]/=p,u[1+f]/=m;const S=_n(p,m,.5);return typeof u[2+f]=="number"&&(u[2+f]/=S),typeof u[3+f]=="number"&&(u[3+f]/=S),c(u)}},_S={borderRadius:{...T0,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:T0,borderTopRightRadius:T0,borderBottomLeftRadius:T0,borderBottomRightRadius:T0,boxShadow:JU};function Z8(n,{layout:t,layoutId:i}){return Ch.has(n)||n.startsWith("origin")||(t||i!==void 0)&&(!!_S[n]||n==="opacity")}const FU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kU=Th.length;function IU(n,t,i){let s="",u=!0;for(let c=0;c<kU;c++){const f=Th[c],p=n[f];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(f.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const S=O8(p,vS[f]);if(!m){u=!1;const b=FU[f]||f;s+=`${b}(${S}) `}i&&(t[f]=S)}}return s=s.trim(),i?s=i(t,u?"":s):u&&(s="none"),s}function xS(n,t,i){const{style:s,vars:u,transformOrigin:c}=n;let f=!1,p=!1;for(const m in t){const S=t[m];if(Ch.has(m)){f=!0;continue}else if(Qb(m)){u[m]=S;continue}else{const b=O8(S,vS[m]);m.startsWith("origin")?(p=!0,c[m]=b):s[m]=b}}if(t.transform||(f||i?s.transform=IU(t,n.transform,i):s.transform&&(s.transform="none")),p){const{originX:m="50%",originY:S="50%",originZ:b=0}=c;s.transformOrigin=`${m} ${S} ${b}`}}const DS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function J8(n,t,i){for(const s in t)!Ia(t[s])&&!Z8(s,i)&&(n[s]=t[s])}function WU({transformTemplate:n},t){return w.useMemo(()=>{const i=DS();return xS(i,t,n),Object.assign({},i.vars,i.style)},[t])}function $U(n,t){const i=n.style||{},s={};return J8(s,i,n),Object.assign(s,WU(n,t)),s}function tB(n,t){const i={},s=$U(n,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=s,i}const eB={offset:"stroke-dashoffset",array:"stroke-dasharray"},nB={offset:"strokeDashoffset",array:"strokeDasharray"};function aB(n,t,i=1,s=0,u=!0){n.pathLength=1;const c=u?eB:nB;n[c.offset]=zt.transform(-s);const f=zt.transform(t),p=zt.transform(i);n[c.array]=`${f} ${p}`}const iB=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function F8(n,{attrX:t,attrY:i,attrScale:s,pathLength:u,pathSpacing:c=1,pathOffset:f=0,...p},m,S,b){if(xS(n,p,S),m){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:x}=n;_.transform&&(x.transform=_.transform,delete _.transform),(x.transform||_.transformOrigin)&&(x.transformOrigin=_.transformOrigin??"50% 50%",delete _.transformOrigin),x.transform&&(x.transformBox=b?.transformBox??"fill-box",delete _.transformBox);for(const D of iB)_[D]!==void 0&&(x[D]=_[D],delete _[D]);t!==void 0&&(_.x=t),i!==void 0&&(_.y=i),s!==void 0&&(_.scale=s),u!==void 0&&aB(_,u,c,f,!1)}const k8=()=>({...DS(),attrs:{}}),I8=n=>typeof n=="string"&&n.toLowerCase()==="svg";function sB(n,t,i,s){const u=w.useMemo(()=>{const c=k8();return F8(c,t,I8(s),n.transformTemplate,n.style),{...c.attrs,style:{...c.style}}},[t]);if(n.style){const c={};J8(c,n.style,n),u.style={...c,...u.style}}return u}const lB=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function AS(n){return typeof n!="string"||n.includes("-")?!1:!!(lB.indexOf(n)>-1||/[A-Z]/u.test(n))}function rB(n,t,i,{latestValues:s},u,c=!1,f){const m=(f??AS(n)?sB:tB)(t,s,u,n),S=KU(t,typeof n=="string",c),b=n!==w.Fragment?{...S,...m,ref:i}:{},{children:_}=t,x=w.useMemo(()=>Ia(_)?_.get():_,[_]);return w.createElement(n,{...b,children:x})}function W8(n){const t=[{},{}];return n?.values.forEach((i,s)=>{t[0][s]=i.get(),t[1][s]=i.getVelocity()}),t}function MS(n,t,i,s){if(typeof t=="function"){const[u,c]=W8(s);t=t(i!==void 0?i:n.custom,u,c)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[u,c]=W8(s);t=t(i!==void 0?i:n.custom,u,c)}return t}function mg(n){return Ia(n)?n.get():n}function oB({scrapeMotionValuesFromProps:n,createRenderState:t},i,s,u){return{latestValues:uB(i,s,u,n),renderState:t()}}function uB(n,t,i,s){const u={},c=s(n,{});for(const x in c)u[x]=mg(c[x]);let{initial:f,animate:p}=n;const m=pg(n),S=X8(n);t&&S&&!m&&n.inherit!==!1&&(f===void 0&&(f=t.initial),p===void 0&&(p=t.animate));let b=i?i.initial===!1:!1;b=b||f===!1;const _=b?p:f;if(_&&typeof _!="boolean"&&!dg(_)){const x=Array.isArray(_)?_:[_];for(let D=0;D<x.length;D++){const A=MS(n,x[D]);if(A){const{transitionEnd:N,transition:R,...O}=A;for(const U in O){let j=O[U];if(Array.isArray(j)){const V=b?j.length-1:0;j=j[V]}j!==null&&(u[U]=j)}for(const U in N)u[U]=N[U]}}}return u}const $8=n=>(t,i)=>{const s=w.useContext(hg),u=w.useContext(Uv),c=()=>oB(n,t,s,u);return i?c():XH(c)};function NS(n,t,i){const{style:s}=n,u={};for(const c in s)(Ia(s[c])||t.style&&Ia(t.style[c])||Z8(c,n)||i?.getValue(c)?.liveStyle!==void 0)&&(u[c]=s[c]);return u}const cB=$8({scrapeMotionValuesFromProps:NS,createRenderState:DS});function t7(n,t,i){const s=NS(n,t,i);for(const u in n)if(Ia(n[u])||Ia(t[u])){const c=Th.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;s[c]=n[u]}return s}const fB=$8({scrapeMotionValuesFromProps:t7,createRenderState:k8}),hB=Symbol.for("motionComponentSymbol");function dB(n,t,i){const s=w.useRef(i);w.useInsertionEffect(()=>{s.current=i});const u=w.useRef(null);return w.useCallback(c=>{c&&n.onMount?.(c),t&&(c?t.mount(c):t.unmount());const f=s.current;if(typeof f=="function")if(c){const p=f(c);typeof p=="function"&&(u.current=p)}else u.current?(u.current(),u.current=null):f(c);else f&&(f.current=c)},[t])}const OS=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),e7="data-"+OS("framerAppearId"),n7=w.createContext({});function C0(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function pB(n,t,i,s,u,c){const{visualElement:f}=w.useContext(hg),p=w.useContext(P8),m=w.useContext(Uv),S=w.useContext(L8).reducedMotion,b=w.useRef(null);s=s||p.renderer,!b.current&&s&&(b.current=s(n,{visualState:t,parent:f,props:i,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:S,isSVG:c}));const _=b.current,x=w.useContext(n7);_&&!_.projection&&u&&(_.type==="html"||_.type==="svg")&&mB(b.current,i,u,x);const D=w.useRef(!1);w.useInsertionEffect(()=>{_&&D.current&&_.update(i,m)});const A=i[e7],N=w.useRef(!!A&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return KH(()=>{_&&(D.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),N.current&&_.animationState&&_.animationState.animateChanges())}),w.useEffect(()=>{_&&(!N.current&&_.animationState&&_.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),N.current=!1),_.enteringChildren=void 0)}),_}function mB(n,t,i,s){const{layoutId:u,layout:c,drag:f,dragConstraints:p,layoutScroll:m,layoutRoot:S,layoutCrossfade:b}=t;n.projection=new i(n.latestValues,t["data-framer-portal-id"]?void 0:a7(n.parent)),n.projection.setOptions({layoutId:u,layout:c,alwaysMeasureLayout:!!f||p&&C0(p),visualElement:n,animationType:typeof c=="string"?c:"both",initialPromotionConfig:s,crossfade:b,layoutScroll:m,layoutRoot:S})}function a7(n){if(n)return n.options.allowProjection!==!1?n.projection:a7(n.parent)}function RS(n,{forwardMotionProps:t=!1,type:i}={},s,u){s&&YU(s);const c=i?i==="svg":AS(n),f=c?fB:cB;function p(S,b){let _;const x={...w.useContext(L8),...S,layoutId:gB(S)},{isStatic:D}=x,A=ZU(S),N=f(S,D);if(!D&&wv){yB(x,s);const R=vB(x);_=R.MeasureLayout,A.visualElement=pB(n,N,x,u,R.ProjectionNode,c)}return X.jsxs(hg.Provider,{value:A,children:[_&&A.visualElement?X.jsx(_,{visualElement:A.visualElement,...x}):null,rB(n,S,dB(N,A.visualElement,b),N,D,t,c)]})}p.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const m=w.forwardRef(p);return m[hB]=n,m}function gB({layoutId:n}){const t=w.useContext(Db).id;return t&&n!==void 0?t+"-"+n:n}function yB(n,t){const i=w.useContext(P8).strict;if(process.env.NODE_ENV!=="production"&&t&&i){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?vh(!1,s,"lazy-strict-mode"):Pr(!1,s,"lazy-strict-mode")}}function vB(n){const{drag:t,layout:i}=xh;if(!t&&!i)return{};const s={...t,...i};return{MeasureLayout:t?.isEnabled(n)||i?.isEnabled(n)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function SB(n,t){if(typeof Proxy>"u")return RS;const i=new Map,s=(c,f)=>RS(c,f,n,t),u=(c,f)=>(process.env.NODE_ENV!=="production"&&Pv(!1,"motion() is deprecated. Use motion.create() instead."),s(c,f));return new Proxy(u,{get:(c,f)=>f==="create"?s:(i.has(f)||i.set(f,RS(f,void 0,n,t)),i.get(f))})}function i7({top:n,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:n,max:s}}}function bB({x:n,y:t}){return{top:t.min,right:n.max,bottom:t.max,left:n.min}}function EB(n,t){if(!t)return n;const i=t({x:n.left,y:n.top}),s=t({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}function zS(n){return n===void 0||n===1}function HS({scale:n,scaleX:t,scaleY:i}){return!zS(n)||!zS(t)||!zS(i)}function bc(n){return HS(n)||s7(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function s7(n){return l7(n.x)||l7(n.y)}function l7(n){return n&&n!=="0%"}function gg(n,t,i){const s=n-i,u=t*s;return i+u}function r7(n,t,i,s,u){return u!==void 0&&(n=gg(n,u,s)),gg(n,i,s)+t}function wS(n,t=0,i=1,s,u){n.min=r7(n.min,t,i,s,u),n.max=r7(n.max,t,i,s,u)}function o7(n,{x:t,y:i}){wS(n.x,t.translate,t.scale,t.originPoint),wS(n.y,i.translate,i.scale,i.originPoint)}const u7=.999999999999,c7=1.0000000000001;function TB(n,t,i,s=!1){const u=i.length;if(!u)return;t.x=t.y=1;let c,f;for(let p=0;p<u;p++){c=i[p],f=c.projectionDelta;const{visualElement:m}=c.options;m&&m.props.style&&m.props.style.display==="contents"||(s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ah(n,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),f&&(t.x*=f.x.scale,t.y*=f.y.scale,o7(n,f)),s&&bc(c.latestValues)&&Ah(n,c.latestValues))}t.x<c7&&t.x>u7&&(t.x=1),t.y<c7&&t.y>u7&&(t.y=1)}function Dh(n,t){n.min=n.min+t,n.max=n.max+t}function f7(n,t,i,s,u=.5){const c=_n(n.min,n.max,u);wS(n,t,i,c,s)}function Ah(n,t){f7(n.x,t.x,t.scaleX,t.scale,t.originX),f7(n.y,t.y,t.scaleY,t.scale,t.originY)}function h7(n,t){return i7(EB(n.getBoundingClientRect(),t))}function CB(n,t,i){const s=h7(n,i),{scroll:u}=t;return u&&(Dh(s.x,u.offset.x),Dh(s.y,u.offset.y)),s}const d7=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mh=()=>({x:d7(),y:d7()}),p7=()=>({min:0,max:0}),fa=()=>({x:p7(),y:p7()}),US={current:null},m7={current:!1};function _B(){if(m7.current=!0,!!wv)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>US.current=n.matches;n.addEventListener("change",t),t()}else US.current=!1}const xB=new WeakMap;function DB(n,t,i){for(const s in t){const u=t[s],c=i[s];if(Ia(u))n.addValue(s,u);else if(Ia(c))n.addValue(s,_h(u,{owner:n}));else if(c!==u)if(n.hasValue(s)){const f=n.getValue(s);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=n.getStaticValue(s);n.addValue(s,_h(f!==void 0?f:u,{owner:n}))}}for(const s in i)t[s]===void 0&&n.removeValue(s);return t}const g7=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class AB{scrapeMotionValuesFromProps(t,i,s){return{}}constructor({parent:t,props:i,presenceContext:s,reducedMotionConfig:u,blockInitialAnimation:c,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pS,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=Oi.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,pn.render(this.render,!1,!0))};const{latestValues:m,renderState:S}=f;this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=S,this.parent=t,this.props=i,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!c,this.isControllingVariants=pg(i),this.isVariantNode=X8(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const x in _){const D=_[x];m[x]!==void 0&&Ia(D)&&D.set(m[x])}}mount(t){this.current=t,xB.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(m7.current||_B(),this.shouldReduceMotion=US.current),process.env.NODE_ENV!=="production"&&Pv(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Fo(this.notifyUpdate),Fo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const i=this.features[t];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,i){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Ch.has(t);s&&this.onBindTransform&&this.onBindTransform();const u=i.on("change",f=>{this.latestValues[t]=f,this.props.onUpdate&&pn.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{u(),c&&c(),i.owner&&i.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in xh){const i=xh[t];if(!i)continue;const{isEnabled:s,Feature:u}=i;if(!this.features[t]&&u&&s(this.props)&&(this.features[t]=new u(this)),this.features[t]){const c=this.features[t];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fa()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let s=0;s<g7.length;s++){const u=g7[s];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const c="on"+u,f=t[c];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=DB(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(t),()=>i.variantChildren.delete(t)}addValue(t,i){const s=this.values.get(t);i!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,i),this.values.set(t,i),this.latestValues[t]=i.get())}removeValue(t){this.values.delete(t);const i=this.valueSubscriptions.get(t);i&&(i(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,i){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&i!==void 0&&(s=_h(i===null?void 0:i,{owner:this}),this.addValue(t,s)),s}readValue(t,i){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Ab(s)||Nb(s))?s=parseFloat(s):!LU(s)&&Io.test(i)&&(s=N8(t,i)),this.setBaseTarget(t,Ia(s)?s.get():s)),Ia(s)?s.get():s}setBaseTarget(t,i){this.baseTarget[t]=i}getBaseTarget(t){const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const c=MS(this.props,i,this.presenceContext?.custom);c&&(s=c[t])}if(i&&s!==void 0)return s;const u=this.getBaseTargetFromProps(this.props,t);return u!==void 0&&!Ia(u)?u:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,i){return this.events[t]||(this.events[t]=new Lv),this.events[t].add(i)}notify(t,...i){this.events[t]&&this.events[t].notify(...i)}scheduleRenderMicrotask(){SS.render(this.render)}}class y7 extends AB{constructor(){super(...arguments),this.KeyframeResolver=MU}sortInstanceNodePosition(t,i){return t.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(t,i){return t.style?t.style[i]:void 0}removeValueFromRenderState(t,{vars:i,style:s}){delete i[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ia(t)&&(this.childSubscription=t.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function v7(n,{style:t,vars:i},s,u){const c=n.style;let f;for(f in t)c[f]=t[f];u?.applyProjectionStyles(c,s);for(f in i)c.setProperty(f,i[f])}function MB(n){return window.getComputedStyle(n)}class NB extends y7{constructor(){super(...arguments),this.type="html",this.renderInstance=v7}readValueFromInstance(t,i){if(Ch.has(i))return this.projection?.isProjecting?uS(i):Zw(t,i);{const s=MB(t),u=(Qb(i)?s.getPropertyValue(i):s[i])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(t,{transformPagePoint:i}){return h7(t,i)}build(t,i,s){xS(t,i,s.transformTemplate)}scrapeMotionValuesFromProps(t,i,s){return NS(t,i,s)}}const S7=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function OB(n,t,i,s){v7(n,t,void 0,s);for(const u in t.attrs)n.setAttribute(S7.has(u)?u:OS(u),t.attrs[u])}class RB extends y7{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fa}getBaseTargetFromProps(t,i){return t[i]}readValueFromInstance(t,i){if(Ch.has(i)){const s=M8(i);return s&&s.default||0}return i=S7.has(i)?i:OS(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,s){return t7(t,i,s)}build(t,i,s){F8(t,i,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,i,s,u){OB(t,i,s,u)}mount(t){this.isSVGTag=I8(t.tagName),super.mount(t)}}const zB=(n,t)=>t.isSVG??AS(n)?new RB(t):new NB(t,{allowProjection:n!==w.Fragment});function Nh(n,t,i){const s=n.getProps();return MS(s,t,i!==void 0?i:s.custom,n)}const BS=n=>Array.isArray(n);function HB(n,t,i){n.hasValue(t)?n.getValue(t).set(i):n.addValue(t,_h(i))}function wB(n){return BS(n)?n[n.length-1]||0:n}function UB(n,t){const i=Nh(n,t);let{transitionEnd:s={},transition:u={},...c}=i||{};c={...c,...s};for(const f in c){const p=wB(c[f]);HB(n,f,p)}}function BB(n){return!!(Ia(n)&&n.add)}function VS(n,t){const i=n.getValue("willChange");if(BB(i))return i.add(t);if(!i&&Yr.WillChange){const s=new Yr.WillChange("auto");n.addValue("willChange",s),s.add(t)}}function b7(n){return n.props[e7]}const VB=n=>n!==null;function GB(n,{repeat:t,repeatType:i="loop"},s){const u=n.filter(VB),c=t&&i!=="loop"&&t%2===1?0:u.length-1;return u[c]}const jB={type:"spring",stiffness:500,damping:25,restSpeed:10},LB=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),PB={type:"keyframes",duration:.8},YB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qB=(n,{keyframes:t})=>t.length>2?PB:Ch.has(n)?n.startsWith("scale")?LB(t[1]):jB:YB;function XB({when:n,delay:t,delayChildren:i,staggerChildren:s,staggerDirection:u,repeat:c,repeatType:f,repeatDelay:p,from:m,elapsed:S,...b}){return!!Object.keys(b).length}const GS=(n,t,i,s={},u,c)=>f=>{const p=gS(s,n)||{},m=p.delay||s.delay||0;let{elapsed:S=0}=s;S=S-fl(m);const b={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...p,delay:-S,onUpdate:x=>{t.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:n,motionValue:t,element:c?void 0:u};XB(p)||Object.assign(b,qB(n,b)),b.duration&&(b.duration=fl(b.duration)),b.repeatDelay&&(b.repeatDelay=fl(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let _=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(mS(b),b.delay===0&&(_=!0)),(Yr.instantAnimations||Yr.skipAnimations)&&(_=!0,mS(b),b.delay=0),b.allowFlatten=!p.type&&!p.ease,_&&!c&&t.get()!==void 0){const x=GB(b.keyframes,p);if(x!==void 0){pn.update(()=>{b.onUpdate(x),b.onComplete()});return}}return p.isSync?new lS(b):new gU(b)};function KB({protectedKeys:n,needsAnimating:t},i){const s=n.hasOwnProperty(i)&&t[i]!==!0;return t[i]=!1,s}function E7(n,t,{delay:i=0,transitionOverride:s,type:u}={}){let{transition:c=n.getDefaultTransition(),transitionEnd:f,...p}=t;s&&(c=s);const m=[],S=u&&n.animationState&&n.animationState.getState()[u];for(const b in p){const _=n.getValue(b,n.latestValues[b]??null),x=p[b];if(x===void 0||S&&KB(S,b))continue;const D={delay:i,...gS(c||{},b)},A=_.get();if(A!==void 0&&!_.isAnimating&&!Array.isArray(x)&&x===A&&!D.velocity)continue;let N=!1;if(window.MotionHandoffAnimation){const O=b7(n);if(O){const U=window.MotionHandoffAnimation(O,b,pn);U!==null&&(D.startTime=U,N=!0)}}VS(n,b),_.start(GS(b,_,x,n.shouldReduceMotion&&C8.has(b)?{type:!1}:D,n,N));const R=_.animation;R&&m.push(R)}return f&&Promise.all(m).then(()=>{pn.update(()=>{f&&UB(n,f)})}),m}function T7(n,t,i,s=0,u=1){const c=Array.from(n).sort((S,b)=>S.sortNodePosition(b)).indexOf(t),f=n.size,p=(f-1)*s;return typeof i=="function"?i(c,f):u===1?c*s:p-c*s}function jS(n,t,i={}){const s=Nh(n,t,i.type==="exit"?n.presenceContext?.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(u=i.transitionOverride);const c=s?()=>Promise.all(E7(n,s,i)):()=>Promise.resolve(),f=n.variantChildren&&n.variantChildren.size?(m=0)=>{const{delayChildren:S=0,staggerChildren:b,staggerDirection:_}=u;return QB(n,t,m,S,b,_,i)}:()=>Promise.resolve(),{when:p}=u;if(p){const[m,S]=p==="beforeChildren"?[c,f]:[f,c];return m().then(()=>S())}else return Promise.all([c(),f(i.delay)])}function QB(n,t,i=0,s=0,u=0,c=1,f){const p=[];for(const m of n.variantChildren)m.notify("AnimationStart",t),p.push(jS(m,t,{...f,delay:i+(typeof s=="function"?0:s)+T7(n.variantChildren,m,s,u,c)}).then(()=>m.notify("AnimationComplete",t)));return Promise.all(p)}function ZB(n,t,i={}){n.notify("AnimationStart",t);let s;if(Array.isArray(t)){const u=t.map(c=>jS(n,c,i));s=Promise.all(u)}else if(typeof t=="string")s=jS(n,t,i);else{const u=typeof t=="function"?Nh(n,t,i.custom):t;s=Promise.all(E7(n,u,i))}return s.then(()=>{n.notify("AnimationComplete",t)})}function C7(n,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==n.length)return!1;for(let s=0;s<i;s++)if(t[s]!==n[s])return!1;return!0}const JB=CS.length;function _7(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?_7(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const t={};for(let i=0;i<JB;i++){const s=CS[i],u=n.props[s];(E0(u)||u===!1)&&(t[s]=u)}return t}const FB=[...TS].reverse(),kB=TS.length;function IB(n){return t=>Promise.all(t.map(({animation:i,options:s})=>ZB(n,i,s)))}function WB(n){let t=IB(n),i=x7(),s=!0;const u=m=>(S,b)=>{const _=Nh(n,b,m==="exit"?n.presenceContext?.custom:void 0);if(_){const{transition:x,transitionEnd:D,...A}=_;S={...S,...A,...D}}return S};function c(m){t=m(n)}function f(m){const{props:S}=n,b=_7(n.parent)||{},_=[],x=new Set;let D={},A=1/0;for(let R=0;R<kB;R++){const O=FB[R],U=i[O],j=S[O]!==void 0?S[O]:b[O],V=E0(j),F=O===m?U.isActive:null;F===!1&&(A=R);let W=j===b[O]&&j!==S[O]&&V;if(W&&s&&n.manuallyAnimateOnMount&&(W=!1),U.protectedKeys={...D},!U.isActive&&F===null||!j&&!U.prevProp||dg(j)||typeof j=="boolean")continue;const st=$B(U.prevProp,j);let $=st||O===m&&U.isActive&&!W&&V||R>A&&V,tt=!1;const et=Array.isArray(j)?j:[j];let Tt=et.reduce(u(O),{});F===!1&&(Tt={});const{prevResolvedValues:it={}}=U,ht={...it,...Tt},dt=J=>{$=!0,x.has(J)&&(tt=!0,x.delete(J)),U.needsAnimating[J]=!0;const K=n.getValue(J);K&&(K.liveStyle=!1)};for(const J in ht){const K=Tt[J],mt=it[J];if(D.hasOwnProperty(J))continue;let pt=!1;BS(K)&&BS(mt)?pt=!C7(K,mt):pt=K!==mt,pt?K!=null?dt(J):x.add(J):K!==void 0&&x.has(J)?dt(J):U.protectedKeys[J]=!0}U.prevProp=j,U.prevResolvedValues=Tt,U.isActive&&(D={...D,...Tt}),s&&n.blockInitialAnimation&&($=!1);const nt=W&&st;$&&(!nt||tt)&&_.push(...et.map(J=>{const K={type:O};if(typeof J=="string"&&s&&!nt&&n.manuallyAnimateOnMount&&n.parent){const{parent:mt}=n,pt=Nh(mt,J);if(mt.enteringChildren&&pt){const{delayChildren:I}=pt.transition||{};K.delay=T7(mt.enteringChildren,n,I)}}return{animation:J,options:K}}))}if(x.size){const R={};if(typeof S.initial!="boolean"){const O=Nh(n,Array.isArray(S.initial)?S.initial[0]:S.initial);O&&O.transition&&(R.transition=O.transition)}x.forEach(O=>{const U=n.getBaseTarget(O),j=n.getValue(O);j&&(j.liveStyle=!0),R[O]=U??null}),_.push({animation:R})}let N=!!_.length;return s&&(S.initial===!1||S.initial===S.animate)&&!n.manuallyAnimateOnMount&&(N=!1),s=!1,N?t(_):Promise.resolve()}function p(m,S){if(i[m].isActive===S)return Promise.resolve();n.variantChildren?.forEach(_=>_.animationState?.setActive(m,S)),i[m].isActive=S;const b=f(m);for(const _ in i)i[_].protectedKeys={};return b}return{animateChanges:f,setActive:p,setAnimateFunction:c,getState:()=>i,reset:()=>{i=x7()}}}function $B(n,t){return typeof t=="string"?t!==n:Array.isArray(t)?!C7(t,n):!1}function Ec(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function x7(){return{animate:Ec(!0),whileInView:Ec(),whileHover:Ec(),whileTap:Ec(),whileDrag:Ec(),whileFocus:Ec(),exit:Ec()}}class $o{constructor(t){this.isMounted=!1,this.node=t}update(){}}class tV extends $o{constructor(t){super(t),t.animationState||(t.animationState=WB(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();dg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:i}=this.node.prevProps||{};t!==i&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let eV=0;class nV extends $o{constructor(){super(...arguments),this.id=eV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const u=this.node.animationState.setActive("exit",!t);i&&!t&&u.then(()=>{i(this.id)})}mount(){const{register:t,onExitComplete:i}=this.node.presenceContext||{};i&&i(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const aV={animation:{Feature:tV},exit:{Feature:nV}};function _0(n,t,i,s={passive:!0}){return n.addEventListener(t,i,s),()=>n.removeEventListener(t,i)}function x0(n){return{point:{x:n.pageX,y:n.pageY}}}const iV=n=>t=>bS(t)&&n(t,x0(t));function D0(n,t,i,s){return _0(n,t,iV(i),s)}const D7=1e-4,sV=1-D7,lV=1+D7,A7=.01,rV=0-A7,oV=0+A7;function pi(n){return n.max-n.min}function uV(n,t,i){return Math.abs(n-t)<=i}function M7(n,t,i,s=.5){n.origin=s,n.originPoint=_n(t.min,t.max,n.origin),n.scale=pi(i)/pi(t),n.translate=_n(i.min,i.max,n.origin)-n.originPoint,(n.scale>=sV&&n.scale<=lV||isNaN(n.scale))&&(n.scale=1),(n.translate>=rV&&n.translate<=oV||isNaN(n.translate))&&(n.translate=0)}function A0(n,t,i,s){M7(n.x,t.x,i.x,s?s.originX:void 0),M7(n.y,t.y,i.y,s?s.originY:void 0)}function N7(n,t,i){n.min=i.min+t.min,n.max=n.min+pi(t)}function cV(n,t,i){N7(n.x,t.x,i.x),N7(n.y,t.y,i.y)}function O7(n,t,i){n.min=t.min-i.min,n.max=n.min+pi(t)}function yg(n,t,i){O7(n.x,t.x,i.x),O7(n.y,t.y,i.y)}function xs(n){return[n("x"),n("y")]}const R7=({current:n})=>n?n.ownerDocument.defaultView:null,z7=(n,t)=>Math.abs(n-t);function fV(n,t){const i=z7(n.x,t.x),s=z7(n.y,t.y);return Math.sqrt(i**2+s**2)}class H7{constructor(t,i,{transformPagePoint:s,contextWindow:u=window,dragSnapToOrigin:c=!1,distanceThreshold:f=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=PS(this.lastMoveEventInfo,this.history),D=this.startEvent!==null,A=fV(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!D&&!A)return;const{point:N}=x,{timestamp:R}=Ua;this.history.push({...N,timestamp:R});const{onStart:O,onMove:U}=this.handlers;D||(O&&O(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),U&&U(this.lastMoveEvent,x)},this.handlePointerMove=(x,D)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=LS(D,this.transformPagePoint),pn.update(this.updatePoint,!0)},this.handlePointerUp=(x,D)=>{this.end();const{onEnd:A,onSessionEnd:N,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=PS(x.type==="pointercancel"?this.lastMoveEventInfo:LS(D,this.transformPagePoint),this.history);this.startEvent&&A&&A(x,O),N&&N(x,O)},!bS(t))return;this.dragSnapToOrigin=c,this.handlers=i,this.transformPagePoint=s,this.distanceThreshold=f,this.contextWindow=u||window;const p=x0(t),m=LS(p,this.transformPagePoint),{point:S}=m,{timestamp:b}=Ua;this.history=[{...S,timestamp:b}];const{onSessionStart:_}=i;_&&_(t,PS(m,this.history)),this.removeListeners=d0(D0(this.contextWindow,"pointermove",this.handlePointerMove),D0(this.contextWindow,"pointerup",this.handlePointerUp),D0(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fo(this.updatePoint)}}function LS(n,t){return t?{point:t(n.point)}:n}function w7(n,t){return{x:n.x-t.x,y:n.y-t.y}}function PS({point:n},t){return{point:n,delta:w7(n,U7(t)),offset:w7(n,hV(t)),velocity:dV(t,.1)}}function hV(n){return n[0]}function U7(n){return n[n.length-1]}function dV(n,t){if(n.length<2)return{x:0,y:0};let i=n.length-1,s=null;const u=U7(n);for(;i>=0&&(s=n[i],!(u.timestamp-s.timestamp>fl(t)));)i--;if(!s)return{x:0,y:0};const c=_s(u.timestamp-s.timestamp);if(c===0)return{x:0,y:0};const f={x:(u.x-s.x)/c,y:(u.y-s.y)/c};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function pV(n,{min:t,max:i},s){return t!==void 0&&n<t?n=s?_n(t,n,s.min):Math.max(n,t):i!==void 0&&n>i&&(n=s?_n(i,n,s.max):Math.min(n,i)),n}function B7(n,t,i){return{min:t!==void 0?n.min+t:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function mV(n,{top:t,left:i,bottom:s,right:u}){return{x:B7(n.x,i,u),y:B7(n.y,t,s)}}function V7(n,t){let i=t.min-n.min,s=t.max-n.max;return t.max-t.min<n.max-n.min&&([i,s]=[s,i]),{min:i,max:s}}function gV(n,t){return{x:V7(n.x,t.x),y:V7(n.y,t.y)}}function yV(n,t){let i=.5;const s=pi(n),u=pi(t);return u>s?i=p0(t.min,t.max-s,n.min):s>u&&(i=p0(n.min,n.max-u,t.min)),Lr(0,1,i)}function vV(n,t){const i={};return t.min!==void 0&&(i.min=t.min-n.min),t.max!==void 0&&(i.max=t.max-n.min),i}const YS=.35;function SV(n=YS){return n===!1?n=0:n===!0&&(n=YS),{x:G7(n,"left","right"),y:G7(n,"top","bottom")}}function G7(n,t,i){return{min:j7(n,t),max:j7(n,i)}}function j7(n,t){return typeof n=="number"?n:n[t]||0}const bV=new WeakMap;class EV{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=fa(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:i=!1,distanceThreshold:s}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const c=_=>{i?(this.stopAnimation(),this.snapToCursor(x0(_).point)):this.pauseAnimation()},f=(_,x)=>{this.stopAnimation();const{drag:D,dragPropagation:A,onDragStart:N}=this.getProps();if(D&&!A&&(this.openDragLock&&this.openDragLock(),this.openDragLock=HU(D),!this.openDragLock))return;this.latestPointerEvent=_,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xs(O=>{let U=this.getAxisMotionValue(O).get()||0;if($l.test(U)){const{projection:j}=this.visualElement;if(j&&j.layout){const V=j.layout.layoutBox[O];V&&(U=pi(V)*(parseFloat(U)/100))}}this.originPoint[O]=U}),N&&pn.postRender(()=>N(_,x)),VS(this.visualElement,"transform");const{animationState:R}=this.visualElement;R&&R.setActive("whileDrag",!0)},p=(_,x)=>{this.latestPointerEvent=_,this.latestPanInfo=x;const{dragPropagation:D,dragDirectionLock:A,onDirectionLock:N,onDrag:R}=this.getProps();if(!D&&!this.openDragLock)return;const{offset:O}=x;if(A&&this.currentDirection===null){this.currentDirection=TV(O),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",x.point,O),this.updateAxis("y",x.point,O),this.visualElement.render(),R&&R(_,x)},m=(_,x)=>{this.latestPointerEvent=_,this.latestPanInfo=x,this.stop(_,x),this.latestPointerEvent=null,this.latestPanInfo=null},S=()=>xs(_=>this.getAnimationState(_)==="paused"&&this.getAxisMotionValue(_).animation?.play()),{dragSnapToOrigin:b}=this.getProps();this.panSession=new H7(t,{onSessionStart:c,onStart:f,onMove:p,onSessionEnd:m,resumeAnimation:S},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:b,distanceThreshold:s,contextWindow:R7(this.visualElement)})}stop(t,i){const s=t||this.latestPointerEvent,u=i||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!u||!s)return;const{velocity:f}=u;this.startAnimation(f);const{onDragEnd:p}=this.getProps();p&&pn.postRender(()=>p(s,u))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(t,i,s){const{drag:u}=this.getProps();if(!s||!vg(t,u,this.currentDirection))return;const c=this.getAxisMotionValue(t);let f=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(f=pV(f,this.constraints[t],this.elastic[t])),c.set(f)}resolveConstraints(){const{dragConstraints:t,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,u=this.constraints;t&&C0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=mV(s.layoutBox,t):this.constraints=!1,this.elastic=SV(i),u!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&xs(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=vV(s.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!C0(t))return!1;const s=t.current;Pr(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const c=CB(s,u.root,this.visualElement.getTransformPagePoint());let f=gV(u.layout.layoutBox,c);if(i){const p=i(bB(f));this.hasMutatedConstraints=!!p,p&&(f=i7(p))}return f}startAnimation(t){const{drag:i,dragMomentum:s,dragElastic:u,dragTransition:c,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},S=xs(b=>{if(!vg(b,i,this.currentDirection))return;let _=m&&m[b]||{};f&&(_={min:0,max:0});const x=u?200:1e6,D=u?40:1e7,A={type:"inertia",velocity:s?t[b]:0,bounceStiffness:x,bounceDamping:D,timeConstant:750,restDelta:1,restSpeed:10,...c,..._};return this.startAxisValueAnimation(b,A)});return Promise.all(S).then(p)}startAxisValueAnimation(t,i){const s=this.getAxisMotionValue(t);return VS(this.visualElement,t),s.start(GS(t,s,0,i,this.visualElement,!1))}stopAnimation(){xs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){xs(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),u=s[i];return u||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){xs(i=>{const{drag:s}=this.getProps();if(!vg(i,s,this.currentDirection))return;const{projection:u}=this.visualElement,c=this.getAxisMotionValue(i);if(u&&u.layout){const{min:f,max:p}=u.layout.layoutBox[i],m=c.get()||0;c.set(t[i]-_n(f,p,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:s}=this.visualElement;if(!C0(i)||!s||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};xs(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const m=p.get();u[f]=yV({min:m,max:m},this.constraints[f])}});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),xs(f=>{if(!vg(f,t,null))return;const p=this.getAxisMotionValue(f),{min:m,max:S}=this.constraints[f];p.set(_n(m,S,u[f]))})}addListeners(){if(!this.visualElement.current)return;bV.set(this.visualElement,this);const t=this.visualElement.current,i=D0(t,"pointerdown",m=>{const{drag:S,dragListener:b=!0}=this.getProps();S&&b&&!B8(m.target)&&this.start(m)}),s=()=>{const{dragConstraints:m}=this.getProps();C0(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,c=u.addEventListener("measure",s);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),pn.read(s);const f=_0(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:S})=>{this.isDragging&&S&&(xs(b=>{const _=this.getAxisMotionValue(b);_&&(this.originPoint[b]+=m[b].translate,_.set(_.get()+m[b].translate))}),this.visualElement.render())}));return()=>{f(),i(),c(),p&&p()}}getProps(){const t=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:s=!1,dragPropagation:u=!1,dragConstraints:c=!1,dragElastic:f=YS,dragMomentum:p=!0}=t;return{...t,drag:i,dragDirectionLock:s,dragPropagation:u,dragConstraints:c,dragElastic:f,dragMomentum:p}}}function vg(n,t,i){return(t===!0||t===n)&&(i===null||i===n)}function TV(n,t=10){let i=null;return Math.abs(n.y)>t?i="y":Math.abs(n.x)>t&&(i="x"),i}class CV extends $o{constructor(t){super(t),this.removeGroupControls=Cs,this.removeListeners=Cs,this.controls=new EV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Cs}update(){const{dragControls:t}=this.node.getProps(),{dragControls:i}=this.node.prevProps||{};t!==i&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const L7=n=>(t,i)=>{n&&pn.postRender(()=>n(t,i))};class _V extends $o{constructor(){super(...arguments),this.removePointerDownListener=Cs}onPointerDown(t){this.session=new H7(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:R7(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:s,onPanEnd:u}=this.node.getProps();return{onSessionStart:L7(t),onStart:L7(i),onMove:s,onEnd:(c,f)=>{delete this.session,u&&pn.postRender(()=>u(c,f))}}}mount(){this.removePointerDownListener=D0(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Sg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let qS=!1;class xV extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s,layoutId:u}=this.props,{projection:c}=t;c&&(i.group&&i.group.add(c),s&&s.register&&u&&s.register(c),qS&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,onExitComplete:()=>this.safeToRemove()})),Sg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,visualElement:s,drag:u,isPresent:c}=this.props,{projection:f}=s;return f&&(f.isPresent=c,qS=!0,u||t.layoutDependency!==i||i===void 0||t.isPresent!==c?f.willUpdate():this.safeToRemove(),t.isPresent!==c&&(c?f.promote():f.relegate()||pn.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),SS.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:s}=this.props,{projection:u}=t;qS=!0,u&&(u.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(u),s&&s.deregister&&s.deregister(u))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function P7(n){const[t,i]=PU(),s=w.useContext(Db);return X.jsx(xV,{...n,layoutGroup:s,switchLayoutGroup:w.useContext(n7),isPresent:t,safeToRemove:i})}function DV(n,t,i){const s=Ia(n)?n:_h(n);return s.start(GS("",s,t,i)),s.animation}const AV=(n,t)=>n.depth-t.depth;class MV{constructor(){this.children=[],this.isDirty=!1}add(t){Bv(this.children,t),this.isDirty=!0}remove(t){Vv(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AV),this.isDirty=!1,this.children.forEach(t)}}function NV(n,t){const i=Oi.now(),s=({timestamp:u})=>{const c=u-i;c>=t&&(Fo(s),n(c-t))};return pn.setup(s,!0),()=>Fo(s)}const Y7=["TopLeft","TopRight","BottomLeft","BottomRight"],OV=Y7.length,q7=n=>typeof n=="string"?parseFloat(n):n,X7=n=>typeof n=="number"||zt.test(n);function RV(n,t,i,s,u,c){u?(n.opacity=_n(0,i.opacity??1,zV(s)),n.opacityExit=_n(t.opacity??1,0,HV(s))):c&&(n.opacity=_n(t.opacity??1,i.opacity??1,s));for(let f=0;f<OV;f++){const p=`border${Y7[f]}Radius`;let m=K7(t,p),S=K7(i,p);if(m===void 0&&S===void 0)continue;m||(m=0),S||(S=0),m===0||S===0||X7(m)===X7(S)?(n[p]=Math.max(_n(q7(m),q7(S),s),0),($l.test(S)||$l.test(m))&&(n[p]+="%")):n[p]=S}(t.rotate||i.rotate)&&(n.rotate=_n(t.rotate||0,i.rotate||0,s))}function K7(n,t){return n[t]!==void 0?n[t]:n.borderRadius}const zV=Q7(0,.5,Gb),HV=Q7(.5,.95,Cs);function Q7(n,t,i){return s=>s<n?0:s>t?1:i(p0(n,t,s))}function Z7(n,t){n.min=t.min,n.max=t.max}function dl(n,t){Z7(n.x,t.x),Z7(n.y,t.y)}function J7(n,t){n.translate=t.translate,n.scale=t.scale,n.originPoint=t.originPoint,n.origin=t.origin}function F7(n,t,i,s,u){return n-=t,n=gg(n,1/i,s),u!==void 0&&(n=gg(n,1/u,s)),n}function wV(n,t=0,i=1,s=.5,u,c=n,f=n){if($l.test(t)&&(t=parseFloat(t),t=_n(f.min,f.max,t/100)-f.min),typeof t!="number")return;let p=_n(c.min,c.max,s);n===c&&(p-=t),n.min=F7(n.min,t,i,p,u),n.max=F7(n.max,t,i,p,u)}function k7(n,t,[i,s,u],c,f){wV(n,t[i],t[s],t[u],t.scale,c,f)}const UV=["x","scaleX","originX"],BV=["y","scaleY","originY"];function I7(n,t,i,s){k7(n.x,t,UV,i?i.x:void 0,s?s.x:void 0),k7(n.y,t,BV,i?i.y:void 0,s?s.y:void 0)}function W7(n){return n.translate===0&&n.scale===1}function $7(n){return W7(n.x)&&W7(n.y)}function t9(n,t){return n.min===t.min&&n.max===t.max}function VV(n,t){return t9(n.x,t.x)&&t9(n.y,t.y)}function e9(n,t){return Math.round(n.min)===Math.round(t.min)&&Math.round(n.max)===Math.round(t.max)}function n9(n,t){return e9(n.x,t.x)&&e9(n.y,t.y)}function a9(n){return pi(n.x)/pi(n.y)}function i9(n,t){return n.translate===t.translate&&n.scale===t.scale&&n.originPoint===t.originPoint}class GV{constructor(){this.members=[]}add(t){Bv(this.members,t),t.scheduleRender()}remove(t){if(Vv(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){const i=this.members.findIndex(u=>t===u);if(i===0)return!1;let s;for(let u=i;u>=0;u--){const c=this.members[u];if(c.isPresent!==!1){s=c;break}}return s?(this.promote(s),!0):!1}promote(t,i){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,i&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:u}=t.options;u===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:i,resumingFrom:s}=t;i.onExitComplete&&i.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jV(n,t,i){let s="";const u=n.x.translate/t.x,c=n.y.translate/t.y,f=i?.z||0;if((u||c||f)&&(s=`translate3d(${u}px, ${c}px, ${f}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),i){const{transformPerspective:S,rotate:b,rotateX:_,rotateY:x,skewX:D,skewY:A}=i;S&&(s=`perspective(${S}px) ${s}`),b&&(s+=`rotate(${b}deg) `),_&&(s+=`rotateX(${_}deg) `),x&&(s+=`rotateY(${x}deg) `),D&&(s+=`skewX(${D}deg) `),A&&(s+=`skewY(${A}deg) `)}const p=n.x.scale*t.x,m=n.y.scale*t.y;return(p!==1||m!==1)&&(s+=`scale(${p}, ${m})`),s||"none"}const XS=["","X","Y","Z"],LV=1e3;let PV=0;function KS(n,t,i,s){const{latestValues:u}=t;u[n]&&(i[n]=u[n],t.setStaticValue(n,0),s&&(s[n]=0))}function s9(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:t}=n.options;if(!t)return;const i=b7(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:u,layoutId:c}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",pn,!(u||c))}const{parent:s}=n;s&&!s.hasCheckedOptimisedAppear&&s9(s)}function l9({attachResizeListener:n,defaultParent:t,measureScroll:i,checkIsScrollRoot:s,resetTransform:u}){return class{constructor(f={},p=t?.()){this.id=PV++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(XV),this.nodes.forEach(JV),this.nodes.forEach(FV),this.nodes.forEach(KV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new MV)}addEventListener(f,p){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Lv),this.eventHandlers.get(f).add(p)}notifyListeners(f,...p){const m=this.eventHandlers.get(f);m&&m.notify(...p)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=j8(f)&&!GU(f),this.instance=f;const{layoutId:p,layout:m,visualElement:S}=this.options;if(S&&!S.current&&S.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||p)&&(this.isLayoutDirty=!0),n){let b,_=0;const x=()=>this.root.updateBlockedByResize=!1;pn.read(()=>{_=window.innerWidth}),n(f,()=>{const D=window.innerWidth;D!==_&&(_=D,this.root.updateBlockedByResize=!0,b&&b(),b=NV(x,250),Sg.hasAnimatedSinceResize&&(Sg.hasAnimatedSinceResize=!1,this.nodes.forEach(u9)))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&S&&(p||m)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeLayoutChanged:x,layout:D})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||S.getDefaultTransition()||tG,{onLayoutAnimationStart:N,onLayoutAnimationComplete:R}=S.getProps(),O=!this.targetLayout||!n9(this.targetLayout,D),U=!_&&x;if(this.options.layoutRoot||this.resumeFrom||U||_&&(O||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const j={...gS(A,"layout"),onPlay:N,onComplete:R};(S.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j),this.setAnimationOrigin(b,U)}else _||u9(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=D})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(kV),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s9(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const _=this.path[b];_.shouldResetTransform=!0,_.updateScroll("snapshot"),_.options.layoutRoot&&_.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const S=this.getTransformTemplate();this.prevTransformTemplateValue=S?S(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(r9);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(o9);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ZV),this.nodes.forEach(YV),this.nodes.forEach(qV)):this.nodes.forEach(o9),this.clearAllSnapshots();const p=Oi.now();Ua.delta=Lr(0,1e3/60,p-Ua.timestamp),Ua.timestamp=p,Ua.isProcessing=!0,Xv.update.process(Ua),Xv.preRender.process(Ua),Xv.render.process(Ua),Ua.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,SS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(QV),this.sharedNodes.forEach(IV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,pn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){pn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pi(this.snapshot.measuredBox.x)&&!pi(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=fa(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(p=!1),p&&this.instance){const m=s(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!$7(this.projectionDelta),m=this.getTransformTemplate(),S=m?m(this.latestValues,""):void 0,b=S!==this.prevTransformTemplateValue;f&&this.instance&&(p||bc(this.latestValues)||b)&&(u(this.instance,S),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return f&&(m=this.removeTransform(m)),eG(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:f}=this.options;if(!f)return fa();const p=f.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(nG))){const{scroll:S}=this.root;S&&(Dh(p.x,S.offset.x),Dh(p.y,S.offset.y))}return p}removeElementScroll(f){const p=fa();if(dl(p,f),this.scroll?.wasRoot)return p;for(let m=0;m<this.path.length;m++){const S=this.path[m],{scroll:b,options:_}=S;S!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&dl(p,f),Dh(p.x,b.offset.x),Dh(p.y,b.offset.y))}return p}applyTransform(f,p=!1){const m=fa();dl(m,f);for(let S=0;S<this.path.length;S++){const b=this.path[S];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&Ah(m,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),bc(b.latestValues)&&Ah(m,b.latestValues)}return bc(this.latestValues)&&Ah(m,this.latestValues),m}removeTransform(f){const p=fa();dl(p,f);for(let m=0;m<this.path.length;m++){const S=this.path[m];if(!S.instance||!bc(S.latestValues))continue;HS(S.latestValues)&&S.updateSnapshot();const b=fa(),_=S.measurePageBox();dl(b,_),I7(p,S.latestValues,S.snapshot?S.snapshot.layoutBox:void 0,b)}return bc(this.latestValues)&&I7(p,this.latestValues),p}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ua.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(f||m&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!this.layout||!(b||_))return;this.resolvedRelativeTargetAt=Ua.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=fa(),this.targetWithTransforms=fa()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),cV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dl(this.target,this.layout.layoutBox),o7(this.target,this.targetDelta)):dl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||HS(this.parent.latestValues)||s7(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,p,m){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=fa(),this.relativeTargetOrigin=fa(),yg(this.relativeTargetOrigin,p,m),dl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const f=this.getLead(),p=!!this.resumingFrom||this!==f;let m=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===Ua.timestamp&&(m=!1),m)return;const{layout:S,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(S||b))return;dl(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,x=this.treeScale.y;TB(this.layoutCorrected,this.treeScale,this.path,p),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=fa());const{target:D}=f;if(!D){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(J7(this.prevProjectionDelta.x,this.projectionDelta.x),J7(this.prevProjectionDelta.y,this.projectionDelta.y)),A0(this.projectionDelta,this.layoutCorrected,D,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==x||!i9(this.projectionDelta.x,this.prevProjectionDelta.x)||!i9(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",D))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){if(this.options.visualElement?.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mh(),this.projectionDelta=Mh(),this.projectionDeltaWithTransform=Mh()}setAnimationOrigin(f,p=!1){const m=this.snapshot,S=m?m.latestValues:{},b={...this.latestValues},_=Mh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=fa(),D=m?m.source:void 0,A=this.layout?this.layout.source:void 0,N=D!==A,R=this.getStack(),O=!R||R.members.length<=1,U=!!(N&&!O&&this.options.crossfade===!0&&!this.path.some($V));this.animationProgress=0;let j;this.mixTargetDelta=V=>{const F=V/1e3;c9(_.x,f.x,F),c9(_.y,f.y,F),this.setTargetDelta(_),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yg(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),WV(this.relativeTarget,this.relativeTargetOrigin,x,F),j&&VV(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=fa()),dl(j,this.relativeTarget)),N&&(this.animationValues=b,RV(b,S,this.latestValues,F,U,O)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Fo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pn.update(()=>{Sg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_h(0)),this.currentAnimation=DV(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),f.onUpdate&&f.onUpdate(p)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(LV),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:m,layout:S,latestValues:b}=f;if(!(!p||!m||!S)){if(this!==f&&this.layout&&S&&m9(this.options.animationType,this.layout.layoutBox,S.layoutBox)){m=this.target||fa();const _=pi(this.layout.layoutBox.x);m.x.min=f.target.x.min,m.x.max=m.x.min+_;const x=pi(this.layout.layoutBox.y);m.y.min=f.target.y.min,m.y.max=m.y.min+x}dl(p,m),Ah(p,b),A0(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new GV),this.sharedNodes.get(f).add(p);const S=p.options.initialPromotionConfig;p.promote({transition:S?S.transition:void 0,preserveFollowOpacity:S&&S.shouldPreserveFollowOpacity?S.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){const{layoutId:f}=this.options;return f?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:f}=this.options;return f?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:m}={}){const S=this.getStack();S&&S.promote(this,m),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:m}=f;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const S={};m.z&&KS("z",f,S,this.animationValues);for(let b=0;b<XS.length;b++)KS(`rotate${XS[b]}`,f,S,this.animationValues),KS(`skew${XS[b]}`,f,S,this.animationValues);f.render();for(const b in S)f.setStaticValue(b,S[b]),this.animationValues&&(this.animationValues[b]=S[b]);f.scheduleRender()}applyProjectionStyles(f,p){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=mg(p?.pointerEvents)||"",f.transform=m?m(this.latestValues,""):"none";return}const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=mg(p?.pointerEvents)||""),this.hasProjected&&!bc(this.latestValues)&&(f.transform=m?m({},""):"none",this.hasProjected=!1);return}f.visibility="";const b=S.animationValues||S.latestValues;this.applyTransformsToTarget();let _=jV(this.projectionDeltaWithTransform,this.treeScale,b);m&&(_=m(b,_)),f.transform=_;const{x,y:D}=this.projectionDelta;f.transformOrigin=`${x.origin*100}% ${D.origin*100}% 0`,S.animationValues?f.opacity=S===this?b.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:f.opacity=S===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const A in _S){if(b[A]===void 0)continue;const{correct:N,applyTo:R,isCSSVariable:O}=_S[A],U=_==="none"?b[A]:N(b[A],S);if(R){const j=R.length;for(let V=0;V<j;V++)f[R[V]]=U}else O?this.options.visualElement.renderState.vars[A]=U:f[A]=U}this.options.layoutId&&(f.pointerEvents=S===this?mg(p?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>f.currentAnimation?.stop()),this.root.nodes.forEach(r9),this.root.sharedNodes.clear()}}}function YV(n){n.updateLayout()}function qV(n){const t=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=n.layout,{animationType:u}=n.options,c=t.source!==n.layout.source;u==="size"?xs(b=>{const _=c?t.measuredBox[b]:t.layoutBox[b],x=pi(_);_.min=i[b].min,_.max=_.min+x}):m9(u,t.layoutBox,i)&&xs(b=>{const _=c?t.measuredBox[b]:t.layoutBox[b],x=pi(i[b]);_.max=_.min+x,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+x)});const f=Mh();A0(f,i,t.layoutBox);const p=Mh();c?A0(p,n.applyTransform(s,!0),t.measuredBox):A0(p,i,t.layoutBox);const m=!$7(f);let S=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:x}=b;if(_&&x){const D=fa();yg(D,t.layoutBox,_.layoutBox);const A=fa();yg(A,i,x.layoutBox),n9(D,A)||(S=!0),b.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=D,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:p,layoutDelta:f,hasLayoutChanged:m,hasRelativeLayoutChanged:S})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function XV(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function KV(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function QV(n){n.clearSnapshot()}function r9(n){n.clearMeasurements()}function o9(n){n.isLayoutDirty=!1}function ZV(n){const{visualElement:t}=n.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),n.resetTransform()}function u9(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function JV(n){n.resolveTargetDelta()}function FV(n){n.calcProjection()}function kV(n){n.resetSkewAndRotation()}function IV(n){n.removeLeadSnapshot()}function c9(n,t,i){n.translate=_n(t.translate,0,i),n.scale=_n(t.scale,1,i),n.origin=t.origin,n.originPoint=t.originPoint}function f9(n,t,i,s){n.min=_n(t.min,i.min,s),n.max=_n(t.max,i.max,s)}function WV(n,t,i,s){f9(n.x,t.x,i.x,s),f9(n.y,t.y,i.y,s)}function $V(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const tG={duration:.45,ease:[.4,0,.1,1]},h9=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),d9=h9("applewebkit/")&&!h9("chrome/")?Math.round:Cs;function p9(n){n.min=d9(n.min),n.max=d9(n.max)}function eG(n){p9(n.x),p9(n.y)}function m9(n,t,i){return n==="position"||n==="preserve-aspect"&&!uV(a9(t),a9(i),.2)}function nG(n){return n!==n.root&&n.scroll?.wasRoot}const aG=l9({attachResizeListener:(n,t)=>_0(n,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),QS={current:void 0},g9=l9({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!QS.current){const n=new aG({});n.mount(window),n.setOptions({layoutScroll:!0}),QS.current=n}return QS.current},resetTransform:(n,t)=>{n.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),iG={pan:{Feature:_V},drag:{Feature:CV,ProjectionNode:g9,MeasureLayout:P7}};function y9(n,t,i){const{props:s}=n;n.animationState&&s.whileHover&&n.animationState.setActive("whileHover",i==="Start");const u="onHover"+i,c=s[u];c&&pn.postRender(()=>c(t,x0(t)))}class sG extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=wU(t,(i,s)=>(y9(this.node,s,"Start"),u=>y9(this.node,u,"End"))))}unmount(){}}class lG extends $o{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=d0(_0(this.node.current,"focus",()=>this.onFocus()),_0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v9(n,t,i){const{props:s}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&s.whileTap&&n.animationState.setActive("whileTap",i==="Start");const u="onTap"+(i==="End"?"":i),c=s[u];c&&pn.postRender(()=>c(t,x0(t)))}class rG extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=VU(t,(i,s)=>(v9(this.node,s,"Start"),(u,{success:c})=>v9(this.node,u,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ZS=new WeakMap,JS=new WeakMap,oG=n=>{const t=ZS.get(n.target);t&&t(n)},uG=n=>{n.forEach(oG)};function cG({root:n,...t}){const i=n||document;JS.has(i)||JS.set(i,{});const s=JS.get(i),u=JSON.stringify(t);return s[u]||(s[u]=new IntersectionObserver(uG,{root:n,...t})),s[u]}function fG(n,t,i){const s=cG(t);return ZS.set(n,i),s.observe(n),()=>{ZS.delete(n),s.unobserve(n)}}const hG={some:0,all:1};class dG extends $o{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:i,margin:s,amount:u="some",once:c}=t,f={root:i?i.current:void 0,rootMargin:s,threshold:typeof u=="number"?u:hG[u]},p=m=>{const{isIntersecting:S}=m;if(this.isInView===S||(this.isInView=S,c&&!S&&this.hasEnteredView))return;S&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",S);const{onViewportEnter:b,onViewportLeave:_}=this.node.getProps(),x=S?b:_;x&&x(m)};return fG(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(pG(t,i))&&this.startObserver()}unmount(){}}function pG({viewport:n={}},{viewport:t={}}={}){return i=>n[i]!==t[i]}const mG={...aV,...{inView:{Feature:dG},tap:{Feature:rG},focus:{Feature:lG},hover:{Feature:sG}},...iG,...{layout:{ProjectionNode:g9,MeasureLayout:P7}}},S9=SB(mG,zB),b9=({visible:n,target:t,appendTo:i=document.body,unmountWhenHidden:s=!1,transitionDuration:u=400,showTransitionOptions:c="easeInOut",hideTransitionOptions:f="linear",approveText:p="DONE",shown:m,hidden:S,isClickedWithin:b,children:_})=>{const[x,D]=w.useState(-1),[A,N]=w.useState(-1),[R,O]=w.useState(n),[U,j]=w.useState(!0),V=w.useRef(100),F=w.useRef(101),W=w.useRef(void 0),st=w.useRef(void 0),$=w.useRef(void 0),tt=w.useRef(!1),et=u/1e3;w.useEffect(()=>{t&&(W.current=xb(t));const vt=bb("zIndex",bt=>bt==="auto"||bt==="-1"?!1:parseInt(bt)>100).map(bt=>parseInt(bt,10));vt.length>0&&(V.current=Math.max(...vt)+1,F.current=Math.max(...vt)+2),j(!1),O(n)},[n,t]);const Tt=vt=>{st.current=vt},it=()=>{N(V.current),D(F.current),tt.current=!0},ht=()=>{if(!st.current)return;m?.();let vt;W.current&&(vt=[W.current]);const bt=jt=>{jt?b?.():(j(!1),O(!1))};$.current=Cb(st.current,bt,vt)},dt=()=>{$.current&&_b($.current)},nt=()=>{N(-1),D(-1),S?.()},H=Z1(()=>{R?it():dt()}),J=Z1(()=>{R?ht():nt(),j(!0)}),K={opacity:.5},mt={opacity:0},pt={opacity:1,pointerEvents:"auto"},I={opacity:0,pointerEvents:"none"};return tt.current&&!R&&s===!0&&U?null:ST.createPortal(X.jsxs("div",{children:[X.jsx(S9.div,{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:A},initial:!1,animate:R?K:mt}),X.jsxs(S9.div,{ref:vt=>{vt&&Tt(vt)},className:"dark:bsc-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:x},initial:!1,animate:R?pt:I,transition:{duration:et,ease:R?c:f},onAnimationStart:H,onAnimationComplete:J,children:[X.jsx("div",{className:"bsc:w-full",children:_}),X.jsx(X.Fragment,{children:X.jsx(kl,{buttonType:"primary",fullWidth:!0,onClick:()=>O(!1),className:"bsc:text-xs bsc:font-bold",children:p})})]})]}),i)};var E9=(n=>(n[n.TopLeft=0]="TopLeft",n[n.TopRight=1]="TopRight",n[n.BottomLeft=2]="BottomLeft",n[n.BottomRight=3]="BottomRight",n))(E9||{}),T9=(n=>(n[n.TopLeft=0]="TopLeft",n[n.TopRight=1]="TopRight",n[n.BottomLeft=2]="BottomLeft",n[n.BottomRight=3]="BottomRight",n))(T9||{});class mn{static positionToTarget(t,i=2){const s=t.getBoundingClientRect();let u=0,c=0;const f=window.scrollY;switch(i){case 2:u=s.top+s.height+f,c=s.left;break;case 0:u=s.top+f,c=s.left;break;case 3:u=s.top+s.height+f,c=s.left+s.width;break;case 1:u=s.top+f,c=s.left+s.width}return{top:u,left:c}}static positionElementToTarget(t,i,s=0,u=2){let{left:c,top:f}=mn.positionToTarget(i,u);const p=t.getBoundingClientRect();switch(s){case 0:break;case 1:c=c-p.width;break;case 2:f=f-p.height;break;case 3:f=f-p.height,c=c-p.width;break}return{top:f,left:c}}static canPositionElementOnScreenWithTarget(t,i){const s=mn.getScreenDimensions(),u=t.getBoundingClientRect(),c=mn.positionElementToTarget(t,i,0,2);if(c.left+u.width<s.width&&c.top+u.height<s.height||mn.positionElementToTarget(t,i,1,3).left>=0&&c.top+u.height<s.height)return!0;const p=mn.positionElementToTarget(t,i,2,0);if(p.left+u.width<s.width&&p.top>=0)return!0;const m=mn.positionElementToTarget(t,i,3,1);return m.left>=0&&m.top>=0}static canPositionElementOnScreen(t){const i=mn.getScreenDimensions(),s=t.getBoundingClientRect();return s.width<=i.width&&s.height<=i.height}static positionElementToTargetOnScreen(t,i,s=0,u=2){const{left:c,top:f}=mn.positionElementToTarget(t,i,s,u),p=t.getBoundingClientRect(),m=mn.determineOffScreenLocation(p);if(m){if(s===0&&u===2){if(m.right&&!m.bottom)return mn.positionElementToTarget(t,i,1,3);if(m.bottom&&!m.right)return mn.positionElementToTarget(t,i,2,0);if(m.right&&m.bottom)return mn.positionElementToTarget(t,i,3,1)}else if(s===1&&u===3){if(m.left&&!m.bottom)return mn.positionElementToTarget(t,i,0,2);if(m.bottom&&!m.left)return mn.positionElementToTarget(t,i,3,1);if(m.left&&m.bottom)return mn.positionElementToTarget(t,i,2,0)}}return{top:f,left:c}}static determineOffScreenLocation(t){const i=mn.getScreenDimensions(),s={left:t.left<0,top:t.top<0,right:t.left+t.width>i.width,bottom:t.top+t.height>i.height};return s.left||s.top||s.right||s.bottom?s:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const C9=({visible:n,target:t,targetPosition:i=E9.BottomLeft,elementAlignment:s=T9.TopLeft,shouldTargetCloseOverlay:u=!0,shouldMatchTargetWidth:c=!1,shouldScrollCloseOverlay:f=!1,shouldCheckZIndex:p=!1,shouldRemainOnScreen:m=!1,unmountWhenHidden:S=!1,transitionDuration:b=400,showTransitionOptions:_="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:D,hidden:A,isClickedWithin:N,markupCreated:R,children:O})=>{const[U,j]=w.useState(-1),[V,F]=w.useState(n),[W,st]=w.useState(!1),$=w.useRef(!1),tt=w.useRef(100),et=w.useRef({left:0,top:0,width:0}),Tt=w.useRef(void 0),it=w.useRef(void 0),ht=w.useRef(void 0),dt=w.useRef(void 0),nt=w.useRef(void 0),H=w.useRef(void 0),J=w.useRef(!1),K=j4();w.useEffect(()=>(m===!0&&(H.current=new ResizeObserver(mt)),()=>{m===!0&&(it.current&&H.current?.unobserve(it.current),H.current?.disconnect())}),[]),w.useEffect(()=>{if(t&&(Tt.current=xb(t),f)){const ze=K?.isValidScrollableElement;ht.current=Sb(Tt.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,ze),ht.current.tagName.toLowerCase()==="html"&&(ht.current=document)}if(p){const ze=bb("zIndex",Wt=>parseInt(Wt)>=100).map(Wt=>parseInt(Wt));ze.length>0&&(tt.current=Math.max(...ze)+1)}n!==void 0&&F(n)},[t,n,f,p]);const mt=ze=>{if(it.current){const Wt=mn.getScreenDimensions(),Bt=ze[ze.length-1].target,Ce=Bt.getBoundingClientRect(),$n=mn.determineOffScreenLocation(Ce);if($n){if(Tt.current&&mn.canPositionElementOnScreenWithTarget(Bt,Tt.current)){const $e=mn.positionElementToTargetOnScreen(it.current,Tt.current,s,i);et.current={...et.current,...$e}}else $n.right?et.current.left=Wt.width-Ce.width:$n.left&&(et.current.left=0),$n.bottom?et.current.top=Wt.height-Ce.height:$n.top&&(et.current.top=0);pt()}}},pt=r0(()=>{$.current=!$.current,st($.current)},20),I=()=>{j(tt.current)},vt=()=>{if(!it.current)return;D?.();let ze;!u&&Tt.current&&(ze=[Tt.current]);const Wt=Bt=>{Bt?N?.():F(!1)};dt.current=Cb(it.current,Wt,ze),f&&(nt.current=fR(Bt=>it.current&&MH(Bt,it.current)&&F(!1),100,{leading:!0}),ht.current&&ht.current.addEventListener("scroll",nt.current)),J.current=!0},bt=()=>{ht.current&&nt.current&&(ht.current.removeEventListener("scroll",nt.current),nt.current=void 0),dt.current&&_b(dt.current)},jt=()=>{j(-1),A?.()},pe=ze=>{if(m===!0&&it.current&&H.current?.unobserve(it.current),it.current=ze,R?.(ze),Tt.current){const Wt=mn.positionElementToTarget(it.current,Tt.current,s,i);et.current={...Wt,width:Tt.current.offsetWidth},m===!0&&(mn.canPositionElementOnScreenWithTarget(it.current,Tt.current)||mn.canPositionElementOnScreen(it.current))&&H.current?.observe(it.current)}},An=Z1(()=>{V?I():bt()}),Se=Z1(()=>{V?vt():jt()}),Qn=w.useMemo(()=>V?{transition:`opacity ${b}ms ${_}`,pointerEvents:"auto",opacity:1}:{transition:`opacity ${b}ms ${x}`,pointerEvents:"none",opacity:0},[V]),We=w.useMemo(()=>{const ze={top:`${et.current.top}px`,left:`${et.current.left}px`,zIndex:U};return c&&(ze.width=`${et.current.width}px`),ze},[W,U,c]);return J.current&&!V&&S===!0?null:X.jsx("div",{onTransitionStart:An,onTransitionEnd:Se,children:X.jsx("div",{className:"bsc:fixed bsc:border! bsc:border-solid! bsc:border-black bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...We,...Qn},ref:ze=>{ze&&pe(ze)},children:O})})};let bg;const gG=new Uint8Array(16);function yG(){if(!bg&&(bg=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bg))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bg(gG)}const Ba=[];for(let n=0;n<256;++n)Ba.push((n+256).toString(16).slice(1));function vG(n,t=0){return Ba[n[t+0]]+Ba[n[t+1]]+Ba[n[t+2]]+Ba[n[t+3]]+"-"+Ba[n[t+4]]+Ba[n[t+5]]+"-"+Ba[n[t+6]]+Ba[n[t+7]]+"-"+Ba[n[t+8]]+Ba[n[t+9]]+"-"+Ba[n[t+10]]+Ba[n[t+11]]+Ba[n[t+12]]+Ba[n[t+13]]+Ba[n[t+14]]+Ba[n[t+15]]}const _9={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function SG(n,t,i){if(_9.randomUUID&&!n)return _9.randomUUID();n=n||{};const s=n.random||(n.rng||yG)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,vG(s)}class M0{static create(t){const i=[];let s=0;for(let u=0,c=t.formatParts.length;u<c;u++){const f=t.formatParts[u],p=s,m=p+f.characterCount;i.push({startPosition:p,endPosition:m,...f}),s=m}return i}}class bG{instanceCollection;formatPartList;inputSlotCollection;currentPartIndex=0;currentPartIndices=[];currentCursorPosition=0;highlightCursorPosition=0;currentCursorStartPosition=-1;currentCursorEndPosition=-1;inputElement;inputSelection=null;inputRange;textNode;constructor(t,i){this.instanceCollection=N0.getInstance(),this.formatPartList=M0.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&this.inputRange?.startOffset===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,i){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let s,u,c=!0;i===void 0?(s=t,u=t):t<i?(s=t,u=i):(c=!1,s=i,u=t),this.inputRange.setStart(this.textNode,s),this.inputRange.setEnd(this.textNode,u),this.currentPartIndices=[],s===u?(this.currentCursorPosition=u,this.highlightCursorPosition=u,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(c?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=u:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==u&&(this.highlightCursorPosition=u):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==u?this.highlightCursorPosition=u:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s),this.currentCursorStartPosition=s,this.currentCursorEndPosition=u,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){const t=window.getSelection(),i=t?.getRangeAt(0);if(this.inputElement&&t&&i){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,p=>{const m=document.createRange();return m.selectNodeContents(p),m.compareBoundaryPoints(Range.END_TO_END,i)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let u=0;for(;s.nextNode();)u+=s.currentNode.textContent?.length||0;i.startContainer.nodeType===Node.TEXT_NODE&&(u+=i.startOffset);const c=this.inputSlotCollection.getLastSlotWithData(),f=c.startPosition+c.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(u>f?f:u):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length;this.setCursorSelection(i)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const t=this.currentCursorPosition-1;let i=this.formatPartList[this.currentPartIndex];if(t>=i.startPosition&&t<=i.endPosition)this.setCursorSelection(t);else for(let s=this.currentPartIndex-1;s>=0;s--)if(i=this.formatPartList[s],t>=i.startPosition&&t<=i.endPosition){i.isSeparator?this.setCursorSelection(this.formatPartList[s-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length;if(this.currentCursorPosition<i&&!this.isSelection){const s=this.currentCursorPosition+1;let u=this.formatPartList[this.currentPartIndex];if(s>=u.startPosition&&s<=u.endPosition)this.setCursorSelection(s);else for(let c=this.currentPartIndex+1,f=this.formatPartList.length;c<f;c++)if(u=this.formatPartList[c],s>=u.startPosition&&s<=u.endPosition){u.isSeparator?this.setCursorSelection(this.formatPartList[c+1].startPosition):this.setCursorSelection(s);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let i=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,s=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,u=this.formatPartList[this.currentPartIndex];if(i>=u.startPosition&&i<=u.endPosition||t&&s>=u.startPosition&&s<=u.endPosition)this.setCursorSelection(i,s);else for(let c=this.currentPartIndex-1;c>=0;c--)if(u=this.formatPartList[c],i>=u.startPosition&&i<=u.endPosition||t&&s>=u.startPosition&&s<=u.endPosition){u.isSeparator?(t?s=this.formatPartList[c-1].endPosition:i=this.formatPartList[c-1].endPosition,this.setCursorSelection(i,s)):this.setCursorSelection(i,s);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),i=t.startPosition+t.partText.length,s=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<i||s){let u=s?this.highlightCursorPosition+1:this.currentCursorStartPosition,c=s?this.currentCursorEndPosition:this.currentCursorEndPosition+1,f=this.formatPartList[this.currentPartIndex];if(c>=f.startPosition&&c<=f.endPosition||s&&u>=f.startPosition&&u<=f.endPosition)this.setCursorSelection(u,c);else for(let p=this.currentPartIndex+1,m=this.formatPartList.length;p<m;p++)if(f=this.formatPartList[p],c>=f.startPosition&&c<=f.endPosition||s&&u>=f.startPosition&&u<=f.endPosition){f.isSeparator?(s?u=this.formatPartList[p+1].startPosition:c=this.formatPartList[p+1].startPosition,this.setCursorSelection(u,c)):this.setCursorSelection(u,c);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const i=this.formatPartList[t];if(this.currentCursorPosition>=i.startPosition&&this.currentCursorPosition<=i.endPosition){if(i.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const i=this.formatPartList[t];if(this.highlightCursorPosition>=i.startPosition&&this.highlightCursorPosition<=i.endPosition){if(i.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,i=this.formatPartList.length;t<i;t++){const s=this.formatPartList[t];s.isSeparator||(s.startPosition>=this.currentCursorStartPosition&&s.startPosition<=this.currentCursorEndPosition||s.endPosition>=this.currentCursorStartPosition&&s.endPosition<=this.currentCursorEndPosition||s.startPosition<this.currentCursorStartPosition&&s.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}createInputRangeSelection(){this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),this.inputSelection?.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),this.inputSelection?.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class EG{static create(t){const i=[];for(let s=0,u=t.length;s<u;s++){const c=t[s];c.isSeparator||i.push({partIndex:s,partText:"",isComplete:!1,...c})}return i}}class TG{inputSlots;constructor(t){this.inputSlots=EG.create(M0.create(t))}clearAllSlots(){for(let t=0,i=this.inputSlots.length;t<i;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(i=>i.partIndex===t)}getSlots(t){return this.inputSlots.filter(i=>t.includes(i.partIndex))}getSlotsFromCursorPosition(t){let i=-1;for(let s=0,u=this.inputSlots.length;s<u;s++){const c=this.inputSlots[s];if(t>=c.startPosition&&t<=c.endPosition){i=c.partIndex;break}}return i>-1?this.inputSlots.filter(s=>s.partIndex>=i):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(t){const i=this.inputSlots.findIndex(s=>s.partIndex===t);if(i>-1&&i+1<this.inputSlots.length)return this.inputSlots[i+1]}getPreviousSlot(t){const i=this.inputSlots.findIndex(s=>s.partIndex===t);if(i>-1&&i-1>=0)return this.inputSlots[i-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(s=>!s.isComplete);let i=t;for(let s=t+1,u=this.inputSlots.length;s<u;s++)this.inputSlots[s].partText.length>0&&(i=s);return this.inputSlots[i>-1?i:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class N0{static instance;static getInstance(){return this.instance||(this.instance=new CG),this.instance}}class CG{navigatorInstances;inputSlotInstances;constructor(){this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,i){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new bG(i,t)),this.navigatorInstances[t]}getInputSlotInstance(t,i){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new TG(i)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class FS{instanceCollection;formatPartList;inputSlotCollection;inputElement;constructor(t,i){this.instanceCollection=N0.getInstance(),this.formatPartList=M0.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t)}setInputElement(t){this.inputElement=t}render(){let t="";for(let i=0,s=this.formatPartList.length;i<s;i++){const u=this.formatPartList[i];if(u.isSeparator)t+=u.inputText;else{const c=this.inputSlotCollection.getSlot(i);c&&(t+=c.partText+c.inputText?.repeat(c.characterCount-c.partText.length))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var tr=(n=>(n[n.Text=0]="Text",n[n.Numeric=1]="Numeric",n))(tr||{});class x9{numberKeys=["0","1","2","3","4","5","6","7","8","9"];movementKeys=["ArrowLeft","ArrowRight","Home","End","a"];editingKeys=["Backspace","Delete"];ignoreKeys=["Shift","Alt","Control","Fn","Meta"];isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class _G{_currentIndex=0;index=0;formatParts;get currentIndex(){return this._currentIndex}constructor(t){this.formatParts=M0.create(t)}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class xG{formatParts;constructor(t){this.formatParts=M0.create(t)}getUniqueSeparators(){const t=[],i=this.formatParts.filter(s=>s.isSeparator);for(let s=0,u=i.length;s<u;s++){const c=i[s];c.inputText&&!t.includes(c.inputText)&&t.push(c.inputText)}return t}}class D9{constructor(t,i){this.format=t,this.instanceCollection=N0.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(i,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(i,t),this.keyTypeChecker=new x9,this.formatRenderer=new FS(t,i),this.formatPartList=new _G(t),this.partEntryList=new xG(t)}instanceCollection;inputSlotCollection;formatNavigator;keyTypeChecker;formatRenderer;formatPartList;partEntryList;setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let i=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(this.formatPartList.peek()?.isSeparator===!0){const u=this.formatPartList.currentIndex,c=this.formatPartList.next();if(c&&c.inputText){const f=t.indexOf(c.inputText,i),p=this.inputSlotCollection.getSlot(u);if(p&&f>-1){const m=f-i>p.characterCount?i+p.characterCount:f;p.partText=t.substring(i,m),this.processSlotRules(p),i=f+c.characterCount}}}else{const u=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);u&&(u.partText=t.substring(i,i+u.characterCount),this.processSlotRules(u))}}}processPastedValue(t,i=!1){i&&this.processSelectionEditRules();const s=this.formatNavigator.getCursorPosition(),u=this.inputSlotCollection.getSlotsFromCursorPosition(s);if(u){const c=s-u[0].startPosition,f=u[0].partText.substring(0,c);let p=u[0].partText.substring(c);u[0].partText="";for(let _=1,x=u.length;_<x;_++)p+=u[_].partText,u[_].partText="";const m=this.removeSeparatorsFromValue(t),S=f+m+p;let b=0;for(let _=0,x=u.length;_<x;_++){const D=u[_];D.partText=S.substring(b,D.characterCount+b),b+=D.characterCount,this.processSlotRules(D)}}}removeSeparatorsFromValue(t){let i=t;const s=this.partEntryList.getUniqueSeparators();for(let u=0,c=s.length;u<c;u++){const f=s[u];i=i.replaceAll(f,"")}return i}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!i)return;const s=this.formatNavigator.getCursorPosition(),u=s-i.startPosition,c=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(i.startPosition===s))i.partText=i.partText.substring(0,u-1)+i.partText.substring(u),c&&this.shiftFormatParts(i),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(i,!0);else{this.processSlotRules(i,!0);const p=this.inputSlotCollection.getPreviousSlot(i.partIndex);p&&(p.partText=p.partText.substring(0,p.partText.length-1),c&&this.shiftFormatParts(p),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(p.startPosition+p.partText.length),this.processSlotRules(p,!0))}break}case"Delete":i.partText=i.partText.substring(0,u)+i.partText.substring(u+1),c&&this.shiftFormatParts(i),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(i,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const i=this.formatNavigator.getCursorStartPosition(),s=this.formatNavigator.getCursorEndPosition();for(let u=0,c=t.length;u<c;u++){const f=t[u];f.startPosition>=i&&f.endPosition<=s?f.partText="":f.startPosition>=i&&f.endPosition>s?f.partText=f.partText.substring(s-f.startPosition):f.startPosition<i&&f.endPosition<=s?f.partText=f.partText.substring(0,i-f.startPosition):f.startPosition<i&&f.endPosition>s&&(f.partText=f.partText.substring(0,i-f.startPosition)+f.partText.substring(s-f.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(i);for(let u=0,c=t.length;u<c;u++)this.processSlotRules(t[u])}shiftFormatParts(t){let i=t,s;for(;(s=this.inputSlotCollection.getNextSlot(i.partIndex))!==void 0;){const u=s.partText.substring(0,1);s.partText=s.partText.substring(1),i.partText=i.partText+u,i=s}}processInputRules(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!i)return;const{key:s}=t,u=i.characterCount,c=i.partText;if(i.valueType===tr.Numeric){if(!this.keyTypeChecker.isNumberKey(s))return;const f=i.maximumValue,p=i.exceedingMaximumValueCausesTab||!1,m=i.padWithZeros||!1,S=parseInt(this.createNewValue(i,s));if(f&&S>f)if(p){m&&(i.partText=i.partText.padStart(u,"0")),i.isComplete=!0;const b=this.inputSlotCollection.getNextSlot(i.partIndex);b&&!b.isComplete&&(b.partText=s),this.formatRenderer.render(),b&&this.formatNavigator.setCursorPosition(b.isComplete?b.startPosition:b.startPosition+1)}else return;else c.length+1===u?(this.addToInputSlot(s),i.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):c.length+1<u&&(this.addToInputSlot(s),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else c.length+1===u?(this.addToInputSlot(s),i.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(s),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const i=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());i&&(i.partText=this.createNewValue(i,t))}createNewValue(t,i){const s=t.partText,u=this.formatNavigator.getCursorPosition();if(u>=t.startPosition+t.partText.length)return s+i;{const c=u-t.startPosition;return s.substring(0,c)+i+s.substring(c)}}processSlotRules(t,i=!1){const s=t.characterCount,u=t.allCharactersRequired||!1;if(t.valueType===tr.Numeric){const c=t.minimumValue,f=t.maximumValue;if(u)t.isComplete=t.partText.length===s;else if(c!==void 0&&f!==void 0){const p=t.padWithZeros||!1,m=parseInt(t.partText);t.isComplete=m>=c&&m<=f,t.isComplete&&p&&!i&&(t.partText=t.partText.padStart(s,"0"))}else t.isComplete=t.partText.length>0}else u?t.isComplete=t.partText.length===s:t.isComplete=t.partText.length>0}}class DG{constructor(t,i){this.format=t,this.instanceCollection=N0.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(i,t),this.ruleProcessor=new D9(t,i),this.keyTypeChecker=new x9,this.formatRenderer=new FS(t,i)}instanceCollection;formatNavigator;ruleProcessor;keyTypeChecker;formatRenderer;setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:i,metaKey:s,ctrlKey:u,shiftKey:c}=t;switch(i){case"ArrowLeft":c?this.formatNavigator.moveHighlightLeft():s?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":c?this.formatNavigator.moveHighlightRight():s?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(s||u)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class AG{constructor(t,i=""){this.inputValue=i,this.instanceId=SG(),this.instanceCollection=N0.getInstance(),this.keyProcessor=new DG(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new FS(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new D9(t,this.instanceId)}instanceId;instanceCollection;keyProcessor;formatNavigator;formatRenderer;inputSlotCollection;inputRuleProcessor;previousOutputValue="";inputElementSet=!1;isInputFocused=!1;inputElement;onFormatChange;inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange()))}}dispose(){this.instanceCollection.removeInstances(this.instanceId)}renderFormat(t=!1){setTimeout(()=>{this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=this.inputElement?.innerHTML),t&&this.inputElement?.innerHTML&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const MG=(n,t)=>{const{value:i="",format:s,readOnly:u=!1,debounceTime:c=800,fillContainer:f=!0,leftElement:p,rightElement:m,className:S,leftElementClassName:b,rightElementClassName:_,isSingleLine:x=!1,allowSingleLineScroll:D=!1,isInputValid:A,onChange:N,onFocus:R,onBlur:O,onElementCreate:U,onLeftElementClick:j,onRightElementClick:V}=n,[F,W]=w.useState(!0),st=w.useRef(void 0),$=w.useRef(void 0),tt=w.useRef(void 0),et=w.useRef(!1);w.useEffect(()=>(document.addEventListener("mouseup",H),()=>{tt.current?.dispose(),document.removeEventListener("mouseup",H)}),[]),w.useEffect(()=>{tt.current?.inputValuePassed(i)},[i]),w.useEffect(()=>{tt.current?.dispose(),s&&(tt.current=new AG(s,i),$.current&&tt.current?.inputElementCreated($.current),tt.current?.registerFormatChangeEvent(Tt))},[s]);const Tt=w.useCallback(vt=>{A?A(vt)?(W(!0),N?.(vt)):W(!1):N?.(vt)},[N]),it=w.useCallback(vt=>{tt.current?.inputFocused(),R?.(vt)},[R]),ht=w.useCallback(vt=>{tt.current?.inputBlurred(),O?.(vt)},[O]),dt=w.useCallback(()=>{et.current=!0},[]),nt=w.useCallback(()=>{if(et.current)et.current=!1,tt.current?.mouseUpHandler();else{const vt=new MouseEvent("mouseup");document.dispatchEvent(vt)}},[]),H=w.useCallback(()=>{et.current&&(et.current=!1,tt.current?.mouseUpHandler())},[]),J=w.useCallback(vt=>{tt.current?.keyDownHandler(vt)},[]),K=w.useCallback(vt=>{vt.preventDefault(),vt.stopPropagation();const bt=vt.clipboardData?.getData("text/plain");bt&&tt.current?.pastedValue(bt)},[]),mt=w.useCallback(vt=>{st.current?.inputElement?.removeEventListener("keydown",J),st.current?.inputElement?.removeEventListener("mousedown",dt),st.current?.inputElement?.removeEventListener("mouseup",nt),st.current?.inputElement?.removeEventListener("paste",K),st.current=vt,st.current?.inputElement?.addEventListener("keydown",J),st.current?.inputElement?.addEventListener("mousedown",dt),st.current?.inputElement?.addEventListener("mouseup",nt),st.current?.inputElement?.addEventListener("paste",K),$.current=st.current?.inputElement},[]),pt=w.useCallback(()=>{st.current?.focus()},[]);w.useImperativeHandle(t,()=>({focus:pt}));const I=ve(S,{"bsc:border-error!":!F});return X.jsx(tg,{ref:vt=>{vt&&mt(vt)},readOnly:u,debounceTime:c,fillContainer:f,leftElement:p,rightElement:m,className:I,leftElementClassName:b,rightElementClassName:_,isSingleLine:x,allowSingleLineScroll:D,onFocus:it,onBlur:ht,onElementCreate:U,onLeftElementClick:j,onRightElementClick:V})},A9=w.forwardRef(MG),kS=w.createContext(void 0);var Pe=(n=>(n[n.DateTime=0]="DateTime",n[n.DateOnly=1]="DateOnly",n[n.TimeOnly=2]="TimeOnly",n[n.DateRange=3]="DateRange",n))(Pe||{}),Ta=(n=>(n[n.DaySelector=0]="DaySelector",n[n.MonthSelector=1]="MonthSelector",n[n.YearSelector=2]="YearSelector",n[n.TimeSelector=3]="TimeSelector",n[n.DateRangeSelector=4]="DateRangeSelector",n))(Ta||{}),Oh=(n=>(n[n.Day=0]="Day",n[n.Month=1]="Month",n[n.Year=2]="Year",n[n.Range=3]="Range",n))(Oh||{}),O0=(n=>(n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n))(O0||{}),Dn=(n=>(n[n.TwelveHour=0]="TwelveHour",n[n.TwentyFourHour=1]="TwentyFourHour",n))(Dn||{}),tu=(n=>(n[n.Normal=0]="Normal",n[n.Range=1]="Range",n))(tu||{}),Eg=(n=>(n[n.Right=0]="Right",n[n.Left=1]="Left",n[n.None=2]="None",n))(Eg||{});function M9(n,t,i=!0){const s=db(n),u=rb(n),c=uz(n);let f=Dv(u)-(t.options?.weekStartsOn||0);f=f===-1?6:f;const p=Dv(c)-(t.options?.weekStartsOn||0),m=vR({start:u,end:c}),S=s+f>35?6:5,b=N9(S,7,{dayValue:null,isCurrent:!0});let _=1;for(let x=0,D=S;x<D;x++){for(let A=x>0?0:f;A<7;A++){const N=m[_-1];if(N.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),b[x][A].dayValue=N,++_>s)break}if(_>s)break}if(f>0&&i)for(let x=0;x<f;x++)b[0][x].dayValue=lH(u,f-x),b[0][x].isCurrent=!1;if(p>-1&&i)for(let x=6;x>p;x--)b[S-1][x].dayValue=gh(c,x-p),b[S-1][x].isCurrent=!1;return b}function N9(n,t,i){const s=[];for(let u=0,c=n;u<c;u++){const f=[];for(let p=0,m=t;p<m;p++){const S=NG(i)?i:{...i};f.push(S)}s.push(f)}return s}function NG(n){const t=typeof n;return t==="string"||t==="number"||t==="boolean"||n instanceof Date}function OG(n){const t=rH(new Date,n.options?.weekStartsOn||0),i=[];for(let s=0;s<7;s++)i.push(gh(t,s).toLocaleDateString(n.code,{weekday:"short"}));return i}function RG(n){const t=new Date(Date.UTC(2020,0,1)),i=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let s=0;for(let u=0;u<3;u++)for(let c=0;c<4;c++)i[u][c]={monthNumber:s,monthName:Zo(t,s++).toLocaleDateString(n.code,{month:"short"})};return i}function zG(n,t){const i=new Date(n.getTime()),s=Math.floor(i.getFullYear()/10)*10;i.setFullYear(s);const u=SR({start:i,end:u0(i,9)}),c=N9(3,4,"");let f=0;for(let p=0;p<3;p++)for(let m=0;m<4&&(c[p][m]=u[f++].toLocaleDateString(t.code,{year:"numeric"}),f!==u.length);m++);return c}function HG(n){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(n.code)}function wG(n,t,i){return n.getTime()>=t.getTime()&&n.getTime()<=i.getTime()}function Tc(n,t){const i=oH(n);if(isNaN(i.valueOf())){let s=Ni(n,"P pp",new Date,{locale:t});return!isNaN(s.valueOf())||(s=Ni(n,"Pp",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Ni(n,"P HH:mm",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Ni(n,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Ni(n,"P HH:mm:ss",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Ni(n,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Ni(n,"P",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Ni(n,"P p",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Ni(n,"pp",new Date,{locale:t}),!isNaN(s.valueOf()))||(s=Ni(n,"p",new Date,{locale:t}),!isNaN(s.valueOf()))||!t&&(s=Ni(n,"HH:mm",new Date),!isNaN(s.valueOf())||(s=Ni(n,"hh:mm a..aaa",new Date),!isNaN(s.valueOf()))||(s=Ni(n,"HH:mm:ss",new Date),!isNaN(s.valueOf()))||(s=Ni(n,"hh:mm:ss a..aaa",new Date),!isNaN(s.valueOf())))?s:void 0}return i}function IS(n,t){const i=n.split("-");if(i.length!==2)return;const s=Tc(i[0].trim(),t);if(!s)return;const u=Tc(i[1].trim(),t);if(u)return[s,u]}function O9(n){return n===Dn.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]}var de=(n=>(n[n.SetDateSelector=0]="SetDateSelector",n[n.SetViewDate=1]="SetViewDate",n[n.SetSelectedDate=2]="SetSelectedDate",n[n.SetSelectedDateRange=3]="SetSelectedDateRange",n[n.SetSelectedStartDate=4]="SetSelectedStartDate",n[n.SetSelectedEndDate=5]="SetSelectedEndDate",n[n.SetTimeFormat=6]="SetTimeFormat",n[n.ClearDates=7]="ClearDates",n[n.InitializeDates=8]="InitializeDates",n))(de||{});const UG=(n,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...n,currentSelector:t.dateSelector,currentViewDate:t.viewDate||n.currentViewDate}:{...n};case 1:return{...n,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...n,selectedDate:t.selectedDate||n.selectedDate,currentViewDate:t.viewDate||n.currentViewDate};case 3:return{...n,selectedStartDate:t.selectedStartDate||n.selectedStartDate,selectedEndDate:t.selectedEndDate||n.selectedEndDate};case 4:return{...n,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...n,selectedEndDate:t.selectedEndDate};case 6:return{...n,timeFormat:t.timeFormat||n.timeFormat};case 7:return{currentSelector:n.currentSelector,currentViewDate:n.currentViewDate,timeFormat:n.timeFormat,dateInitialized:!0};case 8:{const i={...n,currentViewDate:BG(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...i,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...i,selectedDate:t.initialDate}}default:return{...n,currentSelector:Ta.DaySelector}}};function BG(n){return n?Array.isArray(n)?n[0]:n:new Date}const WS=(n,t,i)=>{const s=w.useCallback(m=>{i({type:de.SetViewDate,viewDate:Zo(t,m)})},[t]),u=w.useCallback(m=>{i({type:de.SetViewDate,viewDate:Ov(t,m)})},[t]),c=w.useCallback(m=>{i({type:de.SetViewDate,viewDate:u0(t,m)})},[t]),f=w.useCallback(m=>{i({type:de.SetViewDate,viewDate:Rv(t,m)})},[t]),p=w.useCallback(m=>{i({type:de.SetDateSelector,dateSelector:m})},[]);return{...n,incrementViewMonths:s,decrementViewMonths:u,incrementViewYears:c,decrementViewYears:f,setDateSelector:p}},Tg=({viewDate:n,selectedDate:t,selectedStartDate:i,selectedEndDate:s,selectionMode:u=tu.Normal,locale:c,onDateSelected:f,selectableDate:p,isValidDate:m,dispatcher:S})=>{const[b,_]=w.useState(!1),[x,D]=w.useState(),[A,N]=w.useState(),[R,O]=w.useState(),[U,j]=w.useState(),V=w.useRef(void 0),F=w.useRef(void 0),W=w.useContext(kS),st=w.useMemo(()=>W.calendarTemplate,[W.calendarTemplate]);w.useEffect(()=>{V.current=c,F.current=OG(V.current),_(!0)},[]),w.useEffect(()=>{n&&V.current&&O(M9(n,V.current,u===tu.Normal))},[n,b]),w.useEffect(()=>{j(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),w.useEffect(()=>{D(i?new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0).getTime():void 0),N(s?new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59).getTime():void 0)},[i,s]),w.useEffect(()=>{V.current&&c&&(V.current=c,O(M9(n,V.current,u===tu.Normal)))},[c]);const $=dt=>{if(u===tu.Normal)S?.({type:de.SetSelectedDate,selectedDate:dt,viewDate:dt}),f?.(dt);else{if(!f)throw new Error("Range selection mode requires onDateSelected to be set");!i||cz(dt,i)?f(dt):i&&!s?f(dt,{setEndDate:!0}):i&&s&&f(dt)}},tt=dt=>U?.toLocaleDateString()===dt.toLocaleDateString(),et=dt=>{if(x&&A){const nt=dt.getTime();return nt>=x&&nt<=A}return!1},Tt=WS({viewDate:n,selectedDate:t,selectedStartDate:i,selectedEndDate:s,selectionMode:u,locale:c,weekDays:F.current,monthMatrix:R,selectableDate:p,isValidDate:m,onDateClicked:$,isSelectedDate:tt,isInSelectedDateRange:et},n,S),ht=st||((dt,nt)=>X.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:nt}));return X.jsx(gc,{props:Tt,template:ht,children:X.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[F.current?.map((dt,nt)=>X.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:dt},nt)),R?.map((dt,nt)=>dt.map((H,J)=>{const K=H.dayValue!==null&&(p===void 0||p(H.dayValue)),mt=ve("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!H.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":H&&H.dayValue&&(U&&tt(H.dayValue)||x&&!A&&lb(x,H.dayValue)||x&&A&&et(H.dayValue)),"bsc:cursor-pointer":K,"bsc:text-error bsc:cursor-not-allowed":!K,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":H.dayValue&&sH(H.dayValue)&&!(tt(H.dayValue)||et(H.dayValue))},"bc-dt-date-cell");return X.jsx("div",{className:mt,onClick:()=>H&&H.dayValue&&K&&(m===void 0||m(H.dayValue))&&$(H.dayValue),children:H.dayValue?.getDate().toLocaleString(V.current?.code)},nt.toString()+J.toString())}))]})})},Cg=({title:n,scrollerType:t,onTitleClicked:i,onMovePrevious:s,onMoveNext:u,viewDate:c,dispatcher:f})=>{const m=w.useContext(kS).dateScrollerTemplate,S=WS({title:n,scrollerType:t,onTitleClicked:i,onMovePrevious:s,onMoveNext:u},c,f),b="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1! bsc:hover:text-white! bsc:dark:hover:bg-mono-light-3!",x=m||((D,A)=>X.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:A}));return X.jsxs(gc,{props:S,template:x,children:[X.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:X.jsx(kl,{className:b,onClick:s,children:X.jsx(Ts,{icon:"chevronLeft",size:ka.Regular})})}),X.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",onClick:i,children:n}),X.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:X.jsx(kl,{className:b,onClick:u,children:X.jsx(Ts,{icon:"chevronRight",size:ka.Regular})})})]})},VG=({selectedDate:n,viewDate:t,locale:i,showTimeSelector:s,selectableDate:u,isValidDate:c,onChange:f,dispatcher:p})=>{const m=()=>{t&&p({type:de.SetViewDate,viewDate:Ov(t,1)})},S=()=>{t&&p({type:de.SetViewDate,viewDate:Zo(t,1)})},b=()=>{p({type:de.SetDateSelector,dateSelector:Ta.MonthSelector})},_=()=>{p({type:de.SetDateSelector,dateSelector:Ta.TimeSelector})},x=()=>t?t.toLocaleDateString(i.code,{month:"long",year:"numeric"}):"";return X.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[X.jsx(Cg,{title:x(),scrollerType:Oh.Day,onTitleClicked:b,onMovePrevious:m,onMoveNext:S,viewDate:t,dispatcher:p}),X.jsx(Tg,{viewDate:t,selectedDate:n,locale:i,selectableDate:u,isValidDate:c,onDateSelected:f,dispatcher:p}),s&&X.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:X.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:_,children:n?.toLocaleTimeString(i.code)||HG(i)})})]})},GG=({viewDate:n,locale:t,dateSelection:i=Pe.DateTime,dispatcher:s})=>{const u=w.useRef(RG(t)),c=()=>{const b=Rv(n,1);s({type:de.SetViewDate,viewDate:b})},f=()=>{const b=u0(n,1);s({type:de.SetViewDate,viewDate:b})},p=b=>{s({type:de.SetDateSelector,dateSelector:i!==Pe.DateRange?Ta.DaySelector:Ta.DateRangeSelector,viewDate:_H(n,b)})},m=()=>n.toLocaleDateString(t.code,{year:"numeric"}),S=()=>{s({type:de.SetDateSelector,dateSelector:Ta.YearSelector})};return X.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[X.jsx(Cg,{title:m(),scrollerType:Oh.Month,onTitleClicked:S,onMovePrevious:c,onMoveNext:f,viewDate:n,dispatcher:s}),X.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:u.current.map((b,_)=>b.map((x,D)=>X.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>p(x.monthNumber),children:x.monthName},_.toString()+D.toString())))})]})},jG=({viewDate:n,selectedStartDate:t,selectedEndDate:i,locale:s,onChange:u,dispatcher:c})=>{const f=ag("screen and (max-device-width: 40rem)"),p=Zo(n,1),m=(D,A)=>{!A||!A.setEndDate?c({type:de.SetSelectedStartDate,selectedStartDate:D}):(c({type:de.SetSelectedEndDate,selectedEndDate:D}),t&&u&&u([t,D]))},S=()=>{c({type:de.SetDateSelector,dateSelector:Ta.MonthSelector})},b=()=>f?`${n.toLocaleDateString(s.code,{month:"long"})} ${n.toLocaleDateString(s.code,{year:"numeric"})}`:`${n.toLocaleDateString(s.code,{month:"long"})} ${n.toLocaleDateString(s.code,{year:"numeric"})} - ${p.toLocaleDateString(s.code,{month:"long"})} ${p.toLocaleDateString(s.code,{year:"numeric"})}`,_=()=>{n&&c({type:de.SetViewDate,viewDate:Ov(n,1)})},x=()=>{n&&c({type:de.SetViewDate,viewDate:Zo(n,1)})};return X.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[X.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:X.jsx(Cg,{title:b(),scrollerType:Oh.Range,onTitleClicked:S,onMovePrevious:_,onMoveNext:x,viewDate:n,dispatcher:c})}),X.jsx("div",{className:"bsc-flex-grow",children:X.jsx(Hv,{mobileMarkup:X.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:X.jsx(Tg,{viewDate:n,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})}),aboveMobileMarkup:X.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[X.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:X.jsx(Tg,{viewDate:n,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})}),X.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:X.jsx(Tg,{viewDate:p,selectedStartDate:t,selectedEndDate:i,selectionMode:tu.Range,onDateSelected:m,locale:s,dispatcher:c})})]})})})]})},LG=({viewDate:n,showDateSelector:t,locale:i,timeFormat:s=Dn.TwelveHour,timeConstraints:u,onChange:c,dispatcher:f})=>{const p=w.useRef(s===Dn.TwelveHour?11:23),m=w.useRef(O9(s)),S=w.useRef(AH(0,59,dt=>dt.toString().padStart(2,"0"))),b=w.useRef(["AM","PM"]),_=w.useRef(lR(n)),x=dt=>dt>11?dt-12:dt,[D,A]=w.useState(x(n.getHours())),[N,R]=w.useState(n.getMinutes()),[O,U]=w.useState(n.getHours()<=12?0:1),j=w.useRef(n.toLocaleDateString(i.code));w.useEffect(()=>{const dt=n.getHours(),nt=n.getMinutes();if(dt!==D&&A(s===Dn.TwelveHour?x(dt):dt),nt!==N&&R(nt),s===Dn.TwelveHour){const H=dt<=11?0:1;H!==O&&U(H)}},[n]),w.useEffect(()=>{m.current=O9(s)},[s]);const V=()=>{const dt=u?.hours?.step||1,nt=D<p.current?D+dt:0;A(nt),tt(nt,N,O)},F=()=>{const dt=u?.hours?.step||1,nt=D>0?D-dt:p.current;A(nt),tt(nt,N,O)},W=()=>{const dt=u?.minutes?.step||1,nt=N+dt<(u?.minutes?.max||59)?N+dt:u?.minutes?.min||0;R(nt),tt(D,nt,O)},st=()=>{const dt=u?.minutes?.step||1,nt=N-dt>=(u?.minutes?.min||0)?N-dt:(u?.minutes?.max||60)-dt;R(nt),tt(D,nt,O)},$=()=>{const dt=O===0?1:0;U(dt),tt(D,N,dt)},tt=(dt,nt,H)=>{const J=s===Dn.TwelveHour&&H===1?dt+12:dt;_.current.setHours(J,nt),f({type:de.SetSelectedDate,selectedDate:_.current,viewDate:_.current}),c?.(_.current)},et=()=>{f({type:de.SetDateSelector,dateSelector:Ta.DaySelector})},Tt=ve("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":s===Dn.TwelveHour,"bsc:grid-cols-3":s===Dn.TwentyFourHour}),it=ve("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":s===Dn.TwelveHour,"bsc:col-span-3":s===Dn.TwentyFourHour}),ht="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return X.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:s===Dn.TwelveHour?"15rem":"11rem"},children:X.jsxs("div",{className:Tt,children:[t&&X.jsx("div",{className:it,onClick:et,children:j.current}),X.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(kl,{className:ht,onClick:V,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),X.jsx("div",{}),X.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(kl,{className:ht,onClick:W,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),s===Dn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:X.jsx(kl,{className:ht,onClick:$,children:X.jsx(Ts,{icon:"chevronUp",size:ka.Regular})})}),X.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:m.current[D]}),X.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),X.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:S.current[N]}),s===Dn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:b.current[O]}),X.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(kl,{className:ht,onClick:F,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})}),X.jsx("div",{}),X.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(kl,{className:ht,onClick:st,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})}),s===Dn.TwelveHour&&X.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:X.jsx(kl,{className:ht,onClick:$,children:X.jsx(Ts,{icon:"chevronDown",size:ka.Regular})})})]})})},PG=({viewDate:n,locale:t,dispatcher:i})=>{const s=zG(n,t),u=()=>{const m=Rv(n,10);i({type:de.SetViewDate,viewDate:m})},c=()=>{const m=u0(n,10);i({type:de.SetViewDate,viewDate:m})},f=m=>{const S=parseInt(m);i({type:de.SetDateSelector,dateSelector:Ta.MonthSelector,viewDate:xH(n,S)})},p=()=>`${s[0][0].toString()} - ${s[2][1].toString()}`;return X.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[X.jsx(Cg,{title:p(),scrollerType:Oh.Year,onMovePrevious:u,onMoveNext:c,viewDate:n,dispatcher:i}),X.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:X.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:s.map((m,S)=>m.map((b,_)=>b.length>0?X.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>f(b),children:b},S.toString()+_.toString()):X.jsx("div",{},S.toString()+_.toString())))})})]})};class YG{constructor(t,i,s){this.dateSelection=t;const u=2023,c=12,f=20,m=new Date(u,c-1,f).toLocaleDateString(i,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=m.replace(`${u}`,"YYYY").replace(`${c}`,"MM").replace(`${f}`,"DD");const S=new Date,b=18,_=24,x=37,D=317;S.setHours(b,_,x,D);const A=S.toLocaleTimeString(i),N=A.startsWith("18");this.use24HourTime=s===void 0?N:s===Dn.TwentyFourHour,this.timeFormat=A.replace(`${N?b:"6"}`,"HH").replace(`${_}`,"MM").replace(`${x}`,"SS").replace(`${D}`,"LLL"),this.createDateParts()}dateFormat;timeFormat;use24HourTime;monthPart;dayPart;yearPart;twelveHourPart;twentyFourHourPart;minutePart;meridianPart;get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case Pe.DateOnly:return this.createDateFormat(t);case Pe.TimeOnly:return this.createTimeFormat(t);case Pe.DateRange:return this.createDateRangeFormat(t);case Pe.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const i=[];this.dateFormat.startsWith("MM")?i.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?i.push(...this.createDayMonthYearFormatParts()):i.push(...this.createYearMonthDayFormatParts());const s={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...i,s,...i),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const i={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(i),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),i=t.indexOf("DD"),s=t.substring(0,i);t=t.replace(s,"").replace("DD","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("YYYY"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.monthPart,u,this.dayPart,c,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),i=t.indexOf("MM"),s=t.substring(0,i);t=t.replace(s,"").replace("MM","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("YYYY"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.dayPart,u,this.monthPart,c,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),i=t.indexOf("MM"),s=t.substring(0,i);t=t.replace(s,"").replace("MM","");const u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};i=t.indexOf("DD"),s=t.substring(0,i);const c={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.yearPart,u,this.monthPart,c,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),i=t.indexOf("MM"),s=t.substring(0,i),u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0},c={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,u,this.minutePart,c,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),i=t.indexOf("MM"),s=t.substring(0,i),u={characterCount:s.length,placeholder:s,inputText:s,isSeparator:!0};return[this.twentyFourHourPart,u,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:tr.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:tr.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:tr.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:tr.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:tr.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:tr.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:tr.Text,possibleValues:["AM","PM"]}}}const qG=(n,t,i)=>{const[s,u]=w.useState(),c=w.useRef(void 0);return w.useEffect(()=>{t&&!s&&(c.current=new YG(n,t,i),u(c.current.createInputFormat()))},[t,i]),[s,c.current?.is24HourTime]},XG=({value:n,readOnly:t=!1,label:i,useDefaultDateValue:s=!1,useFormattedInput:u=!1,allowClear:c=!1,closeSelector:f=!1,locale:p,className:m,dateSelection:S=Pe.DateTime,dateFormat:b,timeFormat:_,timeConstraints:x,icon:D,iconPosition:A=Eg.Right,inputElement:N,selectableDate:R,isValidDate:O,onChange:U,onError:j,calendarTemplate:V,dateScrollerTemplate:F,inputTemplate:W,wrapperTemplate:st})=>{const[$,tt]=w.useState(!1),[et,Tt]=w.useState(),[it,ht]=w.useState(),[dt,nt,H]=RD(S),J=w.useRef(void 0),K=w.useRef(!1),mt=w.useRef(p||DH()),pt=w.useRef(void 0),I=w.useRef(void 0),vt=w.useRef(void 0),bt=w.useRef(null),jt=w.useRef(null),[pe,An]=qG(S,et,_),Se=vT.useDateLocale(mt.current),Qn=w.useRef({calendarTemplate:V,dateScrollerTemplate:F});w.useEffect(()=>{Tt(Se.code),pt.current=Se;const Ut=ze();Ce(n||s?{type:de.InitializeDates,initialDate:Array.isArray(Ut)?Ut[0]:Ut}:{type:de.SetViewDate,viewDate:Array.isArray(Ut)?Ut[0]:Ut})},[Se]),w.useEffect(()=>{if(n){const Ut=ze();Ce({type:de.InitializeDates,initialDate:Ut})}else Ce({type:de.ClearDates})},[n,pt.current]),w.useEffect(()=>{An!==void 0&&Ce({type:de.SetTimeFormat,timeFormat:An?Dn.TwentyFourHour:Dn.TwelveHour})},[An]),w.useEffect(()=>{N&&(I.current=N)},[N]),w.useEffect(()=>{Ce({type:de.SetDateSelector,dateSelector:We()})},[dt]);const We=w.useCallback(()=>H.current===Pe.TimeOnly?Ta.TimeSelector:H.current===Pe.DateTime||H.current===Pe.DateOnly?Ta.DaySelector:Ta.DateRangeSelector,[]),ze=()=>{const Ut=new Date;return Ut.setHours(0,0,0,0),n?typeof n=="string"?H.current!==Pe.DateRange?Tc(n,pt.current):IS(n,pt.current):n:Ut},Wt={currentSelector:We(),currentViewDate:new Date,timeFormat:_===void 0?Dn.TwelveHour:_,dateInitialized:!1},[Bt,Ce]=w.useReducer(UG,Wt),$n=()=>{Ht(),tt(!0)},$e=w.useMemo(()=>r0(()=>{tt(!1)},250),[]),Wa=w.useMemo(()=>r0(()=>{$e.cancel()},5),[$e]),tn=Ut=>{const He=Ut.target.innerText;$a(He)},ha=Ut=>{if(Ut){const He=H.current!==Pe.DateRange?H.current===Pe.TimeOnly&&_!==void 0?Tc(Ut):Tc(Ut,pt.current):IS(Ut,pt.current);if(He)if(O){const pl=Array.isArray(He)?He.every(eu=>O(eu)):O(He);return!pl&&j&&j(He),pl}else return!0;else return!1}else return!0},Ds=Ut=>{$a(Ut||"")},$a=Ut=>{const He=H.current!==Pe.DateRange?H.current===Pe.TimeOnly&&_!==void 0?Tc(Ut):Tc(Ut,pt.current):IS(Ut,pt.current);He?(Array.isArray(He)?(wG(He[0],rb(Bt.currentViewDate),yR(Zo(Bt.currentViewDate,1)))||Ce({type:de.SetViewDate,viewDate:He[0]}),Ce({type:de.SetSelectedDateRange,selectedStartDate:He[0],selectedEndDate:He[1]})):Ce({type:de.SetSelectedDate,selectedDate:He,viewDate:He}),U?.(He)):Ut===""&&(Ce({type:de.ClearDates}),U?.())},As=Ut=>{H.current===Pe.DateOnly&&f===!0&&tt(!1),U?.(Ut)},Mn=()=>{Ht(),tt(!$),jt.current?jt.current.focus():bt.current&&bt.current.focus()},gn=()=>{Ce({type:de.ClearDates}),tt(!1),U?.()},mi=(Ut,He)=>{(!I.current||J.current!==He)&&(I.current=Ut,J.current=He,K.current=!0)},Ht=()=>{(!vt.current||K.current)&&I.current&&(vt.current=I.current,ht(I.current),K.current=!1)},De=()=>{tt(!1),Ce({type:de.SetDateSelector,dateSelector:We()})},da=()=>{switch(b){case O0.Short:return"short";case O0.Medium:return"medium";case O0.Long:return"long";default:return}},Va=()=>{const Ut=da();switch(H.current){case Pe.DateTime:return Bt.selectedDate?Ut?Bt.selectedDate.toLocaleString(pt.current?.code,{dateStyle:Ut,timeStyle:Ut}):Bt.selectedDate.toLocaleString(pt.current?.code):"";case Pe.DateOnly:return Bt.selectedDate?Ut?Bt.selectedDate.toLocaleDateString(pt.current?.code,{dateStyle:Ut}):Bt.selectedDate.toLocaleDateString(pt.current?.code):"";case Pe.TimeOnly:return Bt.selectedDate?Ut?Bt.selectedDate.toLocaleTimeString(pt.current?.code,{timeStyle:Ut,hour12:Bt.timeFormat===Dn.TwelveHour,hourCycle:Bt.timeFormat===Dn.TwentyFourHour?"h23":void 0}):Bt.selectedDate.toLocaleTimeString(pt.current?.code,{hour12:Bt.timeFormat===Dn.TwelveHour,hourCycle:Bt.timeFormat===Dn.TwentyFourHour?"h23":void 0}):"";case Pe.DateRange:return Bt.selectedStartDate&&Bt.selectedEndDate?Ut?`${Bt.selectedStartDate.toLocaleDateString(pt.current?.code,{dateStyle:Ut})} - ${Bt.selectedEndDate.toLocaleDateString(pt.current?.code,{dateStyle:Ut})}`:`${Bt.selectedStartDate.toLocaleDateString(pt.current?.code)} - ${Bt.selectedEndDate.toLocaleDateString(pt.current?.code)}`:"";default:return Bt.selectedDate?Ut?Bt.selectedDate.toLocaleString(pt.current?.code,{dateStyle:Ut,timeStyle:Ut}):Bt.selectedDate.toLocaleString(pt.current?.code):""}},Ye=dt===Pe.DateTime||dt===Pe.DateOnly||dt===Pe.DateRange,ta=dt===Pe.DateTime||dt===Pe.TimeOnly,Ms=A===Eg.None?{}:A===Eg.Right?{rightElement:X.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[c&&!t&&X.jsx("div",{children:X.jsx(Ts,{icon:"close",size:ka.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:gn})}),X.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Mn,children:D||X.jsx(Ts,{icon:"calendar",size:ka.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:X.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[X.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Mn,children:D||X.jsx(Ts,{icon:"calendar",size:ka.Small,className:t?void 0:"bsc:cursor-pointer"})}),c&&!t&&X.jsx("div",{children:X.jsx(Ts,{icon:"close",size:ka.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:gn})})]}),leftElementClassName:"bsc:justify-center"},er={setDateSelector:Ut=>nt(Ut)},Ca=st||((Ut,He)=>X.jsx(X.Fragment,{children:He})),qr=()=>X.jsx(gc,{props:er,template:Ca,children:X.jsxs(X.Fragment,{children:[Bt.currentSelector===Ta.DaySelector&&Ye&&Bt.dateInitialized&&pt.current&&X.jsx(VG,{selectedDate:Bt.selectedDate,viewDate:Bt.currentViewDate,locale:pt.current,showTimeSelector:H.current===Pe.DateTime,selectableDate:R,isValidDate:O,dispatcher:Ce,onChange:As}),Bt.currentSelector===Ta.MonthSelector&&Ye&&Bt.dateInitialized&&pt.current&&X.jsx(GG,{viewDate:Bt.currentViewDate,locale:pt.current,dateSelection:H.current,dispatcher:Ce}),Bt.currentSelector===Ta.YearSelector&&Ye&&Bt.dateInitialized&&pt.current&&X.jsx(PG,{viewDate:Bt.currentViewDate,locale:pt.current,dispatcher:Ce}),Bt.currentSelector===Ta.TimeSelector&&ta&&Bt.dateInitialized&&pt.current&&X.jsx(LG,{viewDate:Bt.currentViewDate,showDateSelector:H.current===Pe.DateTime,locale:pt.current,timeFormat:Bt.timeFormat,timeConstraints:x,onChange:U,dispatcher:Ce}),Bt.currentSelector===Ta.DateRangeSelector&&Ye&&Bt.dateInitialized&&pt.current&&X.jsx(jG,{viewDate:Bt.currentViewDate,selectedStartDate:Bt.selectedStartDate,selectedEndDate:Bt.selectedEndDate,locale:pt.current,onChange:U,dispatcher:Ce})]})}),Rh=WS({label:i,readOnly:t,allowClear:c,getValue:Va,onFocus:$n,onInput:tn,iconPosition:A,iconElement:Ms.rightElement||Ms.leftElement},Bt.currentViewDate,Ce),xc=W||((Ut,He)=>X.jsx(X.Fragment,{children:He})),ea=ve("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",m);return X.jsx(kS.Provider,{value:Qn.current,children:X.jsxs("div",{className:"bc-date-time",children:[i&&X.jsx(Vr,{label:i,readOnly:t,className:"bc-dt-label"}),X.jsx(Hv,{mobileMarkup:X.jsxs(X.Fragment,{children:[X.jsx(gc,{props:Rh,template:xc,children:X.jsx(tg,{ref:bt,value:Va(),readOnly:t,inputMode:"none",className:ea,onFocus:$n,onElementCreate:Ut=>mi(Ut,!1),...Ms})}),X.jsx(b9,{visible:$,target:it,hidden:De,unmountWhenHidden:!0,children:qr()})]}),aboveMobileMarkup:X.jsxs(X.Fragment,{children:[X.jsx(gc,{props:Rh,template:xc,children:u===!1?X.jsx(tg,{ref:bt,value:Va(),readOnly:t,className:ea,onFocus:$n,onBlur:$e,onInput:tn,onElementCreate:Ut=>mi(Ut,!1),...Ms}):X.jsx(A9,{ref:jt,value:Va(),readOnly:t,className:ea,format:pe,isInputValid:ha,onFocus:$n,onBlur:$e,onChange:Ds,onElementCreate:Ut=>mi(Ut,!0),...Ms})}),X.jsx(C9,{visible:$,target:it,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:De,isClickedWithin:Wa,unmountWhenHidden:!1,children:qr()})]})})]})})};var $S,R9;function KG(){if(R9)return $S;R9=1;function n(D,A){var N,R;if(typeof A=="function")R=A(D),R!==void 0&&(D=R);else if(Array.isArray(A))for(N=0;N<A.length;N++)R=A[N](D),R!==void 0&&(D=R);return D}function t(D,A){return D[0]==="-"&&Array.isArray(A)&&/^-\d+$/.test(D)?A.length+parseInt(D,10):D}function i(D){return/^\d+$/.test(D)}function s(D){return Object.prototype.toString.call(D)==="[object Object]"}function u(D){return Object(D)===D}function c(D){return Object.keys(D).length===0}var f=["__proto__","prototype","constructor"],p=function(D){return f.indexOf(D)===-1};function m(D,A){D.indexOf("[")>=0&&(D=D.replace(/\[/g,A).replace(/]/g,""));var N=D.split(A),R=N.filter(p);if(R.length!==N.length)throw Error("Refusing to update blacklisted property "+D);return N}var S=Object.prototype.hasOwnProperty;function b(D,A,N,R){if(!(this instanceof b))return new b(D,A,N,R);typeof A>"u"&&(A=!1),typeof N>"u"&&(N=!0),typeof R>"u"&&(R=!0),this.separator=D||".",this.override=A,this.useArray=N,this.useBrackets=R,this.keepArray=!1,this.cleanup=[]}var _=new b(".",!1,!0,!0);function x(D){return function(){return _[D].apply(_,arguments)}}return b.prototype._fill=function(D,A,N,R){var O=D.shift();if(D.length>0){if(A[O]=A[O]||(this.useArray&&i(D[0])?[]:{}),!u(A[O]))if(this.override)A[O]={};else{if(!(u(N)&&c(N)))throw new Error("Trying to redefine `"+O+"` which is a "+typeof A[O]);return}this._fill(D,A[O],N,R)}else{if(!this.override&&u(A[O])&&!c(A[O])){if(!(u(N)&&c(N)))throw new Error("Trying to redefine non-empty obj['"+O+"']");return}A[O]=n(N,R)}},b.prototype.object=function(D,A){var N=this;return Object.keys(D).forEach(function(R){var O=A===void 0?null:A[R],U=m(R,N.separator).join(N.separator);U.indexOf(N.separator)!==-1?(N._fill(U.split(N.separator),D,D[R],O),delete D[R]):D[R]=n(D[R],O)}),D},b.prototype.str=function(D,A,N,R){var O=m(D,this.separator).join(this.separator);return D.indexOf(this.separator)!==-1?this._fill(O.split(this.separator),N,A,R):N[D]=n(A,R),N},b.prototype.pick=function(D,A,N,R){var O,U,j,V,F;for(U=m(D,this.separator),O=0;O<U.length;O++)if(V=t(U[O],A),A&&typeof A=="object"&&V in A){if(O===U.length-1)return N?(j=A[V],R&&Array.isArray(A)?A.splice(V,1):delete A[V],Array.isArray(A)&&(F=U.slice(0,-1).join("."),this.cleanup.indexOf(F)===-1&&this.cleanup.push(F)),j):A[V];A=A[V]}else return;return N&&Array.isArray(A)&&(A=A.filter(function(W){return W!==void 0})),A},b.prototype.delete=function(D,A){return this.remove(D,A,!0)},b.prototype.remove=function(D,A,N){var R;if(this.cleanup=[],Array.isArray(D)){for(R=0;R<D.length;R++)this.pick(D[R],A,!0,N);return N||this._cleanup(A),A}else return this.pick(D,A,!0,N)},b.prototype._cleanup=function(D){var A,N,R,O;if(this.cleanup.length){for(N=0;N<this.cleanup.length;N++)R=this.cleanup[N].split("."),O=R.splice(0,-1).join("."),A=O?this.pick(O,D):D,A=A[R[0]].filter(function(U){return U!==void 0}),this.set(this.cleanup[N],A,D);this.cleanup=[]}},b.prototype.del=b.prototype.remove,b.prototype.move=function(D,A,N,R,O){return typeof R=="function"||Array.isArray(R)?this.set(A,n(this.pick(D,N,!0),R),N,O):(O=R,this.set(A,this.pick(D,N,!0),N,O)),N},b.prototype.transfer=function(D,A,N,R,O,U){return typeof O=="function"||Array.isArray(O)?this.set(A,n(this.pick(D,N,!0),O),R,U):(U=O,this.set(A,this.pick(D,N,!0),R,U)),R},b.prototype.copy=function(D,A,N,R,O,U){return typeof O=="function"||Array.isArray(O)?this.set(A,n(JSON.parse(JSON.stringify(this.pick(D,N,!1))),O),R,U):(U=O,this.set(A,this.pick(D,N,!1),R,U)),R},b.prototype.set=function(D,A,N,R){var O,U,j,V;if(typeof A>"u")return N;for(j=m(D,this.separator),O=0;O<j.length;O++){if(V=j[O],O===j.length-1)if(R&&s(A)&&s(N[V]))for(U in A)S.call(A,U)&&(N[V][U]=A[U]);else if(R&&Array.isArray(N[V])&&Array.isArray(A))for(var F=0;F<A.length;F++)N[j[O]].push(A[F]);else N[V]=A;else(!S.call(N,V)||!s(N[V])&&!Array.isArray(N[V]))&&(/^\d+$/.test(j[O+1])?N[V]=[]:N[V]={});N=N[V]}return N},b.prototype.transform=function(D,A,N){return A=A||{},N=N||{},Object.keys(D).forEach((function(R){this.set(D[R],this.pick(R,A),N)}).bind(this)),N},b.prototype.dot=function(D,A,N){A=A||{},N=N||[];var R=Array.isArray(D);return Object.keys(D).forEach((function(O){var U=R&&this.useBrackets?"["+O+"]":O;if(u(D[O])&&(s(D[O])&&!c(D[O])||Array.isArray(D[O])&&!this.keepArray&&D[O].length!==0))if(R&&this.useBrackets){var j=N[N.length-1]||"";return this.dot(D[O],A,N.slice(0,-1).concat(j+U))}else return this.dot(D[O],A,N.concat(U));else R&&this.useBrackets?A[N.join(this.separator).concat("["+O+"]")]=D[O]:A[N.concat(U).join(this.separator)]=D[O]}).bind(this)),A},b.pick=x("pick"),b.move=x("move"),b.transfer=x("transfer"),b.transform=x("transform"),b.copy=x("copy"),b.object=x("object"),b.str=x("str"),b.set=x("set"),b.delete=x("delete"),b.del=b.remove=x("remove"),b.dot=x("dot"),["override","overwrite"].forEach(function(D){Object.defineProperty(b,D,{get:function(){return _.override},set:function(A){_.override=!!A}})}),["useArray","keepArray","useBrackets"].forEach(function(D){Object.defineProperty(b,D,{get:function(){return _[D]},set:function(A){_[D]=A}})}),b._process=n,$S=b,$S}var QG=KG();const z9=X2(QG),ZG=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,orientation:p=Za.Horizontal,isMultiSelect:m=!1,className:S,onChange:b,itemTemplate:_})=>{const[x,D]=w.useState(),[A,N]=w.useState([]),R=tv(()=>s,[s]),O=w.useId();w.useEffect(()=>{if(m){const it=Array.isArray(i)?i.map(ht=>ht.toString()):i?[String(i)]:void 0;N(it??[])}else i&&D(i.toString())},[i]);const U=it=>m?A.findIndex(ht=>ht===it)>-1:x===it,j=it=>{const ht=it.toString();if(m){const dt=U(ht);let nt;dt?nt=A.filter(H=>H!=ht):nt=[...A,ht],N(nt),b?.({name:n,value:nt})}else ht!==x&&(D(ht),b?.({name:n,value:ht}))},V=it=>{Array.isArray(it?.value)?N(it?.value??[]):D(it?.value),b?.(it)},F=Wp(ih.FocusWithin),W=w.useCallback((it,ht)=>X.jsx(X.Fragment,{children:ht}),[]),st=_||W,$=(it,ht,dt)=>{const nt=`element_${O}_${ht}`,H=z9.pick(u,it),J=String(z9.pick(c,it)),K=ht===0,mt=ht===dt.length-1,pt=ve("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-data-checked:bg-primary-1 bsc:dark:has-data-checked:bg-mono-light-1 bsc:has-data-checked:text-white bsc:dark:has-data-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!f,"bc-read-only bsc:has-data-checked:bg-primary-4 bsc:dark:has-data-checked:bg-mono-light-3 bsc:has-data-checked:text-gray-5 bsc:dark:has-data-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":f,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":K&&p===Za.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":mt&&p===Za.Horizontal,"bsc:border-t bsc:border-b":!K&&!mt&&p===Za.Horizontal,"bsc:border-l":!K&&p===Za.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":K&&p===Za.Vertical,"bsc:border bsc:rounded-b-md":mt&&p===Za.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!K&&!mt&&p===Za.Vertical},F),I={itemId:nt,selectedValue:m?A:x,itemText:H,itemValue:J,itemData:it,itemStyles:pt,isSelected:U(J),isFirstItem:K,isLastItem:mt,onItemChanged:j};return m?X.jsx(gc,{props:I,template:st,children:X.jsx(uh,{className:pt,children:X.jsx(c6,{value:J,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:H})})},nt):X.jsx(gc,{props:I,template:st,children:X.jsx(uh,{className:pt,children:X.jsx(y6,{value:J,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:H})})},nt)},tt=ve("bsc:flex bsc:flex-col bsc:gap-2",S),et=ve("bsc:flex",{"bsc:flex-col bsc:w-max":p===Za.Vertical}),Tt=it=>m?X.jsx(d6,{name:n,value:A,readOnly:f,onChange:V,className:et,children:it.map($)}):X.jsx(g6,{name:n,value:x,readOnly:f,onChange:V,className:et,children:it.map($)});return X.jsxs(uh,{className:tt,children:[t&&X.jsx(Vr,{label:t,readOnly:f}),R&&Tt(R)]})},JG=w.memo(ZG),FG=({name:n,label:t,value:i,data:s,textField:u,valueField:c,readOnly:f=!1,labelLocation:p=Es.Right,orientation:m=Za.Vertical,className:S,useAnimation:b,onChange:_})=>{const x=tv(()=>s,[s]),D=w.useId(),A=hv(b),N=Wp(ih.FocusWithin),R=ve("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",S),O=ve("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":m===Za.Vertical,"bsc:*:pr-2":m===Za.Horizontal}),U=ve("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":f}),j=ve("bc-radio-item bsc:group bsc:relative bsc:*:size-[21px] bsc:rounded-full",{"bsc:ml-2":p===Es.Left,"bsc:mr-2":p===Es.Right,"bc-read-only":f},N),V=ve("bc-radio-item-svg bsc:stroke-2 bsc:fill-none bsc:rounded-full bsc:stroke-gray-1 bsc:dark:stroke-mono-light-2 bsc:group-data-read-only:stroke-gray-4 bsc:dark:group-data-read-only:stroke-mono-light-3"),F=ve("bsc:group-data-checked:fill-primary-1 bsc:dark:group-data-checked:fill-mono-light-2 bsc:group-data-checked:group-data-read-only:fill-primary-4 bsc:dark:group-data-checked:group-data-read-only:fill-mono-light-3",{"bsc:group-data-checked:animate-bounce":!f&&A}),W=ve("bsc:invisible bsc:group-data-checked:visible bsc:group-data-checked:fill-white bsc:dark:group-data-checked:fill-mono-dark-1",{"bsc:group-data-checked:animate-bounce":!f&&A}),st=($,tt)=>{const et=$[u],Tt=$[c];return X.jsxs(uh,{className:U,children:[p===Es.Left&&X.jsx(Vr,{label:et,readOnly:f}),X.jsx(y6,{value:Tt,className:j,children:X.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:V,children:[X.jsx("circle",{cx:15,cy:15,r:15,className:F}),X.jsx("circle",{cx:"50%",cy:"50%",r:7,className:W})]})}),p===Es.Right&&X.jsx(Vr,{label:et,readOnly:f})]},`radio_${D}_item${tt}`)};return X.jsxs("div",{className:R,children:[t&&X.jsx(Vr,{label:t,readOnly:f}),X.jsx(g6,{name:n,value:i,readOnly:f,onChange:_,className:O,children:x&&x.map(st)})]})},kG=w.memo(FG),IG=({name:n,label:t,value:i,checked:s=!1,readOnly:u=!1,useAnimation:c,className:f,onChange:p})=>{const m=hv(c),S=ve("bc-toggle-wrapper bsc:flex bsc:flex-col",f),b=Wp(ih.FocusWithin),_=ve("bc-toggle-container bsc:group bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!u,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":u},b),x=ve("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:group-data-toggled:translate-x-[35px] bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!u,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":u,"bsc:[transition:0.3s]":!u&&m});return X.jsxs(uh,{className:S,children:[t&&X.jsx(Vr,{label:t,readOnly:u}),X.jsx(EA,{name:n,value:i,toggled:s,onChange:p,className:_,children:X.jsx("div",{className:x})})]})},WG=w.memo(IG);te.AvatarEditor=HD,te.BeeSoftProvider=wD,te.Button=kl,te.Checkbox=v6,te.CheckboxGroup=_A,te.ContentEditableInput=tg,te.DateFormatType=O0,te.DateScrollerType=Oh,te.DateSelectionType=Pe,te.DateTime=XG,te.FormGroupItemOrientation=Za,te.FormattedInput=A9,te.GroupButton=JG,te.MediaQuery=Hv,te.MobileOverlayPanel=b9,te.OverlayPanel=C9,te.RadioButton=kG,te.SelectionLabelLocation=Es,te.Toggle=WG,te.applyBeeSoftTheme=zH,te.createBeeSoftTheme=HH,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})}));