beesoft-components 0.11.0 → 0.12.0
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/beesoft-components.css +1 -1
- package/dist/beesoft-components.css.gz +0 -0
- package/dist/index.es.js +37940 -7621
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +230 -8
- package/dist/index.umd.js.gz +0 -0
- package/package.json +4 -2
- package/types/index.d.ts +61 -4
package/dist/index.umd.js
CHANGED
|
@@ -1,12 +1,234 @@
|
|
|
1
|
-
(function(
|
|
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.
|
|
2
|
+
|
|
3
|
+
Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined.
|
|
4
|
+
|
|
5
|
+
To use Konva.js in Node.js environment, you need to use the "canvas-backend" or "skia-backend" module.
|
|
6
|
+
|
|
7
|
+
bash: npm install canvas
|
|
8
|
+
js: import "konva/canvas-backend";
|
|
9
|
+
|
|
10
|
+
or
|
|
11
|
+
|
|
12
|
+
bash: npm install skia-canvas
|
|
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 Me={get isDragging(){let n=!1;return Me._dragElements.forEach(t=>{t.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return Me._dragElements.forEach(t=>{n=t.node}),n},_dragElements:new Map,_drag(n){const t=[];Me._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=[];Me._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")&&(Me.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){Me._dragElements.forEach((t,i)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:n},!0),t.dragStatus!=="dragging"&&Me._dragElements.delete(i)})}};Ot.isBrowser&&(window.addEventListener("mouseup",Me._endDragBefore,!0),window.addEventListener("touchend",Me._endDragBefore,!0),window.addEventListener("touchcancel",Me._endDragBefore,!0),window.addEventListener("mousemove",Me._drag),window.addEventListener("touchmove",Me._drag),window.addEventListener("mouseup",Me._endDragAfter,!1),window.addEventListener("touchend",Me._endDragAfter,!1),window.addEventListener("touchcancel",Me._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(),Me._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;Me._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;Me._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){Me._dragElements.has(this._id)||this._createDragElement(t);const s=Me._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=Me._dragElements.get(this._id);i&&(i.dragStatus="stopped"),Me._endDragBefore(t),Me._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=Me._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;Me._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=Me._dragElements.get(this._id),s=i&&i.dragStatus==="dragging",u=i&&i.dragStatus==="ready";s?this.stopDrag():u&&Me._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(Me.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()&&Me.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"])):Me.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:Me,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,J,W,st,I,et,nt,bt,rt,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":J=p,W=m,V=c[c.length-1],V.command==="C"&&(J=p+(p-V.points[2]),W=m+(m-V.points[3])),O.push(J,W,A.shift(),A.shift()),p=A.shift(),m=A.shift(),R="C",O.push(p,m);break;case"s":J=p,W=m,V=c[c.length-1],V.command==="C"&&(J=p+(p-V.points[2]),W=m+(m-V.points[3])),O.push(J,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":J=p,W=m,V=c[c.length-1],V.command==="Q"&&(J=p+(p-V.points[0]),W=m+(m-V.points[1])),p=A.shift(),m=A.shift(),R="Q",O.push(J,W,p,m);break;case"t":J=p,W=m,V=c[c.length-1],V.command==="Q"&&(J=p+(p-V.points[0]),W=m+(m-V.points[1])),p+=A.shift(),m+=A.shift(),R="Q",O.push(J,W,p,m);break;case"A":st=A.shift(),I=A.shift(),et=A.shift(),nt=A.shift(),bt=A.shift(),rt=p,dt=m,p=A.shift(),m=A.shift(),R="A",O=this.convertEndpointToCenterParameterization(rt,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(),rt=p,dt=m,p+=A.shift(),m+=A.shift(),R="A",O=this.convertEndpointToCenterParameterization(rt,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))},J=function(nt,bt){return(nt[0]*bt[1]<nt[1]*bt[0]?-1:1)*Math.acos(V(nt,bt))},W=J([1,0],[(_-N)/p,(x-R)/m]),st=[(_-N)/p,(x-R)/m],I=[(-1*_-N)/p,(-1*x-R)/m];let et=J(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,W,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 J=m/2,W=t4;if(!Ot.legacyTextRendering){const st=this.measureSize("M");W="alphabetic";const I=(i=st.fontBoundingBoxAscent)!==null&&i!==void 0?i:st.actualBoundingBoxAscent,et=(s=st.fontBoundingBoxDescent)!==null&&s!==void 0?s:st.actualBoundingBoxDescent;J=(I-et)/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===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,rt=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=J+I+pt;t.moveTo(tt,w);const F=x===Jp&&!rt?D-f*2:bt;t.lineTo(tt+Math.round(F),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 F=tt[w];if(F===" "&&!rt&&x===Jp&&(st+=(D-f*2-bt)/pt),this._partialTextX=st,this._partialTextY=J+I,this._partialText=F,N){t.save();const at=u.slice(0,V).reduce(($,gt)=>$+qo(gt.text).length,0),St=w+at;N({char:F,index:St,x:st,y:J+I,lineIndex:V,column:w,isLastInLine:rt,width:this.measureSize(F).width,context:t})}t.fillStrokeShape(this),N&&t.restore(),st+=this.measureSize(F).width+A}}else A!==0&&t.setAttr("letterSpacing",`${A}px`),this._partialTextX=st,this._partialTextY=J+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,J+I+pt);const w=x===Jp&&!rt?D-f*2:bt;t.lineTo(tt+Math.round(w),J+I+pt),t.lineWidth=p/15;const F=this._getLinearGradient();t.strokeStyle=F||R,t.stroke(),t.restore()}t.restore(),c>1&&(J+=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],J=this._getTextWidth(V);if(p&&J>b)for(;V.length>0;){let W=0,st=qo(V).length,I="",et=0;for(;W<st;){const nt=W+st>>>1,bt=qo(V),rt=bt.slice(0,nt+1).join(""),dt=this._getTextWidth(rt);(R&&m&&x+u>_?dt+O:dt)<=b?(W=nt+1,I=rt,et=dt):st=nt}if(I){if(N){const rt=qo(V),dt=qo(I),pt=rt[dt.length],tt=pt===w1||pt===W5;let w;if(tt&&et<=b)w=dt.length;else{const F=dt.lastIndexOf(w1),K=dt.lastIndexOf(W5);w=Math.max(F,K)+1}w>0&&(W=w,I=rt.slice(0,W).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(W).join("").trimLeft(),V.length>0&&(J=this._getTextWidth(V),J<=b)){this._addTextLine(V),x+=u,s=Math.max(s,J);break}}else break}else this._addTextLine(V),x+=u,s=Math.max(s,J),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 J=Ot.getAngle(this.rotation())+j,W=Ot.getAngle(this.rotationSnapTolerance()),I=u_(this.rotationSnaps(),J,W)-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(),J=U.y(),W=this.getWidth()-j.x(),st=this.getHeight()-j.y();j.move({x:-V,y:-J}),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: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,J,W,st,I;const et=t+t+1,nt=s-1,bt=u-1,rt=t+1,dt=rt*(rt+1)/2,pt=new f4,tt=f_[t],w=h_[t];let F=null,K=pt,at=null,St=null;for(let $=1;$<et;$++)K=K.next=new f4,$===rt&&(F=K);K.next=pt,p=f=0;for(let $=0;$<u;$++){R=O=U=j=m=S=b=_=0,x=rt*(V=i[f]),D=rt*(J=i[f+1]),A=rt*(W=i[f+2]),N=rt*(st=i[f+3]),m+=dt*V,S+=dt*J,b+=dt*W,_+=dt*st,K=pt;for(let gt=0;gt<rt;gt++)K.r=V,K.g=J,K.b=W,K.a=st,K=K.next;for(let gt=1;gt<rt;gt++)c=f+((nt<gt?nt:gt)<<2),m+=(K.r=V=i[c])*(I=rt-gt),S+=(K.g=J=i[c+1])*I,b+=(K.b=W=i[c+2])*I,_+=(K.a=st=i[c+3])*I,R+=V,O+=J,U+=W,j+=st,K=K.next;at=pt,St=F;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+=J=St.g,A+=W=St.b,N+=st=St.a,R-=V,O-=J,U-=W,j-=st,St=St.next,f+=4;p+=s}for(let $=0;$<s;$++){O=U=j=R=S=b=_=m=0,f=$<<2,x=rt*(V=i[f]),D=rt*(J=i[f+1]),A=rt*(W=i[f+2]),N=rt*(st=i[f+3]),m+=dt*V,S+=dt*J,b+=dt*W,_+=dt*st,K=pt;for(let Tt=0;Tt<rt;Tt++)K.r=V,K.g=J,K.b=W,K.a=st,K=K.next;let gt=s;for(let Tt=1;Tt<=t;Tt++)f=gt+$<<2,m+=(K.r=V=i[f])*(I=rt-Tt),S+=(K.g=J=i[f+1])*I,b+=(K.b=W=i[f+2])*I,_+=(K.a=st=i[f+3])*I,R+=V,O+=J,U+=W,j+=st,K=K.next,Tt<bt&&(gt+=s);f=$,at=pt,St=F;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=$+((c=Tt+rt)<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+=J=St.g,A+=W=St.b,N+=st=St.a,R-=V,O-=J,U-=W,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,J=Math.cos(V),W=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],rt=[-_-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 F=0,K=0;F+=et[w+rt[0]]*nt[0],K+=et[w+rt[0]]*bt[0],F+=et[w+rt[1]]*nt[1],K+=et[w+rt[1]]*bt[1],F+=et[w+rt[2]]*nt[2],K+=et[w+rt[2]]*bt[2],F+=et[w+rt[3]]*nt[3],K+=et[w+rt[3]]*bt[3],F+=et[w+rt[5]]*nt[5],K+=et[w+rt[5]]*bt[5],F+=et[w+rt[6]]*nt[6],K+=et[w+rt[6]]*bt[6],F+=et[w+rt[7]]*nt[7],K+=et[w+rt[7]]*bt[7],F+=et[w+rt[8]]*nt[8],K+=et[w+rt[8]]*bt[8];const at=J*F+W*K,St=dt(j+at*st),$=w*4;if(O){const gt=St-j;b[$]=dt(I[$]+gt),b[$+1]=dt(I[$+1]+gt),b[$+2]=dt(I[$+2]+gt),b[$+3]=I[$+3]}else b[$]=b[$+1]=b[$+2]=St,b[$+3]=I[$+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 J=(b+S)*.5;O=b+x*(b-J),U=S+x*(S-J)}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,J;for(let W=0;W<i;W+=4)U=t[W+0],j=t[W+1],V=t[W+2],J=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]=J},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],J=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]=J}};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 J=s[V+0],W=s[V+1],st=s[V+2],I=s[V+3];V=(R+j*c)*4,u[V+0]=J,u[V+1]=W,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 J=(Math.atan2(j,U)*180/Math.PI+360+N)%360;J=J*A/360,R=Math.floor(J),O=Math.floor(V);let W=(O*c+R)*4;const st=s[W+0],I=s[W+1],et=s[W+2],nt=s[W+3];W=(_*c+b)*4,u[W+0]=st,u[W+1]=I,u[W+2]=et,u[W+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,J=j,W=1;for(N+U>t&&(V=j,J=0,W=-1),u=0;u<i;u+=1)for(s=V;s!==J;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}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,F){var K=w.length;w.push(F);t:for(;0<K;){var at=K-1>>>1,St=w[at];if(0<u(St,F))w[at]=F,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 F=w[0],K=w.pop();if(K!==F){w[0]=K;t:for(var at=0,St=w.length,$=St>>>1;at<$;){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 F}function u(w,F){var K=w.sortIndex-F.sortIndex;return K!==0?K:w.id-F.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 F=i(S);F!==null;){if(F.callback===null)s(S);else if(F.startTime<=w)s(S),F.sortIndex=F.expirationTime,t(m,F);else break;F=i(S)}}function J(w){if(N=!1,V(w),!A)if(i(m)!==null)A=!0,W||(W=!0,rt());else{var F=i(S);F!==null&&tt(J,F.startTime-w)}}var W=!1,st=-1,I=5,et=-1;function nt(){return R?!0:!(n.unstable_now()-et<I)}function bt(){if(R=!1,W){var w=n.unstable_now();et=w;var F=!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),F=!0;break e}_===i(m)&&s(m),V(w)}else s(m);_=i(m)}if(_!==null)F=!0;else{var $=i(S);$!==null&&tt(J,$.startTime-w),F=!1}}break t}finally{_=null,x=K,D=!1}F=void 0}}finally{F?rt():W=!1}}}var rt;if(typeof j=="function")rt=function(){j(bt)};else if(typeof MessageChannel<"u"){var dt=new MessageChannel,pt=dt.port2;dt.port1.onmessage=bt,rt=function(){pt.postMessage(null)}}else rt=function(){O(bt,0)};function tt(w,F){st=O(function(){w(n.unstable_now())},F)}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 F=3;break;default:F=x}var K=x;x=F;try{return w()}finally{x=K}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function(w,F){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var K=x;x=w;try{return F()}finally{x=K}},n.unstable_scheduleCallback=function(w,F,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:F,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(J,K-at))):(w.sortIndex=St,t(m,w),A||D||(A=!0,W||(W=!0,rt()))),w},n.unstable_shouldYield=nt,n.unstable_wrapCallback=function(w){var F=x;return function(){var K=x;x=F;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(J=!1,et){var w=n.unstable_now();rt=w;var F=!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),F=!0;break e}R===s(D)&&u(D),f(w)}else u(D);R=s(D)}if(R!==null)F=!0;else{var $=s(A);$!==null&&S(p,$.startTime-w),F=!1}}break t}finally{R=null,O=K,U=!1}F=void 0}}finally{F?dt():et=!1}}}function i(w,F){var K=w.length;w.push(F);t:for(;0<K;){var at=K-1>>>1,St=w[at];if(0<c(St,F))w[at]=F,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 F=w[0],K=w.pop();if(K!==F){w[0]=K;t:for(var at=0,St=w.length,$=St>>>1;at<$;){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 F}function c(w,F){var K=w.sortIndex-F.sortIndex;return K!==0?K:w.id-F.id}function f(w){for(var F=s(A);F!==null;){if(F.callback===null)u(A);else if(F.startTime<=w)u(A),F.sortIndex=F.expirationTime,i(D,F);else break;F=s(A)}}function p(w){if(V=!1,f(w),!j)if(s(D)!==null)j=!0,et||(et=!0,dt());else{var F=s(A);F!==null&&S(p,F.startTime-w)}}function m(){return J?!0:!(n.unstable_now()-rt<bt)}function S(w,F){nt=W(function(){w(n.unstable_now())},F)}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,J=!1,W=typeof setTimeout=="function"?setTimeout:null,st=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null,et=!1,nt=-1,bt=5,rt=-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(){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(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 F=3;break;default:F=O}var K=O;O=F;try{return w()}finally{O=K}},n.unstable_requestPaint=function(){J=!0},n.unstable_runWithPriority=function(w,F){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var K=O;O=w;try{return F()}finally{O=K}},n.unstable_scheduleCallback=function(w,F,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:F,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 F=O;return function(){var K=O;O=F;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 J(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,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 rt(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(`
|
|
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 F(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+=F(l,h),h=l,l=l.return;while(l);return r}catch(g){return`
|
|
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++]=lt,mo[Hu++]=Pn,Pn=l,lt=r}function $(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),$(l,1,0))}function Tt(l){for(;l===Pn;)Pn=mo[--Hu],mo[Hu]=null,lt=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 pn(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 rn(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 Re(){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=Ae(),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),rt(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,Ae()),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?un._currentValue:un._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,Z){if(l){var ut=it.deletions;ut===null?(it.deletions=[Z],it.flags|=16):ut.push(Z)}}function h(it,Z){if(!l)return null;for(;Z!==null;)r(it,Z),Z=Z.sibling;return null}function g(it){for(var Z=new Map;it!==null;)it.key!==null?Z.set(it.key,it):Z.set(it.index,it),it=it.sibling;return Z}function E(it,Z){return it=Vs(it,Z),it.index=0,it.sibling=null,it}function T(it,Z,ut){return it.index=ut,l?(ut=it.alternate,ut!==null?(ut=ut.index,ut<Z?(it.flags|=67108866,Z):ut):(it.flags|=67108866,Z)):(it.flags|=1048576,Z)}function z(it){return l&&it.alternate===null&&(it.flags|=67108866),it}function L(it,Z,ut,_t){return Z===null||Z.tag!==6?(Z=of(ut,it.mode,_t),Z.return=it,Z):(Z=E(Z,ut),Z.return=it,Z)}function ft(it,Z,ut,_t){var jt=ut.type;return jt===io?Mt(it,Z,ut.props.children,_t,ut.key):Z!==null&&(Z.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===ur&&Wa(jt)===Z.type)?(Z=E(Z,ut.props),Kr(Z,ut),Z.return=it,Z):(Z=rf(ut.type,ut.key,ut.props,null,it.mode,_t),Kr(Z,ut),Z.return=it,Z)}function vt(it,Z,ut,_t){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ut.containerInfo||Z.stateNode.implementation!==ut.implementation?(Z=yd(ut,it.mode,_t),Z.return=it,Z):(Z=E(Z,ut.children||[]),Z.return=it,Z)}function Mt(it,Z,ut,_t,jt){return Z===null||Z.tag!==7?(Z=Dl(ut,it.mode,_t,jt),Z.return=it,Z):(Z=E(Z,ut),Z.return=it,Z)}function xt(it,Z,ut){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=of(""+Z,it.mode,ut),Z.return=it,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case cf:return ut=rf(Z.type,Z.key,Z.props,null,it.mode,ut),Kr(ut,Z),ut.return=it,ut;case or:return Z=yd(Z,it.mode,ut),Z.return=it,Z;case ur:return Z=Wa(Z),xt(it,Z,ut)}if(cr(Z)||b(Z))return Z=Dl(Z,it.mode,ut,null),Z.return=it,Z;if(typeof Z.then=="function")return xt(it,pi(Z),ut);if(Z.$$typeof===Al)return xt(it,Mi(it,Z),ut);Qr(it,Z)}return null}function Rt(it,Z,ut,_t){var jt=Z!==null?Z.key:null;if(typeof ut=="string"&&ut!==""||typeof ut=="number"||typeof ut=="bigint")return jt!==null?null:L(it,Z,""+ut,_t);if(typeof ut=="object"&&ut!==null){switch(ut.$$typeof){case cf:return ut.key===jt?ft(it,Z,ut,_t):null;case or:return ut.key===jt?vt(it,Z,ut,_t):null;case ur:return ut=Wa(ut),Rt(it,Z,ut,_t)}if(cr(ut)||b(ut))return jt!==null?null:Mt(it,Z,ut,_t,null);if(typeof ut.then=="function")return Rt(it,Z,pi(ut),_t);if(ut.$$typeof===Al)return Rt(it,Z,Mi(it,ut),_t);Qr(it,ut)}return null}function Yt(it,Z,ut,_t,jt){if(typeof _t=="string"&&_t!==""||typeof _t=="number"||typeof _t=="bigint")return it=it.get(ut)||null,L(Z,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(Z,it,_t,jt);case or:return it=it.get(_t.key===null?ut:_t.key)||null,vt(Z,it,_t,jt);case ur:return _t=Wa(_t),Yt(it,Z,ut,_t,jt)}if(cr(_t)||b(_t))return it=it.get(ut)||null,Mt(Z,it,_t,jt,null);if(typeof _t.then=="function")return Yt(it,Z,ut,pi(_t),jt);if(_t.$$typeof===Al)return Yt(it,Z,ut,Mi(Z,_t),jt);Qr(Z,_t)}return null}function tn(it,Z,ut,_t){for(var jt=null,cn=null,Xt=Z,_e=Z=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),Z=T(ye,Z,_e),cn===null?jt=ye:cn.sibling=ye,cn=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&&(Z=T(Xt,Z,_e),cn===null?jt=Xt:cn.sibling=Xt,cn=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),Z=T(fe,Z,_e),cn===null?jt=fe:cn.sibling=fe,cn=fe);return l&&Xt.forEach(function(Gl){return r(it,Gl)}),se&&St(it,_e),jt}function kn(it,Z,ut,_t){if(ut==null)throw Error(u(151));for(var jt=null,cn=null,Xt=Z,_e=Z=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),Z=T(Gl,Z,_e),cn===null?jt=Gl:cn.sibling=Gl,cn=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&&(Z=T(ye,Z,_e),cn===null?jt=ye:cn.sibling=ye,cn=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),Z=T(ye,Z,_e),cn===null?jt=ye:cn.sibling=ye,cn=ye);return l&&Xt.forEach(function(zf){return r(it,zf)}),se&&St(it,_e),jt}function Eo(it,Z,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;Z!==null;){if(Z.key===jt){if(jt=ut.type,jt===io){if(Z.tag===7){h(it,Z.sibling),_t=E(Z,ut.props.children),_t.return=it,it=_t;break t}}else if(Z.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===ur&&Wa(jt)===Z.type){h(it,Z.sibling),_t=E(Z,ut.props),Kr(_t,ut),_t.return=it,it=_t;break t}h(it,Z);break}else r(it,Z);Z=Z.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;Z!==null;){if(Z.key===jt)if(Z.tag===4&&Z.stateNode.containerInfo===ut.containerInfo&&Z.stateNode.implementation===ut.implementation){h(it,Z.sibling),_t=E(Z,ut.children||[]),_t.return=it,it=_t;break t}else{h(it,Z);break}else r(it,Z);Z=Z.sibling}_t=yd(ut,it.mode,_t),_t.return=it,it=_t}return z(it);case ur:return ut=Wa(ut),Eo(it,Z,ut,_t)}if(cr(ut))return tn(it,Z,ut,_t);if(b(ut)){if(jt=b(ut),typeof jt!="function")throw Error(u(150));return ut=jt.call(ut),kn(it,Z,ut,_t)}if(typeof ut.then=="function")return Eo(it,Z,pi(ut),_t);if(ut.$$typeof===Al)return Eo(it,Z,Mi(it,ut),_t);Qr(it,ut)}return typeof ut=="string"&&ut!==""||typeof ut=="number"||typeof ut=="bigint"?(ut=""+ut,Z!==null&&Z.tag===6?(h(it,Z.sibling),_t=E(Z,ut),_t.return=it,it=_t):(h(it,Z),_t=of(ut,it.mode,_t),_t.return=it,it=_t),z(it)):h(it,Z)}return function(it,Z,ut,_t){try{Df=0;var jt=Eo(it,Z,ut,_t);return ji=null,jt}catch(Xt){if(Xt===Vu||Xt===qd)throw Xt;var cn=i(29,Xt,null,it.mode);return cn.lanes=_t,cn.return=it,cn}}}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 on(){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 rn(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 rn(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:Re()},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&>(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?un._currentValue:un._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&>(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&>(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=rn(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?rn(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=rn(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=rn(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?un._currentValue:un._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?lt: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,un,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,un,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&&$(r,lt,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,un,T),T!==E.cache&&Ji(r,[un],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=rn(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=rn(un),l===null?(E=qr(),E===null&&(E=Le,T=Re(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=h),E=T),r.memoizedState={parent:g,cache:E},Dc(r),Ba(r,un,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,un,g)):(g=T.cache,Ba(r,un,g),g!==E.cache&&Ji(r,[un],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),pn(un),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 pn(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&&Ae()>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*Ae()-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=Ae(),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),pn(un),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 pn(un),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 pn(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 pn(un),null;case 25:return null;default:return null}}function Ih(l,r){switch(Tt(r),r.tag){case 3:pn(un),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:pn(r.type);break;case 22:case 23:$a(r),pl(),l!==null&&D(pr);break;case 24:pn(un)}}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=Ae()),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)),W(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-Ae(),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-Ae():(T&4194048)===T?Xm-Ae():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=Ae()+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),rt(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=rt(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&&(W(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),W(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>Ae()-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&&(W(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=J(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=J(0),this.hiddenUpdates=J(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=Re(),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,Ae=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,lt=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,un={$$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=Ae(),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:rn,use:Ve,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useLayoutEffect:on,useInsertionEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useSyncExternalStore:on,useId:on,useHostTransitionStatus:on,useFormState:on,useActionState:on,useOptimistic:on,useMemoCache:on,useCacheRefresh:on};Af.useEffectEvent=on;var Hy={readContext:rn,use:Ve,useCallback:function(l,r){return pa().memoizedState=[l,r===void 0?null:r],l},useContext:rn,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:rn,use:Ve,useCallback:Bh,useContext:rn,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:rn,use:Ve,useCallback:Bh,useContext:rn,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=rn(un),h=r.data.get(l);return h===void 0&&(h=l(),r.data.set(l,h)),h},cacheSignal:function(){return rn(un).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=Ae()+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,W(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=Ae()+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:
|
|
23
|
+
`+(g.join(" > ")+`
|
|
24
|
+
|
|
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():Ae({},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():Ae({},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():Ae({},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 J(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 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 rt(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 F(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 $(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 IG=="function"&&WG(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 pn(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=[ej],q=Ba(C.memoizedProps,q,B,0),1<B.length&&(q&&!Xu&&(C.lanes&y)===0&&100<e.actualDuration?(Xu=!0,B[0]=nj,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 rn(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 Re(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:Ae({},e,{value:B9}),info:Ae({},e,{value:V9}),warn:Ae({},e,{value:G9}),error:Ae({},e,{value:j9}),group:Ae({},e,{value:L9}),groupCollapsed:Ae({},e,{value:P9}),groupEnd:Ae({},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
|
|
27
|
+
`)&&(e=e.slice(29)),a=e.indexOf(`
|
|
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(`
|
|
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=lt.H,lt.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,lt.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`
|
|
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),rt(Qu,e),dt(Qu,a,e)}function Xr(e){rt(Qu,e),rt(Zm,e),rt(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&&(rt(Qu,e),rt(Zm,e)),Vy.current===e&&(rt(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+`>
|
|
43
|
+
`:0<d?o+"<"+e+" "+y.join(" ")+`>
|
|
44
|
+
`:o+"<"+e+`
|
|
45
|
+
`+o+" "+y.join(`
|
|
46
|
+
`+o+" ")+`
|
|
47
|
+
`+o+`>
|
|
48
|
+
`}function Ac(e,a,o){var d="",y=Ae({},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+=`
|
|
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=`
|
|
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){lt.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:
|
|
74
|
+
|
|
75
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
76
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
77
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
78
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
79
|
+
- Invalid HTML tag nesting.
|
|
80
|
+
|
|
81
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
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&&(on(e),As(e)):a!==3&&(a!==5||ap(e.type)&&!se(e.type,e.memoizedProps))&&vn&&(on(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 on(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:
|
|
84
|
+
|
|
85
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
86
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
87
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
88
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
89
|
+
- Invalid HTML tag nesting.
|
|
90
|
+
|
|
91
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
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,rt(x3,a),e._currentRenderer=o):(e._currentValue2=o,o=D3.current,rt(D3,a),e._currentRenderer2=o),rt(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 aj,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&&ij(sj,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=fn;return fn=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){fn===null&&(fn=[]),fn.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,lt.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||F(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||F(e,o)){if(a=o&-o,a!==e.callbackPriority||lt.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),lt.actQueue!==null?(lt.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&&cn(e)}function V0(){lt.actQueue!==null&<.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=Z,Z<<=1,(Z&261888)===0&&(Z=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){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(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 uj(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:
|
|
94
|
+
- Multiple copies of the "react" package is used.
|
|
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.
|
|
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.
|
|
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(yj){return a(P,yj)}),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>pj)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>mj&&(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.
|
|
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=Ae({},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,rt(Sp,e),rt(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){rt(gs,e),tl===e&&(tl=null),rt(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+`
|
|
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
|
+
|
|
105
|
+
Previous render Next render
|
|
106
|
+
------------------------------------------------------
|
|
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:
|
|
109
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
110
|
+
2. You might be breaking the Rules of Hooks
|
|
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.
|
|
113
|
+
|
|
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,lt.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,lt.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>=fj)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,lt.H=TE,v=U3(a,o,d)}while(Tp);return v}function F0(){var e=lt.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,lt.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)}};lt.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=lt.T,C={};C._updatedFibers=new Set,lt.T=C;try{var M=o(y,d),B=lt.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),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),nd(e,a,C)}catch(q){ad(e,a,q)}}function nd(e,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?(lt.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(){lt.asyncTransitions--}function Pa(e,a,o,d,y){var v=ri();zn(v!==0&&8>v?v:8);var C=lt.T,M={};M._updatedFibers=new Set,lt.T=M,Eu(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(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),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 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=cj++,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=lt.H;lt.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{lt.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(lt.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:Ae({},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=Ae({},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(lt.actQueue!==null)lt.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)),lj(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.
|
|
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.
|
|
118
|
+
|
|
119
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
120
|
+
|
|
121
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
122
|
+
https://react.dev/link/unsafe-component-lifecycles`,v,q,C!==null?`
|
|
123
|
+
`+C:"",M!==null?`
|
|
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&&un(a.stateNode.containerInfo),ze(a),null;case 10:return ki(a.type,a),ze(a),null;case 19:if(rt(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&&rt(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 rt(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&&rt(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:rt(In,a);break;case 10:ki(a.type,a);break;case 22:case 23:La(a),Qc(a),e!==null&&rt(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,rj,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"?`
|
|
127
|
+
|
|
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
|
+
|
|
130
|
+
`+v+`(() => {
|
|
131
|
+
async function fetchData() {
|
|
132
|
+
// You can await here
|
|
133
|
+
const response = await MyAPI.getData(someId);
|
|
134
|
+
// ...
|
|
135
|
+
}
|
|
136
|
+
fetchData();
|
|
137
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
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,oj,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,fn),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),fn=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,fn),ti(d),$i(y),fn=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,fn),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),fn=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,fn),ti(a),$i(o),fn=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,fn),ti(y),$i(v),fn=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,fn),e&&.05<qt-Lt&&ha(a,Lt,qt,"Mount"))),ti(v),$i(C),fn=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,fn),ti(C),$i(M),fn=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,fn),ti(a),$i(o),Bn=y,fn=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,fn),ti(a),$i(o),Bn=y,fn=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,fn),ti(v),$i(C),Bn=B,fn=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||lt.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=lt.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)),$(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||F(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)){pn(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){pn(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){pn(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:pn(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(lt.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(pn(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&&(pn(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&&(pn(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=F(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&&(lt.recentlyCreatedOwnerStacks=0,H9=e),jl.discardPendingWarnings(),o}function uy(e,a){Qt=null,lt.H=f1,lt.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=lt.H;return lt.H=f1,e===null?f1:e}function fy(){var e=lt.A;return lt.A=hj,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,lt.H=y,lt.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=F(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.")}lt.actQueue!==null?hy():o3();break}catch(yt){uy(e,yt)}while(!0);return Rh(),lt.H=d,lt.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(pn(o),q===Kf?jn(yt,Vt,o,Kn):d!==null?Re(yt,Vt,o,d,a!==null&&a.alternate!==null&&a.alternate.memoizedState.isDehydrated&&(a.flags&256)!==0,Kn):rn(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=lt.T,lt.T=null,y=ri(),zn(2),C=de,de|=al;try{i3(e,a,o)}finally{de=C,zn(y),lt.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=lt.T,lt.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),lt.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=lt.T,lt.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),lt.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=lt.T,M=ri(),zn(2),lt.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{lt.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=lt.T;var y=ri();try{zn(d),lt.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.");pn(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),lt.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&&($(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),$(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
|
+
|
|
141
|
+
Error message:
|
|
142
|
+
|
|
143
|
+
%s`,o)}}function Om(e,a,o){var d=e.pingCache;if(d===null){d=e.pingCache=new dj;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()&<.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
144
|
+
|
|
145
|
+
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
146
|
+
|
|
147
|
+
act(() => {
|
|
148
|
+
/* finish loading suspended data */
|
|
149
|
+
});
|
|
150
|
+
/* assert on the output */
|
|
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&&($(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=lt.actQueue;return o!==null?(o.push(a),gj):jt(e,a)}function xy(e){sy()&<.actQueue===null&&Bt(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
153
|
+
|
|
154
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
155
|
+
|
|
156
|
+
act(() => {
|
|
157
|
+
/* fire events that update state */
|
|
158
|
+
});
|
|
159
|
+
/* assert on the output */
|
|
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+=`
|
|
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.
|
|
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(),Ae=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,lt=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 un=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,Z=256,ut=262144,_t=4194304,jt=si.unstable_scheduleCallback,cn=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,IG=si.log,WG=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 $G=performance,w9=function(){return $G.now()};else{var tj=Date;w9=function(){return tj.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}},ej=["Changed Props",""],nj=["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,aj=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()})}},ij=si.unstable_scheduleCallback,sj=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,fn=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=lt.S;lt.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.
|
|
166
|
+
|
|
167
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
168
|
+
|
|
169
|
+
Please update the following components: %s`,C)}0<d.size&&(C=O(d),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
170
|
+
|
|
171
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
172
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
173
|
+
|
|
174
|
+
Please update the following components: %s`,C)),0<v.size&&(C=O(v),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
175
|
+
|
|
176
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
177
|
+
|
|
178
|
+
Please update the following components: %s`,C)),0<e.size&&(C=O(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
179
|
+
|
|
180
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
181
|
+
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
182
|
+
|
|
183
|
+
Please update the following components: %s`,C)),0<o.size&&(C=O(o),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
184
|
+
|
|
185
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
186
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
187
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
188
|
+
|
|
189
|
+
Please update the following components: %s`,C)),0<y.size&&(C=O(y),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
190
|
+
|
|
191
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
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
|
+
|
|
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.
|
|
195
|
+
|
|
196
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
197
|
+
|
|
198
|
+
Please update the following components: %s
|
|
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:""})}},lj=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}},rj=lE.react_stack_bottom_frame.bind(lE),rE={react_stack_bottom_frame:function(e,a,o){try{o()}catch(d){Ee(e,a,d)}}},oj=rE.react_stack_bottom_frame.bind(rE),oE={react_stack_bottom_frame:function(e){var a=e._init;return a(e._payload)}},uj=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=`
|
|
201
|
+
|
|
202
|
+
Check the render method of \``+y+"`."),v||d&&(v=`
|
|
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,cj=0,fj=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=lt.H;lt.H=Dr;try{return ld(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){ot="useReducer",Ft();var d=lt.H;lt.H=Dr;try{return Ih(e,a,o)}finally{lt.H=d}},useRef:function(e){return ot="useRef",Ft(),rs(e)},useState:function(e){ot="useState",Ft();var a=lt.H;lt.H=Dr;try{return vu(e)}finally{lt.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=lt.H;lt.H=Dr;try{return ld(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=lt.H;lt.H=Dr;try{return Ih(e,a,o)}finally{lt.H=d}},useRef:function(e){return ot="useRef",Et(),rs(e)},useState:function(e){ot="useState",Et();var a=lt.H;lt.H=Dr;try{return vu(e)}finally{lt.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=lt.H;lt.H=Ll;try{return Su(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=lt.H;lt.H=Ll;try{return ws(e,a,o)}finally{lt.H=d}},useRef:function(){return ot="useRef",Et(),De().memoizedState},useState:function(){ot="useState",Et();var e=lt.H;lt.H=Ll;try{return ws(ss)}finally{lt.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=lt.H;lt.H=e2;try{return Su(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){ot="useReducer",Et();var d=lt.H;lt.H=e2;try{return yu(e,a,o)}finally{lt.H=d}},useRef:function(){return ot="useRef",Et(),De().memoizedState},useState:function(){ot="useState",Et();var e=lt.H;lt.H=e2;try{return yu(ss)}finally{lt.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=lt.H;lt.H=Dr;try{return ld(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Ft();var d=lt.H;lt.H=Dr;try{return Ih(e,a,o)}finally{lt.H=d}},useRef:function(e){return ot="useRef",D(),Ft(),rs(e)},useState:function(e){ot="useState",D(),Ft();var a=lt.H;lt.H=Dr;try{return vu(e)}finally{lt.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=lt.H;lt.H=Ll;try{return Su(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Et();var d=lt.H;lt.H=Ll;try{return ws(e,a,o)}finally{lt.H=d}},useRef:function(){return ot="useRef",D(),Et(),De().memoizedState},useState:function(){ot="useState",D(),Et();var e=lt.H;lt.H=Ll;try{return ws(ss)}finally{lt.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=lt.H;lt.H=Ll;try{return Su(e,a)}finally{lt.H=o}},useReducer:function(e,a,o){ot="useReducer",D(),Et();var d=lt.H;lt.H=Ll;try{return yu(e,a,o)}finally{lt.H=d}},useRef:function(){return ot="useRef",D(),Et(),De().memoizedState},useState:function(){ot="useState",D(),Et();var e=lt.H;lt.H=Ll;try{return yu(ss)}finally{lt.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,hj={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=[],dj=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,pj=50,S1=0,r5=null,o5=!1,y2=!1,mj=50,Ff=0,b1=null,Op=!1,v2=null,tT=!1,eT=new Set,gj={},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=Ae({},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=Ae({},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=Ae({},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,$(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
|
|
205
|
+
|
|
206
|
+
%s
|
|
207
|
+
|
|
208
|
+
%s
|
|
209
|
+
`,e,a,o],e.environmentName)():console.error(`%o
|
|
210
|
+
|
|
211
|
+
%s
|
|
212
|
+
|
|
213
|
+
%s
|
|
214
|
+
`,e,a,o)},ae.defaultOnRecoverableError=function(e){U9(e)},ae.defaultOnUncaughtError=function(e){U9(e),console.warn(`%s
|
|
215
|
+
|
|
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=lt.T,o=ri();try{return zn(32),lt.T=null,e()}finally{zn(o),lt.T=a}},ae.discreteUpdates=function(e,a,o,d,y){var v=lt.T,C=ri();try{return zn(2),lt.T=null,e(a,o,d,y)}finally{zn(C),lt.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=J(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=J(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=lt.T,d=ri();try{if(zn(2),lt.T=null,e)return e()}finally{zn(d),lt.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:
|
|
219
|
+
`+(d.join(" > ")+`
|
|
220
|
+
|
|
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:lt,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(){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=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.
|
|
223
|
+
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
|
224
|
+
Consider to add onDragMove or onDragEnd events.
|
|
225
|
+
For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
226
|
+
`,$_=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
227
|
+
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
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=({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,J]=H.useState(c),[W,st]=H.useState(!0),[I,et]=H.useState(),nt=H.useRef(void 0),bt=H.useRef(0),rt=H.useRef(0),dt=H.useRef(0),pt=H.useRef(void 0),tt=H.useRef(null),w=H.useRef(null),F=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&&$(s)},[s]),H.useEffect(()=>{!W&&u&&b?.(Mi())},[W]);const $=Ut=>{const Re=new Image;Re.onload=()=>{Pt(Re)},Re.src=Ut,nt.current=Ut},gt=async Ut=>{if(Ut.target.files){const Re=await AD(Ut.target.files[0]);Re&&$(Re)}},Tt=()=>{et(void 0),st(!0),J(c),j(1),_?.(),b?.()},Pt=Ut=>{const Re=Ut.width,jn=Ut.height,Va=jn/Re;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;rt.current=mn/2,dt.current=ke/2,pt.current={x:rt.current/Lr,y:rt.current/Lr},st(!1),J(eu),j(Lr),D(mn),N(ke),et(Ut)},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,pn=(Ut,Re)=>{K.current&&at.current&&(K.current.x(An(Ut)-8),K.current.y(Ba(Re)-8),at.current.x(An(Ut)-8),at.current.y(Ba(Re)-10))},ha=()=>{if(w.current&&F.current){const Ut=xn()?ue():Dn()?ta():w.current.x(),Re=xe()?ue():ln()?ea():w.current.y();pn(Ut,Re),pt.current={x:Ut/U,y:Re/U},w.current.fillPatternOffset(pt.current),w.current.x(Ut),F.current.x(Ut),w.current.y(Re),F.current.y(Re)}},Ji=Ut=>{if(F.current&&w.current&&K.current){const Re=Ut>0||Be(Ut)?Ut:0;F.current.radius(F.current.radius()-At(Re)),w.current.radius(w.current.radius()-At(Re)),ha()}},di=Ut=>{tt.current&&(tt.current.container().style.cursor="nesw-resize"),bt.current=Ut.evt.y},Fi=Ut=>{const Re=Ut.evt.y,jn=Re?Re-bt.current:void 0,Va=Ut.evt.movementY||jn||0;bt.current=Re,Ji(Va),w.current&&pn(w.current.x(),w.current.y())},Mn=()=>{tt.current&&(tt.current.container().style.cursor="default"),b?.(Mi())},rn=()=>{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: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: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:F,x:rt.current,y:dt.current,radius:V,stroke:f,strokeWidth:4,strokeScaleEnabled:!0,dashEnabled:!0,dash:[10,5]}),X.jsx(R4,{ref:w,x:rt.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:rn}),X.jsx(O4,{ref:K,x:rt.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:rt.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),zD=({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 HD(){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 wD=HD();const Se=X2(wD);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]),UD=(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(UD);var nv={exports:{}},Ip={},P4;function BD(){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 VD(){return Y4||(Y4=1,process.env.NODE_ENV!=="production"&&(function(){function n($){if($==null)return null;if(typeof $=="function")return $.$$typeof===bt?null:$.displayName||$.name||null;if(typeof $=="string")return $;switch($){case R:return"Fragment";case U:return"Profiler";case O:return"StrictMode";case W:return"Suspense";case st:return"SuspenseList";case nt:return"Activity"}if(typeof $=="object")switch(typeof $.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case N:return"Portal";case V:return $.displayName||"Context";case j:return($._context.displayName||"Context")+".Consumer";case J:var gt=$.render;return $=$.displayName,$||($=gt.displayName||gt.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case I:return gt=$.displayName||null,gt!==null?gt:n($.type)||"Memo";case et:gt=$._payload,$=$._init;try{return n($(gt))}catch{}}return null}function t($){return""+$}function i($){try{t($);var gt=!1}catch{gt=!0}if(gt){gt=console;var Tt=gt.error,Pt=typeof Symbol=="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.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($)}}function s($){if($===R)return"<>";if(typeof $=="object"&&$!==null&&$.$$typeof===et)return"<...>";try{var gt=n($);return gt?"<"+gt+">":"<...>"}catch{return"<...>"}}function u(){var $=rt.A;return $===null?null:$.getOwner()}function c(){return Error("react-stack-top-frame")}function f($){if(dt.call($,"key")){var gt=Object.getOwnPropertyDescriptor($,"key").get;if(gt&>.isReactWarning)return!1}return $.key!==void 0}function p($,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($,"key",{get:Tt,configurable:!0})}function m(){var $=n(this.type);return F[$]||(F[$]=!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.")),$=this.props.ref,$!==void 0?$:null}function S($,gt,Tt,Pt,le,xn){var xe=Tt.ref;return $={$$typeof:A,type:$,key:gt,props:Tt,_owner:Pt},(xe!==void 0?xe:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:m}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty($,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty($,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:xn}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function b($,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($);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:
|
|
2
230
|
let props = %s;
|
|
3
231
|
<%s {...props} />
|
|
4
232
|
React keys must be passed directly to JSX without using spread:
|
|
5
233
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,C,E,$,E),P[E+C]=!0)}if(E=null,S!==void 0&&(r(S),E=""+S),i(w)&&(r(w.key),E=""+w.key),"key"in w){S={};for(var q in w)q!=="key"&&(S[q]=w[q])}else S=w;return E&&a(S,typeof c=="function"?c.displayName||c.name||"Unknown":c),b(c,E,S,s(),W,M)}function y(c){x(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===L&&(c._payload.status==="fulfilled"?x(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function x(c){return typeof c=="object"&&c!==null&&c.$$typeof===d}var l=f,d=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),D=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),F=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,N=Array.isArray,_=console.createTask?console.createTask:function(){return null};l={react_stack_bottom_frame:function(c){return c()}};var A,U={},Q=l.react_stack_bottom_frame.bind(l,o)(),Y=_(n(o)),P={};bt.Fragment=g,bt.jsx=function(c,w,S){var C=1e4>F.recentlyCreatedOwnerStacks++;return p(c,w,S,!1,C?Error("react-stack-top-frame"):Q,C?_(n(c)):Y)},bt.jsxs=function(c,w,S){var C=1e4>F.recentlyCreatedOwnerStacks++;return p(c,w,S,!0,C?Error("react-stack-top-frame"):Q,C?_(n(c)):Y)}})()),bt}var an;function Wo(){return an||(an=1,process.env.NODE_ENV==="production"?Ft.exports=Yo():Ft.exports=Vo()),Ft.exports}var m=Wo();const cn=f.createContext(void 0),un=()=>f.useContext(cn),Bo=({overlayKeepOnScreen:t=!0,useAnimations:e=!0,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o,children:i})=>{const a={overlayKeepOnScreen:t,useAnimations:e,mobileMediaQuery:r,tabletMediaQuery:n,desktopMediaQuery:s,isValidScrollableElement:o};return m.jsx(cn.Provider,{value:a,children:i})};var xe=(t=>(t[t.Vertical=0]="Vertical",t[t.Horizontal=1]="Horizontal",t))(xe||{}),Ee=(t=>(t[t.Right=0]="Right",t[t.Left=1]="Left",t))(Ee||{}),ir={exports:{}};var ln;function zo(){return ln||(ln=1,(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,n(a)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)e.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(ir)),ir.exports}var Uo=zo();const te=or(Uo);var Ze=(t=>(t[t.Focus=0]="Focus",t[t.FocusWithin=1]="FocusWithin",t))(Ze||{});const gt=(t=1)=>f.useMemo(()=>te("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":t===1,"bsc:focus:ring-3 bsc:focus:ring-primary-2 bsc:focus:ring-offset-2 focus:bsc-ring-opacity-50":t===0}),[t]),qo=(t,e)=>{const r=f.useRef(null),{buttonType:n,buttonStyle:s="curved",type:o="button",disabled:i=!1,form:a,fullWidth:u=!1,onClick:b,className:p,children:y}=t,x=()=>{r.current?.click()};f.useImperativeHandle(e,()=>({click:x}));const l=gt(Ze.Focus),d=te("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",l,{"bsc:w-full":u,"bc-disabled bsc:bg-gray-3 bsc:text-gray-2 bsc:pointer-events-none":i,"bsc:bg-primary-1 bsc:text-white bsc:hover:bg-primary-2 bsc:focus:ring-primary-1":n==="primary","bsc:bg-primary-2 bsc:text-white bsc:hover:bg-primary-3 bsc:focus:ring-primary-2":n==="secondary","bsc:bg-info bsc:text-white bsc:focus:ring-info":n==="info","bsc:bg-success bsc:text-white bsc:focus:ring-success":n==="success","bsc:bg-warning bsc:text-white bsc:focus:ring-warning":n==="warning","bsc:bg-error bsc:text-white bsc:focus:ring-error":n==="error","bsc:rounded-md":s==="curved","bsc:rounded-full bsc:px-4!":s==="round"},p);return m.jsx("button",{ref:r,type:o,onClick:b,disabled:i,form:a,className:d,children:y})},Oe=f.forwardRef(qo);var ar={exports:{}},yt={},fn;function Go(){if(fn)return yt;fn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:t,type:n,key:i,ref:s!==void 0?s:null,props:o}}return yt.Fragment=e,yt.jsx=r,yt.jsxs=r,yt}var $t={},dn;function Qo(){return dn||(dn=1,process.env.NODE_ENV!=="production"&&(function(){function t(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===X?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case g:return"Fragment";case k:return"Profiler";case v:return"StrictMode";case H:return"Suspense";case V:return"SuspenseList";case G:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case h:return"Portal";case D:return c.displayName||"Context";case j:return(c._context.displayName||"Context")+".Consumer";case T:var w=c.render;return c=c.displayName,c||(c=w.displayName||w.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case B:return w=c.displayName||null,w!==null?w:t(c.type)||"Memo";case L:w=c._payload,c=c._init;try{return t(c(w))}catch{}}return null}function e(c){return""+c}function r(c){try{e(c);var w=!1}catch{w=!0}if(w){w=console;var S=w.error,C=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return S.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),e(c)}}function n(c){if(c===g)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===L)return"<...>";try{var w=t(c);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function s(){var c=F.A;return c===null?null:c.getOwner()}function o(){return Error("react-stack-top-frame")}function i(c){if(I.call(c,"key")){var w=Object.getOwnPropertyDescriptor(c,"key").get;if(w&&w.isReactWarning)return!1}return c.key!==void 0}function a(c,w){function S(){A||(A=!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)",w))}S.isReactWarning=!0,Object.defineProperty(c,"key",{get:S,configurable:!0})}function u(){var c=t(this.type);return U[c]||(U[c]=!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.")),c=this.props.ref,c!==void 0?c:null}function b(c,w,S,C,W,M){var E=S.ref;return c={$$typeof:d,type:c,key:w,props:S,_owner:C},(E!==void 0?E:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:u}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function p(c,w,S,C,W,M){var E=w.children;if(E!==void 0)if(C)if(N(E)){for(C=0;C<E.length;C++)y(E[C]);Object.freeze&&Object.freeze(E)}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 y(E);if(I.call(w,"key")){E=t(c);var $=Object.keys(w).filter(function(Z){return Z!=="key"});C=0<$.length?"{key: someKey, "+$.join(": ..., ")+": ...}":"{key: someKey}",P[E+C]||($=0<$.length?"{"+$.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
7
|
-
let props = %s;
|
|
8
|
-
<%s {...props} />
|
|
9
|
-
React keys must be passed directly to JSX without using spread:
|
|
10
|
-
let props = %s;
|
|
11
|
-
<%s key={someKey} {...props} />`,C,E,$,E),P[E+C]=!0)}if(E=null,S!==void 0&&(r(S),E=""+S),i(w)&&(r(w.key),E=""+w.key),"key"in w){S={};for(var q in w)q!=="key"&&(S[q]=w[q])}else S=w;return E&&a(S,typeof c=="function"?c.displayName||c.name||"Unknown":c),b(c,E,S,s(),W,M)}function y(c){x(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===L&&(c._payload.status==="fulfilled"?x(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function x(c){return typeof c=="object"&&c!==null&&c.$$typeof===d}var l=f,d=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),D=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),F=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,N=Array.isArray,_=console.createTask?console.createTask:function(){return null};l={react_stack_bottom_frame:function(c){return c()}};var A,U={},Q=l.react_stack_bottom_frame.bind(l,o)(),Y=_(n(o)),P={};$t.Fragment=g,$t.jsx=function(c,w,S){var C=1e4>F.recentlyCreatedOwnerStacks++;return p(c,w,S,!1,C?Error("react-stack-top-frame"):Q,C?_(n(c)):Y)},$t.jsxs=function(c,w,S){var C=1e4>F.recentlyCreatedOwnerStacks++;return p(c,w,S,!0,C?Error("react-stack-top-frame"):Q,C?_(n(c)):Y)}})()),$t}var hn;function Zo(){return hn||(hn=1,process.env.NODE_ENV==="production"?ar.exports=Go():ar.exports=Qo()),ar.exports}var we=Zo();function Ko(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pn,mn;function Xo(){return mn||(mn=1,pn=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}),pn}var Jo=Xo();const ei=Ko(Jo),ti=()=>{throw new Error("useEvent should not be called before the component is mounted")},vt=t=>{const e=f.useRef(ti);f.useInsertionEffect(()=>{e.current=t},[t]);const r=f.useRef(null);return r.current||(r.current=function(){return e.current?.apply(this,arguments)}),r.current},bn=t=>{const e=f.useRef(void 0);let r=!1;e.current!==void 0&&(r=!ei(e.current,t));const n={changed:r,previousValue:e.current};return e.current=t,n},ri=t=>typeof t=="function",ni=t=>{const[e,r]=f.useState({value:t,initial:!0}),n=f.useRef(t);return[e,s=>{if(!ri(s))r({value:s,initial:!1});else{const o=s(n.current);n.current=o,r({value:o,initial:!1})}}]},si=t=>{const[e,r]=ni(t),n=f.useRef({value:t,initial:!0});return n.current!==e&&(n.current=e),[e,r,n]},gn=f.createContext(void 0),Ht=()=>f.useContext(gn),cr=({id:t,name:e,value:r,type:n,checked:s,readOnly:o,onChange:i})=>we.jsx("input",{id:t,name:e,value:r,type:n,checked:s,onChange:i,readOnly:o,disabled:o,className:"bsh:appearance-none! bsh:absolute! bsh:left-[-1000px]!"});function oi(t){const e=Object.keys(t),r={};for(let n=0,s=e.length;n<s;n++){const o=e[n];if(o){const i=t[o],a=o.replace(/([A-Z])/g,u=>`-${u.toLowerCase()}`);typeof i=="boolean"?i&&(r[`data-${a}`]=!0):r[`data-${a}`]=t[o]}}return r}const xt=({wrapperElement:t,renderProps:e,elementProps:r,innerWrapperElement:n,className:s,children:o})=>{if(typeof o=="function")return n?we.jsxs(we.Fragment,{children:[n,o(e)]}):o(e);{const i=n?we.jsxs(we.Fragment,{children:[n,o]}):o;return f.createElement(t,Object.assign({},e?oi(e):{},r,{className:s}),i)}};var ii=Symbol.for("preact-signals");function ur(){if(Ke>1)Ke--;else{for(var t,e=!1;wt!==void 0;){var r=wt;for(wt=void 0,lr++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&xn(r))try{r.c()}catch(s){e||(t=s,e=!0)}r=n}}if(lr=0,Ke--,e)throw t}}var se=void 0;function yn(t){var e=se;se=void 0;try{return t()}finally{se=e}}var wt=void 0,Ke=0,lr=0,Yt=0;function vn(t){if(se!==void 0){var e=t.n;if(e===void 0||e.t!==se)return e={i:0,S:t,p:se.s,n:void 0,t:se,e:void 0,x:void 0,r:e},se.s!==void 0&&(se.s.n=e),se.s=e,t.n=e,32&se.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=se.s,e.n=void 0,se.s.n=e,se.s=e),e}}function Se(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}Se.prototype.brand=ii,Se.prototype.h=function(){return!0},Se.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:yn(function(){var n;(n=e.W)==null||n.call(e)}))},Se.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,n=t.x;r!==void 0&&(r.x=n,t.e=void 0),n!==void 0&&(n.e=r,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&yn(function(){var s;(s=e.Z)==null||s.call(e)}))}},Se.prototype.subscribe=function(t){var e=this;return dr(function(){var r=e.value,n=se;se=void 0;try{t(r)}finally{se=n}},{name:"sub"})},Se.prototype.valueOf=function(){return this.value},Se.prototype.toString=function(){return this.value+""},Se.prototype.toJSON=function(){return this.value},Se.prototype.peek=function(){var t=se;se=void 0;try{return this.value}finally{se=t}},Object.defineProperty(Se.prototype,"value",{get:function(){var t=vn(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(lr>100)throw new Error("Cycle detected");this.v=t,this.i++,Yt++,Ke++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{ur()}}}});function ai(t,e){return new Se(t,e)}function xn(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function wn(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Sn(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Xe(t,e){Se.call(this,void 0),this.x=t,this.s=void 0,this.g=Yt-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}Xe.prototype=new Se,Xe.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Yt))return!0;if(this.g=Yt,this.f|=1,this.i>0&&!xn(this))return this.f&=-2,!0;var t=se;try{wn(this),se=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return se=t,Sn(this),this.f&=-2,!0},Xe.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}Se.prototype.S.call(this,t)},Xe.prototype.U=function(t){if(this.t!==void 0&&(Se.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Xe.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Object.defineProperty(Xe.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=vn(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function Tn(t){var e=t.u;if(t.u=void 0,typeof e=="function"){Ke++;var r=se;se=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,fr(t),n}finally{se=r,ur()}}}function fr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Tn(t)}function ci(t){if(se!==this)throw new Error("Out-of-order effect");Sn(this),se=t,this.f&=-2,8&this.f&&fr(this),ur()}function Je(t,e){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}Je.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Je.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Tn(this),wn(this),Ke++;var t=se;return se=this,ci.bind(this,t)},Je.prototype.N=function(){2&this.f||(this.f|=2,this.o=wt,wt=this)},Je.prototype.d=function(){this.f|=8,1&this.f||fr(this)},Je.prototype.dispose=function(){this.d()};function dr(t,e){var r=new Je(t,e);try{r.c()}catch(s){throw r.d(),s}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}var hr={exports:{}},pr={},Pn;function ui(){if(Pn)return pr;Pn=1;var t=f;function e(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,s=t.useEffect,o=t.useLayoutEffect,i=t.useDebugValue;function a(y,x){var l=x(),d=n({inst:{value:l,getSnapshot:x}}),h=d[0].inst,g=d[1];return o(function(){h.value=l,h.getSnapshot=x,u(h)&&g({inst:h})},[y,l,x]),s(function(){return u(h)&&g({inst:h}),y(function(){u(h)&&g({inst:h})})},[y]),i(l),l}function u(y){var x=y.getSnapshot;y=y.value;try{var l=x();return!r(y,l)}catch{return!0}}function b(y,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b:a;return pr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,pr}var En={},Cn;function li(){return Cn||(Cn=1,process.env.NODE_ENV!=="production"&&(function(){function t(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}function e(l,d){p||s.startTransition===void 0||(p=!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 h=d();if(!y){var g=d();o(h,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),y=!0)}g=i({inst:{value:h,getSnapshot:d}});var v=g[0].inst,k=g[1];return u(function(){v.value=h,v.getSnapshot=d,r(v)&&k({inst:v})},[l,h,d]),a(function(){return r(v)&&k({inst:v}),l(function(){r(v)&&k({inst:v})})},[l]),b(h),h}function r(l){var d=l.getSnapshot;l=l.value;try{var h=d();return!o(l,h)}catch{return!0}}function n(l,d){return d()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=f,o=typeof Object.is=="function"?Object.is:t,i=s.useState,a=s.useEffect,u=s.useLayoutEffect,b=s.useDebugValue,p=!1,y=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;En.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),En}var kn;function fi(){return kn||(kn=1,process.env.NODE_ENV==="production"?hr.exports=ui():hr.exports=li()),hr.exports}var di=fi(),hi=f.version.split(".").map(Number)[0],On=[],pi=Symbol.for(hi>=19?"react.transitional.element":"react.element"),We,Dn=Symbol.dispose||Symbol.for("Symbol.dispose");function mr(t,e){var r=e.effect.S();return We=e,mi.bind(e,t,r)}function mi(t,e){e(),We=t}var Nn,br,_n=function(){},bi=((Nn={o:0,effect:{s:void 0,c:function(){},S:function(){return _n},d:function(){}},subscribe:function(){return _n},getSnapshot:function(){return 0},S:function(){},f:function(){}})[Dn]=function(){},Nn),gi=Promise.prototype.then.bind(Promise.resolve());function yi(){br||(br=gi(vi))}function vi(){var t;br=void 0,(t=We)==null||t.f()}function xi(t){yi();var e=f.useRef();e.current==null&&(typeof window>"u"?e.current=bi:e.current=(function(n){var s,o,i,a,u=0,b=dr(function(){o=this});return o.c=function(){u=u+1|0,a&&a()},(s={o:n,effect:o,subscribe:function(p){return a=p,function(){u=u+1|0,a=void 0,b()}},getSnapshot:function(){return u},S:function(){if(We!=null){var p=We.o,y=this.o;p==0&&y==0||p==0&&y==1?(We.f(),i=mr(void 0,this)):p==1&&y==0||p==2&&y==0||(i=mr(We,this))}else i=mr(void 0,this)},f:function(){var p=i;i=void 0,p?.()}})[Dn]=function(){this.f()},s})(t));var r=e.current;return di.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot),r.S(),r}Object.defineProperties(Se.prototype,{$$typeof:{configurable:!0,value:pi},type:{configurable:!0,value:function(t){var e=t.data,r=xi(1);try{return e.value}finally{r.f()}}},props:{configurable:!0,get:function(){return{data:this}}},ref:{configurable:!0,value:null}});function Fe(t,e){return f.useMemo(function(){return ai(t,e)},On)}function et(t,e){var r=f.useRef(t);r.current=t,f.useEffect(function(){return dr(function(){return r.current()},e)},On)}const jn=f.createContext(void 0),In=()=>f.useContext(jn),wi=(t,e)=>{const{name:r,value:n,checked:s=!1,partial:o=!1,readOnly:i=!1,onChange:a,children:u,className:b}=t,[p,y]=f.useState(r),[x,l]=f.useState(i),d=f.useRef(void 0),h=f.useRef(void 0),g=f.useRef(void 0),v=f.useRef(void 0),k=f.useRef(void 0),j=f.useRef(void 0),D=In(),T=Ht(),H=f.useId(),V=f.useMemo(()=>T?.sharedId||t.id||H,[T?.sharedId,t.id,H]),[B,L,G]=si({checked:!1,partial:!1}),X=bn(s),F=bn(o);f.useEffect(()=>{if(B.initial)L({checked:o?!1:s,partial:o});else{const U=X.changed?s:B.value.checked,Q=F.changed?o:B.value.partial;L({checked:Q?!1:U,partial:Q})}},[s,o]),f.useEffect(()=>{l(i)},[i]),f.useEffect(()=>{D&&(d.current=D.nameSignal,h.current=D.valueSignal,g.current=D.readOnlySignal,v.current=D.useComparator,k.current=D.compare,j.current=D.onCheckboxChange)},[D]),et(()=>{if(h.current)if(v.current?.value&&k.current){const U=k.current,Q=h.current.value?.some(Y=>U(n,Y))??!1;L(Y=>({...Y,checked:Q}))}else{const U=h.current.value?.some(Q=>n===Q)??!1;L(Q=>({...Q,checked:U}))}}),et(()=>{d.current&&y(d.current.value)}),et(()=>{g.current&&l(g.current.value??!1)});const I=vt(U=>{const Q=G.current?.value.partial===!0?!0:U.target.checked;L({checked:Q,partial:!1}),j.current?j.current({originalEvent:U,name:p,value:n,checked:Q}):a?.({originalEvent:U,name:p,value:n,checked:Q})}),N=U=>{const Q={checked:U?!1:G.current?.value.checked??!1,partial:U};L(Q)},_=U=>{L({checked:U,partial:!1})};f.useImperativeHandle(e,()=>({setPartiallyChecked:N,setChecked:_}));const A=p&&we.jsx(cr,{id:V,name:p,type:"checkbox",checked:B.value.checked,readOnly:x,onChange:I});return xt({wrapperElement:"label",renderProps:{...B.value,readOnly:x},elementProps:{htmlFor:V},className:b,innerWrapperElement:A,children:u})},Mn=f.memo(f.forwardRef(wi)),Si=(t,e)=>t&&e&&typeof t=="object"&&typeof e=="object"&&"value"in t&&"value"in e?t.value===e.value:t===e,Ln=(t=Si)=>vt((e,r)=>{if(typeof t=="string"){const n=t;return e?.[n]===r?.[n]}return t(e,r)}),An=({props:t,children:e})=>we.jsx(jn.Provider,{value:t,children:e}),Ti=({name:t,value:e,comparator:r,readOnly:n=!1,onChange:s,className:o,children:i})=>{const a=Fe(),u=Fe(),b=Fe(),p=Fe(),y=Ln(r),x=vt(d=>{if(d){const{checked:h}=d,g=d.value;if(u.value)if(r)if(h)u.value.findIndex(v=>y(g,v))===-1&&u.value.push(g);else{const v=u.value.filter(k=>!y(g,k));u.value=[...v]}else if(h)u.value.indexOf(g)===-1&&u.value.push(g);else{const v=u.value.filter(k=>k!==g);u.value=[...v]}else h&&(u.value=[g])}s?.({originalEvent:d?.originalEvent,name:t,value:u.value})}),l=f.useMemo(()=>({nameSignal:a,valueSignal:u,readOnlySignal:b,useComparator:p,compare:y,onCheckboxChange:x}),[]);return f.useEffect(()=>{a.value=t},[t]),f.useEffect(()=>{u.value=e},[e]),f.useEffect(()=>{b.value=n},[n]),f.useEffect(()=>{p.value=r!==void 0},[r]),we.jsx("div",{className:o,children:we.jsx(An,{props:l,children:i})})},Rn=f.memo(Ti),tt=({className:t,children:e})=>{const r=f.useId(),n=f.useMemo(()=>({sharedId:r}),[r]),s=we.jsx(gn.Provider,{value:n,children:e});return xt({wrapperElement:"div",className:t,children:s})},Pi=({htmlFor:t,className:e,children:r})=>{const n=Ht(),s=f.useMemo(()=>n?.sharedId||t,[n?.sharedId,t]);return xt({wrapperElement:"label",elementProps:{htmlFor:s},className:e,children:r})};var Fn={exports:{}},$n;function Ei(){return $n||($n=1,(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,n(a)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)e.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(Fn)),Fn.exports}Ei();const Ci=({intersectionObserver:t,resizeObserver:e,page:r,height:n,children:s})=>{const o=f.useRef(void 0);f.useEffect(()=>()=>{o.current&&(t?.unobserve(o.current),e?.unobserve(o.current))},[]),f.useEffect(()=>(o.current&&t?.observe(o.current),()=>{o.current&&t&&t.unobserve(o.current)}),[t]);const i=u=>{o.current&&(t?.unobserve(o.current),e?.unobserve(o.current)),t?.observe(u),e?.observe(u),o.current=u},a=n?{height:`${n}px`}:{};return we.jsx("div",{"data-page":r,"data-name":"page",style:a,ref:u=>{u&&i(u)},children:s})};f.memo(Ci);const ki=({intersectionObserver:t,page:e})=>{const r=f.useRef(void 0);f.useEffect(()=>()=>{r.current&&t?.unobserve(r.current)},[]);const n=s=>{r.current&&t?.unobserve(r.current),t?.observe(s),r.current=s};return we.jsx("div",{"data-page":e,"data-name":"marker",ref:s=>{s&&n(s)}})};f.memo(ki);const Oi=({name:t,value:e,comparator:r,readOnly:n=!1,onChange:s,className:o,children:i})=>{const a=Fe(),u=Fe(),b=Fe(),p=Fe(),y=Ln(r),x=f.useMemo(()=>({nameSignal:a,valueSignal:u,readOnlySignal:b,useComparator:p,compare:y}),[]);f.useEffect(()=>{a.value=t},[t]),f.useEffect(()=>{u.value=e},[e]),f.useEffect(()=>{b.value=n},[n]),f.useEffect(()=>{p.value=r!==void 0},[r]);const l=vt(d=>{s?.({originalEvent:d,name:t,value:u.value})});return we.jsx("div",{className:o,onChange:l,children:we.jsx(An,{props:x,children:i})})},Hn=f.memo(Oi),Di=({value:t,className:e,children:r})=>{const[n,s]=f.useState(),[o,i]=f.useState(!1),[a,u]=f.useState(!1),b=f.useRef(void 0),p=f.useRef(void 0),y=f.useRef(void 0),x=f.useRef(void 0),l=f.useRef(void 0),d=In(),h=Ht(),g=f.useId(),v=f.useMemo(()=>h?.sharedId||g,[h?.sharedId,g]);f.useEffect(()=>{d&&(b.current=d.nameSignal,p.current=d.valueSignal,y.current=d.readOnlySignal,x.current=d.useComparator,l.current=d.compare)},[d]),et(()=>{x&&p.current&&l.current?i(l.current(t,p.current.value)):i(t===p.current?.value)}),et(()=>{s(b.current?.value)}),et(()=>{u(y.current?.value??!1)});const k=vt(j=>{j.target.checked&&p.current&&(p.current.value=t)});return xt({wrapperElement:"label",renderProps:{checked:o,readOnly:a},elementProps:{htmlFor:v},className:e,innerWrapperElement:n?we.jsx(cr,{id:v,name:n,type:"radio",value:t,checked:o,readOnly:a,onChange:k}):null,children:r})},Yn=f.memo(Di),Ni=(t,e)=>{const{id:r,name:n,value:s,toggled:o=!1,readOnly:i,onChange:a,children:u,className:b}=t,[p,y]=f.useState(o),x=Ht(),l=f.useId(),d=f.useMemo(()=>x?.sharedId||r||l,[x?.sharedId,r,l]);f.useEffect(()=>{y(o)},[o]);const h=v=>{y(v.target.checked),a?.({originalEvent:v,name:n,value:s,checked:v.target.checked})},g=v=>{y(v)};return f.useImperativeHandle(e,()=>({setToggled:g})),xt({wrapperElement:"label",renderProps:{toggled:p,readOnly:i},elementProps:{htmlFor:d},className:b,innerWrapperElement:we.jsx(cr,{id:d,name:n,type:"checkbox",checked:p,readOnly:i,onChange:h}),children:u})},_i=f.memo(f.forwardRef(Ni)),gr=t=>{const[e,r]=f.useState(!0),n=un();return f.useEffect(()=>{n&&n.useAnimations!==void 0?r(n.useAnimations):t!==void 0&&r(t)},[n,t]),e},Ie=({label:t,htmlFor:e,readOnly:r=!1,className:n})=>{const s=te("bc-label",{"bsc:text-black bsc:dark:text-mono-light-1":!r,"bc-read-only bsc:text-gray-4 bsc:dark:text-mono-light-3 bsc:pointer-events-none":r},n);return m.jsx(Pi,{htmlFor:e,className:s,children:t})},ji=(t,e)=>{const{name:r,label:n,value:s,readOnly:o=!1,checked:i=!1,partial:a=!1,labelLocation:u=Ee.Right,className:b,useAnimation:p,onChange:y}=t,x=gr(p),l=te("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",b),d=te("bc-checkbox-label bsc:peer-data-read-only:text-gray-4 bsc:dark:peer-data-read-only:text-mono-light-3",{"bsc:ml-2":u===Ee.Right,"bsc:mr-2":u===Ee.Left}),h=gt(Ze.FocusWithin),g=te("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]",h),v=te("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 m.jsxs(tt,{className:l,children:[n&&u===Ee.Left&&m.jsx(Ie,{label:n,readOnly:o,className:d}),m.jsx(Mn,{ref:e,name:r,value:s,checked:i,partial:a,readOnly:o,className:g,onChange:y,children:m.jsxs("svg",{viewBox:"0 0 21 21",className:v,children:[m.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-checked/checkbox:visible",points:"5 10.75 8.5 14.25 16 6"}),m.jsx("polyline",{className:"bsc:[visibility:hidden] bsc:group-data-partial/checkbox:visible",points:"6 10.5 16 10.5"})]})}),n&&u===Ee.Right&&m.jsx(Ie,{label:n,readOnly:o,className:d})]})},Vn=f.memo(f.forwardRef(ji)),Vt=t=>t==null?!1:typeof t=="object",Wn=t=>t instanceof Date,Bn=t=>typeof t=="function",zn=t=>{const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e==="bigint"},yr=t=>{if(!Vt(t))return t;const e={},r=Object.keys(t);for(let n=0,s=r.length;n<s;n++){const o=r[n],i=t[o];zn(i)||Bn(i)?e[o]=i:Wn(i)?e[o]=new Date(i.getTime()):Array.isArray(i)?e[o]=vr(i):Vt(i)&&(e[o]=yr(i))}return e},vr=t=>{let e=t.length;const r=new Array(e);for(;e--!==0;){const n=t[e];zn(n)||Bn(n)?r[e]=n:Wn(n)?r[e]=new Date(n.getTime()):Vt(n)&&!Array.isArray(n)?r[e]=yr(n):Array.isArray(n)?r[e]=vr(n):r[e]=n}return r},Ii=t=>Vt(t)?Array.isArray(t)?vr(t):yr(t):t;function Mi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Un,qn;function Li(){return qn||(qn=1,Un=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}),Un}var Ai=Li();const Ri=Mi(Ai);function Fi(t,e){for(let r=t.length;r--!==0;)if(!Ri(t[r],e[r]))return!0;return!1}const xr=(t,e)=>{const r=f.useRef([]),n=r.current.length>0&&r.current[0]&&Fi(r.current[0],e);return(r.current.length===0||n)&&(r.current=[Ii(e),t()]),r.current[1]},$i=t=>{const[e,r]=f.useState(t),n=f.useRef(t);return n.current!==e&&(n.current=e),[e,r,n]},Hi=({name:t,label:e,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:a=xe.Vertical,className:u,onChange:b})=>{const[p,y]=f.useState([]),x=xr(()=>n,[n]);f.useEffect(()=>{y(r??[])},[r]);const l=k=>{if(k){const{value:j}=k;y(j??[]),b?.({name:t,value:j})}},d=(k,j)=>m.jsx(Vn,{label:k[s],value:k[o],className:"bsc:mr-3"},`${t}_checkbox_${j}`),h=te("bsc:flex bsc:flex-col bsc:gap-1",u),g=te("bsc:flex bsc:gap-1",{"bsc:flex-col":a===xe.Vertical}),v=k=>m.jsx(Rn,{name:t,value:p,readOnly:i,onChange:l,className:g,children:k.map(d)});return m.jsxs("div",{className:h,children:[e&&m.jsx(Ie,{label:e,readOnly:i}),x&&v(x)]})},Yi=f.memo(Hi);var Gn=typeof global=="object"&&global&&global.Object===Object&&global,Vi=typeof self=="object"&&self&&self.Object===Object&&self,ke=Gn||Vi||Function("return this")(),rt=ke.Symbol,Qn=Object.prototype,Wi=Qn.hasOwnProperty,Bi=Qn.toString,St=rt?rt.toStringTag:void 0;function zi(t){var e=Wi.call(t,St),r=t[St];try{t[St]=void 0;var n=!0}catch{}var s=Bi.call(t);return n&&(e?t[St]=r:delete t[St]),s}var Ui=Object.prototype,qi=Ui.toString;function Gi(t){return qi.call(t)}var Qi="[object Null]",Zi="[object Undefined]",Zn=rt?rt.toStringTag:void 0;function nt(t){return t==null?t===void 0?Zi:Qi:Zn&&Zn in Object(t)?zi(t):Gi(t)}function st(t){return t!=null&&typeof t=="object"}var Ki="[object Symbol]";function Xi(t){return typeof t=="symbol"||st(t)&&nt(t)==Ki}var wr=Array.isArray,Ji=/\s/;function ea(t){for(var e=t.length;e--&&Ji.test(t.charAt(e)););return e}var ta=/^\s+/;function ra(t){return t&&t.slice(0,ea(t)+1).replace(ta,"")}function $e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Kn=NaN,na=/^[-+]0x[0-9a-f]+$/i,sa=/^0b[01]+$/i,oa=/^0o[0-7]+$/i,ia=parseInt;function Xn(t){if(typeof t=="number")return t;if(Xi(t))return Kn;if($e(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=$e(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ra(t);var r=sa.test(t);return r||oa.test(t)?ia(t.slice(2),r?2:8):na.test(t)?Kn:+t}var aa="[object AsyncFunction]",ca="[object Function]",ua="[object GeneratorFunction]",la="[object Proxy]";function Jn(t){if(!$e(t))return!1;var e=nt(t);return e==ca||e==ua||e==aa||e==la}var Sr=ke["__core-js_shared__"],es=(function(){var t=/[^.]+$/.exec(Sr&&Sr.keys&&Sr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function fa(t){return!!es&&es in t}var da=Function.prototype,ha=da.toString;function Be(t){if(t!=null){try{return ha.call(t)}catch{}try{return t+""}catch{}}return""}var pa=/[\\^$.*+?()[\]{}|]/g,ma=/^\[object .+?Constructor\]$/,ba=Function.prototype,ga=Object.prototype,ya=ba.toString,va=ga.hasOwnProperty,xa=RegExp("^"+ya.call(va).replace(pa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wa(t){if(!$e(t)||fa(t))return!1;var e=Jn(t)?xa:ma;return e.test(Be(t))}function Sa(t,e){return t?.[e]}function ze(t,e){var r=Sa(t,e);return wa(r)?r:void 0}var Tr=ze(ke,"WeakMap"),ts=Object.create,Ta=(function(){function t(){}return function(e){if(!$e(e))return{};if(ts)return ts(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),rs=(function(){try{var t=ze(Object,"defineProperty");return t({},"",{}),t}catch{}})();function Pa(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var Ea=9007199254740991,Ca=/^(?:0|[1-9]\d*)$/;function ka(t,e){var r=typeof t;return e=e??Ea,!!e&&(r=="number"||r!="symbol"&&Ca.test(t))&&t>-1&&t%1==0&&t<e}function Oa(t,e,r){e=="__proto__"&&rs?rs(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ns(t,e){return t===e||t!==t&&e!==e}var Da=Object.prototype,Na=Da.hasOwnProperty;function _a(t,e,r){var n=t[e];(!(Na.call(t,e)&&ns(n,r))||r===void 0&&!(e in t))&&Oa(t,e,r)}var ja=9007199254740991;function ss(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ja}function Ia(t){return t!=null&&ss(t.length)&&!Jn(t)}var Ma=Object.prototype;function os(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Ma;return t===r}function La(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Aa="[object Arguments]";function is(t){return st(t)&&nt(t)==Aa}var as=Object.prototype,Ra=as.hasOwnProperty,Fa=as.propertyIsEnumerable,$a=is((function(){return arguments})())?is:function(t){return st(t)&&Ra.call(t,"callee")&&!Fa.call(t,"callee")};function Ha(){return!1}var cs=typeof K=="object"&&K&&!K.nodeType&&K,us=cs&&typeof module=="object"&&module&&!module.nodeType&&module,Ya=us&&us.exports===cs,ls=Ya?ke.Buffer:void 0,Va=ls?ls.isBuffer:void 0,fs=Va||Ha,Wa="[object Arguments]",Ba="[object Array]",za="[object Boolean]",Ua="[object Date]",qa="[object Error]",Ga="[object Function]",Qa="[object Map]",Za="[object Number]",Ka="[object Object]",Xa="[object RegExp]",Ja="[object Set]",ec="[object String]",tc="[object WeakMap]",rc="[object ArrayBuffer]",nc="[object DataView]",sc="[object Float32Array]",oc="[object Float64Array]",ic="[object Int8Array]",ac="[object Int16Array]",cc="[object Int32Array]",uc="[object Uint8Array]",lc="[object Uint8ClampedArray]",fc="[object Uint16Array]",dc="[object Uint32Array]",le={};le[sc]=le[oc]=le[ic]=le[ac]=le[cc]=le[uc]=le[lc]=le[fc]=le[dc]=!0,le[Wa]=le[Ba]=le[rc]=le[za]=le[nc]=le[Ua]=le[qa]=le[Ga]=le[Qa]=le[Za]=le[Ka]=le[Xa]=le[Ja]=le[ec]=le[tc]=!1;function hc(t){return st(t)&&ss(t.length)&&!!le[nt(t)]}function Pr(t){return function(e){return t(e)}}var ds=typeof K=="object"&&K&&!K.nodeType&&K,Tt=ds&&typeof module=="object"&&module&&!module.nodeType&&module,pc=Tt&&Tt.exports===ds,Er=pc&&Gn.process,ot=(function(){try{var t=Tt&&Tt.require&&Tt.require("util").types;return t||Er&&Er.binding&&Er.binding("util")}catch{}})(),hs=ot&&ot.isTypedArray,mc=hs?Pr(hs):hc,bc=Object.prototype,gc=bc.hasOwnProperty;function yc(t,e){var r=wr(t),n=!r&&$a(t),s=!r&&!n&&fs(t),o=!r&&!n&&!s&&mc(t),i=r||n||s||o,a=i?La(t.length,String):[],u=a.length;for(var b in t)gc.call(t,b)&&!(i&&(b=="length"||s&&(b=="offset"||b=="parent")||o&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||ka(b,u)))&&a.push(b);return a}function ps(t,e){return function(r){return t(e(r))}}var vc=ps(Object.keys,Object),xc=Object.prototype,wc=xc.hasOwnProperty;function Sc(t){if(!os(t))return vc(t);var e=[];for(var r in Object(t))wc.call(t,r)&&r!="constructor"&&e.push(r);return e}function Tc(t){return Ia(t)?yc(t):Sc(t)}var Pt=ze(Object,"create");function Pc(){this.__data__=Pt?Pt(null):{},this.size=0}function Ec(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Cc="__lodash_hash_undefined__",kc=Object.prototype,Oc=kc.hasOwnProperty;function Dc(t){var e=this.__data__;if(Pt){var r=e[t];return r===Cc?void 0:r}return Oc.call(e,t)?e[t]:void 0}var Nc=Object.prototype,_c=Nc.hasOwnProperty;function jc(t){var e=this.__data__;return Pt?e[t]!==void 0:_c.call(e,t)}var Ic="__lodash_hash_undefined__";function Mc(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Pt&&e===void 0?Ic:e,this}function Ue(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ue.prototype.clear=Pc,Ue.prototype.delete=Ec,Ue.prototype.get=Dc,Ue.prototype.has=jc,Ue.prototype.set=Mc;function Lc(){this.__data__=[],this.size=0}function Wt(t,e){for(var r=t.length;r--;)if(ns(t[r][0],e))return r;return-1}var Ac=Array.prototype,Rc=Ac.splice;function Fc(t){var e=this.__data__,r=Wt(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Rc.call(e,r,1),--this.size,!0}function $c(t){var e=this.__data__,r=Wt(e,t);return r<0?void 0:e[r][1]}function Hc(t){return Wt(this.__data__,t)>-1}function Yc(t,e){var r=this.__data__,n=Wt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Me(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Me.prototype.clear=Lc,Me.prototype.delete=Fc,Me.prototype.get=$c,Me.prototype.has=Hc,Me.prototype.set=Yc;var Et=ze(ke,"Map");function Vc(){this.size=0,this.__data__={hash:new Ue,map:new(Et||Me),string:new Ue}}function Wc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Bt(t,e){var r=t.__data__;return Wc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Bc(t){var e=Bt(this,t).delete(t);return this.size-=e?1:0,e}function zc(t){return Bt(this,t).get(t)}function Uc(t){return Bt(this,t).has(t)}function qc(t,e){var r=Bt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function it(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}it.prototype.clear=Vc,it.prototype.delete=Bc,it.prototype.get=zc,it.prototype.has=Uc,it.prototype.set=qc;function Gc(t,e){for(var r=-1,n=e.length,s=t.length;++r<n;)t[s+r]=e[r];return t}var Qc=ps(Object.getPrototypeOf,Object);function Zc(){this.__data__=new Me,this.size=0}function Kc(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Xc(t){return this.__data__.get(t)}function Jc(t){return this.__data__.has(t)}var eu=200;function tu(t,e){var r=this.__data__;if(r instanceof Me){var n=r.__data__;if(!Et||n.length<eu-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new it(n)}return r.set(t,e),this.size=r.size,this}function at(t){var e=this.__data__=new Me(t);this.size=e.size}at.prototype.clear=Zc,at.prototype.delete=Kc,at.prototype.get=Xc,at.prototype.has=Jc,at.prototype.set=tu;var ms=typeof K=="object"&&K&&!K.nodeType&&K,bs=ms&&typeof module=="object"&&module&&!module.nodeType&&module,ru=bs&&bs.exports===ms,gs=ru?ke.Buffer:void 0;gs&&gs.allocUnsafe;function nu(t,e){return t.slice()}function su(t,e){for(var r=-1,n=t==null?0:t.length,s=0,o=[];++r<n;){var i=t[r];e(i,r,t)&&(o[s++]=i)}return o}function ou(){return[]}var iu=Object.prototype,au=iu.propertyIsEnumerable,ys=Object.getOwnPropertySymbols,cu=ys?function(t){return t==null?[]:(t=Object(t),su(ys(t),function(e){return au.call(t,e)}))}:ou;function uu(t,e,r){var n=e(t);return wr(t)?n:Gc(n,r(t))}function lu(t){return uu(t,Tc,cu)}var Cr=ze(ke,"DataView"),kr=ze(ke,"Promise"),Or=ze(ke,"Set"),vs="[object Map]",fu="[object Object]",xs="[object Promise]",ws="[object Set]",Ss="[object WeakMap]",Ts="[object DataView]",du=Be(Cr),hu=Be(Et),pu=Be(kr),mu=Be(Or),bu=Be(Tr),Le=nt;(Cr&&Le(new Cr(new ArrayBuffer(1)))!=Ts||Et&&Le(new Et)!=vs||kr&&Le(kr.resolve())!=xs||Or&&Le(new Or)!=ws||Tr&&Le(new Tr)!=Ss)&&(Le=function(t){var e=nt(t),r=e==fu?t.constructor:void 0,n=r?Be(r):"";if(n)switch(n){case du:return Ts;case hu:return vs;case pu:return xs;case mu:return ws;case bu:return Ss}return e});var gu=Object.prototype,yu=gu.hasOwnProperty;function vu(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&yu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Ps=ke.Uint8Array;function Dr(t){var e=new t.constructor(t.byteLength);return new Ps(e).set(new Ps(t)),e}function xu(t,e){var r=Dr(t.buffer);return new t.constructor(r,t.byteOffset,t.byteLength)}var wu=/\w*$/;function Su(t){var e=new t.constructor(t.source,wu.exec(t));return e.lastIndex=t.lastIndex,e}var Es=rt?rt.prototype:void 0,Cs=Es?Es.valueOf:void 0;function Tu(t){return Cs?Object(Cs.call(t)):{}}function Pu(t,e){var r=Dr(t.buffer);return new t.constructor(r,t.byteOffset,t.length)}var Eu="[object Boolean]",Cu="[object Date]",ku="[object Map]",Ou="[object Number]",Du="[object RegExp]",Nu="[object Set]",_u="[object String]",ju="[object Symbol]",Iu="[object ArrayBuffer]",Mu="[object DataView]",Lu="[object Float32Array]",Au="[object Float64Array]",Ru="[object Int8Array]",Fu="[object Int16Array]",$u="[object Int32Array]",Hu="[object Uint8Array]",Yu="[object Uint8ClampedArray]",Vu="[object Uint16Array]",Wu="[object Uint32Array]";function Bu(t,e,r){var n=t.constructor;switch(e){case Iu:return Dr(t);case Eu:case Cu:return new n(+t);case Mu:return xu(t);case Lu:case Au:case Ru:case Fu:case $u:case Hu:case Yu:case Vu:case Wu:return Pu(t);case ku:return new n;case Ou:case _u:return new n(t);case Du:return Su(t);case Nu:return new n;case ju:return Tu(t)}}function zu(t){return typeof t.constructor=="function"&&!os(t)?Ta(Qc(t)):{}}var Uu="[object Map]";function qu(t){return st(t)&&Le(t)==Uu}var ks=ot&&ot.isMap,Gu=ks?Pr(ks):qu,Qu="[object Set]";function Zu(t){return st(t)&&Le(t)==Qu}var Os=ot&&ot.isSet,Ku=Os?Pr(Os):Zu,Ds="[object Arguments]",Xu="[object Array]",Ju="[object Boolean]",el="[object Date]",tl="[object Error]",Ns="[object Function]",rl="[object GeneratorFunction]",nl="[object Map]",sl="[object Number]",_s="[object Object]",ol="[object RegExp]",il="[object Set]",al="[object String]",cl="[object Symbol]",ul="[object WeakMap]",ll="[object ArrayBuffer]",fl="[object DataView]",dl="[object Float32Array]",hl="[object Float64Array]",pl="[object Int8Array]",ml="[object Int16Array]",bl="[object Int32Array]",gl="[object Uint8Array]",yl="[object Uint8ClampedArray]",vl="[object Uint16Array]",xl="[object Uint32Array]",ce={};ce[Ds]=ce[Xu]=ce[ll]=ce[fl]=ce[Ju]=ce[el]=ce[dl]=ce[hl]=ce[pl]=ce[ml]=ce[bl]=ce[nl]=ce[sl]=ce[_s]=ce[ol]=ce[il]=ce[al]=ce[cl]=ce[gl]=ce[yl]=ce[vl]=ce[xl]=!0,ce[tl]=ce[Ns]=ce[ul]=!1;function zt(t,e,r,n,s,o){var i;if(i!==void 0)return i;if(!$e(t))return t;var a=wr(t);if(a)i=vu(t);else{var u=Le(t),b=u==Ns||u==rl;if(fs(t))return nu(t);if(u==_s||u==Ds||b&&!s)i=b?{}:zu(t);else{if(!ce[u])return s?t:{};i=Bu(t,u)}}o||(o=new at);var p=o.get(t);if(p)return p;o.set(t,i),Ku(t)?t.forEach(function(l){i.add(zt(l,e,r,l,t,o))}):Gu(t)&&t.forEach(function(l,d){i.set(d,zt(l,e,r,d,t,o))});var y=lu,x=a?void 0:y(t);return Pa(x||t,function(l,d){x&&(d=l,l=t[d]),_a(i,d,zt(l,e,r,d,t,o))}),i}var wl=1,Sl=4;function Tl(t){return zt(t,wl|Sl)}var Nr=function(){return ke.Date.now()},Pl="Expected a function",El=Math.max,Cl=Math.min;function Ct(t,e,r){var n,s,o,i,a,u,b=0,p=!1,y=!1,x=!0;if(typeof t!="function")throw new TypeError(Pl);e=Xn(e)||0,$e(r)&&(p=!!r.leading,y="maxWait"in r,o=y?El(Xn(r.maxWait)||0,e):o,x="trailing"in r?!!r.trailing:x);function l(H){var V=n,B=s;return n=s=void 0,b=H,i=t.apply(B,V),i}function d(H){return b=H,a=setTimeout(v,e),p?l(H):i}function h(H){var V=H-u,B=H-b,L=e-V;return y?Cl(L,o-B):L}function g(H){var V=H-u,B=H-b;return u===void 0||V>=e||V<0||y&&B>=o}function v(){var H=Nr();if(g(H))return k(H);a=setTimeout(v,h(H))}function k(H){return a=void 0,x&&n?l(H):(n=s=void 0,i)}function j(){a!==void 0&&clearTimeout(a),b=0,n=u=s=a=void 0}function D(){return a===void 0?i:k(Nr())}function T(){var H=Nr(),V=g(H);if(n=arguments,s=this,u=H,V){if(a===void 0)return d(u);if(y)return clearTimeout(a),a=setTimeout(v,e),l(u)}return a===void 0&&(a=setTimeout(v,e)),i}return T.cancel=j,T.flush=D,T}var kl="Expected a function";function Ol(t,e,r){var n=!0,s=!0;if(typeof t!="function")throw new TypeError(kl);return $e(r)&&(n="leading"in r?!0:n,s="trailing"in r?!!r.trailing:s),Ct(t,e,{leading:n,maxWait:e,trailing:s})}const Dl=(t,e)=>{const{value:r,readOnly:n=!1,debounceTime:s=800,fillContainer:o=!0,leftElement:i,rightElement:a,className:u,leftElementClassName:b,rightElementClassName:p,isSingleLine:y=!0,allowSingleLineScroll:x=!1,inputMode:l,placeholder:d,onFocus:h,onBlur:g,onInput:v,onInnerTextChange:k,onInnerHTMLChange:j,onElementCreate:D,onLeftElementClick:T,onRightElementClick:H}=t,V=f.useRef("bsc:grow bsc:focus:outline-hidden"),B=f.useRef("bsc:text-gray-4"),L=f.useRef(void 0),G=f.useCallback(S=>{const C=S.target,W=C.innerHTML;C.className=`${V.current}`,d&&W===d&&(C.innerHTML=""),h?.(S)},[d,h]),X=f.useCallback(S=>{const C=S.target.innerHTML;if(d&&C===""){const W=S.target;W.innerHTML=d,W.className=`${V.current} ${B.current}`}g?.(S)},[d,g]),F=f.useCallback(S=>{L.current?.removeEventListener("focus",G),L.current?.removeEventListener("blur",X),d&&S&&S!==document.activeElement&&S.innerHTML===""&&(S.innerHTML=d,S.className=`${V.current} ${B.current}`),S.addEventListener("focus",G),S.addEventListener("blur",X),L.current=S},[d]),I=f.useCallback(S=>{D?.(S)},[D]),N=S=>{T?.(S)},_=S=>{H?.(S)},A=Ct(S=>{v?.(S),k?.(S.target.innerText),j?.(S.target.innerHTML)},s),U=f.useCallback(S=>{L.current&&(L.current.innerText=S)},[]),Q=f.useCallback(S=>{L.current&&(L.current.innerHTML=S)},[]),Y=f.useCallback(()=>{L.current?.focus()},[]);f.useImperativeHandle(e,()=>({inputElement:L.current,setInnerText:U,setInnerHTML:Q,focus:Y}));const P=te({"bsc:w-full ":o},"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":y&&x,"bsc:overflow-hidden bsc:whitespace-pre":y&&!x},u),c=te("bsc:shrink",{"bsc:mr-2":i},b),w=te("bsc:shrink",{"bsc:ml-2":a},p);return m.jsxs("div",{className:P,ref:S=>{S&&I(S)},children:[i&&m.jsx("div",{className:c,onClick:N,children:i}),m.jsx("div",{ref:S=>{S&&F(S)},className:V.current,contentEditable:!n,suppressContentEditableWarning:!0,inputMode:l,onInput:A,children:r}),a&&m.jsx("div",{className:w,onClick:_,children:a})]})},Ut=f.forwardRef(Dl);function re(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function ue(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function ct(t,e){const r=re(t);return isNaN(e)?ue(t,NaN):(e&&r.setDate(r.getDate()+e),r)}function He(t,e){const r=re(t);if(isNaN(e))return ue(t,NaN);if(!e)return r;const n=r.getDate(),s=ue(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);const o=s.getDate();return n>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),n),r)}const js=6048e5,_r=6e4,jr=36e5,Nl=1e3;let _l={};function kt(){return _l}function Ye(t,e){const r=kt(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=re(t),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function ut(t){return Ye(t,{weekStartsOn:1})}function jl(t){const e=re(t),r=e.getFullYear(),n=ue(t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=ut(n),o=ue(t,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=ut(o);return e.getTime()>=s.getTime()?r+1:e.getTime()>=i.getTime()?r:r-1}function Is(t){const e=re(t);return e.setHours(0,0,0,0),e}function Ms(t){const e=re(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function Il(t){const e=jl(t),r=ue(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),ut(r)}function Ot(t,e){return He(t,e*12)}function Ls(t,e){const r=Is(t),n=Is(e);return+r==+n}function Ml(t){const e=re(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function Ll(t,e){const r=re(t.start),n=re(t.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0);let a=1;const u=[];for(;+i<=o;)u.push(re(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return s?u.reverse():u}function As(t){const e=re(t);return e.setDate(1),e.setHours(0,0,0,0),e}function Al(t,e){const r=re(t.start),n=re(t.end);let s=+r>+n;const o=s?+r:+n,i=s?n:r;i.setHours(0,0,0,0),i.setMonth(0,1);let a=1;const u=[];for(;+i<=o;)u.push(re(i)),i.setFullYear(i.getFullYear()+a);return s?u.reverse():u}const Rl={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"}},Fl=(t,e,r)=>{let n;const s=Rl[t];return typeof s=="string"?n=s:e===1?n=s.one:n=s.other.replace("{{count}}",e.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Ir(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const $l={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Hl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Yl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vl={date:Ir({formats:$l,defaultWidth:"full"}),time:Ir({formats:Hl,defaultWidth:"full"}),dateTime:Ir({formats:Yl,defaultWidth:"full"})},Wl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Bl=(t,e,r,n)=>Wl[t];function Dt(t){return(e,r)=>{const n=r?.context?String(r.context):"standalone";let s;if(n==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=r?.width?String(r.width):i;s=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=r?.width?String(r.width):t.defaultWidth;s=t.values[a]||t.values[i]}const o=t.argumentCallback?t.argumentCallback(e):e;return s[o]}}const zl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ul={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ql={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"]},Gl={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"]},Ql={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"}},Zl={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"}},Kl={ordinalNumber:(t,e)=>{const r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Dt({values:zl,defaultWidth:"wide"}),quarter:Dt({values:Ul,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Dt({values:ql,defaultWidth:"wide"}),day:Dt({values:Gl,defaultWidth:"wide"}),dayPeriod:Dt({values:Ql,defaultWidth:"wide",formattingValues:Zl,defaultFormattingWidth:"wide"})};function Nt(t){return(e,r={})=>{const n=r.width,s=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;const i=o[0],a=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(a)?Jl(a,y=>y.test(i)):Xl(a,y=>y.test(i));let b;b=t.valueCallback?t.valueCallback(u):u,b=r.valueCallback?r.valueCallback(b):b;const p=e.slice(i.length);return{value:b,rest:p}}}function Xl(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function Jl(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function ef(t){return(e,r={})=>{const n=e.match(t.matchPattern);if(!n)return null;const s=n[0],o=e.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const a=e.slice(s.length);return{value:i,rest:a}}}const tf=/^(\d+)(th|st|nd|rd)?/i,rf=/\d+/i,nf={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},sf={any:[/^b/i,/^(a|c)/i]},of={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},af={any:[/1/i,/2/i,/3/i,/4/i]},cf={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},uf={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]},lf={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},ff={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]},df={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},hf={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}},pf={ordinalNumber:ef({matchPattern:tf,parsePattern:rf,valueCallback:t=>parseInt(t,10)}),era:Nt({matchPatterns:nf,defaultMatchWidth:"wide",parsePatterns:sf,defaultParseWidth:"any"}),quarter:Nt({matchPatterns:of,defaultMatchWidth:"wide",parsePatterns:af,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Nt({matchPatterns:cf,defaultMatchWidth:"wide",parsePatterns:uf,defaultParseWidth:"any"}),day:Nt({matchPatterns:lf,defaultMatchWidth:"wide",parsePatterns:ff,defaultParseWidth:"any"}),dayPeriod:Nt({matchPatterns:df,defaultMatchWidth:"any",parsePatterns:hf,defaultParseWidth:"any"})},mf={code:"en-US",formatDistance:Fl,formatLong:Vl,formatRelative:Bl,localize:Kl,match:pf,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bf(t){const e=re(t),r=+ut(e)-+Il(e);return Math.round(r/js)+1}function Rs(t,e){const r=re(t),n=r.getFullYear(),s=kt(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=ue(t,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const a=Ye(i,e),u=ue(t,0);u.setFullYear(n,0,o),u.setHours(0,0,0,0);const b=Ye(u,e);return r.getTime()>=a.getTime()?n+1:r.getTime()>=b.getTime()?n:n-1}function gf(t,e){const r=kt(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=Rs(t,e),o=ue(t,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),Ye(o,e)}function yf(t,e){const r=re(t),n=+Ye(r,e)-+gf(r,e);return Math.round(n/js)+1}const Fs=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},$s=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Hs={p:$s,P:(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Fs(t,e);let o;switch(n){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",Fs(n,e)).replace("{{time}}",$s(s,e))}},vf=/^D+$/,xf=/^Y+$/,wf=["D","DD","YY","YYYY"];function Sf(t){return vf.test(t)}function Tf(t){return xf.test(t)}function Ys(t,e,r){const n=Pf(t,e,r);if(console.warn(n),wf.includes(t))throw new RangeError(n)}function Pf(t,e,r){const n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Mr(t){return re(t).getDay()}function Vs(t){const e=re(t),r=e.getFullYear(),n=e.getMonth(),s=ue(t,0);return s.setFullYear(r,n+1,0),s.setHours(0,0,0,0),s.getDate()}function Ef(){return Object.assign({},kt())}function Cf(t){let r=re(t).getDay();return r===0&&(r=7),r}function kf(t){const e=re(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(0,0,0,0),e}function Of(t,e){const r=re(t),n=re(e);return+r<+n}function Df(t,e){const r=e instanceof Date?ue(e,0):new e(0);return r.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r}const Nf=10;class Ws{subPriority=0;validate(e,r){return!0}}class _f extends Ws{constructor(e,r,n,s,o){super(),this.value=e,this.validateValue=r,this.setValue=n,this.priority=s,o&&(this.subPriority=o)}validate(e,r){return this.validateValue(e,this.value,r)}set(e,r,n){return this.setValue(e,r,this.value,n)}}class jf extends Ws{priority=Nf;subPriority=-1;set(e,r){return r.timestampIsSet?e:ue(e,Df(e,Date))}}class ne{run(e,r,n,s){const o=this.parse(e,r,n,s);return o?{setter:new _f(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,r,n){return!0}}class If extends ne{priority=140;parse(e,r,n){switch(r){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,r,n){return r.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const be={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}/},De={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 ge(t,e){return t&&{value:e(t.value),rest:t.rest}}function he(t,e){const r=e.match(t);return r?{value:parseInt(r[0],10),rest:e.slice(r[0].length)}:null}function Ne(t,e){const r=e.match(t);if(!r)return null;if(r[0]==="Z")return{value:0,rest:e.slice(1)};const n=r[1]==="+"?1:-1,s=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,i=r[5]?parseInt(r[5],10):0;return{value:n*(s*jr+o*_r+i*Nl),rest:e.slice(r[0].length)}}function Bs(t){return he(be.anyDigitsSigned,t)}function pe(t,e){switch(t){case 1:return he(be.singleDigit,e);case 2:return he(be.twoDigits,e);case 3:return he(be.threeDigits,e);case 4:return he(be.fourDigits,e);default:return he(new RegExp("^\\d{1,"+t+"}"),e)}}function qt(t,e){switch(t){case 1:return he(be.singleDigitSigned,e);case 2:return he(be.twoDigitsSigned,e);case 3:return he(be.threeDigitsSigned,e);case 4:return he(be.fourDigitsSigned,e);default:return he(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Lr(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function zs(t,e){const r=e>0,n=r?e:1-e;let s;if(n<=50)s=t||100;else{const o=n+50,i=Math.trunc(o/100)*100,a=t>=o%100;s=t+i-(a?100:0)}return r?s:1-s}function Us(t){return t%400===0||t%4===0&&t%100!==0}class Mf extends ne{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,r,n){const s=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return ge(pe(4,e),s);case"yo":return ge(n.ordinalNumber(e,{unit:"year"}),s);default:return ge(pe(r.length,e),s)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,n){const s=e.getFullYear();if(n.isTwoDigitYear){const i=zs(n.year,s);return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}const o=!("era"in r)||r.era===1?n.year:1-n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Lf extends ne{priority=130;parse(e,r,n){const s=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return ge(pe(4,e),s);case"Yo":return ge(n.ordinalNumber(e,{unit:"year"}),s);default:return ge(pe(r.length,e),s)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,n,s){const o=Rs(e,s);if(n.isTwoDigitYear){const a=zs(n.year,o);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),Ye(e,s)}const i=!("era"in r)||r.era===1?n.year:1-n.year;return e.setFullYear(i,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),Ye(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Af extends ne{priority=130;parse(e,r){return qt(r==="R"?4:r.length,e)}set(e,r,n){const s=ue(e,0);return s.setFullYear(n,0,4),s.setHours(0,0,0,0),ut(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Rf extends ne{priority=130;parse(e,r){return qt(r==="u"?4:r.length,e)}set(e,r,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Ff extends ne{priority=120;parse(e,r,n){switch(r){case"Q":case"QQ":return pe(r.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class $f extends ne{priority=120;parse(e,r,n){switch(r){case"q":case"qq":return pe(r.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Hf extends ne{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,r,n){const s=o=>o-1;switch(r){case"M":return ge(he(be.month,e),s);case"MM":return ge(pe(2,e),s);case"Mo":return ge(n.ordinalNumber(e,{unit:"month"}),s);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}}class Yf extends ne{priority=110;parse(e,r,n){const s=o=>o-1;switch(r){case"L":return ge(he(be.month,e),s);case"LL":return ge(pe(2,e),s);case"Lo":return ge(n.ordinalNumber(e,{unit:"month"}),s);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Vf(t,e,r){const n=re(t),s=yf(n,r)-e;return n.setDate(n.getDate()-s*7),n}class Wf extends ne{priority=100;parse(e,r,n){switch(r){case"w":return he(be.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return pe(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,n,s){return Ye(Vf(e,n,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Bf(t,e){const r=re(t),n=bf(r)-e;return r.setDate(r.getDate()-n*7),r}class zf extends ne{priority=100;parse(e,r,n){switch(r){case"I":return he(be.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return pe(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,n){return ut(Bf(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Uf=[31,28,31,30,31,30,31,31,30,31,30,31],qf=[31,29,31,30,31,30,31,31,30,31,30,31];class Gf extends ne{priority=90;subPriority=1;parse(e,r,n){switch(r){case"d":return he(be.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return pe(r.length,e)}}validate(e,r){const n=e.getFullYear(),s=Us(n),o=e.getMonth();return s?r>=1&&r<=qf[o]:r>=1&&r<=Uf[o]}set(e,r,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Qf extends ne{priority=90;subpriority=1;parse(e,r,n){switch(r){case"D":case"DD":return he(be.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return pe(r.length,e)}}validate(e,r){const n=e.getFullYear();return Us(n)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Ar(t,e,r){const n=kt(),s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=re(t),i=o.getDay(),u=(e%7+7)%7,b=7-s,p=e<0||e>6?e-(i+b)%7:(u+b)%7-(i+b)%7;return ct(o,p)}class Zf extends ne{priority=90;parse(e,r,n){switch(r){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,s){return e=Ar(e,n,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class Kf extends ne{priority=90;parse(e,r,n,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(r){case"e":case"ee":return ge(pe(r.length,e),o);case"eo":return ge(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,s){return e=Ar(e,n,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Xf extends ne{priority=90;parse(e,r,n,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(r){case"c":case"cc":return ge(pe(r.length,e),o);case"co":return ge(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,n,s){return e=Ar(e,n,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Jf(t,e){const r=re(t),n=Cf(r),s=e-n;return ct(r,s)}class ed extends ne{priority=90;parse(e,r,n){const s=o=>o===0?7:o;switch(r){case"i":case"ii":return pe(r.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return ge(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return ge(n.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ge(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),s);default:return ge(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,r){return r>=1&&r<=7}set(e,r,n){return e=Jf(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class td extends ne{priority=80;parse(e,r,n){switch(r){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(Lr(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class rd extends ne{priority=80;parse(e,r,n){switch(r){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(Lr(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class nd extends ne{priority=80;parse(e,r,n){switch(r){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,n){return e.setHours(Lr(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class sd extends ne{priority=70;parse(e,r,n){switch(r){case"h":return he(be.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return pe(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,n){const s=e.getHours()>=12;return s&&n<12?e.setHours(n+12,0,0,0):!s&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class od extends ne{priority=70;parse(e,r,n){switch(r){case"H":return he(be.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return pe(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class id extends ne{priority=70;parse(e,r,n){switch(r){case"K":return he(be.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return pe(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class ad extends ne{priority=70;parse(e,r,n){switch(r){case"k":return he(be.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return pe(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,n){const s=n<=24?n%24:n;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class cd extends ne{priority=60;parse(e,r,n){switch(r){case"m":return he(be.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return pe(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]}class ud extends ne{priority=50;parse(e,r,n){switch(r){case"s":return he(be.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return pe(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]}class ld extends ne{priority=30;parse(e,r){const n=s=>Math.trunc(s*Math.pow(10,-r.length+3));return ge(pe(r.length,e),n)}set(e,r,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]}class fd extends ne{priority=10;parse(e,r){switch(r){case"X":return Ne(De.basicOptionalMinutes,e);case"XX":return Ne(De.basic,e);case"XXXX":return Ne(De.basicOptionalSeconds,e);case"XXXXX":return Ne(De.extendedOptionalSeconds,e);default:return Ne(De.extended,e)}}set(e,r,n){return r.timestampIsSet?e:ue(e,e.getTime()-Ms(e)-n)}incompatibleTokens=["t","T","x"]}class dd extends ne{priority=10;parse(e,r){switch(r){case"x":return Ne(De.basicOptionalMinutes,e);case"xx":return Ne(De.basic,e);case"xxxx":return Ne(De.basicOptionalSeconds,e);case"xxxxx":return Ne(De.extendedOptionalSeconds,e);default:return Ne(De.extended,e)}}set(e,r,n){return r.timestampIsSet?e:ue(e,e.getTime()-Ms(e)-n)}incompatibleTokens=["t","T","X"]}class hd extends ne{priority=40;parse(e){return Bs(e)}set(e,r,n){return[ue(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class pd extends ne{priority=20;parse(e){return Bs(e)}set(e,r,n){return[ue(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}const md={G:new If,y:new Mf,Y:new Lf,R:new Af,u:new Rf,Q:new Ff,q:new $f,M:new Hf,L:new Yf,w:new Wf,I:new zf,d:new Gf,D:new Qf,E:new Zf,e:new Kf,c:new Xf,i:new ed,a:new td,b:new rd,B:new nd,h:new sd,H:new od,K:new id,k:new ad,m:new cd,s:new ud,S:new ld,X:new fd,x:new dd,t:new hd,T:new pd},bd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yd=/^'([^]*?)'?$/,vd=/''/g,xd=/\S/,wd=/[a-zA-Z]/;function _e(t,e,r,n){const s=Ef(),o=n?.locale??s.locale??mf,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(e==="")return t===""?re(r):ue(r,NaN);const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o},b=[new jf],p=e.match(gd).map(h=>{const g=h[0];if(g in Hs){const v=Hs[g];return v(h,o.formatLong)}return h}).join("").match(bd),y=[];for(let h of p){!n?.useAdditionalWeekYearTokens&&Tf(h)&&Ys(h,e,t),!n?.useAdditionalDayOfYearTokens&&Sf(h)&&Ys(h,e,t);const g=h[0],v=md[g];if(v){const{incompatibleTokens:k}=v;if(Array.isArray(k)){const D=y.find(T=>k.includes(T.token)||T.token===g);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${h}\` at the same time`)}else if(v.incompatibleTokens==="*"&&y.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);y.push({token:g,fullToken:h});const j=v.run(t,h,o.match,u);if(!j)return ue(r,NaN);b.push(j.setter),t=j.rest}else{if(g.match(wd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");if(h==="''"?h="'":g==="'"&&(h=Sd(h)),t.indexOf(h)===0)t=t.slice(h.length);else return ue(r,NaN)}}if(t.length>0&&xd.test(t))return ue(r,NaN);const x=b.map(h=>h.priority).sort((h,g)=>g-h).filter((h,g,v)=>v.indexOf(h)===g).map(h=>b.filter(g=>g.priority===h).sort((g,v)=>v.subPriority-g.subPriority)).map(h=>h[0]);let l=re(r);if(isNaN(l.getTime()))return ue(r,NaN);const d={};for(const h of x){if(!h.validate(l,u))return ue(r,NaN);const g=h.set(l,d,u);Array.isArray(g)?(l=g[0],Object.assign(d,g[1])):l=g}return ue(r,l)}function Sd(t){return t.match(yd)[1].replace(vd,"'")}function Td(t){return Ls(t,Date.now())}function Pd(t,e){return ct(t,-e)}function Ed(t,e){let r=e-Mr(t);return r<=0&&(r+=7),ct(t,r)}function Cd(t,e){const n=Nd(t);let s;if(n.date){const u=_d(n.date,2);s=jd(u.restDateString,u.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let i=0,a;if(n.time&&(i=Id(n.time),isNaN(i)))return new Date(NaN);if(n.timezone){if(a=Md(n.timezone),isNaN(a))return new Date(NaN)}else{const u=new Date(o+i),b=new Date(0);return b.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),b.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),b}return new Date(o+i+a)}const Gt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},kd=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Od=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Dd=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Nd(t){const e={},r=t.split(Gt.dateTimeDelimiter);let n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],Gt.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Gt.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){const s=Gt.timezone.exec(n);s?(e.time=n.replace(s[1],""),e.timezone=s[1]):e.time=n}return e}function _d(t,e){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(r);if(!n)return{year:NaN,restDateString:""};const s=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?s:o*100,restDateString:t.slice((n[1]||n[2]).length)}}function jd(t,e){if(e===null)return new Date(NaN);const r=t.match(kd);if(!r)return new Date(NaN);const n=!!r[4],s=_t(r[1]),o=_t(r[2])-1,i=_t(r[3]),a=_t(r[4]),u=_t(r[5])-1;if(n)return $d(e,a,u)?Ld(e,a,u):new Date(NaN);{const b=new Date(0);return!Rd(e,o,i)||!Fd(e,s)?new Date(NaN):(b.setUTCFullYear(e,o,Math.max(s,i)),b)}}function _t(t){return t?parseInt(t):1}function Id(t){const e=t.match(Od);if(!e)return NaN;const r=Rr(e[1]),n=Rr(e[2]),s=Rr(e[3]);return Hd(r,n,s)?r*jr+n*_r+s*1e3:NaN}function Rr(t){return t&&parseFloat(t.replace(",","."))||0}function Md(t){if(t==="Z")return 0;const e=t.match(Dd);if(!e)return 0;const r=e[1]==="+"?-1:1,n=parseInt(e[2]),s=e[3]&&parseInt(e[3])||0;return Yd(n,s)?r*(n*jr+s*_r):NaN}function Ld(t,e,r){const n=new Date(0);n.setUTCFullYear(t,0,4);const s=n.getUTCDay()||7,o=(e-1)*7+r+1-s;return n.setUTCDate(n.getUTCDate()+o),n}const Ad=[31,null,31,30,31,30,31,31,30,31,30,31];function qs(t){return t%400===0||t%4===0&&t%100!==0}function Rd(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(Ad[e]||(qs(t)?29:28))}function Fd(t,e){return e>=1&&e<=(qs(t)?366:365)}function $d(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}function Hd(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}function Yd(t,e){return e>=0&&e<=59}function Vd(t,e){const r=re(t),n=r.getFullYear(),s=r.getDate(),o=ue(t,0);o.setFullYear(n,e,15),o.setHours(0,0,0,0);const i=Vs(o);return r.setMonth(e,Math.min(s,i)),r}function Wd(t,e){const r=re(t);return isNaN(+r)?ue(t,NaN):(r.setFullYear(e),r)}function Fr(t,e){return He(t,-e)}function $r(t,e){return Ot(t,-e)}function Bd(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function zd(t,e,r){const n=[];for(let s=t;s<=e;s++)n.push(r?r(s):s);return n}function Ud(t,e){const r=t.target;return r?!e.isSameNode(r)&&!e.contains(r):!1}function qd(t,e){return t.isSameNode(e)||t.contains(e)}function Gd(t,e){const r=Object.entries(e),n=getComputedStyle(t);for(let s=0,o=r.length;s<o;s++){const[i,a]=r[s];if(typeof a=="string"&&a.indexOf(",")>-1){if(!a.split(",").map(b=>b.trim()).includes(n[i]))return!1}else if(n[i]!==a)return!1}return!0}function Qd(t,e){const r=Object.entries(e),n=getComputedStyle(t);for(let s=0,o=r.length;s<o;s++){const[i,a]=r[s];if(typeof a=="string"&&a.indexOf(",")>-1){if(a.split(",").map(b=>b.trim()).includes(n[i]))return!0}else if(n[i]===a)return!0}return!1}function Gs(t,e,r=!1,n){if(r&&Gd(t,e)){if(!n||n?.(t)===!0)return t}else if(!r&&Qd(t,e)&&(!n||n?.(t)===!0))return t;return t.parentElement?Gs(t.parentElement,e,r,n):t}function Qs(t,e){const r=Array.from(document.querySelectorAll("body *")),n=[];for(let s=0,o=r.length;s<o;s++){const i=getComputedStyle(r[s]);i[t]&&e(i[t])&&n.push(i[t])}return n}function hp(t){return t}function Zd(t){const e=document.documentElement;Object.keys(t).forEach(r=>{e.style.setProperty(r,t[r])})}function Kd(t){return{"--theme-bsc-primary-1":t.primary1,"--theme-bsc-primary-2":t.primary2,"--theme-bsc-primary-3":t.primary3,"--theme-bsc-primary-4":t.primary4,"--theme-bsc-primary-5":t.primary5,"--theme-bsc-gray-1":t.gray1||"#303030","--theme-bsc-gray-2":t.gray2||"#5f5f5f","--theme-bsc-gray-3":t.gray3||"#8f8f8f","--theme-bsc-gray-4":t.gray4||"#bebebe","--theme-bsc-gray-5":t.gray5||"#eee","--theme-bsc-black":t.black||"#000","--theme-bsc-white":t.white||"#fff","--theme-bsc-mono-dark-1":t.monoDark1||"#222","--theme-bsc-mono-dark-2":t.monoDark2||"#3c3c3c","--theme-bsc-mono-dark-3":t.monoDark3||"#4e4e4e","--theme-bsc-mono-light-1":t.monoLight1||"#fefefe","--theme-bsc-mono-light-2":t.monoLight2||"#eee","--theme-bsc-mono-light-3":t.monoLight3||"#ccc","--theme-bsc-info":t.info||"#2e7ff8","--theme-bsc-success":t.success||"#53ae0c","--theme-bsc-warning":t.warning||"#ff6914","--theme-bsc-error":t.error||"#f01616"}}var Te=(t=>(t[t.Regular=24]="Regular",t[t.Small=20]="Small",t))(Te||{});const Zs=({className:t})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:m.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"})}),Xd=({className:t})=>{const e=te("bsc:h-6 bsc:w-6",t);return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},Jd=({className:t})=>{const e=te("bsc:h-6 bsc:w-6",t);return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})},eh=({className:t})=>{const e=te("bsc:h-6 bsc:w-6",t);return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},th=({className:t})=>{const e=te("bsc:h-6 bsc:w-6",t);return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},rh=({className:t})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:t,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})}),Ce=({icon:t,size:e=Te.Regular,onClick:r,className:n})=>{const s=f.useRef({calendar:Zs,chevronDown:Xd,chevronLeft:Jd,chevronRight:eh,chevronUp:th,close:rh}),o=f.useMemo(()=>s.current[t]||Zs,[t]),i=te({"bsc:h-[24px] bsc:w-[24px]":e===Te.Regular,"bsc:h-[20px] bsc:w-[20px]":e===Te.Small},n);return m.jsx("div",{onClick:r,children:m.jsx(o,{className:i})})},qe=({template:t,props:e,children:r})=>t(e,r);function nh(t,e){if(e===t)return!1;const r=Object.values(e),n=Object.values(t);if(r.length!==n.length||r.some((o,i)=>o!==n[i]))return!0;const s=Object.keys(t);return Object.keys(e).some((o,i)=>o!==s[i])}function sh(t,e){return t.matches[e]=!1,t.mediaQueries[e]={},t}function Ks(t){const e=Object.keys(t);return typeof window>"u"?e.reduce(sh,{mediaQueries:{},matches:{}}):e.reduce((r,n)=>{const s=window.matchMedia(t[n]);return r.mediaQueries[n]=s,r.matches[n]=s.matches,r},{mediaQueries:{},matches:{}})}function oh(t,e){function r(n,s){return n[s]=t.mediaQueries[s].matches,n}switch(e.type){case"updateMatches":return{matches:Object.keys(t.mediaQueries).reduce(r,{}),mediaQueries:t.mediaQueries};case"setQueries":return Ks(e.queries)}}function ih(t){const e=pt.useRef(t),[r,n]=pt.useReducer(oh,t,Ks);pt.useEffect(()=>{nh(t,e.current)&&(n({type:"setQueries",queries:t}),e.current=t)},[t]);function s(){return n({type:"updateMatches"})}function o(u){const b=s;return typeof u.addListener<"u"?u.addListener(b):u.addEventListener("change",b),b}pt.useEffect(()=>{const u=Object.values(r.mediaQueries),b=u.map(o);function p(y,x){typeof y.addListener<"u"?y.removeListener(b[x]):y.removeEventListener("change",b[x])}return()=>{u.forEach(p)}},[r.mediaQueries]);const{matches:i}=r,a=pt.useMemo(()=>Object.values(i),[i]);return{matches:i,matchesAny:a.some(Boolean),matchesAll:a.length>0&&a.every(Boolean)}}function Qt(t){return ih(ah(t)).matchesAll}const Hr={};function ah(t){return Hr[t]===void 0&&(Hr[t]={default:t}),Hr[t]}const Yr=({mobileQuery:t="screen and (max-device-width: 40rem)",tabletQuery:e="screen and (min-device-width: 40.01rem) and (max-device-width: 63.9375rem)",desktopQuery:r="screen and (min-device-width: 64rem)",mobileMarkup:n,aboveMobileMarkup:s,tabletMarkup:o,desktopMarkup:i})=>{const a=Qt(t),u=Qt(e),b=Qt(r);return a&&n?n:!a&&s?s:u&&o?o:b&&i?i:(console.error("Invalid media settings"),null)};function Xs(t,e,r){const n=o=>{const i=o.target,a=t.style.display!=="hidden";t&&a&&!qd(t,i)&&!s(r,i)&&e(!1),e(!0)},s=(o,i)=>{if(!o)return!1;for(let a=0,u=o.length;a<u;a++)if(o[a].isSameNode(i)||o[a].contains(i))return!0;return!1};return document.addEventListener("mousedown",n),n}function Js(t){document.removeEventListener("mousedown",t)}function ch(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,o;for(o=0;o<n.length;o++)s=n[o],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function Vr(t,e){return Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Vr(t,e)}function uh(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Vr(t,e)}var Zt={exports:{}},Kt={exports:{}},oe={};var eo;function lh(){if(eo)return oe;eo=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,b=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,y=t?Symbol.for("react.suspense"):60113,x=t?Symbol.for("react.suspense_list"):60120,l=t?Symbol.for("react.memo"):60115,d=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,k=t?Symbol.for("react.scope"):60119;function j(T){if(typeof T=="object"&&T!==null){var H=T.$$typeof;switch(H){case e:switch(T=T.type,T){case u:case b:case n:case o:case s:case y:return T;default:switch(T=T&&T.$$typeof,T){case a:case p:case d:case l:case i:return T;default:return H}}case r:return H}}}function D(T){return j(T)===b}return oe.AsyncMode=u,oe.ConcurrentMode=b,oe.ContextConsumer=a,oe.ContextProvider=i,oe.Element=e,oe.ForwardRef=p,oe.Fragment=n,oe.Lazy=d,oe.Memo=l,oe.Portal=r,oe.Profiler=o,oe.StrictMode=s,oe.Suspense=y,oe.isAsyncMode=function(T){return D(T)||j(T)===u},oe.isConcurrentMode=D,oe.isContextConsumer=function(T){return j(T)===a},oe.isContextProvider=function(T){return j(T)===i},oe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===e},oe.isForwardRef=function(T){return j(T)===p},oe.isFragment=function(T){return j(T)===n},oe.isLazy=function(T){return j(T)===d},oe.isMemo=function(T){return j(T)===l},oe.isPortal=function(T){return j(T)===r},oe.isProfiler=function(T){return j(T)===o},oe.isStrictMode=function(T){return j(T)===s},oe.isSuspense=function(T){return j(T)===y},oe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===b||T===o||T===s||T===y||T===x||typeof T=="object"&&T!==null&&(T.$$typeof===d||T.$$typeof===l||T.$$typeof===i||T.$$typeof===a||T.$$typeof===p||T.$$typeof===g||T.$$typeof===v||T.$$typeof===k||T.$$typeof===h)},oe.typeOf=j,oe}var ie={};var to;function fh(){return to||(to=1,process.env.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,b=t?Symbol.for("react.concurrent_mode"):60111,p=t?Symbol.for("react.forward_ref"):60112,y=t?Symbol.for("react.suspense"):60113,x=t?Symbol.for("react.suspense_list"):60120,l=t?Symbol.for("react.memo"):60115,d=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,k=t?Symbol.for("react.scope"):60119;function j(O){return typeof O=="string"||typeof O=="function"||O===n||O===b||O===o||O===s||O===y||O===x||typeof O=="object"&&O!==null&&(O.$$typeof===d||O.$$typeof===l||O.$$typeof===i||O.$$typeof===a||O.$$typeof===p||O.$$typeof===g||O.$$typeof===v||O.$$typeof===k||O.$$typeof===h)}function D(O){if(typeof O=="object"&&O!==null){var Pe=O.$$typeof;switch(Pe){case e:var Re=O.type;switch(Re){case u:case b:case n:case o:case s:case y:return Re;default:var rr=Re&&Re.$$typeof;switch(rr){case a:case p:case d:case l:case i:return rr;default:return Pe}}case r:return Pe}}}var T=u,H=b,V=a,B=i,L=e,G=p,X=n,F=d,I=l,N=r,_=o,A=s,U=y,Q=!1;function Y(O){return Q||(Q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(O)||D(O)===u}function P(O){return D(O)===b}function c(O){return D(O)===a}function w(O){return D(O)===i}function S(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function C(O){return D(O)===p}function W(O){return D(O)===n}function M(O){return D(O)===d}function E(O){return D(O)===l}function $(O){return D(O)===r}function q(O){return D(O)===o}function Z(O){return D(O)===s}function R(O){return D(O)===y}ie.AsyncMode=T,ie.ConcurrentMode=H,ie.ContextConsumer=V,ie.ContextProvider=B,ie.Element=L,ie.ForwardRef=G,ie.Fragment=X,ie.Lazy=F,ie.Memo=I,ie.Portal=N,ie.Profiler=_,ie.StrictMode=A,ie.Suspense=U,ie.isAsyncMode=Y,ie.isConcurrentMode=P,ie.isContextConsumer=c,ie.isContextProvider=w,ie.isElement=S,ie.isForwardRef=C,ie.isFragment=W,ie.isLazy=M,ie.isMemo=E,ie.isPortal=$,ie.isProfiler=q,ie.isStrictMode=Z,ie.isSuspense=R,ie.isValidElementType=j,ie.typeOf=D})()),ie}var ro;function no(){return ro||(ro=1,process.env.NODE_ENV==="production"?Kt.exports=lh():Kt.exports=fh()),Kt.exports}var Wr,so;function dh(){if(so)return Wr;so=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var u=Object.getOwnPropertyNames(i).map(function(p){return i[p]});if(u.join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(p){b[p]=p}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Wr=s()?Object.assign:function(o,i){for(var a,u=n(o),b,p=1;p<arguments.length;p++){a=Object(arguments[p]);for(var y in a)e.call(a,y)&&(u[y]=a[y]);if(t){b=t(a);for(var x=0;x<b.length;x++)r.call(a,b[x])&&(u[b[x]]=a[b[x]])}}return u},Wr}var Br,oo;function zr(){if(oo)return Br;oo=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Br=t,Br}var Ur,io;function ao(){return io||(io=1,Ur=Function.call.bind(Object.prototype.hasOwnProperty)),Ur}var qr,co;function hh(){if(co)return qr;co=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=zr(),r={},n=ao();t=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,a,u,b){if(process.env.NODE_ENV!=="production"){for(var p in o)if(n(o,p)){var y;try{if(typeof o[p]!="function"){var x=Error((u||"React class")+": "+a+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}y=o[p](i,p,u,a,null,e)}catch(d){y=d}if(y&&!(y instanceof Error)&&t((u||"React class")+": type specification of "+a+" `"+p+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in r)){r[y.message]=!0;var l=b?b():"";t("Failed "+a+" type: "+y.message+(l??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},qr=s,qr}var Gr,uo;function ph(){if(uo)return Gr;uo=1;var t=no(),e=dh(),r=zr(),n=ao(),s=hh(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return Gr=function(a,u){var b=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function y(P){var c=P&&(b&&P[b]||P[p]);if(typeof c=="function")return c}var x="<<anonymous>>",l={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:k(),arrayOf:j,element:D(),elementType:T(),instanceOf:H,node:G(),objectOf:B,oneOf:V,oneOfType:L,shape:F,exact:I};function d(P,c){return P===c?P!==0||1/P===1/c:P!==P&&c!==c}function h(P,c){this.message=P,this.data=c&&typeof c=="object"?c:{},this.stack=""}h.prototype=Error.prototype;function g(P){if(process.env.NODE_ENV!=="production")var c={},w=0;function S(W,M,E,$,q,Z,R){if($=$||x,Z=Z||E,R!==r){if(u){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=$+":"+E;!c[Pe]&&w<3&&(o("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+$+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),c[Pe]=!0,w++)}}return M[E]==null?W?M[E]===null?new h("The "+q+" `"+Z+"` is marked as required "+("in `"+$+"`, but its value is `null`.")):new h("The "+q+" `"+Z+"` is marked as required in "+("`"+$+"`, but its value is `undefined`.")):null:P(M,E,$,q,Z)}var C=S.bind(null,!1);return C.isRequired=S.bind(null,!0),C}function v(P){function c(w,S,C,W,M,E){var $=w[S],q=A($);if(q!==P){var Z=U($);return new h("Invalid "+W+" `"+M+"` of type "+("`"+Z+"` supplied to `"+C+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return g(c)}function k(){return g(i)}function j(P){function c(w,S,C,W,M){if(typeof P!="function")return new h("Property `"+M+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var E=w[S];if(!Array.isArray(E)){var $=A(E);return new h("Invalid "+W+" `"+M+"` of type "+("`"+$+"` supplied to `"+C+"`, expected an array."))}for(var q=0;q<E.length;q++){var Z=P(E,q,C,W,M+"["+q+"]",r);if(Z instanceof Error)return Z}return null}return g(c)}function D(){function P(c,w,S,C,W){var M=c[w];if(!a(M)){var E=A(M);return new h("Invalid "+C+" `"+W+"` of type "+("`"+E+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return g(P)}function T(){function P(c,w,S,C,W){var M=c[w];if(!t.isValidElementType(M)){var E=A(M);return new h("Invalid "+C+" `"+W+"` of type "+("`"+E+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return g(P)}function H(P){function c(w,S,C,W,M){if(!(w[S]instanceof P)){var E=P.name||x,$=Y(w[S]);return new h("Invalid "+W+" `"+M+"` of type "+("`"+$+"` supplied to `"+C+"`, expected ")+("instance of `"+E+"`."))}return null}return g(c)}function V(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function c(w,S,C,W,M){for(var E=w[S],$=0;$<P.length;$++)if(d(E,P[$]))return null;var q=JSON.stringify(P,function(R,O){var Pe=U(O);return Pe==="symbol"?String(O):O});return new h("Invalid "+W+" `"+M+"` of value `"+String(E)+"` "+("supplied to `"+C+"`, expected one of "+q+"."))}return g(c)}function B(P){function c(w,S,C,W,M){if(typeof P!="function")return new h("Property `"+M+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var E=w[S],$=A(E);if($!=="object")return new h("Invalid "+W+" `"+M+"` of type "+("`"+$+"` supplied to `"+C+"`, expected an object."));for(var q in E)if(n(E,q)){var Z=P(E,q,C,W,M+"."+q,r);if(Z instanceof Error)return Z}return null}return g(c)}function L(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var c=0;c<P.length;c++){var w=P[c];if(typeof w!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Q(w)+" at index "+c+"."),i}function S(C,W,M,E,$){for(var q=[],Z=0;Z<P.length;Z++){var R=P[Z],O=R(C,W,M,E,$,r);if(O==null)return null;O.data&&n(O.data,"expectedType")&&q.push(O.data.expectedType)}var Pe=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new h("Invalid "+E+" `"+$+"` supplied to "+("`"+M+"`"+Pe+"."))}return g(S)}function G(){function P(c,w,S,C,W){return N(c[w])?null:new h("Invalid "+C+" `"+W+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return g(P)}function X(P,c,w,S,C){return new h((P||"React class")+": "+c+" type `"+w+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function F(P){function c(w,S,C,W,M){var E=w[S],$=A(E);if($!=="object")return new h("Invalid "+W+" `"+M+"` of type `"+$+"` "+("supplied to `"+C+"`, expected `object`."));for(var q in P){var Z=P[q];if(typeof Z!="function")return X(C,W,M,q,U(Z));var R=Z(E,q,C,W,M+"."+q,r);if(R)return R}return null}return g(c)}function I(P){function c(w,S,C,W,M){var E=w[S],$=A(E);if($!=="object")return new h("Invalid "+W+" `"+M+"` of type `"+$+"` "+("supplied to `"+C+"`, expected `object`."));var q=e({},w[S],P);for(var Z in q){var R=P[Z];if(n(P,Z)&&typeof R!="function")return X(C,W,M,Z,U(R));if(!R)return new h("Invalid "+W+" `"+M+"` key `"+Z+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(w[S],null," ")+`
|
|
12
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var O=R(E,Z,C,W,M+"."+Z,r);if(O)return O}return null}return g(c)}function N(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(N);if(P===null||a(P))return!0;var c=y(P);if(c){var w=c.call(P),S;if(c!==P.entries){for(;!(S=w.next()).done;)if(!N(S.value))return!1}else for(;!(S=w.next()).done;){var C=S.value;if(C&&!N(C[1]))return!1}}else return!1;return!0;default:return!1}}function _(P,c){return P==="symbol"?!0:c?c["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&c instanceof Symbol:!1}function A(P){var c=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":_(c,P)?"symbol":c}function U(P){if(typeof P>"u"||P===null)return""+P;var c=A(P);if(c==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return c}function Q(P){var c=U(P);switch(c){case"array":case"object":return"an "+c;case"boolean":case"date":case"regexp":return"a "+c;default:return c}}function Y(P){return!P.constructor||!P.constructor.name?x:P.constructor.name}return l.checkPropTypes=s,l.resetWarningCache=s.resetWarningCache,l.PropTypes=l,l},Gr}var Qr,lo;function mh(){if(lo)return Qr;lo=1;var t=zr();function e(){}function r(){}return r.resetWarningCache=e,Qr=function(){function n(i,a,u,b,p,y){if(y!==t){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}n.isRequired=n;function s(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:e};return o.PropTypes=o,o},Qr}var fo;function bh(){if(fo)return Zt.exports;if(fo=1,process.env.NODE_ENV!=="production"){var t=no(),e=!0;Zt.exports=ph()(t.isElement,e)}else Zt.exports=mh()();return Zt.exports}var gh=bh();const J=or(gh),ho={disabled:!1};var yh=process.env.NODE_ENV!=="production"?J.oneOfType([J.number,J.shape({enter:J.number,exit:J.number,appear:J.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&J.oneOfType([J.string,J.shape({enter:J.string,exit:J.string,active:J.string}),J.shape({enter:J.string,enterDone:J.string,enterActive:J.string,exit:J.string,exitDone:J.string,exitActive:J.string})]);const po=f.createContext(null);var vh=function(e){return e.scrollTop},jt="unmounted",Ge="exited",Qe="entering",lt="entered",Zr="exiting",Ae=(function(t){uh(e,t);function e(n,s){var o;o=t.call(this,n,s)||this;var i=s,a=i&&!i.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?a?(u=Ge,o.appearStatus=Qe):u=lt:n.unmountOnExit||n.mountOnEnter?u=jt:u=Ge,o.state={status:u},o.nextCallback=null,o}e.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===jt?{status:Ge}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(s){var o=null;if(s!==this.props){var i=this.state.status;this.props.in?i!==Qe&&i!==lt&&(o=Qe):(i===Qe||i===lt)&&(o=Zr)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,i,a;return o=i=a=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,a=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:a}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===Qe){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:ht.findDOMNode(this);i&&vh(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ge&&this.setState({status:jt})},r.performEnter=function(s){var o=this,i=this.props.enter,a=this.context?this.context.isMounting:s,u=this.props.nodeRef?[a]:[ht.findDOMNode(this),a],b=u[0],p=u[1],y=this.getTimeouts(),x=a?y.appear:y.enter;if(!s&&!i||ho.disabled){this.safeSetState({status:lt},function(){o.props.onEntered(b)});return}this.props.onEnter(b,p),this.safeSetState({status:Qe},function(){o.props.onEntering(b,p),o.onTransitionEnd(x,function(){o.safeSetState({status:lt},function(){o.props.onEntered(b,p)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:ht.findDOMNode(this);if(!o||ho.disabled){this.safeSetState({status:Ge},function(){s.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Zr},function(){s.props.onExiting(a),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:Ge},function(){s.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},r.setNextCallback=function(s){var o=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,o.nextCallback=null,s(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(s,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:ht.findDOMNode(this),a=s==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],b=u[0],p=u[1];this.props.addEndListener(b,p)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===jt)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=ch(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return f.createElement(po.Provider,{value:null},typeof i=="function"?i(s,a):f.cloneElement(f.Children.only(i),a))},e})(f.Component);Ae.contextType=po,Ae.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:J.shape({current:typeof Element>"u"?J.any:function(t,e,r,n,s,o){var i=t[e];return J.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(t,e,r,n,s,o)}}),children:J.oneOfType([J.func.isRequired,J.element.isRequired]).isRequired,in:J.bool,mountOnEnter:J.bool,unmountOnExit:J.bool,appear:J.bool,enter:J.bool,exit:J.bool,timeout:function(e){var r=yh;e.addEndListener||(r=r.isRequired);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return r.apply(void 0,[e].concat(s))},addEndListener:J.func,onEnter:J.func,onEntering:J.func,onEntered:J.func,onExit:J.func,onExiting:J.func,onExited:J.func}:{};function ft(){}Ae.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ft,onEntering:ft,onEntered:ft,onExit:ft,onExiting:ft,onExited:ft},Ae.UNMOUNTED=jt,Ae.EXITED=Ge,Ae.ENTERING=Qe,Ae.ENTERED=lt,Ae.EXITING=Zr;const mo=({start:t,timeout:e=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:s="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",unmountOnExit:i=!1,onEntering:a,onEntered:u,onExit:b,onExited:p,children:y})=>{const x=r||{transition:`opacity ${e}ms ${s}`,opacity:0},l=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${e}ms ${o}`,opacity:0},exited:{transition:`opacity ${e}ms ${o}`,opacity:0},unmounted:{}};return m.jsx(Ae,{in:t,timeout:e,onEntering:a,onEntered:u,onExit:b,onExited:p,unmountOnExit:i,children:d=>y({state:d,defaultStyle:x,transitionStyles:l})})};function bo(t){return t.target?t.target:t}const go=({visible:t,target:e,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:s=400,showTransitionOptions:o="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:a="DONE",shown:u,hidden:b,isClickedWithin:p,children:y})=>{const[x,l]=f.useState(-1),[d,h]=f.useState(-1),[g,v]=f.useState(t),k=f.useRef(100),j=f.useRef(101),D=f.useRef(void 0),T=f.useRef(void 0),H=f.useRef(void 0);f.useEffect(()=>{e&&(D.current=bo(e));const I=Qs("zIndex",N=>N==="auto"||N==="-1"?!1:parseInt(N)>100).map(N=>parseInt(N,10));I.length>0&&(k.current=Math.max(...I)+1,j.current=Math.max(...I)+2),v(t)},[t,e]);const V=I=>{T.current=I},B=()=>{h(k.current),l(j.current)},L=()=>{if(!T.current)return;u?.();let I;D.current&&(I=[D.current]);const N=_=>{_?p?.():v(!1)};H.current=Xs(T.current,N,I)},G=()=>{H.current&&Js(H.current)},X=()=>{h(-1),l(-1),b?.()},F={entering:{opacity:.5},entered:{opacity:.5}};return ht.createPortal(m.jsx(mo,{start:g,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:B,onEntered:L,onExit:G,onExited:X,unmountOnExit:n,children:({state:I,defaultStyle:N,transitionStyles:_})=>m.jsxs("div",{ref:A=>{A&&V(A)},children:[m.jsx("div",{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:d,..._[I],...F[I]}}),m.jsxs("div",{className:"dark:bsck-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,...N,..._[I]},children:[m.jsx("div",{className:"bsc:w-full",children:y}),m.jsx(m.Fragment,{children:m.jsx(Oe,{buttonType:"primary",fullWidth:!0,onClick:()=>v(!1),className:"bsc:text-xs bsc:font-bold",children:a})})]})]})}),r)};var yo=(t=>(t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomLeft=2]="BottomLeft",t[t.BottomRight=3]="BottomRight",t))(yo||{}),vo=(t=>(t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomLeft=2]="BottomLeft",t[t.BottomRight=3]="BottomRight",t))(vo||{});class fe{static positionToTarget(e,r=2){const n=e.getBoundingClientRect();let s=0,o=0;const i=window.scrollY;switch(r){case 2:s=n.top+n.height+i,o=n.left;break;case 0:s=n.top+i,o=n.left;break;case 3:s=n.top+n.height+i,o=n.left+n.width;break;case 1:s=n.top+i,o=n.left+n.width}return{top:s,left:o}}static positionElementToTarget(e,r,n=0,s=2){let{left:o,top:i}=fe.positionToTarget(r,s);const a=e.getBoundingClientRect();switch(n){case 0:break;case 1:o=o-a.width;break;case 2:i=i-a.height;break;case 3:i=i-a.height,o=o-a.width;break}return{top:i,left:o}}static canPositionElementOnScreenWithTarget(e,r){const n=fe.getScreenDimensions(),s=e.getBoundingClientRect(),o=fe.positionElementToTarget(e,r,0,2);if(o.left+s.width<n.width&&o.top+s.height<n.height||fe.positionElementToTarget(e,r,1,3).left>=0&&o.top+s.height<n.height)return!0;const a=fe.positionElementToTarget(e,r,2,0);if(a.left+s.width<n.width&&a.top>=0)return!0;const u=fe.positionElementToTarget(e,r,3,1);return u.left>=0&&u.top>=0}static canPositionElementOnScreen(e){const r=fe.getScreenDimensions(),n=e.getBoundingClientRect();return n.width<=r.width&&n.height<=r.height}static positionElementToTargetOnScreen(e,r,n=0,s=2){const{left:o,top:i}=fe.positionElementToTarget(e,r,n,s),a=e.getBoundingClientRect(),u=fe.determineOffScreenLocation(a);if(u){if(n===0&&s===2){if(u.right&&!u.bottom)return fe.positionElementToTarget(e,r,1,3);if(u.bottom&&!u.right)return fe.positionElementToTarget(e,r,2,0);if(u.right&&u.bottom)return fe.positionElementToTarget(e,r,3,1)}else if(n===1&&s===3){if(u.left&&!u.bottom)return fe.positionElementToTarget(e,r,0,2);if(u.bottom&&!u.left)return fe.positionElementToTarget(e,r,3,1);if(u.left&&u.bottom)return fe.positionElementToTarget(e,r,2,0)}}return{top:i,left:o}}static determineOffScreenLocation(e){const r=fe.getScreenDimensions(),n={left:e.left<0,top:e.top<0,right:e.left+e.width>r.width,bottom:e.top+e.height>r.height};return n.left||n.top||n.right||n.bottom?n:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const xo=({visible:t,target:e,targetPosition:r=yo.BottomLeft,elementAlignment:n=vo.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:a=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:b=!1,transitionDuration:p=400,showTransitionOptions:y="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:x="linear",shown:l,hidden:d,isClickedWithin:h,markupCreated:g,children:v})=>{const[k,j]=f.useState(-1),[D,T]=f.useState(t),[H,V]=f.useState(!1),B=f.useRef(!1),L=f.useRef(100),G=f.useRef({left:0,top:0,width:0}),X=f.useRef(void 0),F=f.useRef(void 0),I=f.useRef(void 0),N=f.useRef(void 0),_=f.useRef(void 0),A=f.useRef(void 0),U=un();f.useEffect(()=>(u===!0&&(A.current=new ResizeObserver(Q)),()=>{u===!0&&(F.current&&A.current?.unobserve(F.current),A.current?.disconnect())}),[]),f.useEffect(()=>{if(e&&(X.current=bo(e),i)){const M=U?.isValidScrollableElement;I.current=Gs(X.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,M),I.current.tagName.toLowerCase()==="html"&&(I.current=document)}if(a){const M=Qs("zIndex",E=>parseInt(E)>=100).map(E=>parseInt(E));M.length>0&&(L.current=Math.max(...M)+1)}t!==void 0&&T(t)},[e,t,i,a]);const Q=M=>{if(F.current){const E=fe.getScreenDimensions(),$=M[M.length-1].target,q=$.getBoundingClientRect(),Z=fe.determineOffScreenLocation(q);if(Z){if(X.current&&fe.canPositionElementOnScreenWithTarget($,X.current)){const R=fe.positionElementToTargetOnScreen(F.current,X.current,n,r);G.current={...G.current,...R}}else Z.right?G.current.left=E.width-q.width:Z.left&&(G.current.left=0),Z.bottom?G.current.top=E.height-q.height:Z.top&&(G.current.top=0);Y()}}},Y=Ct(()=>{B.current=!B.current,V(B.current)},20),P=()=>{j(L.current)},c=()=>{if(!F.current)return;l?.();let M;!s&&X.current&&(M=[X.current]);const E=$=>{$?h?.():T(!1)};N.current=Xs(F.current,E,M),i&&(_.current=Ol($=>F.current&&Ud($,F.current)&&T(!1),100,{leading:!0}),I.current&&I.current.addEventListener("scroll",_.current))},w=()=>{I.current&&_.current&&(I.current.removeEventListener("scroll",_.current),_.current=void 0),N.current&&Js(N.current)},S=()=>{j(-1),d?.()},C=M=>{if(u===!0&&F.current&&A.current?.unobserve(F.current),F.current=M,g?.(M),X.current){const E=fe.positionElementToTarget(F.current,X.current,n,r);G.current={...E,width:X.current.offsetWidth},u===!0&&(fe.canPositionElementOnScreenWithTarget(F.current,X.current)||fe.canPositionElementOnScreen(F.current))&&A.current?.observe(F.current)}},W=f.useMemo(()=>{const M={top:`${G.current.top}px`,left:`${G.current.left}px`,zIndex:k};return o&&(M.width=`${G.current.width}px`),M},[H,k,o]);return m.jsx(mo,{start:D,timeout:p,showTransitionOptions:y,hideTransitionOptions:x,onEntering:P,onEntered:c,onExit:w,onExited:S,unmountOnExit:b,children:({state:M,defaultStyle:E,transitionStyles:$})=>m.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:{...W,...E,...$[M]},ref:q=>{q&&C(q)},children:v})})};let Xt;const xh=new Uint8Array(16);function wh(){if(!Xt&&(Xt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xt(xh)}const ve=[];for(let t=0;t<256;++t)ve.push((t+256).toString(16).slice(1));function Sh(t,e=0){return ve[t[e+0]]+ve[t[e+1]]+ve[t[e+2]]+ve[t[e+3]]+"-"+ve[t[e+4]]+ve[t[e+5]]+"-"+ve[t[e+6]]+ve[t[e+7]]+"-"+ve[t[e+8]]+ve[t[e+9]]+"-"+ve[t[e+10]]+ve[t[e+11]]+ve[t[e+12]]+ve[t[e+13]]+ve[t[e+14]]+ve[t[e+15]]}const wo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Th(t,e,r){if(wo.randomUUID&&!t)return wo.randomUUID();t=t||{};const n=t.random||(t.rng||wh)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Sh(n)}class It{static create(e){const r=[];let n=0;for(let s=0,o=e.formatParts.length;s<o;s++){const i=e.formatParts[s],a=n,u=a+i.characterCount;r.push({startPosition:a,endPosition:u,...i}),n=u}return r}}class Ph{instanceCollection;formatPartList;inputSlotCollection;currentPartIndex=0;currentPartIndices=[];currentCursorPosition=0;highlightCursorPosition=0;currentCursorStartPosition=-1;currentCursorEndPosition=-1;inputElement;inputSelection=null;inputRange;textNode;constructor(e,r){this.instanceCollection=Mt.getInstance(),this.formatPartList=It.create(e),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,e)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){const e=this.inputSlotCollection.getLastSlot();return this.isSelection&&this.inputRange?.startOffset===0&&this.inputRange.endOffset===e.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(e){this.inputElement=e}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(e){this.setCursorSelection(e)}setCursorSelection(e,r){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let n,s,o=!0;r===void 0?(n=e,s=e):e<r?(n=e,s=r):(o=!1,n=r,s=e),this.inputRange.setStart(this.textNode,n),this.inputRange.setEnd(this.textNode,s),this.currentPartIndices=[],n===s?(this.currentCursorPosition=s,this.highlightCursorPosition=s,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(o?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==n?this.highlightCursorPosition=n:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=n:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==n&&(this.highlightCursorPosition=n),this.currentCursorStartPosition=n,this.currentCursorEndPosition=s,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){const e=window.getSelection(),r=e?.getRangeAt(0);if(this.inputElement&&e&&r){const n=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,a=>{const u=document.createRange();return u.selectNodeContents(a),u.compareBoundaryPoints(Range.END_TO_END,r)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let s=0;for(;n.nextNode();)s+=n.currentNode.textContent?.length||0;r.startContainer.nodeType===Node.TEXT_NODE&&(s+=r.startOffset);const o=this.inputSlotCollection.getLastSlotWithData(),i=o.startPosition+o.partText.length;e.anchorOffset===e.focusOffset?this.setCursorSelection(s>i?i:s):this.setCursorSelection(e.anchorOffset,e.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const e=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(e.startPosition)}moveEnd(){const e=this.inputSlotCollection.getLastSlotWithData(),r=e.startPosition+e.partText.length;this.setCursorSelection(r)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const e=this.currentCursorPosition-1;let r=this.formatPartList[this.currentPartIndex];if(e>=r.startPosition&&e<=r.endPosition)this.setCursorSelection(e);else for(let n=this.currentPartIndex-1;n>=0;n--)if(r=this.formatPartList[n],e>=r.startPosition&&e<=r.endPosition){r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(e);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const e=this.inputSlotCollection.getLastSlotWithData(),r=e.startPosition+e.partText.length;if(this.currentCursorPosition<r&&!this.isSelection){const n=this.currentCursorPosition+1;let s=this.formatPartList[this.currentPartIndex];if(n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(n);else for(let o=this.currentPartIndex+1,i=this.formatPartList.length;o<i;o++)if(s=this.formatPartList[o],n>=s.startPosition&&n<=s.endPosition){s.isSeparator?this.setCursorSelection(this.formatPartList[o+1].startPosition):this.setCursorSelection(n);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const e=this.findNextEditablePart();e&&(this.currentPartIndex=e.partIndex,this.setCursorSelection(e.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const e=this.findPreviousEditablePart();e&&(this.currentPartIndex=e.partIndex,this.setCursorSelection(e.endPosition))}}highlightAll(){const e=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,e)}moveHighlightLeft(){this.updateHighlightPositions();const e=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||e){let r=e?this.currentCursorStartPosition:this.currentCursorStartPosition-1,n=e?this.highlightCursorPosition-1:this.currentCursorEndPosition,s=this.formatPartList[this.currentPartIndex];if(r>=s.startPosition&&r<=s.endPosition||e&&n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(r,n);else for(let o=this.currentPartIndex-1;o>=0;o--)if(s=this.formatPartList[o],r>=s.startPosition&&r<=s.endPosition||e&&n>=s.startPosition&&n<=s.endPosition){s.isSeparator?(e?n=this.formatPartList[o-1].endPosition:r=this.formatPartList[o-1].endPosition,this.setCursorSelection(r,n)):this.setCursorSelection(r,n);break}}}moveHighlightRight(){this.updateHighlightPositions();const e=this.inputSlotCollection.getLastSlotWithData(),r=e.startPosition+e.partText.length,n=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<r||n){let s=n?this.highlightCursorPosition+1:this.currentCursorStartPosition,o=n?this.currentCursorEndPosition:this.currentCursorEndPosition+1,i=this.formatPartList[this.currentPartIndex];if(o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition)this.setCursorSelection(s,o);else for(let a=this.currentPartIndex+1,u=this.formatPartList.length;a<u;a++)if(i=this.formatPartList[a],o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition){i.isSeparator?(n?s=this.formatPartList[a+1].startPosition:o=this.formatPartList[a+1].startPosition,this.setCursorSelection(s,o)):this.setCursorSelection(s,o);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(e=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(e?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 e=0;e<this.formatPartList.length;e++){const r=this.formatPartList[e];if(this.currentCursorPosition>=r.startPosition&&this.currentCursorPosition<=r.endPosition){if(r.isSeparator){this.currentCursorPosition=this.formatPartList[e+1].startPosition,this.currentPartIndex=e+1;break}this.currentPartIndex=e;break}}}setPartIndexByHighlightPosition(){for(let e=0;e<this.formatPartList.length;e++){const r=this.formatPartList[e];if(this.highlightCursorPosition>=r.startPosition&&this.highlightCursorPosition<=r.endPosition){if(r.isSeparator){this.highlightCursorPosition=this.formatPartList[e+1].startPosition,this.currentPartIndex=e+1;break}this.currentPartIndex=e;break}}}setPartIndicesByCursorPositions(){for(let e=0,r=this.formatPartList.length;e<r;e++){const n=this.formatPartList[e];n.isSeparator||(n.startPosition>=this.currentCursorStartPosition&&n.startPosition<=this.currentCursorEndPosition||n.endPosition>=this.currentCursorStartPosition&&n.endPosition<=this.currentCursorEndPosition||n.startPosition<this.currentCursorStartPosition&&n.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(e)}}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 Eh{static create(e){const r=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];o.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...o})}return r}}class Ch{inputSlots;constructor(e){this.inputSlots=Eh.create(It.create(e))}clearAllSlots(){for(let e=0,r=this.inputSlots.length;e<r;e++)this.inputSlots[e].partText=""}getSlot(e){return this.inputSlots.find(r=>r.partIndex===e)}getSlots(e){return this.inputSlots.filter(r=>e.includes(r.partIndex))}getSlotsFromCursorPosition(e){let r=-1;for(let n=0,s=this.inputSlots.length;n<s;n++){const o=this.inputSlots[n];if(e>=o.startPosition&&e<=o.endPosition){r=o.partIndex;break}}return r>-1?this.inputSlots.filter(n=>n.partIndex>=r):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(e){const r=this.inputSlots.findIndex(n=>n.partIndex===e);if(r>-1&&r+1<this.inputSlots.length)return this.inputSlots[r+1]}getPreviousSlot(e){const r=this.inputSlots.findIndex(n=>n.partIndex===e);if(r>-1&&r-1>=0)return this.inputSlots[r-1]}getLastSlotWithData(){const e=this.inputSlots.findIndex(n=>!n.isComplete);let r=e;for(let n=e+1,s=this.inputSlots.length;n<s;n++)this.inputSlots[n].partText.length>0&&(r=n);return this.inputSlots[r>-1?r:0]}allSlotsCompleted(){return this.inputSlots.every(e=>e.isComplete)}allSlotsEmpty(){return this.inputSlots.every(e=>e.partText.length===0)}}class Mt{static instance;static getInstance(){return this.instance||(this.instance=new kh),this.instance}}class kh{navigatorInstances;inputSlotInstances;constructor(){this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(e,r){return this.navigatorInstances[e]||(this.navigatorInstances[e]=new Ph(r,e)),this.navigatorInstances[e]}getInputSlotInstance(e,r){return this.inputSlotInstances[e]||(this.inputSlotInstances[e]=new Ch(r)),this.inputSlotInstances[e]}removeInstances(e){this.navigatorInstances[e]&&delete this.navigatorInstances[e],this.inputSlotInstances[e]&&delete this.inputSlotInstances[e]}}class Kr{instanceCollection;formatPartList;inputSlotCollection;inputElement;constructor(e,r){this.instanceCollection=Mt.getInstance(),this.formatPartList=It.create(e),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,e)}setInputElement(e){this.inputElement=e}render(){let e="";for(let r=0,n=this.formatPartList.length;r<n;r++){const s=this.formatPartList[r];if(s.isSeparator)e+=s.inputText;else{const o=this.inputSlotCollection.getSlot(r);o&&(e+=o.partText+o.inputText?.repeat(o.characterCount-o.partText.length))}}this.inputElement&&(this.inputElement.innerHTML=e)}}var je=(t=>(t[t.Text=0]="Text",t[t.Numeric=1]="Numeric",t))(je||{});class So{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(e){return this.numberKeys.includes(e)}isMovementKey(e){return this.movementKeys.includes(e.key)}isEditingKey(e){return this.editingKeys.includes(e.key)}isIgnoreKey(e){return this.ignoreKeys.includes(e.key)}}class Oh{_currentIndex=0;index=0;formatParts;get currentIndex(){return this._currentIndex}constructor(e){this.formatParts=It.create(e)}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 Dh{formatParts;constructor(e){this.formatParts=It.create(e)}getUniqueSeparators(){const e=[],r=this.formatParts.filter(n=>n.isSeparator);for(let n=0,s=r.length;n<s;n++){const o=r[n];o.inputText&&!e.includes(o.inputText)&&e.push(o.inputText)}return e}}class To{constructor(e,r){this.format=e,this.instanceCollection=Mt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,e),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,e),this.keyTypeChecker=new So,this.formatRenderer=new Kr(e,r),this.formatPartList=new Oh(e),this.partEntryList=new Dh(e)}instanceCollection;inputSlotCollection;formatNavigator;keyTypeChecker;formatRenderer;formatPartList;partEntryList;setInputElement(e){this.formatRenderer.setInputElement(e)}processKeyPress(e){if(this.keyTypeChecker.isEditingKey(e)){this.processEditRules(e);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(e))):this.processInputRules(e)}processInputValue(e){this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const n=this.formatPartList.next();if(n&&!n.isSeparator)if(this.formatPartList.peek()?.isSeparator===!0){const s=this.formatPartList.currentIndex,o=this.formatPartList.next();if(o&&o.inputText){const i=e.indexOf(o.inputText,r),a=this.inputSlotCollection.getSlot(s);if(a&&i>-1){const u=i-r>a.characterCount?r+a.characterCount:i;a.partText=e.substring(r,u),this.processSlotRules(a),r=i+o.characterCount}}}else{const s=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);s&&(s.partText=e.substring(r,r+s.characterCount),this.processSlotRules(s))}}}processPastedValue(e,r=!1){r&&this.processSelectionEditRules();const n=this.formatNavigator.getCursorPosition(),s=this.inputSlotCollection.getSlotsFromCursorPosition(n);if(s){const o=n-s[0].startPosition,i=s[0].partText.substring(0,o);let a=s[0].partText.substring(o);s[0].partText="";for(let y=1,x=s.length;y<x;y++)a+=s[y].partText,s[y].partText="";const u=this.removeSeparatorsFromValue(e),b=i+u+a;let p=0;for(let y=0,x=s.length;y<x;y++){const l=s[y];l.partText=b.substring(p,l.characterCount+p),p+=l.characterCount,this.processSlotRules(l)}}}removeSeparatorsFromValue(e){let r=e;const n=this.partEntryList.getUniqueSeparators();for(let s=0,o=n.length;s<o;s++){const i=n[s];r=r.replaceAll(i,"")}return r}processEditRules(e){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(e)}processNonSelectionEditRules(e){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),s=n-r.startPosition,o=this.format.deleteShiftsFormatPart||!1;switch(e.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,s-1)+r.partText.substring(s),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const a=this.inputSlotCollection.getPreviousSlot(r.partIndex);a&&(a.partText=a.partText.substring(0,a.partText.length-1),o&&this.shiftFormatParts(a),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(a.startPosition+a.partText.length),this.processSlotRules(a,!0))}break}case"Delete":r.partText=r.partText.substring(0,s)+r.partText.substring(s+1),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}processSelectionEditRules(){const e=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(e.length<=0)return;const r=this.formatNavigator.getCursorStartPosition(),n=this.formatNavigator.getCursorEndPosition();for(let s=0,o=e.length;s<o;s++){const i=e[s];i.startPosition>=r&&i.endPosition<=n?i.partText="":i.startPosition>=r&&i.endPosition>n?i.partText=i.partText.substring(n-i.startPosition):i.startPosition<r&&i.endPosition<=n?i.partText=i.partText.substring(0,r-i.startPosition):i.startPosition<r&&i.endPosition>n&&(i.partText=i.partText.substring(0,r-i.startPosition)+i.partText.substring(n-i.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(r);for(let s=0,o=e.length;s<o;s++)this.processSlotRules(e[s])}shiftFormatParts(e){let r=e,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const s=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+s,r=n}}processInputRules(e){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=e,s=r.characterCount,o=r.partText;if(r.valueType===je.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,a=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,b=parseInt(this.createNewValue(r,n));if(i&&b>i)if(a){u&&(r.partText=r.partText.padStart(s,"0")),r.isComplete=!0;const p=this.inputSlotCollection.getNextSlot(r.partIndex);p&&!p.isComplete&&(p.partText=n),this.formatRenderer.render(),p&&this.formatNavigator.setCursorPosition(p.isComplete?p.startPosition:p.startPosition+1)}else return;else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):o.length+1<s&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(e){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());r&&(r.partText=this.createNewValue(r,e))}createNewValue(e,r){const n=e.partText,s=this.formatNavigator.getCursorPosition();if(s>=e.startPosition+e.partText.length)return n+r;{const o=s-e.startPosition;return n.substring(0,o)+r+n.substring(o)}}processSlotRules(e,r=!1){const n=e.characterCount,s=e.allCharactersRequired||!1;if(e.valueType===je.Numeric){const o=e.minimumValue,i=e.maximumValue;if(s)e.isComplete=e.partText.length===n;else if(o!==void 0&&i!==void 0){const a=e.padWithZeros||!1,u=parseInt(e.partText);e.isComplete=u>=o&&u<=i,e.isComplete&&a&&!r&&(e.partText=e.partText.padStart(n,"0"))}else e.isComplete=e.partText.length>0}else s?e.isComplete=e.partText.length===n:e.isComplete=e.partText.length>0}}class Nh{constructor(e,r){this.format=e,this.instanceCollection=Mt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,e),this.ruleProcessor=new To(e,r),this.keyTypeChecker=new So,this.formatRenderer=new Kr(e,r)}instanceCollection;formatNavigator;ruleProcessor;keyTypeChecker;formatRenderer;setInputElement(e){this.ruleProcessor.setInputElement(e),this.formatRenderer.setInputElement(e)}processMovementKey(e){const{key:r,metaKey:n,ctrlKey:s,shiftKey:o}=e;switch(r){case"ArrowLeft":o?this.formatNavigator.moveHighlightLeft():n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":o?this.formatNavigator.moveHighlightRight():n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(n||s)&&this.formatNavigator.highlightAll();break}}processKeyPress(e){return this.keyTypeChecker.isIgnoreKey(e)?!1:this.keyTypeChecker.isMovementKey(e)?(this.processMovementKey(e),!1):(this.ruleProcessor.processKeyPress(e),!0)}}class _h{constructor(e,r=""){this.inputValue=r,this.instanceId=Th(),this.instanceCollection=Mt.getInstance(),this.keyProcessor=new Nh(e,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,e),this.formatRenderer=new Kr(e,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,e),this.inputRuleProcessor=new To(e,this.instanceId)}instanceId;instanceCollection;keyProcessor;formatNavigator;formatRenderer;inputSlotCollection;inputRuleProcessor;previousOutputValue="";inputElementSet=!1;isInputFocused=!1;inputElement;onFormatChange;inputElementCreated(e){this.keyProcessor.setInputElement(e),this.formatNavigator.setInputElement(e),this.formatRenderer.setInputElement(e),this.inputElement=e,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(e){this.inputValue=e,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(e):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(e){e.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(e):this.inputRuleProcessor.processPastedValue(e,!0):this.inputValue.length===0?this.inputValuePassed(e):this.inputRuleProcessor.processPastedValue(e),this.renderFormat(!0))}registerFormatChangeEvent(e){this.onFormatChange=e}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(e){if(e.key!=="Tab"){if(!(e.key==="c"&&(e.ctrlKey||e.metaKey))&&!(e.key==="x"&&(e.ctrlKey||e.metaKey))&&!(e.key==="v"&&(e.ctrlKey||e.metaKey)))e.preventDefault(),e.stopPropagation();else return;this.keyProcessor.processKeyPress(e)&&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(e=!1){setTimeout(()=>{this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=this.inputElement?.innerHTML),e&&this.inputElement?.innerHTML&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const jh=(t,e)=>{const{value:r="",format:n,readOnly:s=!1,debounceTime:o=800,fillContainer:i=!0,leftElement:a,rightElement:u,className:b,leftElementClassName:p,rightElementClassName:y,isSingleLine:x=!1,allowSingleLineScroll:l=!1,isInputValid:d,onChange:h,onFocus:g,onBlur:v,onElementCreate:k,onLeftElementClick:j,onRightElementClick:D}=t,[T,H]=f.useState(!0),V=f.useRef(void 0),B=f.useRef(void 0),L=f.useRef(void 0),G=f.useRef(!1);f.useEffect(()=>(document.addEventListener("mouseup",A),()=>{L.current?.dispose(),document.removeEventListener("mouseup",A)}),[]),f.useEffect(()=>{L.current?.inputValuePassed(r)},[r]),f.useEffect(()=>{L.current?.dispose(),n&&(L.current=new _h(n,r),B.current&&L.current?.inputElementCreated(B.current),L.current?.registerFormatChangeEvent(X))},[n]);const X=f.useCallback(w=>{d?d(w)?(H(!0),h?.(w)):H(!1):h?.(w)},[h]),F=f.useCallback(w=>{L.current?.inputFocused(),g?.(w)},[g]),I=f.useCallback(w=>{L.current?.inputBlurred(),v?.(w)},[v]),N=f.useCallback(()=>{G.current=!0},[]),_=f.useCallback(()=>{if(G.current)G.current=!1,L.current?.mouseUpHandler();else{const w=new MouseEvent("mouseup");document.dispatchEvent(w)}},[]),A=f.useCallback(()=>{G.current&&(G.current=!1,L.current?.mouseUpHandler())},[]),U=f.useCallback(w=>{L.current?.keyDownHandler(w)},[]),Q=f.useCallback(w=>{w.preventDefault(),w.stopPropagation();const S=w.clipboardData?.getData("text/plain");S&&L.current?.pastedValue(S)},[]),Y=f.useCallback(w=>{V.current?.inputElement?.removeEventListener("keydown",U),V.current?.inputElement?.removeEventListener("mousedown",N),V.current?.inputElement?.removeEventListener("mouseup",_),V.current?.inputElement?.removeEventListener("paste",Q),V.current=w,V.current?.inputElement?.addEventListener("keydown",U),V.current?.inputElement?.addEventListener("mousedown",N),V.current?.inputElement?.addEventListener("mouseup",_),V.current?.inputElement?.addEventListener("paste",Q),B.current=V.current?.inputElement},[]),P=f.useCallback(()=>{V.current?.focus()},[]);f.useImperativeHandle(e,()=>({focus:P}));const c=te(b,{"bsc:border-error!":!T});return m.jsx(Ut,{ref:w=>{w&&Y(w)},readOnly:s,debounceTime:o,fillContainer:i,leftElement:a,rightElement:u,className:c,leftElementClassName:p,rightElementClassName:y,isSingleLine:x,allowSingleLineScroll:l,onFocus:F,onBlur:I,onElementCreate:k,onLeftElementClick:j,onRightElementClick:D})},Po=f.forwardRef(jh),Xr=f.createContext(void 0);function Eo(t,e,r=!0){const n=Vs(t),s=As(t),o=kf(t);let i=Mr(s)-(e.options?.weekStartsOn||0);i=i===-1?6:i;const a=Mr(o)-(e.options?.weekStartsOn||0),u=Ll({start:s,end:o}),b=n+i>35?6:5,p=Co(b,7,{dayValue:null,isCurrent:!0});let y=1;for(let x=0,l=b;x<l;x++){for(let d=x>0?0:i;d<7;d++){const h=u[y-1];if(h.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),p[x][d].dayValue=h,++y>n)break}if(y>n)break}if(i>0&&r)for(let x=0;x<i;x++)p[0][x].dayValue=Pd(s,i-x),p[0][x].isCurrent=!1;if(a>-1&&r)for(let x=6;x>a;x--)p[b-1][x].dayValue=ct(o,x-a),p[b-1][x].isCurrent=!1;return p}function Co(t,e,r){const n=[];for(let s=0,o=t;s<o;s++){const i=[];for(let a=0,u=e;a<u;a++){const b=Ih(r)?r:{...r};i.push(b)}n.push(i)}return n}function Ih(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"||t instanceof Date}function Mh(t){const e=Ed(new Date,t.options?.weekStartsOn||0),r=[];for(let n=0;n<7;n++)r.push(ct(e,n).toLocaleDateString(t.code,{weekday:"short"}));return r}function Lh(t){const e=new Date(Date.UTC(2020,0,1)),r=[[{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 n=0;for(let s=0;s<3;s++)for(let o=0;o<4;o++)r[s][o]={monthNumber:n,monthName:He(e,n++).toLocaleDateString(t.code,{month:"short"})};return r}function Ah(t,e){const r=new Date(t.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const s=Al({start:r,end:Ot(r,9)}),o=Co(3,4,"");let i=0;for(let a=0;a<3;a++)for(let u=0;u<4&&(o[a][u]=s[i++].toLocaleDateString(e.code,{year:"numeric"}),i!==s.length);u++);return o}function Rh(t){const e=new Date;return e.setHours(0,0,0,0),e.toLocaleTimeString(t.code)}function Fh(t,e,r){return t.getTime()>=e.getTime()&&t.getTime()<=r.getTime()}function Lt(t,e){const r=Cd(t);if(isNaN(r.valueOf())){let n=_e(t,"P pp",new Date,{locale:e});return!isNaN(n.valueOf())||(n=_e(t,"Pp",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P HH:mm",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P hh:mm a..aaa",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P HH:mm:ss",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P hh:mm:ss a..aaa",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"P p",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"pp",new Date,{locale:e}),!isNaN(n.valueOf()))||(n=_e(t,"p",new Date,{locale:e}),!isNaN(n.valueOf()))?n:void 0}return r}function Jr(t,e){const r=t.split("-");if(r.length!==2)return;const n=Lt(r[0].trim(),e);if(!n)return;const s=Lt(r[1].trim(),e);if(s)return[n,s]}var ae=(t=>(t[t.DateTime=0]="DateTime",t[t.DateOnly=1]="DateOnly",t[t.TimeOnly=2]="TimeOnly",t[t.DateRange=3]="DateRange",t))(ae||{}),ye=(t=>(t[t.DaySelector=0]="DaySelector",t[t.MonthSelector=1]="MonthSelector",t[t.YearSelector=2]="YearSelector",t[t.TimeSelector=3]="TimeSelector",t[t.DateRangeSelector=4]="DateRangeSelector",t))(ye||{}),dt=(t=>(t[t.Day=0]="Day",t[t.Month=1]="Month",t[t.Year=2]="Year",t[t.Range=3]="Range",t))(dt||{}),At=(t=>(t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t))(At||{}),me=(t=>(t[t.TwelveHour=0]="TwelveHour",t[t.TwentyFourHour=1]="TwentyFourHour",t))(me||{}),Ve=(t=>(t[t.Normal=0]="Normal",t[t.Range=1]="Range",t))(Ve||{}),Jt=(t=>(t[t.Right=0]="Right",t[t.Left=1]="Left",t[t.None=2]="None",t))(Jt||{}),ee=(t=>(t[t.SetDateSelector=0]="SetDateSelector",t[t.SetViewDate=1]="SetViewDate",t[t.SetSelectedDate=2]="SetSelectedDate",t[t.SetSelectedDateRange=3]="SetSelectedDateRange",t[t.SetSelectedStartDate=4]="SetSelectedStartDate",t[t.SetSelectedEndDate=5]="SetSelectedEndDate",t[t.SetTimeFormat=6]="SetTimeFormat",t[t.ClearDates=7]="ClearDates",t[t.InitializeDates=8]="InitializeDates",t))(ee||{});const $h=(t,e)=>{switch(e.type){case 0:return e.dateSelector!==void 0?{...t,currentSelector:e.dateSelector,currentViewDate:e.viewDate||t.currentViewDate}:{...t};case 1:return{...t,currentViewDate:e.viewDate||new Date,dateInitialized:!0};case 2:return{...t,selectedDate:e.selectedDate||t.selectedDate,currentViewDate:e.viewDate||t.currentViewDate};case 3:return{...t,selectedStartDate:e.selectedStartDate||t.selectedStartDate,selectedEndDate:e.selectedEndDate||t.selectedEndDate};case 4:return{...t,selectedStartDate:e.selectedStartDate,selectedEndDate:void 0};case 5:return{...t,selectedEndDate:e.selectedEndDate};case 6:return{...t,timeFormat:e.timeFormat||t.timeFormat};case 7:return{currentSelector:t.currentSelector,currentViewDate:t.currentViewDate,timeFormat:t.timeFormat,dateInitialized:!0};case 8:{const r={...t,currentViewDate:Hh(e.initialDate),dateInitialized:!0};return Array.isArray(e.initialDate)?{...r,selectedStartDate:e.initialDate[0],selectedEndDate:e.initialDate[1]}:{...r,selectedDate:e.initialDate}}default:return{...t,currentSelector:ye.DaySelector}}};function Hh(t){return t?Array.isArray(t)?t[0]:t:new Date}const en=(t,e,r)=>{const n=f.useCallback(u=>{r({type:ee.SetViewDate,viewDate:He(e,u)})},[e]),s=f.useCallback(u=>{r({type:ee.SetViewDate,viewDate:Fr(e,u)})},[e]),o=f.useCallback(u=>{r({type:ee.SetViewDate,viewDate:Ot(e,u)})},[e]),i=f.useCallback(u=>{r({type:ee.SetViewDate,viewDate:$r(e,u)})},[e]),a=f.useCallback(u=>{r({type:ee.SetDateSelector,dateSelector:u})},[]);return{...t,incrementViewMonths:n,decrementViewMonths:s,incrementViewYears:o,decrementViewYears:i,setDateSelector:a}},er=({viewDate:t,selectedDate:e,selectedStartDate:r,selectedEndDate:n,selectionMode:s=Ve.Normal,locale:o,onDateSelected:i,selectableDate:a,isValidDate:u,dispatcher:b})=>{const[p,y]=f.useState(!1),[x,l]=f.useState(),[d,h]=f.useState(),[g,v]=f.useState(),[k,j]=f.useState(),D=f.useRef(void 0),T=f.useRef(void 0),H=f.useContext(Xr),V=f.useMemo(()=>H.calendarTemplate,[H.calendarTemplate]);f.useEffect(()=>{D.current=o,T.current=Mh(D.current),y(!0)},[]),f.useEffect(()=>{t&&D.current&&v(Eo(t,D.current,s===Ve.Normal))},[t,p]),f.useEffect(()=>{j(e?new Date(e.getFullYear(),e.getMonth(),e.getDate()):void 0)},[e]),f.useEffect(()=>{l(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),h(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),f.useEffect(()=>{D.current&&o&&(D.current=o,v(Eo(t,D.current,s===Ve.Normal)))},[o]);const B=N=>{if(s===Ve.Normal)b?.({type:ee.SetSelectedDate,selectedDate:N,viewDate:N}),i?.(N);else{if(!i)throw new Error("Range selection mode requires onDateSelected to be set");!r||Of(N,r)?i(N):r&&!n?i(N,{setEndDate:!0}):r&&n&&i(N)}},L=N=>k?.toLocaleDateString()===N.toLocaleDateString(),G=N=>{if(x&&d){const _=N.getTime();return _>=x&&_<=d}return!1},X=en({viewDate:t,selectedDate:e,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:T.current,monthMatrix:g,selectableDate:a,isValidDate:u,onDateClicked:B,isSelectedDate:L,isInSelectedDateRange:G},t,b),I=V||((N,_)=>m.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:_}));return m.jsx(qe,{props:X,template:I,children:m.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[T.current?.map((N,_)=>m.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:N},_)),g?.map((N,_)=>N.map((A,U)=>{const Q=A.dayValue!==null&&(a===void 0||a(A.dayValue)),Y=te("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":!A.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":A&&A.dayValue&&(k&&L(A.dayValue)||x&&!d&&Ls(x,A.dayValue)||x&&d&&G(A.dayValue)),"bsc:cursor-pointer":Q,"bsc:text-error bsc:cursor-not-allowed":!Q,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":A.dayValue&&Td(A.dayValue)&&!(L(A.dayValue)||G(A.dayValue))},"bc-dt-date-cell");return m.jsx("div",{className:Y,onClick:()=>A&&A.dayValue&&Q&&(u===void 0||u(A.dayValue))&&B(A.dayValue),children:A.dayValue?.getDate().toLocaleString(D.current?.code)},_.toString()+U.toString())}))]})})},tr=({title:t,scrollerType:e,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=f.useContext(Xr).dateScrollerTemplate,b=en({title:t,scrollerType:e,onTitleClicked:r,onMovePrevious:n,onMoveNext:s},o,i),p="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=u||((l,d)=>m.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:d}));return m.jsxs(qe,{props:b,template:x,children:[m.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:m.jsx(Oe,{className:p,onClick:n,children:m.jsx(Ce,{icon:"chevronLeft",size:Te.Regular})})}),m.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:r,children:t}),m.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:m.jsx(Oe,{className:p,onClick:s,children:m.jsx(Ce,{icon:"chevronRight",size:Te.Regular})})})]})},Yh=({selectedDate:t,viewDate:e,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:a})=>{const u=()=>{e&&a({type:ee.SetViewDate,viewDate:Fr(e,1)})},b=()=>{e&&a({type:ee.SetViewDate,viewDate:He(e,1)})},p=()=>{a({type:ee.SetDateSelector,dateSelector:ye.MonthSelector})},y=()=>{a({type:ee.SetDateSelector,dateSelector:ye.TimeSelector})},x=()=>e?e.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return m.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[m.jsx(tr,{title:x(),scrollerType:dt.Day,onTitleClicked:p,onMovePrevious:u,onMoveNext:b,viewDate:e,dispatcher:a}),m.jsx(er,{viewDate:e,selectedDate:t,locale:r,selectableDate:s,isValidDate:o,onDateSelected:i,dispatcher:a}),n&&m.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:m.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:y,children:t?.toLocaleTimeString(r.code)||Rh(r)})})]})},Vh=({viewDate:t,locale:e,dateSelection:r=ae.DateTime,dispatcher:n})=>{const s=f.useRef(Lh(e)),o=()=>{const p=$r(t,1);n({type:ee.SetViewDate,viewDate:p})},i=()=>{const p=Ot(t,1);n({type:ee.SetViewDate,viewDate:p})},a=p=>{n({type:ee.SetDateSelector,dateSelector:r!==ae.DateRange?ye.DaySelector:ye.DateRangeSelector,viewDate:Vd(t,p)})},u=()=>t.toLocaleDateString(e.code,{year:"numeric"}),b=()=>{n({type:ee.SetDateSelector,dateSelector:ye.YearSelector})};return m.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[m.jsx(tr,{title:u(),scrollerType:dt.Month,onTitleClicked:b,onMovePrevious:o,onMoveNext:i,viewDate:t,dispatcher:n}),m.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:s.current.map((p,y)=>p.map((x,l)=>m.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:()=>a(x.monthNumber),children:x.monthName},y.toString()+l.toString())))})]})},Wh=({viewDate:t,selectedStartDate:e,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=Qt("screen and (max-device-width: 40rem)"),a=He(t,1),u=(l,d)=>{!d||!d.setEndDate?o({type:ee.SetSelectedStartDate,selectedStartDate:l}):(o({type:ee.SetSelectedEndDate,selectedEndDate:l}),e&&s&&s([e,l]))},b=()=>{o({type:ee.SetDateSelector,dateSelector:ye.MonthSelector})},p=()=>i?`${t.toLocaleDateString(n.code,{month:"long"})} ${t.toLocaleDateString(n.code,{year:"numeric"})}`:`${t.toLocaleDateString(n.code,{month:"long"})} ${t.toLocaleDateString(n.code,{year:"numeric"})} - ${a.toLocaleDateString(n.code,{month:"long"})} ${a.toLocaleDateString(n.code,{year:"numeric"})}`,y=()=>{t&&o({type:ee.SetViewDate,viewDate:Fr(t,1)})},x=()=>{t&&o({type:ee.SetViewDate,viewDate:He(t,1)})};return m.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[m.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:m.jsx(tr,{title:p(),scrollerType:dt.Range,onTitleClicked:b,onMovePrevious:y,onMoveNext:x,viewDate:t,dispatcher:o})}),m.jsx("div",{className:"bsc-flex-grow",children:m.jsx(Yr,{mobileMarkup:m.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:m.jsx(er,{viewDate:t,selectedStartDate:e,selectedEndDate:r,selectionMode:Ve.Range,onDateSelected:u,locale:n,dispatcher:o})}),aboveMobileMarkup:m.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[m.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:m.jsx(er,{viewDate:t,selectedStartDate:e,selectedEndDate:r,selectionMode:Ve.Range,onDateSelected:u,locale:n,dispatcher:o})}),m.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:m.jsx(er,{viewDate:a,selectedStartDate:e,selectedEndDate:r,selectionMode:Ve.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},Bh=({viewDate:t,showDateSelector:e,locale:r,timeFormat:n=me.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const a=f.useRef(n===me.TwelveHour?11:23),u=f.useRef(n===me.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"]),b=f.useRef(zd(0,59,N=>N.toString().padStart(2,"0"))),p=f.useRef(["AM","PM"]),y=f.useRef(Tl(t)),x=N=>N>11?N-12:N,[l,d]=f.useState(x(t.getHours())),[h,g]=f.useState(t.getMinutes()),[v,k]=f.useState(t.getHours()<=12?0:1),j=f.useRef(t.toLocaleDateString(r.code));f.useEffect(()=>{const N=t.getHours(),_=t.getMinutes();if(N!==l&&d(n===me.TwelveHour?x(N):N),_!==h&&g(_),n===me.TwelveHour){const A=N<=11?0:1;A!==v&&k(A)}},[t]);const D=()=>{const N=s?.hours?.step||1,_=l<a.current?l+N:0;d(_),L(_,h,v)},T=()=>{const N=s?.hours?.step||1,_=l>0?l-N:a.current;d(_),L(_,h,v)},H=()=>{const N=s?.minutes?.step||1,_=h+N<(s?.minutes?.max||59)?h+N:s?.minutes?.min||0;g(_),L(l,_,v)},V=()=>{const N=s?.minutes?.step||1,_=h-N>=(s?.minutes?.min||0)?h-N:(s?.minutes?.max||60)-N;g(_),L(l,_,v)},B=()=>{const N=v===0?1:0;k(N),L(l,h,N)},L=(N,_,A)=>{const U=n===me.TwelveHour&&A===1?N+12:N;y.current.setHours(U,_),i({type:ee.SetSelectedDate,selectedDate:y.current,viewDate:y.current}),o?.(y.current)},G=()=>{i({type:ee.SetDateSelector,dateSelector:ye.DaySelector})},X=te("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":n===me.TwelveHour,"bsc:grid-cols-3":n===me.TwentyFourHour}),F=te("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":n===me.TwelveHour,"bsc:col-span-3":n===me.TwentyFourHour}),I="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 m.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:n===me.TwelveHour?"15rem":"11rem"},children:m.jsxs("div",{className:X,children:[e&&m.jsx("div",{className:F,onClick:G,children:j.current}),m.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:D,children:m.jsx(Ce,{icon:"chevronUp",size:Te.Regular})})}),m.jsx("div",{}),m.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:H,children:m.jsx(Ce,{icon:"chevronUp",size:Te.Regular})})}),n===me.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:B,children:m.jsx(Ce,{icon:"chevronUp",size:Te.Regular})})}),m.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:u.current[l]}),m.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),m.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:b.current[h]}),n===me.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:p.current[v]}),m.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:T,children:m.jsx(Ce,{icon:"chevronDown",size:Te.Regular})})}),m.jsx("div",{}),m.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:V,children:m.jsx(Ce,{icon:"chevronDown",size:Te.Regular})})}),n===me.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:m.jsx(Oe,{className:I,onClick:B,children:m.jsx(Ce,{icon:"chevronDown",size:Te.Regular})})})]})})},zh=({viewDate:t,locale:e,dispatcher:r})=>{const n=Ah(t,e),s=()=>{const u=$r(t,10);r({type:ee.SetViewDate,viewDate:u})},o=()=>{const u=Ot(t,10);r({type:ee.SetViewDate,viewDate:u})},i=u=>{const b=parseInt(u);r({type:ee.SetDateSelector,dateSelector:ye.MonthSelector,viewDate:Wd(t,b)})},a=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return m.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[m.jsx(tr,{title:a(),scrollerType:dt.Year,onMovePrevious:s,onMoveNext:o,viewDate:t,dispatcher:r}),m.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:m.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:n.map((u,b)=>u.map((p,y)=>p.length>0?m.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:()=>i(p),children:p},b.toString()+y.toString()):m.jsx("div",{},b.toString()+y.toString())))})})]})};class Uh{constructor(e,r){this.dateSelection=e;const n=2023,s=12,o=20,a=new Date(n,s-1,o).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=a.replace(`${n}`,"YYYY").replace(`${s}`,"MM").replace(`${o}`,"DD");const u=new Date,b=18,p=24,y=37,x=317;u.setHours(b,p,y,x);const l=u.toLocaleTimeString(r);this.use24HourTime=l.startsWith("18"),this.timeFormat=l.replace(`${this.use24HourTime?b:"6"}`,"HH").replace(`${p}`,"MM").replace(`${y}`,"SS").replace(`${x}`,"LLL"),this.createDateParts()}dateFormat;timeFormat;use24HourTime;monthPart;dayPart;yearPart;twelveHourPart;twentyFourHourPart;minutePart;meridianPart;get is24HourTime(){return this.use24HourTime}createInputFormat(){const e={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case ae.DateOnly:return this.createDateFormat(e);case ae.TimeOnly:return this.createTimeFormat(e);case ae.DateRange:return this.createDateRangeFormat(e);case ae.DateTime:return this.createDateTimeFormat(e)}}createDateFormat(e){return this.dateFormat.startsWith("MM")?e.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?e.formatParts.push(...this.createDayMonthYearFormatParts()):e.formatParts.push(...this.createYearMonthDayFormatParts()),e}createTimeFormat(e){return this.use24HourTime?e.formatParts.push(...this.createTwentyFourHourFormatParts()):e.formatParts.push(...this.createTwelveHourFormatParts()),e}createDateRangeFormat(e){const r=[];this.dateFormat.startsWith("MM")?r.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?r.push(...this.createDayMonthYearFormatParts()):r.push(...this.createYearMonthDayFormatParts());const n={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return e.formatParts.push(...r,n,...r),e}createDateTimeFormat(e){this.dateFormat.startsWith("MM")?e.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?e.formatParts.push(...this.createDayMonthYearFormatParts()):e.formatParts.push(...this.createYearMonthDayFormatParts());const r={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return e.formatParts.push(r),this.use24HourTime?e.formatParts.push(...this.createTwentyFourHourFormatParts()):e.formatParts.push(...this.createTwelveHourFormatParts()),e}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let e=this.dateFormat.replace("MM",""),r=e.indexOf("DD"),n=e.substring(0,r);e=e.replace(n,"").replace("DD","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=e.indexOf("YYYY"),n=e.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,s,this.dayPart,o,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let e=this.dateFormat.replace("DD",""),r=e.indexOf("MM"),n=e.substring(0,r);e=e.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=e.indexOf("YYYY"),n=e.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,s,this.monthPart,o,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let e=this.dateFormat.replace("YYYY",""),r=e.indexOf("MM"),n=e.substring(0,r);e=e.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=e.indexOf("DD"),n=e.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,s,this.monthPart,o,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const e=this.timeFormat.replace("HH",""),r=e.indexOf("MM"),n=e.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},o={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,s,this.minutePart,o,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const e=this.timeFormat.replace("HH",""),r=e.indexOf("MM"),n=e.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,s,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:je.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:je.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:je.Text,possibleValues:["AM","PM"]}}}const qh=(t,e)=>{const[r,n]=f.useState(),s=f.useRef(void 0);return f.useEffect(()=>{e&&!r&&(s.current=new Uh(t,e),n(s.current.createInputFormat()))},[e]),[r,s.current?.is24HourTime]},Gh=({value:t,readOnly:e=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:a,className:u,dateSelection:b=ae.DateTime,dateFormat:p,timeConstraints:y,icon:x,iconPosition:l=Jt.Right,inputElement:d,selectableDate:h,isValidDate:g,onChange:v,onError:k,calendarTemplate:j,dateScrollerTemplate:D,inputTemplate:T,wrapperTemplate:H})=>{const[V,B]=f.useState(!1),[L,G]=f.useState(),[X,F]=f.useState(),[I,N,_]=$i(b),A=f.useRef(void 0),U=f.useRef(!1),Q=f.useRef(a||Bd()),Y=f.useRef(void 0),P=f.useRef(void 0),c=f.useRef(void 0),w=f.useRef(null),S=f.useRef(null),[C,W]=qh(b,L),M=$o.useDateLocale(Q.current),E=f.useRef({calendarTemplate:j,dateScrollerTemplate:D});f.useEffect(()=>{G(M.code),Y.current=M;const z=q();O(t||n?{type:ee.InitializeDates,initialDate:Array.isArray(z)?z[0]:z}:{type:ee.SetViewDate,viewDate:Array.isArray(z)?z[0]:z})},[M]),f.useEffect(()=>{if(t){const z=q();O({type:ee.InitializeDates,initialDate:z})}else O({type:ee.ClearDates})},[t,Y.current]),f.useEffect(()=>{W&&O({type:ee.SetTimeFormat,timeFormat:W?me.TwentyFourHour:me.TwelveHour})},[W]),f.useEffect(()=>{d&&(P.current=d)},[d]),f.useEffect(()=>{O({type:ee.SetDateSelector,dateSelector:$()})},[I]);const $=f.useCallback(()=>_.current===ae.TimeOnly?ye.TimeSelector:_.current===ae.DateTime||_.current===ae.DateOnly?ye.DaySelector:ye.DateRangeSelector,[]),q=()=>{const z=new Date;return z.setHours(0,0,0,0),t?typeof t=="string"?_.current!==ae.DateRange?Lt(t,Y.current):Jr(t,Y.current):t:z},Z={currentSelector:$(),currentViewDate:new Date,timeFormat:me.TwelveHour,dateInitialized:!1},[R,O]=f.useReducer($h,Z),Pe=()=>{Io(),B(!0)},Re=f.useMemo(()=>Ct(()=>{B(!1)},250),[]),rr=f.useMemo(()=>Ct(()=>{Re.cancel()},5),[Re]),Do=z=>{const de=z.target.innerText;No(de)},np=z=>{if(z){const de=_.current!==ae.DateRange?Lt(z,Y.current):Jr(z,Y.current);if(de)if(g){const Fo=Array.isArray(de)?de.every(lp=>g(lp)):g(de);return!Fo&&k&&k(de),Fo}else return!0;else return!1}else return!0},sp=z=>{No(z||"")},No=z=>{const de=_.current!==ae.DateRange?Lt(z,Y.current):Jr(z,Y.current);de?(Array.isArray(de)?(Fh(de[0],As(R.currentViewDate),Ml(He(R.currentViewDate,1)))||O({type:ee.SetViewDate,viewDate:de[0]}),O({type:ee.SetSelectedDateRange,selectedStartDate:de[0],selectedEndDate:de[1]})):O({type:ee.SetSelectedDate,selectedDate:de,viewDate:de}),v?.(de)):z===""&&(O({type:ee.ClearDates}),v?.())},op=z=>{_.current===ae.DateOnly&&i===!0&&B(!1),v?.(z)},_o=()=>{Io(),B(!V),S.current?S.current.focus():w.current&&w.current.focus()},jo=()=>{O({type:ee.ClearDates}),B(!1),v?.()},rn=(z,de)=>{(!P.current||A.current!==de)&&(P.current=z,A.current=de,U.current=!0)},Io=()=>{(!c.current||U.current)&&P.current&&(c.current=P.current,F(P.current),U.current=!1)},Mo=()=>{B(!1),O({type:ee.SetDateSelector,dateSelector:$()})},ip=()=>{switch(p){case At.Short:return"short";case At.Medium:return"medium";case At.Long:return"long";default:return}},nr=()=>{const z=ip();switch(_.current){case ae.DateTime:return R.selectedDate?z?R.selectedDate.toLocaleString(Y.current?.code,{dateStyle:z,timeStyle:z}):R.selectedDate.toLocaleString(Y.current?.code):"";case ae.DateOnly:return R.selectedDate?z?R.selectedDate.toLocaleDateString(Y.current?.code,{dateStyle:z}):R.selectedDate.toLocaleDateString(Y.current?.code):"";case ae.TimeOnly:return R.selectedDate?z?R.selectedDate.toLocaleTimeString(Y.current?.code,{timeStyle:z,hour12:R.timeFormat===me.TwelveHour,hourCycle:R.timeFormat===me.TwentyFourHour?"h23":void 0}):R.selectedDate.toLocaleTimeString(Y.current?.code,{hour12:R.timeFormat===me.TwelveHour,hourCycle:R.timeFormat===me.TwentyFourHour?"h23":void 0}):"";case ae.DateRange:return R.selectedStartDate&&R.selectedEndDate?z?`${R.selectedStartDate.toLocaleDateString(Y.current?.code,{dateStyle:z})} - ${R.selectedEndDate.toLocaleDateString(Y.current?.code,{dateStyle:z})}`:`${R.selectedStartDate.toLocaleDateString(Y.current?.code)} - ${R.selectedEndDate.toLocaleDateString(Y.current?.code)}`:"";default:return R.selectedDate?z?R.selectedDate.toLocaleString(Y.current?.code,{dateStyle:z,timeStyle:z}):R.selectedDate.toLocaleString(Y.current?.code):""}},sr=I===ae.DateTime||I===ae.DateOnly||I===ae.DateRange,ap=I===ae.DateTime||I===ae.TimeOnly,Rt=l===Jt.None?{}:l===Jt.Right?{rightElement:m.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[o&&!e&&m.jsx("div",{children:m.jsx(Ce,{icon:"close",size:Te.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:jo})}),m.jsx("div",{className:"bsc:ml-2",onClick:e?void 0:_o,children:x||m.jsx(Ce,{icon:"calendar",size:Te.Small,className:e?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:m.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[m.jsx("div",{className:"bsc:mr-2",onClick:e?void 0:_o,children:x||m.jsx(Ce,{icon:"calendar",size:Te.Small,className:e?void 0:"bsc:cursor-pointer"})}),o&&!e&&m.jsx("div",{children:m.jsx(Ce,{icon:"close",size:Te.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:jo})})]}),leftElementClassName:"bsc:justify-center"},cp={setDateSelector:z=>N(z)},up=H||((z,de)=>m.jsx(m.Fragment,{children:de})),Lo=()=>m.jsx(qe,{props:cp,template:up,children:m.jsxs(m.Fragment,{children:[R.currentSelector===ye.DaySelector&&sr&&R.dateInitialized&&Y.current&&m.jsx(Yh,{selectedDate:R.selectedDate,viewDate:R.currentViewDate,locale:Y.current,showTimeSelector:_.current===ae.DateTime,selectableDate:h,isValidDate:g,dispatcher:O,onChange:op}),R.currentSelector===ye.MonthSelector&&sr&&R.dateInitialized&&Y.current&&m.jsx(Vh,{viewDate:R.currentViewDate,locale:Y.current,dateSelection:_.current,dispatcher:O}),R.currentSelector===ye.YearSelector&&sr&&R.dateInitialized&&Y.current&&m.jsx(zh,{viewDate:R.currentViewDate,locale:Y.current,dispatcher:O}),R.currentSelector===ye.TimeSelector&&ap&&R.dateInitialized&&Y.current&&m.jsx(Bh,{viewDate:R.currentViewDate,showDateSelector:_.current===ae.DateTime,locale:Y.current,timeFormat:R.timeFormat,timeConstraints:y,onChange:v,dispatcher:O}),R.currentSelector===ye.DateRangeSelector&&sr&&R.dateInitialized&&Y.current&&m.jsx(Wh,{viewDate:R.currentViewDate,selectedStartDate:R.selectedStartDate,selectedEndDate:R.selectedEndDate,locale:Y.current,onChange:v,dispatcher:O})]})}),Ao=en({label:r,readOnly:e,allowClear:o,getValue:nr,onFocus:Pe,onInput:Do,iconPosition:l,iconElement:Rt.rightElement||Rt.leftElement},R.currentViewDate,O),Ro=T||((z,de)=>m.jsx(m.Fragment,{children:de})),nn=te("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":e,"bsc:bg-white bsc:dark:bg-mono-dark-1":!e},"bc-dt-input",u);return m.jsx(Xr.Provider,{value:E.current,children:m.jsxs("div",{className:"bc-date-time",children:[r&&m.jsx(Ie,{label:r,readOnly:e,className:"bc-dt-label"}),m.jsx(Yr,{mobileMarkup:m.jsxs(m.Fragment,{children:[m.jsx(qe,{props:Ao,template:Ro,children:m.jsx(Ut,{ref:w,value:nr(),readOnly:e,inputMode:"none",className:nn,onFocus:Pe,onElementCreate:z=>rn(z,!1),...Rt})}),m.jsx(go,{visible:V,target:X,hidden:Mo,unmountWhenHidden:!0,children:Lo()})]}),aboveMobileMarkup:m.jsxs(m.Fragment,{children:[m.jsx(qe,{props:Ao,template:Ro,children:s===!1?m.jsx(Ut,{ref:w,value:nr(),readOnly:e,className:nn,onFocus:Pe,onBlur:Re,onInput:Do,onElementCreate:z=>rn(z,!1),...Rt}):m.jsx(Po,{ref:S,value:nr(),readOnly:e,className:nn,format:C,isInputValid:np,onFocus:Pe,onBlur:Re,onChange:sp,onElementCreate:z=>rn(z,!0),...Rt})}),m.jsx(xo,{visible:V,target:X,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:Mo,isClickedWithin:rr,unmountWhenHidden:!0,children:Lo()})]})})]})})};var tn,ko;function Qh(){if(ko)return tn;ko=1;function t(l,d){var h,g;if(typeof d=="function")g=d(l),g!==void 0&&(l=g);else if(Array.isArray(d))for(h=0;h<d.length;h++)g=d[h](l),g!==void 0&&(l=g);return l}function e(l,d){return l[0]==="-"&&Array.isArray(d)&&/^-\d+$/.test(l)?d.length+parseInt(l,10):l}function r(l){return/^\d+$/.test(l)}function n(l){return Object.prototype.toString.call(l)==="[object Object]"}function s(l){return Object(l)===l}function o(l){return Object.keys(l).length===0}var i=["__proto__","prototype","constructor"],a=function(l){return i.indexOf(l)===-1};function u(l,d){l.indexOf("[")>=0&&(l=l.replace(/\[/g,d).replace(/]/g,""));var h=l.split(d),g=h.filter(a);if(g.length!==h.length)throw Error("Refusing to update blacklisted property "+l);return h}var b=Object.prototype.hasOwnProperty;function p(l,d,h,g){if(!(this instanceof p))return new p(l,d,h,g);typeof d>"u"&&(d=!1),typeof h>"u"&&(h=!0),typeof g>"u"&&(g=!0),this.separator=l||".",this.override=d,this.useArray=h,this.useBrackets=g,this.keepArray=!1,this.cleanup=[]}var y=new p(".",!1,!0,!0);function x(l){return function(){return y[l].apply(y,arguments)}}return p.prototype._fill=function(l,d,h,g){var v=l.shift();if(l.length>0){if(d[v]=d[v]||(this.useArray&&r(l[0])?[]:{}),!s(d[v]))if(this.override)d[v]={};else{if(!(s(h)&&o(h)))throw new Error("Trying to redefine `"+v+"` which is a "+typeof d[v]);return}this._fill(l,d[v],h,g)}else{if(!this.override&&s(d[v])&&!o(d[v])){if(!(s(h)&&o(h)))throw new Error("Trying to redefine non-empty obj['"+v+"']");return}d[v]=t(h,g)}},p.prototype.object=function(l,d){var h=this;return Object.keys(l).forEach(function(g){var v=d===void 0?null:d[g],k=u(g,h.separator).join(h.separator);k.indexOf(h.separator)!==-1?(h._fill(k.split(h.separator),l,l[g],v),delete l[g]):l[g]=t(l[g],v)}),l},p.prototype.str=function(l,d,h,g){var v=u(l,this.separator).join(this.separator);return l.indexOf(this.separator)!==-1?this._fill(v.split(this.separator),h,d,g):h[l]=t(d,g),h},p.prototype.pick=function(l,d,h,g){var v,k,j,D,T;for(k=u(l,this.separator),v=0;v<k.length;v++)if(D=e(k[v],d),d&&typeof d=="object"&&D in d){if(v===k.length-1)return h?(j=d[D],g&&Array.isArray(d)?d.splice(D,1):delete d[D],Array.isArray(d)&&(T=k.slice(0,-1).join("."),this.cleanup.indexOf(T)===-1&&this.cleanup.push(T)),j):d[D];d=d[D]}else return;return h&&Array.isArray(d)&&(d=d.filter(function(H){return H!==void 0})),d},p.prototype.delete=function(l,d){return this.remove(l,d,!0)},p.prototype.remove=function(l,d,h){var g;if(this.cleanup=[],Array.isArray(l)){for(g=0;g<l.length;g++)this.pick(l[g],d,!0,h);return h||this._cleanup(d),d}else return this.pick(l,d,!0,h)},p.prototype._cleanup=function(l){var d,h,g,v;if(this.cleanup.length){for(h=0;h<this.cleanup.length;h++)g=this.cleanup[h].split("."),v=g.splice(0,-1).join("."),d=v?this.pick(v,l):l,d=d[g[0]].filter(function(k){return k!==void 0}),this.set(this.cleanup[h],d,l);this.cleanup=[]}},p.prototype.del=p.prototype.remove,p.prototype.move=function(l,d,h,g,v){return typeof g=="function"||Array.isArray(g)?this.set(d,t(this.pick(l,h,!0),g),h,v):(v=g,this.set(d,this.pick(l,h,!0),h,v)),h},p.prototype.transfer=function(l,d,h,g,v,k){return typeof v=="function"||Array.isArray(v)?this.set(d,t(this.pick(l,h,!0),v),g,k):(k=v,this.set(d,this.pick(l,h,!0),g,k)),g},p.prototype.copy=function(l,d,h,g,v,k){return typeof v=="function"||Array.isArray(v)?this.set(d,t(JSON.parse(JSON.stringify(this.pick(l,h,!1))),v),g,k):(k=v,this.set(d,this.pick(l,h,!1),g,k)),g},p.prototype.set=function(l,d,h,g){var v,k,j,D;if(typeof d>"u")return h;for(j=u(l,this.separator),v=0;v<j.length;v++){if(D=j[v],v===j.length-1)if(g&&n(d)&&n(h[D]))for(k in d)b.call(d,k)&&(h[D][k]=d[k]);else if(g&&Array.isArray(h[D])&&Array.isArray(d))for(var T=0;T<d.length;T++)h[j[v]].push(d[T]);else h[D]=d;else(!b.call(h,D)||!n(h[D])&&!Array.isArray(h[D]))&&(/^\d+$/.test(j[v+1])?h[D]=[]:h[D]={});h=h[D]}return h},p.prototype.transform=function(l,d,h){return d=d||{},h=h||{},Object.keys(l).forEach((function(g){this.set(l[g],this.pick(g,d),h)}).bind(this)),h},p.prototype.dot=function(l,d,h){d=d||{},h=h||[];var g=Array.isArray(l);return Object.keys(l).forEach((function(v){var k=g&&this.useBrackets?"["+v+"]":v;if(s(l[v])&&(n(l[v])&&!o(l[v])||Array.isArray(l[v])&&!this.keepArray&&l[v].length!==0))if(g&&this.useBrackets){var j=h[h.length-1]||"";return this.dot(l[v],d,h.slice(0,-1).concat(j+k))}else return this.dot(l[v],d,h.concat(k));else g&&this.useBrackets?d[h.join(this.separator).concat("["+v+"]")]=l[v]:d[h.concat(k).join(this.separator)]=l[v]}).bind(this)),d},p.pick=x("pick"),p.move=x("move"),p.transfer=x("transfer"),p.transform=x("transform"),p.copy=x("copy"),p.object=x("object"),p.str=x("str"),p.set=x("set"),p.delete=x("delete"),p.del=p.remove=x("remove"),p.dot=x("dot"),["override","overwrite"].forEach(function(l){Object.defineProperty(p,l,{get:function(){return y.override},set:function(d){y.override=!!d}})}),["useArray","keepArray","useBrackets"].forEach(function(l){Object.defineProperty(p,l,{get:function(){return y[l]},set:function(d){y[l]=d}})}),p._process=t,tn=p,tn}var Zh=Qh();const Oo=or(Zh),Kh=({name:t,label:e,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:a=xe.Horizontal,isMultiSelect:u=!1,className:b,onChange:p,itemTemplate:y})=>{const[x,l]=f.useState(),[d,h]=f.useState([]),g=xr(()=>n,[n]),v=f.useId();f.useEffect(()=>{if(u){const F=Array.isArray(r)?r.map(I=>I.toString()):r?[String(r)]:void 0;h(F??[])}else r&&l(r.toString())},[r]);const k=F=>u?d.findIndex(I=>I===F)>-1:x===F,j=F=>{const I=F.toString();if(u){const N=k(I);let _;N?_=d.filter(A=>A!=I):_=[...d,I],h(_),p?.({name:t,value:_})}else I!==x&&(l(I),p?.({name:t,value:I}))},D=F=>{Array.isArray(F?.value)?h(F?.value??[]):l(F?.value),p?.(F)},T=gt(Ze.FocusWithin),H=f.useCallback((F,I)=>m.jsx(m.Fragment,{children:I}),[]),V=y||H,B=(F,I,N)=>{const _=`element_${v}_${I}`,A=Oo.pick(s,F),U=String(Oo.pick(o,F)),Q=I===0,Y=I===N.length-1,P=te("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":!i,"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":i,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":Q&&a===xe.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":Y&&a===xe.Horizontal,"bsc:border-t bsc:border-b":!Q&&!Y&&a===xe.Horizontal,"bsc:border-l":!Q&&a===xe.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":Q&&a===xe.Vertical,"bsc:border bsc:rounded-b-md":Y&&a===xe.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!Q&&!Y&&a===xe.Vertical},T),c={itemId:_,selectedValue:u?d:x,itemText:A,itemValue:U,itemData:F,itemStyles:P,isSelected:k(U),isFirstItem:Q,isLastItem:Y,onItemChanged:j};return u?m.jsx(qe,{props:c,template:V,children:m.jsx(tt,{className:P,children:m.jsx(Mn,{value:U,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:A})})},_):m.jsx(qe,{props:c,template:V,children:m.jsx(tt,{className:P,children:m.jsx(Yn,{value:U,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:A})})},_)},L=te("bsc:flex bsc:flex-col bsc:gap-2",b),G=te("bsc:flex",{"bsc:flex-col bsc:w-max":a===xe.Vertical}),X=F=>u?m.jsx(Rn,{name:t,value:d,readOnly:i,onChange:D,className:G,children:F.map(B)}):m.jsx(Hn,{name:t,value:x,readOnly:i,onChange:D,className:G,children:F.map(B)});return m.jsxs(tt,{className:L,children:[e&&m.jsx(Ie,{label:e,readOnly:i}),g&&X(g)]})},Xh=f.memo(Kh),Jh=({name:t,label:e,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:a=Ee.Right,orientation:u=xe.Vertical,className:b,useAnimation:p,onChange:y})=>{const x=xr(()=>n,[n]),l=f.useId(),d=gr(p),h=gt(Ze.FocusWithin),g=te("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",b),v=te("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":u===xe.Vertical,"bsc:*:pr-2":u===xe.Horizontal}),k=te("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":i}),j=te("bc-radio-item bsc:group bsc:relative bsc:*:size-[21px] bsc:rounded-full",{"bsc:ml-2":a===Ee.Left,"bsc:mr-2":a===Ee.Right,"bc-read-only":i},h),D=te("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"),T=te("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":!i&&d}),H=te("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":!i&&d}),V=(B,L)=>{const G=B[s],X=B[o];return m.jsxs(tt,{className:k,children:[a===Ee.Left&&m.jsx(Ie,{label:G,readOnly:i}),m.jsx(Yn,{value:X,className:j,children:m.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:D,children:[m.jsx("circle",{cx:15,cy:15,r:15,className:T}),m.jsx("circle",{cx:"50%",cy:"50%",r:7,className:H})]})}),a===Ee.Right&&m.jsx(Ie,{label:G,readOnly:i})]},`radio_${l}_item${L}`)};return m.jsxs("div",{className:g,children:[e&&m.jsx(Ie,{label:e,readOnly:i}),m.jsx(Hn,{name:t,value:r,readOnly:i,onChange:y,className:v,children:x&&x.map(V)})]})},ep=f.memo(Jh),tp=({name:t,label:e,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:a})=>{const u=gr(o),b=te("bc-toggle-wrapper bsc:flex bsc:flex-col",i),p=gt(Ze.FocusWithin),y=te("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":!s,"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":s},p),x=te("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":!s,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":s,"bsc:[transition:0.3s]":!s&&u});return m.jsxs(tt,{className:b,children:[e&&m.jsx(Ie,{label:e,readOnly:s}),m.jsx(_i,{name:t,value:r,toggled:n,onChange:a,className:y,children:m.jsx("div",{className:x})})]})},rp=f.memo(tp);K.BeeSoftProvider=Bo,K.Button=Oe,K.Checkbox=Vn,K.CheckboxGroup=Yi,K.ContentEditableInput=Ut,K.DateFormatType=At,K.DateScrollerType=dt,K.DateSelectionType=ae,K.DateTime=Gh,K.FormGroupItemOrientation=xe,K.FormattedInput=Po,K.GroupButton=Xh,K.MediaQuery=Yr,K.MobileOverlayPanel=go,K.OverlayPanel=xo,K.RadioButton=ep,K.SelectionLabelLocation=Ee,K.Toggle=rp,K.applyBeeSoftTheme=Zd,K.createBeeSoftTheme=Kd,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})}));
|
|
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 $=="function"?$.displayName||$.name||"Unknown":$),S($,xe,Tt,u(),le,xn)}function _($){x($)?$._store&&($._store.validated=1):typeof $=="object"&&$!==null&&$.$$typeof===et&&($._payload.status==="fulfilled"?x($._payload.value)&&$._payload.value._store&&($._payload.value._store.validated=1):$._store&&($._store.validated=1))}function x($){return typeof $=="object"&&$!==null&&$.$$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"),J=Symbol.for("react.forward_ref"),W=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"),rt=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($){return $()}};var w,F={},K=D.react_stack_bottom_frame.bind(D,c)(),at=tt(s(c)),St={};Z1.Fragment=R,Z1.jsx=function($,gt,Tt){var Pt=1e4>rt.recentlyCreatedOwnerStacks++;return b($,gt,Tt,!1,Pt?Error("react-stack-top-frame"):K,Pt?tt(s($)):at)},Z1.jsxs=function($,gt,Tt){var Pt=1e4>rt.recentlyCreatedOwnerStacks++;return b($,gt,Tt,!0,Pt?Error("react-stack-top-frame"):K,Pt?tt(s($)):at)}})()),Z1}var q4;function GD(){return q4||(q4=1,process.env.NODE_ENV==="production"?nv.exports=BD():nv.exports=VD()),nv.exports}var Ja=GD();function jD(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var X4,K4;function LD(){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 PD=LD();const YD=jD(PD),qD=()=>{throw new Error("useEvent should not be called before the component is mounted")},Wp=n=>{const t=H.useRef(qD);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=!YD(t.current,n));const s={changed:i,previousValue:t.current};return t.current=n,s},XD=n=>typeof n=="function",KD=n=>{const[t,i]=H.useState({value:n,initial:!0}),s=H.useRef(n);return[t,u=>{if(!XD(u))i({value:u,initial:!1});else{const c=u(s.current);s.current=c,i({value:c,initial:!1})}}]},QD=n=>{const[t,i]=KD(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 ZD(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?ZD(t):{},i,{className:u}),f)}};var JD=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=JD,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 FD(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 kD(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,kD.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 ID(){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 WD(){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 $D(){return a6||(a6=1,process.env.NODE_ENV==="production"?ov.exports=ID():ov.exports=WD()),ov.exports}var tA=$D(),eA=H.version.split(".").map(Number)[0],i6=[],nA=Symbol.for(eA>=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,aA.bind(t,n,i)}function aA(n,t){t(),pc=n}var l6,fv,r6=function(){},iA=((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),sA=Promise.prototype.then.bind(Promise.resolve());function lA(){fv||(fv=sA(rA))}function rA(){var n;fv=void 0,(n=pc)==null||n.f()}function oA(n){lA();var t=H.useRef();t.current==null&&(typeof window>"u"?t.current=iA: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 tA.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot),i.S(),i}Object.defineProperties(Fa.prototype,{$$typeof:{configurable:!0,value:nA},type:{configurable:!0,value:function(n){var t=n.data,i=oA(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 FD(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),uA=(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(),J=J1(),W=H.useId(),st=H.useMemo(()=>J?.sharedId||n.id||W,[J?.sharedId,n.id,W]),[I,et,nt]=QD({checked:!1,partial:!1}),bt=Q4(u),rt=Q4(c);H.useEffect(()=>{if(I.initial)et({checked:c?!1:u,partial:c});else{const F=bt.changed?u:I.value.checked,K=rt.changed?c:I.value.partial;et({checked:K?!1:F,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 F=U.current,K=N.current.value?.some(at=>F(s,at))??!1;et(at=>({...at,checked:K}))}else{const F=N.current.value?.some(K=>s===K)??!1;et(K=>({...K,checked:F}))}}),lh(()=>{A.current&&_(A.current.value)}),lh(()=>{R.current&&D(R.current.value??!1)});const dt=Wp(F=>{const K=nt.current?.value.partial===!0?!0:F.target.checked;et({checked:K,partial:!1}),j.current?j.current({originalEvent:F,name:b,value:s,checked:K}):p?.({originalEvent:F,name:b,value:s,checked:K})}),pt=F=>{const K={checked:F?!1:nt.current?.value.checked??!1,partial:F};et(K)},tt=F=>{et({checked:F,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(uA)),cA=(n,t)=>n&&t&&typeof n=="object"&&typeof t=="object"&&"value"in n&&"value"in t?n.value===t.value:n===t,f6=(n=cA)=>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}),fA=({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(fA),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})},hA=({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 dA(){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}dA();const pA=({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(pA);const mA=({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(mA);const gA=({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(gA),yA=({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(yA),vA=(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})},SA=H.memo(H.forwardRef(vA)),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(hA,{htmlFor:t,className:u,children:n})},bA=(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(bA)),EA=({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)]})},TA=H.memo(EA);var S6=typeof global=="object"&&global&&global.Object===Object&&global,CA=typeof self=="object"&&self&&self.Object===Object&&self,rl=S6||CA||Function("return this")(),oh=rl.Symbol,b6=Object.prototype,_A=b6.hasOwnProperty,xA=b6.toString,e0=oh?oh.toStringTag:void 0;function DA(n){var t=_A.call(n,e0),i=n[e0];try{n[e0]=void 0;var s=!0}catch{}var u=xA.call(n);return s&&(t?n[e0]=i:delete n[e0]),u}var AA=Object.prototype,MA=AA.toString;function NA(n){return MA.call(n)}var OA="[object Null]",RA="[object Undefined]",E6=oh?oh.toStringTag:void 0;function uh(n){return n==null?n===void 0?RA:OA:E6&&E6 in Object(n)?DA(n):NA(n)}function ch(n){return n!=null&&typeof n=="object"}var zA="[object Symbol]";function HA(n){return typeof n=="symbol"||ch(n)&&uh(n)==zA}var dv=Array.isArray,wA=/\s/;function UA(n){for(var t=n.length;t--&&wA.test(n.charAt(t)););return t}var BA=/^\s+/;function VA(n){return n&&n.slice(0,UA(n)+1).replace(BA,"")}function Qo(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}var T6=NaN,GA=/^[-+]0x[0-9a-f]+$/i,jA=/^0b[01]+$/i,LA=/^0o[0-7]+$/i,PA=parseInt;function C6(n){if(typeof n=="number")return n;if(HA(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=VA(n);var i=jA.test(n);return i||LA.test(n)?PA(n.slice(2),i?2:8):GA.test(n)?T6:+n}var YA="[object AsyncFunction]",qA="[object Function]",XA="[object GeneratorFunction]",KA="[object Proxy]";function _6(n){if(!Qo(n))return!1;var t=uh(n);return t==qA||t==XA||t==YA||t==KA}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 QA(n){return!!x6&&x6 in n}var ZA=Function.prototype,JA=ZA.toString;function mc(n){if(n!=null){try{return JA.call(n)}catch{}try{return n+""}catch{}}return""}var FA=/[\\^$.*+?()[\]{}|]/g,kA=/^\[object .+?Constructor\]$/,IA=Function.prototype,WA=Object.prototype,$A=IA.toString,tM=WA.hasOwnProperty,eM=RegExp("^"+$A.call(tM).replace(FA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nM(n){if(!Qo(n)||QA(n))return!1;var t=_6(n)?eM:kA;return t.test(mc(n))}function aM(n,t){return n?.[t]}function gc(n,t){var i=aM(n,t);return nM(i)?i:void 0}var mv=gc(rl,"WeakMap"),D6=Object.create,iM=(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 sM(n,t){for(var i=-1,s=n==null?0:n.length;++i<s&&t(n[i],i,n)!==!1;);return n}var lM=9007199254740991,rM=/^(?:0|[1-9]\d*)$/;function oM(n,t){var i=typeof n;return t=t??lM,!!t&&(i=="number"||i!="symbol"&&rM.test(n))&&n>-1&&n%1==0&&n<t}function uM(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 cM=Object.prototype,fM=cM.hasOwnProperty;function hM(n,t,i){var s=n[t];(!(fM.call(n,t)&&M6(s,i))||i===void 0&&!(t in n))&&uM(n,t,i)}var dM=9007199254740991;function N6(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=dM}function pM(n){return n!=null&&N6(n.length)&&!_6(n)}var mM=Object.prototype;function O6(n){var t=n&&n.constructor,i=typeof t=="function"&&t.prototype||mM;return n===i}function gM(n,t){for(var i=-1,s=Array(n);++i<n;)s[i]=t(i);return s}var yM="[object Arguments]";function R6(n){return ch(n)&&uh(n)==yM}var z6=Object.prototype,vM=z6.hasOwnProperty,SM=z6.propertyIsEnumerable,bM=R6((function(){return arguments})())?R6:function(n){return ch(n)&&vM.call(n,"callee")&&!SM.call(n,"callee")};function EM(){return!1}var H6=typeof $t=="object"&&$t&&!$t.nodeType&&$t,w6=H6&&typeof module=="object"&&module&&!module.nodeType&&module,TM=w6&&w6.exports===H6,U6=TM?rl.Buffer:void 0,CM=U6?U6.isBuffer:void 0,B6=CM||EM,_M="[object Arguments]",xM="[object Array]",DM="[object Boolean]",AM="[object Date]",MM="[object Error]",NM="[object Function]",OM="[object Map]",RM="[object Number]",zM="[object Object]",HM="[object RegExp]",wM="[object Set]",UM="[object String]",BM="[object WeakMap]",VM="[object ArrayBuffer]",GM="[object DataView]",jM="[object Float32Array]",LM="[object Float64Array]",PM="[object Int8Array]",YM="[object Int16Array]",qM="[object Int32Array]",XM="[object Uint8Array]",KM="[object Uint8ClampedArray]",QM="[object Uint16Array]",ZM="[object Uint32Array]",sn={};sn[jM]=sn[LM]=sn[PM]=sn[YM]=sn[qM]=sn[XM]=sn[KM]=sn[QM]=sn[ZM]=!0,sn[_M]=sn[xM]=sn[VM]=sn[DM]=sn[GM]=sn[AM]=sn[MM]=sn[NM]=sn[OM]=sn[RM]=sn[zM]=sn[HM]=sn[wM]=sn[UM]=sn[BM]=!1;function JM(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,FM=n0&&n0.exports===V6,yv=FM&&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,kM=G6?gv(G6):JM,IM=Object.prototype,WM=IM.hasOwnProperty;function $M(n,t){var i=dv(n),s=!i&&bM(n),u=!i&&!s&&B6(n),c=!i&&!s&&!u&&kM(n),f=i||s||u||c,p=f?gM(n.length,String):[],m=p.length;for(var S in n)WM.call(n,S)&&!(f&&(S=="length"||u&&(S=="offset"||S=="parent")||c&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||oM(S,m)))&&p.push(S);return p}function j6(n,t){return function(i){return n(t(i))}}var tN=j6(Object.keys,Object),eN=Object.prototype,nN=eN.hasOwnProperty;function aN(n){if(!O6(n))return tN(n);var t=[];for(var i in Object(n))nN.call(n,i)&&i!="constructor"&&t.push(i);return t}function iN(n){return pM(n)?$M(n):aN(n)}var a0=gc(Object,"create");function sN(){this.__data__=a0?a0(null):{},this.size=0}function lN(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}var rN="__lodash_hash_undefined__",oN=Object.prototype,uN=oN.hasOwnProperty;function cN(n){var t=this.__data__;if(a0){var i=t[n];return i===rN?void 0:i}return uN.call(t,n)?t[n]:void 0}var fN=Object.prototype,hN=fN.hasOwnProperty;function dN(n){var t=this.__data__;return a0?t[n]!==void 0:hN.call(t,n)}var pN="__lodash_hash_undefined__";function mN(n,t){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=a0&&t===void 0?pN: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=sN,yc.prototype.delete=lN,yc.prototype.get=cN,yc.prototype.has=dN,yc.prototype.set=mN;function gN(){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 yN=Array.prototype,vN=yN.splice;function SN(n){var t=this.__data__,i=k1(t,n);if(i<0)return!1;var s=t.length-1;return i==s?t.pop():vN.call(t,i,1),--this.size,!0}function bN(n){var t=this.__data__,i=k1(t,n);return i<0?void 0:t[i][1]}function EN(n){return k1(this.__data__,n)>-1}function TN(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=gN,Ur.prototype.delete=SN,Ur.prototype.get=bN,Ur.prototype.has=EN,Ur.prototype.set=TN;var i0=gc(rl,"Map");function CN(){this.size=0,this.__data__={hash:new yc,map:new(i0||Ur),string:new yc}}function _N(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 _N(t)?i[typeof t=="string"?"string":"hash"]:i.map}function xN(n){var t=I1(this,n).delete(n);return this.size-=t?1:0,t}function DN(n){return I1(this,n).get(n)}function AN(n){return I1(this,n).has(n)}function MN(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=CN,hh.prototype.delete=xN,hh.prototype.get=DN,hh.prototype.has=AN,hh.prototype.set=MN;function NN(n,t){for(var i=-1,s=t.length,u=n.length;++i<s;)n[u+i]=t[i];return n}var ON=j6(Object.getPrototypeOf,Object);function RN(){this.__data__=new Ur,this.size=0}function zN(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}function HN(n){return this.__data__.get(n)}function wN(n){return this.__data__.has(n)}var UN=200;function BN(n,t){var i=this.__data__;if(i instanceof Ur){var s=i.__data__;if(!i0||s.length<UN-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=RN,dh.prototype.delete=zN,dh.prototype.get=HN,dh.prototype.has=wN,dh.prototype.set=BN;var L6=typeof $t=="object"&&$t&&!$t.nodeType&&$t,P6=L6&&typeof module=="object"&&module&&!module.nodeType&&module,VN=P6&&P6.exports===L6,Y6=VN?rl.Buffer:void 0;Y6&&Y6.allocUnsafe;function GN(n,t){return n.slice()}function jN(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 LN(){return[]}var PN=Object.prototype,YN=PN.propertyIsEnumerable,q6=Object.getOwnPropertySymbols,qN=q6?function(n){return n==null?[]:(n=Object(n),jN(q6(n),function(t){return YN.call(n,t)}))}:LN;function XN(n,t,i){var s=t(n);return dv(n)?s:NN(s,i(n))}function KN(n){return XN(n,iN,qN)}var vv=gc(rl,"DataView"),Sv=gc(rl,"Promise"),bv=gc(rl,"Set"),X6="[object Map]",QN="[object Object]",K6="[object Promise]",Q6="[object Set]",Z6="[object WeakMap]",J6="[object DataView]",ZN=mc(vv),JN=mc(i0),FN=mc(Sv),kN=mc(bv),IN=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==QN?n.constructor:void 0,s=i?mc(i):"";if(s)switch(s){case ZN:return J6;case JN:return X6;case FN:return K6;case kN:return Q6;case IN:return Z6}return t});var WN=Object.prototype,$N=WN.hasOwnProperty;function tO(n){var t=n.length,i=new n.constructor(t);return t&&typeof n[0]=="string"&&$N.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 eO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.byteLength)}var nO=/\w*$/;function aO(n){var t=new n.constructor(n.source,nO.exec(n));return t.lastIndex=n.lastIndex,t}var k6=oh?oh.prototype:void 0,I6=k6?k6.valueOf:void 0;function iO(n){return I6?Object(I6.call(n)):{}}function sO(n,t){var i=Ev(n.buffer);return new n.constructor(i,n.byteOffset,n.length)}var lO="[object Boolean]",rO="[object Date]",oO="[object Map]",uO="[object Number]",cO="[object RegExp]",fO="[object Set]",hO="[object String]",dO="[object Symbol]",pO="[object ArrayBuffer]",mO="[object DataView]",gO="[object Float32Array]",yO="[object Float64Array]",vO="[object Int8Array]",SO="[object Int16Array]",bO="[object Int32Array]",EO="[object Uint8Array]",TO="[object Uint8ClampedArray]",CO="[object Uint16Array]",_O="[object Uint32Array]";function xO(n,t,i){var s=n.constructor;switch(t){case pO:return Ev(n);case lO:case rO:return new s(+n);case mO:return eO(n);case gO:case yO:case vO:case SO:case bO:case EO:case TO:case CO:case _O:return sO(n);case oO:return new s;case uO:case hO:return new s(n);case cO:return aO(n);case fO:return new s;case dO:return iO(n)}}function DO(n){return typeof n.constructor=="function"&&!O6(n)?iM(ON(n)):{}}var AO="[object Map]";function MO(n){return ch(n)&&Br(n)==AO}var W6=fh&&fh.isMap,NO=W6?gv(W6):MO,OO="[object Set]";function RO(n){return ch(n)&&Br(n)==OO}var $6=fh&&fh.isSet,zO=$6?gv($6):RO,tb="[object Arguments]",HO="[object Array]",wO="[object Boolean]",UO="[object Date]",BO="[object Error]",eb="[object Function]",VO="[object GeneratorFunction]",GO="[object Map]",jO="[object Number]",nb="[object Object]",LO="[object RegExp]",PO="[object Set]",YO="[object String]",qO="[object Symbol]",XO="[object WeakMap]",KO="[object ArrayBuffer]",QO="[object DataView]",ZO="[object Float32Array]",JO="[object Float64Array]",FO="[object Int8Array]",kO="[object Int16Array]",IO="[object Int32Array]",WO="[object Uint8Array]",$O="[object Uint8ClampedArray]",tR="[object Uint16Array]",eR="[object Uint32Array]",Je={};Je[tb]=Je[HO]=Je[KO]=Je[QO]=Je[wO]=Je[UO]=Je[ZO]=Je[JO]=Je[FO]=Je[kO]=Je[IO]=Je[GO]=Je[jO]=Je[nb]=Je[LO]=Je[PO]=Je[YO]=Je[qO]=Je[WO]=Je[$O]=Je[tR]=Je[eR]=!0,Je[BO]=Je[eb]=Je[XO]=!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=tO(n);else{var m=Br(n),S=m==eb||m==VO;if(B6(n))return GN(n);if(m==nb||m==tb||S&&!u)f=S?{}:DO(n);else{if(!Je[m])return u?n:{};f=xO(n,m)}}c||(c=new dh);var b=c.get(n);if(b)return b;c.set(n,f),zO(n)?n.forEach(function(D){f.add(W1(D,t,i,D,n,c))}):NO(n)&&n.forEach(function(D,A){f.set(A,W1(D,t,i,A,n,c))});var _=KN,x=p?void 0:_(n);return sM(x||n,function(D,A){x&&(A=D,D=n[A]),hM(f,A,W1(D,t,i,A,n,c))}),f}var nR=1,aR=4;function iR(n){return W1(n,nR|aR)}var Tv=function(){return rl.Date.now()},sR="Expected a function",lR=Math.max,rR=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(sR);t=C6(t)||0,Qo(i)&&(b=!!i.leading,_="maxWait"in i,c=_?lR(C6(i.maxWait)||0,t):c,x="trailing"in i?!!i.trailing:x);function D(W){var st=s,I=u;return s=u=void 0,S=W,f=n.apply(I,st),f}function A(W){return S=W,p=setTimeout(O,t),b?D(W):f}function N(W){var st=W-m,I=W-S,et=t-st;return _?rR(et,c-I):et}function R(W){var st=W-m,I=W-S;return m===void 0||st>=t||st<0||_&&I>=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 J(){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 J.cancel=j,J.flush=V,J}var oR="Expected a function";function uR(n,t,i){var s=!0,u=!0;if(typeof n!="function")throw new TypeError(oR);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 cR=(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:J,onRightElementClick:W}=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]),rt=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=>{J?.(Tt)},tt=Tt=>{W?.(Tt)},w=s0(Tt=>{O?.(Tt),U?.(Tt.target.innerText),j?.(Tt.target.innerHTML)},u),F=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:F,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),$=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:$,onClick:pt,children:f}),X.jsx("div",{ref:Tt=>{Tt&&rt(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(cR);function Ne(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=Ne(n);return isNaN(t)?Fe(n,NaN):(t&&i.setDate(i.getDate()+t),i)}function Zo(n,t){const i=Ne(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,fR=1e3;let hR={};function l0(){return hR}function Jo(n,t){const i=l0(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,u=Ne(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 dR(n){const t=Ne(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=Ne(n);return t.setHours(0,0,0,0),t}function sb(n){const t=Ne(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 pR(n){const t=dR(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 mR(n){const t=Ne(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(23,59,59,999),t}function gR(n,t){const i=Ne(n.start),s=Ne(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(Ne(f)),f.setDate(f.getDate()+p),f.setHours(0,0,0,0);return u?m.reverse():m}function rb(n){const t=Ne(n);return t.setDate(1),t.setHours(0,0,0,0),t}function yR(n,t){const i=Ne(n.start),s=Ne(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(Ne(f)),f.setFullYear(f.getFullYear()+p);return u?m.reverse():m}const vR={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"}},SR=(n,t,i)=>{let s;const u=vR[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 bR={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ER={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},TR={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CR={date:xv({formats:bR,defaultWidth:"full"}),time:xv({formats:ER,defaultWidth:"full"}),dateTime:xv({formats:TR,defaultWidth:"full"})},_R={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},xR=(n,t,i,s)=>_R[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 DR={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},AR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},MR={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"]},NR={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"]},OR={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"}},RR={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"}},zR={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:DR,defaultWidth:"wide"}),quarter:o0({values:AR,defaultWidth:"wide",argumentCallback:n=>n-1}),month:o0({values:MR,defaultWidth:"wide"}),day:o0({values:NR,defaultWidth:"wide"}),dayPeriod:o0({values:OR,defaultWidth:"wide",formattingValues:RR,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)?wR(p,_=>_.test(f)):HR(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 HR(n,t){for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&t(n[i]))return i}function wR(n,t){for(let i=0;i<n.length;i++)if(t(n[i]))return i}function UR(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 BR=/^(\d+)(th|st|nd|rd)?/i,VR=/\d+/i,GR={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},jR={any:[/^b/i,/^(a|c)/i]},LR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},PR={any:[/1/i,/2/i,/3/i,/4/i]},YR={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},qR={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]},XR={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},KR={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]},QR={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},ZR={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}},JR={ordinalNumber:UR({matchPattern:BR,parsePattern:VR,valueCallback:n=>parseInt(n,10)}),era:u0({matchPatterns:GR,defaultMatchWidth:"wide",parsePatterns:jR,defaultParseWidth:"any"}),quarter:u0({matchPatterns:LR,defaultMatchWidth:"wide",parsePatterns:PR,defaultParseWidth:"any",valueCallback:n=>n+1}),month:u0({matchPatterns:YR,defaultMatchWidth:"wide",parsePatterns:qR,defaultParseWidth:"any"}),day:u0({matchPatterns:XR,defaultMatchWidth:"wide",parsePatterns:KR,defaultParseWidth:"any"}),dayPeriod:u0({matchPatterns:QR,defaultMatchWidth:"any",parsePatterns:ZR,defaultParseWidth:"any"})},FR={code:"en-US",formatDistance:SR,formatLong:CR,formatRelative:xR,localize:zR,match:JR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kR(n){const t=Ne(n),i=+mh(t)-+pR(t);return Math.round(i/ab)+1}function ob(n,t){const i=Ne(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 IR(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 WR(n,t){const i=Ne(n),s=+Jo(i,t)-+IR(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))}},$R=/^D+$/,tz=/^Y+$/,ez=["D","DD","YY","YYYY"];function nz(n){return $R.test(n)}function az(n){return tz.test(n)}function hb(n,t,i){const s=iz(n,t,i);if(console.warn(s),ez.includes(n))throw new RangeError(s)}function iz(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 Ne(n).getDay()}function db(n){const t=Ne(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 sz(){return Object.assign({},l0())}function lz(n){let i=Ne(n).getDay();return i===0&&(i=7),i}function rz(n){const t=Ne(n),i=t.getMonth();return t.setFullYear(t.getFullYear(),i+1,0),t.setHours(0,0,0,0),t}function oz(n,t){const i=Ne(n),s=Ne(t);return+i<+s}function uz(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 cz=10;class pb{subPriority=0;validate(t,i){return!0}}class fz 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 hz extends pb{priority=cz;subPriority=-1;set(t,i){return i.timestampIsSet?t:Fe(t,uz(t,Date))}}class Oe{run(t,i,s,u){const c=this.parse(t,i,s,u);return c?{setter:new fz(c.value,this.validate,this.set,this.priority,this.subPriority),rest:c.rest}:null}validate(t,i,s){return!0}}class dz extends Oe{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*fR),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 pz extends Oe{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 mz extends Oe{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 gz extends Oe{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 yz extends Oe{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 vz extends Oe{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 Sz extends Oe{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 bz extends Oe{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 Ez extends Oe{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 Tz(n,t,i){const s=Ne(n),u=WR(s,i)-t;return s.setDate(s.getDate()-u*7),s}class Cz extends Oe{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(Tz(t,s,u),u)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function _z(n,t){const i=Ne(n),s=kR(i)-t;return i.setDate(i.getDate()-s*7),i}class xz extends Oe{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(_z(t,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Dz=[31,28,31,30,31,30,31,31,30,31,30,31],Az=[31,29,31,30,31,30,31,31,30,31,30,31];class Mz extends Oe{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<=Az[c]:i>=1&&i<=Dz[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 Nz extends Oe{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=Ne(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 Oz extends Oe{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 Rz extends Oe{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 zz extends Oe{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 Hz(n,t){const i=Ne(n),s=lz(i),u=t-s;return ph(i,u)}class wz extends Oe{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=Hz(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 Uz extends Oe{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 Bz extends Oe{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 Vz extends Oe{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 Gz extends Oe{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 jz extends Oe{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 Lz extends Oe{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 Pz extends Oe{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 Yz extends Oe{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 qz extends Oe{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 Xz extends Oe{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 Kz extends Oe{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 Qz extends Oe{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 Oe{priority=40;parse(t){return mb(t)}set(t,i,s){return[Fe(t,s*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Jz extends Oe{priority=20;parse(t){return mb(t)}set(t,i,s){return[Fe(t,s),{timestampIsSet:!0}]}incompatibleTokens="*"}const Fz={G:new dz,y:new pz,Y:new mz,R:new gz,u:new yz,Q:new vz,q:new Sz,M:new bz,L:new Ez,w:new Cz,I:new xz,d:new Mz,D:new Nz,E:new Oz,e:new Rz,c:new zz,i:new wz,a:new Uz,b:new Bz,B:new Vz,h:new Gz,H:new jz,K:new Lz,k:new Pz,m:new Yz,s:new qz,S:new Xz,X:new Kz,x:new Qz,t:new Zz,T:new Jz},kz=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Iz=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wz=/^'([^]*?)'?$/,$z=/''/g,tH=/\S/,eH=/[a-zA-Z]/;function Fl(n,t,i,s){const u=sz(),c=s?.locale??u.locale??FR,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===""?Ne(i):Fe(i,NaN);const m={firstWeekContainsDate:f,weekStartsOn:p,locale:c},S=[new hz],b=t.match(Iz).map(N=>{const R=N[0];if(R in fb){const O=fb[R];return O(N,c.formatLong)}return N}).join("").match(kz),_=[];for(let N of b){!s?.useAdditionalWeekYearTokens&&az(N)&&hb(N,t,n),!s?.useAdditionalDayOfYearTokens&&nz(N)&&hb(N,t,n);const R=N[0],O=Fz[R];if(O){const{incompatibleTokens:U}=O;if(Array.isArray(U)){const V=_.find(J=>U.includes(J.token)||J.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(eH))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");if(N==="''"?N="'":R==="'"&&(N=nH(N)),n.indexOf(N)===0)n=n.slice(N.length);else return Fe(i,NaN)}}if(n.length>0&&tH.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=Ne(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 nH(n){return n.match(Wz)[1].replace($z,"'")}function aH(n){return lb(n,Date.now())}function iH(n,t){return ph(n,-t)}function sH(n,t){let i=t-Dv(n);return i<=0&&(i+=7),ph(n,i)}function lH(n,t){const s=cH(n);let u;if(s.date){const m=fH(s.date,2);u=hH(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=dH(s.time),isNaN(f)))return new Date(NaN);if(s.timezone){if(p=pH(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+-].*)$/},rH=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,oH=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,uH=/^([+-])(\d{2})(?::?(\d{2}))?$/;function cH(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 fH(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 hH(n,t){if(t===null)return new Date(NaN);const i=n.match(rH);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 SH(t,p,m)?mH(t,p,m):new Date(NaN);{const S=new Date(0);return!yH(t,c,f)||!vH(t,u)?new Date(NaN):(S.setUTCFullYear(t,c,Math.max(u,f)),S)}}function c0(n){return n?parseInt(n):1}function dH(n){const t=n.match(oH);if(!t)return NaN;const i=Nv(t[1]),s=Nv(t[2]),u=Nv(t[3]);return bH(i,s,u)?i*_v+s*Cv+u*1e3:NaN}function Nv(n){return n&&parseFloat(n.replace(",","."))||0}function pH(n){if(n==="Z")return 0;const t=n.match(uH);if(!t)return 0;const i=t[1]==="+"?-1:1,s=parseInt(t[2]),u=t[3]&&parseInt(t[3])||0;return EH(s,u)?i*(s*_v+u*Cv):NaN}function mH(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 gH=[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 yH(n,t,i){return t>=0&&t<=11&&i>=1&&i<=(gH[t]||(vb(n)?29:28))}function vH(n,t){return t>=1&&t<=(vb(n)?366:365)}function SH(n,t,i){return t>=1&&t<=53&&i>=0&&i<=6}function bH(n,t,i){return n===24?t===0&&i===0:i>=0&&i<60&&t>=0&&t<60&&n>=0&&n<25}function EH(n,t){return t>=0&&t<=59}function TH(n,t){const i=Ne(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 CH(n,t){const i=Ne(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 _H(){return window.navigator.languages?window.navigator.languages[0]:window.navigator.language}function xH(n,t,i){const s=[];for(let u=n;u<=t;u++)s.push(i?i(u):u);return s}function DH(n,t){const i=n.target;return i?!t.isSameNode(i)&&!t.contains(i):!1}function AH(n,t){return n.isSameNode(t)||n.contains(t)}function MH(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 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!0}else if(s[f]===p)return!0}return!1}function Sb(n,t,i=!1,s){if(i&&MH(n,t)){if(!s||s?.(n)===!0)return n}else if(!i&&NH(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 bj(n){return n}function OH(n){const t=document.documentElement;Object.keys(n).forEach(i=>{t.style.setProperty(i,n[i])})}function RH(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"})}),zH=({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"})})},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:"M15.75 19.5 8.25 12l7.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:"m8.25 4.5 7.5 7.5-7.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:"m4.5 15.75 7.5-7.5 7.5 7.5"})})},BH=({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:zH,chevronLeft:HH,chevronRight:wH,chevronUp:UH,close:BH}),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 VH(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 GH(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(GH,{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 jH(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 LH(n){const t=Ha.useRef(n),[i,s]=Ha.useReducer(jH,n,Tb);Ha.useEffect(()=>{VH(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 LH(PH(n)).matchesAll}const zv={};function PH(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&&!AH(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 YH(n){const t=H.useRef(null);return t.current===null&&(t.current=n()),t.current}const wv=typeof window<"u",qH=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,XH=(n,t)=>i=>t(n(i)),f0=(...n)=>n.reduce(XH),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,KH=1e-7,QH=12;function ZH(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)>KH&&++p<QH);return f}function d0(n,t,i,s){if(n===t&&i===s)return Cs;const u=c=>ZH(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),JH=d0(.42,0,1,1),FH=d0(0,0,.58,1),Lb=d0(.42,0,.58,1),kH=n=>Array.isArray(n)&&typeof n[0]!="number",Pb=n=>Array.isArray(n)&&typeof n[0]=="number",Yb={linear:Cs,easeIn:JH,easeInOut:Lb,easeOut:FH,circIn:qv,circInOut:jb,circOut:Gb,backIn:Yv,backInOut:Bb,backOut:Ub,anticipate:Vb},IH=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(IH(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 WH(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 $H=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]=WH(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,$H),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 J=f[V];return j[V]=(W,st=!1,I=!1)=>(i||R(),J.schedule(W,st,I)),j},{}),cancel:j=>{for(let V=0;V<ag.length;V++)f[ag[V]].cancel(j)},state:u,steps:f}}const{schedule:hn,cancel:Fo,state:wa,steps:Xv}=Xb(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cs,!0);let ig;function tw(){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(tw)}},Kb=n=>t=>typeof t=="string"&&t.startsWith(n),Qb=Kb("--"),ew=Kb("var(--"),Kv=n=>ew(n)?nw.test(n.split("/*")[0].trim()):!1,nw=/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 aw(n){return n==null}const iw=/^(?:#[\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"&&iw.test(i)&&i.startsWith(n)||t&&!aw(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}},sw=n=>Vr(0,255,n),Jv={...yh,transform:n=>Math.round(sw(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 lw(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:lw,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"),rw=g0("vh"),ow=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)}},uw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cw(n){return isNaN(n)&&typeof n=="string"&&(n.match(Qv)?.length||0)+(n.match(uw)?.length||0)>0}const kb="number",Ib="color",fw="var",hw="var(",Wb="${}",dw=/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(dw,m=>($n.test(m)?(s.color.push(c),u.push(Ib),i.push($n.parse(m))):m.startsWith(hw)?(s.var.push(c),u.push(fw),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 pw=n=>typeof n=="number"?0:$n.test(n)?$n.getAnimatableNone(n):n;function mw(n){const t=$b(n);return t8(n)(t.map(pw))}const Io={test:cw,parse:$b,createTransformer:t8,getAnimatableNone:mw};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 gw({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)},yw=[Fv,Sc,vh],vw=n=>yw.find(t=>t.test(n));function e8(n){const t=vw(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=gw(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 Sw(n,t){return Wv.has(n)?i=>i<=0?n:t:i=>i>=1?t:n}function bw(n,t){return i=>Cn(n,t,i)}function $v(n){return typeof n=="number"?bw:typeof n=="string"?Kv(n)?lg:$n.test(n)?n8:Cw:Array.isArray(n)?a8:typeof n=="object"?$n.test(n)?n8:Ew: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 Ew(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 Tw(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 Cw=(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?Sw(n,t):f0(a8(Tw(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 _w=n=>{const t=({timestamp:i})=>n(i);return{start:(i=!0)=>hn.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 xw(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 Dw=5;function l8(n,t,i){const s=Math.max(t-Dw,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 Aw({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=Nw(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 Mw=12;function Nw(n,t,i){let s=i;for(let u=1;u<Mw;u++)s=s-n(s)/t(s);return s}function nS(n,t){return n*Math.sqrt(1-t*t)}const Ow=["duration","bounce"],Rw=["stiffness","damping","mass"];function r8(n,t){return t.some(i=>n[i]!==void 0)}function zw(n){let t={velocity:_n.velocity,stiffness:_n.stiffness,damping:_n.damping,mass:_n.mass,isResolvedFromDuration:!1,...n};if(!r8(n,Rw)&&r8(n,Ow))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=Aw(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}=zw({...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 J=nS(O,N);j=W=>{const st=Math.exp(-N*O*W);return f-st*((A+N*O*R)/J*Math.sin(J*W)+R*Math.cos(J*W))}}else if(N===1)j=J=>f-Math.exp(-O*J)*(R+(A+O*R)*J);else{const J=O*Math.sqrt(N*N-1);j=W=>{const st=Math.exp(-N*O*W),I=Math.min(J*W,300);return f-st*((A+N*O*R)*Math.sinh(I)+J*R*Math.cosh(I))/J}}const V={calculatedDuration:D&&_||null,next:J=>{const W=j(J);if(D)p.done=J>=_;else{let st=J===0?A:0;N<1&&(st=J===0?ol(A):l8(j,J,W));const I=Math.abs(st)<=s,et=Math.abs(f-W)<=u;p.done=I&&et}return p.value=p.done?f:W,p},toString:()=>{const J=Math.min(tS(V),rg),W=s8(st=>V.next(J*st).value,J,30);return J+"ms "+W},toTransition:()=>{}};return V}og.applyToOptions=n=>{const t=xw(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 J,W;const st=I=>{D(x.value)&&(J=I,W=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!W&&J===void 0&&(et=!0,V(I),st(I)),J!==void 0&&I>=J?W.next(I-J):(!et&&V(I),x)}}}function Hw(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 ww(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=Hw(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 Uw(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 Bw(n){const t=[0];return Uw(t,n.length-1),t}function Vw(n,t){return n.map(i=>i*t)}function Gw(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=kH(s)?s.map(qb):qb(s),c={done:!1,value:t[0]},f=Vw(i&&i.length===t.length?i:Bw(t),n),p=ww(f,t,{ease:Array.isArray(u)?u:Gw(t,u)});return{calculatedDuration:n,next:m=>(c.value=p(m),c.done=m>=n,c)}}const jw=n=>n!==null;function iS(n,{repeat:t,repeatType:i="loop"},s,u=1){const c=n.filter(jw),p=u<0||t&&i!=="loop"&&t%2===1?0:c.length-1;return!p||s===void 0?c[p]:s}const Lw={decay:aS,inertia:aS,tween:Sh,keyframes:Sh,spring:og};function o8(n){typeof n.type=="string"&&(n.type=Lw[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 Pw=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(Pw,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 J=U?{done:!1,value:b[0]}:V.next(j);c&&(J.value=c(J.value));let{done:W}=J;!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&&(J.value=iS(b,this.options,R,this.speed)),N&&N(J.value),st&&this.finish(),J}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=_w,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 Yw(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)},qw={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]),Xw={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=Xw,u=i;else{const p=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=qw,u=p}if(!u)return uS(t);const c=s[t],f=u[1].split(",").map(Qw);return typeof c=="function"?c(f):f[c]}const Kw=(n,t)=>{const{transform:i="none"}=getComputedStyle(n);return cS(i,t)};function Qw(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,Zw=new Set(["x","y","z"]),Jw=bh.filter(n=>!Zw.has(n));function Fw(n){const t=[];return Jw.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=Fw(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 kw(){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,hn.read(p8),hn.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])}Yw(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 Iw=n=>n.startsWith("--");function Ww(n,t,i){Iw(t)?n.style.setProperty(t,i):n.style[t]=i}const $w=jv(()=>window.ScrollTimeline!==void 0),tU={};function eU(n,t){const i=jv(n);return()=>tU[t]??i()}const m8=eU(()=>{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 nU(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 aU({type:n,...t}){return v8(n)&&m8()?n.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class iU 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=aU(t);this.animation=nU(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):Ww(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&&$w()?(this.animation.timeline=t,Cs):i(this)}}const S8={anticipate:Vb,backInOut:Bb,circInOut:jb};function sU(n){return n in S8}function lU(n){typeof n.ease=="string"&&sU(n.ease)&&(n.ease=S8[n.ease])}const b8=10;class rU extends iU{constructor(t){lU(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 oU(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 uU(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:oU(n)||(i==="spring"||v8(i))&&s}function mS(n){n.duration=0,n.type="keyframes"}const cU=new Set(["opacity","clipPath","filter","transform"]),fU=jv(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hU(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 fU()&&i&&cU.has(i)&&(i!=="transform"||!S)&&!m&&!s&&u!=="mirror"&&c!==0&&f!=="inertia"}const dU=40;class pU 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(),uU(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>dU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:i,...s,keyframes:t},D=!S&&hU(x)?new rU({...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(),kw()),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 mU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gU(n){const t=mU.exec(n);if(!t)return[,];const[,i,s,u]=t;return[`--${i??s}`,u]}const yU=4;function T8(n,t,i=1){Gr(i<=yU,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,u]=gU(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]),vU={test:n=>n==="auto",parse:n=>n},_8=n=>t=>t.test(n),x8=[yh,wt,kl,ko,ow,rw,vU],D8=n=>x8.find(_8(n));function SU(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Nb(n):!0}const bU=new Set(["brightness","contrast","saturate","opacity"]);function EU(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=bU.has(t)?1:0;return s!==i&&(c*=100),t+"("+c+u+")"}const TU=/\b([a-z-]*)\(.*?\)/gu,yS={...Io,getAnimatableNone:n=>{const t=n.match(TU);return t?t.map(EU).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},CU={...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=>CU[n];function N8(n,t){let i=M8(n);return i!==yS&&(i=Io),i.getAnimatableNone?i.getAnimatableNone(t):void 0}const _U=new Set(["auto","none","0"]);function xU(n,t,i){let s=0,u;for(;s<n.length&&!u;){const c=n[s];typeof c=="string"&&!_U.has(c)&&y0(c).values.length&&(u=n[s]),s++}if(u&&i)for(const c of t)n[c]=N8(i,u)}class DU 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||SU(t[u]))&&s.push(u);s.length&&xU(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 AU(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 MU(n){return Mb(n)&&"offsetHeight"in n}const R8=30,NU=n=>!isNaN(parseFloat(n));class OU{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=NU(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(),hn.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 OU(n,t)}const{schedule:SS}=Xb(queueMicrotask,!1),ul={x:!1,y:!1};function z8(){return ul.x||ul.y}function RU(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=AU(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 zU(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,HU=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function B8(n){return HU.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 wU=(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 UU(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),MU(p)&&(p.addEventListener("focus",S=>wU(S,u)),!B8(p)&&!p.hasAttribute("tabindex")&&(p.tabIndex=0))}),c}function j8(n){return Mb(n)&&"ownerSVGElement"in n}function BU(n){return j8(n)&&n.tagName==="svg"}const Ia=n=>!!(n&&n.getVelocity),VU=[...x8,$n,Io],GU=n=>VU.find(_8(n)),L8=H.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function jU(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 LU(n){for(const t in n)Ch[t]={...Ch[t],...n[t]}}const PU=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")||PU.has(n)}let q8=n=>!cg(n);function YU(n){typeof n=="function"&&(q8=t=>t.startsWith("on")?!cg(t):n(t))}try{YU(require("@emotion/is-prop-valid").default)}catch{}function qU(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 XU(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 KU(n){const{initial:t,animate:i}=XU(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}%`}},QU={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:QU};function Z8(n,{layout:t,layoutId:i}){return Eh.has(n)||n.startsWith("origin")||(t||i!==void 0)&&(!!_S[n]||n==="opacity")}const ZU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},JU=bh.length;function FU(n,t,i){let s="",u=!0;for(let c=0;c<JU;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=ZU[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=FU(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 kU({transformTemplate:n},t){return H.useMemo(()=>{const i=DS();return xS(i,t,n),Object.assign({},i.vars,i.style)},[t])}function IU(n,t){const i=n.style||{},s={};return J8(s,i,n),Object.assign(s,kU(n,t)),s}function WU(n,t){const i={},s=IU(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 $U={offset:"stroke-dashoffset",array:"stroke-dasharray"},tB={offset:"strokeDashoffset",array:"strokeDasharray"};function eB(n,t,i=1,s=0,u=!0){n.pathLength=1;const c=u?$U:tB;n[c.offset]=wt.transform(-s);const f=wt.transform(t),p=wt.transform(i);n[c.array]=`${f} ${p}`}const nB=["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 nB)_[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&&eB(_,u,c,f,!1)}const k8=()=>({...DS(),attrs:{}}),I8=n=>typeof n=="string"&&n.toLowerCase()==="svg";function aB(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 iB=["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:!!(iB.indexOf(n)>-1||/[A-Z]/u.test(n))}function sB(n,t,i,{latestValues:s},u,c=!1,f){const m=(f??AS(n)?aB:WU)(t,s,u,n),S=qU(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 lB({scrapeMotionValuesFromProps:n,createRenderState:t},i,s,u){return{latestValues:rB(i,s,u,n),renderState:t()}}function rB(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=()=>lB(n,t,s,u);return i?c():YH(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 oB=$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 uB=$8({scrapeMotionValuesFromProps:t7,createRenderState:k8}),cB=Symbol.for("motionComponentSymbol");function fB(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 hB(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")&&dB(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 qH(()=>{_&&(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 dB(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&&LU(s);const c=i?i==="svg":AS(n),f=c?uB:oB;function p(S,b){let _;const x={...H.useContext(L8),...S,layoutId:pB(S)},{isStatic:D}=x,A=KU(S),N=f(S,D);if(!D&&wv){mB(x,s);const R=gB(x);_=R.MeasureLayout,A.visualElement=hB(n,N,x,u,R.ProjectionNode,c)}return X.jsxs(fg.Provider,{value:A,children:[_&&A.visualElement?X.jsx(_,{visualElement:A.visualElement,...x}):null,sB(n,S,fB(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[cB]=n,m}function pB({layoutId:n}){const t=H.useContext(Db).id;return t&&n!==void 0?t+"-"+n:n}function mB(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 gB(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 yB(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 vB({x:n,y:t}){return{top:t.min,right:n.max,bottom:t.max,left:n.min}}function SB(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 bB(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(SB(n.getBoundingClientRect(),t))}function EB(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 TB(){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 CB=new WeakMap;function _B(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 xB{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,hn.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,CB.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||TB(),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&&hn.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=_B(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):!GU(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 xB{constructor(){super(...arguments),this.KeyframeResolver=DU}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 DB(n){return window.getComputedStyle(n)}class AB extends y7{constructor(){super(...arguments),this.type="html",this.renderInstance=v7}readValueFromInstance(t,i){if(Eh.has(i))return this.projection?.isProjecting?uS(i):Kw(t,i);{const s=DB(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 MB(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 NB 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){MB(t,i,s,u)}mount(t){this.isSVGTag=I8(t.tagName),super.mount(t)}}const OB=(n,t)=>t.isSVG??AS(n)?new NB(t):new AB(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 RB(n,t,i){n.hasValue(t)?n.getValue(t).set(i):n.addValue(t,Th(i))}function zB(n){return BS(n)?n[n.length-1]||0:n}function HB(n,t){const i=Ah(n,t);let{transitionEnd:s={},transition:u={},...c}=i||{};c={...c,...s};for(const f in c){const p=zB(c[f]);RB(n,f,p)}}function wB(n){return!!(Ia(n)&&n.add)}function VS(n,t){const i=n.getValue("willChange");if(wB(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 UB=n=>n!==null;function BB(n,{repeat:t,repeatType:i="loop"},s){const u=n.filter(UB),c=t&&i!=="loop"&&t%2===1?0:u.length-1;return u[c]}const VB={type:"spring",stiffness:500,damping:25,restSpeed:10},GB=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),jB={type:"keyframes",duration:.8},LB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},PB=(n,{keyframes:t})=>t.length>2?jB:Eh.has(n)?n.startsWith("scale")?GB(t[1]):VB:LB;function YB({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};YB(p)||Object.assign(b,PB(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=BB(b.keyframes,p);if(x!==void 0){hn.update(()=>{b.onUpdate(x),b.onComplete()});return}}return p.isSync?new lS(b):new pU(b)};function qB({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&&qB(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,hn);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(()=>{hn.update(()=>{f&&HB(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 XB(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 XB(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 KB(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 QB=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<QB;i++){const s=CS[i],u=n.props[s];(S0(u)||u===!1)&&(t[s]=u)}return t}const ZB=[...TS].reverse(),JB=TS.length;function FB(n){return t=>Promise.all(t.map(({animation:i,options:s})=>KB(n,i,s)))}function kB(n){let t=FB(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<JB;R++){const O=ZB[R],U=i[O],j=S[O]!==void 0?S[O]:b[O],V=S0(j),J=O===m?U.isActive:null;J===!1&&(A=R);let W=j===b[O]&&j!==S[O]&&V;if(W&&s&&n.manuallyAnimateOnMount&&(W=!1),U.protectedKeys={...D},!U.isActive&&J===null||!j&&!U.prevProp||hg(j)||typeof j=="boolean")continue;const st=IB(U.prevProp,j);let I=st||O===m&&U.isActive&&!W&&V||R>A&&V,et=!1;const nt=Array.isArray(j)?j:[j];let bt=nt.reduce(u(O),{});J===!1&&(bt={});const{prevResolvedValues:rt={}}=U,dt={...rt,...bt},pt=F=>{I=!0,x.has(F)&&(et=!0,x.delete(F)),U.needsAnimating[F]=!0;const K=n.getValue(F);K&&(K.liveStyle=!1)};for(const F in dt){const K=bt[F],at=rt[F];if(D.hasOwnProperty(F))continue;let St=!1;BS(K)&&BS(at)?St=!C7(K,at):St=K!==at,St?K!=null?pt(F):x.add(F):K!==void 0&&x.has(F)?pt(F):U.protectedKeys[F]=!0}U.prevProp=j,U.prevResolvedValues=bt,U.isActive&&(D={...D,...bt}),s&&n.blockInitialAnimation&&(I=!1);const tt=W&&st;I&&(!tt||et)&&_.push(...nt.map(F=>{const K={type:O};if(typeof F=="string"&&s&&!tt&&n.manuallyAnimateOnMount&&n.parent){const{parent:at}=n,St=Ah(at,F);if(at.enteringChildren&&St){const{delayChildren:$}=St.transition||{};K.delay=T7(at.enteringChildren,n,$)}}return{animation:F,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 IB(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 WB extends $o{constructor(t){super(t),t.animationState||(t.animationState=kB(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 $B=0;class tV extends $o{constructor(){super(...arguments),this.id=$B++}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 eV={animation:{Feature:WB},exit:{Feature:tV}};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 nV=n=>t=>bS(t)&&n(t,C0(t));function _0(n,t,i,s){return T0(n,t,nV(i),s)}const D7=1e-4,aV=1-D7,iV=1+D7,A7=.01,sV=0-A7,lV=0+A7;function hi(n){return n.max-n.min}function rV(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>=aV&&n.scale<=iV||isNaN(n.scale))&&(n.scale=1),(n.translate>=sV&&n.translate<=lV||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 oV(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 uV(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=uV(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),hn.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,cV(t)),velocity:fV(t,.1)}}function cV(n){return n[0]}function U7(n){return n[n.length-1]}function fV(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 hV(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 dV(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 pV(n,t){return{x:V7(n.x,t.x),y:V7(n.y,t.y)}}function mV(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 gV(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 yV(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 vV=new WeakMap;class SV{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=RU(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&&hn.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=bV(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&&hn.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=hV(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=dV(s.layoutBox,t):this.constraints=!1,this.elastic=yV(i),u!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&xs(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=gV(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=EB(s,u.root,this.visualElement.getTransformPagePoint());let f=pV(u.layout.layoutBox,c);if(i){const p=i(vB(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]=mV({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;vV.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()),hn.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 bV(n,t=10){let i=null;return Math.abs(n.y)>t?i="y":Math.abs(n.x)>t&&(i="x"),i}class EV extends $o{constructor(t){super(t),this.removeGroupControls=Cs,this.removeListeners=Cs,this.controls=new SV(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&&hn.postRender(()=>n(t,i))};class TV 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&&hn.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 CV 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()||hn.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]=jU(),s=H.useContext(Db);return X.jsx(CV,{...n,layoutGroup:s,switchLayoutGroup:H.useContext(n7),isPresent:t,safeToRemove:i})}function _V(n,t,i){const s=Ia(n)?n:Th(n);return s.start(GS("",s,t,i)),s.animation}const xV=(n,t)=>n.depth-t.depth;class DV{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(xV),this.isDirty=!1,this.children.forEach(t)}}function AV(n,t){const i=Ai.now(),s=({timestamp:u})=>{const c=u-i;c>=t&&(Fo(s),n(c-t))};return hn.setup(s,!0),()=>Fo(s)}const Y7=["TopLeft","TopRight","BottomLeft","BottomRight"],MV=Y7.length,q7=n=>typeof n=="string"?parseFloat(n):n,X7=n=>typeof n=="number"||wt.test(n);function NV(n,t,i,s,u,c){u?(n.opacity=Cn(0,i.opacity??1,OV(s)),n.opacityExit=Cn(t.opacity??1,0,RV(s))):c&&(n.opacity=Cn(t.opacity??1,i.opacity??1,s));for(let f=0;f<MV;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 OV=Q7(0,.5,Gb),RV=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 zV(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){zV(n,t[i],t[s],t[u],t.scale,c,f)}const HV=["x","scaleX","originX"],wV=["y","scaleY","originY"];function I7(n,t,i,s){k7(n.x,t,HV,i?i.x:void 0,s?s.x:void 0),k7(n.y,t,wV,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 UV(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 BV{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 VV(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"],GV=1e3;let jV=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",hn,!(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=jV++,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(YV),this.nodes.forEach(QV),this.nodes.forEach(ZV),this.nodes.forEach(qV)},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 DV)}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)&&!BU(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;hn.read(()=>{_=window.innerWidth}),n(f,()=>{const D=window.innerWidth;D!==_&&(_=D,this.root.updateBlockedByResize=!0,b&&b(),b=AV(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()||WV,{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(JV),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(KV),this.nodes.forEach(LV),this.nodes.forEach(PV)):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(XV),this.sharedNodes.forEach(FV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,hn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){hn.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)),$V(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(tG))){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(),oV(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;bB(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(IV));this.animationProgress=0;let j;this.mixTargetDelta=V=>{const J=V/1e3;c9(_.x,f.x,J),c9(_.y,f.y,J),this.setTargetDelta(_),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gg(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kV(this.relativeTarget,this.relativeTargetOrigin,x,J),j&&UV(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=fa()),cl(j,this.relativeTarget)),N&&(this.animationValues=b,NV(b,S,this.latestValues,J,U,O)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=J},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=hn.update(()=>{vg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Th(0)),this.currentAnimation=_V(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(GV),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 BV),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 _=VV(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 LV(n){n.updateLayout()}function PV(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 YV(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 qV(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function XV(n){n.clearSnapshot()}function r9(n){n.clearMeasurements()}function o9(n){n.isLayoutDirty=!1}function KV(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 QV(n){n.resolveTargetDelta()}function ZV(n){n.calcProjection()}function JV(n){n.resetSkewAndRotation()}function FV(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 kV(n,t,i,s){f9(n.x,t.x,i.x,s),f9(n.y,t.y,i.y,s)}function IV(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const WV={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 $V(n){p9(n.x),p9(n.y)}function m9(n,t,i){return n==="position"||n==="preserve-aspect"&&!rV(a9(t),a9(i),.2)}function tG(n){return n!==n.root&&n.scroll?.wasRoot}const eG=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 eG({});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"}),nG={pan:{Feature:TV},drag:{Feature:EV,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&&hn.postRender(()=>c(t,C0(t)))}class aG extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=zU(t,(i,s)=>(y9(this.node,s,"Start"),u=>y9(this.node,u,"End"))))}unmount(){}}class iG 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&&hn.postRender(()=>c(t,C0(t)))}class sG extends $o{mount(){const{current:t}=this.node;t&&(this.unmount=UU(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,lG=n=>{const t=ZS.get(n.target);t&&t(n)},rG=n=>{n.forEach(lG)};function oG({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(rG,{root:n,...t})),s[u]}function uG(n,t,i){const s=oG(t);return ZS.set(n,i),s.observe(n),()=>{ZS.delete(n),s.unobserve(n)}}const cG={some:0,all:1};class fG 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:cG[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 uG(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(hG(t,i))&&this.startObserver()}unmount(){}}function hG({viewport:n={}},{viewport:t={}}={}){return i=>n[i]!==t[i]}const dG={...eV,...{inView:{Feature:fG},tap:{Feature:sG},focus:{Feature:iG},hover:{Feature:aG}},...nG,...{layout:{ProjectionNode:g9,MeasureLayout:P7}}},S9=yB(dG,OB),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),J=H.useRef(101),W=H.useRef(void 0),st=H.useRef(void 0),I=H.useRef(void 0),et=H.useRef(!1),nt=u/1e3;H.useEffect(()=>{t&&(W.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,J.current=Math.max(...gt)+2),j(!1),O(n)},[n,t]);const bt=gt=>{st.current=gt},rt=()=>{N(V.current),D(J.current),et.current=!0},dt=()=>{if(!st.current)return;m?.();let gt;W.current&&(gt=[W.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?rt():pt()}),F=Q1(()=>{R?dt():tt(),j(!0)}),K={opacity:.5},at={opacity:0},St={opacity:1,pointerEvents:"auto"},$={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:$,transition:{duration:nt,ease:R?c:f},onAnimationStart:w,onAnimationComplete:F,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 dn{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}=dn.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=dn.getScreenDimensions(),u=t.getBoundingClientRect(),c=dn.positionElementToTarget(t,i,0,2);if(c.left+u.width<s.width&&c.top+u.height<s.height||dn.positionElementToTarget(t,i,1,3).left>=0&&c.top+u.height<s.height)return!0;const p=dn.positionElementToTarget(t,i,2,0);if(p.left+u.width<s.width&&p.top>=0)return!0;const m=dn.positionElementToTarget(t,i,3,1);return m.left>=0&&m.top>=0}static canPositionElementOnScreen(t){const i=dn.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}=dn.positionElementToTarget(t,i,s,u),p=t.getBoundingClientRect(),m=dn.determineOffScreenLocation(p);if(m){if(s===0&&u===2){if(m.right&&!m.bottom)return dn.positionElementToTarget(t,i,1,3);if(m.bottom&&!m.right)return dn.positionElementToTarget(t,i,2,0);if(m.right&&m.bottom)return dn.positionElementToTarget(t,i,3,1)}else if(s===1&&u===3){if(m.left&&!m.bottom)return dn.positionElementToTarget(t,i,0,2);if(m.bottom&&!m.left)return dn.positionElementToTarget(t,i,3,1);if(m.left&&m.bottom)return dn.positionElementToTarget(t,i,2,0)}}return{top:f,left:c}}static determineOffScreenLocation(t){const i=dn.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,J]=H.useState(n),[W,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),rt=H.useRef(void 0),dt=H.useRef(void 0),pt=H.useRef(void 0),tt=H.useRef(void 0),w=H.useRef(void 0),F=H.useRef(!1),K=j4();H.useEffect(()=>(m===!0&&(w.current=new ResizeObserver(at)),()=>{m===!0&&(rt.current&&w.current?.unobserve(rt.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&&J(n)},[t,n,f,p]);const at=Be=>{if(rt.current){const At=dn.getScreenDimensions(),ue=Be[Be.length-1].target,ta=ue.getBoundingClientRect(),ea=dn.determineOffScreenLocation(ta);if(ea){if(bt.current&&dn.canPositionElementOnScreenWithTarget(ue,bt.current)){const An=dn.positionElementToTargetOnScreen(rt.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),$=()=>{j(et.current)},gt=()=>{if(!rt.current)return;D?.();let Be;!u&&bt.current&&(Be=[bt.current]);const At=ue=>{ue?N?.():J(!1)};pt.current=Cb(rt.current,At,Be),f&&(tt.current=uR(ue=>rt.current&&DH(ue,rt.current)&&J(!1),100,{leading:!0}),dt.current&&dt.current.addEventListener("scroll",tt.current)),F.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&&rt.current&&w.current?.unobserve(rt.current),rt.current=Be,R?.(Be),bt.current){const At=dn.positionElementToTarget(rt.current,bt.current,s,i);nt.current={...At,width:bt.current.offsetWidth},m===!0&&(dn.canPositionElementOnScreenWithTarget(rt.current,bt.current)||dn.canPositionElementOnScreen(rt.current))&&w.current?.observe(rt.current)}},xn=Q1(()=>{V?$():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},[W,U,c]);return F.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 pG=new Uint8Array(16);function mG(){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(pG)}const Ua=[];for(let n=0;n<256;++n)Ua.push((n+256).toString(16).slice(1));function gG(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 yG(n,t,i){if(_9.randomUUID&&!n)return _9.randomUUID();n=n||{};const s=n.random||(n.rng||mG)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,gG(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 vG{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 SG{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 bG{inputSlots;constructor(t){this.inputSlots=SG.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 EG),this.instance}}class EG{navigatorInstances;inputSlotInstances;constructor(){this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,i){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new vG(i,t)),this.navigatorInstances[t]}getInputSlotInstance(t,i){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new bG(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 TG{_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 CG{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 TG(t),this.partEntryList=new CG(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 _G{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 xG{constructor(t,i=""){this.inputValue=i,this.instanceId=yG(),this.instanceCollection=A0.getInstance(),this.keyProcessor=new _G(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 DG=(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,[J,W]=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 xG(s,i),I.current&&et.current?.inputElementCreated(I.current),et.current?.registerFormatChangeEvent(bt))},[s]);const bt=H.useCallback(gt=>{A?A(gt)?(W(!0),N?.(gt)):W(!1):N?.(gt)},[N]),rt=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())},[]),F=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",F),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",F),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 $=Se(S,{"bsc:border-error!":!J});return X.jsx($1,{ref:gt=>{gt&&at(gt)},readOnly:u,debounceTime:c,fillContainer:f,leftElement:p,rightElement:m,className:$,leftElementClassName:b,rightElementClassName:_,isSingleLine:x,allowSingleLineScroll:D,onFocus:rt,onBlur:dt,onElementCreate:U,onLeftElementClick:j,onRightElementClick:V})},A9=H.forwardRef(DG),kS=H.createContext(void 0);function M9(n,t,i=!0){const s=db(n),u=rb(n),c=rz(n);let f=Dv(u)-(t.options?.weekStartsOn||0);f=f===-1?6:f;const p=Dv(c)-(t.options?.weekStartsOn||0),m=gR({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=iH(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=AG(i)?i:{...i};f.push(S)}s.push(f)}return s}function AG(n){const t=typeof n;return t==="string"||t==="number"||t==="boolean"||n instanceof Date}function MG(n){const t=sH(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 NG(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 OG(n,t){const i=new Date(n.getTime()),s=Math.floor(i.getFullYear()/10)*10;i.setFullYear(s);const u=yR({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 RG(n){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(n.code)}function zG(n,t,i){return n.getTime()>=t.getTime()&&n.getTime()<=i.getTime()}function M0(n,t){const i=lH(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 HG=(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:wG(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 wG(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),J=H.useRef(void 0),W=H.useContext(kS),st=H.useMemo(()=>W.calendarTemplate,[W.calendarTemplate]);H.useEffect(()=>{V.current=c,J.current=MG(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||oz(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:J.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:[J.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,F)=>{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&&aH(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()+F.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})})})]})},UG=({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)||RG(i)})})]})},BG=({viewDate:n,locale:t,dateSelection:i=Qe.DateTime,dispatcher:s})=>{const u=H.useRef(NG(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:TH(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())))})]})},VG=({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})})]})})})]})},GG=({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(xH(0,59,pt=>pt.toString().padStart(2,"0"))),b=H.useRef(["AM","PM"]),_=H.useRef(iR(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)},J=()=>{const pt=u?.hours?.step||1,tt=D>0?D-pt:p.current;A(tt),et(tt,N,O)},W=()=>{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 F=s===Gn.TwelveHour&&w===1?pt+12:pt;_.current.setHours(F,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}),rt=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:rt,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:W,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:J,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})})})]})})},jG=({viewDate:n,locale:t,dispatcher:i})=>{const s=OG(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:CH(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 LG{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 PG=(n,t)=>{const[i,s]=H.useState(),u=H.useRef(void 0);return H.useEffect(()=>{t&&!i&&(u.current=new LG(n,t),s(u.current.createInputFormat()))},[t]),[i,u.current?.is24HourTime]},YG=({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:J,wrapperTemplate:W})=>{const[st,I]=H.useState(!1),[et,nt]=H.useState(),[bt,rt]=H.useState(),[dt,pt,tt]=OD(S),w=H.useRef(void 0),F=H.useRef(!1),K=H.useRef(p||_H()),at=H.useRef(void 0),St=H.useRef(void 0),$=H.useRef(void 0),gt=H.useRef(null),Tt=H.useRef(null),[Pt,le]=PG(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(HG,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)},pn=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)?(zG(ge[0],rb(At.currentViewDate),mR(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&>.current.focus()},Mn=()=>{ue({type:pe.ClearDates}),I(!1),O?.()},rn=(Ht,ge)=>{(!St.current||w.current!==ge)&&(St.current=Ht,w.current=ge,F.current=!0)},Mi=()=>{(!$.current||F.current)&&St.current&&($.current=St.current,rt(St.current),F.current=!1)},Ut=()=>{I(!1),ue({type:pe.SetDateSelector,dateSelector:Dn()})},Re=()=>{switch(b){case N0.Short:return"short";case N0.Medium:return"medium";case N0.Long:return"long";default:return}},jn=()=>{const Ht=Re();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=W||((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(UG,{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(BG,{viewDate:At.currentViewDate,locale:at.current,dateSelection:tt.current,dispatcher:ue}),At.currentSelector===Ta.YearSelector&&Va&&At.dateInitialized&&at.current&&X.jsx(jG,{viewDate:At.currentViewDate,locale:at.current,dispatcher:ue}),At.currentSelector===Ta.TimeSelector&&ke&&At.dateInitialized&&at.current&&X.jsx(GG,{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(VG,{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=J||((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=>rn(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=>rn(Ht,!1),...mn}):X.jsx(A9,{ref:Tt,value:jn(),readOnly:t,className:au,format:Pt,isInputValid:pn,onFocus:ta,onBlur:ea,onChange:ha,onElementCreate:Ht=>rn(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 qG(){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,J;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)&&(J=U.slice(0,-1).join("."),this.cleanup.indexOf(J)===-1&&this.cleanup.push(J)),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 J=0;J<A.length;J++)N[j[O]].push(A[J]);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 XG=qG();const R9=X2(XG),KG=({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 rt=Array.isArray(i)?i.map(dt=>dt.toString()):i?[String(i)]:void 0;N(rt??[])}else i&&D(i.toString())},[i]);const U=rt=>m?A.findIndex(dt=>dt===rt)>-1:x===rt,j=rt=>{const dt=rt.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=rt=>{Array.isArray(rt?.value)?N(rt?.value??[]):D(rt?.value),b?.(rt)},J=kp(nh.FocusWithin),W=H.useCallback((rt,dt)=>X.jsx(X.Fragment,{children:dt}),[]),st=_||W,I=(rt,dt,pt)=>{const tt=`element_${O}_${dt}`,w=R9.pick(u,rt),F=String(R9.pick(c,rt)),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},J),$={itemId:tt,selectedValue:m?A:x,itemText:w,itemValue:F,itemData:rt,itemStyles:St,isSelected:U(F),isFirstItem:K,isLastItem:at,onItemChanged:j};return m?X.jsx(vc,{props:$,template:st,children:X.jsx(rh,{className:St,children:X.jsx(c6,{value:F,className:"bsc:block bsc:w-full bsc:cursor-pointer",children:w})})},tt):X.jsx(vc,{props:$,template:st,children:X.jsx(rh,{className:St,children:X.jsx(y6,{value:F,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=rt=>m?X.jsx(d6,{name:n,value:A,readOnly:f,onChange:V,className:nt,children:rt.map(I)}):X.jsx(g6,{name:n,value:x,readOnly:f,onChange:V,className:nt,children:rt.map(I)});return X.jsxs(rh,{className:et,children:[t&&X.jsx(wr,{label:t,readOnly:f}),R&&bt(R)]})},QG=H.memo(KG),ZG=({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"),J=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}),W=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:J}),X.jsx("circle",{cx:"50%",cy:"50%",r:7,className:W})]})}),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)})]})},JG=H.memo(ZG),FG=({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(SA,{name:n,value:i,toggled:s,onChange:p,className:_,children:X.jsx("div",{className:x})})]})},kG=H.memo(FG);$t.AvatarEditor=RD,$t.BeeSoftProvider=zD,$t.Button=Ql,$t.Checkbox=v6,$t.CheckboxGroup=TA,$t.ContentEditableInput=$1,$t.DateFormatType=N0,$t.DateScrollerType=Mh,$t.DateSelectionType=Qe,$t.DateTime=YG,$t.FormGroupItemOrientation=Za,$t.FormattedInput=A9,$t.GroupButton=QG,$t.MediaQuery=Hv,$t.MobileOverlayPanel=b9,$t.OverlayPanel=C9,$t.RadioButton=JG,$t.SelectionLabelLocation=Es,$t.Toggle=kG,$t.applyBeeSoftTheme=OH,$t.createBeeSoftTheme=RH,Object.defineProperty($t,Symbol.toStringTag,{value:"Module"})}));
|