@wellesley/ui 1.0.781 → 1.0.783
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/index.mjs +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as O from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import re,{forwardRef as ye,createElement as q,createContext as ji,useMemo as or,useContext as Ds,useCallback as Ge,useLayoutEffect as Xc,useRef as Ae,useEffect as We,useState as Ke,Fragment as As,Children as ir,isValidElement as Po,cloneElement as _a,useReducer as k3,PureComponent as ev,useImperativeHandle as H8,memo as V8}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{FormProvider as G8,Controller as K8,useFormContext as Y8}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{createAction as D3,createSlice as X8}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import{useDispatch as Q8,useSelector as tv}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{AppsLink as Z8}from"https://cdn.jsdelivr.net/npm/@wellesley/router@1.0.
|
|
1
|
+
import*as O from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import re,{forwardRef as ye,createElement as q,createContext as ji,useMemo as or,useContext as Ds,useCallback as Ge,useLayoutEffect as Xc,useRef as Ae,useEffect as We,useState as Ke,Fragment as As,Children as ir,isValidElement as Po,cloneElement as _a,useReducer as k3,PureComponent as ev,useImperativeHandle as H8,memo as V8}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{FormProvider as G8,Controller as K8,useFormContext as Y8}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{createAction as D3,createSlice as X8}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import{useDispatch as Q8,useSelector as tv}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{AppsLink as Z8}from"https://cdn.jsdelivr.net/npm/@wellesley/router@1.0.747";var bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var FS,WS,ly={exports:{}},Kf={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.min.js
|
|
@@ -66,4 +66,4 @@ import*as O from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import re,{forw
|
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the MIT license found in the
|
|
68
68
|
* LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/function qL(){if(gE)return jt;gE=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case u:case p:case f:case i:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),jt.ContextConsumer=l,jt.ContextProvider=i,jt.Element=t,jt.ForwardRef=u,jt.Fragment=r,jt.Lazy=p,jt.Memo=f,jt.Portal=n,jt.Profiler=a,jt.StrictMode=o,jt.Suspense=c,jt.SuspenseList=d,jt.isAsyncMode=function(){return!1},jt.isConcurrentMode=function(){return!1},jt.isContextConsumer=function(e){return m(e)===l},jt.isContextProvider=function(e){return m(e)===i},jt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},jt.isForwardRef=function(e){return m(e)===u},jt.isFragment=function(e){return m(e)===r},jt.isLazy=function(e){return m(e)===p},jt.isMemo=function(e){return m(e)===f},jt.isPortal=function(e){return m(e)===n},jt.isProfiler=function(e){return m(e)===a},jt.isStrictMode=function(e){return m(e)===o},jt.isSuspense=function(e){return m(e)===c},jt.isSuspenseList=function(e){return m(e)===d},jt.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},jt.typeOf=m,jt}function zL(){return vE||(vE=1,S1.exports=qL()),S1.exports}function BT(){if(yE)return C1;yE=1;var e=Ca(),t=To();return C1=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function UL(){if(bE)return E1;bE=1;var e=BT();return E1=function(t){return e(t)&&t!=+t}}zL();var HL=UL();const VL=Oo(HL);var GL=BT();const KL=Oo(GL);var sg=function(e){return FT(e)&&e.indexOf("%")===e.length-1},ri=function(e){return KL(e)&&!VL(e)},Ng=function(e){return ri(e)||FT(e)};function E_(e){return(E_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var YL=["viewBox","children"],XL=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],wE=["points","pathLength"],P1={svg:YL,polygon:wE,polyline:wE},qT=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],QL=function(e,t,n){return function(r){return e(t,n,r),null}},ZL=function(e,t,n){if(!WT(e)||"object"!==E_(e))return null;var r=null;return Object.keys(e).forEach((function(o){var a=e[o];qT.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=QL(a,t,n))})),r},JL=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},eF=function(e,t,n,r){var o,a=null!==(o=null==P1?void 0:P1[r])&&void 0!==o?o:[];return!Tg(e)&&(r&&a.includes(t)||XL.includes(t))||qT.includes(t)},zT=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(Po(e)&&(r=e.props),!WT(r))return null;var o={};return Object.keys(r).forEach((function(e){var a;eF(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])})),o},tF=["children","width","height","viewBox","className","style","title","desc"];function P_(){return P_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P_.apply(this,arguments)}function nF(e,t){if(null==e)return{};var n,r,o=rF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function rF(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function oF(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,a=e.className,i=e.style,l=e.title,s=e.desc,u=nF(e,tF),c=o||{width:n,height:r,x:0,y:0},d=Ss("recharts-surface",a);return re.createElement("svg",P_({},zT(u,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),re.createElement("title",null,l),re.createElement("desc",null,s),t)}var O1,xE,R1,_E,T1,$E,N1,SE,k1,CE,D1,EE,A1,PE,M1,OE,Sg=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function iF(){if(xE)return O1;return xE=1,O1=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}}function aF(){if(_E)return R1;_E=1;var e=iF();return R1=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function UT(){if($E)return T1;$E=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return T1=function(t){return e.test(t)}}function sF(){if(SE)return N1;return SE=1,N1=function(e){return e.split("")}}function cF(){if(CE)return k1;CE=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+n+"|"+r+")"+"?",s="[\\ufe0e\\ufe0f]?",u=s+l+("(?:\\u200d(?:"+[o,a,i].join("|")+")"+s+l+")*"),c="(?:"+[o+n+"?",n,a,i,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+u,"g");return k1=function(e){return e.match(d)||[]}}function lF(){if(EE)return D1;EE=1;var e=sF(),t=UT(),n=cF();return D1=function(r){return t(r)?n(r):e(r)}}function uF(){if(PE)return A1;PE=1;var e=aF(),t=UT(),n=lF(),r=L$();return A1=function(o){return function(a){a=r(a);var i=t(a)?n(a):void 0,l=i?i[0]:a.charAt(0),s=i?e(i,1).join(""):a.slice(1);return l[o]()+s}}}function dF(){if(OE)return M1;OE=1;var e=uF()("toUpperCase");return M1=e}var fF=dF();const HT=Oo(fF);function cg(e){return function(){return e}}const VT=Math.cos,kg=Math.sin,li=Math.sqrt,Dg=Math.PI,yv=2*Dg,O_=Math.PI,R_=2*O_,Ac=1e-6,pF=R_-Ac;function GT(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function hF(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return GT;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}class mF{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?GT:hF(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+a}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let a=this._x1,i=this._y1,l=n-e,s=r-t,u=a-e,c=i-t,d=u*u+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Ac)if(Math.abs(c*l-s*u)>Ac&&o){let f=n-a,p=r-i,h=l*l+s*s,m=f*f+p*p,g=Math.sqrt(h),v=Math.sqrt(d),y=o*Math.tan((O_-Math.acos((h+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Ac&&this._append`L${e+b*u},${t+b*c}`,this._append`A${o},${o},0,0,${+(c*f>u*p)},${this._x1=e+w*l},${this._y1=t+w*s}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(r),l=n*Math.sin(r),s=e+i,u=t+l,c=1^a,d=a?r-o:o-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>Ac||Math.abs(this._y1-u)>Ac)&&this._append`L${s},${u}`,n&&(d<0&&(d=d%R_+R_),d>pF?this._append`A${n},${n},0,1,${c},${e-i},${t-l}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:d>Ac&&this._append`A${n},${n},0,${+(d>=O_)},${c},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function gF(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new mF(t)}const W$={draw(e,t){const n=li(t/Dg);e.moveTo(n,0),e.arc(0,0,n,0,yv)}},vF={draw(e,t){const n=li(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},KT=li(1/3),yF=2*KT,bF={draw(e,t){const n=li(t/yF),r=n*KT;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},wF={draw(e,t){const n=li(t),r=-n/2;e.rect(r,r,n,n)}},xF=.8908130915292852,YT=kg(Dg/10)/kg(7*Dg/10),_F=kg(yv/10)*YT,$F=-VT(yv/10)*YT,SF={draw(e,t){const n=li(t*xF),r=_F*n,o=$F*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=yv*t/5,i=VT(a),l=kg(a);e.lineTo(l*n,-i*n),e.lineTo(i*r-l*o,l*r+i*o)}e.closePath()}},I1=li(3),CF={draw(e,t){const n=-li(t/(3*I1));e.moveTo(0,2*n),e.lineTo(-I1*n,-n),e.lineTo(I1*n,-n),e.closePath()}},zo=-.5,Uo=li(3)/2,T_=1/li(12),EF=3*(T_/2+1),PF={draw(e,t){const n=li(t/EF),r=n/2,o=n*T_,a=r,i=n*T_+n,l=-a,s=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(l,s),e.lineTo(zo*r-Uo*o,Uo*r+zo*o),e.lineTo(zo*a-Uo*i,Uo*a+zo*i),e.lineTo(zo*l-Uo*s,Uo*l+zo*s),e.lineTo(zo*r+Uo*o,zo*o-Uo*r),e.lineTo(zo*a+Uo*i,zo*i-Uo*a),e.lineTo(zo*l+Uo*s,zo*s-Uo*l),e.closePath()}};function OF(e,t){let n=null,r=gF(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:cg(e||W$),t="function"==typeof t?t:cg(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:cg(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:cg(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function bp(e){return(bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var RF=["type","size","sizeType"];function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N_.apply(this,arguments)}function RE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function TE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RE(Object(n),!0).forEach((function(t){TF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TF(e,t,n){return(t=NF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NF(e){var t=kF(e,"string");return"symbol"==bp(t)?t:t+""}function kF(e,t){if("object"!=bp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function DF(e,t){if(null==e)return{};var n,r,o=AF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function AF(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XT={symbolCircle:W$,symbolCross:vF,symbolDiamond:bF,symbolSquare:wF,symbolStar:SF,symbolTriangle:CF,symbolWye:PF},MF=Math.PI/180,IF=function(e){var t="symbol".concat(HT(e));return XT[t]||W$},jF=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*MF;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},LF=function(e,t){XT["symbol".concat(HT(e))]=t},QT=function(e){var t,n=e.type,r=void 0===n?"circle":n,o=e.size,a=void 0===o?64:o,i=e.sizeType,l=void 0===i?"area":i,s=TE(TE({},DF(e,RF)),{},{type:r,size:a,sizeType:l}),u=s.className,c=s.cx,d=s.cy,f=zT(s,!0);return c===+c&&d===+d&&a===+a?re.createElement("path",N_({},f,{className:Ss("recharts-symbols",u),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=IF(r),OF().type(t).size(jF(a,l,r))())})):null};function Du(e){return(Du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k_.apply(this,arguments)}function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NE(Object(n),!0).forEach((function(t){wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function WF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JT(r.key),r)}}function qF(e,t,n){return BF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zF(e,t,n){return t=Ag(t),UF(e,ZT()?Reflect.construct(t,n||[],Ag(e).constructor):t.apply(e,n))}function UF(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return HF(e)}function HF(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ZT=function(){return!!e})()}function Ag(e){return(Ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function VF(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D_(e,t)}function D_(e,t){return(D_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wp(e,t,n){return(t=JT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JT(e){var t=GF(e,"string");return"symbol"==Du(t)?t:t+""}function GF(e,t){if("object"!=Du(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Du(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}QT.registerSymbol=LF;var j1,kE,L1,DE,F1,AE,W1,ME,B1,IE,q1,jE,z1,LE,U1,FE,H1,WE,V1,BE,G1,qE,K1,zE,Y1,UE,X1,HE,Q1,VE,Z1,GE,J1,KE,eb,YE,tb,XE,nb,QE,rb,ZE,ob,JE,ib,eP,ab,tP,Ho=32,B$=function(){function e(){return WF(this,e),zF(this,e,arguments)}return VF(e,ev),qF(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=Ho/2,r=Ho/6,o=Ho/3,a=e.inactive?t:e.color;if("plainline"===e.type)return re.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:Ho,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return re.createElement("path",{strokeWidth:4,fill:"none",stroke:a,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(Ho,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return re.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(Ho/8,"h").concat(Ho,"v").concat(3*Ho/4,"h").concat(-Ho,"z"),className:"recharts-legend-icon"});if(re.isValidElement(e.legendIcon)){var i=FF({},e);return delete i.legendIcon,re.cloneElement(e.legendIcon,i)}return re.createElement(QT,{fill:a,cx:n,cy:n,size:Ho,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,a=t.formatter,i=t.inactiveColor,l={x:0,y:0,width:Ho,height:Ho},s={display:"horizontal"===o?"inline-block":"block",marginRight:10},u={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||a,c=Ss(wp(wp({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=Tg(t.value)?null:t.value;Sg(!Tg(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var f=t.inactive?i:t.color;return re.createElement("li",k_({className:c,style:s,key:"legend-item-".concat(n)},ZL(e.props,t,n)),re.createElement(oF,{width:r,height:r,viewBox:l,style:u},e.renderIcon(t)),re.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},o?o(d,t,n):d))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return re.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function KF(){if(kE)return j1;kE=1;var e=gv();return j1=function(){this.__data__=new e,this.size=0}}function YF(){if(DE)return L1;return DE=1,L1=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function XF(){if(AE)return F1;return AE=1,F1=function(e){return this.__data__.get(e)}}function QF(){if(ME)return W1;return ME=1,W1=function(e){return this.__data__.has(e)}}function ZF(){if(IE)return B1;IE=1;var e=gv(),t=M$(),n=I$();return B1=function(r,o){var a=this.__data__;if(a instanceof e){var i=a.__data__;if(!t||i.length<199)return i.push([r,o]),this.size=++a.size,this;a=this.__data__=new n(i)}return a.set(r,o),this.size=a.size,this}}function q$(){if(jE)return q1;jE=1;var e=gv(),t=KF(),n=YF(),r=XF(),o=QF(),a=ZF();function i(t){var n=this.__data__=new e(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=o,i.prototype.set=a,q1=i}function JF(){if(LE)return z1;LE=1;return z1=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function eW(){if(FE)return U1;return FE=1,U1=function(e){return this.__data__.has(e)}}function eN(){if(WE)return H1;WE=1;var e=I$(),t=JF(),n=eW();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,H1=r}function tW(){if(BE)return V1;return BE=1,V1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function tN(){if(qE)return G1;return qE=1,G1=function(e,t){return e.has(t)}}function nN(){if(zE)return K1;zE=1;var e=eN(),t=tW(),n=tN();return K1=function(r,o,a,i,l,s){var u=1&a,c=r.length,d=o.length;if(c!=d&&!(u&&d>c))return!1;var f=s.get(r),p=s.get(o);if(f&&p)return f==o&&p==r;var h=-1,m=!0,g=2&a?new e:void 0;for(s.set(r,o),s.set(o,r);++h<c;){var v=r[h],y=o[h];if(i)var b=u?i(y,v,h,o,r,s):i(v,y,h,r,o,s);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!t(o,(function(e,t){if(!n(g,t)&&(v===e||l(v,e,a,i,s)))return g.push(t)}))){m=!1;break}}else if(v!==y&&!l(v,y,a,i,s)){m=!1;break}}return s.delete(r),s.delete(o),m}}function rN(){if(UE)return Y1;UE=1;var e=zr().Uint8Array;return Y1=e}function nW(){if(HE)return X1;return HE=1,X1=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function z$(){if(VE)return Q1;return VE=1,Q1=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function rW(){if(GE)return Z1;GE=1;var e=Hu(),t=rN(),n=hv(),r=nN(),o=nW(),a=z$(),i=e?e.prototype:void 0,l=i?i.valueOf:void 0;return Z1=function(e,i,s,u,c,d,f){switch(s){case"[object DataView]":if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=i.byteLength||!d(new t(e),new t(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+i);case"[object Error]":return e.name==i.name&&e.message==i.message;case"[object RegExp]":case"[object String]":return e==i+"";case"[object Map]":var p=o;case"[object Set]":var h=1&u;if(p||(p=a),e.size!=i.size&&!h)return!1;var m=f.get(e);if(m)return m==i;u|=2,f.set(e,i);var g=r(p(e),p(i),u,c,d,f);return f.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(i)}return!1}}function U$(){if(KE)return J1;return KE=1,J1=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function oN(){if(YE)return eb;YE=1;var e=U$(),t=qr();return eb=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function oW(){if(XE)return tb;return XE=1,tb=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}}function iN(){if(QE)return nb;return QE=1,nb=function(){return[]}}function H$(){if(ZE)return rb;ZE=1;var e=oW(),t=iN(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return rb=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function iW(){if(JE)return ob;return JE=1,ob=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function aW(){if(eP)return ib;eP=1;var e=Ca(),t=To();return ib=function(n){return t(n)&&"[object Arguments]"==e(n)}}function V$(){if(tP)return ab;tP=1;var e=aW(),t=To(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return ab=a}wp(B$,"displayName","Legend"),wp(B$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var sb,nP,rP,cb,oP,lb,iP,ub,aP,db,sP,op={exports:{}};function sW(){if(nP)return sb;return nP=1,sb=function(){return!1}}function G$(){return rP||(rP=1,e=op,t=op.exports,n=zr(),r=sW(),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,l=(i?i.isBuffer:void 0)||r,e.exports=l),op.exports;var e,t,n,r,o,a,i,l}function bv(){if(oP)return cb;oP=1;var e=/^(?:0|[1-9]\d*)$/;return cb=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function K$(){if(iP)return lb;iP=1;return lb=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function cW(){if(aP)return ub;aP=1;var e=Ca(),t=K$(),n=To(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,ub=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function wv(){if(sP)return db;return sP=1,db=function(e){return function(t){return e(t)}}}op.exports;var cP,fb,lP,pb,uP,hb,dP,mb,fP,gb,pP,vb,hP,yb,mP,bb,gP,wb,vP,xb,yP,_b,bP,$b,wP,Sb,xP,Cb,_P,Eb,$P,Pb,SP,Ob,CP,Rb,EP,Tb,PP,Nb,OP,kb,RP,Db,TP,Ab,NP,Mb,kP,Ib,DP,jb,AP,Lb,MP,Fb,IP,Wb,jP,Bb,LP,qb,FP,zb,WP,Ub,BP,Hb,qP,Vb,zP,Gb,UP,Kb,HP,Yb,VP,Xb,GP,Qb,KP,Zb,YP,ip={exports:{}};function Y$(){return cP||(cP=1,e=ip,t=ip.exports,n=AT(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch{}}(),e.exports=i),ip.exports;var e,t,n,r,o,a,i}function aN(){if(lP)return fb;lP=1;var e=cW(),t=wv(),n=Y$(),r=n&&n.isTypedArray,o=r?t(r):e;return fb=o}function sN(){if(uP)return pb;uP=1;var e=iW(),t=V$(),n=qr(),r=G$(),o=bv(),a=aN(),i=Object.prototype.hasOwnProperty;return pb=function(l,s){var u=n(l),c=!u&&t(l),d=!u&&!c&&r(l),f=!u&&!c&&!d&&a(l),p=u||c||d||f,h=p?e(l.length,String):[],m=h.length;for(var g in l)(s||i.call(l,g))&&(!p||!("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,m)))&&h.push(g);return h}}function X$(){if(dP)return hb;dP=1;var e=Object.prototype;return hb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function cN(){if(fP)return mb;return fP=1,mb=function(e,t){return function(n){return e(t(n))}}}function lW(){if(pP)return gb;pP=1;var e=cN()(Object.keys,Object);return gb=e}function lN(){if(hP)return vb;hP=1;var e=X$(),t=lW(),n=Object.prototype.hasOwnProperty;return vb=function(r){if(!e(r))return t(r);var o=[];for(var a in Object(r))n.call(r,a)&&"constructor"!=a&&o.push(a);return o}}function qp(){if(mP)return yb;mP=1;var e=fv(),t=K$();return yb=function(n){return null!=n&&t(n.length)&&!e(n)}}function zp(){if(gP)return bb;gP=1;var e=sN(),t=lN(),n=qp();return bb=function(r){return n(r)?e(r):t(r)}}function uN(){if(vP)return wb;vP=1;var e=oN(),t=H$(),n=zp();return wb=function(r){return e(r,n,t)}}function uW(){if(yP)return xb;yP=1;var e=uN(),t=Object.prototype.hasOwnProperty;return xb=function(n,r,o,a,i,l){var s=1&o,u=e(n),c=u.length;if(c!=e(r).length&&!s)return!1;for(var d=c;d--;){var f=u[d];if(!(s?f in r:t.call(r,f)))return!1}var p=l.get(n),h=l.get(r);if(p&&h)return p==r&&h==n;var m=!0;l.set(n,r),l.set(r,n);for(var g=s;++d<c;){var v=n[f=u[d]],y=r[f];if(a)var b=s?a(y,v,f,r,n,l):a(v,y,f,n,r,l);if(!(void 0===b?v===y||i(v,y,o,a,l):b)){m=!1;break}g||(g="constructor"==f)}if(m&&!g){var w=n.constructor,x=r.constructor;w!=x&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(m=!1)}return l.delete(n),l.delete(r),m}}function dW(){if(bP)return _b;bP=1;var e=Qc()(zr(),"DataView");return _b=e}function fW(){if(wP)return $b;wP=1;var e=Qc()(zr(),"Promise");return $b=e}function dN(){if(xP)return Sb;xP=1;var e=Qc()(zr(),"Set");return Sb=e}function fN(){if(_P)return Cb;_P=1;var e=Qc()(zr(),"WeakMap");return Cb=e}function Up(){if($P)return Eb;$P=1;var e=dW(),t=M$(),n=fW(),r=dN(),o=fN(),a=Ca(),i=MT(),l="[object Map]",s="[object Promise]",u="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),h=i(n),m=i(r),g=i(o),v=a;return(e&&v(new e(new ArrayBuffer(1)))!=d||t&&v(new t)!=l||n&&v(n.resolve())!=s||r&&v(new r)!=u||o&&v(new o)!=c)&&(v=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?i(n):"";if(r)switch(r){case f:return d;case p:return l;case h:return s;case m:return u;case g:return c}return t}),Eb=v}function pW(){if(SP)return Pb;SP=1;var e=q$(),t=nN(),n=rW(),r=uW(),o=Up(),a=qr(),i=G$(),l=aN(),s="[object Arguments]",u="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return Pb=function(f,p,h,m,g,v){var y=a(f),b=a(p),w=y?u:o(f),x=b?u:o(p),_=(w=w==s?c:w)==c,O=(x=x==s?c:x)==c,k=w==x;if(k&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(k&&!_)return v||(v=new e),y||l(f)?t(f,p,h,m,g,v):n(f,p,w,h,m,g,v);if(!(1&h)){var S=_&&d.call(f,"__wrapped__"),D=O&&d.call(p,"__wrapped__");if(S||D){var C=S?f.value():f,E=D?p.value():p;return v||(v=new e),g(C,E,h,m,v)}}return!!k&&(v||(v=new e),r(f,p,h,m,g,v))}}function pN(){if(CP)return Ob;CP=1;var e=pW(),t=To();return Ob=function n(r,o,a,i,l){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,a,i,n,l))},Ob}function hW(){if(EP)return Rb;EP=1;var e=q$(),t=pN();return Rb=function(n,r,o,a){var i=o.length,l=i,s=!a;if(null==n)return!l;for(n=Object(n);i--;){var u=o[i];if(s&&u[2]?u[1]!==n[u[0]]:!(u[0]in n))return!1}for(;++i<l;){var c=(u=o[i])[0],d=n[c],f=u[1];if(s&&u[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(a)var h=a(d,f,c,n,r,p);if(!(void 0===h?t(f,d,3,a,p):h))return!1}}return!0}}function hN(){if(PP)return Tb;PP=1;var e=Go();return Tb=function(t){return t==t&&!e(t)}}function mW(){if(OP)return Nb;OP=1;var e=hN(),t=zp();return Nb=function(n){for(var r=t(n),o=r.length;o--;){var a=r[o],i=n[a];r[o]=[a,i,e(i)]}return r}}function mN(){if(RP)return kb;return RP=1,kb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function gW(){if(TP)return Db;TP=1;var e=hW(),t=mW(),n=mN();return Db=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function vW(){if(NP)return Ab;return NP=1,Ab=function(e,t){return null!=e&&t in Object(e)}}function yW(){if(kP)return Mb;kP=1;var e=jT(),t=V$(),n=qr(),r=bv(),o=K$(),a=Bp();return Mb=function(i,l,s){for(var u=-1,c=(l=e(l,i)).length,d=!1;++u<c;){var f=a(l[u]);if(!(d=null!=i&&s(i,f)))break;i=i[f]}return d||++u!=c?d:!!(c=null==i?0:i.length)&&o(c)&&r(f,c)&&(n(i)||t(i))}}function bW(){if(DP)return Ib;DP=1;var e=vW(),t=yW();return Ib=function(n,r){return null!=n&&t(n,r,e)}}function wW(){if(AP)return jb;AP=1;var e=pN(),t=LT(),n=bW(),r=A$(),o=hN(),a=mN(),i=Bp();return jb=function(l,s){return r(l)&&o(s)?a(i(l),s):function(r){var o=t(r,l);return void 0===o&&o===s?n(r,l):e(s,o,3)}}}function Hp(){if(MP)return Lb;return MP=1,Lb=function(e){return e}}function xW(){if(IP)return Fb;return IP=1,Fb=function(e){return function(t){return null==t?void 0:t[e]}}}function _W(){if(jP)return Wb;jP=1;var e=F$();return Wb=function(t){return function(n){return e(n,t)}}}function $W(){if(LP)return Bb;LP=1;var e=xW(),t=_W(),n=A$(),r=Bp();return Bb=function(o){return n(o)?e(r(o)):t(o)}}function Q$(){if(FP)return qb;FP=1;var e=gW(),t=wW(),n=Hp(),r=qr(),o=$W();return qb=function(a){return"function"==typeof a?a:null==a?n:"object"==typeof a?r(a)?t(a[0],a[1]):e(a):o(a)}}function SW(){if(WP)return zb;return WP=1,zb=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}}function CW(){if(BP)return Ub;return BP=1,Ub=function(e){return e!=e}}function EW(){if(qP)return Hb;return qP=1,Hb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function PW(){if(zP)return Vb;zP=1;var e=SW(),t=CW(),n=EW();return Vb=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function gN(){if(UP)return Gb;UP=1;var e=PW();return Gb=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function OW(){if(HP)return Kb;return HP=1,Kb=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}}function vN(){if(VP)return Yb;return VP=1,Yb=function(){}}function RW(){if(GP)return Xb;GP=1;var e=dN(),t=vN(),n=z$(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Xb=r}function TW(){if(KP)return Qb;KP=1;var e=eN(),t=gN(),n=OW(),r=tN(),o=RW(),a=z$();return Qb=function(i,l,s){var u=-1,c=t,d=i.length,f=!0,p=[],h=p;if(s)f=!1,c=n;else if(d>=200){var m=l?null:o(i);if(m)return a(m);f=!1,c=r,h=new e}else h=l?[]:p;e:for(;++u<d;){var g=i[u],v=l?l(g):g;if(g=s||0!==g?g:0,f&&v==v){for(var y=h.length;y--;)if(h[y]===v)continue e;l&&h.push(v),p.push(g)}else c(h,v,s)||(h!==p&&h.push(v),p.push(g))}return p}}function NW(){if(YP)return Zb;YP=1;var e=Q$(),t=TW();return Zb=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}ip.exports;var kW=NW();const XP=Oo(kW);function yN(e,t,n){return!0===t?XP(e,n):Tg(t)?XP(e,t):e}function Au(e){return(Au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var DW=["ref"];function QP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QP(Object(n),!0).forEach((function(t){xv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function AW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wN(r.key),r)}}function MW(e,t,n){return ZP(e.prototype,t),ZP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IW(e,t,n){return t=Mg(t),jW(e,bN()?Reflect.construct(t,n,Mg(e).constructor):t.apply(e,n))}function jW(e,t){if(t&&("object"===Au(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return LW(e)}function LW(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(bN=function(){return!!e})()}function Mg(e){return(Mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function FW(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A_(e,t)}function A_(e,t){return(A_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xv(e,t,n){return(t=wN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wN(e){var t=WW(e,"string");return"symbol"==Au(t)?t:t+""}function WW(e,t){if("object"!=Au(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Au(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function BW(e,t){if(null==e)return{};var n,r,o=qW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function qW(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zW(e){return e.value}function UW(e,t){if(re.isValidElement(e))return re.cloneElement(e,t);if("function"==typeof e)return re.createElement(e,t);t.ref;var n=BW(t,DW);return re.createElement(B$,n)}var Jb,e5,ew,t5,tw,n5,nw,r5,rw,o5,ow,i5,iw,a5,aw,s5,sw,c5,cw,l5,lw,u5,uw,d5,dw,f5,fw,p5,pw,h5,hw,m5,mw,g5,gw,v5,vw,y5,yw,b5,bw,w5,ww,x5,JP=1,Z$=function(){function e(){var t;AW(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return xv(t=IW(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return FW(e,ev),MW(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>JP||Math.abs(t.height-this.lastBoundingBox.height)>JP)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?fa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,a=r.align,i=r.verticalAlign,l=r.margin,s=r.chartWidth,u=r.chartHeight;if(!e||(void 0===e.left||null===e.left)&&(void 0===e.right||null===e.right))if("center"===a&&"vertical"===o){t={left:((s||0)-this.getBBoxSnapshot().width)/2}}else t="right"===a?{right:l&&l.right||0}:{left:l&&l.left||0};if(!e||(void 0===e.top||null===e.top)&&(void 0===e.bottom||null===e.bottom))if("middle"===i){n={top:((u||0)-this.getBBoxSnapshot().height)/2}}else n="bottom"===i?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return fa(fa({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,a=t.wrapperStyle,i=t.payloadUniqBy,l=t.payload,s=fa(fa({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return re.createElement("div",{className:"recharts-legend-wrapper",style:s,ref:function(t){e.wrapperNode=t}},UW(n,fa(fa({},this.props),{},{payload:yN(l,i,zW)})))}}],[{key:"getWithHeight",value:function(e,t){var n=fa(fa({},this.defaultProps),e.props).layout;return"vertical"===n&&ri(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function HW(){if(e5)return Jb;e5=1;var e=Hu(),t=V$(),n=qr(),r=e?e.isConcatSpreadable:void 0;return Jb=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function xN(){if(t5)return ew;t5=1;var e=U$(),t=HW();return ew=function n(r,o,a,i,l){var s=-1,u=r.length;for(a||(a=t),l||(l=[]);++s<u;){var c=r[s];o>0&&a(c)?o>1?n(c,o-1,a,i,l):e(l,c):i||(l[l.length]=c)}return l},ew}function VW(){if(n5)return tw;return n5=1,tw=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var s=i[e?l:++o];if(!1===n(a[s],s,a))break}return t}}}function GW(){if(r5)return nw;r5=1;var e=VW()();return nw=e}function KW(){if(o5)return rw;o5=1;var e=GW(),t=zp();return rw=function(n,r){return n&&e(n,r,t)}}function YW(){if(i5)return ow;i5=1;var e=qp();return ow=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var a=r.length,i=n?a:-1,l=Object(r);(n?i--:++i<a)&&!1!==o(l[i],i,l););return r}}}function XW(){if(a5)return iw;a5=1;var e=KW(),t=YW()(e);return iw=t}function QW(){if(s5)return aw;s5=1;var e=XW(),t=qp();return aw=function(n,r){var o=-1,a=t(n)?Array(n.length):[];return e(n,(function(e,t,n){a[++o]=r(e,t,n)})),a}}function ZW(){if(c5)return sw;return c5=1,sw=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function JW(){if(l5)return cw;l5=1;var e=Vu();return cw=function(t,n){if(t!==n){var r=void 0!==t,o=null===t,a=t==t,i=e(t),l=void 0!==n,s=null===n,u=n==n,c=e(n);if(!s&&!c&&!i&&t>n||i&&l&&u&&!s&&!c||o&&l&&u||!r&&u||!a)return 1;if(!o&&!i&&!c&&t<n||c&&r&&a&&!o&&!i||s&&r&&a||!l&&a||!u)return-1}return 0}}function eB(){if(u5)return lw;u5=1;var e=JW();return lw=function(t,n,r){for(var o=-1,a=t.criteria,i=n.criteria,l=a.length,s=r.length;++o<l;){var u=e(a[o],i[o]);if(u)return o>=s?u:u*("desc"==r[o]?-1:1)}return t.index-n.index}}function tB(){if(d5)return uw;d5=1;var e=j$(),t=F$(),n=Q$(),r=QW(),o=ZW(),a=wv(),i=eB(),l=Hp(),s=qr();return uw=function(u,c,d){c=c.length?e(c,(function(e){return s(e)?function(n){return t(n,1===e.length?e[0]:e)}:e})):[l];var f=-1;c=e(c,a(n));var p=r(u,(function(t,n,r){return{criteria:e(c,(function(e){return e(t)})),index:++f,value:t}}));return o(p,(function(e,t){return i(e,t,d)}))}}function J$(){if(f5)return dw;return f5=1,dw=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function _N(){if(p5)return fw;p5=1;var e=J$(),t=Math.max;return fw=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var a=arguments,i=-1,l=t(a.length-r,0),s=Array(l);++i<l;)s[i]=a[r+i];i=-1;for(var u=Array(r+1);++i<r;)u[i]=a[i];return u[r]=o(s),e(n,this,u)}},fw}function nB(){if(h5)return pw;return h5=1,pw=function(e){return function(){return e}}}function $N(){if(m5)return hw;m5=1;var e=Qc(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return hw=t}function rB(){if(g5)return mw;g5=1;var e=nB(),t=$N(),n=Hp();return mw=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function SN(){if(v5)return gw;v5=1;var e=Date.now;return gw=function(t){var n=0,r=0;return function(){var o=e(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},gw}function e2(){if(y5)return vw;y5=1;var e=rB(),t=SN()(e);return vw=t}function oB(){if(b5)return yw;b5=1;var e=Hp(),t=_N(),n=e2();return yw=function(r,o){return n(t(r,o,e),r+"")}}function iB(){if(w5)return bw;w5=1;var e=hv(),t=qp(),n=bv(),r=Go();return bw=function(o,a,i){if(!r(i))return!1;var l=typeof a;return!!("number"==l?t(i)&&n(a,i.length):"string"==l&&a in i)&&e(i[a],o)}}function aB(){if(x5)return ww;x5=1;var e=xN(),t=tB(),n=oB(),r=iB(),o=n((function(n,o){if(null==n)return[];var a=o.length;return a>1&&r(n,o[0],o[1])?o=[]:a>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(n,e(o,1),[])}));return ww=o}xv(Z$,"displayName","Legend"),xv(Z$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var sB=aB();const cB=Oo(sB);function xp(e){return(xp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M_(){return M_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M_.apply(this,arguments)}function lB(e,t){return pB(e)||fB(e,t)||dB(e,t)||uB()}function uB(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function dB(e,t){if(e){if("string"==typeof e)return _5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _5(e,t)}}function _5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fB(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function pB(e){if(Array.isArray(e))return e}function $5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$5(Object(n),!0).forEach((function(t){hB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hB(e,t,n){return(t=mB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mB(e){var t=gB(e,"string");return"symbol"==xp(t)?t:t+""}function gB(e,t){if("object"!=xp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function vB(e){return Array.isArray(e)&&Ng(e[0])&&Ng(e[1])?e.join(" ~ "):e}var yB=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,a=e.itemStyle,i=void 0===a?{}:a,l=e.labelStyle,s=void 0===l?{}:l,u=e.payload,c=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,h=e.label,m=e.labelFormatter,g=e.accessibilityLayer,v=void 0!==g&&g,y=xw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=xw({margin:0},s),w=!jL(h),x=w?h:"",_=Ss("recharts-default-tooltip",f),O=Ss("recharts-tooltip-label",p);w&&m&&null!=u&&(x=m(h,u));var k=v?{role:"status","aria-live":"assertive"}:{};return re.createElement("div",M_({className:_,style:y},k),re.createElement("p",{className:O,style:b},re.isValidElement(x)?x:"".concat(x)),function(){if(u&&u.length){var e=(d?cB(u,d):u).map((function(e,t){if("none"===e.type)return null;var r=xw({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||c||vB,a=e.value,l=e.name,s=a,d=l;if(null!=s&&null!=d){var f=o(a,l,e,t,u);if(Array.isArray(f)){var p=lB(f,2);s=p[0],d=p[1]}else s=f}return re.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},Ng(d)?re.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Ng(d)?re.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,re.createElement("span",{className:"recharts-tooltip-item-value"},s),re.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return re.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function _p(e){return(_p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lg(e,t,n){return(t=bB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bB(e){var t=wB(e,"string");return"symbol"==_p(t)?t:t+""}function wB(e,t){if("object"!=_p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Qf="recharts-tooltip-wrapper",xB={visibility:"hidden"};function _B(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ss(Qf,lg(lg(lg(lg({},"".concat(Qf,"-right"),ri(n)&&t&&ri(t.x)&&n>=t.x),"".concat(Qf,"-left"),ri(n)&&t&&ri(t.x)&&n<t.x),"".concat(Qf,"-bottom"),ri(r)&&t&&ri(t.y)&&r>=t.y),"".concat(Qf,"-top"),ri(r)&&t&&ri(t.y)&&r<t.y))}function S5(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipDimension,s=e.viewBox,u=e.viewBoxDimension;if(a&&ri(a[r]))return a[r];var c=n[r]-l-o,d=n[r]+o;return t[r]?i[r]?c:d:i[r]?c<s[r]?Math.max(d,s[r]):Math.max(c,s[r]):d+l>s[r]+u?Math.max(c,s[r]):Math.max(d,s[r])}function $B(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function SB(e){var t,n,r,o=e.allowEscapeViewBox,a=e.coordinate,i=e.offsetTopLeft,l=e.position,s=e.reverseDirection,u=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return u.height>0&&u.width>0&&a?t=$B({translateX:n=S5({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:l,reverseDirection:s,tooltipDimension:u.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=S5({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:l,reverseDirection:s,tooltipDimension:u.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=xB,{cssProperties:t,cssClasses:_B({translateX:n,translateY:r,coordinate:a})}}function Mu(e){return(Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C5(Object(n),!0).forEach((function(t){j_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EB(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EN(r.key),r)}}function PB(e,t,n){return EB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OB(e,t,n){return t=Ig(t),RB(e,CN()?Reflect.construct(t,n,Ig(e).constructor):t.apply(e,n))}function RB(e,t){if(t&&("object"===Mu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return TB(e)}function TB(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(CN=function(){return!!e})()}function Ig(e){return(Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function NB(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I_(e,t)}function I_(e,t){return(I_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function j_(e,t,n){return(t=EN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EN(e){var t=kB(e,"string");return"symbol"==Mu(t)?t:t+""}function kB(e,t){if("object"!=Mu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Mu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var P5=1,DB=function(){function e(){var t;CB(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return j_(t=OB(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),j_(t,"handleKeyDown",(function(e){var n,r,o,a;"Escape"===e.key&&t.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=t.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(a=t.props.coordinate)||void 0===a?void 0:a.y)&&void 0!==o?o:0}})})),t}return NB(e,ev),PB(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>P5||Math.abs(e.height-this.state.lastBoundingBox.height)>P5)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.children,l=t.coordinate,s=t.hasPayload,u=t.isAnimationActive,c=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,h=t.viewBox,m=t.wrapperStyle,g=SB({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:h}),v=g.cssClasses,y=g.cssProperties,b=E5(E5({transition:u&&n?"transform ".concat(o,"ms ").concat(a):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&s?"visible":"hidden",position:"absolute",top:0,left:0},m);return re.createElement("div",{tabIndex:-1,className:v,style:b,ref:function(t){e.wrapperNode=t}},i)}}])}(),AB=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Cg={isSsr:AB(),get:function(e){return Cg[e]},set:function(e,t){if("string"==typeof e)Cg[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){Cg[t]=e[t]}))}}};function Iu(e){return(Iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O5(Object(n),!0).forEach((function(t){t2(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function MB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IB(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ON(r.key),r)}}function jB(e,t,n){return IB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LB(e,t,n){return t=jg(t),FB(e,PN()?Reflect.construct(t,n||[],jg(e).constructor):t.apply(e,n))}function FB(e,t){if(t&&("object"===Iu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return WB(e)}function WB(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(PN=function(){return!!e})()}function jg(e){return(jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function BB(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L_(e,t)}function L_(e,t){return(L_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function t2(e,t,n){return(t=ON(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ON(e){var t=qB(e,"string");return"symbol"==Iu(t)?t:t+""}function qB(e,t){if("object"!=Iu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Iu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function zB(e){return e.dataKey}function UB(e,t){return re.isValidElement(e)?re.cloneElement(e,t):"function"==typeof e?re.createElement(e,t):re.createElement(yB,t)}var _w,T5,$w,N5,Sw,k5,Cw,D5,Ew,A5,Pw,M5,n2=function(){function e(){return MB(this,e),LB(this,e,arguments)}return BB(e,ev),jB(e,[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.content,l=t.coordinate,s=t.filterNull,u=t.isAnimationActive,c=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,h=t.reverseDirection,m=t.useTranslate3d,g=t.viewBox,v=t.wrapperStyle,y=d??[];s&&y.length&&(y=yN(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,zB));var b=y.length>0;return re.createElement(DB,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:u,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:h,useTranslate3d:m,viewBox:g,wrapperStyle:v},UB(i,R5(R5({},this.props),{},{payload:y})))}}])}();function HB(){if(T5)return _w;T5=1;var e=zr();return _w=function(){return e.Date.now()}}function VB(){if(N5)return $w;N5=1;var e=/\s/;return $w=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function GB(){if(k5)return Sw;k5=1;var e=VB(),t=/^\s+/;return Sw=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function RN(){if(D5)return Cw;D5=1;var e=GB(),t=Go(),n=Vu(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return Cw=function(l){if("number"==typeof l)return l;if(n(l))return NaN;if(t(l)){var s="function"==typeof l.valueOf?l.valueOf():l;l=t(s)?s+"":s}if("string"!=typeof l)return 0===l?l:+l;l=e(l);var u=o.test(l);return u||a.test(l)?i(l.slice(2),u?2:8):r.test(l)?NaN:+l}}function TN(){if(A5)return Ew;A5=1;var e=Go(),t=HB(),n=RN(),r=Math.max,o=Math.min;return Ew=function(a,i,l){var s,u,c,d,f,p,h=0,m=!1,g=!1,v=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function y(e){var t=s,n=u;return s=u=void 0,h=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||g&&e-h>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return g?o(t,c-(e-h)):t}(e))}function x(e){return f=void 0,v&&s?y(e):(s=u=void 0,d)}function _(){var e=t(),n=b(e);if(s=arguments,u=this,p=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,i),m?y(e):d}(p);if(g)return clearTimeout(f),f=setTimeout(w,i),y(p)}return void 0===f&&(f=setTimeout(w,i)),d}return i=n(i)||0,e(l)&&(m=!!l.leading,c=(g="maxWait"in l)?r(n(l.maxWait)||0,i):c,v="trailing"in l?!!l.trailing:v),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=p=u=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},Ew}function KB(){if(M5)return Pw;M5=1;var e=TN(),t=Go();return Pw=function(n,r,o){var a=!0,i=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(a="leading"in o?!!o.leading:a,i="trailing"in o?!!o.trailing:i),e(n,r,{leading:a,maxWait:r,trailing:i})}}t2(n2,"displayName","Tooltip"),t2(n2,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Cg.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var YB=KB();const XB=Oo(YB);function $p(e){return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ug(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I5(Object(n),!0).forEach((function(t){QB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QB(e,t,n){return(t=ZB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZB(e){var t=JB(e,"string");return"symbol"==$p(t)?t:t+""}function JB(e,t){if("object"!=$p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function eq(e,t){return oq(e)||rq(e,t)||nq(e,t)||tq()}function tq(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nq(e,t){if(e){if("string"==typeof e)return j5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j5(e,t)}}function j5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rq(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function oq(e){if(Array.isArray(e))return e}var Ow,L5,Rw,F5,Tw,W5,Nw,B5,kw,q5,Dw,z5,Aw,U5,Mw,H5,Iw,V5,jw,G5,Lw,K5,Fw,Y5,Ww,X5,iq=ye((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,a=e.width,i=void 0===a?"100%":a,l=e.height,s=void 0===l?"100%":l,u=e.minWidth,c=void 0===u?0:u,d=e.minHeight,f=e.maxHeight,p=e.children,h=e.debounce,m=void 0===h?0:h,g=e.id,v=e.className,y=e.onResize,b=e.style,w=void 0===b?{}:b,x=Ae(null),_=Ae();_.current=y,H8(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var O=eq(Ke({containerWidth:o.width,containerHeight:o.height}),2),k=O[0],S=O[1],D=Ge((function(e,t){S((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);We((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;D(r,o),null===(t=_.current)||void 0===t||t.call(_,r,o)};m>0&&(e=XB(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return D(r,o),t.observe(x.current),function(){t.disconnect()}}),[D,m]);var C=or((function(){var e=k.containerWidth,t=k.containerHeight;if(e<0||t<0)return null;Sg(sg(i)||sg(s),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,s),Sg(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=sg(i)?e:i,o=sg(s)?t:s;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),Sg(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,i,s,c,d,n);var a=!Array.isArray(p)&&JL(p.type).endsWith("Chart");return re.Children.map(p,(function(e){return re.isValidElement(e)?_a(e,ug({width:r,height:o},a?{style:ug({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,s,f,d,c,k,i]);return re.createElement("div",{id:g?"".concat(g):void 0,className:Ss("recharts-responsive-container",v),style:ug(ug({},w),{},{width:i,height:s,minWidth:c,minHeight:d,maxHeight:f}),ref:x},C)}));function r2(){if(L5)return Ow;L5=1;var e=cN()(Object.getPrototypeOf,Object);return Ow=e}function aq(){if(F5)return Rw;F5=1;var e=Ca(),t=r2(),n=To(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,l=a.call(Object);return Rw=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var s=i.call(o,"constructor")&&o.constructor;return"function"==typeof s&&s instanceof s&&a.call(s)==l}}function sq(){if(W5)return Tw;W5=1;var e=RN(),t=1/0;return Tw=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function NN(){if(B5)return Nw;B5=1;var e=$N();return Nw=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function kN(){if(q5)return kw;q5=1;var e=sq();return kw=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function o2(){if(z5)return Dw;return z5=1,Dw=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function DN(){if(U5)return Aw;U5=1;var e=NN(),t=hv(),n=Object.prototype.hasOwnProperty;return Aw=function(r,o,a){var i=r[o];(!n.call(r,o)||!t(i,a)||void 0===a&&!(o in r))&&e(r,o,a)}}function _v(){if(H5)return Mw;H5=1;var e=DN(),t=NN();return Mw=function(n,r,o,a){var i=!o;o||(o={});for(var l=-1,s=r.length;++l<s;){var u=r[l],c=a?a(o[u],n[u],u,o,n):void 0;void 0===c&&(c=n[u]),i?t(o,u,c):e(o,u,c)}return o}}function AN(){if(V5)return Iw;V5=1;var e=_v(),t=zp();return Iw=function(n,r){return n&&e(r,t(r),n)}}function cq(){if(G5)return jw;return G5=1,jw=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function lq(){if(K5)return Lw;K5=1;var e=Go(),t=X$(),n=cq(),r=Object.prototype.hasOwnProperty;return Lw=function(o){if(!e(o))return n(o);var a=t(o),i=[];for(var l in o)"constructor"==l&&(a||!r.call(o,l))||i.push(l);return i}}function i2(){if(Y5)return Fw;Y5=1;var e=sN(),t=lq(),n=qp();return Fw=function(r){return n(r)?e(r,!0):t(r)}}function uq(){if(X5)return Ww;X5=1;var e=_v(),t=i2();return Ww=function(n,r){return n&&e(r,t(r),n)}}var Q5,Bw,Z5,qw,J5,zw,eO,Uw,tO,Hw,nO,Vw,rO,Gw,oO,Kw,iO,Yw,aO,Xw,sO,Qw,cO,Zw,lO,Jw,uO,ex,dO,tx,fO,nx,pO,rx,hO,ox,mO,ix,gO,ax,vO,sx,yO,ap={exports:{}};function dq(){return Q5||(Q5=1,e=ap,t=ap.exports,n=zr(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}),ap.exports;var e,t,n,r,o,a,i}function $v(){if(Z5)return Bw;return Z5=1,Bw=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function fq(){if(J5)return qw;J5=1;var e=_v(),t=H$();return qw=function(n,r){return e(n,t(n),r)}}function MN(){if(eO)return zw;eO=1;var e=U$(),t=r2(),n=H$(),r=iN(),o=Object.getOwnPropertySymbols;return zw=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function pq(){if(tO)return Uw;tO=1;var e=_v(),t=MN();return Uw=function(n,r){return e(n,t(n),r)}}function hq(){if(nO)return Hw;nO=1;var e=oN(),t=MN(),n=i2();return Hw=function(r){return e(r,n,t)}}function mq(){if(rO)return Vw;rO=1;var e=Object.prototype.hasOwnProperty;return Vw=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function a2(){if(oO)return Gw;oO=1;var e=rN();return Gw=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function gq(){if(iO)return Kw;iO=1;var e=a2();return Kw=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function vq(){if(aO)return Yw;aO=1;var e=/\w*$/;return Yw=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function yq(){if(sO)return Xw;sO=1;var e=Hu(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return Xw=function(e){return n?Object(n.call(e)):{}}}function bq(){if(cO)return Qw;cO=1;var e=a2();return Qw=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function wq(){if(lO)return Zw;lO=1;var e=a2(),t=gq(),n=vq(),r=yq(),o=bq();return Zw=function(a,i,l){var s=a.constructor;switch(i){case"[object ArrayBuffer]":return e(a);case"[object Boolean]":case"[object Date]":return new s(+a);case"[object DataView]":return t(a,l);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(a,l);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(a);case"[object RegExp]":return n(a);case"[object Symbol]":return r(a)}}}function Sv(){if(uO)return Jw;uO=1;var e=Go(),t=Object.create;return Jw=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function xq(){if(dO)return ex;dO=1;var e=Sv(),t=r2(),n=X$();return ex=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function _q(){if(fO)return tx;fO=1;var e=Up(),t=To();return tx=function(n){return t(n)&&"[object Map]"==e(n)}}function $q(){if(pO)return nx;pO=1;var e=_q(),t=wv(),n=Y$(),r=n&&n.isMap,o=r?t(r):e;return nx=o}function Sq(){if(hO)return rx;hO=1;var e=Up(),t=To();return rx=function(n){return t(n)&&"[object Set]"==e(n)}}function Cq(){if(mO)return ox;mO=1;var e=Sq(),t=wv(),n=Y$(),r=n&&n.isSet,o=r?t(r):e;return ox=o}function IN(){if(gO)return ix;gO=1;var e=q$(),t=o2(),n=DN(),r=AN(),o=uq(),a=dq(),i=$v(),l=fq(),s=pq(),u=uN(),c=hq(),d=Up(),f=mq(),p=wq(),h=xq(),m=qr(),g=G$(),v=$q(),y=Go(),b=Cq(),w=zp(),x=i2(),_="[object Arguments]",O="[object Function]",k="[object Object]",S={};return S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[O]=S["[object WeakMap]"]=!1,ix=function D(C,E,N,M,P,j){var T,A=1&E,R=2&E,L=4&E;if(N&&(T=P?N(C,M,P,j):N(C)),void 0!==T)return T;if(!y(C))return C;var z=m(C);if(z){if(T=f(C),!A)return i(C,T)}else{var I=d(C),F=I==O||"[object GeneratorFunction]"==I;if(g(C))return a(C,A);if(I==k||I==_||F&&!P){if(T=R||F?{}:h(C),!A)return R?s(C,o(T,C)):l(C,r(T,C))}else{if(!S[I])return P?C:{};T=p(C,I,A)}}j||(j=new e);var W=j.get(C);if(W)return W;j.set(C,T),b(C)?C.forEach((function(e){T.add(D(e,E,N,e,C,j))})):v(C)&&C.forEach((function(e,t){T.set(t,D(e,E,N,t,C,j))}));var $=z?void 0:(L?R?c:u:R?x:w)(C);return t($||C,(function(e,t){$&&(e=C[t=e]),n(T,t,D(e,E,N,t,C,j))})),T},ix}function Eq(){if(vO)return ax;vO=1;var e=xN();return ax=function(t){return(null==t?0:t.length)?e(t,1):[]}}function Pq(){if(yO)return sx;yO=1;var e=Eq(),t=_N(),n=e2();return sx=function(r){return n(t(r,void 0,e),r+"")}}ap.exports;const Oq={light:"",dark:".dark"},jN=O.createContext(null);function LN(){const e=O.useContext(jN);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Rq=O.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=O.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return D.jsx(jN.Provider,{value:{config:r},children:D.jsxs("div",{"data-chart":l,ref:a,className:te("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[D.jsx(Tq,{id:l,config:r}),D.jsx(iq,{children:n})]})})}));Rq.displayName="Chart";const Tq=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?D.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Oq).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},Iie=n2,Nq=O.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:l,labelClassName:s,formatter:u,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:h},m)=>{const{config:g}=LN(),v=O.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,a=F_(g,n,r),u=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=g[i])?void 0:e.label)||i;return l?D.jsx("div",{className:te("font-medium",s),children:l(u,t)}):u?D.jsx("div",{className:te("font-medium",s),children:u}):null}),[i,l,t,o,s,g,f]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,b=t.length>10;return D.jsxs("div",{ref:m,className:te("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",b&&"min-w-[16rem]",n),children:[y?null:v,D.jsx("div",{className:te("grid gap-xxs",b&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=F_(g,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",s=o===p;return D.jsx("div",{className:te("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",s?"":p?"opacity-40":""),onMouseEnter:()=>null==h?void 0:h(o),onMouseLeave:()=>null==h?void 0:h(null),children:u&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?u(e.value,e.name,e,t,[e.payload]):D.jsxs(D.Fragment,{children:[null!=i&&i.icon?D.jsx(i.icon,{}):!a&&D.jsx("div",{className:te("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),D.jsxs("div",{className:te("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[D.jsxs("div",{className:"grid gap-xxs",children:[y?v:null,D.jsx("span",{className:te("text-muted-foreground",s&&"font-medium text-foreground"),children:(null==i?void 0:i.label)||e.name})]}),e.value&&D.jsx("span",{className:te("font-mono font-medium tabular-nums text-foreground",s&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));Nq.displayName="ChartTooltip";const jie=Z$,kq=O.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:l}=LN(),s=O.useRef({});return O.useEffect((()=>{if(a&&s.current[a]){const e=s.current[a];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[a]),null!=n&&n.length?D.jsx("div",{ref:i,className:te("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,u=F_(l,e,i),c=!!o&&i===a;return D.jsxs("div",{ref:e=>{e?s.current[i]=e:delete s.current[i]},className:te("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":a?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=u&&u.icon&&!t?D.jsx(u.icon,{}):D.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),D.jsx("span",{className:"min-w-[max-content]",children:(null==u?void 0:u.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function F_(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}kq.displayName="ChartLegend";const Dq=({children:e,className:t})=>D.jsx("div",{className:te("flex flex-wrap gap-xxxs",t),children:e}),FN=({text:e,icon:t,disabled:n,isLoading:r,avatarSrc:o,onClick:a,onRemove:i,className:l})=>D.jsxs("div",{onClick:n?void 0:a,className:te("flex cursor-pointer items-center gap-xxxs rounded-sm bg-gray-100 p-xxs text-sm font-medium text-gray-900 transition-all hover:bg-gray-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-gray-100 text-gray-300",l),children:[o&&D.jsxs(CT,{className:te("size-6 text-[10px]"),children:[D.jsx(ET,{src:o,alt:e}),D.jsx(PT,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,D.jsx("span",{children:e}),i&&!r&&D.jsx("span",{role:"button",tabIndex:-1,onClick:e=>{e.stopPropagation(),e.preventDefault(),!n&&(null==i||i())},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},className:te("pointer-events-auto cursor-pointer",n&&"pointer-events-none cursor-not-allowed opacity-50"),children:D.jsx(ov,{size:16})}),r&&D.jsx(y$,{size:16,className:"animate-spin"})]});function Cv(e){const t=Ae({value:e,previous:e});return or((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Ev(e){const[t,n]=Ke(void 0);return Rr((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const WN="Checkbox",[Aq,Lie]=Br(WN),[Mq,Iq]=Aq(WN),jq=ye(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:s="on",onCheckedChange:u,...c}=e,[d,f]=Ke(null),p=Nt(t,(e=>f(e))),h=Ae(!1),m=!d||!!d.closest("form"),[g=!1,v]=si({prop:o,defaultProp:a,onChange:u}),y=Ae(g);return We((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>v(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,v]),q(Mq,{scope:n,state:g,disabled:l},q(dt.button,he({type:"button",role:"checkbox","aria-checked":qc(g)?"mixed":g,"aria-required":i,"data-state":BN(g),"data-disabled":l?"":void 0,disabled:l,value:s},c,{ref:p,onKeyDown:Xe(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Xe(e.onClick,(e=>{v((e=>!!qc(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&q(Wq,{control:d,bubbles:!h.current,name:r,value:s,checked:g,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),Lq="CheckboxIndicator",Fq=ye(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Iq(Lq,n);return q(Ro,{present:r||qc(a.state)||!0===a.state},q(dt.span,he({"data-state":BN(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),Wq=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=Cv(n),l=Ev(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=qc(n),o.call(e,!qc(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),q("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:!qc(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function qc(e){return"indeterminate"===e}function BN(e){return qc(e)?"indeterminate":e?"checked":"unchecked"}const qN=jq,Bq=Fq,qq=$a("relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-gray-100"}},defaultVariants:{size:"default",variant:"default"}}),s2=O.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},a)=>{const i=o.checked,[l]=O.useState(i),[s,u]=O.useState(!1);O.useEffect((()=>{l!==i&&u(!0)}),[i]);const c=e=>"minus"===r?D.jsx(x7,{...e}):D.jsx(nv,{...e});return D.jsxs(qN,{ref:a,className:te(qq({size:t,variant:n}),"transition-[border] duration-100 ease-linear",i?"border-0":"border-gray-300 hover:border-2",e),...o,children:[D.jsx("div",{className:te("transform-origin-center absolute left-0 top-0 size-full rounded-full bg-blue_100",i?"scale-[1.2]":"scale-0",{"animate-fill-in":i&&s,"animate-fill-out":!i&&s})}),D.jsx(Bq,{className:"relative flex items-center justify-center text-current",children:D.jsx(c,{className:"size-xxxs",color:o.disabled?"var(--gray-300)":"white"})})]})}));s2.displayName=qN.displayName;var bO=1,zq=.9,Uq=.8,Hq=.17,cx=.1,lx=.999,Vq=.9999,Gq=.99,Kq=/[\\\/_+.#"@\[\(\{&]/,Yq=/[\\\/_+.#"@\[\(\{&]/g,Xq=/[\s-]/,zN=/[\s-]/g;function W_(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?bO:Gq;var l=`${o},${a}`;if(void 0!==i[l])return i[l];for(var s,u,c,d,f=r.charAt(a),p=n.indexOf(f,o),h=0;p>=0;)(s=W_(e,t,n,r,p+1,a+1,i))>h&&(p===o?s*=bO:Kq.test(e.charAt(p-1))?(s*=Uq,(c=e.slice(o,p-1).match(Yq))&&o>0&&(s*=Math.pow(lx,c.length))):Xq.test(e.charAt(p-1))?(s*=zq,(d=e.slice(o,p-1).match(zN))&&o>0&&(s*=Math.pow(lx,d.length))):(s*=Hq,o>0&&(s*=Math.pow(lx,p-o))),e.charAt(p)!==t.charAt(a)&&(s*=Vq)),(s<cx&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((u=W_(e,t,n,r,p+1,a+2,i))*cx>s&&(s=u*cx)),s>h&&(h=s),p=n.indexOf(f,p+1);return i[l]=h,h}function wO(e){return e.toLowerCase().replace(zN," ")}function Qq(e,t,n){return W_(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,wO(e),wO(t),0,0,{})}var Zf='[cmdk-group=""]',ux='[cmdk-group-items=""]',Zq='[cmdk-group-heading=""]',c2='[cmdk-item=""]',xO=`${c2}:not([aria-disabled="true"])`,B_="cmdk-item-select",Lc="data-value",Jq=(e,t,n)=>Qq(e,t,n),UN=O.createContext(void 0),Vp=()=>O.useContext(UN),HN=O.createContext(void 0),l2=()=>O.useContext(HN),VN=O.createContext(void 0),GN=O.forwardRef(((e,t)=>{let n=Cu((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=Cu((()=>new Set)),o=Cu((()=>new Map)),a=Cu((()=>new Map)),i=Cu((()=>new Set)),l=KN(e),{label:s,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:g=!0,...v}=e,y=O.useId(),b=O.useId(),w=O.useId(),x=O.useRef(null),_=uz();Hc((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}}),[c]),Hc((()=>{_(6,M)}),[]);let k=O.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)N(),C(),_(1,E);else if("value"===e&&(r||_(5,M),void 0!==(null==(o=l.current)?void 0:o.value))){let e=t??"";return void(null==(i=(a=l.current).onValueChange)||i.call(a,e))}k.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),S=O.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,D(t,r)),_(2,(()=>{C(),k.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),_(3,(()=>{N(),C(),n.current.value||E(),k.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=P();_(4,(()=>{N(),(null==t?void 0:t.getAttribute("id"))===e&&E(),k.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],disablePointerSelection:m,listId:y,inputId:w,labelId:b,listInnerRef:x})),[]);function D(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:Jq;return e?a(e,n.current.search,t):0}function C(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=x.current;j().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(ux);t?t.appendChild(e.parentElement===t?e:e.closest(`${ux} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${ux} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${Zf}[${Lc}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function E(){let e=j().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(Lc);k.setState("value",t||void 0)}function N(){var e,t,i,s;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=D(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(i=a.current.get(o))?void 0:i.keywords)?s:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function M(){var e,t,n;let r=P();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(Zf))?void 0:t.querySelector(Zq))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function P(){var e;return null==(e=x.current)?void 0:e.querySelector(`${c2}[aria-selected="true"]`)}function j(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(xO))}function T(e){let t=j()[e];t&&k.setState("value",t.getAttribute(Lc))}function A(e){var t;let n=P(),r=j(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&k.setState("value",a.getAttribute(Lc))}function R(e){let t,n=P(),r=null==n?void 0:n.closest(Zf);for(;r&&!t;)r=e>0?cz(r,Zf):lz(r,Zf),t=null==r?void 0:r.querySelector(xO);t?k.setState("value",t.getAttribute(Lc)):A(e)}let L=()=>T(j().length-1),z=e=>{e.preventDefault(),e.metaKey?L():e.altKey?R(1):A(1)},I=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?R(-1):A(-1)};return O.createElement(dt.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=v.onKeyDown)||t.call(v,e),!e.defaultPrevented)switch(e.key){case"n":case"j":g&&e.ctrlKey&&z(e);break;case"ArrowDown":z(e);break;case"p":case"k":g&&e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),L();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=P();if(t){let e=new Event(B_);t.dispatchEvent(e)}}}}},O.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:fz},s),Pv(e,(e=>O.createElement(HN.Provider,{value:k},O.createElement(UN.Provider,{value:S},e)))))})),ez=O.forwardRef(((e,t)=>{var n,r;let o=O.useId(),a=O.useRef(null),i=O.useContext(VN),l=Vp(),s=KN(e),u=null!=(r=null==(n=s.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;Hc((()=>{if(!u)return l.item(o,null==i?void 0:i.id)}),[u]);let c=YN(o,a,[e.value,e.children,a],e.keywords),d=l2(),f=Vc((e=>e.value&&e.value===c.current)),p=Vc((e=>!(!u&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function h(){var e,t;m(),null==(t=(e=s.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(O.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(B_,h),()=>t.removeEventListener(B_,h)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:v,onSelect:y,forceMount:b,keywords:w,...x}=e;return O.createElement(dt.div,{ref:Sp([a,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||l.disablePointerSelection?void 0:m,onClick:g?void 0:h},e.children)})),tz=O.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=O.useId(),l=O.useRef(null),s=O.useRef(null),u=O.useId(),c=Vp(),d=Vc((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));Hc((()=>c.group(i)),[]),YN(i,l,[e.value,e.heading,s]);let f=O.useMemo((()=>({id:i,forceMount:o})),[o]);return O.createElement(dt.div,{ref:Sp([l,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&O.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),Pv(e,(e=>O.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},O.createElement(VN.Provider,{value:f},e)))))})),nz=O.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=O.useRef(null),a=Vc((e=>!e.search));return n||a?O.createElement(dt.div,{ref:Sp([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),rz=O.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=l2(),i=Vc((e=>e.search)),l=Vc((e=>e.value)),s=Vp(),u=O.useMemo((()=>{var e;let t=null==(e=s.listInnerRef.current)?void 0:e.querySelector(`${c2}[${Lc}="${encodeURIComponent(l)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return O.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),O.createElement(dt.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":u,id:s.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),oz=O.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=O.useRef(null),i=O.useRef(null),l=Vp();return O.useEffect((()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),O.createElement(dt.div,{ref:Sp([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},Pv(e,(e=>O.createElement("div",{ref:Sp([i,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),iz=O.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return O.createElement(lv,{open:n,onOpenChange:r},O.createElement(uv,{container:i},O.createElement(qu,{"cmdk-overlay":"",className:o}),O.createElement(zu,{"aria-label":e.label,"cmdk-dialog":"",className:a},O.createElement(GN,{ref:t,...l}))))})),az=O.forwardRef(((e,t)=>Vc((e=>0===e.filtered.count))?O.createElement(dt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),sz=O.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return O.createElement(dt.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Pv(e,(e=>O.createElement("div",{"aria-hidden":!0},e))))})),co=Object.assign(GN,{List:oz,Item:ez,Input:rz,Group:tz,Separator:nz,Dialog:iz,Empty:az,Loading:sz});function cz(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function lz(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function KN(e){let t=O.useRef(e);return Hc((()=>{t.current=e})),t}var Hc=typeof window>"u"?O.useEffect:O.useLayoutEffect;function Cu(e){let t=O.useRef();return void 0===t.current&&(t.current=e()),t}function Sp(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function Vc(e){let t=l2(),n=()=>e(t.snapshot());return O.useSyncExternalStore(t.subscribe,n,n)}function YN(e,t,n,r=[]){let o=O.useRef(),a=Vp();return Hc((()=>{var i;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),s=r.map((e=>e.trim()));a.value(e,l,s),null==(i=t.current)||i.setAttribute(Lc,l),o.current=l})),o}var uz=()=>{let[e,t]=O.useState(),n=Cu((()=>new Map));return Hc((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function dz(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function Pv({asChild:e,children:t},n){return e&&O.isValidElement(t)?O.cloneElement(dz(t),{ref:t.ref},n(t.props.children)):n(t)}var fz={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const pz=lv,Fie=P$,hz=uv,Wie=Uu,XN=O.forwardRef((({className:e,...t},n)=>(O.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{0===Array.from(document.querySelectorAll('[role="dialog"]')).length&&e.forEach((e=>e&&(e.style.filter="none")))}}),[]),D.jsx(qu,{ref:n,"data-testid":"dialog_overlay",className:te("fixed inset-0 z-dialog bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));XN.displayName=qu.displayName;const mz=$a("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-gray-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-gray-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),gz=$a("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),QN=O.forwardRef((({title:e,titleIcon:t,className:n,dialogName:r,showClose:o=!0,closeVariant:a="outsideCard",closeSize:i="big",children:l,titleClassName:s,overlayClassName:u,childrenClassName:c,footerClassName:d,onBack:f,onCloseModal:p,renderFooter:h,onScroll:m,...g},v)=>{const y=D.jsxs(Uu,{className:te(mz({closeVariant:a})),children:[D.jsx(ov,{onClick:p,fill:"currentColor",className:te(gz({closeSize:i}))}),D.jsx("span",{className:"sr-only",children:"Close"})]});return D.jsxs(hz,{children:[D.jsx(XN,{className:u,onClick:p}),o&&"insideCard"!==a&&y,D.jsxs(zu,{ref:v,className:te("fixed left-[50%] top-[50%] z-[101] grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...g,children:[e&&D.jsxs("h3",{className:te("flex items-center justify-center gap-xxs border-b border-gray-200 p-m text-center text-lg font-semibold text-gray-700",s),children:[t,e]}),D.jsx("div",{id:r||"dialog-content",className:te("p-m",c),onScroll:m,children:l}),o&&"insideCard"===a&&y,f&&D.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:f,className:"absolute left-m top-m",children:D.jsx(g$,{color:"var(--gray-400)",size:24})}),D.jsx(ZN,{className:te("empty:hidden",d),children:null==h?void 0:h()})]})]})}));QN.displayName=zu.displayName;const vz=({className:e,...t})=>D.jsx("div",{className:te("border-b border-gray-200 p-m text-center text-lg font-semibold text-gray-700",e),...t});vz.displayName="DialogHeader";const ZN=({className:e,...t})=>D.jsx("div",{className:te("flex border-t border-gray-200 p-m",e),...t});ZN.displayName="DialogFooter";const yz=O.forwardRef((({className:e,...t},n)=>D.jsx(Lp,{ref:n,className:te("text-lg font-semibold leading-none tracking-tight",e),...t})));yz.displayName=Lp.displayName;const bz=O.forwardRef((({className:e,...t},n)=>D.jsx(Fp,{ref:n,className:te("text-sm text-muted-foreground",e),...t})));bz.displayName=Fp.displayName;const JN=O.forwardRef((({className:e,...t},n)=>D.jsx(co,{ref:n,className:te("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));JN.displayName=co.displayName;const Bie=({children:e,...t})=>D.jsx(pz,{...t,children:D.jsx(QN,{className:"overflow-hidden p-0 shadow-lg",children:D.jsx(JN,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),wz=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:D.jsx(co.Input,{ref:n,className:te("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));wz.displayName=co.Input.displayName;const xz=O.forwardRef((({className:e,...t},n)=>D.jsx(co.List,{ref:n,className:te("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));xz.displayName=co.List.displayName;const _z=O.forwardRef(((e,t)=>D.jsx(co.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));_z.displayName=co.Empty.displayName;const $z=O.forwardRef((({className:e,...t},n)=>D.jsx(co.Group,{ref:n,className:te("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));$z.displayName=co.Group.displayName;const Sz=O.forwardRef((({className:e,...t},n)=>D.jsx(co.Separator,{ref:n,className:te("-mx-1 h-px bg-border",e),...t})));Sz.displayName=co.Separator.displayName;const Cz=O.forwardRef((({className:e,...t},n)=>D.jsx(co.Item,{ref:n,className:te("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));Cz.displayName=co.Item.displayName;const Ez=({className:e,...t})=>D.jsx("span",{className:te("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function xs(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function _O(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ek(...e){return t=>{let n=!1;const r=e.map((e=>{const r=_O(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():_O(e[t],null)}}}}function Zc(...e){return O.useCallback(ek(...e),e)}function Pz(e,t){const n=O.createContext(t),r=e=>{const{children:t,...r}=e,o=O.useMemo((()=>r),Object.values(r));return D.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=O.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function Oz(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>O.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return O.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=O.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,s=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=O.useMemo((()=>l),Object.values(l));return D.jsx(s.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const s=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,u=O.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Rz(r,...t)]}function Rz(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return O.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}Ez.displayName="CommandShortcut";var Lg=null!=globalThis&&globalThis.document?O.useLayoutEffect:()=>{},Tz=O[" useId ".trim().toString()]||(()=>{}),Nz=0;function dx(e){const[t,n]=O.useState(Tz());return Lg((()=>{e||n((e=>e??String(Nz++)))}),[e]),e||(t?`radix-${t}`:"")}function Gc(e){const t=O.useRef(e);return O.useEffect((()=>{t.current=e})),O.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function kz({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Dz({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=Gc(n);return[i,O.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function Dz({defaultProp:e,onChange:t}){const n=O.useState(e),[r]=n,o=O.useRef(r),a=Gc(t);return O.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function tk(e){const t=Az(e),n=O.forwardRef(((e,n)=>{const{children:r,...o}=e,a=O.Children.toArray(r),i=a.find(Iz);if(i){const e=i.props.children,r=a.map((t=>t===i?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t));return D.jsx(t,{...o,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return D.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Az(e){const t=O.forwardRef(((e,t)=>{const{children:n,...r}=e;if(O.isValidElement(n)){const e=Lz(n),o=jz(r,n.props);return n.type!==O.Fragment&&(o.ref=t?ek(t,e):e),O.cloneElement(n,o)}return O.Children.count(n)>1?O.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Mz=Symbol("radix.slottable");function Iz(e){return O.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Mz}function jz(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Lz(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Fz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ea=Fz.reduce(((e,t)=>{const n=tk(`Primitive.${t}`),r=O.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Wz(e,t){e&&Bi.flushSync((()=>e.dispatchEvent(t)))}function Bz(e,t=(null==globalThis?void 0:globalThis.document)){const n=Gc(e);O.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var $O,qz="DismissableLayer",q_="dismissableLayer.update",zz="dismissableLayer.pointerDownOutside",Uz="dismissableLayer.focusOutside",nk=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rk=O.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...s}=e,u=O.useContext(nk),[c,d]=O.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=O.useState({}),h=Zc(t,(e=>d(e))),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=Gz((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));!w||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f),_=Kz((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f);return Bz((e=>{y===u.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),O.useEffect((()=>{if(c)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&($O=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),SO(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=$O)}}),[c,f,n,u]),O.useEffect((()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),SO())}),[c,u]),O.useEffect((()=>{const e=()=>p({});return document.addEventListener(q_,e),()=>document.removeEventListener(q_,e)}),[]),D.jsx(Ea.div,{...s,ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:xs(e.onFocusCapture,_.onFocusCapture),onBlurCapture:xs(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:xs(e.onPointerDownCapture,x.onPointerDownCapture)})}));rk.displayName=qz;var Hz="DismissableLayerBranch",Vz=O.forwardRef(((e,t)=>{const n=O.useContext(nk),r=O.useRef(null),o=Zc(t,r);return O.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),D.jsx(Ea.div,{...e,ref:o})}));function Gz(e,t=(null==globalThis?void 0:globalThis.document)){const n=Gc(e),r=O.useRef(!1),o=O.useRef((()=>{}));return O.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){ok(zz,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Kz(e,t=(null==globalThis?void 0:globalThis.document)){const n=Gc(e),r=O.useRef(!1);return O.useEffect((()=>{const e=e=>{e.target&&!r.current&&ok(Uz,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SO(){const e=new CustomEvent(q_);document.dispatchEvent(e)}function ok(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Wz(o,a):o.dispatchEvent(a)}Vz.displayName=Hz;var fx="focusScope.autoFocusOnMount",px="focusScope.autoFocusOnUnmount",CO={bubbles:!1,cancelable:!0},Yz="FocusScope",ik=O.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=O.useState(null),u=Gc(o),c=Gc(a),d=O.useRef(null),f=Zc(t,(e=>s(e))),p=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:ys(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||ys(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&ys(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,p.paused]),O.useEffect((()=>{if(l){PO.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(fx,CO);l.addEventListener(fx,u),l.dispatchEvent(t),t.defaultPrevented||(Xz(tU(ak(l)),{select:!0}),document.activeElement===e&&ys(l))}return()=>{l.removeEventListener(fx,u),setTimeout((()=>{const t=new CustomEvent(px,CO);l.addEventListener(px,c),l.dispatchEvent(t),t.defaultPrevented||ys(e??document.body,{select:!0}),l.removeEventListener(px,c),PO.remove(p)}),0)}}}),[l,u,c,p]);const h=O.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=Qz(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&ys(a,{select:!0})):(e.preventDefault(),n&&ys(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return D.jsx(Ea.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})}));function Xz(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ys(r,{select:t}),document.activeElement!==n)return}function Qz(e){const t=ak(e);return[EO(t,e),EO(t.reverse(),e)]}function ak(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function EO(e,t){for(const n of e)if(!Zz(n,{upTo:t}))return n}function Zz(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Jz(e){return e instanceof HTMLInputElement&&"select"in e}function ys(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jz(e)&&t&&e.select()}}ik.displayName=Yz;var PO=eU();function eU(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=OO(e,t),e.unshift(t)},remove(t){var n;e=OO(e,t),null==(n=e[0])||n.resume()}}}function OO(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function tU(e){return e.filter((e=>"A"!==e.tagName))}var nU="Portal",sk=O.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=O.useState(!1);Lg((()=>i(!0)),[]);const l=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?w$.createPortal(D.jsx(Ea.div,{...o,ref:t}),l):null}));function rU(e,t){return O.useReducer(((e,n)=>t[e][n]??e),e)}sk.displayName=nU;var Ov=e=>{const{present:t,children:n}=e,r=oU(t),o="function"==typeof n?n({present:r.isPresent}):O.Children.only(n),a=Zc(r.ref,iU(o));return"function"==typeof n||r.isPresent?O.cloneElement(o,{ref:a}):null};function oU(e){const[t,n]=O.useState(),r=O.useRef({}),o=O.useRef(e),a=O.useRef("none"),i=e?"mounted":"unmounted",[l,s]=rU(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect((()=>{const e=dg(r.current);a.current="mounted"===l?e:"none"}),[l]),Lg((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=dg(t);e?s("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?s("UNMOUNT"):s(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,s]),Lg((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=dg(r.current).includes(a.animationName);if(a.target===t&&i&&(s("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(a.current=dg(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:O.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function dg(e){return(null==e?void 0:e.animationName)||"none"}function iU(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}Ov.displayName="Presence";var hx=0;function aU(){O.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??RO()),document.body.insertAdjacentElement("beforeend",e[1]??RO()),hx++,()=>{1===hx&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),hx--}}),[])}function RO(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ck=X3(),mx=function(){},Rv=O.forwardRef((function(e,t){var n=O.useRef(null),r=O.useState({onScrollCapture:mx,onWheelCapture:mx,onTouchMoveCapture:mx}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,s=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,g=e.as,v=void 0===g?"div":g,y=e.gapMode,b=S$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=Y3([n,t]),_=Pr(Pr({},b),o);return O.createElement(O.Fragment,null,c&&O.createElement(w,{sideCar:ck,removeScrollBar:u,shards:d,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?O.cloneElement(O.Children.only(l),Pr(Pr({},_),{ref:x})):O.createElement(v,Pr({},_,{className:s,ref:x}),l))}));Rv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Rv.classNames={fullWidth:lp,zeroRight:cp};var z_=!1;if(typeof window<"u")try{var fg=Object.defineProperty({},"passive",{get:function(){return z_=!0,!0}});window.addEventListener("test",fg,fg),window.removeEventListener("test",fg,fg)}catch{z_=!1}var _u=!!z_&&{passive:!1},sU=function(e){return"TEXTAREA"===e.tagName},lk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!sU(e)&&"visible"===n[t])},cU=function(e){return lk(e,"overflowY")},lU=function(e){return lk(e,"overflowX")},TO=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),uk(e,r)){var o=dk(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uU=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},dU=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},uk=function(e,t){return"v"===e?cU(t):lU(t)},dk=function(e,t){return"v"===e?uU(t):dU(t)},fU=function(e,t){return"h"===e&&"rtl"===t?-1:1},pU=function(e,t,n,r,o){var a=fU(e,window.getComputedStyle(t).direction),i=a*r,l=n.target,s=t.contains(l),u=!1,c=i>0,d=0,f=0;do{var p=dk(e,l),h=p[0],m=p[1]-p[2]-a*h;(h||m)&&uk(e,l)&&(d+=m,f+=h),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(u=!0),u},pg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},NO=function(e){return[e.deltaX,e.deltaY]},kO=function(e){return e&&"current"in e?e.current:e},hU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mU=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},gU=0,$u=[];function vU(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),o=O.useState(gU++)[0],a=O.useState(C$)[0],i=O.useRef(e);O.useEffect((function(){i.current=e}),[e]),O.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=K3([e.lockRef.current],(e.shards||[]).map(kO),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=O.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=pg(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],u="deltaY"in e?e.deltaY:l[1]-a[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=TO(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=TO(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var p=r.current||o;return pU(p,t,e,"h"===p?s:u,!0)}),[]),s=O.useCallback((function(e){var n=e;if($u.length&&$u[$u.length-1]===a){var r="deltaY"in n?NO(n):pg(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&hU(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var s=(i.current.shards||[]).map(kO).filter(Boolean).filter((function(e){return e.contains(n.target)}));(s.length>0?l(n,s[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=O.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:yU(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),c=O.useCallback((function(e){n.current=pg(e),r.current=void 0}),[]),d=O.useCallback((function(t){u(t.type,NO(t),t.target,l(t,e.lockRef.current))}),[]),f=O.useCallback((function(t){u(t.type,pg(t),t.target,l(t,e.lockRef.current))}),[]);O.useEffect((function(){return $u.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,_u),document.addEventListener("touchmove",s,_u),document.addEventListener("touchstart",c,_u),function(){$u=$u.filter((function(e){return e!==a})),document.removeEventListener("wheel",s,_u),document.removeEventListener("touchmove",s,_u),document.removeEventListener("touchstart",c,_u)}}),[]);var p=e.removeScrollBar,h=e.inert;return O.createElement(O.Fragment,null,h?O.createElement(a,{styles:mU(o)}):null,p?O.createElement(eT,{gapMode:e.gapMode}):null)}function yU(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bU=Z3(ck,vU);var fk=O.forwardRef((function(e,t){return O.createElement(Rv,Pr({},e,{ref:t,sideCar:bU}))}));fk.classNames=Rv.classNames;var u2="Dialog",[pk,qie]=Oz(u2),[wU,ui]=pk(u2),hk=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=O.useRef(null),s=O.useRef(null),[u=!1,c]=kz({prop:r,defaultProp:o,onChange:a});return D.jsx(wU,{scope:t,triggerRef:l,contentRef:s,contentId:dx(),titleId:dx(),descriptionId:dx(),open:u,onOpenChange:c,onOpenToggle:O.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};hk.displayName=u2;var mk="DialogTrigger",gk=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui(mk,n),a=Zc(t,o.triggerRef);return D.jsx(Ea.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":p2(o.open),...r,ref:a,onClick:xs(e.onClick,o.onOpenToggle)})}));gk.displayName=mk;var d2="DialogPortal",[xU,vk]=pk(d2,{forceMount:void 0}),yk=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ui(d2,t);return D.jsx(xU,{scope:t,forceMount:n,children:O.Children.map(r,(e=>D.jsx(Ov,{present:n||a.open,children:D.jsx(sk,{asChild:!0,container:o,children:e})})))})};yk.displayName=d2;var Fg="DialogOverlay",bk=O.forwardRef(((e,t)=>{const n=vk(Fg,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ui(Fg,e.__scopeDialog);return a.modal?D.jsx(Ov,{present:r||a.open,children:D.jsx($U,{...o,ref:t})}):null}));bk.displayName=Fg;var _U=tk("DialogOverlay.RemoveScroll"),$U=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui(Fg,n);return D.jsx(fk,{as:_U,allowPinchZoom:!0,shards:[o.contentRef],children:D.jsx(Ea.div,{"data-state":p2(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Kc="DialogContent",wk=O.forwardRef(((e,t)=>{const n=vk(Kc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ui(Kc,e.__scopeDialog);return D.jsx(Ov,{present:r||a.open,children:a.modal?D.jsx(SU,{...o,ref:t}):D.jsx(CU,{...o,ref:t})})}));wk.displayName=Kc;var SU=O.forwardRef(((e,t)=>{const n=ui(Kc,e.__scopeDialog),r=O.useRef(null),o=Zc(t,n.contentRef,r);return O.useEffect((()=>{const e=r.current;if(e)return jp(e)}),[]),D.jsx(xk,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xs(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:xs(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:xs(e.onFocusOutside,(e=>e.preventDefault()))})})),CU=O.forwardRef(((e,t)=>{const n=ui(Kc,e.__scopeDialog),r=O.useRef(!1),o=O.useRef(!1);return D.jsx(xk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const l=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),xk=O.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=ui(Kc,n),s=O.useRef(null),u=Zc(t,s);return aU(),D.jsxs(D.Fragment,{children:[D.jsx(ik,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:D.jsx(rk,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":p2(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),D.jsxs(D.Fragment,{children:[D.jsx(EU,{titleId:l.titleId}),D.jsx(OU,{contentRef:s,descriptionId:l.descriptionId})]})]})})),f2="DialogTitle",_k=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui(f2,n);return D.jsx(Ea.h2,{id:o.titleId,...r,ref:t})}));_k.displayName=f2;var $k="DialogDescription",Sk=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui($k,n);return D.jsx(Ea.p,{id:o.descriptionId,...r,ref:t})}));Sk.displayName=$k;var Ck="DialogClose",Ek=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui(Ck,n);return D.jsx(Ea.button,{type:"button",...r,ref:t,onClick:xs(e.onClick,(()=>o.onOpenChange(!1)))})}));function p2(e){return e?"open":"closed"}Ek.displayName=Ck;var Pk="DialogTitleWarning",[zie,Ok]=Pz(Pk,{contentName:Kc,titleName:f2,docsSlug:"dialog"}),EU=({titleId:e})=>{const t=Ok(Pk),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return O.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},PU="DialogDescriptionWarning",OU=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ok(PU).contentName}}.`;return O.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},RU=hk,TU=gk,NU=yk,kU=bk,DU=wk,AU=_k,MU=Sk,IU=Ek;function jU(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Rk=re.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Gu=()=>{const e=re.useContext(Rk);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};jU("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const LU=24,FU=typeof window<"u"?Xc:We;function DO(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function WU(){return h2(/^Mac/)}function BU(){return h2(/^iPhone/)}function AO(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function qU(){return h2(/^iPad/)||WU()&&navigator.maxTouchPoints>1}function Tk(){return BU()||qU()}function h2(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const gx=typeof document<"u"&&window.visualViewport;function MO(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Nk(e){for(MO(e)&&(e=e.parentElement);e&&!MO(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const zU=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let vx,hg=0;function UU(e={}){let{isDisabled:t}=e;FU((()=>{if(!t)return hg++,1===hg&&Tk()&&(vx=HU()),()=>{hg--,0===hg&&(null==vx||vx())}}),[t])}function HU(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=DO(VU(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=DO(Jf(document,"touchstart",(n=>{e=Nk(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),Jf(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),Jf(document,"touchend",(e=>{let t=e.target;U_(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),Jf(document,"focus",(e=>{let t=e.target;U_(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",gx&&(gx.height<window.innerHeight?requestAnimationFrame((()=>{IO(t)})):gx.addEventListener("resize",(()=>IO(t)),{once:!0}))})))}),!0),Jf(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function VU(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Jf(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function IO(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=Nk(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function U_(e){return e instanceof HTMLInputElement&&!zU.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function GU(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function KU(...e){return t=>e.forEach((e=>GU(e,t)))}function kk(...e){return O.useCallback(KU(...e),e)}const Dk=new WeakMap;function zn(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&Dk.set(e,r)}function YU(e,t){if(!(e&&e instanceof HTMLElement))return;let n=Dk.get(e);n&&(e.style[t]=n[t])}const Un=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function mg(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Un(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Un(t)?5:4]):null)}function XU(e){return 8*(Math.log(e+1)-2)}function yx(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function QU(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const pn={DURATION:.5,EASE:[.32,.72,0,1]},Ak=.4,ZU=.25,JU=100,Mk=8,Dc=16,H_=26,bx="vaul-dragging";function Ik(e){const t=re.useRef(e);return re.useEffect((()=>{t.current=e})),re.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function eH({defaultProp:e,onChange:t}){const n=re.useState(e),[r]=n,o=re.useRef(r),a=Ik(t);return re.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function jk({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=eH({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=Ik(n);return[i,re.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function tH({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:l="bottom",container:s,snapToSequentialPoint:u}){const[c,d]=jk({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=re.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);re.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=re.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),m=re.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),g=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===c||!n,v=re.useMemo((()=>{const e=s?{width:s.getBoundingClientRect().width,height:s.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Un(l)){const o=n?r:f?t*e.height:0;return f?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===l?e.width-o:-e.width+o:o})))?t:[]}),[n,f,s]),y=re.useMemo((()=>null!==m?null==v?void 0:v[m]:null),[v,m]),b=re.useCallback((e=>{var t;const s=null!=(t=null==v?void 0:v.findIndex((t=>t===e)))?t:null;i(s),zn(r.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:Un(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),v&&s!==v.length-1&&s!==a&&s<a?zn(o.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"0"}):zn(o.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(s,0)])}),[r.current,n,v,a,o,d]);return re.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;v&&-1!==r&&"number"==typeof v[r]&&b(v[r])}}),[c,e,n,v,b]),{isLastSnapPoint:h,activeSnapPoint:c,shouldFade:g,getPercentageDragged:function(e,t){if(!n||"number"!=typeof m||!v||void 0===a)return null;const r=m===a-1;if(m>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;const o=r?m+1:m-1,i=r?v[o]-v[o-1]:v[o+1]-v[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:d,activeSnapPointIndex:m,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===a)return;const s="bottom"===l||"right"===l?(y??0)-e:(y??0)+e,c=0===m,d=e>0;if(m===a-1&&zn(o.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`}),!u&&r>2&&!d)return void(i?t():b(v[0]));if(!u&&r>2&&d&&v&&n)return void b(v[n.length-1]);const f=null==v?void 0:v.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e)),p=Un(l)?window.innerHeight:window.innerWidth;if(r>Ak&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&h)return void b(v[n.length-1]);if(c&&e<0&&i&&t(),null===m)return;b(v[m+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<v[v.length-1]||("top"===l||"left"===l)&&t>v[v.length-1]||zn(r.current,{transform:Un(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:v}}const nH=()=>()=>{};function rH(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Gu(),a=re.useRef(null),i=or((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}re.useEffect((()=>{if(t&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;QU(r&&!o?yx(document.body,{background:"black"}):nH,yx(t,{transformOrigin:Un(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${pn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pn.EASE.join(",")})`}));const n=yx(t,{borderRadius:"8px",overflow:"hidden",...Un(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout((()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")}),1e3*pn.DURATION)}}}),[t,n,i])}let ep=null;function oH({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,l]=re.useState((()=>typeof window<"u"?window.location.href:"")),s=re.useRef(0),u=re.useCallback((()=>{if(AO()&&null===ep&&e&&!a){ep={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-s.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&s.current>=t&&(document.body.style.top=-(s.current+e)+"px")}))),300)}}),[e]),c=re.useCallback((()=>{if(AO()&&null!==ep&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,ep),window.requestAnimationFrame((()=>{o&&i!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),ep=null}}),[i]);return re.useEffect((()=>{function e(){s.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),re.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,i,t,n,u,c]),{restorePositionSetting:c}}function Lk({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:s=ZU,scrollLockTimeout:u=JU,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:g=!0,onClose:v,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:O=!1,preventScrollRestoration:k=!1,repositionInputs:S=!0,onAnimationEnd:D,container:C,autoFocus:E=!1}){var N,M;const[P=!1,j]=jk({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==D||D(e)}),1e3*pn.DURATION),e&&!g&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[T,A]=re.useState(!1),[R,L]=re.useState(!1),[z,I]=re.useState(!1),F=re.useRef(null),W=re.useRef(null),$=re.useRef(null),q=re.useRef(null),B=re.useRef(null),U=re.useRef(!1),H=re.useRef(null),K=re.useRef(0),V=re.useRef(!1),Y=re.useRef(0),G=re.useRef(null),X=re.useRef((null==(N=G.current)?void 0:N.getBoundingClientRect().height)||0),Q=re.useRef((null==(M=G.current)?void 0:M.getBoundingClientRect().width)||0),Z=re.useRef(0),J=re.useCallback((e=>{a&&e===ae.length-1&&(W.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:oe,snapPointsOffset:ae,onDrag:ie,shouldFade:le,getPercentageDragged:se}=tH({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:G,fadeFromIndex:f,overlayRef:F,onSnapPointChange:J,direction:w,container:C,snapToSequentialPoint:O});UU({isDisabled:!P||R||!g||z||!T||!S||!_});const{restorePositionSetting:ue}=oH({isOpen:P,modal:g,nested:y,hasBeenOpened:T,preventScrollRestoration:k,noBodyStyles:b});function ce(){return(window.innerWidth-26)/window.innerWidth}function de(e,t){var n,r;let o=e;const a=null==(n=window.getSelection())?void 0:n.toString(),i=G.current?mg(G.current,w):null,l=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(W.current&&l.getTime()-W.current.getTime()<500)return!1;if(null!==i&&("bottom"===w?i>0:i<0))return!0;if(a&&a.length>0)return!1;if(l.getTime()-(null==(r=B.current)?void 0:r.getTime())<u&&0===i||t)return B.current=l,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return B.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function fe(e){!R||!G.current||(G.current.classList.remove(bx),U.current=!1,L(!1),q.current=new Date),null==v||v(),e||j(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*pn.DURATION)}function pe(){if(!G.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=mg(G.current,w);zn(G.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`}),zn(F.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&P&&zn(e,{borderRadius:"8px",overflow:"hidden",...Un(w)?{transform:`scale(${ce()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ce()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${pn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pn.EASE.join(",")})`},!0)}return re.useEffect((()=>{var e;function t(){if(!G.current||!S)return;if(U_(document.activeElement)||V.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=G.current.getBoundingClientRect().height||0,i=o>.8*n;Z.current||(Z.current=o);const l=G.current.getBoundingClientRect().top;if(Math.abs(Y.current-r)>60&&(V.current=!V.current),a&&a.length>0&&ae&&te){r+=ae[te]||0}if(Y.current=r,o>t||V.current){const e=G.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?l:26)),G.current.style.height=m?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else G.current.style.height=`${Z.current}px`;a&&a.length>0&&!V.current?G.current.style.bottom="0px":G.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,a,ae]),re.useEffect((()=>(P&&(zn(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{YU(document.documentElement,"scrollBehavior")})),[P]),re.createElement(RU,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?A(!0):fe(!0),j(e))},open:P},re.createElement(Rk.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:G,overlayRef:F,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||G.current&&!G.current.contains(e.target)||(X.current=(null==(t=G.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=G.current)?void 0:n.getBoundingClientRect().width)||0,L(!0),$.current=new Date,Tk()&&window.addEventListener("touchend",(()=>U.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=Un(w)?e.pageY:e.pageX)},onRelease:function(e){if(!R||!G.current)return;G.current.classList.remove(bx),U.current=!1,L(!1),q.current=new Date;const t=mg(G.current,w);if(!de(e.target,!1)||!t||Number.isNaN(t)||null===$.current)return;const n=q.current.getTime()-$.current.getTime(),r=K.current-(Un(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(I(!0),setTimeout((()=>{I(!1)}),200)),a)return oe({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:fe,velocity:i,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return pe(),void(null==o||o(e,!0));if(i>Ak)return fe(),void(null==o||o(e,!1));var l;const u=Math.min(null!=(l=G.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=G.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:u)*s)return fe(),void(null==o||o(e,!1));null==o||o(e,!0),pe()},onDrag:function(e){if(G.current&&R){const t="bottom"===w||"right"===w?1:-1,n=(K.current-(Un(w)?e.pageY:e.pageX))*t,o=n>0,l=a&&!c&&!o;if(l&&0===te)return;const s=Math.abs(n),u=document.querySelector("[data-vaul-drawer-wrapper]");let d=s/("bottom"===w||"top"===w?X.current:Q.current);const p=se(s,o);if(null!==p&&(d=p),l&&d>=1||!U.current&&!de(e.target,o))return;if(G.current.classList.add(bx),U.current=!0,zn(G.current,{transition:"none"}),zn(F.current,{transition:"none"}),a&&ie({draggedDistance:n}),o&&!a){const e=XU(n),r=Math.min(-1*e,0)*t;return void zn(G.current,{transform:Un(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-d;if((le||f&&te===f-1)&&(null==r||r(e,d),zn(F.current,{opacity:`${h}`,transition:"none"},!0)),u&&F.current&&i){const e=Math.min(ce()+d*(1-ce()),1),t=8-8*d,n=Math.max(0,14-14*d);zn(u,{borderRadius:`${t}px`,transform:Un(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=s*t;zn(G.current,{transform:Un(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:P,isDragging:R,shouldFade:le,closeDrawer:fe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;zn(G.current,{transform:Un(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;H.current&&window.clearTimeout(H.current),zn(G.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&G.current&&(H.current=setTimeout((()=>{const e=mg(G.current,w);zn(G.current,{transition:"none",transform:Un(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Un(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&zn(G.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:Un(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:V,modal:g,snapPointsOffset:ae,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:b,container:C,autoFocus:E}},n))}const Fk=re.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:l}=Gu(),s=kk(t,n),u=r&&r.length>0;return l?re.createElement(kU,{onMouseUp:o,ref:s,"data-vaul-overlay":"","data-vaul-snap-points":i&&u?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));Fk.displayName="Drawer.Overlay";const Wk=re.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:l,onDrag:s,keyboardIsOpen:u,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:h,container:m,handleOnly:g,autoFocus:v}=Gu(),[y,b]=re.useState(!1),w=kk(o,a),x=re.useRef(null),_=re.useRef(null),O=re.useRef(!1),k=h&&h.length>0;rH();function S(e){x.current=null,O.current=!1,l(e)}return re.useEffect((()=>{k&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),re.createElement(DU,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&k?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{g||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),v||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?u.current&&(u.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,g||(null==r.onPointerMove||r.onPointerMove.call(r,e),!x.current))return;const t=e.pageY-x.current.y,n=e.pageX-x.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(O.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return O.current=!0,!0})({x:n,y:t},p,o)?s(e):(Math.abs(n)>o||Math.abs(t)>o)&&(x.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),x.current=null,O.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),S(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),S(_.current)}})}));Wk.displayName="Drawer.Content";const iH=250,aH=120,Bk=re.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:s,dismissible:u,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=Gu(),h=re.useRef(null),m=re.useRef(!1);function g(){window.clearTimeout(h.current),m.current=!1}return re.createElement("div",{onClick:function(){m.current?g():window.setTimeout((()=>{!function(){if(a||e||m.current)return void g();if(g(),(!i||0===i.length)&&u)return void o();if(l===i[i.length-1]&&u)return void o();const t=i.findIndex((e=>e===l));if(-1===t)return;const n=i[t+1];s(n)}()}),aH)},onPointerCancel:g,onPointerDown:e=>{c&&f(e),h.current=window.setTimeout((()=>{m.current=!0}),iH)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},re.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function sH({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=Gu();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return re.createElement(Lk,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:a,...n})}function cH(e){const t=Gu(),{container:n=t.container,...r}=e;return re.createElement(NU,{container:n,...r})}Bk.displayName="Drawer.Handle";const di={Root:Lk,NestedRoot:sH,Content:Wk,Overlay:Fk,Trigger:TU,Portal:cH,Handle:Bk,Close:IU,Title:AU,Description:MU},lH=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>D.jsx(di.Root,{direction:t,shouldScaleBackground:e,...n});lH.displayName="Drawer";const Uie=di.Trigger,uH=di.Portal,Hie=di.Close,qk=O.forwardRef((({className:e,...t},n)=>D.jsx(di.Overlay,{ref:n,className:te("fixed inset-0 z-50 bg-black/5",e),...t})));qk.displayName=di.Overlay.displayName;const dH=O.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>D.jsxs(uH,{children:[D.jsx(qk,{}),D.jsxs(di.Content,{ref:o,className:te("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&D.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));dH.displayName="DrawerContent";const fH=({className:e,...t})=>D.jsx("div",{className:te("grid gap-1.5 p-4 text-center sm:text-left",e),...t});fH.displayName="DrawerHeader";const pH=({className:e,...t})=>D.jsx("div",{className:te("mt-auto flex flex-col gap-2 p-4",e),...t});pH.displayName="DrawerFooter";const hH=O.forwardRef((({className:e,...t},n)=>D.jsx(di.Title,{ref:n,className:te("text-lg font-semibold leading-none tracking-tight",e),...t})));hH.displayName=di.Title.displayName;const mH=O.forwardRef((({className:e,...t},n)=>D.jsx(di.Description,{ref:n,className:te("text-sm text-muted-foreground",e),...t})));function m2(e){const t=e+"CollectionProvider",[n,r]=Br(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e+"CollectionSlot",l=e+"CollectionItemSlot",s="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=re.useRef(null),a=re.useRef(new Map).current;return re.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:re.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Nt(t,a(i,n).collectionRef);return re.createElement(zc,{ref:o},r)})),ItemSlot:re.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=re.useRef(null),u=Nt(t,i),c=a(l,n);return re.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),re.createElement(zc,{[s]:"",ref:u},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return re.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${s}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}mH.displayName=di.Description.displayName;const gH=ji(void 0);function Gp(e){const t=Ds(gH);return e||t||"ltr"}const vH=["top","right","bottom","left"],Cs=Math.min,So=Math.max,Wg=Math.round,gg=Math.floor,Es=e=>({x:e,y:e}),yH={left:"right",right:"left",bottom:"top",top:"bottom"},bH={start:"end",end:"start"};function V_(e,t,n){return So(e,Cs(t,n))}function ba(e,t){return"function"==typeof e?e(t):e}function wa(e){return e.split("-")[0]}function Ku(e){return e.split("-")[1]}function g2(e){return"x"===e?"y":"x"}function v2(e){return"y"===e?"height":"width"}function Ps(e){return["top","bottom"].includes(wa(e))?"y":"x"}function y2(e){return g2(Ps(e))}function wH(e,t,n){void 0===n&&(n=!1);const r=Ku(e),o=y2(e),a=v2(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Bg(i)),[i,Bg(i)]}function xH(e){const t=Bg(e);return[G_(e),t,G_(t)]}function G_(e){return e.replace(/start|end/g,(e=>bH[e]))}function _H(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function $H(e,t,n,r){const o=Ku(e);let a=_H(wa(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(G_)))),a}function Bg(e){return e.replace(/left|right|bottom|top/g,(e=>yH[e]))}function SH(e){return{top:0,right:0,bottom:0,left:0,...e}}function zk(e){return"number"!=typeof e?SH(e):{top:e,right:e,bottom:e,left:e}}function qg(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function jO(e,t,n){let{reference:r,floating:o}=e;const a=Ps(t),i=y2(t),l=v2(i),s=wa(t),u="y"===a,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ku(t)){case"start":p[i]-=f*(n&&u?-1:1);break;case"end":p[i]+=f*(n&&u?-1:1)}return p}const CH=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=a.filter(Boolean),s=await(null==i.isRTL?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=jO(u,r,s),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:a,fn:m}=l[n],{x:g,y:v,data:y,reset:b}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=g??c,d=v??d,p={...p,[a]:{...p[a],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(u=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=jO(u,f,s))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Cp(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ba(t,e),h=zk(p),m=l[f?"floating"===d?"reference":"floating":d],g=qg(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),v="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},w=qg(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:s}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}const EH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:u,padding:c=0}=ba(e,t)||{};if(null==u)return{};const d=zk(c),f={x:n,y:r},p=y2(o),h=v2(p),m=await i.getDimensions(u),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u));let O=_?_[b]:0;(!O||!await(null==i.isElement?void 0:i.isElement(_)))&&(O=l.floating[b]||a.floating[h]);const k=w/2-x/2,S=O/2-m[h]/2-1,D=Cs(d[v],S),C=Cs(d[y],S),E=D,N=O-m[h]-C,M=O/2-m[h]/2+k,P=V_(E,M,N),j=!s.arrow&&null!=Ku(o)&&M!==P&&a.reference[h]/2-(M<E?D:C)-m[h]/2<0,T=j?M<E?M-E:M-N:0;return{[p]:f[p]+T,data:{[p]:P,centerOffset:M-P-T,...j&&{alignmentOffset:T}},reset:j}}}),PH=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:s,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=ba(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=wa(o),y=Ps(l),b=wa(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(u.floating)),x=f||(b||!m?[Bg(l)]:xH(l)),_="none"!==h;!f&&_&&x.push(...$H(l,m,h,w));const O=[l,...x],k=await Cp(t,g),S=[];let D=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&S.push(k[v]),d){const e=wH(o,i,w);S.push(k[e[0]],k[e[1]])}if(D=[...D,{placement:o,overflows:S}],!S.every((e=>e<=0))){var C,E;const e=((null==(C=a.flip)?void 0:C.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(E=D.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var N;const e=null==(N=D.filter((e=>{if(_){const t=Ps(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function LO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FO(e){return vH.some((t=>e[t]>=0))}const OH=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ba(e,t);switch(r){case"referenceHidden":{const e=LO(await Cp(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:FO(e)}}}case"escaped":{const e=LO(await Cp(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:FO(e)}}}default:return{}}}}};async function RH(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=wa(n),l=Ku(n),s="y"===Ps(n),u=["left","top"].includes(i)?-1:1,c=a&&s?-1:1,d=ba(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*c,y:f*u}:{x:f*u,y:p*c}}const TH=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,s=await RH(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:i}}}}},NH=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=ba(e,t),u={x:n,y:r},c=await Cp(t,s),d=Ps(wa(o)),f=g2(d);let p=u[f],h=u[d];if(a){const e="y"===f?"bottom":"right";p=V_(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";h=V_(h+c["y"===d?"top":"left"],h,h-c[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}},kH=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=ba(e,t),c={x:n,y:r},d=Ps(o),f=g2(d);let p=c[f],h=c[d];const m=ba(l,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var v,y;const e="y"===f?"width":"height",t=["top","left"].includes(wa(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(v=i.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},DH=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:s=()=>{},...u}=ba(e,t),c=await Cp(t,u),d=wa(o),f=Ku(o),p="y"===Ps(o),{width:h,height:m}=a.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=d,g="end"===f?"top":"bottom");const y=m-c.top-c.bottom,b=h-c.left-c.right,w=Cs(m-c[g],y),x=Cs(h-c[v],b),_=!t.middlewareData.shift;let O=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(O=y),_&&!f){const e=So(c.left,0),t=So(c.right,0),n=So(c.top,0),r=So(c.bottom,0);p?k=h-2*(0!==e||0!==t?e+t:So(c.left,c.right)):O=m-2*(0!==n||0!==r?n+r:So(c.top,c.bottom))}await s({...t,availableWidth:k,availableHeight:O});const S=await i.getDimensions(l.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}};function Tv(){return typeof window<"u"}function Os(e){return Uk(e)?(e.nodeName||"").toLowerCase():"#document"}function Eo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Pa(e){var t;return null==(t=(Uk(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Uk(e){return!!Tv()&&(e instanceof Node||e instanceof Eo(e).Node)}function Li(e){return!!Tv()&&(e instanceof Element||e instanceof Eo(e).Element)}function Fi(e){return!!Tv()&&(e instanceof HTMLElement||e instanceof Eo(e).HTMLElement)}function WO(e){return!(!Tv()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof Eo(e).ShadowRoot)}function Kp(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function AH(e){return["table","td","th"].includes(Os(e))}function MH(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function b2(e){const t=w2(),n=Li(e)?Vo(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Hk(e){let t=ju(e);for(;Fi(t)&&!Nv(t);){if(b2(t))return t;if(MH(t))return null;t=ju(t)}return null}function w2(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Nv(e){return["html","body","#document"].includes(Os(e))}function Vo(e){return Eo(e).getComputedStyle(e)}function kv(e){return Li(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ju(e){if("html"===Os(e))return e;const t=e.assignedSlot||e.parentNode||WO(e)&&e.host||Pa(e);return WO(t)?t.host:t}function Vk(e){const t=ju(e);return Nv(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fi(t)&&Kp(t)?t:Vk(t)}function Ep(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Vk(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Eo(o);if(a){const e=IH(i);return t.concat(i,i.visualViewport||[],Kp(o)?o:[],e&&n?Ep(e):[])}return t.concat(o,Ep(o,[],n))}function IH(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gk(e){const t=Vo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Fi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Wg(n)!==a||Wg(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function x2(e){return Li(e)?e:e.contextElement}function Ou(e){const t=x2(e);if(!Fi(t))return Es(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Gk(t);let i=(a?Wg(n.width):n.width)/r,l=(a?Wg(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const jH=Es(0);function Kk(e){const t=Eo(e);return w2()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:jH}function LH(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Eo(e))&&t}function Yc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=x2(e);let i=Es(1);t&&(r?Li(r)&&(i=Ou(r)):i=Ou(e));const l=LH(a,n,r)?Kk(a):Es(0);let s=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){const e=Eo(a),t=r&&Li(r)?Eo(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Ou(n),t=n.getBoundingClientRect(),r=Vo(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,u*=e.y,c*=e.x,d*=e.y,s+=o,u+=a,n=Eo(n).frameElement}}return qg({width:c,height:d,x:s,y:u})}const FH=[":popover-open",":modal"];function Yk(e){let t=!1,n=0,r=0;if(FH.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=Hk(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function WH(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=Pa(r),[i]=t?Yk(t.floating):[!1];if(r===a||i)return n;let l={scrollLeft:0,scrollTop:0},s=Es(1);const u=Es(0),c=Fi(r);if((c||!c&&"fixed"!==o)&&(("body"!==Os(r)||Kp(a))&&(l=kv(r)),Fi(r))){const e=Yc(r);s=Ou(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+u.x,y:n.y*s.y-l.scrollTop*s.y+u.y}}function BH(e){return Array.from(e.getClientRects())}function Xk(e){return Yc(Pa(e)).left+kv(e).scrollLeft}function qH(e){const t=Pa(e),n=kv(e),r=e.ownerDocument.body,o=So(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=So(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Xk(e);const l=-n.scrollTop;return"rtl"===Vo(r).direction&&(i+=So(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}function zH(e,t){const n=Eo(e),r=Pa(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=w2();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l,y:s}}function UH(e,t){const n=Yc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Fi(e)?Ou(e):Es(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function BO(e,t,n){let r;if("viewport"===t)r=zH(e,n);else if("document"===t)r=qH(Pa(e));else if(Li(t))r=UH(t,n);else{const n=Kk(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return qg(r)}function Qk(e,t){const n=ju(e);return!(n===t||!Li(n)||Nv(n))&&("fixed"===Vo(n).position||Qk(n,t))}function HH(e,t){const n=t.get(e);if(n)return n;let r=Ep(e,[],!1).filter((e=>Li(e)&&"body"!==Os(e))),o=null;const a="fixed"===Vo(e).position;let i=a?ju(e):e;for(;Li(i)&&!Nv(i);){const t=Vo(i),n=b2(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Kp(i)&&!n&&Qk(e,i))?r=r.filter((e=>e!==i)):o=t,i=ju(i)}return t.set(e,r),r}function VH(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?HH(t,this._c):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=BO(t,n,o);return e.top=So(r.top,e.top),e.right=Cs(r.right,e.right),e.bottom=Cs(r.bottom,e.bottom),e.left=So(r.left,e.left),e}),BO(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function GH(e){const{width:t,height:n}=Gk(e);return{width:t,height:n}}function KH(e,t,n,r){const o=Fi(t),a=Pa(t),i="fixed"===n,l=Yc(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=Es(0);if(o||!o&&!i)if(("body"!==Os(t)||Kp(a))&&(s=kv(t)),o){const e=Yc(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else a&&(u.x=Xk(a));let c=l.left+s.scrollLeft-u.x,d=l.top+s.scrollTop-u.y;const[f,p,h]=Yk(r);return f&&(c+=p,d+=h,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function qO(e,t){return Fi(e)&&"fixed"!==Vo(e).position?t?t(e):e.offsetParent:null}function Zk(e,t){const n=Eo(e);if(!Fi(e))return n;let r=qO(e,t);for(;r&&AH(r)&&"static"===Vo(r).position;)r=qO(r,t);return r&&("html"===Os(r)||"body"===Os(r)&&"static"===Vo(r).position&&!b2(r))?n:r||Hk(e)||n}const YH=async function(e){const t=this.getOffsetParent||Zk,n=this.getDimensions;return{reference:KH(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function XH(e){return"rtl"===Vo(e).direction}const QH={convertOffsetParentRelativeRectToViewportRelativeRect:WH,getDocumentElement:Pa,getClippingRect:VH,getOffsetParent:Zk,getElementRects:YH,getClientRects:BH,getDimensions:GH,getScale:Ou,isElement:Li,isRTL:XH};function ZH(e,t){let n,r=null;const o=Pa(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-gg(c)+"px "+-gg(o.clientWidth-(u+d))+"px "+-gg(o.clientHeight-(c+f))+"px "+-gg(u)+"px",threshold:So(0,Cs(1,s))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==s){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),a}function JH(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=x2(e),c=o||a?[...u?Ep(u):[],...Ep(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=u&&l?ZH(u,n):null;let f=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),u&&!s&&p.observe(u),p.observe(t));let h,m=s?Yc(e):null;return s&&function t(){const r=Yc(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(h)}}const eV=NH,tV=PH,nV=DH,rV=OH,zO=EH,oV=kH,iV=(e,t,n)=>{const r=new Map,o={platform:QH,...n},a={...o.platform,_c:r};return CH(e,t,{...o,platform:a})};var Eg=typeof document<"u"?Xc:We;function zg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!zg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||zg(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Jk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UO(e,t){const n=Jk(e);return Math.round(t*n)/n}function wx(e){const t=O.useRef(e);return Eg((()=>{t.current=e})),t}function aV(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:s,open:u}=e,[c,d]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=O.useState(r);zg(f,r)||p(r);const[h,m]=O.useState(null),[g,v]=O.useState(null),y=O.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),b=O.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),w=a||h,x=i||g,_=O.useRef(null),k=O.useRef(null),S=O.useRef(c),D=null!=s,C=wx(s),E=wx(o),N=wx(u),M=O.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};E.current&&(e.platform=E.current),iV(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==N.current};P.current&&!zg(S.current,t)&&(S.current=t,Bi.flushSync((()=>{d(t)})))}))}),[f,t,n,E,N]);Eg((()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const P=O.useRef(!1);Eg((()=>(P.current=!0,()=>{P.current=!1})),[]),Eg((()=>{if(w&&(_.current=w),x&&(k.current=x),w&&x){if(C.current)return C.current(w,x,M);M()}}),[w,x,M,C,D]);const j=O.useMemo((()=>({reference:_,floating:k,setReference:y,setFloating:b})),[y,b]),T=O.useMemo((()=>({reference:w,floating:x})),[w,x]),A=O.useMemo((()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=UO(T.floating,c.x),r=UO(T.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Jk(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,T.floating,c.x,c.y]);return O.useMemo((()=>({...c,update:M,refs:j,elements:T,floatingStyles:A})),[c,M,j,T,A])}const sV=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?zO({element:n.current,padding:r}).fn(t):{}:n?zO({element:n,padding:r}).fn(t):{}}}),cV=(e,t)=>({...TH(e),options:[e,t]}),lV=(e,t)=>({...eV(e),options:[e,t]}),uV=(e,t)=>({...oV(e),options:[e,t]}),dV=(e,t)=>({...tV(e),options:[e,t]}),fV=(e,t)=>({...nV(e),options:[e,t]}),pV=(e,t)=>({...rV(e),options:[e,t]}),hV=(e,t)=>({...sV(e),options:[e,t]}),mV=ye(((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return q(dt.svg,he({},a,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:q("polygon",{points:"0,0 30,0 15,10"}))})),gV=mV,eD="Popper",[tD,Yu]=Br(eD),[vV,nD]=tD(eD),yV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Ke(null);return q(vV,{scope:t,anchor:r,onAnchorChange:o},n)},bV="PopperAnchor",wV=ye(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=nD(bV,n),i=Ae(null),l=Nt(t,i);return We((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:q(dt.div,he({},o,{ref:l}))})),rD="PopperContent",[xV,_V]=tD(rD),$V=ye(((e,t)=>{var n,r,o,a,i,l,s,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...O}=e,k=nD(rD,c),[S,D]=Ke(null),C=Nt(t,(e=>D(e))),[E,N]=Ke(null),M=Ev(E),P=null!==(n=null==M?void 0:M.width)&&void 0!==n?n:0,j=null!==(r=null==M?void 0:M.height)&&void 0!==r?r:0,T=d+("center"!==p?"-"+p:""),A="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},R=Array.isArray(v)?v:[v],L=R.length>0,z={padding:A,boundary:R.filter(PV),altBoundary:L},{refs:I,floatingStyles:F,placement:W,isPositioned:$,middlewareData:B}=aV({strategy:"fixed",placement:T,whileElementsMounted:(...e)=>JH(...e,{animationFrame:"always"===x}),elements:{reference:k.anchor},middleware:[cV({mainAxis:f+j,alignmentAxis:h}),g&&lV({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?uV():void 0,...z}),g&&dV({...z}),fV({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),E&&hV({element:E,padding:m}),OV({arrowWidth:P,arrowHeight:j}),w&&pV({strategy:"referenceHidden",...z})]}),[U,H]=oD(W),K=ao(_);Rr((()=>{$&&(null==K||K())}),[$,K]);const V=null===(o=B.arrow)||void 0===o?void 0:o.x,Y=null===(a=B.arrow)||void 0===a?void 0:a.y,G=0!==(null===(i=B.arrow)||void 0===i?void 0:i.centerOffset),[X,Q]=Ke();return Rr((()=>{S&&Q(window.getComputedStyle(S).zIndex)}),[S]),q("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:$?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[null===(l=B.transformOrigin)||void 0===l?void 0:l.x,null===(s=B.transformOrigin)||void 0===s?void 0:s.y].join(" ")},dir:e.dir},q(xV,{scope:c,placedSide:U,onArrowChange:N,arrowX:V,arrowY:Y,shouldHideArrow:G},q(dt.div,he({"data-side":U,"data-align":H},O,{ref:C,style:{...O.style,animation:$?void 0:"none",opacity:null!==(u=B.hide)&&void 0!==u&&u.referenceHidden?0:void 0}}))))})),SV="PopperArrow",CV={top:"bottom",right:"left",bottom:"top",left:"right"},EV=ye((function(e,t){const{__scopePopper:n,...r}=e,o=_V(SV,n),a=CV[o.placedSide];return q("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},q(gV,he({},r,{ref:t,style:{...r.style,display:"block"}})))}));function PV(e){return null!==e}const OV=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:s,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=oD(l),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(a=null===(i=u.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${g}px`,b=-f+"px"):"top"===p?(y=c?m:`${g}px`,b=`${s.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${v}px`):"left"===p&&(y=`${s.floating.width+f}px`,b=c?m:`${v}px`),{data:{x:y,y:b}}}});function oD(e){const[t,n="center"]=e.split("-");return[t,n]}const Dv=yV,_2=wV,$2=$V,RV=EV,xx="rovingFocusGroup.onEntryFocus",TV={bubbles:!1,cancelable:!0},S2="RovingFocusGroup",[K_,iD,NV]=m2(S2),[kV,Xu]=Br(S2,[NV]),[DV,AV]=kV(S2),MV=ye(((e,t)=>q(K_.Provider,{scope:e.__scopeRovingFocusGroup},q(K_.Slot,{scope:e.__scopeRovingFocusGroup},q(IV,he({},e,{ref:t})))))),IV=ye(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:s,onEntryFocus:u,...c}=e,d=Ae(null),f=Nt(t,d),p=Gp(a),[h=null,m]=si({prop:i,defaultProp:l,onChange:s}),[g,v]=Ke(!1),y=ao(u),b=iD(n),w=Ae(!1),[x,_]=Ke(0);return We((()=>{const e=d.current;if(e)return e.addEventListener(xx,y),()=>e.removeEventListener(xx,y)}),[y]),q(DV,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:h,onItemFocus:Ge((e=>m(e)),[m]),onItemShiftTab:Ge((()=>v(!0)),[]),onFocusableItemAdd:Ge((()=>_((e=>e+1))),[]),onFocusableItemRemove:Ge((()=>_((e=>e-1))),[])},q(dt.div,he({tabIndex:g||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:Xe(e.onMouseDown,(()=>{w.current=!0})),onFocus:Xe(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(xx,TV);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));aD([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:Xe(e.onBlur,(()=>v(!1)))})))})),jV="RovingFocusGroupItem",LV=ye(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,l=Co(),s=a||l,u=AV(jV,n),c=u.currentTabStopId===s,d=iD(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=u;return We((()=>{if(r)return f(),()=>p()}),[r,f,p]),q(K_.ItemSlot,{scope:n,id:s,focusable:r,active:o},q(dt.span,he({tabIndex:c?0:-1,"data-orientation":u.orientation},i,{ref:t,onMouseDown:Xe(e.onMouseDown,(e=>{r?u.onItemFocus(s):e.preventDefault()})),onFocus:Xe(e.onFocus,(()=>u.onItemFocus(s))),onKeyDown:Xe(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=BV(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=u.loop?qV(n,r+1):n.slice(r+1)}setTimeout((()=>aD(n)))}}))})))})),FV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WV(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function BV(e,t,n){const r=WV(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return FV[r]}function aD(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qV(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const C2=MV,E2=LV,Y_=["Enter"," "],zV=["ArrowDown","PageUp","Home"],sD=["ArrowUp","PageDown","End"],UV=[...zV,...sD],HV={ltr:[...Y_,"ArrowRight"],rtl:[...Y_,"ArrowLeft"]},VV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Av="Menu",[Pp,GV,KV]=m2(Av),[Jc,cD]=Br(Av,[KV,Yu,Xu]),Mv=Yu(),lD=Xu(),[uD,js]=Jc(Av),[YV,Yp]=Jc(Av),XV=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=Mv(t),[s,u]=Ke(null),c=Ae(!1),d=ao(a),f=Gp(o);return We((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),q(Dv,l,q(uD,{scope:t,open:n,onOpenChange:d,content:s,onContentChange:u},q(YV,{scope:t,onClose:Ge((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:i},r)))},dD=ye(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Mv(n);return q(_2,he({},o,r,{ref:t}))})),fD="MenuPortal",[QV,pD]=Jc(fD,{forceMount:void 0}),ZV=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=js(fD,t);return q(QV,{scope:t,forceMount:n},q(Ro,{present:n||a.open},q(sv,{asChild:!0,container:o},r)))},ai="MenuContent",[JV,P2]=Jc(ai),eG=ye(((e,t)=>{const n=pD(ai,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=js(ai,e.__scopeMenu),i=Yp(ai,e.__scopeMenu);return q(Pp.Provider,{scope:e.__scopeMenu},q(Ro,{present:r||a.open},q(Pp.Slot,{scope:e.__scopeMenu},i.modal?q(tG,he({},o,{ref:t})):q(nG,he({},o,{ref:t})))))})),tG=ye(((e,t)=>{const n=js(ai,e.__scopeMenu),r=Ae(null),o=Nt(t,r);return We((()=>{const e=r.current;if(e)return jp(e)}),[]),q(O2,he({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Xe(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),nG=ye(((e,t)=>{const n=js(ai,e.__scopeMenu);return q(O2,he({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),O2=ye(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:h,...m}=e,g=js(ai,n),v=Yp(ai,n),y=Mv(n),b=lD(n),w=GV(n),[x,_]=Ke(null),O=Ae(null),k=Nt(t,O,g.onContentChange),S=Ae(0),D=Ae(""),C=Ae(0),E=Ae(null),N=Ae("right"),M=Ae(0),P=h?Ip:As,j=h?{as:zc,allowPinchZoom:!0}:void 0;We((()=>()=>window.clearTimeout(S.current)),[]),$$();const T=Ge((e=>{var t,n;return N.current===(null===(t=E.current)||void 0===t?void 0:t.side)&&$G(e,null===(n=E.current)||void 0===n?void 0:n.area)}),[]);return q(JV,{scope:n,searchRef:D,onItemEnter:Ge((e=>{T(e)&&e.preventDefault()}),[T]),onItemLeave:Ge((e=>{var t;T(e)||(null===(t=O.current)||void 0===t||t.focus(),_(null))}),[T]),onTriggerLeave:Ge((e=>{T(e)&&e.preventDefault()}),[T]),pointerGraceTimerRef:C,onPointerGraceIntentChange:Ge((e=>{E.current=e}),[])},q(P,j,q(_$,{asChild:!0,trapped:o,onMountAutoFocus:Xe(a,(e=>{var t;e.preventDefault(),null===(t=O.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},q(av,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},q(C2,he({asChild:!0},b,{dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:_,onEntryFocus:Xe(s,(e=>{v.isUsingKeyboardRef.current||e.preventDefault()}))}),q($2,he({role:"menu","aria-orientation":"vertical","data-state":wD(g.open),"data-radix-menu-content":"",dir:v.dir},y,m,{ref:k,style:{outline:"none",...m.style},onKeyDown:Xe(m.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=D.current+e,o=w().filter((e=>!e.disabled)),a=document.activeElement,i=null===(t=o.find((e=>e.ref.current===a)))||void 0===t?void 0:t.textValue,l=xG(o.map((e=>e.textValue)),r,i),s=null===(n=o.find((e=>e.textValue===l)))||void 0===n?void 0:n.ref.current;(function e(t){D.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))})(r),s&&setTimeout((()=>s.focus()))})(e.key));const o=O.current;if(e.target!==o||!UV.includes(e.key))return;e.preventDefault();const a=w().filter((e=>!e.disabled)).map((e=>e.ref.current));sD.includes(e.key)&&a.reverse(),bG(a)})),onBlur:Xe(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),D.current="")})),onPointerMove:Xe(e.onPointerMove,Op((e=>{const t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>M.current?"right":"left";N.current=t,M.current=e.clientX}})))})))))))})),hD=ye(((e,t)=>{const{__scopeMenu:n,...r}=e;return q(dt.div,he({role:"group"},r,{ref:t}))})),rG=ye(((e,t)=>{const{__scopeMenu:n,...r}=e;return q(dt.div,he({},r,{ref:t}))})),X_="MenuItem",HO="menu.itemSelect",R2=ye(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=Ae(null),i=Yp(X_,e.__scopeMenu),l=P2(X_,e.__scopeMenu),s=Nt(t,a),u=Ae(!1);return q(mD,he({},o,{ref:s,disabled:n,onClick:Xe(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(HO,{bubbles:!0,cancelable:!0});e.addEventListener(HO,(e=>null==r?void 0:r(e)),{once:!0}),H3(e,t),t.defaultPrevented?u.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),u.current=!0},onPointerUp:Xe(e.onPointerUp,(e=>{var t;u.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:Xe(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||Y_.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),mD=ye(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=P2(X_,n),l=lD(n),s=Ae(null),u=Nt(t,s),[c,d]=Ke(!1),[f,p]=Ke("");return We((()=>{const e=s.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),q(Pp.ItemSlot,{scope:n,disabled:r,textValue:o??f},q(E2,he({asChild:!0},l,{focusable:!r}),q(dt.div,he({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:u,onPointerMove:Xe(e.onPointerMove,Op((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:Xe(e.onPointerLeave,Op((e=>i.onItemLeave(e)))),onFocus:Xe(e.onFocus,(()=>d(!0))),onBlur:Xe(e.onBlur,(()=>d(!1)))}))))})),oG=ye(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return q(vD,{scope:e.__scopeMenu,checked:n},q(R2,he({role:"menuitemcheckbox","aria-checked":Ug(n)?"mixed":n},o,{ref:t,"data-state":T2(n),onSelect:Xe(o.onSelect,(()=>null==r?void 0:r(!!Ug(n)||!n)),{checkForDefaultPrevented:!1})})))})),iG="MenuRadioGroup",[aG,sG]=Jc(iG,{value:void 0,onValueChange:()=>{}}),cG=ye(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ao(r);return q(aG,{scope:e.__scopeMenu,value:n,onValueChange:a},q(hD,he({},o,{ref:t})))})),lG="MenuRadioItem",uG=ye(((e,t)=>{const{value:n,...r}=e,o=sG(lG,e.__scopeMenu),a=n===o.value;return q(vD,{scope:e.__scopeMenu,checked:a},q(R2,he({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":T2(a),onSelect:Xe(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),gD="MenuItemIndicator",[vD,dG]=Jc(gD,{checked:!1}),fG=ye(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=dG(gD,n);return q(Ro,{present:r||Ug(a.checked)||!0===a.checked},q(dt.span,he({},o,{ref:t,"data-state":T2(a.checked)})))})),pG=ye(((e,t)=>{const{__scopeMenu:n,...r}=e;return q(dt.div,he({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),yD="MenuSub",[hG,bD]=Jc(yD),mG=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=js(yD,t),i=Mv(t),[l,s]=Ke(null),[u,c]=Ke(null),d=ao(o);return We((()=>(!1===a.open&&d(!1),()=>d(!1))),[a.open,d]),q(Dv,i,q(uD,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c},q(hG,{scope:t,contentId:Co(),triggerId:Co(),trigger:l,onTriggerChange:s},n)))},vg="MenuSubTrigger",gG=ye(((e,t)=>{const n=js(vg,e.__scopeMenu),r=Yp(vg,e.__scopeMenu),o=bD(vg,e.__scopeMenu),a=P2(vg,e.__scopeMenu),i=Ae(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:s}=a,u={__scopeMenu:e.__scopeMenu},c=Ge((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return We((()=>c),[c]),We((()=>{const e=l.current;return()=>{window.clearTimeout(e),s(null)}}),[l,s]),q(dD,he({asChild:!0},u),q(mD,he({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":wD(n.open)},e,{ref:iv(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Xe(e.onPointerMove,Op((t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:Xe(e.onPointerLeave,Op((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,i="right"===t,s=i?-5:5,u=r[i?"left":"right"],c=r[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:u,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:u,y:r.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:Xe(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!HV[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),vG="MenuSubContent",yG=ye(((e,t)=>{const n=pD(ai,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=js(ai,e.__scopeMenu),i=Yp(ai,e.__scopeMenu),l=bD(vG,e.__scopeMenu),s=Ae(null),u=Nt(t,s);return q(Pp.Provider,{scope:e.__scopeMenu},q(Ro,{present:r||a.open},q(Pp.Slot,{scope:e.__scopeMenu},q(O2,he({id:l.contentId,"aria-labelledby":l.triggerId},o,{ref:u,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=s.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Xe(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:Xe(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:Xe(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=VV[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function wD(e){return e?"open":"closed"}function Ug(e){return"indeterminate"===e}function T2(e){return Ug(e)?"indeterminate":e?"checked":"unchecked"}function bG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wG(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function xG(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=wG(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function _G(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,l=t[e].y,s=t[a].x,u=t[a].y;l>r!=u>r&&n<(s-i)*(r-l)/(u-l)+i&&(o=!o)}return o}function $G(e,t){if(!t)return!1;return _G({x:e.clientX,y:e.clientY},t)}function Op(e){return t=>"mouse"===t.pointerType?e(t):void 0}const SG=XV,CG=dD,EG=ZV,PG=eG,OG=hD,RG=rG,TG=R2,NG=oG,kG=cG,DG=uG,AG=fG,MG=pG,IG=mG,jG=gG,LG=yG,xD="DropdownMenu",[FG,Vie]=Br(xD,[cD]),Ur=cD(),[WG,_D]=FG(xD),BG=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,s=Ur(t),u=Ae(null),[c=!1,d]=si({prop:o,defaultProp:a,onChange:i});return q(WG,{scope:t,triggerId:Co(),triggerRef:u,contentId:Co(),open:c,onOpenChange:d,onOpenToggle:Ge((()=>d((e=>!e))),[d]),modal:l},q(SG,he({},s,{open:c,onOpenChange:d,dir:r,modal:l}),n))},qG="DropdownMenuTrigger",zG=ye(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=_D(qG,n),i=Ur(n);return q(CG,he({asChild:!0},i),q(dt.button,he({type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:iv(t,a.triggerRef),onPointerDown:Xe(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:Xe(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),UG=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ur(t);return q(EG,he({},r,n))},HG="DropdownMenuContent",VG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_D(HG,n),a=Ur(n),i=Ae(!1);return q(PG,he({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:Xe(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:Xe(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(i.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),GG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(OG,he({},o,r,{ref:t}))})),KG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(RG,he({},o,r,{ref:t}))})),YG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(TG,he({},o,r,{ref:t}))})),XG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(NG,he({},o,r,{ref:t}))})),QG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(kG,he({},o,r,{ref:t}))})),ZG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(DG,he({},o,r,{ref:t}))})),JG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(AG,he({},o,r,{ref:t}))})),eK=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(MG,he({},o,r,{ref:t}))})),tK=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Ur(t),[l=!1,s]=si({prop:r,defaultProp:a,onChange:o});return q(IG,he({},i,{open:l,onOpenChange:s}),n)},nK=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(jG,he({},o,r,{ref:t}))})),rK=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(LG,he({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),oK=BG,iK=zG,$D=UG,SD=VG,aK=GG,CD=KG,ED=YG,PD=XG,sK=QG,OD=ZG,cK=JG,N2=eK,lK=tK,RD=nK,TD=rK,Gie=oK,Kie=iK,Yie=aK,Xie=$D,Qie=lK,Zie=sK,uK=O.forwardRef((({className:e,inset:t,children:n,...r},o)=>D.jsxs(RD,{ref:o,className:te("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,D.jsx(v$,{className:"ml-auto h-4 w-4"})]})));uK.displayName=RD.displayName;const dK=O.forwardRef((({className:e,...t},n)=>D.jsx(TD,{ref:n,className:te("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));dK.displayName=TD.displayName;const VO=e=>{e.preventDefault()},fK=O.forwardRef((({className:e,sideOffset:t=4,isPortal:n,...r},o)=>{const a=D.jsx(SD,{ref:o,sideOffset:t,onOpenAutoFocus:VO,onCloseAutoFocus:VO,className:te("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-gray-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...r});return n?D.jsx($D,{children:a}):a}));fK.displayName=SD.displayName;const pK=O.forwardRef((({className:e,inset:t,...n},r)=>D.jsx(ED,{ref:r,className:te("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));pK.displayName=ED.displayName;const hK=O.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=D.jsx(s2,{size:"default",variant:"default",checked:n});return D.jsxs(PD,{ref:a,className:te("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&i,D.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));hK.displayName=PD.displayName;const mK=O.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=D.jsx("div",{className:"flex h-xxs items-center justify-center",children:D.jsx(cK,{children:D.jsx(nv,{size:20})})});return D.jsxs(OD,{ref:o,className:te("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&a,D.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));mK.displayName=OD.displayName;const gK=O.forwardRef((({className:e,inset:t,...n},r)=>D.jsx(CD,{ref:r,className:te("text-sm font-semibold",t&&"pl-xl",e),...n})));gK.displayName=CD.displayName;const vK=O.forwardRef((({className:e,...t},n)=>D.jsx(N2,{ref:n,className:te("-mx-1 my-1 h-px bg-muted",e),...t})));vK.displayName=N2.displayName;const yK=({className:e,...t})=>D.jsx("span",{className:te("ml-auto text-xs tracking-widest opacity-60",e),...t});yK.displayName="DropdownMenuShortcut";const bK=ye(((e,t)=>q(dt.label,he({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),ND=bK,wK=$a("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),kD=O.forwardRef((({className:e,...t},n)=>D.jsx(ND,{ref:n,className:te(wK(),e),...t})));function GO(e,[t,n]){return Math.min(n,Math.max(t,e))}kD.displayName=ND.displayName;const DD=ye(((e,t)=>q(dt.span,he({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),xK=DD,_K=[" ","Enter","ArrowUp","ArrowDown"],$K=[" ","Enter"],Iv="Select",[jv,Lv,SK]=m2(Iv),[Qu,Jie]=Br(Iv,[SK,Yu]),k2=Yu(),[CK,el]=Qu(Iv),[EK,PK]=Qu(Iv),OK=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:s,dir:u,name:c,autoComplete:d,disabled:f,required:p}=e,h=k2(t),[m,g]=Ke(null),[v,y]=Ke(null),[b,w]=Ke(!1),x=Gp(u),[_=!1,O]=si({prop:r,defaultProp:o,onChange:a}),[k,S]=si({prop:i,defaultProp:l,onChange:s}),D=Ae(null),C=!m||!!m.closest("form"),[E,N]=Ke(new Set),M=Array.from(E).map((e=>e.props.value)).join(";");return q(Dv,h,q(CK,{required:p,scope:t,trigger:m,onTriggerChange:g,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:Co(),value:k,onValueChange:S,open:_,onOpenChange:O,dir:x,triggerPointerDownPosRef:D,disabled:f},q(jv.Provider,{scope:t},q(EK,{scope:e.__scopeSelect,onNativeOptionAdd:Ge((e=>{N((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:Ge((e=>{N((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),C?q(LD,{key:M,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:k,onChange:e=>S(e.target.value),disabled:f},void 0===k?q("option",{value:""}):null,Array.from(E)):null))},RK="SelectTrigger",TK=ye(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=k2(n),i=el(RK,n),l=i.disabled||r,s=Nt(t,i.onTriggerChange),u=Lv(n),[c,d,f]=FD((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=WD(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{l||(i.onOpenChange(!0),f())};return q(_2,he({asChild:!0},a),q(dt.button,he({type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":jD(i.value)?"":void 0},o,{ref:s,onClick:Xe(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:Xe(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:Xe(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&_K.includes(e.key)&&(p(),e.preventDefault())}))})))})),NK="SelectValue",kK=ye(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,s=el(NK,n),{onValueNodeHasChildrenChange:u}=s,c=void 0!==a,d=Nt(t,s.onValueNodeChange);return Rr((()=>{u(c)}),[u,c]),q(dt.span,he({},l,{ref:d,style:{pointerEvents:"none"}}),jD(s.value)?q(As,null,i):a)})),DK=ye(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return q(dt.span,he({"aria-hidden":!0},o,{ref:t}),r||"▼")})),AK=e=>q(sv,he({asChild:!0},e)),Lu="SelectContent",MK=ye(((e,t)=>{const n=el(Lu,e.__scopeSelect),[r,o]=Ke();if(Rr((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?Bi.createPortal(q(AD,{scope:e.__scopeSelect},q(jv.Slot,{scope:e.__scopeSelect},q("div",null,e.children))),t):null}return q(IK,he({},e,{ref:t}))})),pa=10,[AD,tl]=Qu(Lu),IK=ye(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:s,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:g,...v}=e,y=el(Lu,n),[b,w]=Ke(null),[x,_]=Ke(null),O=Nt(t,(e=>w(e))),[k,S]=Ke(null),[D,C]=Ke(null),E=Lv(n),[N,M]=Ke(!1),P=Ae(!1);We((()=>{if(b)return jp(b)}),[b]),$$();const j=Ge((e=>{const[t,...n]=E().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[E,x]),T=Ge((()=>j([k,b])),[j,k,b]);We((()=>{N&&T()}),[N,T]);const{onOpenChange:A,triggerPointerDownPosRef:R}=y;We((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=R.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=R.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),R.current=null};return null!==R.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,A,R]),We((()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[A]);const[L,z]=FD((e=>{const t=E().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=WD(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),I=Ge(((e,t,n)=>{const r=!P.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(P.current=!0))}),[y.value]),F=Ge((()=>null==b?void 0:b.focus()),[b]),W=Ge(((e,t,n)=>{const r=!P.current&&!n;(void 0!==y.value&&y.value===t||r)&&C(e)}),[y.value]),$="popper"===r?KO:jK,B=$===KO?{side:l,sideOffset:s,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return q(AD,{scope:n,content:b,viewport:x,onViewportChange:_,itemRefCallback:I,selectedItem:k,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:T,selectedItemText:D,position:r,isPositioned:N,searchRef:L},q(Ip,{as:zc,allowPinchZoom:!0},q(_$,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Xe(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},q(av,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},q($,he({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},v,B,{onPlaced:()=>M(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:Xe(v.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=E().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>j(t))),e.preventDefault()}}))}))))))})),jK=ye(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=el(Lu,n),i=tl(Lu,n),[l,s]=Ke(null),[u,c]=Ke(null),d=Nt(t,(e=>c(e))),f=Lv(n),p=Ae(!1),h=Ae(!0),{viewport:m,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=i,b=Ge((()=>{if(a.trigger&&a.valueNode&&l&&u&&m&&g&&v){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,s=e.width+i,u=Math.max(s,t.width),c=window.innerWidth-pa,d=GO(a,[pa,c-u]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,s=e.width+i,u=Math.max(s,t.width),c=window.innerWidth-pa,d=GO(a,[pa,c-u]);l.style.minWidth=s+"px",l.style.right=d+"px"}const i=f(),s=window.innerHeight-2*pa,c=m.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),_=window.getComputedStyle(m),O=parseInt(_.paddingTop,10),k=parseInt(_.paddingBottom,10),S=e.top+e.height/2-pa,D=s-S,C=g.offsetHeight/2,E=h+y+(g.offsetTop+C),N=w-E;if(E<=S){const e=g===i[i.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-m.offsetTop-m.offsetHeight,n=E+Math.max(D,C+(e?k:0)+t+b);l.style.height=n+"px"}else{const e=g===i[0].ref.current;l.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?O:0)+C)+N;l.style.height=t+"px",m.scrollTop=E-S+m.offsetTop}l.style.margin=`${pa}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=s+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,a.trigger,a.valueNode,l,u,m,g,v,a.dir,r]);Rr((()=>b()),[b]);const[w,x]=Ke();Rr((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const _=Ge((e=>{e&&!0===h.current&&(b(),null==y||y(),h.current=!1)}),[b,y]);return q(LK,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_},q("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},q(dt.div,he({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),KO=ye(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=pa,...a}=e,i=k2(n);return q($2,he({},i,a,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[LK,D2]=Qu(Lu,{}),YO="SelectViewport",FK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e,o=tl(YO,n),a=D2(YO,n),i=Nt(t,o.onViewportChange),l=Ae(0);return q(As,null,q("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),q(jv.Slot,{scope:n},q(dt.div,he({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Xe(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=a;if(null!=r&&r.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*pa,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),l=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))})),WK="SelectGroup",[BK,qK]=Qu(WK),zK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Co();return q(BK,{scope:n,id:o},q(dt.div,he({role:"group","aria-labelledby":o},r,{ref:t})))})),UK="SelectLabel",HK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e,o=qK(UK,n);return q(dt.div,he({id:o.id},r,{ref:t}))})),Q_="SelectItem",[VK,MD]=Qu(Q_),GK=ye(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=el(Q_,n),s=tl(Q_,n),u=l.value===r,[c,d]=Ke(a??""),[f,p]=Ke(!1),h=Nt(t,(e=>{var t;return null===(t=s.itemRefCallback)||void 0===t?void 0:t.call(s,e,r,o)})),m=Co(),g=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return q(VK,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:Ge((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},q(jv.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},q(dt.div,he({role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},i,{ref:h,onFocus:Xe(i.onFocus,(()=>p(!0))),onBlur:Xe(i.onBlur,(()=>p(!1))),onPointerUp:Xe(i.onPointerUp,g),onPointerMove:Xe(i.onPointerMove,(e=>{var t;o?null===(t=s.onItemLeave)||void 0===t||t.call(s):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Xe(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=s.onItemLeave)||void 0===t||t.call(s))})),onKeyDown:Xe(i.onKeyDown,(e=>{var t;""!==(null===(t=s.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||($K.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),yg="SelectItemText",KK=ye(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=el(yg,n),l=tl(yg,n),s=MD(yg,n),u=PK(yg,n),[c,d]=Ke(null),f=Nt(t,(e=>d(e)),s.onItemTextChange,(e=>{var t;return null===(t=l.itemTextRefCallback)||void 0===t?void 0:t.call(l,e,s.value,s.disabled)})),p=null==c?void 0:c.textContent,h=or((()=>q("option",{key:s.value,value:s.value,disabled:s.disabled},p)),[s.disabled,s.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return Rr((()=>(m(h),()=>g(h))),[m,g,h]),q(As,null,q(dt.span,he({id:s.textId},a,{ref:f})),s.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Bi.createPortal(a.children,i.valueNode):null)})),YK="SelectItemIndicator",XK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e;return MD(YK,n).isSelected?q(dt.span,he({"aria-hidden":!0},r,{ref:t})):null})),XO="SelectScrollUpButton",QK=ye(((e,t)=>{const n=tl(XO,e.__scopeSelect),r=D2(XO,e.__scopeSelect),[o,a]=Ke(!1),i=Nt(t,r.onScrollButtonChange);return Rr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?q(ID,he({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),QO="SelectScrollDownButton",ZK=ye(((e,t)=>{const n=tl(QO,e.__scopeSelect),r=D2(QO,e.__scopeSelect),[o,a]=Ke(!1),i=Nt(t,r.onScrollButtonChange);return Rr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?q(ID,he({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),ID=ye(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=tl("SelectScrollButton",n),i=Ae(null),l=Lv(n),s=Ge((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return We((()=>()=>s()),[s]),Rr((()=>{var e;const t=l().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[l]),q(dt.div,he({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Xe(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:Xe(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:Xe(o.onPointerLeave,(()=>{s()}))}))})),JK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e;return q(dt.div,he({"aria-hidden":!0},r,{ref:t}))}));function jD(e){return""===e||void 0===e}const LD=ye(((e,t)=>{const{value:n,...r}=e,o=Ae(null),a=Nt(t,o),i=Cv(n);return We((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),q(DD,{asChild:!0},q("select",he({},r,{ref:a,defaultValue:n})))}));function FD(e){const t=ao(e),n=Ae(""),r=Ae(0),o=Ge((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=Ge((()=>{n.current="",window.clearTimeout(r.current)}),[]);return We((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function WD(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=eY(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function eY(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}LD.displayName="BubbleSelect";const BD=OK,A2=TK,qD=kK,tY=DK,nY=AK,zD=MK,rY=FK,UD=zK,HD=HK,VD=GK,oY=KK,iY=XK,GD=QK,KD=ZK,YD=JK,aY=BD,Fv=O.forwardRef((({...e},t)=>D.jsx(aY,{ref:t,...e})));Fv.displayName=BD.displayName;const XD=O.forwardRef(((e,t)=>D.jsx(UD,{ref:t,...e})));XD.displayName=UD.displayName;const M2=O.forwardRef(((e,t)=>D.jsx(qD,{ref:t,...e})));M2.displayName=qD.displayName;const I2=O.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,renderCaret:a=()=>D.jsx(rv,{size:20}),...i},l)=>D.jsxs("div",{className:"w-full",children:[D.jsxs(A2,{ref:l,className:te("flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-gray-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...i,children:[D.jsxs("div",{className:te("flex flex-1 items-center gap-xxs",{"max-w-[90%]":!!a}),children:[o&&D.jsx("span",{className:te("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),D.jsx(tY,{asChild:!0,children:a()})]}),n||r?r?D.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[D.jsx(j3,{size:16}),r]}):D.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[D.jsx(y7,{size:16}),n]}):null]})));I2.displayName="SelectTriggerWrapper";const j2=O.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>D.jsx(I2,{ref:i,className:te("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));j2.displayName=A2.displayName;const Wv=O.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a=O.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(O.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return D.jsx(nY,{children:D.jsx(zD,{ref:o,className:te("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-gray-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:D.jsx(rY,{className:te("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!a},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));Wv.displayName=zD.displayName;const QD=O.forwardRef((({className:e,...t},n)=>D.jsx(HD,{ref:n,className:te("text-sm font-medium text-gray-900",e),...t})));QD.displayName=HD.displayName;const L2=O.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=D.jsx(iY,{children:D.jsx(nv,{size:20})});return D.jsxs(VD,{ref:a,className:te("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&i,D.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:D.jsx(oY,{children:r})}),t&&"right"===n&&i]})}));L2.displayName=VD.displayName;const ZD=O.forwardRef((({className:e,...t},n)=>D.jsx(YD,{ref:n,className:te("-mx-1 my-1 h-px bg-gray-200",e),...t})));ZD.displayName=YD.displayName;const sY=({selectedValues:e=[],onRemoveValue:t})=>{const n=O.useRef(null),[r,o]=O.useState(e.length);return O.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,a=document.createElement("div");Object.assign(a.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(a);let i=0,l=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-gray-100 text-sm font-medium text-gray-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-gray-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}a.appendChild(e);const s=e.offsetWidth+4;if(!(i+s<=r))break;i+=s,l++}document.body.removeChild(a),o(Math.max(1,l))}),[e,t]),{containerRef:n,visibleCount:r}},JD=({hiddenCount:e,selectedValues:t=[],onRemoveValue:n})=>{const r=e=>{e.stopPropagation(),e.preventDefault()};return D.jsx("div",{onPointerDown:r,onMouseDown:r,onClick:r,children:D.jsxs(Fv,{name:"hidden-chips-counter",children:[D.jsx(A2,{asChild:!0,children:D.jsx("div",{children:D.jsx(FN,{text:`+${e}`})})}),D.jsx(Wv,{align:"end",className:"max-h-[250px] w-screen max-w-[300px] gap-xxxs overflow-y-auto",children:t.map((e=>{const t="string"==typeof e?e:e.value;return D.jsxs("div",{className:"flex justify-between p-xxs",onClick:e=>e.stopPropagation(),children:[D.jsx("span",{children:t}),D.jsx(ov,{size:16,className:"cursor-pointer",onClick:()=>null==n?void 0:n(t)})]},t)}))})]})})};JD.displayName="SelectHiddenChipsCounter";const cY=O.forwardRef(((e,t)=>{const{className:n,selectedValues:r=[],placeholder:o,onRemoveValue:a,icon:i,caption:l,error:s,...u}=e,{containerRef:c,visibleCount:d}=sY({selectedValues:r,onRemoveValue:a}),f=r.length-d;return D.jsx(I2,{ref:t,className:n,caption:l,error:s,icon:i,...u,children:D.jsx("div",{ref:c,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===r.length?D.jsx("span",{children:o||"Select options..."}):D.jsxs(Dq,{children:[r.slice(0,d).map((e=>{const t="string"==typeof e?e:e.value;return D.jsx(FN,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==a?void 0:a(t)},t)})),f>0&&D.jsx(JD,{hiddenCount:f,onRemoveValue:a,selectedValues:r})]})})})}));cY.displayName="SelectMultiTrigger";const lY=O.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:a,children:i,...l},s)=>{const u=n?D.jsx(y$,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):D.jsx(s2,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return D.jsxs("div",{ref:s,className:te("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},a),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...l,children:["left"===r&&u,D.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:i}),"right"===r&&u]})}));lY.displayName="SelectCheckboxItem";const uY=O.forwardRef((({className:e,...t},n)=>D.jsx(GD,{ref:n,className:te("flex cursor-default items-center justify-center py-xxs",e),...t,children:D.jsx(h7,{size:16})})));uY.displayName=GD.displayName;const dY=O.forwardRef((({className:e,...t},n)=>D.jsx(KD,{ref:n,className:te("flex cursor-default items-center justify-center p-xxs",e),...t,children:D.jsx(rv,{size:16})})));dY.displayName=KD.displayName;const fY=O.forwardRef((({className:e,children:t,...n},r)=>D.jsx("div",{ref:r,className:te("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));fY.displayName="SelectActions";const pY=O.forwardRef((({className:e,children:t,...n},r)=>D.jsx("div",{ref:r,className:te("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));pY.displayName="SelectFooter";const eae=G8,eA=O.createContext({}),tae=({...e})=>D.jsx(eA.Provider,{value:{name:e.name},children:D.jsx(K8,{...e})}),Ls=()=>{const e=O.useContext(eA),t=O.useContext(tA),n=Y8();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,a=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},tA=O.createContext({}),hY=O.forwardRef((({className:e,...t},n)=>{const r=O.useId();return D.jsx(tA.Provider,{value:{id:r},children:D.jsx("div",{ref:n,className:te("mt-[8px]",e),...t})})}));hY.displayName="FormItem";const mY=O.forwardRef((({className:e,isRequired:t,...n},r)=>{const{formItemId:o}=Ls();return D.jsxs(kD,{ref:r,className:te("mb-2 text-sm font-medium",e),htmlFor:o,...n,children:[t&&"*",n.children]})}));mY.displayName="FormLabel";const gY=O.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=Ls();return D.jsx(Ms,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));gY.displayName="FormControl";const vY=O.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=Ls();return D.jsx("p",{ref:n,id:r,className:te("text-sm text-muted-foreground",e),...t})}));vY.displayName="FormDescription";const yY=O.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=Ls(),i=o?String(null==o?void 0:o.message):t;return i?D.jsxs("p",{ref:r,id:a,className:te("flex items-start gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[D.jsx(j3,{size:16,className:"text-red-dark"})," ",i]}):null}));yY.displayName="FormMessage";const bY=O.forwardRef((({...e},t)=>{const{name:n}=Ls();return D.jsx(Fv,{ref:t,name:n,...e})}));bY.displayName="FormSelect";const wY=O.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=Ls();return D.jsx(j2,{ref:r,id:o,className:e,...n,children:t})}));wY.displayName="FormSelectTrigger";const xY=O.forwardRef(((e,t)=>D.jsx(Wv,{ref:t,...e})));xY.displayName="FormSelectContent";const _Y=O.forwardRef(((e,t)=>D.jsx(L2,{ref:t,...e})));_Y.displayName="FormSelectItem";const $Y=O.forwardRef(((e,t)=>D.jsx(XD,{ref:t,...e})));$Y.displayName="FormSelectGroup";const SY=O.forwardRef(((e,t)=>D.jsx(QD,{ref:t,...e})));SY.displayName="FormSelectLabel";const CY=O.forwardRef(((e,t)=>D.jsx(ZD,{ref:t,...e})));CY.displayName="FormSelectSeparator";const EY=O.forwardRef(((e,t)=>D.jsx(M2,{ref:t,...e})));function Or(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function F2(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>ji(e)));return function(n){const r=(null==n?void 0:n[e])||t;return or((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=ji(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,l=(null==n?void 0:n[e][a])||o,s=or((()=>i),Object.values(i));return q(l.Provider,{value:s},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const l=(null==i?void 0:i[e][a])||o,s=Ds(l);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},PY(r,...t)]}function PY(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return or((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function Rs(e){const t=Ae(e);return We((()=>{t.current=e})),or((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function nA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=OY({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=Rs(n);return[i,Ge((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function OY({defaultProp:e,onChange:t}){const n=Ke(e),[r]=n,o=Ae(r),a=Rs(t);return We((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function RY(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function TY(...e){return t=>e.forEach((e=>RY(e,t)))}function NY(...e){return Ge(TY(...e),e)}function nl(e){return e.split("-")[0]}function Xp(e){return e.split("-")[1]}function Zu(e){return["top","bottom"].includes(nl(e))?"x":"y"}function W2(e){return"y"===e?"height":"width"}function ZO(e,t,n){let{reference:r,floating:o}=e;const a=r.x+r.width/2-o.width/2,i=r.y+r.height/2-o.height/2,l=Zu(t),s=W2(l),u=r[s]/2-o[s]/2,c="x"===l;let d;switch(nl(t)){case"top":d={x:a,y:r.y-o.height};break;case"bottom":d={x:a,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:i};break;case"left":d={x:r.x-o.width,y:i};break;default:d={x:r.x,y:r.y}}switch(Xp(t)){case"start":d[l]-=u*(n&&c?-1:1);break;case"end":d[l]+=u*(n&&c?-1:1)}return d}EY.displayName="FormSelectValue";const kY=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=ZO(s,r,l),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:h,fn:m}=a[n],{x:g,y:v,data:y,reset:b}=await m({x:u,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:s,platform:i,elements:{reference:e,floating:t}});u=g??u,c=v??c,f={...f,[h]:{...f[h],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(s=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:c}=ZO(s,d,l))),n=-1)}return{x:u,y:c,placement:d,strategy:o,middlewareData:f}};function rA(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function Hg(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Rp(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=rA(p),m=l[f?"floating"===d?"reference":"floating":d],g=Hg(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),v=Hg(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...i.floating,x:r,y:o}:i.reference,offsetParent:await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),strategy:s}):i[d]);return{top:g.top-v.top+h.top,bottom:v.bottom-g.bottom+h.bottom,left:g.left-v.left+h.left,right:v.right-g.right+h.right}}const DY=Math.min,Mc=Math.max;function Z_(e,t,n){return Mc(e,DY(t,n))}const JO=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:a,placement:i,rects:l,platform:s}=t;if(null==n)return{};const u=rA(r),c={x:o,y:a},d=Zu(i),f=Xp(i),p=W2(d),h=await s.getDimensions(n),m="y"===d?"top":"left",g="y"===d?"bottom":"right",v=l.reference[p]+l.reference[d]-c[d]-l.floating[p],y=c[d]-l.reference[d],b=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=l.floating[p]);const x=v/2-y/2,_=u[m],O=w-h[p]-u[g],k=w/2-h[p]/2+x,S=Z_(_,k,O),D=("start"===f?u[m]:u[g])>0&&k!==S&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(D?k<_?_-k:O-k:0),data:{[d]:S,centerOffset:k-S}}}}),AY={left:"right",right:"left",bottom:"top",top:"bottom"};function Vg(e){return e.replace(/left|right|bottom|top/g,(e=>AY[e]))}function MY(e,t,n){void 0===n&&(n=!1);const r=Xp(e),o=Zu(e),a=W2(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Vg(i)),{main:i,cross:Vg(i)}}const IY={start:"end",end:"start"};function eR(e){return e.replace(/start|end/g,(e=>IY[e]))}const oA=["top","right","bottom","left"];oA.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const jY=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:a,initialPlacement:i,platform:l,elements:s}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=nl(r),g=[i,...d||(m!==i&&p?function(e){const t=Vg(e);return[eR(e),t,eR(t)]}(i):[Vg(i)])],v=await Rp(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&y.push(v[m]),c){const{main:e,cross:t}=MY(r,a,await(null==l.isRTL?void 0:l.isRTL(s.floating)));y.push(v[e],v[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=g[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var _;const e=null==(_=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0].placement;e&&(n=e);break}case"initialPlacement":n=i}if(r!==n)return{reset:{placement:n}}}return{}}}};function tR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nR(e){return oA.some((t=>e[t]>=0))}const LY=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=tR(await Rp(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:nR(t)}}}case"escaped":{const t=tR(await Rp(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:nR(t)}}}default:return{}}}}},FY=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=nl(n),l=Xp(n),s="x"===Zu(n),u=["left","top"].includes(i)?-1:1,c=a&&s?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function iA(e){return"x"===e?"y":"x"}const WY=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=e,u={x:n,y:r},c=await Rp(t,s),d=Zu(nl(o)),f=iA(d);let p=u[d],h=u[f];if(a){const e="y"===d?"bottom":"right";p=Z_(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";h=Z_(h+c["y"===f?"top":"left"],h,h-c[e])}const m=l.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},BY=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=e,c={x:n,y:r},d=Zu(o),f=iA(d);let p=c[d],h=c[f];const m="function"==typeof l?l({...a,placement:o}):l,g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const e="y"===d?"height":"width",t=a.reference[d]-a.floating[e]+g.mainAxis,n=a.reference[d]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var v,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(nl(o)),n=a.reference[f]-a.floating[e]+(t&&null!=(v=null==(y=i.offset)?void 0:y[f])?v:0)+(t?0:g.crossAxis),r=a.reference[f]+a.reference[e]+(t?0:null!=(b=null==(w=i.offset)?void 0:w[f])?b:0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},qY=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i,...l}=e,s=await Rp(t,l),u=nl(n),c=Xp(n);let d,f;"top"===u||"bottom"===u?(d=u,f=c===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=u,d="end"===c?"top":"bottom");const p=Mc(s.left,0),h=Mc(s.right,0),m=Mc(s.top,0),g=Mc(s.bottom,0),v={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==g?m+g:Mc(s.top,s.bottom)):s[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:Mc(s.left,s.right)):s[f])},y=await o.getDimensions(a.floating);null==i||i({...t,...v});const b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function aA(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Oa(e){if(null==e)return window;if(!aA(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qp(e){return Oa(e).getComputedStyle(e)}function ga(e){return aA(e)?"":e?(e.nodeName||"").toLowerCase():""}function sA(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Wi(e){return e instanceof Oa(e).HTMLElement}function Ts(e){return e instanceof Oa(e).Element}function B2(e){return!(typeof ShadowRoot>"u")&&(e instanceof Oa(e).ShadowRoot||e instanceof ShadowRoot)}function Bv(e){const{overflow:t,overflowX:n,overflowY:r}=Qp(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function zY(e){return["table","td","th"].includes(ga(e))}function rR(e){const t=/firefox/i.test(sA()),n=Qp(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function cA(){return!/^((?!chrome|android).)*safari/i.test(sA())}const oR=Math.min,dp=Math.max,Gg=Math.round;function va(e,t,n){var r,o,a,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let s=1,u=1;t&&Wi(e)&&(s=e.offsetWidth>0&&Gg(l.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Gg(l.height)/e.offsetHeight||1);const c=Ts(e)?Oa(e):window,d=!cA()&&n,f=(l.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/s,p=(l.top+(d&&null!=(a=null==(i=c.visualViewport)?void 0:i.offsetTop)?a:0))/u,h=l.width/s,m=l.height/u;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function _s(e){return(t=e,(t instanceof Oa(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function qv(e){return Ts(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lA(e){return va(_s(e)).left+qv(e).scrollLeft}function UY(e,t,n){const r=Wi(t),o=_s(t),a=va(e,r&&function(e){const t=va(e);return Gg(t.width)!==e.offsetWidth||Gg(t.height)!==e.offsetHeight}(t),"fixed"===n);let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==ga(t)||Bv(o))&&(i=qv(t)),Wi(t)){const e=va(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=lA(o));return{x:a.left+i.scrollLeft-l.x,y:a.top+i.scrollTop-l.y,width:a.width,height:a.height}}function uA(e){return"html"===ga(e)?e:e.assignedSlot||e.parentNode||(B2(e)?e.host:null)||_s(e)}function iR(e){return Wi(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function J_(e){const t=Oa(e);let n=iR(e);for(;n&&zY(n)&&"static"===getComputedStyle(n).position;)n=iR(n);return n&&("html"===ga(n)||"body"===ga(n)&&"static"===getComputedStyle(n).position&&!rR(n))?t:n||function(e){let t=uA(e);for(B2(t)&&(t=t.host);Wi(t)&&!["html","body"].includes(ga(t));){if(rR(t))return t;t=t.parentNode}return null}(e)||t}function aR(e){if(Wi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=va(e);return{width:t.width,height:t.height}}function dA(e){const t=uA(e);return["html","body","#document"].includes(ga(t))?e.ownerDocument.body:Wi(t)&&Bv(t)?t:dA(t)}function Kg(e,t){var n;void 0===t&&(t=[]);const r=dA(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Oa(r),i=o?[a].concat(a.visualViewport||[],Bv(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Kg(i))}function sR(e,t,n){return"viewport"===t?Hg(function(e,t){const n=Oa(e),r=_s(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=cA();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l,y:s}}(e,n)):Ts(t)?function(e,t){const n=va(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):Hg(function(e){var t;const n=_s(e),r=qv(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=dp(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=dp(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+lA(e);const s=-r.scrollTop;return"rtl"===Qp(o||n).direction&&(l+=dp(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:s}}(_s(e)))}function HY(e){const t=Kg(e),n=["absolute","fixed"].includes(Qp(e).position)&&Wi(e)?J_(e):e;return Ts(n)?t.filter((e=>Ts(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&B2(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==ga(e))):[]}const VY={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?HY(t):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=sR(t,n,o);return e.top=dp(r.top,e.top),e.right=oR(r.right,e.right),e.bottom=oR(r.bottom,e.bottom),e.left=dp(r.left,e.left),e}),sR(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Wi(n),a=_s(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==ga(n)||Bv(a))&&(i=qv(n)),Wi(n))){const e=va(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+l.x,y:t.y-i.scrollTop+l.y}},isElement:Ts,getDimensions:aR,getOffsetParent:J_,getDocumentElement:_s,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:UY(t,J_(n),r),floating:{...aR(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Qp(e).direction};function GY(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=!0,animationFrame:l=!1}=r,s=o&&!l,u=a&&!l,c=s||u?[...Ts(e)?Kg(e):[],...Kg(t)]:[];c.forEach((e=>{s&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)}));let d,f=null;if(i){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),Ts(e)&&!l&&f.observe(e),f.observe(t)}let p=l?va(e):null;return l&&function t(){const r=va(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{s&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const KY=(e,t,n)=>kY(e,t,{platform:VY,...n});var e$=typeof document<"u"?Xc:We;function t$(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!t$(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||t$(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function YY(e){const t=O.useRef(e);return e$((()=>{t.current=e})),t}function XY(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=O.useRef(null),i=O.useRef(null),l=YY(o),s=O.useRef(null),[u,c]=O.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=O.useState(t);t$(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=O.useCallback((()=>{!a.current||!i.current||KY(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&Bi.flushSync((()=>{c(e)}))}))}),[d,n,r]);e$((()=>{h.current&&p()}),[p]);const h=O.useRef(!1);e$((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=O.useCallback((()=>{if("function"==typeof s.current&&(s.current(),s.current=null),a.current&&i.current)if(l.current){const e=l.current(a.current,i.current,p);s.current=e}else p()}),[p,l]),g=O.useCallback((e=>{a.current=e,m()}),[m]),v=O.useCallback((e=>{i.current=e,m()}),[m]),y=O.useMemo((()=>({reference:a,floating:i})),[]);return O.useMemo((()=>({...u,update:p,refs:y,reference:g,floating:v})),[u,p,y,g,v])}const QY=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?JO({element:t.current,padding:n}).fn(e):{}:t?JO({element:t,padding:n}).fn(e):{}}};function ZY(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function JY(...e){return t=>e.forEach((e=>ZY(e,t)))}const fA=ye(((e,t)=>{const{children:n,...r}=e,o=ir.toArray(n),a=o.find(tX);if(a){const e=a.props.children,n=o.map((t=>t===a?ir.count(e)>1?ir.only(null):Po(e)?e.props.children:null:t));return q(n$,he({},r,{ref:t}),Po(e)?_a(e,void 0,n):null)}return q(n$,he({},r,{ref:t}),n)}));fA.displayName="Slot";const n$=ye(((e,t)=>{const{children:n,...r}=e;return Po(n)?_a(n,{...nX(r,n.props),ref:JY(t,n.ref)}):ir.count(n)>1?ir.only(null):null}));n$.displayName="SlotClone";const eX=({children:e})=>q(As,null,e);function tX(e){return Po(e)&&e.type===eX}function nX(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const rX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ns=rX.reduce(((e,t)=>{const n=ye(((e,n)=>{const{asChild:r,...o}=e,a=r?fA:t;return We((()=>{window[Symbol.for("radix-ui")]=!0}),[]),q(a,he({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function oX(e,t){e&&Bi.flushSync((()=>e.dispatchEvent(t)))}function iX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function aX(...e){return t=>e.forEach((e=>iX(e,t)))}function pA(...e){return Ge(aX(...e),e)}const ws=null!=globalThis&&globalThis.document?Xc:()=>{};function sX(e){const[t,n]=Ke(void 0);return ws((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const hA="Popper",[q2,zv]=F2(hA),[cX,mA]=q2(hA),lX=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Ke(null);return q(cX,{scope:t,anchor:r,onAnchorChange:o},n)},uX="PopperAnchor",dX=ye(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=mA(uX,n),i=Ae(null),l=pA(t,i);return We((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:q(Ns.div,he({},o,{ref:l}))})),Yg="PopperContent",[fX,nae]=q2(Yg),[pX,hX]=q2(Yg,{hasParent:!1,positionUpdateFns:new Set}),mX=ye(((e,t)=>{var n,r,o,a,i,l,s,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,..._}=e,O=mA(Yg,c),[k,S]=Ke(null),D=pA(t,(e=>S(e))),[C,E]=Ke(null),N=sX(C),M=null!==(n=null==N?void 0:N.width)&&void 0!==n?n:0,P=null!==(r=null==N?void 0:N.height)&&void 0!==r?r:0,j=d+("center"!==p?"-"+p:""),T="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},A=Array.isArray(g)?g:[g],R=A.length>0,L={padding:T,boundary:A.filter(vX),altBoundary:R},{reference:z,floating:I,strategy:F,x:W,y:$,placement:B,middlewareData:U,update:H}=XY({strategy:"fixed",placement:j,whileElementsMounted:GY,middleware:[yX(),FY({mainAxis:f+P,alignmentAxis:h}),w?WY({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?BY():void 0,...L}):void 0,C?QY({element:C,padding:m}):void 0,w?jY({...L}):void 0,qY({...L,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),bX({arrowWidth:M,arrowHeight:P}),b?LY({strategy:"referenceHidden"}):void 0].filter(gX)});ws((()=>{z(O.anchor)}),[z,O.anchor]);const K=null!==W&&null!==$,[V,Y]=gA(B),G=Rs(x);ws((()=>{K&&(null==G||G())}),[K,G]);const X=null===(o=U.arrow)||void 0===o?void 0:o.x,Q=null===(a=U.arrow)||void 0===a?void 0:a.y,Z=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[J,ee]=Ke();ws((()=>{k&&ee(window.getComputedStyle(k).zIndex)}),[k]);const{hasParent:te,positionUpdateFns:ne}=hX(Yg,c),re=!te;Xc((()=>{if(!re)return ne.add(H),()=>{ne.delete(H)}}),[re,ne,H]),ws((()=>{re&&K&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,K,ne]);const oe={"data-side":V,"data-align":Y,..._,ref:D,style:{..._.style,animation:K?void 0:"none",opacity:null!==(l=U.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return q("div",{ref:I,"data-radix-popper-content-wrapper":"",style:{position:F,left:0,top:0,transform:K?`translate3d(${Math.round(W)}px, ${Math.round($)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(s=U.transformOrigin)||void 0===s?void 0:s.x,null===(u=U.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},q(fX,{scope:c,placedSide:V,onArrowChange:E,arrowX:X,arrowY:Q,shouldHideArrow:Z},re?q(pX,{scope:c,hasParent:!0,positionUpdateFns:ne},q(Ns.div,oe)):q(Ns.div,oe)))}));function gX(e){return void 0!==e}function vX(e){return null!==e}const yX=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),bX=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:s,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=gA(l),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(a=null===(i=u.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${g}px`,b=-f+"px"):"top"===p?(y=c?m:`${g}px`,b=`${s.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${v}px`):"left"===p&&(y=`${s.floating.width+f}px`,b=c?m:`${v}px`),{data:{x:y,y:b}}}});function gA(e){const[t,n="center"]=e.split("-");return[t,n]}const vA=lX,z2=dX,yA=mX,bA=ye(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?w$.createPortal(q(Ns.div,he({},o,{ref:t})),r):null}));function wX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function xX(...e){return t=>e.forEach((e=>wX(e,t)))}function _X(...e){return Ge(xX(...e),e)}function $X(e,t){return k3(((e,n)=>t[e][n]??e),e)}const Zp=e=>{const{present:t,children:n}=e,r=SX(t),o="function"==typeof n?n({present:r.isPresent}):ir.only(n),a=_X(r.ref,o.ref);return"function"==typeof n||r.isPresent?_a(o,{ref:a}):null};function SX(e){const[t,n]=Ke(),r=Ae({}),o=Ae(e),a=Ae("none"),i=e?"mounted":"unmounted",[l,s]=$X(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return We((()=>{const e=bg(r.current);a.current="mounted"===l?e:"none"}),[l]),ws((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=bg(t);e?s("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?s("UNMOUNT"):s(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,s]),ws((()=>{if(t){const e=e=>{const n=bg(r.current).includes(e.animationName);e.target===t&&n&&Bi.flushSync((()=>s("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=bg(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:Ge((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function bg(e){return(null==e?void 0:e.animationName)||"none"}function CX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function EX(...e){return t=>e.forEach((e=>CX(e,t)))}function PX(...e){return Ge(EX(...e),e)}function OX(e,t=(null==globalThis?void 0:globalThis.document)){const n=Rs(e);We((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}Zp.displayName="Presence";const r$="dismissableLayer.update",RX="dismissableLayer.pointerDownOutside",TX="dismissableLayer.focusOutside";let cR;const NX=ji({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wA=ye(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...u}=e,c=Ds(NX),[d,f]=Ke(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=Ke({}),m=PX(t,(e=>f(e))),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=kX((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==s||s())}),p),O=DX((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==l||l(e),e.defaultPrevented||null==s||s())}),p);return OX((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),We((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(cR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),lR(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=cR)}}),[d,p,r,c]),We((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),lR())}),[d,c]),We((()=>{const e=()=>h({});return document.addEventListener(r$,e),()=>document.removeEventListener(r$,e)}),[]),q(Ns.div,he({},u,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Or(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Or(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Or(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function kX(e,t=(null==globalThis?void 0:globalThis.document)){const n=Rs(e),r=Ae(!1),o=Ae((()=>{}));return We((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){xA(RX,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function DX(e,t=(null==globalThis?void 0:globalThis.document)){const n=Rs(e),r=Ae(!1);return We((()=>{const e=e=>{e.target&&!r.current&&xA(TX,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lR(){const e=new CustomEvent(r$);document.dispatchEvent(e)}function xA(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?oX(o,a):o.dispatchEvent(a)}let _x;const _A="HoverCard",[$A,rae]=F2(_A,[zv]),U2=zv(),[AX,Uv]=$A(_A),MX=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,s=U2(t),u=Ae(0),c=Ae(0),d=Ae(!1),f=Ae(!1),[p=!1,h]=nA({prop:r,defaultProp:o,onChange:a}),m=Ge((()=>{clearTimeout(c.current),u.current=window.setTimeout((()=>h(!0)),i)}),[i,h]),g=Ge((()=>{clearTimeout(u.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>h(!1)),l))}),[l,h]),v=Ge((()=>h(!1)),[h]);return We((()=>()=>{clearTimeout(u.current),clearTimeout(c.current)}),[]),q(AX,{scope:t,open:p,onOpenChange:h,onOpen:m,onClose:g,onDismiss:v,hasSelectionRef:d,isPointerDownOnContentRef:f},q(vA,s,n))},IX="HoverCardTrigger",jX=ye(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Uv(IX,n),a=U2(n);return q(z2,he({asChild:!0},a),q(Ns.a,he({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:Or(e.onPointerEnter,Xg(o.onOpen)),onPointerLeave:Or(e.onPointerLeave,Xg(o.onClose)),onFocus:Or(e.onFocus,o.onOpen),onBlur:Or(e.onBlur,o.onClose),onTouchStart:Or(e.onTouchStart,(e=>e.preventDefault()))})))})),SA="HoverCardPortal",[LX,FX]=$A(SA,{forceMount:void 0}),WX=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Uv(SA,t);return q(LX,{scope:t,forceMount:n},q(Zp,{present:n||a.open},q(bA,{asChild:!0,container:o},r)))},o$="HoverCardContent",BX=ye(((e,t)=>{const n=FX(o$,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Uv(o$,e.__scopeHoverCard);return q(Zp,{present:r||a.open},q(qX,he({"data-state":a.open?"open":"closed"},o,{onPointerEnter:Or(e.onPointerEnter,Xg(a.onOpen)),onPointerLeave:Or(e.onPointerLeave,Xg(a.onClose)),ref:t})))})),qX=ye(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...l}=e,s=Uv(o$,n),u=U2(n),c=Ae(null),d=NY(t,c),[f,p]=Ke(!1);return We((()=>{if(f){const e=document.body;return _x=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=_x,e.style.webkitUserSelect=_x}}}),[f]),We((()=>{if(c.current){const e=()=>{p(!1),s.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(s.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),s.hasSelectionRef.current=!1,s.isPointerDownOnContentRef.current=!1}}}),[s.isPointerDownOnContentRef,s.hasSelectionRef]),We((()=>{c.current&&zX(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),q(wA,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Or(a,(e=>{e.preventDefault()})),onDismiss:s.onDismiss},q(yA,he({},u,l,{onPointerDown:Or(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),s.hasSelectionRef.current=!1,s.isPointerDownOnContentRef.current=!0})),ref:d,style:{...l.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function Xg(e){return t=>"touch"===t.pointerType?void 0:e()}function zX(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const UX=MX,HX=jX,VX=WX,CA=BX,oae=UX,iae=HX,aae=VX,GX=O.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>D.jsx(CA,{ref:o,align:t,sideOffset:n,className:te("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));GX.displayName=CA.displayName;const Wc=O.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=Ls();return D.jsx("input",{type:t,title:n.disabled?"Disabled":"",className:te("flex w-full rounded-m px-s py-3.5 text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-gray-400 placeholder:text-muted-foreground focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 enabled:hover:outline-2 enabled:hover:outline-gray-400 disabled:bg-transparent disabled:text-gray-300 disabled:outline-gray-200 disabled:ring-0 disabled:ring-transparent disabled:placeholder:text-gray-300",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));function KX(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>O.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return O.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=O.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,s=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=O.useMemo((()=>l),Object.values(l));return D.jsx(s.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const s=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,u=O.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},YX(r,...t)]}function YX(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return O.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function uR(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function XX(...e){return t=>{let n=!1;const r=e.map((e=>{const r=uR(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():uR(e[t],null)}}}}function QX(e){const t=ZX(e),n=O.forwardRef(((e,n)=>{const{children:r,...o}=e,a=O.Children.toArray(r),i=a.find(eQ);if(i){const e=i.props.children,r=a.map((t=>t===i?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t));return D.jsx(t,{...o,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return D.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function ZX(e){const t=O.forwardRef(((e,t)=>{const{children:n,...r}=e;if(O.isValidElement(n)){const e=nQ(n),o=tQ(r,n.props);return n.type!==O.Fragment&&(o.ref=t?XX(t,e):e),O.cloneElement(n,o)}return O.Children.count(n)>1?O.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}Wc.displayName="Input";var JX=Symbol("radix.slottable");function eQ(e){return O.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===JX}function tQ(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function nQ(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var rQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],EA=rQ.reduce(((e,t)=>{const n=QX(`Primitive.${t}`),r=O.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),H2="Progress",V2=100,[oQ,sae]=KX(H2),[iQ,aQ]=oQ(H2),PA=O.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=sQ,...i}=e;(o||0===o)&&!dR(o)&&console.error(cQ(`${o}`,"Progress"));const l=dR(o)?o:V2;null!==r&&!fR(r,l)&&console.error(lQ(`${r}`,"Progress"));const s=fR(r,l)?r:null,u=Qg(s)?a(s,l):void 0;return D.jsx(iQ,{scope:n,value:s,max:l,children:D.jsx(EA.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Qg(s)?s:void 0,"aria-valuetext":u,role:"progressbar","data-state":TA(s,l),"data-value":s??void 0,"data-max":l,...i,ref:t})})}));PA.displayName=H2;var OA="ProgressIndicator",RA=O.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=aQ(OA,n);return D.jsx(EA.div,{"data-state":TA(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function sQ(e,t){return`${Math.round(e/t*100)}%`}function TA(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Qg(e){return"number"==typeof e}function dR(e){return Qg(e)&&!isNaN(e)&&e>0}function fR(e,t){return Qg(e)&&!isNaN(e)&&e<=t&&e>=0}function cQ(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${V2}\`.`}function lQ(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${V2} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}RA.displayName=OA;var NA=PA,uQ=RA;const dQ=O.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>D.jsx(NA,{ref:o,className:te("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:D.jsx(uQ,{className:te("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));dQ.displayName=NA.displayName;const kA="Radio",[fQ,DA]=Br(kA),[pQ,hQ]=fQ(kA),mQ=ye(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:s,...u}=e,[c,d]=Ke(null),f=Nt(t,(e=>d(e))),p=Ae(!1),h=!c||!!c.closest("form");return q(pQ,{scope:n,checked:o,disabled:i},q(dt.button,he({type:"button",role:"radio","aria-checked":o,"data-state":AA(o),"data-disabled":i?"":void 0,disabled:i,value:l},u,{ref:f,onClick:Xe(e.onClick,(e=>{o||null==s||s(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&q(yQ,{control:c,bubbles:!p.current,name:r,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),gQ="RadioIndicator",vQ=ye(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=hQ(gQ,n);return q(Ro,{present:r||a.checked},q(dt.span,he({"data-state":AA(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),yQ=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=Cv(n),l=Ev(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),q("input",he({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function AA(e){return e?"checked":"unchecked"}const bQ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],MA="RadioGroup",[wQ,cae]=Br(MA,[Xu,DA]),IA=Xu(),jA=DA(),[xQ,_Q]=wQ(MA),$Q=ye(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:s,dir:u,loop:c=!0,onValueChange:d,...f}=e,p=IA(n),h=Gp(u),[m,g]=si({prop:a,defaultProp:o,onChange:d});return q(xQ,{scope:n,name:r,required:i,disabled:l,value:m,onValueChange:g},q(C2,he({asChild:!0},p,{orientation:s,dir:h,loop:c}),q(dt.div,he({role:"radiogroup","aria-required":i,"aria-orientation":s,"data-disabled":l?"":void 0,dir:h},f,{ref:t}))))})),SQ="RadioGroupItem",CQ=ye(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=_Q(SQ,n),i=a.disabled||r,l=IA(n),s=jA(n),u=Ae(null),c=Nt(t,u),d=a.value===o.value,f=Ae(!1);return We((()=>{const e=e=>{bQ.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),q(E2,he({asChild:!0},l,{focusable:!i,active:d}),q(mQ,he({disabled:i,required:a.required,checked:d},s,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:Xe((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Xe(o.onFocus,(()=>{var e;f.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),EQ=ye(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=jA(n);return q(vQ,he({},o,r,{ref:t}))})),LA=$Q,FA=CQ,PQ=EQ,OQ=O.forwardRef((({className:e,...t},n)=>D.jsx(LA,{className:te("grid gap-2",e),...t,ref:n})));OQ.displayName=LA.displayName;const RQ=O.forwardRef((({className:e,...t},n)=>D.jsx(FA,{ref:n,className:te("aspect-square size-6 rounded-full border border-gray-300 disabled:cursor-not-allowed disabled:border-gray-100 disabled:bg-gray-100","data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 hover:data-[state=checked]:border-blue_120","disabled:data-[state=checked]:border-gray-100 disabled:data-[state=checked]:bg-gray-100","transition-[border] duration-200 hover:data-[state=checked]:bg-blue_120 md:hover:border-2",e),...t,children:D.jsx(PQ,{className:"flex items-center justify-center",children:D.jsx(g7,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--gray-300)":"white",color:t.disabled?"var(--gray-300)":"white"}})})})));RQ.displayName=FA.displayName;const TQ=lv,lae=P$,uae=Uu,NQ=uv,WA=O.forwardRef((({className:e,...t},n)=>D.jsx(qu,{className:te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));WA.displayName=qu.displayName;const kQ=$a("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),BA=O.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>D.jsxs(NQ,{children:[D.jsx(WA,{className:te("bg-gray-900/70",n)}),D.jsxs(zu,{ref:a,className:te(kQ({side:e}),t),...o,children:[r,D.jsxs(Uu,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[D.jsx(ov,{className:"h-4 w-4"}),D.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));BA.displayName=zu.displayName;const qA=({className:e,...t})=>D.jsx("div",{className:te("flex flex-col space-y-2 text-center sm:text-left",e),...t});qA.displayName="SheetHeader";const DQ=({className:e,...t})=>D.jsx("div",{className:te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DQ.displayName="SheetFooter";const zA=O.forwardRef((({className:e,...t},n)=>D.jsx(Lp,{ref:n,className:te("text-lg font-semibold text-foreground",e),...t})));zA.displayName=Lp.displayName;const UA=O.forwardRef((({className:e,...t},n)=>D.jsx(Fp,{ref:n,className:te("text-sm text-muted-foreground",e),...t})));UA.displayName=Fp.displayName;const[Hv,dae]=Br("Tooltip",[Yu]),Vv=Yu(),AQ="TooltipProvider",MQ=700,i$="tooltip.open",[IQ,G2]=Hv(AQ),HA=e=>{const{__scopeTooltip:t,delayDuration:n=MQ,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,l]=Ke(!0),s=Ae(!1),u=Ae(0);return We((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),q(IQ,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:Ge((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:Ge((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:s,onPointerInTransitChange:Ge((e=>{s.current=e}),[]),disableHoverableContent:o},a)},K2="Tooltip",[jQ,Jp]=Hv(K2),VA=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,s=G2(K2,e.__scopeTooltip),u=Vv(t),[c,d]=Ke(null),f=Co(),p=Ae(0),h=i??s.disableHoverableContent,m=l??s.delayDuration,g=Ae(!1),[v=!1,y]=si({prop:r,defaultProp:o,onChange:e=>{e?(s.onOpen(),document.dispatchEvent(new CustomEvent(i$))):s.onClose(),null==a||a(e)}}),b=or((()=>v?g.current?"delayed-open":"instant-open":"closed"),[v]),w=Ge((()=>{window.clearTimeout(p.current),g.current=!1,y(!0)}),[y]),x=Ge((()=>{window.clearTimeout(p.current),y(!1)}),[y]),_=Ge((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{g.current=!0,y(!0)}),m)}),[m,y]);return We((()=>()=>window.clearTimeout(p.current)),[]),q(Dv,u,q(jQ,{scope:t,contentId:f,open:v,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:Ge((()=>{s.isOpenDelayed?_():w()}),[s.isOpenDelayed,_,w]),onTriggerLeave:Ge((()=>{h?x():window.clearTimeout(p.current)}),[x,h]),onOpen:w,onClose:x,disableHoverableContent:h},n))},pR="TooltipTrigger",GA=ye(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jp(pR,n),a=G2(pR,n),i=Vv(n),l=Nt(t,Ae(null),o.onTriggerChange),s=Ae(!1),u=Ae(!1),c=Ge((()=>s.current=!1),[]);return We((()=>()=>document.removeEventListener("pointerup",c)),[c]),q(_2,he({asChild:!0},i),q(dt.button,he({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:Xe(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)})),onPointerLeave:Xe(e.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:Xe(e.onPointerDown,(()=>{s.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:Xe(e.onFocus,(()=>{s.current||o.onOpen()})),onBlur:Xe(e.onBlur,o.onClose),onClick:Xe(e.onClick,o.onClose)})))})),KA="TooltipPortal",[LQ,FQ]=Hv(KA,{forceMount:void 0}),WQ=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Jp(KA,t);return q(LQ,{scope:t,forceMount:n},q(Ro,{present:n||a.open},q(sv,{asChild:!0,container:o},r)))},Tp="TooltipContent",YA=ye(((e,t)=>{const n=FQ(Tp,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Jp(Tp,e.__scopeTooltip);return q(Ro,{present:r||i.open},i.disableHoverableContent?q(XA,he({side:o},a,{ref:t})):q(BQ,he({side:o},a,{ref:t})))})),BQ=ye(((e,t)=>{const n=Jp(Tp,e.__scopeTooltip),r=G2(Tp,e.__scopeTooltip),o=Ae(null),a=Nt(t,o),[i,l]=Ke(null),{trigger:s,onClose:u}=n,c=o.current,{onPointerInTransitChange:d}=r,f=Ge((()=>{l(null),d(!1)}),[d]),p=Ge(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=XQ([...GQ(r,VQ(r,n.getBoundingClientRect())),...KQ(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return We((()=>()=>f()),[f]),We((()=>{if(s&&c){const e=e=>p(e,c),t=e=>p(e,s);return s.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{s.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[s,c,p,f]),We((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==s?void 0:s.contains(t))||(null==c?void 0:c.contains(t)),o=!YQ(n,i);r?f():o&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[s,c,i,u,f]),q(XA,he({},e,{ref:a}))})),[qQ,zQ]=Hv(K2,{isInside:!1}),XA=ye(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,s=Jp(Tp,n),u=Vv(n),{onClose:c}=s;return We((()=>(document.addEventListener(i$,c),()=>document.removeEventListener(i$,c))),[c]),We((()=>{if(s.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(s.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[s.trigger,c]),q(av,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},q($2,he({"data-state":s.stateAttribute},u,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),q(x$,null,r),q(qQ,{scope:n,isInside:!0},q(xK,{id:s.contentId,role:"tooltip"},o||r))))})),UQ="TooltipArrow",HQ=ye(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vv(n);return zQ(UQ,n).isInside?null:q(RV,he({},o,r,{ref:t}))}));function VQ(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function GQ(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function KQ(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function YQ(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,l=t[e].y,s=t[a].x,u=t[a].y;l>r!=u>r&&n<(s-i)*(r-l)/(u-l)+i&&(o=!o)}return o}function XQ(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),QQ(t)}function QQ(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const ZQ=HA,JQ=VA,eZ=GA,tZ=WQ,QA=YA,nZ=HQ,ZA=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},rZ=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},oZ=e=>rZ(e)&&"type"in e&&"string"==typeof e.type,xt=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>oZ(t)&&t.type===e,t};xt("remoteReady"),xt("askLogin"),xt("reselectUser"),xt("requestLogout"),xt("setConfirmLeavePage"),xt("requestChangePath"),xt("wsSubscribe"),xt("wsUnSubscribe"),xt("hostStoreConnect"),xt("remoteLogin"),xt("remoteLogout"),xt("wsOnMessage"),xt("setRouterPath");const JA=xt("setDeviceType"),eM=xt("setDeviceWidth");xt("setUserError"),xt("setUserIsError"),xt("setUserPending"),xt("setUserSuccess"),xt("setUserData"),xt("updateAccountData"),xt("updateUser"),xt("addNotification"),xt("markNotification"),xt("setNotificationsError"),xt("setNotificationsList"),xt("setNotificationsPending"),xt("setNotificationsTotalCount"),xt("setNotificationsUnreadCount"),xt("acceptAllFollowRequests"),xt("resetNotificationsState"),xt("undoNotification"),xt("setInstanceInfo"),xt("setInstanceInfoPending"),xt("setInstanceInfoError"),xt("setPlatformSettings"),xt("setProfileSettings"),xt("setGroupData"),xt("setGroupLoading"),xt("requestLocalStorageGet"),xt("requestLocalStorageSet"),xt("requestLocalStorageRemove"),xt("requestLocalStorageClear"),xt("requestLocalStorageKeys"),xt("requestLocalStorageHas"),xt("sendLocalStorageResponse"),xt("sendLocalStorageChanged");const fp="8.48.0",xa=globalThis;function Y2(e,t,n){const r=xa,o=r.__SENTRY__=r.__SENTRY__||{},a=o[fp]=o[fp]||{};return a[e]||(a[e]=t())}const tM=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,iZ="Sentry Logger ",hR=["debug","info","warn","error","log","assert","trace"],mR={};function aZ(e){if(!("console"in xa))return e();const t=xa.console,n={},r=Object.keys(mR);r.forEach((e=>{const r=mR[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function sZ(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return tM?hR.forEach((n=>{t[n]=(...t)=>{e&&aZ((()=>{xa.console[n](`${iZ}[${n}]:`,...t)}))}})):hR.forEach((e=>{t[e]=()=>{}})),t}const Pg=Y2("logger",sZ);function X2(){return Q2(xa),xa}function Q2(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||fp,t[fp]=t[fp]||{}}const cZ=Object.prototype.toString;function lZ(e,t){return cZ.call(e)===`[object ${t}]`}function uZ(e){return lZ(e,"Object")}function dZ(e){return!(!e||!e.then||"function"!=typeof e.then)}function fZ(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{tM&&Pg.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const nM=1e3;function rM(){return Date.now()/nM}function pZ(){const{performance:e}=xa;if(!e||!e.now)return rM;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/nM}const hZ=pZ();function Ru(){const e=xa,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function mZ(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||hZ(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ru()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function gR(){return Ru()}function vR(){return Ru().substring(16)}function oM(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=oM(r[e],t[e],n-1));return r}(()=>{const{performance:e}=xa;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=o<t,i=e.timing&&e.timing.navigationStart,l="number"==typeof i?Math.abs(i+n-r):t;(a||l<t)&&(o<=l&&e.timeOrigin)})();const a$="_sentrySpan";function yR(e,t){t?fZ(e,a$,t):delete e[a$]}function bR(e){return e[a$]}const gZ=100;class Z2{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:gR(),spanId:vR()}}clone(){const e=new Z2;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,yR(e,bR(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&mZ(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof Np?[t.getScopeData(),t.getRequestSession()]:uZ(t)?[e,e.requestSession]:[],{tags:o,extra:a,user:i,contexts:l,level:s,fingerprint:u=[],propagationContext:c}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...a},this._contexts={...this._contexts,...l},i&&Object.keys(i).length&&(this._user=i),s&&(this._level=s),u.length&&(this._fingerprint=u),c&&(this._propagationContext=c),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,yR(this,void 0),this._attachments=[],this.setPropagationContext({traceId:gR()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:gZ;if(n<=0)return this;const r={timestamp:rM(),...e},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:bR(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=oM(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:vR(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Ru();if(!this._client)return Pg.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Ru();if(!this._client)return Pg.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Ru();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Pg.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Np=Z2;function vZ(){return Y2("defaultCurrentScope",(()=>new Np))}function yZ(){return Y2("defaultIsolationScope",(()=>new Np))}class bZ{constructor(e,t){let n,r;n=e||new Np,r=t||new Np,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return dZ(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Fu(){const e=Q2(X2());return e.stack=e.stack||new bZ(vZ(),yZ())}function wZ(e){return Fu().withScope(e)}function xZ(e,t){const n=Fu();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function wR(e){return Fu().withScope((()=>e(Fu().getIsolationScope())))}function _Z(){return{withIsolationScope:wR,withScope:wZ,withSetScope:xZ,withSetIsolationScope:(e,t)=>wR(t),getCurrentScope:()=>Fu().getScope(),getIsolationScope:()=>Fu().getIsolationScope()}}function iM(e){const t=Q2(e);return t.acs?t.acs:_Z()}function aM(){return iM(X2()).getCurrentScope()}function $Z(){return iM(X2()).getIsolationScope()}function SZ(e,t){return aM().captureException(e,void 0)}function CZ(e,t){const n={captureContext:t};return aM().captureMessage(e,void 0,n)}function EZ(e,t){$Z().setExtra(e,t)}const PZ=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return EZ("exceptionMessage",t),void SZ(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}CZ(t)},OZ=()=>"object"!=typeof window,RZ="wlsy",sM=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},TZ=()=>{const e=new Set,t=sM();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const r=null==t?void 0:t.key(n);"string"==typeof r&&e.add(r)}return Array.from(e)},NZ=e=>{const t=`${RZ}`,n=e=>`${t}:${e}`,r=()=>TZ().filter((e=>e.startsWith(`${t}:`))),o=e=>e.slice(t.length+1),a=sM(),i=e=>{try{return null==a?void 0:a.getItem(n(e))}catch{return null}},l=(e,t)=>{try{null==a||a.setItem(n(e),String(t))}catch{return}};return{getItem:i,setItem:l,removeItem:e=>{try{null==a||a.removeItem(n(e))}catch{return}},clear:()=>{try{r().forEach((e=>null==a?void 0:a.removeItem(e)))}catch{return}},keys:()=>r().map(o),has:e=>null!==i(e),getJSON:e=>{const t=i(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{l(e,JSON.stringify(t))}catch{return}}}},xR=["debug","info","warn","error"],kZ=(e,t)=>{const n=xR.indexOf(e);return xR.indexOf(t)>=n},wg=(e,t,n,...r)=>{kZ(t,e)&&console.log(`[${e}] ${n}`,...r)},DZ=()=>NZ().getItem("logger_lvl"),AZ=(e=(OZ()?"info":DZ()||"warn"))=>{let t=e;return{debug:(e,...n)=>wg("debug",t,e,...n),info:(e,...n)=>wg("info",t,e,...n),warn:(e,...n)=>wg("warn",t,e,...n),error:(e,...n)=>(PZ(e,...n),wg("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}};AZ(),D3("requestMicroFrontendFetch"),D3("sendMicroFrontendFetchResponse");const MZ={deviceType:ZA(),deviceWidth:window.innerWidth},Gv=X8({name:"ui",initialState:MZ,reducers:{},extraReducers:e=>{e.addCase(JA,((e,{payload:t})=>{e.deviceType=t})),e.addCase(eM,((e,{payload:t})=>{e.deviceWidth=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectDeviceWidth:e=>e.deviceWidth,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var $x,_R,Sx,$R,Cx,SR,Ex,CR,Px,ER,Ox,PR,Rx,OR,Tx,RR,Nx,TR,kx,NR,Dx,kR,Ax,DR,Mx,AR,Ix,MR,jx,IR,Lx,jR,Fx,LR,Wx,FR,Bx,WR,qx,BR,zx,qR,Ux,zR,Hx,UR,Vx,HR,Gx,VR,Kx,GR,Yx,KR,Xx,YR,Qx,XR,Zx,QR,Jx,ZR,e_,JR,t_,e3,n_,t3,r_,n3,o_,r3,i_,o3,a_,i3,s_,a3,c_,s3,l_,c3;function cM(){if(_R)return $x;_R=1;var e=fN(),t=e&&new e;return $x=t}function lM(){if($R)return Sx;$R=1;var e=Hp(),t=cM();return Sx=t?function(e,n){return t.set(e,n),e}:e}function Kv(){if(SR)return Cx;SR=1;var e=Sv(),t=Go();return Cx=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),a=n.apply(o,r);return t(a)?a:o}},Cx}function IZ(){if(CR)return Ex;CR=1;var e=Kv(),t=zr();return Ex=function(n,r,o){var a=1&r,i=e(n);return function e(){return(this&&this!==t&&this instanceof e?i:n).apply(a?o:this,arguments)}},Ex}function uM(){if(ER)return Px;ER=1;var e=Math.max;return Px=function(t,n,r,o){for(var a=-1,i=t.length,l=r.length,s=-1,u=n.length,c=e(i-l,0),d=Array(u+c),f=!o;++s<u;)d[s]=n[s];for(;++a<l;)(f||a<i)&&(d[r[a]]=t[a]);for(;c--;)d[s++]=t[a++];return d}}function dM(){if(PR)return Ox;PR=1;var e=Math.max;return Ox=function(t,n,r,o){for(var a=-1,i=t.length,l=-1,s=r.length,u=-1,c=n.length,d=e(i-s,0),f=Array(d+c),p=!o;++a<d;)f[a]=t[a];for(var h=a;++u<c;)f[h+u]=n[u];for(;++l<s;)(p||a<i)&&(f[h+r[l]]=t[a++]);return f}}function jZ(){if(OR)return Rx;return OR=1,Rx=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function J2(){if(RR)return Tx;return RR=1,Tx=function(){}}function eS(){if(TR)return Nx;TR=1;var e=Sv(),t=J2();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,Nx=n}function fM(){if(NR)return kx;NR=1;var e=cM(),t=vN();return kx=e?function(t){return e.get(t)}:t}function LZ(){if(kR)return Dx;kR=1;return Dx={}}function FZ(){if(DR)return Ax;DR=1;var e=LZ(),t=Object.prototype.hasOwnProperty;return Ax=function(n){for(var r=n.name+"",o=e[r],a=t.call(e,r)?o.length:0;a--;){var i=o[a],l=i.func;if(null==l||l==n)return i.name}return r}}function pM(){if(AR)return Mx;AR=1;var e=Sv(),t=J2();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,Mx=n}function WZ(){if(MR)return Ix;MR=1;var e=eS(),t=pM(),n=$v();return Ix=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function BZ(){if(IR)return jx;IR=1;var e=eS(),t=pM(),n=J2(),r=qr(),o=To(),a=WZ(),i=Object.prototype.hasOwnProperty;function l(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(i.call(n,"__wrapped__"))return a(n)}return new t(n)}return l.prototype=n.prototype,l.prototype.constructor=l,jx=l}function qZ(){if(jR)return Lx;jR=1;var e=eS(),t=fM(),n=FZ(),r=BZ();return Lx=function(o){var a=n(o),i=r[a];if("function"!=typeof i||!(a in e.prototype))return!1;if(o===i)return!0;var l=t(i);return!!l&&o===l[0]}}function hM(){if(LR)return Fx;LR=1;var e=lM(),t=SN()(e);return Fx=t}function zZ(){if(FR)return Wx;FR=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return Wx=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function UZ(){if(WR)return Bx;WR=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return Bx=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function HZ(){if(BR)return qx;BR=1;var e=o2(),t=gN(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return qx=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function mM(){if(qR)return zx;qR=1;var e=zZ(),t=UZ(),n=e2(),r=HZ();return zx=function(o,a,i){var l=a+"";return n(o,t(l,r(e(l),i)))}}function gM(){if(zR)return Ux;zR=1;var e=qZ(),t=hM(),n=mM();return Ux=function(r,o,a,i,l,s,u,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var h=[r,o,l,p?s:void 0,p?u:void 0,p?void 0:s,p?void 0:u,c,d,f],m=a.apply(void 0,h);return e(r)&&t(m,h),m.placeholder=i,n(m,r,o)}}function vM(){if(UR)return Hx;return UR=1,Hx=function(e){return e.placeholder}}function VZ(){if(HR)return Vx;HR=1;var e=$v(),t=bv(),n=Math.min;return Vx=function(r,o){for(var a=r.length,i=n(o.length,a),l=e(r);i--;){var s=o[i];r[i]=t(s,a)?l[s]:void 0}return r}}function tS(){if(VR)return Gx;VR=1;var e="__lodash_placeholder__";return Gx=function(t,n){for(var r=-1,o=t.length,a=0,i=[];++r<o;){var l=t[r];(l===n||l===e)&&(t[r]=e,i[a++]=r)}return i}}function yM(){if(GR)return Kx;GR=1;var e=uM(),t=dM(),n=jZ(),r=Kv(),o=gM(),a=vM(),i=VZ(),l=tS(),s=zr();return Kx=function u(c,d,f,p,h,m,g,v,y,b){var w=128&d,x=1&d,_=2&d,O=24&d,k=512&d,S=_?void 0:r(c);return function D(){for(var C=arguments.length,E=Array(C),N=C;N--;)E[N]=arguments[N];if(O)var M=a(D),P=n(E,M);if(p&&(E=e(E,p,h,O)),m&&(E=t(E,m,g,O)),C-=P,O&&C<b){var j=l(E,M);return o(c,d,u,D.placeholder,f,E,j,v,y,b-C)}var T=x?f:this,A=_?T[c]:c;return C=E.length,v?E=i(E,v):k&&C>1&&E.reverse(),w&&y<C&&(E.length=y),this&&this!==s&&this instanceof D&&(A=S||r(A)),A.apply(T,E)}},Kx}function GZ(){if(KR)return Yx;KR=1;var e=J$(),t=Kv(),n=yM(),r=gM(),o=vM(),a=tS(),i=zr();return Yx=function(l,s,u){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,h=o(t);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:a(f,h);return(d-=m.length)<u?r(l,s,n,t.placeholder,void 0,f,m,void 0,void 0,u-d):e(this&&this!==i&&this instanceof t?c:l,this,f)}},Yx}function KZ(){if(YR)return Xx;YR=1;var e=J$(),t=Kv(),n=zr();return Xx=function(r,o,a,i){var l=1&o,s=t(r);return function t(){for(var o=-1,u=arguments.length,c=-1,d=i.length,f=Array(d+u),p=this&&this!==n&&this instanceof t?s:r;++c<d;)f[c]=i[c];for(;u--;)f[c++]=arguments[++o];return e(p,l?a:this,f)}},Xx}function YZ(){if(XR)return Qx;XR=1;var e=uM(),t=dM(),n=tS(),r="__lodash_placeholder__",o=128,a=Math.min;return Qx=function(i,l){var s=i[1],u=l[1],c=s|u,d=c<131,f=u==o&&8==s||u==o&&256==s&&i[7].length<=l[8]||384==u&&l[7].length<=l[8]&&8==s;if(!d&&!f)return i;1&u&&(i[2]=l[2],c|=1&s?0:4);var p=l[3];if(p){var h=i[3];i[3]=h?e(h,p,l[4]):p,i[4]=h?n(i[3],r):l[4]}return(p=l[5])&&(h=i[5],i[5]=h?t(h,p,l[6]):p,i[6]=h?n(i[5],r):l[6]),(p=l[7])&&(i[7]=p),u&o&&(i[8]=null==i[8]?l[8]:a(i[8],l[8])),null==i[9]&&(i[9]=l[9]),i[0]=l[0],i[1]=c,i}}function nS(){if(QR)return Zx;QR=1;var e=lM(),t=IZ(),n=GZ(),r=yM(),o=KZ(),a=fM(),i=YZ(),l=hM(),s=mM(),u=kN(),c=Math.max;return Zx=function(d,f,p,h,m,g,v,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=h?h.length:0;if(w||(f&=-97,h=m=void 0),v=void 0===v?v:c(u(v),0),y=void 0===y?y:u(y),w-=m?m.length:0,64&f){var x=h,_=m;h=m=void 0}var O=b?void 0:a(d),k=[d,f,p,h,m,x,_,g,v,y];if(O&&i(k,O),d=k[0],f=k[1],p=k[2],h=k[3],m=k[4],!(y=k[9]=void 0===k[9]?b?0:d.length:c(k[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)S=8==f||16==f?n(d,f,y):32!=f&&33!=f||m.length?r.apply(void 0,k):o(d,f,p,h);else var S=t(d,f,p);return s((O?e:l)(S,k),d,f)}}function XZ(){if(ZR)return Jx;ZR=1;var e=nS();return Jx=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function QZ(){if(JR)return e_;JR=1;var e=IN();return e_=function(t){return e(t,4)}}function ZZ(){if(e3)return t_;e3=1;var e=nS();function t(n,r,o){var a=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return a.placeholder=t.placeholder,a}return t.placeholder={},t_=t}function JZ(){if(t3)return n_;t3=1;var e=Ca(),t=To(),n=aq();return n_=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function eJ(){if(n3)return r_;n3=1;var e=Up(),t=To();return r_=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function tJ(){if(r3)return o_;r3=1;var e=IN(),t=Q$();return o_=function(n){return t("function"==typeof n?n:e(n,1))}}function nJ(){if(o3)return i_;o3=1;var e=nS(),t=Pq(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return i_=n}function rJ(){if(i3)return a_;i3=1;var e=j$(),t=$v(),n=qr(),r=Vu(),o=IT(),a=Bp(),i=L$();return a_=function(l){return n(l)?e(l,a):r(l)?[l]:t(o(i(l)))}}function oJ(){return a3||(a3=1,s_={ary:XZ(),assign:AN(),clone:QZ(),curry:ZZ(),forEach:o2(),isArray:qr(),isError:JZ(),isFunction:fv(),isWeakMap:eJ(),iteratee:tJ(),keys:lN(),rearg:nJ(),toInteger:kN(),toPath:rJ()}),s_}function iJ(){if(s3)return c_;s3=1;var e=M3(),t=oJ();return c_=function(n,r,o){return e(t,n,r,o)}}function aJ(){if(c3)return l_;c3=1;var e=iJ()("debounce",TN());return e.placeholder=A3(),l_=e}var sJ=aJ();const cJ=Oo(sJ);function l3(e,t,n=window){const r=Ae(t);We((()=>{r.current=t}),[t]),We((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const lJ=e=>{const t=cJ(150)(e);l3("resize",t),l3("orientationchange",t)},fae=()=>{const e=Q8();lJ((()=>{const t=ZA();e(JA(t)),e(eM(window.innerWidth))}))},pae=()=>tv(Gv.selectors.selectDeviceType),uJ=()=>tv(Gv.selectors.selectIsMobile),hae=()=>tv(Gv.selectors.selectIsTablet),mae=()=>tv(Gv.selectors.selectIsDesktop);function u3({className:e,...t}){return D.jsx("div",{className:te("animate-pulse rounded-md bg-muted",e),...t})}const dJ="sidebar_state",fJ=604800,pJ="12rem",hJ="18rem",mJ="2rem",gJ="b",bM=O.createContext(null);function Yv(){const e=O.useContext(bM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const vJ=O.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},l)=>{const s=uJ(),[u,c]=O.useState(!1),[d,f]=O.useState(e),p=t??d,h=O.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${dJ}=${t}; path=/; max-age=${fJ}`}),[n,p]),m=O.useCallback((()=>s?c((e=>!e)):h((e=>!e))),[s,h,c]);O.useEffect((()=>{const e=e=>{e.key===gJ&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[m]);const g=p?"expanded":"collapsed",v=O.useMemo((()=>({state:g,open:p,setOpen:h,isMobile:s,openMobile:u,setOpenMobile:c,toggleSidebar:m})),[g,p,h,s,u,c,m]);return D.jsx(bM.Provider,{value:v,children:D.jsx(HA,{delayDuration:0,children:D.jsx("div",{style:{"--sidebar-width":pJ,"--sidebar-width-icon":mJ,...o},className:te("group/sidebar-wrapper flex min-h-svh w-full bg-gray-100 has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:a})})})}));vJ.displayName="SidebarProvider";const yJ=O.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},i)=>{const{isMobile:l,state:s,openMobile:u,setOpenMobile:c}=Yv();return"none"===n?D.jsx("div",{className:te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):l?D.jsx(TQ,{open:u,onOpenChange:c,children:D.jsxs(BA,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":hJ},side:e,children:[D.jsxs(qA,{className:"sr-only",children:[D.jsx(zA,{children:"Sidebar"}),D.jsx(UA,{children:"Displays the mobile sidebar."})]}),D.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):D.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":s,"data-collapsible":"collapsed"===s?n:"","data-variant":t,"data-side":e,children:[D.jsx("div",{className:te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),D.jsx("div",{className:te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:D.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));yJ.displayName="Sidebar";const bJ=O.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=Yv();return D.jsx(Is,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:te("size-6 text-gray-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?D.jsx(C7,{size:16}):D.jsx($7,{size:16})})}));bJ.displayName="SidebarTrigger";const wJ=O.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Yv();return D.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));wJ.displayName="SidebarRail";const xJ=O.forwardRef((({className:e,...t},n)=>D.jsx("main",{ref:n,className:te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));xJ.displayName="SidebarInset";const _J=O.forwardRef((({className:e,...t},n)=>D.jsx(Wc,{ref:n,"data-sidebar":"input",className:te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));_J.displayName="SidebarInput";const $J=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"header",className:te("flex flex-col gap-xxs p-xs",e),...t})));$J.displayName="SidebarHeader";const SJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"footer",className:te("flex flex-col gap-2 p-2",e),...t})));SJ.displayName="SidebarFooter";const CJ=O.forwardRef((({className:e,...t},n)=>D.jsx(N2,{ref:n,"data-sidebar":"separator",className:te("mx-2 w-auto bg-sidebar-border",e),...t})));CJ.displayName="SidebarSeparator";const EJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"content",className:te("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));EJ.displayName="SidebarContent";const PJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"group",className:te("relative flex w-full min-w-0 flex-col pt-xs",e),...t})));PJ.displayName="SidebarGroup";const OJ=O.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?Ms:"div";return D.jsx(o,{ref:r,"data-sidebar":"group-label",className:te("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-gray-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));OJ.displayName="SidebarGroupLabel";const RJ=O.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?Ms:"button";return D.jsx(o,{ref:r,"data-sidebar":"group-action",className:te("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));RJ.displayName="SidebarGroupAction";const TJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"group-content",className:te("w-full text-sm",e),...t})));TJ.displayName="SidebarGroupContent";const NJ=O.forwardRef((({className:e,...t},n)=>D.jsx("ul",{ref:n,"data-sidebar":"menu",className:te("flex w-full min-w-0 flex-col p-xs font-semibold text-gray-700 [&_svg]:size-4",e),...t})));NJ.displayName="SidebarMenu";const kJ=O.forwardRef((({className:e,...t},n)=>D.jsx("li",{ref:n,"data-sidebar":"menu-item",className:te("group/menu-item relative",e),...t})));kJ.displayName="SidebarMenuItem";const DJ=$a("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),AJ=O.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},l)=>{const s=e?Ms:"button",{isMobile:u,state:c}=Yv(),d=D.jsx(s,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:te(DJ({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),D.jsxs(VA,{children:[D.jsx(GA,{asChild:!0,children:d}),D.jsx(YA,{side:"right",align:"center",hidden:"collapsed"!==c||u,...o})]})):d}));AJ.displayName="SidebarMenuButton";const MJ=O.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?Ms:"button";return D.jsx(a,{ref:o,"data-sidebar":"menu-action",className:te("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));MJ.displayName="SidebarMenuAction";const IJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:te("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));IJ.displayName="SidebarMenuBadge";const jJ=O.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=O.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return D.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:te("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&D.jsx(u3,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),D.jsx(u3,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));jJ.displayName="SidebarMenuSkeleton";const LJ=O.forwardRef((({className:e,...t},n)=>D.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:te("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));LJ.displayName="SidebarMenuSub";const FJ=O.forwardRef((({...e},t)=>D.jsx("li",{ref:t,...e})));FJ.displayName="SidebarMenuSubItem";const WJ=O.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?Ms:"a";return D.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:te("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-gray-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));WJ.displayName="SidebarMenuSubButton";const wM="Switch",[BJ,gae]=Br(wM),[qJ,zJ]=BJ(wM),UJ=ye(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:s="on",onCheckedChange:u,...c}=e,[d,f]=Ke(null),p=Nt(t,(e=>f(e))),h=Ae(!1),m=!d||!!d.closest("form"),[g=!1,v]=si({prop:o,defaultProp:a,onChange:u});return q(qJ,{scope:n,checked:g,disabled:l},q(dt.button,he({type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":xM(g),"data-disabled":l?"":void 0,disabled:l,value:s},c,{ref:p,onClick:Xe(e.onClick,(e=>{v((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&q(GJ,{control:d,bubbles:!h.current,name:r,value:s,checked:g,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),HJ="SwitchThumb",VJ=ye(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=zJ(HJ,n);return q(dt.span,he({"data-state":xM(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),GJ=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=Cv(n),l=Ev(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),q("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function xM(e){return e?"checked":"unchecked"}const _M=UJ,KJ=VJ,YJ=O.forwardRef((({className:e,...t},n)=>D.jsx(_M,{className:te("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-gray-200","disabled:cursor-not-allowed disabled:!bg-gray-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-gray-300",e),...t,ref:n,children:D.jsx(KJ,{className:te("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-gray-300":t.disabled})})})));YJ.displayName=_M.displayName;const $M="Tabs",[XJ,vae]=Br($M,[Xu]),SM=Xu(),[QJ,rS]=XJ($M),ZJ=ye(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:s="automatic",...u}=e,c=Gp(l),[d,f]=si({prop:r,onChange:o,defaultProp:a});return q(QJ,{scope:n,baseId:Co(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:s},q(dt.div,he({dir:c,"data-orientation":i},u,{ref:t})))})),JJ="TabsList",eee=ye(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=rS(JJ,n),i=SM(n);return q(C2,he({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),q(dt.div,he({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),tee="TabsTrigger",nee=ye(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=rS(tee,n),l=SM(n),s=CM(i.baseId,r),u=EM(i.baseId,r),c=r===i.value;return q(E2,he({asChild:!0},l,{focusable:!o,active:c}),q(dt.button,he({type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:s},a,{ref:t,onMouseDown:Xe(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:Xe(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:Xe(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),ree="TabsContent",oee=ye(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=rS(ree,n),s=CM(l.baseId,r),u=EM(l.baseId,r),c=r===l.value,d=Ae(c);return We((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),q(Ro,{present:o||c},(({present:n})=>q(dt.div,he({"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":s,hidden:!n,id:u,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&a)))}));function CM(e,t){return`${e}-trigger-${t}`}function EM(e,t){return`${e}-content-${t}`}const iee=ZJ,PM=eee,OM=nee,RM=oee,yae=iee,TM=O.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>D.jsx(PM,{ref:r,"data-testid":"tabsList",className:t?te("inline-flex w-full items-center justify-start gap-s p-none text-muted-foreground","relative after:absolute after:bottom-0 after:left-0 after:h-[1px] after:w-full after:bg-gray-200",e):e,...n})));TM.displayName=PM.displayName;const NM=O.forwardRef((({className:e,children:t,isFullWidthTab:n,...r},o)=>D.jsx(OM,{ref:o,asChild:!0,className:e??te("inline-flex items-center justify-center whitespace-nowrap text-base","z-2 transition-background h-m cursor-pointer focus-visible:outline-none","font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","group relative text-gray-500 hover:[&_svg]:fill-gray-900","after:absolute after:bottom-0 after:left-0 after:z-[1] after:h-0.5 after:w-full data-[state=active]:after:bg-gray-900",{"flex-1":n}),...r,children:t})));NM.displayName=OM.displayName;const aee=O.forwardRef((({className:e,...t},n)=>D.jsx(RM,{ref:n,className:te("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));aee.displayName=RM.displayName;const see=({icon:e,label:t,value:n,href:r,asChild:o,className:a,isFullWidthTab:i,disabled:l})=>{const s=D.jsxs("span",{className:"flex items-center justify-center gap-xxs group-hover:text-gray-900 group-data-[state=active]:text-gray-900 [&_svg]:pointer-events-none",children:[e,t]});return D.jsx(NM,{value:n,className:a,disabled:l,asChild:o,isFullWidthTab:i,children:r?D.jsx(Z8,{to:r,className:"flex h-full w-full items-center justify-center",children:s}):s})},bae=({items:e,children:t,className:n})=>D.jsxs(TM,{className:te("no-scrollbar z-0 mt-m overflow-x-auto px-m",n),children:[e.map((t=>D.jsx(see,{isFullWidthTab:e.length<=3,...t},t.value))),t]}),cee=O.forwardRef((({className:e,...t},n)=>D.jsx("table",{ref:n,className:te("w-full caption-bottom text-sm",e),...t})));cee.displayName="Table";const lee=O.forwardRef((({className:e,...t},n)=>D.jsx("thead",{ref:n,className:te("[&_tr]:border-b",e),...t})));lee.displayName="TableHeader";const uee=O.forwardRef((({className:e,...t},n)=>D.jsx("tbody",{ref:n,className:te("[&_tr:last-child]:border-0",e),...t})));uee.displayName="TableBody";const dee=O.forwardRef((({className:e,...t},n)=>D.jsx("tfoot",{ref:n,className:te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));dee.displayName="TableFooter";const fee=O.forwardRef((({className:e,...t},n)=>D.jsx("tr",{ref:n,className:te("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted","[&:hover_button[data-disabled]]:!bg-gray-200 [&:hover_button[disabled]]:!bg-gray-200",e),...t})));fee.displayName="TableRow";const pee=O.forwardRef((({className:e,...t},n)=>D.jsx("th",{ref:n,className:te("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-gray-200 text-sm text-gray-500 [&:not(:last-child)]:border-r",e),...t})));pee.displayName="TableHead";const hee=O.forwardRef((({className:e,...t},n)=>D.jsx("td",{ref:n,className:te("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-gray-200 text-base text-gray-700 [&:not(:last-child)]:border-r",e),...t})));hee.displayName="TableCell";const mee=O.forwardRef((({className:e,...t},n)=>D.jsx("caption",{ref:n,className:te("mt-s text-sm text-muted-foreground",e),...t})));mee.displayName="TableCaption";const gee=(e,t)=>te("flex w-full rounded-m px-s py-xs text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out placeholder:text-base placeholder:text-muted-foreground placeholder:text-gray-400 hover:outline-2 hover:outline-gray-400 focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-gray-300 disabled:outline-gray-200",{"bg-red_30_17 outline-red-dark":!!e},t),vee=O.forwardRef((({className:e,...t},n)=>{const{error:r}=Ls();return D.jsx("textarea",{className:gee(!!r,e),ref:n,...t})}));vee.displayName="Textarea";const pp={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,134,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,250,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,221],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:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],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,50]},kM=Object.create(null);for(const e in pp)Object.hasOwn(pp,e)&&(kM[pp[e]]=e);const Hn={to:{},get:{}};function $s(e,t,n){return Math.min(Math.max(t,e),n)}function xg(e){const t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}Hn.get=function(e){let t,n;switch(e.slice(0,3).toLowerCase()){case"hsl":t=Hn.get.hsl(e),n="hsl";break;case"hwb":t=Hn.get.hwb(e),n="hwb";break;default:t=Hn.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},Hn.get.rgb=function(e){if(!e)return null;let t,n,r,o=[0,0,0,1];if(t=e.match(/^#([a-f\d]{6})([a-f\d]{2})?$/i)){for(r=t[2],t=t[1],n=0;n<3;n++){const e=2*n;o[n]=Number.parseInt(t.slice(e,e+2),16)}r&&(o[3]=Number.parseInt(r,16)/255)}else if(t=e.match(/^#([a-f\d]{3,4})$/i)){for(t=t[1],r=t[3],n=0;n<3;n++)o[n]=Number.parseInt(t[n]+t[n],16);r&&(o[3]=Number.parseInt(r+r,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=Number.parseInt(t[n+1],10);t[4]&&(o[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:Object.hasOwn(pp,t[1])?(o=pp[t[1]],o[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*Number.parseFloat(t[n+1]));t[4]&&(o[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=$s(o[n],0,255);return o[3]=$s(o[3],0,1),o},Hn.get.hsl=function(e){if(!e)return null;const t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,$s(Number.parseFloat(t[2]),0,100),$s(Number.parseFloat(t[3]),0,100),$s(Number.isNaN(e)?1:e,0,1)]}return null},Hn.get.hwb=function(e){if(!e)return null;const t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,$s(Number.parseFloat(t[2]),0,100),$s(Number.parseFloat(t[3]),0,100),$s(Number.isNaN(e)?1:e,0,1)]}return null},Hn.to.hex=function(...e){return"#"+xg(e[0])+xg(e[1])+xg(e[2])+(e[3]<1?xg(Math.round(255*e[3])):"")},Hn.to.rgb=function(...e){return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},Hn.to.rgb.percent=function(...e){const t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},Hn.to.hsl=function(...e){return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Hn.to.hwb=function(...e){let t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Hn.to.keyword=function(...e){return kM[e.slice(0,3)]};const kp={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,134,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,250,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,221],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:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],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,50]},DM={};for(const e of Object.keys(kp))DM[kp[e]]=e;const ze={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},ya=(6/29)**3;function Tu(e){const t=e>.0031308?1.055*e**.4166666666666667-.055:12.92*e;return Math.min(Math.max(0,t),1)}function Nu(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}for(const e of Object.keys(ze)){if(!("channels"in ze[e]))throw new Error("missing channels property: "+e);if(!("labels"in ze[e]))throw new Error("missing channel labels property: "+e);if(ze[e].labels.length!==ze[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=ze[e];delete ze[e].channels,delete ze[e].labels,Object.defineProperty(ze[e],"channels",{value:t}),Object.defineProperty(ze[e],"labels",{value:n})}function yee(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}function bee(){const e={},t=Object.keys(ze);for(let{length:n}=t,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function wee(e){const t=bee(),n=[e];for(t[e].distance=0;n.length>0;){const e=n.pop(),r=Object.keys(ze[e]);for(let{length:o}=r,a=0;a<o;a++){const o=r[a],i=t[o];-1===i.distance&&(i.distance=t[e].distance+1,i.parent=e,n.unshift(o))}}return t}function xee(e,t){return function(n){return t(e(n))}}function _ee(e,t){const n=[t[e].parent,e];let r=ze[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),r=xee(ze[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}function $ee(e){const t=wee(e),n={},r=Object.keys(t);for(let{length:e}=r,o=0;o<e;o++){const e=r[o];null!==t[e].parent&&(n[e]=_ee(e,t))}return n}ze.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=a-o;let l,s;switch(a){case o:l=0;break;case t:l=(n-r)/i;break;case n:l=2+(r-t)/i;break;case r:l=4+(t-n)/i}l=Math.min(60*l,360),l<0&&(l+=360);const u=(o+a)/2;return s=a===o?0:u<=.5?i/(a+o):i/(2-a-o),[l,100*s,100*u]},ze.rgb.hsv=function(e){let t,n,r,o,a;const i=e[0]/255,l=e[1]/255,s=e[2]/255,u=Math.max(i,l,s),c=u-Math.min(i,l,s),d=function(e){return(u-e)/6/c+.5};if(0===c)o=0,a=0;else{switch(a=c/u,t=d(i),n=d(l),r=d(s),u){case i:o=r-n;break;case l:o=1/3+t-r;break;case s:o=2/3+n-t}o<0?o+=1:o>1&&(o-=1)}return[360*o,100*a,100*u]},ze.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=ze.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,100*a,100*r]},ze.rgb.oklab=function(e){const t=Nu(e[0]/255),n=Nu(e[1]/255),r=Nu(e[2]/255),o=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),i=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r);return[100*(.2104542553*o+.793617785*a-.0040720468*i),100*(1.9779984951*o-2.428592205*a+.4505937099*i),100*(.0259040371*o+.7827717662*a-.808675766*i)]},ze.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},ze.rgb.keyword=function(e){const t=DM[e];if(t)return t;let n,r=Number.POSITIVE_INFINITY;for(const t of Object.keys(kp)){const o=yee(e,kp[t]);o<r&&(r=o,n=t)}return n},ze.keyword.rgb=function(e){return kp[e]},ze.rgb.xyz=function(e){const t=Nu(e[0]/255),n=Nu(e[1]/255),r=Nu(e[2]/255);return[100*(.4124564*t+.3575761*n+.1804375*r),100*(.2126729*t+.7151522*n+.072175*r),100*(.0193339*t+.119192*n+.9503041*r)]},ze.rgb.lab=function(e){const t=ze.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>ya?n**(1/3):7.787*n+16/116,r=r>ya?r**(1/3):7.787*r+16/116,o=o>ya?o**(1/3):7.787*o+16/116;return[116*r-16,500*(n-r),200*(r-o)]},ze.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a;if(0===n)return a=255*r,[a,a,a];const i=r<.5?r*(1+n):r+n-r*n,l=2*r-i,s=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,a=6*o<1?l+6*(i-l)*o:2*o<1?i:3*o<2?l+(i-l)*(2/3-o)*6:l,s[e]=255*a;return s},ze.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;return[t,100*(0===r?2*o/(a+o):2*n/(r+n)),100*((r+n)/2)]},ze.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),i=255*r*(1-n),l=255*r*(1-n*a),s=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,s,i];case 1:return[l,r,i];case 2:return[i,r,s];case 3:return[i,l,r];case 4:return[s,i,r];case 5:return[r,i,l]}},ze.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,i;i=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,i/=2,[t,100*a,100*i]},ze.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const i=Math.floor(6*t),l=1-r;a=6*t-i,1&i&&(a=1-a);const s=n+a*(l-n);let u,c,d;switch(i){default:case 6:case 0:u=l,c=s,d=n;break;case 1:u=s,c=l,d=n;break;case 2:u=n,c=l,d=s;break;case 3:u=n,c=s,d=l;break;case 4:u=s,c=n,d=l;break;case 5:u=l,c=n,d=s}return[255*u,255*c,255*d]},ze.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},ze.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,i;return o=3.2404542*t+-1.5371385*n+-.4985314*r,a=-.969266*t+1.8760108*n+.041556*r,i=.0556434*t+-.2040259*n+1.0572252*r,o=Tu(o),a=Tu(a),i=Tu(i),[255*o,255*a,255*i]},ze.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>ya?t**(1/3):7.787*t+16/116,n=n>ya?n**(1/3):7.787*n+16/116,r=r>ya?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},ze.xyz.oklab=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=Math.cbrt(.8189330101*t+.3618667424*n-.1288597137*r),a=Math.cbrt(.0329845436*t+.9293118715*n+.0361456387*r),i=Math.cbrt(.0482003018*t+.2643662691*n+.633851707*r);return[100*(.2104542553*o+.793617785*a-.0040720468*i),100*(1.9779984951*o-2.428592205*a+.4505937099*i),100*(.0259040371*o+.7827717662*a-.808675766*i)]},ze.oklab.oklch=function(e){return ze.lab.lch(e)},ze.oklab.xyz=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=(.999999998*t+.396337792*n+.215803758*r)**3,a=(1.000000008*t-.105561342*n-.063854175*r)**3,i=(1.000000055*t-.089484182*n-1.291485538*r)**3;return[100*(1.227013851*o-.55779998*a+.281256149*i),100*(-.040580178*o+1.11225687*a-.071676679*i),100*(-.076381285*o-.421481978*a+1.58616322*i)]},ze.oklab.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=(t+.3963377774*n+.2158037573*r)**3,a=(t-.1055613458*n-.0638541728*r)**3,i=(t-.0894841775*n-1.291485548*r)**3;return[255*Tu(4.0767416621*o-3.3077115913*a+.2309699292*i),255*Tu(-1.2684380046*o+2.6097574011*a-.3413193965*i),255*Tu(-.0041960863*o-.7034186147*a+1.707614701*i)]},ze.oklch.oklab=function(e){return ze.lch.lab(e)},ze.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,a=t**3,i=r**3;return n=o>ya?o:(n-16/116)/7.787,t=a>ya?a:(t-16/116)/7.787,r=i>ya?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},ze.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},ze.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},ze.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=null===t?ze.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let i=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===a&&(i+=60),i},ze.hsv.ansi16=function(e){return ze.rgb.ansi16(ze.hsv.rgb(e),e[2])},ze.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t>>4==n>>4&&n>>4==r>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},ze.ansi16.rgb=function(e){let t=(e=e[0])%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(Math.trunc(e>50)+1);return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},ze.ansi256.rgb=function(e){if((e=e[0])>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},ze.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".slice(t.length)+t},ze.hex.rgb=function(e){const t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=[...n].map((e=>e+e)).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},ze.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),i=o-a;let l;return l=i<=0?0:o===t?(n-r)/i%6:o===n?2+(r-t)/i:4+(t-n)/i,l/=6,l%=1,[360*l,100*i,100*(i<1?a/(1-i):0)]},ze.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},ze.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},ze.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],a=t%1*6,i=a%1,l=1-i;let s=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return s=(1-n)*r,[255*(n*o[0]+s),255*(n*o[1]+s),255*(n*o[2]+s)]},ze.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},ze.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},ze.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},ze.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},ze.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},ze.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},ze.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},ze.gray.hsl=function(e){return[0,0,e[0]]},ze.gray.hsv=ze.gray.hsl,ze.gray.hwb=function(e){return[0,100,e[0]]},ze.gray.cmyk=function(e){return[0,0,0,e[0]]},ze.gray.lab=function(e){return[e[0],0,0]},ze.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(n.length)+n},ze.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const rr={},See=Object.keys(ze);function Cee(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function Eee(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let{length:e}=r,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}for(const e of See){rr[e]={},Object.defineProperty(rr[e],"channels",{value:ze[e].channels}),Object.defineProperty(rr[e],"labels",{value:ze[e].labels});const t=$ee(e),n=Object.keys(t);for(const r of n){const n=t[r];rr[e][r]=Eee(n),rr[e][r].raw=Cee(n)}}const AM=["keyword","gray","hex"],s$={};for(const e of Object.keys(rr))s$[[...rr[e].labels].sort().join("")]=e;const hp={};function nn(e,t){if(!(this instanceof nn))return new nn(e,t);if(t&&t in AM&&(t=null),t&&!(t in rr))throw new Error("Unknown model: "+t);let n,r;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof nn)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=Hn.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,r=rr[this.model].channels,this.color=t.value.slice(0,r),this.valpha="number"==typeof t.value[r]?t.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=rr[this.model].channels;const n=Array.prototype.slice.call(e,0,r);this.color=c$(n,r),this.valpha="number"==typeof e[r]?e[r]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const r=t.sort().join("");if(!(r in s$))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=s$[r];const{labels:o}=rr[this.model],a=[];for(n=0;n<o.length;n++)a.push(e[o[n]]);this.color=c$(a)}if(hp[this.model])for(r=rr[this.model].channels,n=0;n<r;n++){const e=hp[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}nn.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Hn.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const n=1===t.valpha?t.color:[...t.color,this.valpha];return Hn.to[t.model](...n)},percentString(e){const t=this.rgb().round("number"==typeof e?e:1),n=1===t.valpha?t.color:[...t.color,this.valpha];return Hn.to.rgb.percent(...n)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=rr[this.model],{labels:n}=rr[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new nn([...this.color.map(Oee(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new nn([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:yn("rgb",0,qn(255)),green:yn("rgb",1,qn(255)),blue:yn("rgb",2,qn(255)),hue:yn(["hsl","hsv","hsl","hwb","hcg"],0,(e=>(e%360+360)%360)),saturationl:yn("hsl",1,qn(100)),lightness:yn("hsl",2,qn(100)),saturationv:yn("hsv",1,qn(100)),value:yn("hsv",2,qn(100)),chroma:yn("hcg",1,qn(100)),gray:yn("hcg",2,qn(100)),white:yn("hwb",1,qn(100)),wblack:yn("hwb",2,qn(100)),cyan:yn("cmyk",0,qn(100)),magenta:yn("cmyk",1,qn(100)),yellow:yn("cmyk",2,qn(100)),black:yn("cmyk",3,qn(100)),x:yn("xyz",0,qn(95.047)),y:yn("xyz",1,qn(100)),z:yn("xyz",2,qn(108.833)),l:yn("lab",0,qn(100)),a:yn("lab",1),b:yn("lab",2),keyword(e){return void 0!==e?new nn(e):rr[this.model].keyword(this.color)},hex(e){return void 0!==e?new nn(e):Hn.to.hex(...this.rgb().round().color)},hexa(e){if(void 0!==e)return new nn(e);const t=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),Hn.to.hex(...t)+n},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return nn.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,a=2*o-1,i=n.alpha()-r.alpha(),l=((a*i==-1?a:(a+i)/(1+a*i))+1)/2,s=1-l;return nn.rgb(l*n.red()+s*r.red(),l*n.green()+s*r.green(),l*n.blue()+s*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(const e of Object.keys(rr)){if(AM.includes(e))continue;const{channels:t}=rr[e];nn.prototype[e]=function(...t){return this.model===e?new nn(this):t.length>0?new nn(t,e):new nn([...Ree(rr[this.model][e].raw(this.color)),this.valpha],e)},nn[e]=function(...n){let r=n[0];return"number"==typeof r&&(r=c$(n,t)),new nn(r,e)}}function Pee(e,t){return Number(e.toFixed(t))}function Oee(e){return function(t){return Pee(t,e)}}function yn(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(hp[r]||(hp[r]=[]))[t]=n;return e=e[0],function(r){let o;return void 0!==r?(n&&(r=n(r)),o=this[e](),o.color[t]=r,o):(o=this[e]().color[t],n&&(o=n(o)),o)}}function qn(e){return function(t){return Math.max(0,Math.min(e,t))}}function Ree(e){return Array.isArray(e)?e:[e]}function c$(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}function MM(e,[t,n]){return Math.min(n,Math.max(t,e))}function Eu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function d3(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function IM(...e){return t=>{let n=!1;const r=e.map((e=>{const r=d3(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():d3(e[t],null)}}}}function ks(...e){return O.useCallback(IM(...e),e)}function jM(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>O.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return O.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=O.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,s=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=O.useMemo((()=>l),Object.values(l));return D.jsx(s.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const s=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,u=O.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Tee(r,...t)]}function Tee(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return O.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var LM=null!=globalThis&&globalThis.document?O.useLayoutEffect:()=>{},Nee=O[" useInsertionEffect ".trim().toString()]||LM;function kee({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=Dee({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:o;{const t=O.useRef(void 0!==e);O.useEffect((()=>{const e=t.current;e!==l&&console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=l}),[l,r])}return[s,O.useCallback((t=>{var n;if(l){const r=Aee(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else a(t)}),[l,e,a,i])]}function Dee({defaultProp:e,onChange:t}){const[n,r]=O.useState(e),o=O.useRef(n),a=O.useRef(t);return Nee((()=>{a.current=t}),[t]),O.useEffect((()=>{var e;o.current!==n&&(null==(e=a.current)||e.call(a,n),o.current=n)}),[n,o]),[n,r,a]}function Aee(e){return"function"==typeof e}var Mee=O.createContext(void 0);function Iee(e){const t=O.useContext(Mee);return e||t||"ltr"}function jee(e){const t=O.useRef({value:e,previous:e});return O.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Lee(e){const[t,n]=O.useState(void 0);return LM((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}function l$(e){const t=Fee(e),n=O.forwardRef(((e,n)=>{const{children:r,...o}=e,a=O.Children.toArray(r),i=a.find(Bee);if(i){const e=i.props.children,r=a.map((t=>t===i?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t));return D.jsx(t,{...o,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return D.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Fee(e){const t=O.forwardRef(((e,t)=>{const{children:n,...r}=e;if(O.isValidElement(n)){const e=zee(n),o=qee(r,n.props);return n.type!==O.Fragment&&(o.ref=t?IM(t,e):e),O.cloneElement(n,o)}return O.Children.count(n)>1?O.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Wee=Symbol("radix.slottable");function Bee(e){return O.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Wee}function qee(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function zee(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Uee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],eh=Uee.reduce(((e,t)=>{const n=l$(`Primitive.${t}`),r=O.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Hee(e){const t=e+"CollectionProvider",[n,r]=jM(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=re.useRef(null),a=re.useRef(new Map).current;return D.jsx(o,{scope:t,itemMap:a,collectionRef:r,children:n})};i.displayName=t;const l=e+"CollectionSlot",s=l$(l),u=re.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=ks(t,a(l,n).collectionRef);return D.jsx(s,{ref:o,children:r})}));u.displayName=l;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=l$(c),p=re.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=re.useRef(null),l=ks(t,i),s=a(c,n);return re.useEffect((()=>(s.itemMap.set(i,{ref:i,...o}),()=>{s.itemMap.delete(i)}))),D.jsx(f,{[d]:"",ref:l,children:r})}));return p.displayName=c,[{Provider:i,Slot:u,ItemSlot:p},function(t){const n=a(e+"CollectionConsumer",t);return re.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}var FM=["PageUp","PageDown"],WM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],BM={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ju="Slider",[u$,Vee,Gee]=Hee(Ju),[qM,wae]=jM(Ju,[Gee]),[Kee,Xv]=qM(Ju),zM=O.forwardRef(((e,t)=>{const{name:n,min:r=0,max:o=100,step:a=1,orientation:i="horizontal",disabled:l=!1,minStepsBetweenThumbs:s=0,defaultValue:u=[r],value:c,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:h,...m}=e,g=O.useRef(new Set),v=O.useRef(0),y="horizontal"===i?Yee:Xee,[b=[],w]=kee({prop:c,defaultProp:u,onChange:e=>{var t;null==(t=[...g.current][v.current])||t.focus(),d(e)}}),x=O.useRef(b);function _(e,t,{commit:n}={commit:!1}){const i=ite(a),l=MM(ate(Math.round((e-r)/a)*a+r,i),[r,o]);w(((e=[])=>{const r=Jee(e,l,t);if(ote(r,s*a)){v.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e}))}return D.jsx(Kee,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:v,thumbs:g.current,values:b,orientation:i,form:h,children:D.jsx(u$.Provider,{scope:e.__scopeSlider,children:D.jsx(u$.Slot,{scope:e.__scopeSlider,children:D.jsx(y,{"aria-disabled":l,"data-disabled":l?"":void 0,...m,ref:t,onPointerDown:Eu(m.onPointerDown,(()=>{l||(x.current=b)})),min:r,max:o,inverted:p,onSlideStart:l?void 0:function(e){_(e,tte(b,e))},onSlideMove:l?void 0:function(e){_(e,v.current)},onSlideEnd:l?void 0:function(){const e=x.current[v.current];b[v.current]!==e&&f(b)},onHomeKeyDown:()=>!l&&_(r,0,{commit:!0}),onEndKeyDown:()=>!l&&_(o,b.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=FM.includes(e.key)||e.shiftKey&&WM.includes(e.key)?10:1,r=v.current;_(b[r]+a*n*t,r,{commit:!0})}}})})})})}));zM.displayName=Ju;var[UM,HM]=qM(Ju,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Yee=O.forwardRef(((e,t)=>{const{min:n,max:r,dir:o,inverted:a,onSlideStart:i,onSlideMove:l,onSlideEnd:s,onStepKeyDown:u,...c}=e,[d,f]=O.useState(null),p=ks(t,(e=>f(e))),h=O.useRef(void 0),m=Iee(o),g="ltr"===m,v=g&&!a||!g&&a;function y(e){const t=h.current||d.getBoundingClientRect(),o=oS([0,t.width],v?[n,r]:[r,n]);return h.current=t,o(e-t.left)}return D.jsx(UM,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:D.jsx(VM,{dir:m,"data-orientation":"horizontal",...c,ref:p,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);null==i||i(t)},onSlideMove:e=>{const t=y(e.clientX);null==l||l(t)},onSlideEnd:()=>{h.current=void 0,null==s||s()},onStepKeyDown:e=>{const t=BM[v?"from-left":"from-right"].includes(e.key);null==u||u({event:e,direction:t?-1:1})}})})})),Xee=O.forwardRef(((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:a,onSlideMove:i,onSlideEnd:l,onStepKeyDown:s,...u}=e,c=O.useRef(null),d=ks(t,c),f=O.useRef(void 0),p=!o;function h(e){const t=f.current||c.current.getBoundingClientRect(),o=oS([0,t.height],p?[r,n]:[n,r]);return f.current=t,o(e-t.top)}return D.jsx(UM,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:D.jsx(VM,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=h(e.clientY);null==a||a(t)},onSlideMove:e=>{const t=h(e.clientY);null==i||i(t)},onSlideEnd:()=>{f.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=BM[p?"from-bottom":"from-top"].includes(e.key);null==s||s({event:e,direction:t?-1:1})}})})})),VM=O.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:a,onHomeKeyDown:i,onEndKeyDown:l,onStepKeyDown:s,...u}=e,c=Xv(Ju,n);return D.jsx(eh.span,{...u,ref:t,onKeyDown:Eu(e.onKeyDown,(e=>{"Home"===e.key?(i(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):FM.concat(WM).includes(e.key)&&(s(e),e.preventDefault())})),onPointerDown:Eu(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),c.thumbs.has(t)?t.focus():r(e)})),onPointerMove:Eu(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:Eu(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))}))})})),GM="SliderTrack",KM=O.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=Xv(GM,n);return D.jsx(eh.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));KM.displayName=GM;var d$="SliderRange",YM=O.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=Xv(d$,n),a=HM(d$,n),i=ks(t,O.useRef(null)),l=o.values.length,s=o.values.map((e=>ZM(e,o.min,o.max))),u=l>1?Math.min(...s):0,c=100-Math.max(...s);return D.jsx(eh.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:i,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:c+"%"}})}));YM.displayName=d$;var f$="SliderThumb",XM=O.forwardRef(((e,t)=>{const n=Vee(e.__scopeSlider),[r,o]=O.useState(null),a=ks(t,(e=>o(e))),i=O.useMemo((()=>r?n().findIndex((e=>e.ref.current===r)):-1),[n,r]);return D.jsx(Qee,{...e,ref:a,index:i})})),Qee=O.forwardRef(((e,t)=>{const{__scopeSlider:n,index:r,name:o,...a}=e,i=Xv(f$,n),l=HM(f$,n),[s,u]=O.useState(null),c=ks(t,(e=>u(e))),d=!s||(i.form||!!s.closest("form")),f=Lee(s),p=i.values[r],h=void 0===p?0:ZM(p,i.min,i.max),m=ete(r,i.values.length),g=null==f?void 0:f[l.size],v=g?nte(g,h,l.direction):0;return O.useEffect((()=>{if(s)return i.thumbs.add(s),()=>{i.thumbs.delete(s)}}),[s,i.thumbs]),D.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${h}% + ${v}px)`},children:[D.jsx(u$.ItemSlot,{scope:e.__scopeSlider,children:D.jsx(eh.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":i.min,"aria-valuenow":p,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...a,ref:c,style:void 0===p?{display:"none"}:e.style,onFocus:Eu(e.onFocus,(()=>{i.valueIndexToChangeRef.current=r}))})}),d&&D.jsx(QM,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:p},r)]})}));XM.displayName=f$;var Zee="RadioBubbleInput",QM=O.forwardRef((({__scopeSlider:e,value:t,...n},r)=>{const o=O.useRef(null),a=ks(o,r),i=jee(t);return O.useEffect((()=>{const e=o.current;if(!e)return;const n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("input",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}}),[i,t]),D.jsx(eh.input,{style:{display:"none"},...n,ref:a,defaultValue:t})}));function Jee(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}function ZM(e,t,n){return MM(100/(n-t)*(e-t),[0,100])}function ete(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}function tte(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}function nte(e,t,n){const r=e/2;return(r-oS([0,50],[0,r])(t)*n)*n}function rte(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}function ote(e,t){if(t>0){const n=rte(e);return Math.min(...n)>=t}return!0}function oS(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ite(e){return(String(e).split(".")[1]||"").length}function ate(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}QM.displayName=Zee;var JM=zM,e6=KM,t6=YM,n6=XM;const r6=ji(void 0),ed=()=>{const e=Ds(r6);if(!e)throw new Error("useColorPicker must be used within a ColorPickerProvider");return e},xae=({value:e,defaultValue:t="#000000",onChange:n,className:r,...o})=>{const a=nn(e),i=nn(t),[l,s]=Ke((()=>{const e=a.hue();if(null!=e&&!Number.isNaN(e))return Math.round(e);const t=i.hue();return null==t||Number.isNaN(t)?0:Math.round(t)})()),[u,c]=Ke((()=>{const e=a.saturationv();if(null!=e&&!Number.isNaN(e))return Math.round(e);const t=i.saturationv();return null==t||Number.isNaN(t)?100:Math.round(t)})()),[d,f]=Ke((()=>{const e=a.lightness();if(null!=e&&!Number.isNaN(e))return Math.round(e);const t=i.lightness();return null==t||Number.isNaN(t)?50:Math.round(t)})()),[p,h]=Ke((()=>{const e=a.alpha();if(null!=e&&!Number.isNaN(e))return Math.round(100*e);const t=i.alpha();return null==t||Number.isNaN(t)?100:Math.round(100*t)})()),[m,g]=Ke("hex"),v=Ae(e?nn(e).hex():nn(t).hex()),y=Ae(!0);return We((()=>{if(e){const t=nn(e),[n,r,o]=t.hsl().array();s(Math.round(n||0)),c(Math.round(r||0)),f(Math.round(o||0)),h(Math.round(100*(t.alpha()||0))),v.current=t.hex(),y.current=!0}}),[e]),We((()=>{if(y.current)y.current=!1;else if(n){const e=nn.hsl(l,u,d).alpha(p/100);if(e.hex()!==v.current){const t=e.rgb().array();n([t[0],t[1],t[2],p/100])}}}),[l,u,d,p,n]),D.jsx(r6.Provider,{value:{hue:l,saturation:u,lightness:d,alpha:p,mode:m,setHue:s,setSaturation:c,setLightness:f,setAlpha:h,setMode:g},children:D.jsx("div",{className:te("flex size-full flex-col gap-s",r),...o,children:o.children})})},ste=V8((({className:e,...t})=>{const n=Ae(null),[r,o]=Ke(!1),[a,i]=Ke(0),[l,s]=Ke(0),{hue:u,saturation:c,lightness:d,setSaturation:f,setLightness:p}=ed(),h=or((()=>`linear-gradient(0deg, rgba(0,0,0,1), rgba(0,0,0,0)),\n linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)),\n hsl(${u}, 100%, 50%)`),[u]);We((()=>{if(!r){const e=c/100,t=e<.01?100:50+50*(1-e),n=t>0?1-d/t:0;i(Math.max(0,Math.min(1,e))),s(Math.max(0,Math.min(1,n)))}}),[c,d,r]);const m=Ge(((e,t)=>{if(!n.current)return;const r=n.current.getBoundingClientRect(),o=Math.max(0,Math.min(1,(e-r.left)/r.width)),a=Math.max(0,Math.min(1,(t-r.top)/r.height));i(o),s(a),f(100*o);p((o<.01?100:50+50*(1-o))*(1-a))}),[f,p]),g=Ge((e=>{r&&m(e.clientX,e.clientY)}),[r,m]);return We((()=>{const e=()=>o(!1);return r&&(window.addEventListener("pointermove",g),window.addEventListener("pointerup",e)),()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",e)}}),[r,g]),D.jsx("div",{className:te("relative size-full cursor-crosshair rounded",e),onPointerDown:e=>{e.preventDefault(),o(!0),m(e.clientX,e.clientY)},ref:n,style:{background:h},...t,children:D.jsx("div",{className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white",style:{left:100*a+"%",top:100*l+"%",boxShadow:"0 0 0 1px rgba(0,0,0,0.5)"}})})}));ste.displayName="ColorPickerSelection";const _ae=({className:e,...t})=>{const{hue:n,setHue:r}=ed();return D.jsxs(JM,{className:te("relative flex h-4 w-full touch-none",e),max:360,onValueChange:([e])=>r(e),step:1,value:[n],...t,children:[D.jsx(e6,{className:"relative my-0.5 h-3 w-full grow rounded-full bg-[linear-gradient(90deg,#FF0000,#FFFF00,#00FF00,#00FFFF,#0000FF,#FF00FF,#FF0000)]",children:D.jsx(t6,{className:"absolute h-full"})}),D.jsx(n6,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]})},$ae=({className:e,...t})=>{const{alpha:n,setAlpha:r}=ed();return D.jsxs(JM,{className:te("relative flex h-4 w-full touch-none",e),max:100,onValueChange:([e])=>r(e),step:1,value:[n],...t,children:[D.jsxs(e6,{className:"relative my-0.5 h-3 w-full grow rounded-full",style:{background:'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==") left center'},children:[D.jsx("div",{className:"absolute inset-0 rounded-full bg-gradient-to-r from-transparent to-black/50"}),D.jsx(t6,{className:"absolute h-full rounded-full bg-transparent"})]}),D.jsx(n6,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]})},Sae=({className:e,...t})=>{const{setHue:n,setSaturation:r,setLightness:o,setAlpha:a}=ed();return D.jsx(Is,{className:te("shrink-0 rounded-lg text-muted-foreground",e),onClick:()=>{(async()=>{try{if(!window.EyeDropper)throw new Error("EyeDropper API not supported");const e=nn((await(new window.EyeDropper).open()).sRGBHex),[t,i,l]=e.hsl().array();n(t),r(i),o(l),a(100)}catch(e){console.error("EyeDropper failed:",e)}})()},size:"icon_l",variant:"secondary",type:"button",...t,children:D.jsx(P7,{size:24})})},cte=["hex","rgb","css","hsl"],Cae=({...e})=>{const{mode:t,setMode:n}=ed();return D.jsxs(Fv,{onValueChange:n,value:t,children:[D.jsx(j2,{className:"h-8 w-20 shrink-0 text-xs",...e,children:D.jsx(M2,{placeholder:"Mode"})}),D.jsx(Wv,{children:cte.map((e=>D.jsx(L2,{className:"text-xs",value:e,children:e.toUpperCase()},e)))})]})},u_=({className:e,...t})=>D.jsxs("div",{className:"relative",children:[D.jsx(Wc,{readOnly:!0,type:"text",...t,className:te("h-8 w-[3.25rem] rounded-l-none bg-secondary px-xxs text-xs shadow-none",e)}),D.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground",children:"%"})]}),Eae=({className:e,hidePercentage:t=!0,...n})=>{const{hue:r,saturation:o,lightness:a,alpha:i,mode:l}=ed(),s=nn.hsl(r,o,a,i/100);if("hex"===l){const r=s.hex();return D.jsxs("div",{className:te("relative flex w-full items-center -space-x-px rounded-md shadow-sm",e),...n,children:[D.jsx(Wc,{className:"h-8 rounded-r-none bg-secondary px-2 text-xs shadow-none",readOnly:!0,type:"text",value:r}),!t&&D.jsx(u_,{value:i})]})}if("rgb"===l){const t=s.rgb().array().map((e=>Math.round(e)));return D.jsxs("div",{className:te("flex items-center -space-x-px rounded-md shadow-sm",e),...n,children:[t.map(((t,n)=>D.jsx(Wc,{className:te("h-8 rounded-r-none bg-secondary px-xxs text-xs shadow-none",n&&"rounded-l-none",e),readOnly:!0,type:"text",value:t},n))),D.jsx(u_,{value:i})]})}if("css"===l){const t=s.rgb().array().map((e=>Math.round(e)));return D.jsx("div",{className:te("w-full rounded-md shadow-sm",e),...n,children:D.jsx(Wc,{className:"h-8 w-full bg-secondary px-xxs text-xs shadow-none",readOnly:!0,type:"text",value:`rgba(${t.join(", ")}, ${i}%)`,...n})})}if("hsl"===l){const t=s.hsl().array().map((e=>Math.round(e)));return D.jsxs("div",{className:te("flex items-center -space-x-px rounded-md shadow-sm",e),...n,children:[t.map(((t,n)=>D.jsx(Wc,{className:te("h-8 rounded-r-none bg-secondary px-xxs text-xs shadow-none",n&&"rounded-l-none",e),readOnly:!0,type:"text",value:t},n))),D.jsx(u_,{value:i})]})}return null},Pae=ZQ,lte=JQ,ute=eZ,dte=$a("z-tooltip animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 relative data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md text-sm px-3 py-1.5",small:"rounded-sm p-xxs text-sm"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-gray-800 text-gray-50 [&_svg]:fill-gray-700"},defaultVariants:{size:"small",theme:"dark"}}}),o6=O.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,children:o,isPortal:a=!0,withArrow:i=!0,...l},s)=>{const u=D.jsx(D.Fragment,{children:D.jsxs(QA,{ref:s,sideOffset:t,className:te(dte({size:n,theme:r,className:e})),...l,children:[o,i&&D.jsxs(D.Fragment,{children:[D.jsx(nZ,{height:4,width:8}),D.jsx("div",{className:"absolute bottom-0 left-0 h-full w-full rounded-sm border border-gray-700"})]})]})});return a?D.jsx(tZ,{children:u}):u}));o6.displayName=QA.displayName;const fte=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>D.jsxs(lte,{children:[D.jsx(ute,{className:n,...r,children:e}),t&&D.jsx(o6,{...o,children:t})]}),Oae=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>D.jsx("div",{className:"hidden",children:D.jsx("input",{type:"file","data-button":"input file",accept:e,multiple:t,onChange:({target:e})=>{if(!e.files)return;const t=Array.from(e.files).map((e=>({file:e,objectUrl:URL.createObjectURL(e)})));n(t),e.value=""},onClick:e=>{e.stopPropagation(),r&&e.preventDefault()}})});function pte(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function i6(...e){return t=>e.forEach((e=>pte(e,t)))}function a6(...e){return Ge(i6(...e),e)}let d_=0;function hte(){We((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:f3()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:f3()),d_++,()=>{1===d_&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),d_--}}),[])}function f3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}function mte(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function gte(...e){return t=>e.forEach((e=>mte(e,t)))}function vte(...e){return Ge(gte(...e),e)}const f_="focusScope.autoFocusOnMount",p_="focusScope.autoFocusOnUnmount",p3={bubbles:!1,cancelable:!0},yte=ye(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=Ke(null),u=Rs(o),c=Rs(a),d=Ae(null),f=vte(t,(e=>s(e))),p=Ae({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;We((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ic(d.current,{select:!0})},t=function(e){p.paused||!l||l.contains(e.relatedTarget)||Ic(d.current,{select:!0})};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),We((()=>{if(l){m3.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(f_,p3);l.addEventListener(f_,u),l.dispatchEvent(t),t.defaultPrevented||(bte(Ste(s6(l)),{select:!0}),document.activeElement===e&&Ic(l))}return()=>{l.removeEventListener(f_,u),setTimeout((()=>{const t=new CustomEvent(p_,p3);l.addEventListener(p_,c),l.dispatchEvent(t),t.defaultPrevented||Ic(e??document.body,{select:!0}),l.removeEventListener(p_,c),m3.remove(p)}),0)}}}),[l,u,c,p]);const h=Ge((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=wte(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ic(a,{select:!0})):(e.preventDefault(),n&&Ic(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return q(Ns.div,he({tabIndex:-1},i,{ref:f,onKeyDown:h}))}));function bte(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ic(r,{select:t}),document.activeElement!==n)return}function wte(e){const t=s6(e);return[h3(t,e),h3(t.reverse(),e)]}function s6(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function h3(e,t){for(const n of e)if(!xte(n,{upTo:t}))return n}function xte(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function _te(e){return e instanceof HTMLInputElement&&"select"in e}function Ic(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_te(e)&&t&&e.select()}}const m3=$te();function $te(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=g3(e,t),e.unshift(t)},remove(t){var n;e=g3(e,t),null===(n=e[0])||void 0===n||n.resume()}}}function g3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function Ste(e){return e.filter((e=>"A"!==e.tagName))}const Cte=O.useId||(()=>{});let Ete=0;function Pte(e){const[t,n]=O.useState(Cte());return ws((()=>{e||n((e=>e??String(Ete++)))}),[e]),e||(t?`radix-${t}`:"")}const c6=ye(((e,t)=>{const{children:n,...r}=e,o=ir.toArray(n),a=o.find(Rte);if(a){const e=a.props.children,n=o.map((t=>t===a?ir.count(e)>1?ir.only(null):Po(e)?e.props.children:null:t));return q(p$,he({},r,{ref:t}),Po(e)?_a(e,void 0,n):null)}return q(p$,he({},r,{ref:t}),n)}));c6.displayName="Slot";const p$=ye(((e,t)=>{const{children:n,...r}=e;return Po(n)?_a(n,{...Tte(r,n.props),ref:i6(t,n.ref)}):ir.count(n)>1?ir.only(null):null}));p$.displayName="SlotClone";const Ote=({children:e})=>q(As,null,e);function Rte(e){return Po(e)&&e.type===Ote}function Tte(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const l6="Popover",[u6,Rae]=F2(l6,[zv]),Qv=zv(),[Nte,rl]=u6(l6),kte=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Qv(t),s=Ae(null),[u,c]=Ke(!1),[d=!1,f]=nA({prop:r,defaultProp:o,onChange:a});return q(vA,l,q(Nte,{scope:t,contentId:Pte(),triggerRef:s,open:d,onOpenChange:f,onOpenToggle:Ge((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:Ge((()=>c(!0)),[]),onCustomAnchorRemove:Ge((()=>c(!1)),[]),modal:i},n))},Dte="PopoverAnchor",Ate=ye(((e,t)=>{const{__scopePopover:n,...r}=e,o=rl(Dte,n),a=Qv(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return We((()=>(i(),()=>l())),[i,l]),q(z2,he({},a,r,{ref:t}))})),Mte="PopoverTrigger",Ite=ye(((e,t)=>{const{__scopePopover:n,...r}=e,o=rl(Mte,n),a=Qv(n),i=a6(t,o.triggerRef),l=q(Ns.button,he({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":p6(o.open)},r,{ref:i,onClick:Or(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?l:q(z2,he({asChild:!0},a),l)})),d6="PopoverPortal",[jte,Lte]=u6(d6,{forceMount:void 0}),Fte=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=rl(d6,t);return q(jte,{scope:t,forceMount:n},q(Zp,{present:n||a.open},q(bA,{asChild:!0,container:o},r)))},Dp="PopoverContent",Wte=ye(((e,t)=>{const n=Lte(Dp,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=rl(Dp,e.__scopePopover);return q(Zp,{present:r||a.open},a.modal?q(Bte,he({},o,{ref:t})):q(qte,he({},o,{ref:t})))})),Bte=ye(((e,t)=>{const n=rl(Dp,e.__scopePopover),r=Ae(null),o=a6(t,r),a=Ae(!1);return We((()=>{const e=r.current;if(e)return jp(e)}),[]),q(Ip,{as:c6,allowPinchZoom:!0},q(f6,he({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Or(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),a.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Or(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Or(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),qte=ye(((e,t)=>{const n=rl(Dp,e.__scopePopover),r=Ae(!1);return q(f6,he({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,a;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault()}}))})),f6=ye(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:c,...d}=e,f=rl(Dp,n),p=Qv(n);return hte(),q(yte,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a},q(wA,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1)},q(yA,he({"data-state":p6(f.open),role:"dialog",id:f.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}));function p6(e){return e?"open":"closed"}const zte=kte,Ute=Ate,Hte=Ite,Vte=Fte,Gte=Wte;function Tae({...e}){return D.jsx(zte,{"data-slot":"popover",...e})}function Nae({...e}){return D.jsx(Hte,{"data-slot":"popover-trigger",...e})}function kae({className:e,align:t="center",sideOffset:n=4,withPortal:r,animate:o=!0,...a}){const i=D.jsx(Gte,{"data-slot":"popover-content",align:t,sideOffset:n,className:te("origin-(--radix-popover-content-transform-origin) outline-hidden z-50 flex w-[100vw] max-w-[600px] flex-col gap-xs rounded-lg border border-gray-200 bg-popover px-none py-xs text-popover-foreground shadow-[0_0_12px_0_rgba(0,0,0,0.15)] data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e,o&&"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),...a});return r?D.jsx(Vte,{children:i}):i}function Dae({...e}){return D.jsx(Ute,{"data-slot":"popover-anchor",...e})}function Kte(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const h_={},sp={};function Bc(e,t){try{const n=(h_[e]||(h_[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in sp?sp[n]:v3(n,n.split(":"))}catch{if(e in sp)return sp[e];const t=null==e?void 0:e.match(Yte);return t?v3(e,t.slice(1)):NaN}}const Yte=/([+-]\d\d):?(\d\d)?/;function v3(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return sp[e]=60*n+r>0?60*n+r+o:60*n-r-o}class Ii extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Bc(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),h6(this),h$(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Ii(...t,e):new Ii(Date.now(),e)}withTimeZone(e){return new Ii(+this,e)}getTimezoneOffset(){const e=-Bc(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),h$(this),+this}[Symbol.for("constructDateFrom")](e){return new Ii(+new Date(e),this.timeZone)}}const y3=/^(get|set)(?!UTC)/;function h$(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-Bc(e.timeZone,e)))}function Xte(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),h6(e)}function h6(e){const t=Bc(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=o- -new Date(+r).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const s=new Date(+e);s.setUTCSeconds(0);const u=o>0?s.getSeconds():(s.getSeconds()-60)%60,c=Math.round(-60*Bc(e.timeZone,e))%60;(c||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+c),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+c+u));const d=Bc(e.timeZone,e),f=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-f-l;if(f!==n&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const t=Bc(e.timeZone,e),n=f-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!y3.test(e))return;const t=e.replace(y3,"$1UTC");Ii.prototype[t]&&(e.startsWith("get")?Ii.prototype[e]=function(){return this.internal[t]()}:(Ii.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Xte(this),+this},Ii.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),h$(this),+this}))}));class Er extends Ii{static tz(e,...t){return t.length?new Er(...t,e):new Er(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${null==e?void 0:e.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${Kte(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:(null==t?void 0:t.timeZone)||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:(null==t?void 0:t.timeZone)||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:(null==t?void 0:t.timeZone)||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Er(+this,e)}[Symbol.for("constructDateFrom")](e){return new Er(+new Date(e),this.timeZone)}}const m6=6048e5,Qte=864e5,b3=Symbol.for("constructDateFrom");function Vn(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&b3 in e?e[b3](t):e instanceof Date?new e.constructor(t):new Date(t)}function Kt(e,t){return Vn(t||e,e)}function g6(e,t,n){const r=Kt(e,null==n?void 0:n.in);return isNaN(t)?Vn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function v6(e,t,n){const r=Kt(e,null==n?void 0:n.in);if(isNaN(t))return Vn(e,NaN);if(!t)return r;const o=r.getDate(),a=Vn(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);return o>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Zte={};function th(){return Zte}function Wu(e,t){var n,r,o,a;const i=th(),l=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??i.weekStartsOn??(null==(a=null==(o=i.locale)?void 0:o.options)?void 0:a.weekStartsOn)??0,s=Kt(e,null==t?void 0:t.in),u=s.getDay(),c=(u<l?7:0)+u-l;return s.setDate(s.getDate()-c),s.setHours(0,0,0,0),s}function Ap(e,t){return Wu(e,{...t,weekStartsOn:1})}function y6(e,t){const n=Kt(e,null==t?void 0:t.in),r=n.getFullYear(),o=Vn(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Ap(o),i=Vn(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const l=Ap(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function w3(e){const t=Kt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function td(e,...t){const n=Vn.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}function Mp(e,t){const n=Kt(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function b6(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t),a=Mp(r),i=Mp(o),l=+a-w3(a),s=+i-w3(i);return Math.round((l-s)/Qte)}function Jte(e,t){const n=y6(e,t),r=Vn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ap(r)}function ene(e,t,n){return g6(e,7*t,n)}function tne(e,t,n){return v6(e,12*t,n)}function nne(e,t){let n,r=null==t?void 0:t.in;return e.forEach((e=>{!r&&"object"==typeof e&&(r=Vn.bind(null,e));const t=Kt(e,r);(!n||n<t||isNaN(+t))&&(n=t)})),Vn(r,n||NaN)}function rne(e,t){let n,r=null==t?void 0:t.in;return e.forEach((e=>{!r&&"object"==typeof e&&(r=Vn.bind(null,e));const t=Kt(e,r);(!n||n>t||isNaN(+t))&&(n=t)})),Vn(r,n||NaN)}function one(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t);return+Mp(r)==+Mp(o)}function w6(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function ine(e){return!(!w6(e)&&"number"!=typeof e||isNaN(+Kt(e)))}function ane(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}function sne(e,t){const n=Kt(e,null==t?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function cne(e,t){const[n,r]=td(e,t.start,t.end);return{start:n,end:r}}function lne(e,t){const{start:n,end:r}=cne(null==t?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);const l=[];for(;+i<=a;)l.push(Vn(n,i)),i.setMonth(i.getMonth()+1);return o?l.reverse():l}function une(e,t){const n=Kt(e,null==t?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function dne(e,t){const n=Kt(e,null==t?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function x6(e,t){const n=Kt(e,null==t?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function _6(e,t){var n,r,o,a;const i=th(),l=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??i.weekStartsOn??(null==(a=null==(o=i.locale)?void 0:o.options)?void 0:a.weekStartsOn)??0,s=Kt(e,null==t?void 0:t.in),u=s.getDay(),c=6+(u<l?-7:0)-(u-l);return s.setDate(s.getDate()+c),s.setHours(23,59,59,999),s}function fne(e,t){return _6(e,{...t,weekStartsOn:1})}const pne={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"}},hne=(e,t,n)=>{let r;const o=pne[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function m_(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const mne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},gne={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vne={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yne={date:m_({formats:mne,defaultWidth:"full"}),time:m_({formats:gne,defaultWidth:"full"}),dateTime:m_({formats:vne,defaultWidth:"full"})},bne={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wne=(e,t,n,r)=>bne[e];function tp(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const xne={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_ne={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$ne={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"]},Sne={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"]},Cne={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"}},Ene={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"}},Pne=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},One={ordinalNumber:Pne,era:tp({values:xne,defaultWidth:"wide"}),quarter:tp({values:_ne,defaultWidth:"wide",argumentCallback:e=>e-1}),month:tp({values:$ne,defaultWidth:"wide"}),day:tp({values:Sne,defaultWidth:"wide"}),dayPeriod:tp({values:Cne,defaultWidth:"wide",formattingValues:Ene,defaultFormattingWidth:"wide"})};function np(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?Tne(l,(e=>e.test(i))):Rne(l,(e=>e.test(i)));let u;u=e.valueCallback?e.valueCallback(s):s,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(i.length)}}}function Rne(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Tne(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Nne(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;return{value:i,rest:t.slice(o.length)}}}const kne=/^(\d+)(th|st|nd|rd)?/i,Dne=/\d+/i,Ane={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},Mne={any:[/^b/i,/^(a|c)/i]},Ine={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jne={any:[/1/i,/2/i,/3/i,/4/i]},Lne={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},Fne={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]},Wne={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},Bne={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]},qne={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},zne={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}},Une={ordinalNumber:Nne({matchPattern:kne,parsePattern:Dne,valueCallback:e=>parseInt(e,10)}),era:np({matchPatterns:Ane,defaultMatchWidth:"wide",parsePatterns:Mne,defaultParseWidth:"any"}),quarter:np({matchPatterns:Ine,defaultMatchWidth:"wide",parsePatterns:jne,defaultParseWidth:"any",valueCallback:e=>e+1}),month:np({matchPatterns:Lne,defaultMatchWidth:"wide",parsePatterns:Fne,defaultParseWidth:"any"}),day:np({matchPatterns:Wne,defaultMatchWidth:"wide",parsePatterns:Bne,defaultParseWidth:"any"}),dayPeriod:np({matchPatterns:qne,defaultMatchWidth:"any",parsePatterns:zne,defaultParseWidth:"any"})},iS={code:"en-US",formatDistance:hne,formatLong:yne,formatRelative:wne,localize:One,match:Une,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Hne(e,t){const n=Kt(e,null==t?void 0:t.in);return b6(n,x6(n))+1}function $6(e,t){const n=Kt(e,null==t?void 0:t.in),r=+Ap(n)-+Jte(n);return Math.round(r/m6)+1}function S6(e,t){var n,r,o,a;const i=Kt(e,null==t?void 0:t.in),l=i.getFullYear(),s=th(),u=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??(null==(a=null==(o=s.locale)?void 0:o.options)?void 0:a.firstWeekContainsDate)??1,c=Vn((null==t?void 0:t.in)||e,0);c.setFullYear(l+1,0,u),c.setHours(0,0,0,0);const d=Wu(c,t),f=Vn((null==t?void 0:t.in)||e,0);f.setFullYear(l,0,u),f.setHours(0,0,0,0);const p=Wu(f,t);return+i>=+d?l+1:+i>=+p?l:l-1}function Vne(e,t){var n,r,o,a;const i=th(),l=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??i.firstWeekContainsDate??(null==(a=null==(o=i.locale)?void 0:o.options)?void 0:a.firstWeekContainsDate)??1,s=S6(e,t),u=Vn((null==t?void 0:t.in)||e,0);return u.setFullYear(s,0,l),u.setHours(0,0,0,0),Wu(u,t)}function C6(e,t){const n=Kt(e,null==t?void 0:t.in),r=+Wu(n,t)-+Vne(n,t);return Math.round(r/m6)+1}function Wt(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const gs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Wt("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Wt(n+1,2)},d:(e,t)=>Wt(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Wt(e.getHours()%12||12,t.length),H:(e,t)=>Wt(e.getHours(),t.length),m:(e,t)=>Wt(e.getMinutes(),t.length),s:(e,t)=>Wt(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Wt(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Su={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},x3={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return gs.y(e,t)},Y:function(e,t,n,r){const o=S6(e,r),a=o>0?o:1-o;if("YY"===t){return Wt(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Wt(a,t.length)},R:function(e,t){return Wt(y6(e),t.length)},u:function(e,t){return Wt(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Wt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Wt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return gs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Wt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=C6(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Wt(o,t.length)},I:function(e,t,n){const r=$6(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Wt(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):gs.d(e,t)},D:function(e,t,n){const r=Hne(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Wt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Wt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Wt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Wt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?Su.noon:0===r?Su.midnight:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?Su.evening:r>=12?Su.afternoon:r>=4?Su.morning:Su.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return gs.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):gs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Wt(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Wt(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):gs.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):gs.s(e,t)},S:function(e,t){return gs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return $3(r);case"XXXX":case"XX":return jc(r);default:return jc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $3(r);case"xxxx":case"xx":return jc(r);default:return jc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_3(r,":");default:return"GMT"+jc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_3(r,":");default:return"GMT"+jc(r,":")}},t:function(e,t,n){return Wt(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Wt(+e,t.length)}};function _3(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+Wt(a,2)}function $3(e,t){return e%60==0?(e>0?"-":"+")+Wt(Math.abs(e)/60,2):jc(e,t)}function jc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Wt(Math.trunc(r/60),2)+t+Wt(r%60,2)}const S3=(e,t)=>{switch(e){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"})}},E6=(e,t)=>{switch(e){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"})}},Gne=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return S3(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",S3(r,t)).replace("{{time}}",E6(o,t))},Kne={p:E6,P:Gne},Yne=/^D+$/,Xne=/^Y+$/,Qne=["D","DD","YY","YYYY"];function Zne(e){return Yne.test(e)}function Jne(e){return Xne.test(e)}function ere(e,t,n){const r=tre(e,t,n);if(console.warn(r),Qne.includes(e))throw new RangeError(r)}function tre(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const nre=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rre=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ore=/^'([^]*?)'?$/,ire=/''/g,are=/[a-zA-Z]/;function sre(e,t,n){var r,o,a,i,l,s,u,c;const d=th(),f=(null==n?void 0:n.locale)??d.locale??iS,p=(null==n?void 0:n.firstWeekContainsDate)??(null==(o=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(i=null==(a=d.locale)?void 0:a.options)?void 0:i.firstWeekContainsDate)??1,h=(null==n?void 0:n.weekStartsOn)??(null==(s=null==(l=null==n?void 0:n.locale)?void 0:l.options)?void 0:s.weekStartsOn)??d.weekStartsOn??(null==(c=null==(u=d.locale)?void 0:u.options)?void 0:c.weekStartsOn)??0,m=Kt(e,null==n?void 0:n.in);if(!ine(m))throw new RangeError("Invalid time value");let g=t.match(rre).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Kne[t])(e,f.formatLong)}return e})).join("").match(nre).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:cre(e)};if(x3[t])return{isToken:!0,value:e};if(t.match(are))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));f.localize.preprocessor&&(g=f.localize.preprocessor(m,g));const v={firstWeekContainsDate:p,weekStartsOn:h,locale:f};return g.map((r=>{if(!r.isToken)return r.value;const o=r.value;((null==n||!n.useAdditionalWeekYearTokens)&&Jne(o)||(null==n||!n.useAdditionalDayOfYearTokens)&&Zne(o))&&ere(o,t,String(e));return(0,x3[o[0]])(m,o,f.localize,v)})).join("")}function cre(e){const t=e.match(ore);return t?t[1].replace(ire,"'"):e}function lre(e,t){const n=Kt(e,null==t?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Vn(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function ure(e,t){return Kt(e,null==t?void 0:t.in).getMonth()}function dre(e,t){return Kt(e,null==t?void 0:t.in).getFullYear()}function fre(e,t){return+Kt(e)>+Kt(t)}function pre(e,t){return+Kt(e)<+Kt(t)}function hre(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function mre(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function gre(e,t,n){const r=Kt(e,null==n?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=Vn(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const l=lre(i);return r.setMonth(t,Math.min(a,l)),r}function vre(e,t,n){const r=Kt(e,null==n?void 0:n.in);return isNaN(+r)?Vn(e,NaN):(r.setFullYear(t),r)}const C3=5,yre=4;function bre(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),a=t.addDays(o,34);return t.getMonth(e)===t.getMonth(a)?5:4}function P6(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function wre(e,t){const n=P6(e,t),r=bre(e,t);return t.addDays(n,7*r-1)}class Ra{constructor(e,t){this.Date=Date,this.today=()=>{var e;return null!=(e=this.overrides)&&e.today?this.overrides.today():this.options.timeZone?Er.tz(this.options.timeZone):new this.Date},this.newDate=(e,t,n)=>{var r;return null!=(r=this.overrides)&&r.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new Er(e,t,n,this.options.timeZone):new Date(e,t,n)},this.addDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addDays?this.overrides.addDays(e,t):g6(e,t)},this.addMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addMonths?this.overrides.addMonths(e,t):v6(e,t)},this.addWeeks=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addWeeks?this.overrides.addWeeks(e,t):ene(e,t)},this.addYears=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addYears?this.overrides.addYears(e,t):tne(e,t)},this.differenceInCalendarDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):b6(e,t)},this.differenceInCalendarMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):ane(e,t)},this.eachMonthOfInterval=e=>{var t;return null!=(t=this.overrides)&&t.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):lne(e)},this.endOfBroadcastWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):wre(e,this)},this.endOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfISOWeek?this.overrides.endOfISOWeek(e):fne(e)},this.endOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.endOfMonth?this.overrides.endOfMonth(e):sne(e)},this.endOfWeek=(e,t)=>{var n;return null!=(n=this.overrides)&&n.endOfWeek?this.overrides.endOfWeek(e,t):_6(e,this.options)},this.endOfYear=e=>{var t;return null!=(t=this.overrides)&&t.endOfYear?this.overrides.endOfYear(e):dne(e)},this.format=(e,t,n)=>{var r;const o=null!=(r=this.overrides)&&r.format?this.overrides.format(e,t,this.options):sre(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(o):o},this.getISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.getISOWeek?this.overrides.getISOWeek(e):$6(e)},this.getMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.getMonth?this.overrides.getMonth(e,this.options):ure(e,this.options)},this.getYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.getYear?this.overrides.getYear(e,this.options):dre(e,this.options)},this.getWeek=(e,t)=>{var n;return null!=(n=this.overrides)&&n.getWeek?this.overrides.getWeek(e,this.options):C6(e,this.options)},this.isAfter=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isAfter?this.overrides.isAfter(e,t):fre(e,t)},this.isBefore=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isBefore?this.overrides.isBefore(e,t):pre(e,t)},this.isDate=e=>{var t;return null!=(t=this.overrides)&&t.isDate?this.overrides.isDate(e):w6(e)},this.isSameDay=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameDay?this.overrides.isSameDay(e,t):one(e,t)},this.isSameMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameMonth?this.overrides.isSameMonth(e,t):hre(e,t)},this.isSameYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameYear?this.overrides.isSameYear(e,t):mre(e,t)},this.max=e=>{var t;return null!=(t=this.overrides)&&t.max?this.overrides.max(e):nne(e)},this.min=e=>{var t;return null!=(t=this.overrides)&&t.min?this.overrides.min(e):rne(e)},this.setMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setMonth?this.overrides.setMonth(e,t):gre(e,t)},this.setYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setYear?this.overrides.setYear(e,t):vre(e,t)},this.startOfBroadcastWeek=(e,t)=>{var n;return null!=(n=this.overrides)&&n.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):P6(e,this)},this.startOfDay=e=>{var t;return null!=(t=this.overrides)&&t.startOfDay?this.overrides.startOfDay(e):Mp(e)},this.startOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.startOfISOWeek?this.overrides.startOfISOWeek(e):Ap(e)},this.startOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.startOfMonth?this.overrides.startOfMonth(e):une(e)},this.startOfWeek=(e,t)=>{var n;return null!=(n=this.overrides)&&n.startOfWeek?this.overrides.startOfWeek(e,this.options):Wu(e,this.options)},this.startOfYear=e=>{var t;return null!=(t=this.overrides)&&t.startOfYear?this.overrides.startOfYear(e):x6(e)},this.options={locale:iS,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,(e=>t[e]||e))}formatNumber(e){return this.replaceDigits(e.toString())}}const qi=new Ra;class O6{constructor(e,t,n=qi){this.date=e,this.displayMonth=t,this.outside=!(!t||n.isSameMonth(e,t)),this.dateLib=n}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class xre{constructor(e,t){this.date=e,this.weeks=t}}class _re{constructor(e,t){this.days=t,this.weekNumber=e}}function $re(e){return re.createElement("button",{...e})}function Sre(e){return re.createElement("span",{...e})}function Cre(e){const{size:t=24,orientation:n="left",className:r}=e;return re.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&re.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&re.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&re.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&re.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Ere(e){const{day:t,modifiers:n,...r}=e;return re.createElement("td",{...r})}function Pre(e){const{day:t,modifiers:n,...r}=e,o=re.useRef(null);return re.useEffect((()=>{var e;n.focused&&(null==(e=o.current)||e.focus())}),[n.focused]),re.createElement("button",{ref:o,...r})}var ut,hn,oi,$o;function Ore(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[ut.Dropdown],n].join(" "),l=null==t?void 0:t.find((({value:e})=>e===a.value));return re.createElement("span",{"data-disabled":a.disabled,className:o[ut.DropdownRoot]},re.createElement(r.Select,{className:i,...a},null==t?void 0:t.map((({value:e,label:t,disabled:n})=>re.createElement(r.Option,{key:e,value:e,disabled:n},t)))),re.createElement("span",{className:o[ut.CaptionLabel],"aria-hidden":!0},null==l?void 0:l.label,re.createElement(r.Chevron,{orientation:"down",size:18,className:o[ut.Chevron]})))}function Rre(e){return re.createElement("div",{...e})}function Tre(e){return re.createElement("div",{...e})}function Nre(e){const{calendarMonth:t,displayIndex:n,...r}=e;return re.createElement("div",{...r},e.children)}function kre(e){const{calendarMonth:t,displayIndex:n,...r}=e;return re.createElement("div",{...r})}function Dre(e){return re.createElement("table",{...e})}function Are(e){return re.createElement("div",{...e})}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(ut||(ut={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(hn||(hn={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(oi||(oi={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}($o||($o={}));const R6=ji(void 0);function nh(){const e=Ds(R6);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}function Mre(e){const{components:t}=nh();return re.createElement(t.Dropdown,{...e})}function Ire(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:l,labels:{labelPrevious:s,labelNext:u}}=nh(),c=Ge((e=>{o&&(null==n||n(e))}),[o,n]),d=Ge((e=>{r&&(null==t||t(e))}),[r,t]);return re.createElement("nav",{...a},re.createElement(i.PreviousMonthButton,{type:"button",className:l[ut.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":s(r),onClick:d},re.createElement(i.Chevron,{disabled:!r||void 0,className:l[ut.Chevron],orientation:"left"})),re.createElement(i.NextMonthButton,{type:"button",className:l[ut.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":u(o),onClick:c},re.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:l[ut.Chevron]})))}function jre(e){const{components:t}=nh();return re.createElement(t.Button,{...e})}function Lre(e){return re.createElement("option",{...e})}function Fre(e){const{components:t}=nh();return re.createElement(t.Button,{...e})}function Wre(e){const{rootRef:t,...n}=e;return re.createElement("div",{...n,ref:t})}function Bre(e){return re.createElement("select",{...e})}function qre(e){const{week:t,...n}=e;return re.createElement("tr",{...n})}function zre(e){return re.createElement("th",{...e})}function Ure(e){return re.createElement("thead",{"aria-hidden":!0},re.createElement("tr",{...e}))}function Hre(e){const{week:t,...n}=e;return re.createElement("th",{...n})}function Vre(e){return re.createElement("th",{...e})}function Gre(e){return re.createElement("tbody",{...e})}function Kre(e){const{components:t}=nh();return re.createElement(t.Dropdown,{...e})}const Yre=Object.freeze(Object.defineProperty({__proto__:null,Button:$re,CaptionLabel:Sre,Chevron:Cre,Day:Ere,DayButton:Pre,Dropdown:Ore,DropdownNav:Rre,Footer:Tre,Month:Nre,MonthCaption:kre,MonthGrid:Dre,Months:Are,MonthsDropdown:Mre,Nav:Ire,NextMonthButton:jre,Option:Lre,PreviousMonthButton:Fre,Root:Wre,Select:Bre,Week:qre,WeekNumber:Hre,WeekNumberHeader:Vre,Weekday:zre,Weekdays:Ure,Weeks:Gre,YearsDropdown:Kre},Symbol.toStringTag,{value:"Module"}));function ha(e,t,n=!1,r=qi){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:l}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?l(a,t):!(n||!o)&&l(o,t)}function T6(e){return!!(e&&"object"==typeof e&&"before"in e&&"after"in e)}function aS(e){return!(!e||"object"!=typeof e||!("from"in e))}function N6(e){return!(!e||"object"!=typeof e||!("after"in e))}function k6(e){return!(!e||"object"!=typeof e||!("before"in e))}function D6(e){return!(!e||"object"!=typeof e||!("dayOfWeek"in e))}function A6(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ma(e,t,n=qi){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some((t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(A6(t,n))return t.includes(e);if(aS(t))return ha(t,e,!1,n);if(D6(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(T6(t)){const n=a(t.before,e)>0,r=a(t.after,e)<0;return i(t.before,t.after)?r&&n:n||r}return N6(t)?a(e,t.after)>0:k6(t)?a(t.before,e)>0:"function"==typeof t&&t(e)}))}function Xre(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:l,showOutsideDays:s,broadcastCalendar:u,today:c}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:h,endOfMonth:m,isAfter:g}=o,v=n&&p(n),y=r&&m(r),b={[hn.focused]:[],[hn.outside]:[],[hn.disabled]:[],[hn.hidden]:[],[hn.today]:[]},w={};for(const t of e){const{date:e,displayMonth:n}=t,r=!(!n||f(e,n)),p=!(!v||!h(e,v)),m=!(!y||!g(e,y)),x=!(!a||!ma(e,a,o)),_=!(!i||!ma(e,i,o))||p||m||!u&&!s&&r||u&&!1===s&&r,O=d(e,c??o.today());r&&b.outside.push(t),x&&b.disabled.push(t),_&&b.hidden.push(t),O&&b.today.push(t),l&&Object.keys(l).forEach((n=>{const r=null==l?void 0:l[n];r&&ma(e,r,o)&&(w[n]?w[n].push(t):w[n]=[t])}))}return e=>{const t={[hn.focused]:!1,[hn.disabled]:!1,[hn.hidden]:!1,[hn.outside]:!1,[hn.today]:!1},n={};for(const n in b){const r=b[n];t[n]=r.some((t=>t===e))}for(const t in w)n[t]=w[t].some((t=>t===e));return{...t,...n}}}function Qre(e,t,n={}){return Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[r])=>(n[r]?e.push(n[r]):t[hn[r]]?e.push(t[hn[r]]):t[oi[r]]&&e.push(t[oi[r]]),e)),[t[ut.Day]])}function Zre(e){return{...Yre,...e}}function Jre(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach((([e,n])=>{e.startsWith("data-")&&(t[e]=n)})),t}function sS(){const e={};for(const t in ut)e[ut[t]]=`rdp-${ut[t]}`;for(const t in hn)e[hn[t]]=`rdp-${hn[t]}`;for(const t in oi)e[oi[t]]=`rdp-${oi[t]}`;for(const t in $o)e[$o[t]]=`rdp-${$o[t]}`;return e}function M6(e,t,n){return(n??new Ra(t)).format(e,"LLLL y")}const eoe=M6;function toe(e,t,n){return(n??new Ra(t)).format(e,"d")}function noe(e,t=qi){return t.format(e,"LLLL")}function roe(e,t,n){return(n??new Ra(t)).format(e,"cccccc")}function ooe(e,t=qi){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function ioe(){return""}function I6(e,t=qi){return t.format(e,"yyyy")}const aoe=I6,soe=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:M6,formatDay:toe,formatMonthCaption:eoe,formatMonthDropdown:noe,formatWeekNumber:ooe,formatWeekNumberHeader:ioe,formatWeekdayName:roe,formatYearCaption:aoe,formatYearDropdown:I6},Symbol.toStringTag,{value:"Module"}));function coe(e){return null!=e&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),null!=e&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...soe,...e}}function loe(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:l,eachMonthOfInterval:s,getMonth:u}=o;return s({start:i(e),end:l(e)}).map((e=>{const i=r.formatMonthDropdown(e,o);return{value:u(e),label:i,disabled:t&&e<a(t)||n&&e>a(n)||!1}}))}function uoe(e,t={},n={}){let r={...null==t?void 0:t[ut.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{r={...r,...null==n?void 0:n[e]}})),r}function doe(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let t=0;t<7;t++){const n=e.addDays(o,t);a.push(n)}return a}function foe(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:i,addYears:l,getYear:s,isBefore:u,isSameYear:c}=r,d=a(e),f=i(t),p=[];let h=d;for(;u(h,f)||c(h,f);)p.push(h),h=l(h,1);return o&&p.reverse(),p.map((e=>{const t=n.formatYearDropdown(e,r);return{value:s(e),label:t,disabled:!1}}))}function j6(e,t,n,r){let o=(r??new Ra(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const poe=j6;function L6(e,t,n){return(n??new Ra(t)).format(e,"LLLL y")}const hoe=L6;function moe(e,t,n,r){let o=(r??new Ra(n)).format(e,"PPPP");return null!=t&&t.today&&(o=`Today, ${o}`),o}function goe(e){return"Choose the Month"}function voe(){return""}function yoe(e){return"Go to the Next Month"}function boe(e){return"Go to the Previous Month"}function woe(e,t,n){return(n??new Ra(t)).format(e,"cccc")}function xoe(e,t){return`Week ${e}`}function _oe(e){return"Week Number"}function $oe(e){return"Choose the Year"}const Soe=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:hoe,labelDay:poe,labelDayButton:j6,labelGrid:L6,labelGridcell:moe,labelMonthDropdown:goe,labelNav:voe,labelNext:yoe,labelPrevious:boe,labelWeekNumber:xoe,labelWeekNumberHeader:_oe,labelWeekday:woe,labelYearDropdown:$oe},Symbol.toStringTag,{value:"Module"})),rh=e=>e instanceof HTMLElement?e:null,g_=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Coe=e=>rh(e.querySelector("[data-animated-month]")),v_=e=>rh(e.querySelector("[data-animated-caption]")),y_=e=>rh(e.querySelector("[data-animated-weeks]")),Eoe=e=>rh(e.querySelector("[data-animated-nav]")),Poe=e=>rh(e.querySelector("[data-animated-weekdays]"));function Ooe(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=Ae(null),l=Ae(r),s=Ae(!1);Xc((()=>{const u=l.current;if(l.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==u.length&&r.length===u.length))return;const c=a.isSameMonth(r[0].date,u[0].date),d=a.isAfter(r[0].date,u[0].date),f=d?n[$o.caption_after_enter]:n[$o.caption_before_enter],p=d?n[$o.weeks_after_enter]:n[$o.weeks_before_enter],h=i.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(g_(m).forEach((e=>{if(!(e instanceof HTMLElement))return;const t=Coe(e);t&&e.contains(t)&&e.removeChild(t);const n=v_(e);n&&n.classList.remove(f);const r=y_(e);r&&r.classList.remove(p)})),i.current=m):i.current=null,s.current||c||o)return;const g=h instanceof HTMLElement?g_(h):[],v=g_(e.current);if(null!=v&&v.every((e=>e instanceof HTMLElement))&&g&&g.every((e=>e instanceof HTMLElement))){s.current=!0,e.current.style.isolation="isolate";const t=Eoe(e.current);t&&(t.style.zIndex="1"),v.forEach(((r,o)=>{const a=g[o];if(!a)return;r.style.position="relative",r.style.overflow="hidden";const i=v_(r);i&&i.classList.add(f);const l=y_(r);l&&l.classList.add(p);a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const u=Poe(a);u&&(u.style.opacity="0");const c=v_(a);c&&(c.classList.add(d?n[$o.caption_before_exit]:n[$o.caption_after_exit]),c.addEventListener("animationend",(()=>{s.current=!1,e.current&&(e.current.style.isolation=""),t&&(t.style.zIndex=""),i&&i.classList.remove(f),l&&l.classList.remove(p),r.style.position="",r.style.overflow="",r.contains(a)&&r.removeChild(a)})));const h=y_(a);h&&h.classList.add(d?n[$o.weeks_before_exit]:n[$o.weeks_after_exit]),r.insertBefore(a,r.firstChild)}))}}))}function Roe(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:l,broadcastCalendar:s}=n??{},{addDays:u,differenceInCalendarDays:c,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:h,endOfWeek:m,isAfter:g,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=r,w=s?v(o,r):i?y(o):b(o),x=c(s?f(a):i?p(h(a)):m(h(a)),w),_=d(a,o)+1,O=[];for(let e=0;e<=x;e++){const n=u(w,e);if(t&&g(n,t))break;O.push(n)}const k=(s?35:42)*_;if(l&&O.length<k){const e=k-O.length;for(let t=0;t<e;t++){const e=u(O[O.length-1],1);O.push(e)}}return O}function Toe(e){const t=[];return e.reduce(((e,n)=>{const r=n.weeks.reduce(((e,t)=>e.concat(t.days.slice())),t.slice());return e.concat(r.slice())}),t.slice())}function Noe(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;a.push(o)}return a}function E3(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:l=1}=e;let s=o||a||i;const{differenceInCalendarMonths:u,addMonths:c,startOfMonth:d}=r;if(n&&u(n,s)<l-1){s=c(n,-1*(l-1))}return t&&u(s,t)<0&&(s=t),d(s)}function koe(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:l,endOfWeek:s,getISOWeek:u,getWeek:c,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,h=e.reduce(((e,h)=>{const m=n.broadcastCalendar?d(h,r):n.ISOWeek?f(h):p(h),g=n.broadcastCalendar?a(h):n.ISOWeek?i(l(h)):s(l(h)),v=t.filter((e=>e>=m&&e<=g)),y=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<y){const e=t.filter((e=>{const t=y-v.length;return e>g&&e<=o(g,t)}));v.push(...e)}const b=v.reduce(((e,t)=>{const o=n.ISOWeek?u(t):c(t),a=e.find((e=>e.weekNumber===o)),i=new O6(t,h,r);return a?a.days.push(i):e.push(new _re(o,[i])),e}),[]),w=new xre(h,b);return e.push(w),e}),[]);return n.reverseMonths?h.reverse():h}function Doe(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:l,addYears:s,endOfYear:u,newDate:c,today:d}=t,{fromYear:f,toYear:p,fromMonth:h,toMonth:m}=e;!n&&h&&(n=h),!n&&f&&(n=t.newDate(f,0,1)),!r&&m&&(r=m),!r&&p&&(r=c(p,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=i(n):f?n=c(f,0,1):!n&&g&&(n=o(s(e.today??d(),-100))),r?r=l(r):p?r=c(p,11,31):!r&&g&&(r=u(e.today??d())),[n&&a(n),r&&a(r)]}function Aoe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:l,differenceInCalendarMonths:s}=r,u=o?a:1,c=i(e);return t&&s(t,e)<a?void 0:l(c,u)}function Moe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:l,differenceInCalendarMonths:s}=r,u=o?a??1:1,c=i(e);return t&&s(c,t)<=0?void 0:l(c,-u)}function Ioe(e){return e.reduce(((e,t)=>e.concat(t.weeks.slice())),[].slice())}function Zv(e,t){const[n,r]=Ke(e);return[void 0===t?n:t,r]}function joe(e,t){const[n,r]=Doe(e,t),{startOfMonth:o,endOfMonth:a}=t,i=E3(e,n,r,t),[l,s]=Zv(i,e.month?i:void 0);We((()=>{const o=E3(e,n,r,t);s(o)}),[e.timeZone]);const u=Noe(l,r,e,t),c=koe(u,Roe(u,e.endMonth?a(e.endMonth):void 0,e,t),e,t),d=Ioe(c),f=Toe(c),p=Moe(l,n,e,t),h=Aoe(l,r,e,t),{disableNavigation:m,onMonthChange:g}=e,v=e=>{if(m)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),s(t),null==g||g(t)};return{months:c,weeks:d,days:f,navStart:n,navEnd:r,previousMonth:p,nextMonth:h,goToMonth:v,goToDay:e=>{(e=>d.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||v(e.date)}}}var Mi;function P3(e){return!e[hn.disabled]&&!e[hn.hidden]&&!e[hn.outside]}function Loe(e,t,n,r){let o,a=-1;for(const i of e){const e=t(i);P3(e)&&(e[hn.focused]&&a<Mi.FocusedModifier?(o=i,a=Mi.FocusedModifier):null!=r&&r.isEqualTo(i)&&a<Mi.LastFocused?(o=i,a=Mi.LastFocused):n(i.date)&&a<Mi.Selected?(o=i,a=Mi.Selected):e[hn.today]&&a<Mi.Today&&(o=i,a=Mi.Today))}return o||(o=e.find((e=>P3(t(e))))),o}function Foe(e,t,n,r,o,a,i){const{ISOWeek:l,broadcastCalendar:s}=a,{addDays:u,addMonths:c,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:h,endOfWeek:m,max:g,min:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:w}=i;let x={day:u,week:d,month:c,year:f,startOfWeek:e=>s?y(e,i):l?b(e):w(e),endOfWeek:e=>s?p(e):l?h(e):m(e)}[e](n,"after"===t?1:-1);return"before"===t&&r?x=g([r,x]):"after"===t&&o&&(x=v([o,x])),x}function F6(e,t,n,r,o,a,i,l=0){if(l>365)return;const s=Foe(e,t,n.date,r,o,a,i),u=!(!a.disabled||!ma(s,a.disabled,i)),c=!(!a.hidden||!ma(s,a.hidden,i)),d=new O6(s,s,i);return u||c?F6(e,t,d,r,o,a,i,l+1):d}function Woe(e,t,n,r,o){const{autoFocus:a}=e,[i,l]=Ke(),s=Loe(t.days,n,r||(()=>!1),i),[u,c]=Ke(a?s:void 0);return{isFocusTarget:e=>!(null==s||!s.isEqualTo(e)),setFocused:c,focused:u,blur:()=>{l(u),c(void 0)},moveFocus:(n,r)=>{if(!u)return;const a=F6(n,r,u,t.navStart,t.navEnd,e,o);a&&(t.goToDay(a),c(a))}}}function Boe(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Zv(n,o?n:void 0),l=o?n:a,{isSameDay:s}=t,u=e=>(null==l?void 0:l.some((t=>s(t,e))))??!1,{min:c,max:d}=e;return{selected:l,select:(e,t,n)=>{let a=[...l??[]];if(u(e)){if((null==l?void 0:l.length)===c||r&&1===(null==l?void 0:l.length))return;a=null==l?void 0:l.filter((t=>!s(t,e)))}else a=(null==l?void 0:l.length)===d?[e]:[...a,e];return o||i(a),null==o||o(a,e,t,n),a},isSelected:u}}function qoe(e,t,n=0,r=0,o=!1,a=qi){const{from:i,to:l}=t||{},{isSameDay:s,isAfter:u,isBefore:c}=a;let d;if(i||l){if(i&&!l)d=s(i,e)?0===n?{from:i,to:e}:o?{from:i,to:void 0}:void 0:c(e,i)?{from:e,to:i}:{from:i,to:e};else if(i&&l)if(s(i,e)&&s(l,e))d=o?{from:i,to:l}:void 0;else if(s(i,e))d={from:i,to:n>0?void 0:e};else if(s(l,e))d={from:e,to:n>0?void 0:e};else if(c(e,i))d={from:e,to:l};else if(u(e,i))d={from:i,to:e};else{if(!u(e,l))throw new Error("Invalid range");d={from:i,to:e}}}else d={from:e,to:n>0?void 0:e};if(null!=d&&d.from&&null!=d&&d.to){const t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}function zoe(e,t,n=qi){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let e=0;e<=i;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function O3(e,t,n=qi){return ha(e,t.from,!1,n)||ha(e,t.to,!1,n)||ha(t,e.from,!1,n)||ha(t,e.to,!1,n)}function Uoe(e,t,n=qi){const r=Array.isArray(t)?t:[t];if(r.filter((e=>"function"!=typeof e)).some((t=>"boolean"==typeof t?t:n.isDate(t)?ha(e,t,!1,n):A6(t,n)?t.some((t=>ha(e,t,!1,n))):aS(t)?!(!t.from||!t.to)&&O3(e,{from:t.from,to:t.to},n):D6(t)?zoe(e,t.dayOfWeek,n):T6(t)?n.isAfter(t.before,t.after)?O3(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):ma(e.from,t,n)||ma(e.to,t,n):!(!N6(t)&&!k6(t))&&(ma(e.from,t,n)||ma(e.to,t,n)))))return!0;const o=r.filter((e=>"function"==typeof e));if(o.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(o.some((e=>e(t))))return!0;t=n.addDays(t,1)}}return!1}function Hoe(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[l,s]=Zv(o,i?o:void 0),u=i?o:l;return{selected:u,select:(o,l,c)=>{const{min:d,max:f}=e,p=o?qoe(o,u,d,f,a,t):void 0;return r&&n&&null!=p&&p.from&&p.to&&Uoe({from:p.from,to:p.to},n,t)&&(p.from=o,p.to=void 0),i||s(p),null==i||i(p,o,l,c),p},isSelected:e=>u&&ha(u,e,!1,t)}}function Voe(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Zv(n,o?n:void 0),l=o?n:a,{isSameDay:s}=t;return{selected:l,select:(e,t,n)=>{let a=e;return!r&&l&&l&&s(e,l)&&(a=void 0),o||i(a),null==o||o(a,e,t,n),a},isSelected:e=>!!l&&s(l,e)}}function Goe(e,t){const n=Voe(e,t),r=Boe(e,t),o=Hoe(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Koe(e){var t;let n=e;n.timeZone&&(n={...e},n.today&&(n.today=new Er(n.today,n.timeZone)),n.month&&(n.month=new Er(n.month,n.timeZone)),n.defaultMonth&&(n.defaultMonth=new Er(n.defaultMonth,n.timeZone)),n.startMonth&&(n.startMonth=new Er(n.startMonth,n.timeZone)),n.endMonth&&(n.endMonth=new Er(n.endMonth,n.timeZone)),"single"===n.mode&&n.selected?n.selected=new Er(n.selected,n.timeZone):"multiple"===n.mode&&n.selected?n.selected=null==(t=n.selected)?void 0:t.map((e=>new Er(e,n.timeZone))):"range"===n.mode&&n.selected&&(n.selected={from:n.selected.from?new Er(n.selected.from,n.timeZone):void 0,to:n.selected.to?new Er(n.selected.to,n.timeZone):void 0}));const{components:r,formatters:o,labels:a,dateLib:i,locale:l,classNames:s}=or((()=>{const e={...iS,...n.locale};return{dateLib:new Ra({locale:e,weekStartsOn:n.broadcastCalendar?1:n.weekStartsOn,firstWeekContainsDate:n.firstWeekContainsDate,useAdditionalWeekYearTokens:n.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:n.useAdditionalDayOfYearTokens,timeZone:n.timeZone,numerals:n.numerals},n.dateLib),components:Zre(n.components),formatters:coe(n.formatters),labels:{...Soe,...n.labels},locale:e,classNames:{...sS(),...n.classNames}}}),[n.locale,n.broadcastCalendar,n.weekStartsOn,n.firstWeekContainsDate,n.useAdditionalWeekYearTokens,n.useAdditionalDayOfYearTokens,n.timeZone,n.numerals,n.dateLib,n.components,n.formatters,n.labels,n.classNames]),{captionLayout:u,mode:c,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:h,onDayFocus:m,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:y,onNextClick:b,onPrevClick:w,showWeekNumber:x,styles:_}=n,{formatCaption:O,formatDay:k,formatMonthDropdown:S,formatWeekNumber:D,formatWeekNumberHeader:C,formatWeekdayName:E,formatYearDropdown:N}=o,M=joe(n,i),{days:P,months:j,navStart:T,navEnd:A,previousMonth:R,nextMonth:L,goToMonth:z}=M,I=Xre(P,n,T,A,i),{isSelected:F,select:W,selected:$}=Goe(n,i)??{},{blur:q,focused:B,isFocusTarget:U,moveFocus:H,setFocused:K}=Woe(n,M,I,F??(()=>!1),i),{labelDayButton:V,labelGridcell:Y,labelGrid:G,labelMonthDropdown:X,labelNav:Q,labelPrevious:Z,labelNext:J,labelWeekday:ee,labelWeekNumber:te,labelWeekNumberHeader:ne,labelYearDropdown:oe}=a,ae=or((()=>doe(i,n.ISOWeek)),[i,n.ISOWeek]),ie=void 0!==c||void 0!==h,le=Ge((()=>{R&&(z(R),null==w||w(R))}),[R,z,w]),se=Ge((()=>{L&&(z(L),null==b||b(L))}),[z,L,b]),ue=Ge(((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),K(e),null==W||W(e.date,t,n),null==h||h(e.date,t,n)}),[W,h,K]),ce=Ge(((e,t)=>n=>{K(e),null==m||m(e.date,t,n)}),[m,K]),de=Ge(((e,t)=>n=>{q(),null==p||p(e.date,t,n)}),[q,p]),fe=Ge(((e,t)=>r=>{const o={ArrowLeft:[r.shiftKey?"month":"day","rtl"===n.dir?"after":"before"],ArrowRight:[r.shiftKey?"month":"day","rtl"===n.dir?"before":"after"],ArrowDown:[r.shiftKey?"year":"week","after"],ArrowUp:[r.shiftKey?"year":"week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];H(e,t)}null==g||g(e.date,t,r)}),[H,g,n.dir]),pe=Ge(((e,t)=>n=>{null==v||v(e.date,t,n)}),[v]),he=Ge(((e,t)=>n=>{null==y||y(e.date,t,n)}),[y]),me=Ge((e=>t=>{const n=Number(t.target.value),r=i.setMonth(i.startOfMonth(e),n);z(r)}),[i,z]),ge=Ge((e=>t=>{const n=Number(t.target.value),r=i.setYear(i.startOfMonth(e),n);z(r)}),[i,z]),{className:ve,style:ye}=or((()=>({className:[s[ut.Root],n.className].filter(Boolean).join(" "),style:{...null==_?void 0:_[ut.Root],...n.style}})),[s,n.className,n.style,_]),be=Jre(n),we=Ae(null);Ooe(we,!!n.animate,{classNames:s,months:j,focused:B,dateLib:i});const xe={dayPickerProps:n,selected:$,select:W,isSelected:F,months:j,nextMonth:L,previousMonth:R,goToMonth:z,getModifiers:I,components:r,classNames:s,styles:_,labels:a,formatters:o};return re.createElement(R6.Provider,{value:xe},re.createElement(r.Root,{rootRef:n.animate?we:void 0,className:ve,style:ye,dir:n.dir,id:n.id,lang:n.lang,nonce:n.nonce,title:n.title,role:n.role,"aria-label":n["aria-label"],...be},re.createElement(r.Months,{className:s[ut.Months],style:null==_?void 0:_[ut.Months]},!n.hideNavigation&&!d&&re.createElement(r.Nav,{"data-animated-nav":n.animate?"true":void 0,className:s[ut.Nav],style:null==_?void 0:_[ut.Nav],"aria-label":Q(),onPreviousClick:le,onNextClick:se,previousMonth:R,nextMonth:L}),j.map(((e,t)=>re.createElement(r.Month,{"data-animated-month":n.animate?"true":void 0,className:s[ut.Month],style:null==_?void 0:_[ut.Month],key:t,displayIndex:t,calendarMonth:e},"around"===d&&!n.hideNavigation&&0===t&&re.createElement(r.PreviousMonthButton,{type:"button",className:s[ut.PreviousMonthButton],tabIndex:R?void 0:-1,"aria-disabled":!R||void 0,"aria-label":Z(R),onClick:le,"data-animated-button":n.animate?"true":void 0},re.createElement(r.Chevron,{disabled:!R||void 0,className:s[ut.Chevron],orientation:"rtl"===n.dir?"right":"left"})),re.createElement(r.MonthCaption,{"data-animated-caption":n.animate?"true":void 0,className:s[ut.MonthCaption],style:null==_?void 0:_[ut.MonthCaption],calendarMonth:e,displayIndex:t},null!=u&&u.startsWith("dropdown")?re.createElement(r.DropdownNav,{className:s[ut.Dropdowns],style:null==_?void 0:_[ut.Dropdowns]},"dropdown"===u||"dropdown-months"===u?re.createElement(r.MonthsDropdown,{className:s[ut.MonthsDropdown],"aria-label":X(),classNames:s,components:r,disabled:!!n.disableNavigation,onChange:me(e.date),options:loe(e.date,T,A,o,i),style:null==_?void 0:_[ut.Dropdown],value:i.getMonth(e.date)}):re.createElement("span",null,S(e.date,i)),"dropdown"===u||"dropdown-years"===u?re.createElement(r.YearsDropdown,{className:s[ut.YearsDropdown],"aria-label":oe(i.options),classNames:s,components:r,disabled:!!n.disableNavigation,onChange:ge(e.date),options:foe(T,A,o,i,!!n.reverseYears),style:null==_?void 0:_[ut.Dropdown],value:i.getYear(e.date)}):re.createElement("span",null,N(e.date,i)),re.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},O(e.date,i.options,i))):re.createElement(r.CaptionLabel,{className:s[ut.CaptionLabel],role:"status","aria-live":"polite"},O(e.date,i.options,i))),"around"===d&&!n.hideNavigation&&t===f-1&&re.createElement(r.NextMonthButton,{type:"button",className:s[ut.NextMonthButton],tabIndex:L?void 0:-1,"aria-disabled":!L||void 0,"aria-label":J(L),onClick:se,"data-animated-button":n.animate?"true":void 0},re.createElement(r.Chevron,{disabled:!L||void 0,className:s[ut.Chevron],orientation:"rtl"===n.dir?"left":"right"})),t===f-1&&"after"===d&&!n.hideNavigation&&re.createElement(r.Nav,{"data-animated-nav":n.animate?"true":void 0,className:s[ut.Nav],style:null==_?void 0:_[ut.Nav],"aria-label":Q(),onPreviousClick:le,onNextClick:se,previousMonth:R,nextMonth:L}),re.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===c||"range"===c,"aria-label":G(e.date,i.options,i)||void 0,className:s[ut.MonthGrid],style:null==_?void 0:_[ut.MonthGrid]},!n.hideWeekdays&&re.createElement(r.Weekdays,{"data-animated-weekdays":n.animate?"true":void 0,className:s[ut.Weekdays],style:null==_?void 0:_[ut.Weekdays]},x&&re.createElement(r.WeekNumberHeader,{"aria-label":ne(i.options),className:s[ut.WeekNumberHeader],style:null==_?void 0:_[ut.WeekNumberHeader],scope:"col"},C()),ae.map((e=>re.createElement(r.Weekday,{"aria-label":ee(e,i.options,i),className:s[ut.Weekday],key:String(e),style:null==_?void 0:_[ut.Weekday],scope:"col"},E(e,i.options,i))))),re.createElement(r.Weeks,{"data-animated-weeks":n.animate?"true":void 0,className:s[ut.Weeks],style:null==_?void 0:_[ut.Weeks]},e.weeks.map((e=>re.createElement(r.Week,{className:s[ut.Week],key:e.weekNumber,style:null==_?void 0:_[ut.Week],week:e},x&&re.createElement(r.WeekNumber,{week:e,style:null==_?void 0:_[ut.WeekNumber],"aria-label":te(e.weekNumber,{locale:l}),className:s[ut.WeekNumber],scope:"row",role:"rowheader"},D(e.weekNumber,i)),e.days.map((e=>{const{date:t}=e,o=I(e);if(o[hn.focused]=!o.hidden&&!(null==B||!B.isEqualTo(e)),o[oi.selected]=(null==F?void 0:F(t))||o.selected,aS($)){const{from:e,to:n}=$;o[oi.range_start]=!!(e&&n&&i.isSameDay(t,e)),o[oi.range_end]=!!(e&&n&&i.isSameDay(t,n)),o[oi.range_middle]=ha($,t,!0,i)}const a=uoe(o,_,n.modifiersStyles),l=Qre(o,s,n.modifiersClassNames),u=ie||o.hidden?void 0:Y(t,o,i.options,i);return re.createElement(r.Day,{key:`${i.format(t,"yyyy-MM-dd")}_${i.format(e.displayMonth,"yyyy-MM")}`,day:e,modifiers:o,className:l.join(" "),style:a,role:"gridcell","aria-selected":o.selected||void 0,"aria-label":u,"data-day":i.format(t,"yyyy-MM-dd"),"data-month":e.outside?i.format(t,"yyyy-MM"):void 0,"data-selected":o.selected||void 0,"data-disabled":o.disabled||void 0,"data-hidden":o.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":o.focused||void 0,"data-today":o.today||void 0},!o.hidden&&ie?re.createElement(r.DayButton,{className:s[ut.DayButton],style:null==_?void 0:_[ut.DayButton],type:"button",day:e,modifiers:o,disabled:o.disabled||void 0,tabIndex:U(e)?0:-1,"aria-label":V(t,o,i.options,i),onClick:ue(e,o),onBlur:de(e,o),onFocus:ce(e,o),onKeyDown:fe(e,o),onMouseEnter:pe(e,o),onMouseLeave:he(e,o)},k(t,i.options,i)):!o.hidden&&k(e.date,i.options,i))}))))))))))),n.footer&&re.createElement(r.Footer,{className:s[ut.Footer],style:null==_?void 0:_[ut.Footer],role:"status","aria-live":"polite"},n.footer)))}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(Mi||(Mi={}));var R3,Og={exports:{}},Yoe=Og.exports;function Xoe(){return R3||(R3=1,Og.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",u="month",c="quarter",d="year",f="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,u),a=n-o<0,i=t.clone().add(r+(a?-1:1),u);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:s,d:l,D:f,h:i,m:a,s:o,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=g;var x="$isDayjsObject",_=function(e){return e instanceof D||!(!e||!e[x])},O=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var a=t.toLowerCase();w[a]&&(o=a),n&&(w[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var l=t.name;w[l]=t,o=l}return!r&&o&&(b=o),o||!r&&b},k=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new D(n)},S=y;S.l=O,S.i=_,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function g(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return this.$d.toString()!==p},v.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return k(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<k(e)},v.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!S.u(t)||t,c=S.p(e),p=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(l)},h=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return r?p(1,0):p(31,11);case u:return r?p(1,g):p(0,g+1);case s:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return p(r?v-w:v+(6-w),g);case l:case f:return h(y+"Hours",0);case i:return h(y+"Minutes",1);case a:return h(y+"Seconds",2);case o:return h(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,s=S.p(e),c="set"+(this.$u?"UTC":""),p=(n={},n[l]=c+"Date",n[f]=c+"Date",n[u]=c+"Month",n[d]=c+"FullYear",n[i]=c+"Hours",n[a]=c+"Minutes",n[o]=c+"Seconds",n[r]=c+"Milliseconds",n)[s],h=s===l?this.$D+(t-this.$W):t;if(s===u||s===d){var m=this.clone().set(f,1);m.$d[p](h),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[S.p(e)]()},v.add=function(r,c){var f,p=this;r=Number(r);var h=S.p(c),m=function(e){var t=k(p);return S.w(t.date(t.date()+Math.round(e*r)),p)};if(h===u)return this.set(u,this.$M+r);if(h===d)return this.set(d,this.$y+r);if(h===l)return m(1);if(h===s)return m(7);var g=(f={},f[a]=t,f[i]=n,f[o]=e,f)[h]||1,v=this.$d.getTime()+r*g;return S.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),a=this.$H,i=this.$m,l=this.$M,s=n.weekdays,u=n.months,c=n.meridiem,d=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},f=function(e){return S.s(a%12||12,e,"0")},h=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return S.s(t.$y,4,"0");case"M":return l+1;case"MM":return S.s(l+1,2,"0");case"MMM":return d(n.monthsShort,l,u,3);case"MMMM":return d(u,l);case"D":return t.$D;case"DD":return S.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,s,2);case"ddd":return d(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(a);case"HH":return S.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return h(a,i,!0);case"A":return h(a,i,!1);case"m":return String(i);case"mm":return S.s(i,2,"0");case"s":return String(t.$s);case"ss":return S.s(t.$s,2,"0");case"SSS":return S.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,f,p){var h,m=this,g=S.p(f),v=k(r),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,w=function(){return S.m(m,v)};switch(g){case d:h=w()/12;break;case u:h=w();break;case c:h=w()/3;break;case s:h=(b-y)/6048e5;break;case l:h=(b-y)/864e5;break;case i:h=b/n;break;case a:h=b/t;break;case o:h=b/e;break;default:h=b}return p?h:S.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=O(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),C=D.prototype;return k.prototype=C,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",l],["$M",u],["$y",d],["$D",f]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,D,k),e.$i=!0),k},k.locale=O,k.isDayjs=_,k.unix=function(e){return k(1e3*e)},k.en=w[b],k.Ls=w,k.p={},k}()),Og.exports}var Qoe=Xoe();const Zg=Oo(Qoe);function Aae({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="dropdown",buttonVariant:o="tertiary",formatters:a,components:i,dropdownMode:l="calendar",onDropdownModeChange:s,onMonthYearSelect:u,...c}){const d=sS(),f=e=>()=>{null==s||s(l===e?"calendar":e)},p=()=>{if("calendar"===l)return null;const e=l,t="months"===e?(c.month||new Date).getMonth():(c.month||new Date).getFullYear();return D.jsx(oie,{type:e,selectedValue:t,onSelect:t=>((e,t)=>{null==u||u(e,t),null==s||s("calendar")})(e,t),displayMonth:c.month||new Date,disabled:"function"==typeof c.disabled?c.disabled:void 0})};return D.jsx(Koe,{showOutsideDays:n,className:te("group/calendar bg-background [--cell-size:2.5rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...a},classNames:{root:te("w-auto",d.root),months:te("flex gap-s flex-col md:flex-row relative",d.months),month:te("flex flex-col w-full gap-s",d.month),month_grid:te("mx-xs",d.month_grid),nav:te("flex items-center gap-xxxs w-full absolute top-0 inset-x-0 justify-between pointer-events-none px-xs",d.nav),button_previous:te(mp({variant:o}),"size-(--cell-size) min-w-0 aria-disabled:opacity-50 p-0 select-none pointer-events-auto",d.button_previous,"calendar"!==l&&"pointer-events-none opacity-50"),button_next:te(mp({variant:o}),"size-(--cell-size) min-w-0 aria-disabled:opacity-50 p-0 select-none pointer-events-auto",d.button_next,"calendar"!==l&&"pointer-events-none opacity-50"),month_caption:te("flex items-center justify-center h-[40px] w-full px-(--cell-size)",d.month_caption),dropdowns:te("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5 pointer-events-auto",d.dropdowns),dropdown_root:te("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",d.dropdown_root),dropdown:te("absolute bg-popover inset-0 opacity-0",d.dropdown),caption_label:te("select-none font-medium","label"===r?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",d.caption_label),table:"w-full border-collapse",weekdays:te("flex",d.weekdays),weekday:te("rounded-m flex-1 text-sm text-gray-500 font-medium select-none",d.weekday),week:te("flex w-full mt-2 gap-xxxs",d.week),week_number_header:te("select-none w-(--cell-size)",d.week_number_header),week_number:te("text-[0.8rem] select-none text-muted-foreground",d.week_number),day:te("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none","[&:first-child]:before:hidden [&:last-child]:after:hidden",d.day),range_start:te("rounded-l-m bg-gray-100",d.range_start),range_middle:te("rounded-none bg-gray-100",d.range_middle),range_end:te("rounded-r-m bg-gray-100",d.range_end),today:te("shadow-[inset_0_0_0_1px_rgb(226,232,240)] rounded-m"),outside:te("pointer-events-none text-gray-400 opacity-30 ",d.outside),disabled:te("text-gray-300",d.disabled),hidden:te("invisible",d.hidden),...t},components:{Root:({className:e,rootRef:t,...n})=>D.jsx("div",{"data-slot":"calendar",ref:t,className:te(e),...n}),Chevron:({className:e,orientation:t,...n})=>"left"===t?D.jsx(g$,{className:te("size-5 text-gray-900",e),...n}):"right"===t?D.jsx(v$,{className:te("size-5 text-gray-900",e),...n}):D.jsx(rv,{className:te("size-5",e),...n}),DayButton:Zoe,WeekNumber:({children:e,...t})=>D.jsx("td",{...t,children:D.jsx("div",{className:"size-(--cell-size) flex items-center justify-center text-center",children:e})}),..."calendar"!==l?{MonthGrid:()=>D.jsx(p,{})}:{},MonthsDropdown:()=>D.jsx(T3,{type:"months",displayMonth:c.month||new Date,dropdownMode:l,onToggle:f("months")}),YearsDropdown:()=>D.jsx(T3,{type:"years",displayMonth:c.month||new Date,dropdownMode:l,onToggle:f("years")}),...i},...c})}function Zoe({className:e,day:t,modifiers:n,disabled:r,...o}){const a=sS(),i=O.useRef(null);O.useEffect((()=>{var e;n.focused&&(null==(e=i.current)||e.focus())}),[n.focused]);const l=D.jsx(Is,{ref:i,variant:"tertiary",size:"none",disabled:r,"data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:te(["flex h-10 w-10 items-center justify-center","rounded-m border-none text-base font-normal leading-none text-gray-900 outline-none focus:outline-none active:outline-none","transition-colors hover:bg-gray-100 hover:text-gray-900","data-[range-end=true]:rounded-m data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-m","data-[range-end=true]:bg-blue_100 data-[range-middle=true]:bg-gray-100 data-[range-start=true]:bg-blue_100","data-[range-start=true]:relative data-[range-start=true]:after:absolute data-[range-start=true]:after:inset-y-0 data-[range-start=true]:after:-right-[2px] data-[range-start=true]:after:z-10 data-[range-start=true]:after:w-[2px] data-[range-start=true]:after:bg-gray-100","data-[range-middle=true]:relative data-[range-middle=true]:before:absolute data-[range-middle=true]:before:inset-y-0 data-[range-middle=true]:before:-left-[2px] data-[range-middle=true]:before:z-10 data-[range-middle=true]:before:w-[2px] data-[range-middle=true]:before:bg-gray-100","data-[range-middle=true]:after:absolute data-[range-middle=true]:after:inset-y-0 data-[range-middle=true]:after:-right-[2px] data-[range-middle=true]:after:z-10 data-[range-middle=true]:after:w-[2px] data-[range-middle=true]:after:bg-gray-100","data-[range-end=true]:relative data-[range-end=true]:before:absolute data-[range-end=true]:before:inset-y-0 data-[range-end=true]:before:-left-[2px] data-[range-end=true]:before:z-10 data-[range-end=true]:before:w-[2px] data-[range-end=true]:before:bg-gray-100","data-[selected-single=true]:border-blue_100 data-[selected-single=true]:bg-blue_100 data-[selected-single=true]:text-white data-[selected-single=true]:hover:bg-blue_120","data-[range-end=true]:text-primary-foreground data-[range-middle=true]:text-accent-foreground","data-[range-start=true]:text-primary-foreground data-[selected-single=true]:text-white","group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10","dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70"].join(" "),a.day,e),...o});return r?D.jsx(fte,{theme:"dark",size:"small",tooltipText:"This date is not available",triggerProps:{asChild:!0},children:D.jsx("span",{children:l})}):l}function Joe({item:e,isSelected:t,onSelect:n}){return D.jsxs("div",{onClick:()=>n(e.value),className:te("relative flex cursor-default select-none items-center justify-start gap-xxs rounded-m p-xxs","text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","cursor-pointer focus:bg-accent focus:text-accent-foreground",t&&"bg-gray-100"),role:"button",tabIndex:0,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),n(e.value))},children:[D.jsx("div",{className:te("flex flex-1 items-center justify-start gap-xxs text-gray-900"),children:e.label}),t&&D.jsx("div",{className:"absolute right-xxs",children:D.jsx(nv,{size:20,className:"text-gray-900"})})]})}function eie({items:e,selectedValue:t,onSelect:n,className:r}){return D.jsx("div",{className:te("no-scrollbar flex max-h-[300px] flex-col gap-xxxs overflow-y-auto",r),children:e.map((e=>D.jsx(Joe,{item:e,isSelected:e.value===t,onSelect:n},e.key)))})}function T3({type:e,displayMonth:t,dropdownMode:n,onToggle:r}){const o="months"===e&&"years"===n||"years"===e&&"months"===n,a="months"===e?Zg(t).format("MMM"):Zg(t).format("YYYY");return D.jsxs(Is,{variant:"secondary",size:"s",onClick:r,disabled:o,type:"button",children:[a,D.jsx(rv,{size:16,className:"ml-xxxs"})]})}const W6=(e,t,n)=>{const r=new Date(e,t+1,0).getDate();for(let o=1;o<=r;o++){if(!n(new Date(e,t,o)))return!0}return!1},tie=(e,t)=>{for(let n=0;n<12;n++)if(W6(e,n,t))return!0;return!1},nie=(e,t)=>{const n=Array.from({length:12},((e,t)=>({value:t,label:Zg().month(t).format("MMMM"),key:t})));return t?n.filter((n=>W6(e,n.value,t))):n},rie=e=>{const t=Zg().year()-100,n=Array.from({length:200},((e,n)=>{const r=t+n;return{value:r,label:r.toString(),key:r}}));return e?n.filter((t=>tie(t.value,e))):n};function oie({type:e,selectedValue:t,onSelect:n,displayMonth:r,disabled:o}){const a="months"===e?nie(r.getFullYear(),o):rie(o);return D.jsx("div",{className:"border-t border-gray-200 px-xxs py-xxs",children:D.jsx(eie,{items:a,selectedValue:t,onSelect:n})})}const Mae=({as:e="div",children:t,className:n,...r})=>q(e,{className:te(n),...r},t);function iie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function aie(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>O.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return O.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=O.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,s=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=O.useMemo((()=>l),Object.values(l));return D.jsx(s.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const s=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,u=O.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},sie(r,...t)]}function sie(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return O.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function B6(e){const t=O.useRef(e);return O.useEffect((()=>{t.current=e})),O.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function cie({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=lie({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=B6(n);return[i,O.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function lie({defaultProp:e,onChange:t}){const n=O.useState(e),[r]=n,o=O.useRef(r),a=B6(t);return O.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}var Jg=null!=globalThis&&globalThis.document?O.useLayoutEffect:()=>{};function N3(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function q6(...e){return t=>{let n=!1;const r=e.map((e=>{const r=N3(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():N3(e[t],null)}}}}function z6(...e){return O.useCallback(q6(...e),e)}var U6=O.forwardRef(((e,t)=>{const{children:n,...r}=e,o=O.Children.toArray(n),a=o.find(die);if(a){const e=a.props.children,n=o.map((t=>t===a?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t));return D.jsx(m$,{...r,ref:t,children:O.isValidElement(e)?O.cloneElement(e,void 0,n):null})}return D.jsx(m$,{...r,ref:t,children:n})}));U6.displayName="Slot";var m$=O.forwardRef(((e,t)=>{const{children:n,...r}=e;if(O.isValidElement(n)){const e=pie(n),o=fie(r,n.props);return n.type!==O.Fragment&&(o.ref=t?q6(t,e):e),O.cloneElement(n,o)}return O.Children.count(n)>1?O.Children.only(null):null}));m$.displayName="SlotClone";var uie=({children:e})=>D.jsx(D.Fragment,{children:e});function die(e){return O.isValidElement(e)&&e.type===uie}function fie(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function pie(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var hie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],cS=hie.reduce(((e,t)=>{const n=O.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?U6:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(a,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function mie(e,t){return O.useReducer(((e,n)=>t[e][n]??e),e)}var H6=e=>{const{present:t,children:n}=e,r=gie(t),o="function"==typeof n?n({present:r.isPresent}):O.Children.only(n),a=z6(r.ref,vie(o));return"function"==typeof n||r.isPresent?O.cloneElement(o,{ref:a}):null};function gie(e){const[t,n]=O.useState(),r=O.useRef({}),o=O.useRef(e),a=O.useRef("none"),i=e?"mounted":"unmounted",[l,s]=mie(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect((()=>{const e=_g(r.current);a.current="mounted"===l?e:"none"}),[l]),Jg((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=_g(t);e?s("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?s("UNMOUNT"):s(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,s]),Jg((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=_g(r.current).includes(a.animationName);if(a.target===t&&i&&(s("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(a.current=_g(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:O.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function _g(e){return(null==e?void 0:e.animationName)||"none"}function vie(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}H6.displayName="Presence";var yie=O.useId||(()=>{}),bie=0;function wie(e){const[t,n]=O.useState(yie());return Jg((()=>{e||n((e=>e??String(bie++)))}),[e]),e||(t?`radix-${t}`:"")}var lS="Collapsible",[xie,Iae]=aie(lS),[_ie,uS]=xie(lS),V6=O.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[s=!1,u]=cie({prop:r,defaultProp:o,onChange:i});return D.jsx(_ie,{scope:n,disabled:a,contentId:wie(),open:s,onOpenToggle:O.useCallback((()=>u((e=>!e))),[u]),children:D.jsx(cS.div,{"data-state":fS(s),"data-disabled":a?"":void 0,...l,ref:t})})}));V6.displayName=lS;var G6="CollapsibleTrigger",K6=O.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=uS(G6,n);return D.jsx(cS.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":fS(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:iie(e.onClick,o.onOpenToggle)})}));K6.displayName=G6;var dS="CollapsibleContent",Y6=O.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=uS(dS,e.__scopeCollapsible);return D.jsx(H6,{present:n||o.open,children:({present:e})=>D.jsx($ie,{...r,ref:t,present:e})})}));Y6.displayName=dS;var $ie=O.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=uS(dS,n),[l,s]=O.useState(r),u=O.useRef(null),c=z6(t,u),d=O.useRef(0),f=d.current,p=O.useRef(0),h=p.current,m=i.open||l,g=O.useRef(m),v=O.useRef(void 0);return O.useEffect((()=>{const e=requestAnimationFrame((()=>g.current=!1));return()=>cancelAnimationFrame(e)}),[]),Jg((()=>{const e=u.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),s(r)}}),[i.open,r]),D.jsx(cS.div,{"data-state":fS(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&o})}));function fS(e){return e?"open":"closed"}var Sie=V6;const jae=Sie,Lae=K6,Fae=Y6;export{Die as AlertDialog,cj as AlertDialogAction,lj as AlertDialogCancel,rj as AlertDialogContent,sj as AlertDialogDescription,ij as AlertDialogFooter,oj as AlertDialogHeader,bT as AlertDialogOverlay,nj as AlertDialogPortal,aj as AlertDialogTitle,Aie as AlertDialogTrigger,CT as Avatar,PT as AvatarFallback,ET as AvatarImage,Is as Button,Tie as ButtonLoader,Aae as Calendar,Zoe as CalendarDayButton,yj as Card,_j as CardContent,xj as CardDescription,$j as CardFooter,bj as CardHeader,wj as CardTitle,oL as Carousel,iL as CarouselContent,aL as CarouselItem,cL as CarouselNext,sL as CarouselPrevious,Rq as ChartContainer,jie as ChartLegend,kq as ChartLegendContent,Tq as ChartStyle,Iie as ChartTooltip,Nq as ChartTooltipContent,s2 as Checkbox,FN as ChipsItem,Dq as ChipsWrapper,jae as Collapsible,Fae as CollapsibleContent,Lae as CollapsibleTrigger,xae as ColorPicker,$ae as ColorPickerAlpha,Sae as ColorPickerEyeDropper,Eae as ColorPickerFormat,_ae as ColorPickerHue,Cae as ColorPickerOutput,ste as ColorPickerSelection,JN as Command,Bie as CommandDialog,_z as CommandEmpty,$z as CommandGroup,wz as CommandInput,Cz as CommandItem,xz as CommandList,Sz as CommandSeparator,Ez as CommandShortcut,pz as Dialog,Wie as DialogClose,QN as DialogContent,bz as DialogDescription,ZN as DialogFooter,vz as DialogHeader,XN as DialogOverlay,hz as DialogPortal,yz as DialogTitle,Fie as DialogTrigger,lH as Drawer,Hie as DrawerClose,dH as DrawerContent,mH as DrawerDescription,pH as DrawerFooter,fH as DrawerHeader,qk as DrawerOverlay,uH as DrawerPortal,hH as DrawerTitle,Uie as DrawerTrigger,eie as DropdownList,Joe as DropdownListItem,Gie as DropdownMenu,hK as DropdownMenuCheckboxItem,fK as DropdownMenuContent,Yie as DropdownMenuGroup,pK as DropdownMenuItem,gK as DropdownMenuLabel,Xie as DropdownMenuPortal,Zie as DropdownMenuRadioGroup,mK as DropdownMenuRadioItem,vK as DropdownMenuSeparator,yK as DropdownMenuShortcut,Qie as DropdownMenuSub,dK as DropdownMenuSubContent,uK as DropdownMenuSubTrigger,Kie as DropdownMenuTrigger,oie as DropdownSelector,T3 as DropdownTriggerButton,eae as Form,gY as FormControl,vY as FormDescription,tae as FormField,hY as FormItem,mY as FormLabel,yY as FormMessage,bY as FormSelect,xY as FormSelectContent,$Y as FormSelectGroup,_Y as FormSelectItem,SY as FormSelectLabel,CY as FormSelectSeparator,wY as FormSelectTrigger,EY as FormSelectValue,oae as HoverCard,GX as HoverCardContent,aae as HoverCardPortal,iae as HoverCardTrigger,Wc as Input,Oae as InputFile,kD as Label,Tae as Popover,Dae as PopoverAnchor,kae as PopoverContent,Nae as PopoverTrigger,dQ as Progress,OQ as RadioGroup,RQ as RadioGroupItem,Fv as Select,fY as SelectActions,lY as SelectCheckboxItem,Wv as SelectContent,pY as SelectFooter,XD as SelectGroup,L2 as SelectItem,QD as SelectLabel,cY as SelectMultiTrigger,dY as SelectScrollDownButton,uY as SelectScrollUpButton,ZD as SelectSeparator,j2 as SelectTrigger,M2 as SelectValue,TQ as Sheet,uae as SheetClose,BA as SheetContent,UA as SheetDescription,DQ as SheetFooter,qA as SheetHeader,WA as SheetOverlay,NQ as SheetPortal,zA as SheetTitle,lae as SheetTrigger,yJ as Sidebar,EJ as SidebarContent,SJ as SidebarFooter,PJ as SidebarGroup,RJ as SidebarGroupAction,TJ as SidebarGroupContent,OJ as SidebarGroupLabel,$J as SidebarHeader,_J as SidebarInput,xJ as SidebarInset,NJ as SidebarMenu,MJ as SidebarMenuAction,IJ as SidebarMenuBadge,AJ as SidebarMenuButton,kJ as SidebarMenuItem,jJ as SidebarMenuSkeleton,LJ as SidebarMenuSub,WJ as SidebarMenuSubButton,FJ as SidebarMenuSubItem,vJ as SidebarProvider,wJ as SidebarRail,CJ as SidebarSeparator,bJ as SidebarTrigger,u3 as Skeleton,YJ as Switch,cee as Table,uee as TableBody,mee as TableCaption,hee as TableCell,dee as TableFooter,pee as TableHead,lee as TableHeader,fee as TableRow,yae as Tabs,aee as TabsContent,bae as TabsControls,TM as TabsList,NM as TabsTrigger,vee as Textarea,lte as Tooltip,o6 as TooltipContent,Pae as TooltipProvider,ute as TooltipTrigger,fte as TooltipWrapper,mp as buttonVariants,te as cn,gee as getTextareaClassName,Mae as styledElement,Gv as uiSlice,dv as useCarousel,ed as useColorPicker,pae as useDeviceType,fae as useDeviceTypeUpdater,Ls as useFormField,mae as useIsDesktop,uJ as useIsMobile,hae as useIsTablet,Yv as useSidebar};
|
|
69
|
+
*/function qL(){if(gE)return jt;gE=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case u:case p:case f:case i:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),jt.ContextConsumer=l,jt.ContextProvider=i,jt.Element=t,jt.ForwardRef=u,jt.Fragment=r,jt.Lazy=p,jt.Memo=f,jt.Portal=n,jt.Profiler=a,jt.StrictMode=o,jt.Suspense=c,jt.SuspenseList=d,jt.isAsyncMode=function(){return!1},jt.isConcurrentMode=function(){return!1},jt.isContextConsumer=function(e){return m(e)===l},jt.isContextProvider=function(e){return m(e)===i},jt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},jt.isForwardRef=function(e){return m(e)===u},jt.isFragment=function(e){return m(e)===r},jt.isLazy=function(e){return m(e)===p},jt.isMemo=function(e){return m(e)===f},jt.isPortal=function(e){return m(e)===n},jt.isProfiler=function(e){return m(e)===a},jt.isStrictMode=function(e){return m(e)===o},jt.isSuspense=function(e){return m(e)===c},jt.isSuspenseList=function(e){return m(e)===d},jt.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},jt.typeOf=m,jt}function zL(){return vE||(vE=1,S1.exports=qL()),S1.exports}function BT(){if(yE)return C1;yE=1;var e=Ca(),t=To();return C1=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function UL(){if(bE)return E1;bE=1;var e=BT();return E1=function(t){return e(t)&&t!=+t}}zL();var HL=UL();const VL=Oo(HL);var GL=BT();const KL=Oo(GL);var sg=function(e){return FT(e)&&e.indexOf("%")===e.length-1},ri=function(e){return KL(e)&&!VL(e)},Ng=function(e){return ri(e)||FT(e)};function E_(e){return(E_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var YL=["viewBox","children"],XL=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],wE=["points","pathLength"],P1={svg:YL,polygon:wE,polyline:wE},qT=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],QL=function(e,t,n){return function(r){return e(t,n,r),null}},ZL=function(e,t,n){if(!WT(e)||"object"!==E_(e))return null;var r=null;return Object.keys(e).forEach((function(o){var a=e[o];qT.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=QL(a,t,n))})),r},JL=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},eF=function(e,t,n,r){var o,a=null!==(o=null==P1?void 0:P1[r])&&void 0!==o?o:[];return!Tg(e)&&(r&&a.includes(t)||XL.includes(t))||qT.includes(t)},zT=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(Po(e)&&(r=e.props),!WT(r))return null;var o={};return Object.keys(r).forEach((function(e){var a;eF(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])})),o},tF=["children","width","height","viewBox","className","style","title","desc"];function P_(){return P_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P_.apply(this,arguments)}function nF(e,t){if(null==e)return{};var n,r,o=rF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function rF(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function oF(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,a=e.className,i=e.style,l=e.title,s=e.desc,u=nF(e,tF),c=o||{width:n,height:r,x:0,y:0},d=Ss("recharts-surface",a);return re.createElement("svg",P_({},zT(u,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),re.createElement("title",null,l),re.createElement("desc",null,s),t)}var O1,xE,R1,_E,T1,$E,N1,SE,k1,CE,D1,EE,A1,PE,M1,OE,Sg=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function iF(){if(xE)return O1;return xE=1,O1=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}}function aF(){if(_E)return R1;_E=1;var e=iF();return R1=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function UT(){if($E)return T1;$E=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return T1=function(t){return e.test(t)}}function sF(){if(SE)return N1;return SE=1,N1=function(e){return e.split("")}}function cF(){if(CE)return k1;CE=1;var e="\\ud800-\\udfff",t="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+n+"|"+r+")"+"?",s="[\\ufe0e\\ufe0f]?",u=s+l+("(?:\\u200d(?:"+[o,a,i].join("|")+")"+s+l+")*"),c="(?:"+[o+n+"?",n,a,i,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+u,"g");return k1=function(e){return e.match(d)||[]}}function lF(){if(EE)return D1;EE=1;var e=sF(),t=UT(),n=cF();return D1=function(r){return t(r)?n(r):e(r)}}function uF(){if(PE)return A1;PE=1;var e=aF(),t=UT(),n=lF(),r=L$();return A1=function(o){return function(a){a=r(a);var i=t(a)?n(a):void 0,l=i?i[0]:a.charAt(0),s=i?e(i,1).join(""):a.slice(1);return l[o]()+s}}}function dF(){if(OE)return M1;OE=1;var e=uF()("toUpperCase");return M1=e}var fF=dF();const HT=Oo(fF);function cg(e){return function(){return e}}const VT=Math.cos,kg=Math.sin,li=Math.sqrt,Dg=Math.PI,yv=2*Dg,O_=Math.PI,R_=2*O_,Ac=1e-6,pF=R_-Ac;function GT(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function hF(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return GT;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}class mF{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?GT:hF(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+a}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let a=this._x1,i=this._y1,l=n-e,s=r-t,u=a-e,c=i-t,d=u*u+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Ac)if(Math.abs(c*l-s*u)>Ac&&o){let f=n-a,p=r-i,h=l*l+s*s,m=f*f+p*p,g=Math.sqrt(h),v=Math.sqrt(d),y=o*Math.tan((O_-Math.acos((h+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Ac&&this._append`L${e+b*u},${t+b*c}`,this._append`A${o},${o},0,0,${+(c*f>u*p)},${this._x1=e+w*l},${this._y1=t+w*s}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(r),l=n*Math.sin(r),s=e+i,u=t+l,c=1^a,d=a?r-o:o-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>Ac||Math.abs(this._y1-u)>Ac)&&this._append`L${s},${u}`,n&&(d<0&&(d=d%R_+R_),d>pF?this._append`A${n},${n},0,1,${c},${e-i},${t-l}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:d>Ac&&this._append`A${n},${n},0,${+(d>=O_)},${c},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function gF(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new mF(t)}const W$={draw(e,t){const n=li(t/Dg);e.moveTo(n,0),e.arc(0,0,n,0,yv)}},vF={draw(e,t){const n=li(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},KT=li(1/3),yF=2*KT,bF={draw(e,t){const n=li(t/yF),r=n*KT;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},wF={draw(e,t){const n=li(t),r=-n/2;e.rect(r,r,n,n)}},xF=.8908130915292852,YT=kg(Dg/10)/kg(7*Dg/10),_F=kg(yv/10)*YT,$F=-VT(yv/10)*YT,SF={draw(e,t){const n=li(t*xF),r=_F*n,o=$F*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=yv*t/5,i=VT(a),l=kg(a);e.lineTo(l*n,-i*n),e.lineTo(i*r-l*o,l*r+i*o)}e.closePath()}},I1=li(3),CF={draw(e,t){const n=-li(t/(3*I1));e.moveTo(0,2*n),e.lineTo(-I1*n,-n),e.lineTo(I1*n,-n),e.closePath()}},zo=-.5,Uo=li(3)/2,T_=1/li(12),EF=3*(T_/2+1),PF={draw(e,t){const n=li(t/EF),r=n/2,o=n*T_,a=r,i=n*T_+n,l=-a,s=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(l,s),e.lineTo(zo*r-Uo*o,Uo*r+zo*o),e.lineTo(zo*a-Uo*i,Uo*a+zo*i),e.lineTo(zo*l-Uo*s,Uo*l+zo*s),e.lineTo(zo*r+Uo*o,zo*o-Uo*r),e.lineTo(zo*a+Uo*i,zo*i-Uo*a),e.lineTo(zo*l+Uo*s,zo*s-Uo*l),e.closePath()}};function OF(e,t){let n=null,r=gF(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:cg(e||W$),t="function"==typeof t?t:cg(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:cg(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:cg(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function bp(e){return(bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var RF=["type","size","sizeType"];function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N_.apply(this,arguments)}function RE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function TE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RE(Object(n),!0).forEach((function(t){TF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TF(e,t,n){return(t=NF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NF(e){var t=kF(e,"string");return"symbol"==bp(t)?t:t+""}function kF(e,t){if("object"!=bp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function DF(e,t){if(null==e)return{};var n,r,o=AF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function AF(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XT={symbolCircle:W$,symbolCross:vF,symbolDiamond:bF,symbolSquare:wF,symbolStar:SF,symbolTriangle:CF,symbolWye:PF},MF=Math.PI/180,IF=function(e){var t="symbol".concat(HT(e));return XT[t]||W$},jF=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*MF;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},LF=function(e,t){XT["symbol".concat(HT(e))]=t},QT=function(e){var t,n=e.type,r=void 0===n?"circle":n,o=e.size,a=void 0===o?64:o,i=e.sizeType,l=void 0===i?"area":i,s=TE(TE({},DF(e,RF)),{},{type:r,size:a,sizeType:l}),u=s.className,c=s.cx,d=s.cy,f=zT(s,!0);return c===+c&&d===+d&&a===+a?re.createElement("path",N_({},f,{className:Ss("recharts-symbols",u),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=IF(r),OF().type(t).size(jF(a,l,r))())})):null};function Du(e){return(Du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k_.apply(this,arguments)}function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NE(Object(n),!0).forEach((function(t){wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function WF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JT(r.key),r)}}function qF(e,t,n){return BF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zF(e,t,n){return t=Ag(t),UF(e,ZT()?Reflect.construct(t,n||[],Ag(e).constructor):t.apply(e,n))}function UF(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return HF(e)}function HF(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ZT=function(){return!!e})()}function Ag(e){return(Ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function VF(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D_(e,t)}function D_(e,t){return(D_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wp(e,t,n){return(t=JT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JT(e){var t=GF(e,"string");return"symbol"==Du(t)?t:t+""}function GF(e,t){if("object"!=Du(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Du(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}QT.registerSymbol=LF;var j1,kE,L1,DE,F1,AE,W1,ME,B1,IE,q1,jE,z1,LE,U1,FE,H1,WE,V1,BE,G1,qE,K1,zE,Y1,UE,X1,HE,Q1,VE,Z1,GE,J1,KE,eb,YE,tb,XE,nb,QE,rb,ZE,ob,JE,ib,eP,ab,tP,Ho=32,B$=function(){function e(){return WF(this,e),zF(this,e,arguments)}return VF(e,ev),qF(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=Ho/2,r=Ho/6,o=Ho/3,a=e.inactive?t:e.color;if("plainline"===e.type)return re.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:Ho,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return re.createElement("path",{strokeWidth:4,fill:"none",stroke:a,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(Ho,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return re.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(Ho/8,"h").concat(Ho,"v").concat(3*Ho/4,"h").concat(-Ho,"z"),className:"recharts-legend-icon"});if(re.isValidElement(e.legendIcon)){var i=FF({},e);return delete i.legendIcon,re.cloneElement(e.legendIcon,i)}return re.createElement(QT,{fill:a,cx:n,cy:n,size:Ho,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,a=t.formatter,i=t.inactiveColor,l={x:0,y:0,width:Ho,height:Ho},s={display:"horizontal"===o?"inline-block":"block",marginRight:10},u={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||a,c=Ss(wp(wp({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=Tg(t.value)?null:t.value;Sg(!Tg(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var f=t.inactive?i:t.color;return re.createElement("li",k_({className:c,style:s,key:"legend-item-".concat(n)},ZL(e.props,t,n)),re.createElement(oF,{width:r,height:r,viewBox:l,style:u},e.renderIcon(t)),re.createElement("span",{className:"recharts-legend-item-text",style:{color:f}},o?o(d,t,n):d))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return re.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function KF(){if(kE)return j1;kE=1;var e=gv();return j1=function(){this.__data__=new e,this.size=0}}function YF(){if(DE)return L1;return DE=1,L1=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function XF(){if(AE)return F1;return AE=1,F1=function(e){return this.__data__.get(e)}}function QF(){if(ME)return W1;return ME=1,W1=function(e){return this.__data__.has(e)}}function ZF(){if(IE)return B1;IE=1;var e=gv(),t=M$(),n=I$();return B1=function(r,o){var a=this.__data__;if(a instanceof e){var i=a.__data__;if(!t||i.length<199)return i.push([r,o]),this.size=++a.size,this;a=this.__data__=new n(i)}return a.set(r,o),this.size=a.size,this}}function q$(){if(jE)return q1;jE=1;var e=gv(),t=KF(),n=YF(),r=XF(),o=QF(),a=ZF();function i(t){var n=this.__data__=new e(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=o,i.prototype.set=a,q1=i}function JF(){if(LE)return z1;LE=1;return z1=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function eW(){if(FE)return U1;return FE=1,U1=function(e){return this.__data__.has(e)}}function eN(){if(WE)return H1;WE=1;var e=I$(),t=JF(),n=eW();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,H1=r}function tW(){if(BE)return V1;return BE=1,V1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function tN(){if(qE)return G1;return qE=1,G1=function(e,t){return e.has(t)}}function nN(){if(zE)return K1;zE=1;var e=eN(),t=tW(),n=tN();return K1=function(r,o,a,i,l,s){var u=1&a,c=r.length,d=o.length;if(c!=d&&!(u&&d>c))return!1;var f=s.get(r),p=s.get(o);if(f&&p)return f==o&&p==r;var h=-1,m=!0,g=2&a?new e:void 0;for(s.set(r,o),s.set(o,r);++h<c;){var v=r[h],y=o[h];if(i)var b=u?i(y,v,h,o,r,s):i(v,y,h,r,o,s);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!t(o,(function(e,t){if(!n(g,t)&&(v===e||l(v,e,a,i,s)))return g.push(t)}))){m=!1;break}}else if(v!==y&&!l(v,y,a,i,s)){m=!1;break}}return s.delete(r),s.delete(o),m}}function rN(){if(UE)return Y1;UE=1;var e=zr().Uint8Array;return Y1=e}function nW(){if(HE)return X1;return HE=1,X1=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function z$(){if(VE)return Q1;return VE=1,Q1=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function rW(){if(GE)return Z1;GE=1;var e=Hu(),t=rN(),n=hv(),r=nN(),o=nW(),a=z$(),i=e?e.prototype:void 0,l=i?i.valueOf:void 0;return Z1=function(e,i,s,u,c,d,f){switch(s){case"[object DataView]":if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=i.byteLength||!d(new t(e),new t(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+i);case"[object Error]":return e.name==i.name&&e.message==i.message;case"[object RegExp]":case"[object String]":return e==i+"";case"[object Map]":var p=o;case"[object Set]":var h=1&u;if(p||(p=a),e.size!=i.size&&!h)return!1;var m=f.get(e);if(m)return m==i;u|=2,f.set(e,i);var g=r(p(e),p(i),u,c,d,f);return f.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(i)}return!1}}function U$(){if(KE)return J1;return KE=1,J1=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function oN(){if(YE)return eb;YE=1;var e=U$(),t=qr();return eb=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function oW(){if(XE)return tb;return XE=1,tb=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}}function iN(){if(QE)return nb;return QE=1,nb=function(){return[]}}function H$(){if(ZE)return rb;ZE=1;var e=oW(),t=iN(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return rb=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function iW(){if(JE)return ob;return JE=1,ob=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function aW(){if(eP)return ib;eP=1;var e=Ca(),t=To();return ib=function(n){return t(n)&&"[object Arguments]"==e(n)}}function V$(){if(tP)return ab;tP=1;var e=aW(),t=To(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return ab=a}wp(B$,"displayName","Legend"),wp(B$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var sb,nP,rP,cb,oP,lb,iP,ub,aP,db,sP,op={exports:{}};function sW(){if(nP)return sb;return nP=1,sb=function(){return!1}}function G$(){return rP||(rP=1,e=op,t=op.exports,n=zr(),r=sW(),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,l=(i?i.isBuffer:void 0)||r,e.exports=l),op.exports;var e,t,n,r,o,a,i,l}function bv(){if(oP)return cb;oP=1;var e=/^(?:0|[1-9]\d*)$/;return cb=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function K$(){if(iP)return lb;iP=1;return lb=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function cW(){if(aP)return ub;aP=1;var e=Ca(),t=K$(),n=To(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,ub=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function wv(){if(sP)return db;return sP=1,db=function(e){return function(t){return e(t)}}}op.exports;var cP,fb,lP,pb,uP,hb,dP,mb,fP,gb,pP,vb,hP,yb,mP,bb,gP,wb,vP,xb,yP,_b,bP,$b,wP,Sb,xP,Cb,_P,Eb,$P,Pb,SP,Ob,CP,Rb,EP,Tb,PP,Nb,OP,kb,RP,Db,TP,Ab,NP,Mb,kP,Ib,DP,jb,AP,Lb,MP,Fb,IP,Wb,jP,Bb,LP,qb,FP,zb,WP,Ub,BP,Hb,qP,Vb,zP,Gb,UP,Kb,HP,Yb,VP,Xb,GP,Qb,KP,Zb,YP,ip={exports:{}};function Y$(){return cP||(cP=1,e=ip,t=ip.exports,n=AT(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch{}}(),e.exports=i),ip.exports;var e,t,n,r,o,a,i}function aN(){if(lP)return fb;lP=1;var e=cW(),t=wv(),n=Y$(),r=n&&n.isTypedArray,o=r?t(r):e;return fb=o}function sN(){if(uP)return pb;uP=1;var e=iW(),t=V$(),n=qr(),r=G$(),o=bv(),a=aN(),i=Object.prototype.hasOwnProperty;return pb=function(l,s){var u=n(l),c=!u&&t(l),d=!u&&!c&&r(l),f=!u&&!c&&!d&&a(l),p=u||c||d||f,h=p?e(l.length,String):[],m=h.length;for(var g in l)(s||i.call(l,g))&&(!p||!("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,m)))&&h.push(g);return h}}function X$(){if(dP)return hb;dP=1;var e=Object.prototype;return hb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function cN(){if(fP)return mb;return fP=1,mb=function(e,t){return function(n){return e(t(n))}}}function lW(){if(pP)return gb;pP=1;var e=cN()(Object.keys,Object);return gb=e}function lN(){if(hP)return vb;hP=1;var e=X$(),t=lW(),n=Object.prototype.hasOwnProperty;return vb=function(r){if(!e(r))return t(r);var o=[];for(var a in Object(r))n.call(r,a)&&"constructor"!=a&&o.push(a);return o}}function qp(){if(mP)return yb;mP=1;var e=fv(),t=K$();return yb=function(n){return null!=n&&t(n.length)&&!e(n)}}function zp(){if(gP)return bb;gP=1;var e=sN(),t=lN(),n=qp();return bb=function(r){return n(r)?e(r):t(r)}}function uN(){if(vP)return wb;vP=1;var e=oN(),t=H$(),n=zp();return wb=function(r){return e(r,n,t)}}function uW(){if(yP)return xb;yP=1;var e=uN(),t=Object.prototype.hasOwnProperty;return xb=function(n,r,o,a,i,l){var s=1&o,u=e(n),c=u.length;if(c!=e(r).length&&!s)return!1;for(var d=c;d--;){var f=u[d];if(!(s?f in r:t.call(r,f)))return!1}var p=l.get(n),h=l.get(r);if(p&&h)return p==r&&h==n;var m=!0;l.set(n,r),l.set(r,n);for(var g=s;++d<c;){var v=n[f=u[d]],y=r[f];if(a)var b=s?a(y,v,f,r,n,l):a(v,y,f,n,r,l);if(!(void 0===b?v===y||i(v,y,o,a,l):b)){m=!1;break}g||(g="constructor"==f)}if(m&&!g){var w=n.constructor,x=r.constructor;w!=x&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(m=!1)}return l.delete(n),l.delete(r),m}}function dW(){if(bP)return _b;bP=1;var e=Qc()(zr(),"DataView");return _b=e}function fW(){if(wP)return $b;wP=1;var e=Qc()(zr(),"Promise");return $b=e}function dN(){if(xP)return Sb;xP=1;var e=Qc()(zr(),"Set");return Sb=e}function fN(){if(_P)return Cb;_P=1;var e=Qc()(zr(),"WeakMap");return Cb=e}function Up(){if($P)return Eb;$P=1;var e=dW(),t=M$(),n=fW(),r=dN(),o=fN(),a=Ca(),i=MT(),l="[object Map]",s="[object Promise]",u="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),h=i(n),m=i(r),g=i(o),v=a;return(e&&v(new e(new ArrayBuffer(1)))!=d||t&&v(new t)!=l||n&&v(n.resolve())!=s||r&&v(new r)!=u||o&&v(new o)!=c)&&(v=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?i(n):"";if(r)switch(r){case f:return d;case p:return l;case h:return s;case m:return u;case g:return c}return t}),Eb=v}function pW(){if(SP)return Pb;SP=1;var e=q$(),t=nN(),n=rW(),r=uW(),o=Up(),a=qr(),i=G$(),l=aN(),s="[object Arguments]",u="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return Pb=function(f,p,h,m,g,v){var y=a(f),b=a(p),w=y?u:o(f),x=b?u:o(p),_=(w=w==s?c:w)==c,O=(x=x==s?c:x)==c,k=w==x;if(k&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(k&&!_)return v||(v=new e),y||l(f)?t(f,p,h,m,g,v):n(f,p,w,h,m,g,v);if(!(1&h)){var S=_&&d.call(f,"__wrapped__"),D=O&&d.call(p,"__wrapped__");if(S||D){var C=S?f.value():f,E=D?p.value():p;return v||(v=new e),g(C,E,h,m,v)}}return!!k&&(v||(v=new e),r(f,p,h,m,g,v))}}function pN(){if(CP)return Ob;CP=1;var e=pW(),t=To();return Ob=function n(r,o,a,i,l){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,a,i,n,l))},Ob}function hW(){if(EP)return Rb;EP=1;var e=q$(),t=pN();return Rb=function(n,r,o,a){var i=o.length,l=i,s=!a;if(null==n)return!l;for(n=Object(n);i--;){var u=o[i];if(s&&u[2]?u[1]!==n[u[0]]:!(u[0]in n))return!1}for(;++i<l;){var c=(u=o[i])[0],d=n[c],f=u[1];if(s&&u[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(a)var h=a(d,f,c,n,r,p);if(!(void 0===h?t(f,d,3,a,p):h))return!1}}return!0}}function hN(){if(PP)return Tb;PP=1;var e=Go();return Tb=function(t){return t==t&&!e(t)}}function mW(){if(OP)return Nb;OP=1;var e=hN(),t=zp();return Nb=function(n){for(var r=t(n),o=r.length;o--;){var a=r[o],i=n[a];r[o]=[a,i,e(i)]}return r}}function mN(){if(RP)return kb;return RP=1,kb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function gW(){if(TP)return Db;TP=1;var e=hW(),t=mW(),n=mN();return Db=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function vW(){if(NP)return Ab;return NP=1,Ab=function(e,t){return null!=e&&t in Object(e)}}function yW(){if(kP)return Mb;kP=1;var e=jT(),t=V$(),n=qr(),r=bv(),o=K$(),a=Bp();return Mb=function(i,l,s){for(var u=-1,c=(l=e(l,i)).length,d=!1;++u<c;){var f=a(l[u]);if(!(d=null!=i&&s(i,f)))break;i=i[f]}return d||++u!=c?d:!!(c=null==i?0:i.length)&&o(c)&&r(f,c)&&(n(i)||t(i))}}function bW(){if(DP)return Ib;DP=1;var e=vW(),t=yW();return Ib=function(n,r){return null!=n&&t(n,r,e)}}function wW(){if(AP)return jb;AP=1;var e=pN(),t=LT(),n=bW(),r=A$(),o=hN(),a=mN(),i=Bp();return jb=function(l,s){return r(l)&&o(s)?a(i(l),s):function(r){var o=t(r,l);return void 0===o&&o===s?n(r,l):e(s,o,3)}}}function Hp(){if(MP)return Lb;return MP=1,Lb=function(e){return e}}function xW(){if(IP)return Fb;return IP=1,Fb=function(e){return function(t){return null==t?void 0:t[e]}}}function _W(){if(jP)return Wb;jP=1;var e=F$();return Wb=function(t){return function(n){return e(n,t)}}}function $W(){if(LP)return Bb;LP=1;var e=xW(),t=_W(),n=A$(),r=Bp();return Bb=function(o){return n(o)?e(r(o)):t(o)}}function Q$(){if(FP)return qb;FP=1;var e=gW(),t=wW(),n=Hp(),r=qr(),o=$W();return qb=function(a){return"function"==typeof a?a:null==a?n:"object"==typeof a?r(a)?t(a[0],a[1]):e(a):o(a)}}function SW(){if(WP)return zb;return WP=1,zb=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}}function CW(){if(BP)return Ub;return BP=1,Ub=function(e){return e!=e}}function EW(){if(qP)return Hb;return qP=1,Hb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function PW(){if(zP)return Vb;zP=1;var e=SW(),t=CW(),n=EW();return Vb=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function gN(){if(UP)return Gb;UP=1;var e=PW();return Gb=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function OW(){if(HP)return Kb;return HP=1,Kb=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}}function vN(){if(VP)return Yb;return VP=1,Yb=function(){}}function RW(){if(GP)return Xb;GP=1;var e=dN(),t=vN(),n=z$(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Xb=r}function TW(){if(KP)return Qb;KP=1;var e=eN(),t=gN(),n=OW(),r=tN(),o=RW(),a=z$();return Qb=function(i,l,s){var u=-1,c=t,d=i.length,f=!0,p=[],h=p;if(s)f=!1,c=n;else if(d>=200){var m=l?null:o(i);if(m)return a(m);f=!1,c=r,h=new e}else h=l?[]:p;e:for(;++u<d;){var g=i[u],v=l?l(g):g;if(g=s||0!==g?g:0,f&&v==v){for(var y=h.length;y--;)if(h[y]===v)continue e;l&&h.push(v),p.push(g)}else c(h,v,s)||(h!==p&&h.push(v),p.push(g))}return p}}function NW(){if(YP)return Zb;YP=1;var e=Q$(),t=TW();return Zb=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}ip.exports;var kW=NW();const XP=Oo(kW);function yN(e,t,n){return!0===t?XP(e,n):Tg(t)?XP(e,t):e}function Au(e){return(Au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var DW=["ref"];function QP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QP(Object(n),!0).forEach((function(t){xv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function AW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wN(r.key),r)}}function MW(e,t,n){return ZP(e.prototype,t),ZP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IW(e,t,n){return t=Mg(t),jW(e,bN()?Reflect.construct(t,n,Mg(e).constructor):t.apply(e,n))}function jW(e,t){if(t&&("object"===Au(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return LW(e)}function LW(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(bN=function(){return!!e})()}function Mg(e){return(Mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function FW(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A_(e,t)}function A_(e,t){return(A_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xv(e,t,n){return(t=wN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wN(e){var t=WW(e,"string");return"symbol"==Au(t)?t:t+""}function WW(e,t){if("object"!=Au(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Au(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function BW(e,t){if(null==e)return{};var n,r,o=qW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function qW(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zW(e){return e.value}function UW(e,t){if(re.isValidElement(e))return re.cloneElement(e,t);if("function"==typeof e)return re.createElement(e,t);t.ref;var n=BW(t,DW);return re.createElement(B$,n)}var Jb,e5,ew,t5,tw,n5,nw,r5,rw,o5,ow,i5,iw,a5,aw,s5,sw,c5,cw,l5,lw,u5,uw,d5,dw,f5,fw,p5,pw,h5,hw,m5,mw,g5,gw,v5,vw,y5,yw,b5,bw,w5,ww,x5,JP=1,Z$=function(){function e(){var t;AW(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return xv(t=IW(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return FW(e,ev),MW(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>JP||Math.abs(t.height-this.lastBoundingBox.height)>JP)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?fa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,a=r.align,i=r.verticalAlign,l=r.margin,s=r.chartWidth,u=r.chartHeight;if(!e||(void 0===e.left||null===e.left)&&(void 0===e.right||null===e.right))if("center"===a&&"vertical"===o){t={left:((s||0)-this.getBBoxSnapshot().width)/2}}else t="right"===a?{right:l&&l.right||0}:{left:l&&l.left||0};if(!e||(void 0===e.top||null===e.top)&&(void 0===e.bottom||null===e.bottom))if("middle"===i){n={top:((u||0)-this.getBBoxSnapshot().height)/2}}else n="bottom"===i?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return fa(fa({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,a=t.wrapperStyle,i=t.payloadUniqBy,l=t.payload,s=fa(fa({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return re.createElement("div",{className:"recharts-legend-wrapper",style:s,ref:function(t){e.wrapperNode=t}},UW(n,fa(fa({},this.props),{},{payload:yN(l,i,zW)})))}}],[{key:"getWithHeight",value:function(e,t){var n=fa(fa({},this.defaultProps),e.props).layout;return"vertical"===n&&ri(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function HW(){if(e5)return Jb;e5=1;var e=Hu(),t=V$(),n=qr(),r=e?e.isConcatSpreadable:void 0;return Jb=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function xN(){if(t5)return ew;t5=1;var e=U$(),t=HW();return ew=function n(r,o,a,i,l){var s=-1,u=r.length;for(a||(a=t),l||(l=[]);++s<u;){var c=r[s];o>0&&a(c)?o>1?n(c,o-1,a,i,l):e(l,c):i||(l[l.length]=c)}return l},ew}function VW(){if(n5)return tw;return n5=1,tw=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var s=i[e?l:++o];if(!1===n(a[s],s,a))break}return t}}}function GW(){if(r5)return nw;r5=1;var e=VW()();return nw=e}function KW(){if(o5)return rw;o5=1;var e=GW(),t=zp();return rw=function(n,r){return n&&e(n,r,t)}}function YW(){if(i5)return ow;i5=1;var e=qp();return ow=function(t,n){return function(r,o){if(null==r)return r;if(!e(r))return t(r,o);for(var a=r.length,i=n?a:-1,l=Object(r);(n?i--:++i<a)&&!1!==o(l[i],i,l););return r}}}function XW(){if(a5)return iw;a5=1;var e=KW(),t=YW()(e);return iw=t}function QW(){if(s5)return aw;s5=1;var e=XW(),t=qp();return aw=function(n,r){var o=-1,a=t(n)?Array(n.length):[];return e(n,(function(e,t,n){a[++o]=r(e,t,n)})),a}}function ZW(){if(c5)return sw;return c5=1,sw=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function JW(){if(l5)return cw;l5=1;var e=Vu();return cw=function(t,n){if(t!==n){var r=void 0!==t,o=null===t,a=t==t,i=e(t),l=void 0!==n,s=null===n,u=n==n,c=e(n);if(!s&&!c&&!i&&t>n||i&&l&&u&&!s&&!c||o&&l&&u||!r&&u||!a)return 1;if(!o&&!i&&!c&&t<n||c&&r&&a&&!o&&!i||s&&r&&a||!l&&a||!u)return-1}return 0}}function eB(){if(u5)return lw;u5=1;var e=JW();return lw=function(t,n,r){for(var o=-1,a=t.criteria,i=n.criteria,l=a.length,s=r.length;++o<l;){var u=e(a[o],i[o]);if(u)return o>=s?u:u*("desc"==r[o]?-1:1)}return t.index-n.index}}function tB(){if(d5)return uw;d5=1;var e=j$(),t=F$(),n=Q$(),r=QW(),o=ZW(),a=wv(),i=eB(),l=Hp(),s=qr();return uw=function(u,c,d){c=c.length?e(c,(function(e){return s(e)?function(n){return t(n,1===e.length?e[0]:e)}:e})):[l];var f=-1;c=e(c,a(n));var p=r(u,(function(t,n,r){return{criteria:e(c,(function(e){return e(t)})),index:++f,value:t}}));return o(p,(function(e,t){return i(e,t,d)}))}}function J$(){if(f5)return dw;return f5=1,dw=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function _N(){if(p5)return fw;p5=1;var e=J$(),t=Math.max;return fw=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var a=arguments,i=-1,l=t(a.length-r,0),s=Array(l);++i<l;)s[i]=a[r+i];i=-1;for(var u=Array(r+1);++i<r;)u[i]=a[i];return u[r]=o(s),e(n,this,u)}},fw}function nB(){if(h5)return pw;return h5=1,pw=function(e){return function(){return e}}}function $N(){if(m5)return hw;m5=1;var e=Qc(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return hw=t}function rB(){if(g5)return mw;g5=1;var e=nB(),t=$N(),n=Hp();return mw=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function SN(){if(v5)return gw;v5=1;var e=Date.now;return gw=function(t){var n=0,r=0;return function(){var o=e(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},gw}function e2(){if(y5)return vw;y5=1;var e=rB(),t=SN()(e);return vw=t}function oB(){if(b5)return yw;b5=1;var e=Hp(),t=_N(),n=e2();return yw=function(r,o){return n(t(r,o,e),r+"")}}function iB(){if(w5)return bw;w5=1;var e=hv(),t=qp(),n=bv(),r=Go();return bw=function(o,a,i){if(!r(i))return!1;var l=typeof a;return!!("number"==l?t(i)&&n(a,i.length):"string"==l&&a in i)&&e(i[a],o)}}function aB(){if(x5)return ww;x5=1;var e=xN(),t=tB(),n=oB(),r=iB(),o=n((function(n,o){if(null==n)return[];var a=o.length;return a>1&&r(n,o[0],o[1])?o=[]:a>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(n,e(o,1),[])}));return ww=o}xv(Z$,"displayName","Legend"),xv(Z$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var sB=aB();const cB=Oo(sB);function xp(e){return(xp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M_(){return M_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M_.apply(this,arguments)}function lB(e,t){return pB(e)||fB(e,t)||dB(e,t)||uB()}function uB(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function dB(e,t){if(e){if("string"==typeof e)return _5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _5(e,t)}}function _5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fB(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function pB(e){if(Array.isArray(e))return e}function $5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$5(Object(n),!0).forEach((function(t){hB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hB(e,t,n){return(t=mB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mB(e){var t=gB(e,"string");return"symbol"==xp(t)?t:t+""}function gB(e,t){if("object"!=xp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function vB(e){return Array.isArray(e)&&Ng(e[0])&&Ng(e[1])?e.join(" ~ "):e}var yB=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,a=e.itemStyle,i=void 0===a?{}:a,l=e.labelStyle,s=void 0===l?{}:l,u=e.payload,c=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,h=e.label,m=e.labelFormatter,g=e.accessibilityLayer,v=void 0!==g&&g,y=xw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=xw({margin:0},s),w=!jL(h),x=w?h:"",_=Ss("recharts-default-tooltip",f),O=Ss("recharts-tooltip-label",p);w&&m&&null!=u&&(x=m(h,u));var k=v?{role:"status","aria-live":"assertive"}:{};return re.createElement("div",M_({className:_,style:y},k),re.createElement("p",{className:O,style:b},re.isValidElement(x)?x:"".concat(x)),function(){if(u&&u.length){var e=(d?cB(u,d):u).map((function(e,t){if("none"===e.type)return null;var r=xw({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||c||vB,a=e.value,l=e.name,s=a,d=l;if(null!=s&&null!=d){var f=o(a,l,e,t,u);if(Array.isArray(f)){var p=lB(f,2);s=p[0],d=p[1]}else s=f}return re.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},Ng(d)?re.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Ng(d)?re.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,re.createElement("span",{className:"recharts-tooltip-item-value"},s),re.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return re.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function _p(e){return(_p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lg(e,t,n){return(t=bB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bB(e){var t=wB(e,"string");return"symbol"==_p(t)?t:t+""}function wB(e,t){if("object"!=_p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var Qf="recharts-tooltip-wrapper",xB={visibility:"hidden"};function _B(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ss(Qf,lg(lg(lg(lg({},"".concat(Qf,"-right"),ri(n)&&t&&ri(t.x)&&n>=t.x),"".concat(Qf,"-left"),ri(n)&&t&&ri(t.x)&&n<t.x),"".concat(Qf,"-bottom"),ri(r)&&t&&ri(t.y)&&r>=t.y),"".concat(Qf,"-top"),ri(r)&&t&&ri(t.y)&&r<t.y))}function S5(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipDimension,s=e.viewBox,u=e.viewBoxDimension;if(a&&ri(a[r]))return a[r];var c=n[r]-l-o,d=n[r]+o;return t[r]?i[r]?c:d:i[r]?c<s[r]?Math.max(d,s[r]):Math.max(c,s[r]):d+l>s[r]+u?Math.max(c,s[r]):Math.max(d,s[r])}function $B(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function SB(e){var t,n,r,o=e.allowEscapeViewBox,a=e.coordinate,i=e.offsetTopLeft,l=e.position,s=e.reverseDirection,u=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return u.height>0&&u.width>0&&a?t=$B({translateX:n=S5({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:l,reverseDirection:s,tooltipDimension:u.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=S5({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:l,reverseDirection:s,tooltipDimension:u.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=xB,{cssProperties:t,cssClasses:_B({translateX:n,translateY:r,coordinate:a})}}function Mu(e){return(Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C5(Object(n),!0).forEach((function(t){j_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EB(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EN(r.key),r)}}function PB(e,t,n){return EB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OB(e,t,n){return t=Ig(t),RB(e,CN()?Reflect.construct(t,n,Ig(e).constructor):t.apply(e,n))}function RB(e,t){if(t&&("object"===Mu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return TB(e)}function TB(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(CN=function(){return!!e})()}function Ig(e){return(Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function NB(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I_(e,t)}function I_(e,t){return(I_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function j_(e,t,n){return(t=EN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EN(e){var t=kB(e,"string");return"symbol"==Mu(t)?t:t+""}function kB(e,t){if("object"!=Mu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Mu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var P5=1,DB=function(){function e(){var t;CB(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return j_(t=OB(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),j_(t,"handleKeyDown",(function(e){var n,r,o,a;"Escape"===e.key&&t.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=t.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(a=t.props.coordinate)||void 0===a?void 0:a.y)&&void 0!==o?o:0}})})),t}return NB(e,ev),PB(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>P5||Math.abs(e.height-this.state.lastBoundingBox.height)>P5)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.children,l=t.coordinate,s=t.hasPayload,u=t.isAnimationActive,c=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,h=t.viewBox,m=t.wrapperStyle,g=SB({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:h}),v=g.cssClasses,y=g.cssProperties,b=E5(E5({transition:u&&n?"transform ".concat(o,"ms ").concat(a):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&s?"visible":"hidden",position:"absolute",top:0,left:0},m);return re.createElement("div",{tabIndex:-1,className:v,style:b,ref:function(t){e.wrapperNode=t}},i)}}])}(),AB=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Cg={isSsr:AB(),get:function(e){return Cg[e]},set:function(e,t){if("string"==typeof e)Cg[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){Cg[t]=e[t]}))}}};function Iu(e){return(Iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O5(Object(n),!0).forEach((function(t){t2(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function MB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IB(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ON(r.key),r)}}function jB(e,t,n){return IB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LB(e,t,n){return t=jg(t),FB(e,PN()?Reflect.construct(t,n||[],jg(e).constructor):t.apply(e,n))}function FB(e,t){if(t&&("object"===Iu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return WB(e)}function WB(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(PN=function(){return!!e})()}function jg(e){return(jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function BB(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L_(e,t)}function L_(e,t){return(L_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function t2(e,t,n){return(t=ON(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ON(e){var t=qB(e,"string");return"symbol"==Iu(t)?t:t+""}function qB(e,t){if("object"!=Iu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Iu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function zB(e){return e.dataKey}function UB(e,t){return re.isValidElement(e)?re.cloneElement(e,t):"function"==typeof e?re.createElement(e,t):re.createElement(yB,t)}var _w,T5,$w,N5,Sw,k5,Cw,D5,Ew,A5,Pw,M5,n2=function(){function e(){return MB(this,e),LB(this,e,arguments)}return BB(e,ev),jB(e,[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.content,l=t.coordinate,s=t.filterNull,u=t.isAnimationActive,c=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,h=t.reverseDirection,m=t.useTranslate3d,g=t.viewBox,v=t.wrapperStyle,y=d??[];s&&y.length&&(y=yN(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,zB));var b=y.length>0;return re.createElement(DB,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:u,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:h,useTranslate3d:m,viewBox:g,wrapperStyle:v},UB(i,R5(R5({},this.props),{},{payload:y})))}}])}();function HB(){if(T5)return _w;T5=1;var e=zr();return _w=function(){return e.Date.now()}}function VB(){if(N5)return $w;N5=1;var e=/\s/;return $w=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function GB(){if(k5)return Sw;k5=1;var e=VB(),t=/^\s+/;return Sw=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function RN(){if(D5)return Cw;D5=1;var e=GB(),t=Go(),n=Vu(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return Cw=function(l){if("number"==typeof l)return l;if(n(l))return NaN;if(t(l)){var s="function"==typeof l.valueOf?l.valueOf():l;l=t(s)?s+"":s}if("string"!=typeof l)return 0===l?l:+l;l=e(l);var u=o.test(l);return u||a.test(l)?i(l.slice(2),u?2:8):r.test(l)?NaN:+l}}function TN(){if(A5)return Ew;A5=1;var e=Go(),t=HB(),n=RN(),r=Math.max,o=Math.min;return Ew=function(a,i,l){var s,u,c,d,f,p,h=0,m=!1,g=!1,v=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function y(e){var t=s,n=u;return s=u=void 0,h=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||g&&e-h>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return g?o(t,c-(e-h)):t}(e))}function x(e){return f=void 0,v&&s?y(e):(s=u=void 0,d)}function _(){var e=t(),n=b(e);if(s=arguments,u=this,p=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,i),m?y(e):d}(p);if(g)return clearTimeout(f),f=setTimeout(w,i),y(p)}return void 0===f&&(f=setTimeout(w,i)),d}return i=n(i)||0,e(l)&&(m=!!l.leading,c=(g="maxWait"in l)?r(n(l.maxWait)||0,i):c,v="trailing"in l?!!l.trailing:v),_.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=p=u=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},Ew}function KB(){if(M5)return Pw;M5=1;var e=TN(),t=Go();return Pw=function(n,r,o){var a=!0,i=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(a="leading"in o?!!o.leading:a,i="trailing"in o?!!o.trailing:i),e(n,r,{leading:a,maxWait:r,trailing:i})}}t2(n2,"displayName","Tooltip"),t2(n2,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Cg.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var YB=KB();const XB=Oo(YB);function $p(e){return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ug(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I5(Object(n),!0).forEach((function(t){QB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QB(e,t,n){return(t=ZB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZB(e){var t=JB(e,"string");return"symbol"==$p(t)?t:t+""}function JB(e,t){if("object"!=$p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function eq(e,t){return oq(e)||rq(e,t)||nq(e,t)||tq()}function tq(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nq(e,t){if(e){if("string"==typeof e)return j5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j5(e,t)}}function j5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rq(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function oq(e){if(Array.isArray(e))return e}var Ow,L5,Rw,F5,Tw,W5,Nw,B5,kw,q5,Dw,z5,Aw,U5,Mw,H5,Iw,V5,jw,G5,Lw,K5,Fw,Y5,Ww,X5,iq=ye((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,a=e.width,i=void 0===a?"100%":a,l=e.height,s=void 0===l?"100%":l,u=e.minWidth,c=void 0===u?0:u,d=e.minHeight,f=e.maxHeight,p=e.children,h=e.debounce,m=void 0===h?0:h,g=e.id,v=e.className,y=e.onResize,b=e.style,w=void 0===b?{}:b,x=Ae(null),_=Ae();_.current=y,H8(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var O=eq(Ke({containerWidth:o.width,containerHeight:o.height}),2),k=O[0],S=O[1],D=Ge((function(e,t){S((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);We((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;D(r,o),null===(t=_.current)||void 0===t||t.call(_,r,o)};m>0&&(e=XB(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return D(r,o),t.observe(x.current),function(){t.disconnect()}}),[D,m]);var C=or((function(){var e=k.containerWidth,t=k.containerHeight;if(e<0||t<0)return null;Sg(sg(i)||sg(s),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,s),Sg(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=sg(i)?e:i,o=sg(s)?t:s;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),Sg(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,i,s,c,d,n);var a=!Array.isArray(p)&&JL(p.type).endsWith("Chart");return re.Children.map(p,(function(e){return re.isValidElement(e)?_a(e,ug({width:r,height:o},a?{style:ug({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,s,f,d,c,k,i]);return re.createElement("div",{id:g?"".concat(g):void 0,className:Ss("recharts-responsive-container",v),style:ug(ug({},w),{},{width:i,height:s,minWidth:c,minHeight:d,maxHeight:f}),ref:x},C)}));function r2(){if(L5)return Ow;L5=1;var e=cN()(Object.getPrototypeOf,Object);return Ow=e}function aq(){if(F5)return Rw;F5=1;var e=Ca(),t=r2(),n=To(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,l=a.call(Object);return Rw=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var s=i.call(o,"constructor")&&o.constructor;return"function"==typeof s&&s instanceof s&&a.call(s)==l}}function sq(){if(W5)return Tw;W5=1;var e=RN(),t=1/0;return Tw=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function NN(){if(B5)return Nw;B5=1;var e=$N();return Nw=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function kN(){if(q5)return kw;q5=1;var e=sq();return kw=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function o2(){if(z5)return Dw;return z5=1,Dw=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function DN(){if(U5)return Aw;U5=1;var e=NN(),t=hv(),n=Object.prototype.hasOwnProperty;return Aw=function(r,o,a){var i=r[o];(!n.call(r,o)||!t(i,a)||void 0===a&&!(o in r))&&e(r,o,a)}}function _v(){if(H5)return Mw;H5=1;var e=DN(),t=NN();return Mw=function(n,r,o,a){var i=!o;o||(o={});for(var l=-1,s=r.length;++l<s;){var u=r[l],c=a?a(o[u],n[u],u,o,n):void 0;void 0===c&&(c=n[u]),i?t(o,u,c):e(o,u,c)}return o}}function AN(){if(V5)return Iw;V5=1;var e=_v(),t=zp();return Iw=function(n,r){return n&&e(r,t(r),n)}}function cq(){if(G5)return jw;return G5=1,jw=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function lq(){if(K5)return Lw;K5=1;var e=Go(),t=X$(),n=cq(),r=Object.prototype.hasOwnProperty;return Lw=function(o){if(!e(o))return n(o);var a=t(o),i=[];for(var l in o)"constructor"==l&&(a||!r.call(o,l))||i.push(l);return i}}function i2(){if(Y5)return Fw;Y5=1;var e=sN(),t=lq(),n=qp();return Fw=function(r){return n(r)?e(r,!0):t(r)}}function uq(){if(X5)return Ww;X5=1;var e=_v(),t=i2();return Ww=function(n,r){return n&&e(r,t(r),n)}}var Q5,Bw,Z5,qw,J5,zw,eO,Uw,tO,Hw,nO,Vw,rO,Gw,oO,Kw,iO,Yw,aO,Xw,sO,Qw,cO,Zw,lO,Jw,uO,ex,dO,tx,fO,nx,pO,rx,hO,ox,mO,ix,gO,ax,vO,sx,yO,ap={exports:{}};function dq(){return Q5||(Q5=1,e=ap,t=ap.exports,n=zr(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}),ap.exports;var e,t,n,r,o,a,i}function $v(){if(Z5)return Bw;return Z5=1,Bw=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function fq(){if(J5)return qw;J5=1;var e=_v(),t=H$();return qw=function(n,r){return e(n,t(n),r)}}function MN(){if(eO)return zw;eO=1;var e=U$(),t=r2(),n=H$(),r=iN(),o=Object.getOwnPropertySymbols;return zw=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function pq(){if(tO)return Uw;tO=1;var e=_v(),t=MN();return Uw=function(n,r){return e(n,t(n),r)}}function hq(){if(nO)return Hw;nO=1;var e=oN(),t=MN(),n=i2();return Hw=function(r){return e(r,n,t)}}function mq(){if(rO)return Vw;rO=1;var e=Object.prototype.hasOwnProperty;return Vw=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function a2(){if(oO)return Gw;oO=1;var e=rN();return Gw=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function gq(){if(iO)return Kw;iO=1;var e=a2();return Kw=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function vq(){if(aO)return Yw;aO=1;var e=/\w*$/;return Yw=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function yq(){if(sO)return Xw;sO=1;var e=Hu(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return Xw=function(e){return n?Object(n.call(e)):{}}}function bq(){if(cO)return Qw;cO=1;var e=a2();return Qw=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function wq(){if(lO)return Zw;lO=1;var e=a2(),t=gq(),n=vq(),r=yq(),o=bq();return Zw=function(a,i,l){var s=a.constructor;switch(i){case"[object ArrayBuffer]":return e(a);case"[object Boolean]":case"[object Date]":return new s(+a);case"[object DataView]":return t(a,l);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(a,l);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(a);case"[object RegExp]":return n(a);case"[object Symbol]":return r(a)}}}function Sv(){if(uO)return Jw;uO=1;var e=Go(),t=Object.create;return Jw=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function xq(){if(dO)return ex;dO=1;var e=Sv(),t=r2(),n=X$();return ex=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function _q(){if(fO)return tx;fO=1;var e=Up(),t=To();return tx=function(n){return t(n)&&"[object Map]"==e(n)}}function $q(){if(pO)return nx;pO=1;var e=_q(),t=wv(),n=Y$(),r=n&&n.isMap,o=r?t(r):e;return nx=o}function Sq(){if(hO)return rx;hO=1;var e=Up(),t=To();return rx=function(n){return t(n)&&"[object Set]"==e(n)}}function Cq(){if(mO)return ox;mO=1;var e=Sq(),t=wv(),n=Y$(),r=n&&n.isSet,o=r?t(r):e;return ox=o}function IN(){if(gO)return ix;gO=1;var e=q$(),t=o2(),n=DN(),r=AN(),o=uq(),a=dq(),i=$v(),l=fq(),s=pq(),u=uN(),c=hq(),d=Up(),f=mq(),p=wq(),h=xq(),m=qr(),g=G$(),v=$q(),y=Go(),b=Cq(),w=zp(),x=i2(),_="[object Arguments]",O="[object Function]",k="[object Object]",S={};return S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[O]=S["[object WeakMap]"]=!1,ix=function D(C,E,N,M,P,j){var T,A=1&E,R=2&E,L=4&E;if(N&&(T=P?N(C,M,P,j):N(C)),void 0!==T)return T;if(!y(C))return C;var z=m(C);if(z){if(T=f(C),!A)return i(C,T)}else{var I=d(C),F=I==O||"[object GeneratorFunction]"==I;if(g(C))return a(C,A);if(I==k||I==_||F&&!P){if(T=R||F?{}:h(C),!A)return R?s(C,o(T,C)):l(C,r(T,C))}else{if(!S[I])return P?C:{};T=p(C,I,A)}}j||(j=new e);var W=j.get(C);if(W)return W;j.set(C,T),b(C)?C.forEach((function(e){T.add(D(e,E,N,e,C,j))})):v(C)&&C.forEach((function(e,t){T.set(t,D(e,E,N,t,C,j))}));var $=z?void 0:(L?R?c:u:R?x:w)(C);return t($||C,(function(e,t){$&&(e=C[t=e]),n(T,t,D(e,E,N,t,C,j))})),T},ix}function Eq(){if(vO)return ax;vO=1;var e=xN();return ax=function(t){return(null==t?0:t.length)?e(t,1):[]}}function Pq(){if(yO)return sx;yO=1;var e=Eq(),t=_N(),n=e2();return sx=function(r){return n(t(r,void 0,e),r+"")}}ap.exports;const Oq={light:"",dark:".dark"},jN=O.createContext(null);function LN(){const e=O.useContext(jN);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Rq=O.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=O.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return D.jsx(jN.Provider,{value:{config:r},children:D.jsxs("div",{"data-chart":l,ref:a,className:te("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[D.jsx(Tq,{id:l,config:r}),D.jsx(iq,{children:n})]})})}));Rq.displayName="Chart";const Tq=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?D.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Oq).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},Iie=n2,Nq=O.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:l,labelClassName:s,formatter:u,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:h},m)=>{const{config:g}=LN(),v=O.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,a=F_(g,n,r),u=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=g[i])?void 0:e.label)||i;return l?D.jsx("div",{className:te("font-medium",s),children:l(u,t)}):u?D.jsx("div",{className:te("font-medium",s),children:u}):null}),[i,l,t,o,s,g,f]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,b=t.length>10;return D.jsxs("div",{ref:m,className:te("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",b&&"min-w-[16rem]",n),children:[y?null:v,D.jsx("div",{className:te("grid gap-xxs",b&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=F_(g,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",s=o===p;return D.jsx("div",{className:te("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",s?"":p?"opacity-40":""),onMouseEnter:()=>null==h?void 0:h(o),onMouseLeave:()=>null==h?void 0:h(null),children:u&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?u(e.value,e.name,e,t,[e.payload]):D.jsxs(D.Fragment,{children:[null!=i&&i.icon?D.jsx(i.icon,{}):!a&&D.jsx("div",{className:te("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),D.jsxs("div",{className:te("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[D.jsxs("div",{className:"grid gap-xxs",children:[y?v:null,D.jsx("span",{className:te("text-muted-foreground",s&&"font-medium text-foreground"),children:(null==i?void 0:i.label)||e.name})]}),e.value&&D.jsx("span",{className:te("font-mono font-medium tabular-nums text-foreground",s&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));Nq.displayName="ChartTooltip";const jie=Z$,kq=O.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:l}=LN(),s=O.useRef({});return O.useEffect((()=>{if(a&&s.current[a]){const e=s.current[a];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[a]),null!=n&&n.length?D.jsx("div",{ref:i,className:te("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,u=F_(l,e,i),c=!!o&&i===a;return D.jsxs("div",{ref:e=>{e?s.current[i]=e:delete s.current[i]},className:te("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":a?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=u&&u.icon&&!t?D.jsx(u.icon,{}):D.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),D.jsx("span",{className:"min-w-[max-content]",children:(null==u?void 0:u.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function F_(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}kq.displayName="ChartLegend";const Dq=({children:e,className:t})=>D.jsx("div",{className:te("flex flex-wrap gap-xxxs",t),children:e}),FN=({text:e,icon:t,disabled:n,isLoading:r,avatarSrc:o,onClick:a,onRemove:i,className:l})=>D.jsxs("div",{onClick:n?void 0:a,className:te("flex cursor-pointer items-center gap-xxxs rounded-sm bg-gray-100 p-xxs text-sm font-medium text-gray-900 transition-all hover:bg-gray-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-gray-100 text-gray-300",l),children:[o&&D.jsxs(CT,{className:te("size-6 text-[10px]"),children:[D.jsx(ET,{src:o,alt:e}),D.jsx(PT,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,D.jsx("span",{children:e}),i&&!r&&D.jsx("span",{role:"button",tabIndex:-1,onClick:e=>{e.stopPropagation(),e.preventDefault(),!n&&(null==i||i())},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},className:te("pointer-events-auto cursor-pointer",n&&"pointer-events-none cursor-not-allowed opacity-50"),children:D.jsx(ov,{size:16})}),r&&D.jsx(y$,{size:16,className:"animate-spin"})]});function Cv(e){const t=Ae({value:e,previous:e});return or((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Ev(e){const[t,n]=Ke(void 0);return Rr((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const WN="Checkbox",[Aq,Lie]=Br(WN),[Mq,Iq]=Aq(WN),jq=ye(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:s="on",onCheckedChange:u,...c}=e,[d,f]=Ke(null),p=Nt(t,(e=>f(e))),h=Ae(!1),m=!d||!!d.closest("form"),[g=!1,v]=si({prop:o,defaultProp:a,onChange:u}),y=Ae(g);return We((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>v(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,v]),q(Mq,{scope:n,state:g,disabled:l},q(dt.button,he({type:"button",role:"checkbox","aria-checked":qc(g)?"mixed":g,"aria-required":i,"data-state":BN(g),"data-disabled":l?"":void 0,disabled:l,value:s},c,{ref:p,onKeyDown:Xe(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Xe(e.onClick,(e=>{v((e=>!!qc(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&q(Wq,{control:d,bubbles:!h.current,name:r,value:s,checked:g,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),Lq="CheckboxIndicator",Fq=ye(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Iq(Lq,n);return q(Ro,{present:r||qc(a.state)||!0===a.state},q(dt.span,he({"data-state":BN(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),Wq=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=Cv(n),l=Ev(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=qc(n),o.call(e,!qc(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),q("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:!qc(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function qc(e){return"indeterminate"===e}function BN(e){return qc(e)?"indeterminate":e?"checked":"unchecked"}const qN=jq,Bq=Fq,qq=$a("relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-gray-100"}},defaultVariants:{size:"default",variant:"default"}}),s2=O.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},a)=>{const i=o.checked,[l]=O.useState(i),[s,u]=O.useState(!1);O.useEffect((()=>{l!==i&&u(!0)}),[i]);const c=e=>"minus"===r?D.jsx(x7,{...e}):D.jsx(nv,{...e});return D.jsxs(qN,{ref:a,className:te(qq({size:t,variant:n}),"transition-[border] duration-100 ease-linear",i?"border-0":"border-gray-300 hover:border-2",e),...o,children:[D.jsx("div",{className:te("transform-origin-center absolute left-0 top-0 size-full rounded-full bg-blue_100",i?"scale-[1.2]":"scale-0",{"animate-fill-in":i&&s,"animate-fill-out":!i&&s})}),D.jsx(Bq,{className:"relative flex items-center justify-center text-current",children:D.jsx(c,{className:"size-xxxs",color:o.disabled?"var(--gray-300)":"white"})})]})}));s2.displayName=qN.displayName;var bO=1,zq=.9,Uq=.8,Hq=.17,cx=.1,lx=.999,Vq=.9999,Gq=.99,Kq=/[\\\/_+.#"@\[\(\{&]/,Yq=/[\\\/_+.#"@\[\(\{&]/g,Xq=/[\s-]/,zN=/[\s-]/g;function W_(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?bO:Gq;var l=`${o},${a}`;if(void 0!==i[l])return i[l];for(var s,u,c,d,f=r.charAt(a),p=n.indexOf(f,o),h=0;p>=0;)(s=W_(e,t,n,r,p+1,a+1,i))>h&&(p===o?s*=bO:Kq.test(e.charAt(p-1))?(s*=Uq,(c=e.slice(o,p-1).match(Yq))&&o>0&&(s*=Math.pow(lx,c.length))):Xq.test(e.charAt(p-1))?(s*=zq,(d=e.slice(o,p-1).match(zN))&&o>0&&(s*=Math.pow(lx,d.length))):(s*=Hq,o>0&&(s*=Math.pow(lx,p-o))),e.charAt(p)!==t.charAt(a)&&(s*=Vq)),(s<cx&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((u=W_(e,t,n,r,p+1,a+2,i))*cx>s&&(s=u*cx)),s>h&&(h=s),p=n.indexOf(f,p+1);return i[l]=h,h}function wO(e){return e.toLowerCase().replace(zN," ")}function Qq(e,t,n){return W_(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,wO(e),wO(t),0,0,{})}var Zf='[cmdk-group=""]',ux='[cmdk-group-items=""]',Zq='[cmdk-group-heading=""]',c2='[cmdk-item=""]',xO=`${c2}:not([aria-disabled="true"])`,B_="cmdk-item-select",Lc="data-value",Jq=(e,t,n)=>Qq(e,t,n),UN=O.createContext(void 0),Vp=()=>O.useContext(UN),HN=O.createContext(void 0),l2=()=>O.useContext(HN),VN=O.createContext(void 0),GN=O.forwardRef(((e,t)=>{let n=Cu((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=Cu((()=>new Set)),o=Cu((()=>new Map)),a=Cu((()=>new Map)),i=Cu((()=>new Set)),l=KN(e),{label:s,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:g=!0,...v}=e,y=O.useId(),b=O.useId(),w=O.useId(),x=O.useRef(null),_=uz();Hc((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}}),[c]),Hc((()=>{_(6,M)}),[]);let k=O.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)N(),C(),_(1,E);else if("value"===e&&(r||_(5,M),void 0!==(null==(o=l.current)?void 0:o.value))){let e=t??"";return void(null==(i=(a=l.current).onValueChange)||i.call(a,e))}k.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),S=O.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,D(t,r)),_(2,(()=>{C(),k.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),_(3,(()=>{N(),C(),n.current.value||E(),k.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=P();_(4,(()=>{N(),(null==t?void 0:t.getAttribute("id"))===e&&E(),k.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:s||e["aria-label"],disablePointerSelection:m,listId:y,inputId:w,labelId:b,listInnerRef:x})),[]);function D(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:Jq;return e?a(e,n.current.search,t):0}function C(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=x.current;j().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(ux);t?t.appendChild(e.parentElement===t?e:e.closest(`${ux} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${ux} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${Zf}[${Lc}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function E(){let e=j().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(Lc);k.setState("value",t||void 0)}function N(){var e,t,i,s;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=D(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(i=a.current.get(o))?void 0:i.keywords)?s:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function M(){var e,t,n;let r=P();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(Zf))?void 0:t.querySelector(Zq))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function P(){var e;return null==(e=x.current)?void 0:e.querySelector(`${c2}[aria-selected="true"]`)}function j(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(xO))}function T(e){let t=j()[e];t&&k.setState("value",t.getAttribute(Lc))}function A(e){var t;let n=P(),r=j(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&k.setState("value",a.getAttribute(Lc))}function R(e){let t,n=P(),r=null==n?void 0:n.closest(Zf);for(;r&&!t;)r=e>0?cz(r,Zf):lz(r,Zf),t=null==r?void 0:r.querySelector(xO);t?k.setState("value",t.getAttribute(Lc)):A(e)}let L=()=>T(j().length-1),z=e=>{e.preventDefault(),e.metaKey?L():e.altKey?R(1):A(1)},I=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?R(-1):A(-1)};return O.createElement(dt.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=v.onKeyDown)||t.call(v,e),!e.defaultPrevented)switch(e.key){case"n":case"j":g&&e.ctrlKey&&z(e);break;case"ArrowDown":z(e);break;case"p":case"k":g&&e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),L();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=P();if(t){let e=new Event(B_);t.dispatchEvent(e)}}}}},O.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:fz},s),Pv(e,(e=>O.createElement(HN.Provider,{value:k},O.createElement(UN.Provider,{value:S},e)))))})),ez=O.forwardRef(((e,t)=>{var n,r;let o=O.useId(),a=O.useRef(null),i=O.useContext(VN),l=Vp(),s=KN(e),u=null!=(r=null==(n=s.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;Hc((()=>{if(!u)return l.item(o,null==i?void 0:i.id)}),[u]);let c=YN(o,a,[e.value,e.children,a],e.keywords),d=l2(),f=Vc((e=>e.value&&e.value===c.current)),p=Vc((e=>!(!u&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function h(){var e,t;m(),null==(t=(e=s.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(O.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(B_,h),()=>t.removeEventListener(B_,h)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:v,onSelect:y,forceMount:b,keywords:w,...x}=e;return O.createElement(dt.div,{ref:Sp([a,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||l.disablePointerSelection?void 0:m,onClick:g?void 0:h},e.children)})),tz=O.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=O.useId(),l=O.useRef(null),s=O.useRef(null),u=O.useId(),c=Vp(),d=Vc((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));Hc((()=>c.group(i)),[]),YN(i,l,[e.value,e.heading,s]);let f=O.useMemo((()=>({id:i,forceMount:o})),[o]);return O.createElement(dt.div,{ref:Sp([l,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&O.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),Pv(e,(e=>O.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},O.createElement(VN.Provider,{value:f},e)))))})),nz=O.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=O.useRef(null),a=Vc((e=>!e.search));return n||a?O.createElement(dt.div,{ref:Sp([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),rz=O.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=l2(),i=Vc((e=>e.search)),l=Vc((e=>e.value)),s=Vp(),u=O.useMemo((()=>{var e;let t=null==(e=s.listInnerRef.current)?void 0:e.querySelector(`${c2}[${Lc}="${encodeURIComponent(l)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return O.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),O.createElement(dt.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":u,id:s.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),oz=O.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=O.useRef(null),i=O.useRef(null),l=Vp();return O.useEffect((()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),O.createElement(dt.div,{ref:Sp([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},Pv(e,(e=>O.createElement("div",{ref:Sp([i,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),iz=O.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return O.createElement(lv,{open:n,onOpenChange:r},O.createElement(uv,{container:i},O.createElement(qu,{"cmdk-overlay":"",className:o}),O.createElement(zu,{"aria-label":e.label,"cmdk-dialog":"",className:a},O.createElement(GN,{ref:t,...l}))))})),az=O.forwardRef(((e,t)=>Vc((e=>0===e.filtered.count))?O.createElement(dt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),sz=O.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return O.createElement(dt.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Pv(e,(e=>O.createElement("div",{"aria-hidden":!0},e))))})),co=Object.assign(GN,{List:oz,Item:ez,Input:rz,Group:tz,Separator:nz,Dialog:iz,Empty:az,Loading:sz});function cz(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function lz(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function KN(e){let t=O.useRef(e);return Hc((()=>{t.current=e})),t}var Hc=typeof window>"u"?O.useEffect:O.useLayoutEffect;function Cu(e){let t=O.useRef();return void 0===t.current&&(t.current=e()),t}function Sp(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function Vc(e){let t=l2(),n=()=>e(t.snapshot());return O.useSyncExternalStore(t.subscribe,n,n)}function YN(e,t,n,r=[]){let o=O.useRef(),a=Vp();return Hc((()=>{var i;let l=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),s=r.map((e=>e.trim()));a.value(e,l,s),null==(i=t.current)||i.setAttribute(Lc,l),o.current=l})),o}var uz=()=>{let[e,t]=O.useState(),n=Cu((()=>new Map));return Hc((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function dz(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function Pv({asChild:e,children:t},n){return e&&O.isValidElement(t)?O.cloneElement(dz(t),{ref:t.ref},n(t.props.children)):n(t)}var fz={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const pz=lv,Fie=P$,hz=uv,Wie=Uu,XN=O.forwardRef((({className:e,...t},n)=>(O.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{0===Array.from(document.querySelectorAll('[role="dialog"]')).length&&e.forEach((e=>e&&(e.style.filter="none")))}}),[]),D.jsx(qu,{ref:n,"data-testid":"dialog_overlay",className:te("fixed inset-0 z-dialog bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));XN.displayName=qu.displayName;const mz=$a("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-gray-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-gray-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),gz=$a("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),QN=O.forwardRef((({title:e,titleIcon:t,className:n,dialogName:r,showClose:o=!0,closeVariant:a="outsideCard",closeSize:i="big",children:l,titleClassName:s,overlayClassName:u,childrenClassName:c,footerClassName:d,onBack:f,onCloseModal:p,renderFooter:h,onScroll:m,...g},v)=>{const y=D.jsxs(Uu,{className:te(mz({closeVariant:a})),children:[D.jsx(ov,{onClick:p,fill:"currentColor",className:te(gz({closeSize:i}))}),D.jsx("span",{className:"sr-only",children:"Close"})]});return D.jsxs(hz,{children:[D.jsx(XN,{className:u,onClick:p}),o&&"insideCard"!==a&&y,D.jsxs(zu,{ref:v,className:te("fixed left-[50%] top-[50%] z-[101] grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...g,children:[e&&D.jsxs("h3",{className:te("flex items-center justify-center gap-xxs border-b border-gray-200 p-m text-center text-lg font-semibold text-gray-700",s),children:[t,e]}),D.jsx("div",{id:r||"dialog-content",className:te("p-m",c),onScroll:m,children:l}),o&&"insideCard"===a&&y,f&&D.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:f,className:"absolute left-m top-m",children:D.jsx(g$,{color:"var(--gray-400)",size:24})}),D.jsx(ZN,{className:te("empty:hidden",d),children:null==h?void 0:h()})]})]})}));QN.displayName=zu.displayName;const vz=({className:e,...t})=>D.jsx("div",{className:te("border-b border-gray-200 p-m text-center text-lg font-semibold text-gray-700",e),...t});vz.displayName="DialogHeader";const ZN=({className:e,...t})=>D.jsx("div",{className:te("flex border-t border-gray-200 p-m",e),...t});ZN.displayName="DialogFooter";const yz=O.forwardRef((({className:e,...t},n)=>D.jsx(Lp,{ref:n,className:te("text-lg font-semibold leading-none tracking-tight",e),...t})));yz.displayName=Lp.displayName;const bz=O.forwardRef((({className:e,...t},n)=>D.jsx(Fp,{ref:n,className:te("text-sm text-muted-foreground",e),...t})));bz.displayName=Fp.displayName;const JN=O.forwardRef((({className:e,...t},n)=>D.jsx(co,{ref:n,className:te("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));JN.displayName=co.displayName;const Bie=({children:e,...t})=>D.jsx(pz,{...t,children:D.jsx(QN,{className:"overflow-hidden p-0 shadow-lg",children:D.jsx(JN,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),wz=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:D.jsx(co.Input,{ref:n,className:te("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));wz.displayName=co.Input.displayName;const xz=O.forwardRef((({className:e,...t},n)=>D.jsx(co.List,{ref:n,className:te("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));xz.displayName=co.List.displayName;const _z=O.forwardRef(((e,t)=>D.jsx(co.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));_z.displayName=co.Empty.displayName;const $z=O.forwardRef((({className:e,...t},n)=>D.jsx(co.Group,{ref:n,className:te("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));$z.displayName=co.Group.displayName;const Sz=O.forwardRef((({className:e,...t},n)=>D.jsx(co.Separator,{ref:n,className:te("-mx-1 h-px bg-border",e),...t})));Sz.displayName=co.Separator.displayName;const Cz=O.forwardRef((({className:e,...t},n)=>D.jsx(co.Item,{ref:n,className:te("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));Cz.displayName=co.Item.displayName;const Ez=({className:e,...t})=>D.jsx("span",{className:te("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function xs(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function _O(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ek(...e){return t=>{let n=!1;const r=e.map((e=>{const r=_O(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():_O(e[t],null)}}}}function Zc(...e){return O.useCallback(ek(...e),e)}function Pz(e,t){const n=O.createContext(t),r=e=>{const{children:t,...r}=e,o=O.useMemo((()=>r),Object.values(r));return D.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=O.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function Oz(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>O.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return O.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=O.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,s=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=O.useMemo((()=>l),Object.values(l));return D.jsx(s.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const s=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,u=O.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Rz(r,...t)]}function Rz(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return O.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}Ez.displayName="CommandShortcut";var Lg=null!=globalThis&&globalThis.document?O.useLayoutEffect:()=>{},Tz=O[" useId ".trim().toString()]||(()=>{}),Nz=0;function dx(e){const[t,n]=O.useState(Tz());return Lg((()=>{e||n((e=>e??String(Nz++)))}),[e]),e||(t?`radix-${t}`:"")}function Gc(e){const t=O.useRef(e);return O.useEffect((()=>{t.current=e})),O.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function kz({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Dz({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=Gc(n);return[i,O.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function Dz({defaultProp:e,onChange:t}){const n=O.useState(e),[r]=n,o=O.useRef(r),a=Gc(t);return O.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function tk(e){const t=Az(e),n=O.forwardRef(((e,n)=>{const{children:r,...o}=e,a=O.Children.toArray(r),i=a.find(Iz);if(i){const e=i.props.children,r=a.map((t=>t===i?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t));return D.jsx(t,{...o,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return D.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Az(e){const t=O.forwardRef(((e,t)=>{const{children:n,...r}=e;if(O.isValidElement(n)){const e=Lz(n),o=jz(r,n.props);return n.type!==O.Fragment&&(o.ref=t?ek(t,e):e),O.cloneElement(n,o)}return O.Children.count(n)>1?O.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Mz=Symbol("radix.slottable");function Iz(e){return O.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Mz}function jz(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Lz(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Fz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ea=Fz.reduce(((e,t)=>{const n=tk(`Primitive.${t}`),r=O.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Wz(e,t){e&&Bi.flushSync((()=>e.dispatchEvent(t)))}function Bz(e,t=(null==globalThis?void 0:globalThis.document)){const n=Gc(e);O.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var $O,qz="DismissableLayer",q_="dismissableLayer.update",zz="dismissableLayer.pointerDownOutside",Uz="dismissableLayer.focusOutside",nk=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rk=O.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...s}=e,u=O.useContext(nk),[c,d]=O.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=O.useState({}),h=Zc(t,(e=>d(e))),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=Gz((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));!w||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f),_=Kz((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f);return Bz((e=>{y===u.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),O.useEffect((()=>{if(c)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&($O=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),SO(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=$O)}}),[c,f,n,u]),O.useEffect((()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),SO())}),[c,u]),O.useEffect((()=>{const e=()=>p({});return document.addEventListener(q_,e),()=>document.removeEventListener(q_,e)}),[]),D.jsx(Ea.div,{...s,ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:xs(e.onFocusCapture,_.onFocusCapture),onBlurCapture:xs(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:xs(e.onPointerDownCapture,x.onPointerDownCapture)})}));rk.displayName=qz;var Hz="DismissableLayerBranch",Vz=O.forwardRef(((e,t)=>{const n=O.useContext(nk),r=O.useRef(null),o=Zc(t,r);return O.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),D.jsx(Ea.div,{...e,ref:o})}));function Gz(e,t=(null==globalThis?void 0:globalThis.document)){const n=Gc(e),r=O.useRef(!1),o=O.useRef((()=>{}));return O.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){ok(zz,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Kz(e,t=(null==globalThis?void 0:globalThis.document)){const n=Gc(e),r=O.useRef(!1);return O.useEffect((()=>{const e=e=>{e.target&&!r.current&&ok(Uz,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SO(){const e=new CustomEvent(q_);document.dispatchEvent(e)}function ok(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Wz(o,a):o.dispatchEvent(a)}Vz.displayName=Hz;var fx="focusScope.autoFocusOnMount",px="focusScope.autoFocusOnUnmount",CO={bubbles:!1,cancelable:!0},Yz="FocusScope",ik=O.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=O.useState(null),u=Gc(o),c=Gc(a),d=O.useRef(null),f=Zc(t,(e=>s(e))),p=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:ys(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||ys(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&ys(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,p.paused]),O.useEffect((()=>{if(l){PO.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(fx,CO);l.addEventListener(fx,u),l.dispatchEvent(t),t.defaultPrevented||(Xz(tU(ak(l)),{select:!0}),document.activeElement===e&&ys(l))}return()=>{l.removeEventListener(fx,u),setTimeout((()=>{const t=new CustomEvent(px,CO);l.addEventListener(px,c),l.dispatchEvent(t),t.defaultPrevented||ys(e??document.body,{select:!0}),l.removeEventListener(px,c),PO.remove(p)}),0)}}}),[l,u,c,p]);const h=O.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=Qz(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&ys(a,{select:!0})):(e.preventDefault(),n&&ys(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return D.jsx(Ea.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})}));function Xz(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ys(r,{select:t}),document.activeElement!==n)return}function Qz(e){const t=ak(e);return[EO(t,e),EO(t.reverse(),e)]}function ak(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function EO(e,t){for(const n of e)if(!Zz(n,{upTo:t}))return n}function Zz(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Jz(e){return e instanceof HTMLInputElement&&"select"in e}function ys(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jz(e)&&t&&e.select()}}ik.displayName=Yz;var PO=eU();function eU(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=OO(e,t),e.unshift(t)},remove(t){var n;e=OO(e,t),null==(n=e[0])||n.resume()}}}function OO(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function tU(e){return e.filter((e=>"A"!==e.tagName))}var nU="Portal",sk=O.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=O.useState(!1);Lg((()=>i(!0)),[]);const l=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?w$.createPortal(D.jsx(Ea.div,{...o,ref:t}),l):null}));function rU(e,t){return O.useReducer(((e,n)=>t[e][n]??e),e)}sk.displayName=nU;var Ov=e=>{const{present:t,children:n}=e,r=oU(t),o="function"==typeof n?n({present:r.isPresent}):O.Children.only(n),a=Zc(r.ref,iU(o));return"function"==typeof n||r.isPresent?O.cloneElement(o,{ref:a}):null};function oU(e){const[t,n]=O.useState(),r=O.useRef({}),o=O.useRef(e),a=O.useRef("none"),i=e?"mounted":"unmounted",[l,s]=rU(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect((()=>{const e=dg(r.current);a.current="mounted"===l?e:"none"}),[l]),Lg((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=dg(t);e?s("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?s("UNMOUNT"):s(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,s]),Lg((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=dg(r.current).includes(a.animationName);if(a.target===t&&i&&(s("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(a.current=dg(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:O.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function dg(e){return(null==e?void 0:e.animationName)||"none"}function iU(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}Ov.displayName="Presence";var hx=0;function aU(){O.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??RO()),document.body.insertAdjacentElement("beforeend",e[1]??RO()),hx++,()=>{1===hx&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),hx--}}),[])}function RO(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ck=X3(),mx=function(){},Rv=O.forwardRef((function(e,t){var n=O.useRef(null),r=O.useState({onScrollCapture:mx,onWheelCapture:mx,onTouchMoveCapture:mx}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,s=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,g=e.as,v=void 0===g?"div":g,y=e.gapMode,b=S$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=Y3([n,t]),_=Pr(Pr({},b),o);return O.createElement(O.Fragment,null,c&&O.createElement(w,{sideCar:ck,removeScrollBar:u,shards:d,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?O.cloneElement(O.Children.only(l),Pr(Pr({},_),{ref:x})):O.createElement(v,Pr({},_,{className:s,ref:x}),l))}));Rv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Rv.classNames={fullWidth:lp,zeroRight:cp};var z_=!1;if(typeof window<"u")try{var fg=Object.defineProperty({},"passive",{get:function(){return z_=!0,!0}});window.addEventListener("test",fg,fg),window.removeEventListener("test",fg,fg)}catch{z_=!1}var _u=!!z_&&{passive:!1},sU=function(e){return"TEXTAREA"===e.tagName},lk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!sU(e)&&"visible"===n[t])},cU=function(e){return lk(e,"overflowY")},lU=function(e){return lk(e,"overflowX")},TO=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),uk(e,r)){var o=dk(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uU=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},dU=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},uk=function(e,t){return"v"===e?cU(t):lU(t)},dk=function(e,t){return"v"===e?uU(t):dU(t)},fU=function(e,t){return"h"===e&&"rtl"===t?-1:1},pU=function(e,t,n,r,o){var a=fU(e,window.getComputedStyle(t).direction),i=a*r,l=n.target,s=t.contains(l),u=!1,c=i>0,d=0,f=0;do{var p=dk(e,l),h=p[0],m=p[1]-p[2]-a*h;(h||m)&&uk(e,l)&&(d+=m,f+=h),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(u=!0),u},pg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},NO=function(e){return[e.deltaX,e.deltaY]},kO=function(e){return e&&"current"in e?e.current:e},hU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mU=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},gU=0,$u=[];function vU(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),o=O.useState(gU++)[0],a=O.useState(C$)[0],i=O.useRef(e);O.useEffect((function(){i.current=e}),[e]),O.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=K3([e.lockRef.current],(e.shards||[]).map(kO),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=O.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=pg(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],u="deltaY"in e?e.deltaY:l[1]-a[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=TO(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=TO(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var p=r.current||o;return pU(p,t,e,"h"===p?s:u,!0)}),[]),s=O.useCallback((function(e){var n=e;if($u.length&&$u[$u.length-1]===a){var r="deltaY"in n?NO(n):pg(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&hU(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var s=(i.current.shards||[]).map(kO).filter(Boolean).filter((function(e){return e.contains(n.target)}));(s.length>0?l(n,s[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=O.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:yU(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),c=O.useCallback((function(e){n.current=pg(e),r.current=void 0}),[]),d=O.useCallback((function(t){u(t.type,NO(t),t.target,l(t,e.lockRef.current))}),[]),f=O.useCallback((function(t){u(t.type,pg(t),t.target,l(t,e.lockRef.current))}),[]);O.useEffect((function(){return $u.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,_u),document.addEventListener("touchmove",s,_u),document.addEventListener("touchstart",c,_u),function(){$u=$u.filter((function(e){return e!==a})),document.removeEventListener("wheel",s,_u),document.removeEventListener("touchmove",s,_u),document.removeEventListener("touchstart",c,_u)}}),[]);var p=e.removeScrollBar,h=e.inert;return O.createElement(O.Fragment,null,h?O.createElement(a,{styles:mU(o)}):null,p?O.createElement(eT,{gapMode:e.gapMode}):null)}function yU(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bU=Z3(ck,vU);var fk=O.forwardRef((function(e,t){return O.createElement(Rv,Pr({},e,{ref:t,sideCar:bU}))}));fk.classNames=Rv.classNames;var u2="Dialog",[pk,qie]=Oz(u2),[wU,ui]=pk(u2),hk=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=O.useRef(null),s=O.useRef(null),[u=!1,c]=kz({prop:r,defaultProp:o,onChange:a});return D.jsx(wU,{scope:t,triggerRef:l,contentRef:s,contentId:dx(),titleId:dx(),descriptionId:dx(),open:u,onOpenChange:c,onOpenToggle:O.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};hk.displayName=u2;var mk="DialogTrigger",gk=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui(mk,n),a=Zc(t,o.triggerRef);return D.jsx(Ea.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":p2(o.open),...r,ref:a,onClick:xs(e.onClick,o.onOpenToggle)})}));gk.displayName=mk;var d2="DialogPortal",[xU,vk]=pk(d2,{forceMount:void 0}),yk=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ui(d2,t);return D.jsx(xU,{scope:t,forceMount:n,children:O.Children.map(r,(e=>D.jsx(Ov,{present:n||a.open,children:D.jsx(sk,{asChild:!0,container:o,children:e})})))})};yk.displayName=d2;var Fg="DialogOverlay",bk=O.forwardRef(((e,t)=>{const n=vk(Fg,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ui(Fg,e.__scopeDialog);return a.modal?D.jsx(Ov,{present:r||a.open,children:D.jsx($U,{...o,ref:t})}):null}));bk.displayName=Fg;var _U=tk("DialogOverlay.RemoveScroll"),$U=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui(Fg,n);return D.jsx(fk,{as:_U,allowPinchZoom:!0,shards:[o.contentRef],children:D.jsx(Ea.div,{"data-state":p2(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Kc="DialogContent",wk=O.forwardRef(((e,t)=>{const n=vk(Kc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ui(Kc,e.__scopeDialog);return D.jsx(Ov,{present:r||a.open,children:a.modal?D.jsx(SU,{...o,ref:t}):D.jsx(CU,{...o,ref:t})})}));wk.displayName=Kc;var SU=O.forwardRef(((e,t)=>{const n=ui(Kc,e.__scopeDialog),r=O.useRef(null),o=Zc(t,n.contentRef,r);return O.useEffect((()=>{const e=r.current;if(e)return jp(e)}),[]),D.jsx(xk,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xs(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:xs(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:xs(e.onFocusOutside,(e=>e.preventDefault()))})})),CU=O.forwardRef(((e,t)=>{const n=ui(Kc,e.__scopeDialog),r=O.useRef(!1),o=O.useRef(!1);return D.jsx(xk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const l=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),xk=O.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=ui(Kc,n),s=O.useRef(null),u=Zc(t,s);return aU(),D.jsxs(D.Fragment,{children:[D.jsx(ik,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:D.jsx(rk,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":p2(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),D.jsxs(D.Fragment,{children:[D.jsx(EU,{titleId:l.titleId}),D.jsx(OU,{contentRef:s,descriptionId:l.descriptionId})]})]})})),f2="DialogTitle",_k=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui(f2,n);return D.jsx(Ea.h2,{id:o.titleId,...r,ref:t})}));_k.displayName=f2;var $k="DialogDescription",Sk=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui($k,n);return D.jsx(Ea.p,{id:o.descriptionId,...r,ref:t})}));Sk.displayName=$k;var Ck="DialogClose",Ek=O.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=ui(Ck,n);return D.jsx(Ea.button,{type:"button",...r,ref:t,onClick:xs(e.onClick,(()=>o.onOpenChange(!1)))})}));function p2(e){return e?"open":"closed"}Ek.displayName=Ck;var Pk="DialogTitleWarning",[zie,Ok]=Pz(Pk,{contentName:Kc,titleName:f2,docsSlug:"dialog"}),EU=({titleId:e})=>{const t=Ok(Pk),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return O.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},PU="DialogDescriptionWarning",OU=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ok(PU).contentName}}.`;return O.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},RU=hk,TU=gk,NU=yk,kU=bk,DU=wk,AU=_k,MU=Sk,IU=Ek;function jU(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Rk=re.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Gu=()=>{const e=re.useContext(Rk);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};jU("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const LU=24,FU=typeof window<"u"?Xc:We;function DO(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function WU(){return h2(/^Mac/)}function BU(){return h2(/^iPhone/)}function AO(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function qU(){return h2(/^iPad/)||WU()&&navigator.maxTouchPoints>1}function Tk(){return BU()||qU()}function h2(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const gx=typeof document<"u"&&window.visualViewport;function MO(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Nk(e){for(MO(e)&&(e=e.parentElement);e&&!MO(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const zU=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let vx,hg=0;function UU(e={}){let{isDisabled:t}=e;FU((()=>{if(!t)return hg++,1===hg&&Tk()&&(vx=HU()),()=>{hg--,0===hg&&(null==vx||vx())}}),[t])}function HU(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=DO(VU(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=DO(Jf(document,"touchstart",(n=>{e=Nk(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),Jf(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,a=e.scrollHeight-e.clientHeight;0!==a&&((o<=0&&r>t||o>=a&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),Jf(document,"touchend",(e=>{let t=e.target;U_(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),Jf(document,"focus",(e=>{let t=e.target;U_(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",gx&&(gx.height<window.innerHeight?requestAnimationFrame((()=>{IO(t)})):gx.addEventListener("resize",(()=>IO(t)),{once:!0}))})))}),!0),Jf(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function VU(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Jf(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function IO(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=Nk(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function U_(e){return e instanceof HTMLInputElement&&!zU.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function GU(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function KU(...e){return t=>e.forEach((e=>GU(e,t)))}function kk(...e){return O.useCallback(KU(...e),e)}const Dk=new WeakMap;function zn(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&Dk.set(e,r)}function YU(e,t){if(!(e&&e instanceof HTMLElement))return;let n=Dk.get(e);n&&(e.style[t]=n[t])}const Un=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function mg(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Un(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Un(t)?5:4]):null)}function XU(e){return 8*(Math.log(e+1)-2)}function yx(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function QU(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const pn={DURATION:.5,EASE:[.32,.72,0,1]},Ak=.4,ZU=.25,JU=100,Mk=8,Dc=16,H_=26,bx="vaul-dragging";function Ik(e){const t=re.useRef(e);return re.useEffect((()=>{t.current=e})),re.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function eH({defaultProp:e,onChange:t}){const n=re.useState(e),[r]=n,o=re.useRef(r),a=Ik(t);return re.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function jk({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=eH({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=Ik(n);return[i,re.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function tH({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:l="bottom",container:s,snapToSequentialPoint:u}){const[c,d]=jk({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=re.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);re.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=re.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),m=re.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),g=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===c||!n,v=re.useMemo((()=>{const e=s?{width:s.getBoundingClientRect().width,height:s.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Un(l)){const o=n?r:f?t*e.height:0;return f?"bottom"===l?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===l?e.width-o:-e.width+o:o})))?t:[]}),[n,f,s]),y=re.useMemo((()=>null!==m?null==v?void 0:v[m]:null),[v,m]),b=re.useCallback((e=>{var t;const s=null!=(t=null==v?void 0:v.findIndex((t=>t===e)))?t:null;i(s),zn(r.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:Un(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),v&&s!==v.length-1&&s!==a&&s<a?zn(o.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"0"}):zn(o.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(s,0)])}),[r.current,n,v,a,o,d]);return re.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;v&&-1!==r&&"number"==typeof v[r]&&b(v[r])}}),[c,e,n,v,b]),{isLastSnapPoint:h,activeSnapPoint:c,shouldFade:g,getPercentageDragged:function(e,t){if(!n||"number"!=typeof m||!v||void 0===a)return null;const r=m===a-1;if(m>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;const o=r?m+1:m-1,i=r?v[o]-v[o-1]:v[o+1]-v[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:d,activeSnapPointIndex:m,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===a)return;const s="bottom"===l||"right"===l?(y??0)-e:(y??0)+e,c=0===m,d=e>0;if(m===a-1&&zn(o.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`}),!u&&r>2&&!d)return void(i?t():b(v[0]));if(!u&&r>2&&d&&v&&n)return void b(v[n.length-1]);const f=null==v?void 0:v.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-s)<Math.abs(e-s)?t:e)),p=Un(l)?window.innerHeight:window.innerWidth;if(r>Ak&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&h)return void b(v[n.length-1]);if(c&&e<0&&i&&t(),null===m)return;b(v[m+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<v[v.length-1]||("top"===l||"left"===l)&&t>v[v.length-1]||zn(r.current,{transform:Un(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:v}}const nH=()=>()=>{};function rH(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Gu(),a=re.useRef(null),i=or((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}re.useEffect((()=>{if(t&&n){a.current&&clearTimeout(a.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;QU(r&&!o?yx(document.body,{background:"black"}):nH,yx(t,{transformOrigin:Un(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${pn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pn.EASE.join(",")})`}));const n=yx(t,{borderRadius:"8px",overflow:"hidden",...Un(e)?{transform:`scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout((()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")}),1e3*pn.DURATION)}}}),[t,n,i])}let ep=null;function oH({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,l]=re.useState((()=>typeof window<"u"?window.location.href:"")),s=re.useRef(0),u=re.useCallback((()=>{if(AO()&&null===ep&&e&&!a){ep={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-s.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&s.current>=t&&(document.body.style.top=-(s.current+e)+"px")}))),300)}}),[e]),c=re.useCallback((()=>{if(AO()&&null!==ep&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,ep),window.requestAnimationFrame((()=>{o&&i!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),ep=null}}),[i]);return re.useEffect((()=>{function e(){s.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),re.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,i,t,n,u,c]),{restorePositionSetting:c}}function Lk({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:s=ZU,scrollLockTimeout:u=JU,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:g=!0,onClose:v,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:O=!1,preventScrollRestoration:k=!1,repositionInputs:S=!0,onAnimationEnd:D,container:C,autoFocus:E=!1}){var N,M;const[P=!1,j]=jk({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==D||D(e)}),1e3*pn.DURATION),e&&!g&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[T,A]=re.useState(!1),[R,L]=re.useState(!1),[z,I]=re.useState(!1),F=re.useRef(null),W=re.useRef(null),$=re.useRef(null),q=re.useRef(null),B=re.useRef(null),U=re.useRef(!1),H=re.useRef(null),K=re.useRef(0),V=re.useRef(!1),Y=re.useRef(0),G=re.useRef(null),X=re.useRef((null==(N=G.current)?void 0:N.getBoundingClientRect().height)||0),Q=re.useRef((null==(M=G.current)?void 0:M.getBoundingClientRect().width)||0),Z=re.useRef(0),J=re.useCallback((e=>{a&&e===ae.length-1&&(W.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:oe,snapPointsOffset:ae,onDrag:ie,shouldFade:le,getPercentageDragged:se}=tH({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:G,fadeFromIndex:f,overlayRef:F,onSnapPointChange:J,direction:w,container:C,snapToSequentialPoint:O});UU({isDisabled:!P||R||!g||z||!T||!S||!_});const{restorePositionSetting:ue}=oH({isOpen:P,modal:g,nested:y,hasBeenOpened:T,preventScrollRestoration:k,noBodyStyles:b});function ce(){return(window.innerWidth-26)/window.innerWidth}function de(e,t){var n,r;let o=e;const a=null==(n=window.getSelection())?void 0:n.toString(),i=G.current?mg(G.current,w):null,l=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(W.current&&l.getTime()-W.current.getTime()<500)return!1;if(null!==i&&("bottom"===w?i>0:i<0))return!0;if(a&&a.length>0)return!1;if(l.getTime()-(null==(r=B.current)?void 0:r.getTime())<u&&0===i||t)return B.current=l,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return B.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function fe(e){!R||!G.current||(G.current.classList.remove(bx),U.current=!1,L(!1),q.current=new Date),null==v||v(),e||j(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*pn.DURATION)}function pe(){if(!G.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=mg(G.current,w);zn(G.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`}),zn(F.current,{transition:`opacity ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&P&&zn(e,{borderRadius:"8px",overflow:"hidden",...Un(w)?{transform:`scale(${ce()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ce()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${pn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pn.EASE.join(",")})`},!0)}return re.useEffect((()=>{var e;function t(){if(!G.current||!S)return;if(U_(document.activeElement)||V.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=G.current.getBoundingClientRect().height||0,i=o>.8*n;Z.current||(Z.current=o);const l=G.current.getBoundingClientRect().top;if(Math.abs(Y.current-r)>60&&(V.current=!V.current),a&&a.length>0&&ae&&te){r+=ae[te]||0}if(Y.current=r,o>t||V.current){const e=G.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?l:26)),G.current.style.height=m?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else G.current.style.height=`${Z.current}px`;a&&a.length>0&&!V.current?G.current.style.bottom="0px":G.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,a,ae]),re.useEffect((()=>(P&&(zn(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{YU(document.documentElement,"scrollBehavior")})),[P]),re.createElement(RU,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?A(!0):fe(!0),j(e))},open:P},re.createElement(Rk.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:G,overlayRef:F,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||G.current&&!G.current.contains(e.target)||(X.current=(null==(t=G.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=G.current)?void 0:n.getBoundingClientRect().width)||0,L(!0),$.current=new Date,Tk()&&window.addEventListener("touchend",(()=>U.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=Un(w)?e.pageY:e.pageX)},onRelease:function(e){if(!R||!G.current)return;G.current.classList.remove(bx),U.current=!1,L(!1),q.current=new Date;const t=mg(G.current,w);if(!de(e.target,!1)||!t||Number.isNaN(t)||null===$.current)return;const n=q.current.getTime()-$.current.getTime(),r=K.current-(Un(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(I(!0),setTimeout((()=>{I(!1)}),200)),a)return oe({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:fe,velocity:i,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return pe(),void(null==o||o(e,!0));if(i>Ak)return fe(),void(null==o||o(e,!1));var l;const u=Math.min(null!=(l=G.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=G.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:u)*s)return fe(),void(null==o||o(e,!1));null==o||o(e,!0),pe()},onDrag:function(e){if(G.current&&R){const t="bottom"===w||"right"===w?1:-1,n=(K.current-(Un(w)?e.pageY:e.pageX))*t,o=n>0,l=a&&!c&&!o;if(l&&0===te)return;const s=Math.abs(n),u=document.querySelector("[data-vaul-drawer-wrapper]");let d=s/("bottom"===w||"top"===w?X.current:Q.current);const p=se(s,o);if(null!==p&&(d=p),l&&d>=1||!U.current&&!de(e.target,o))return;if(G.current.classList.add(bx),U.current=!0,zn(G.current,{transition:"none"}),zn(F.current,{transition:"none"}),a&&ie({draggedDistance:n}),o&&!a){const e=XU(n),r=Math.min(-1*e,0)*t;return void zn(G.current,{transform:Un(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-d;if((le||f&&te===f-1)&&(null==r||r(e,d),zn(F.current,{opacity:`${h}`,transition:"none"},!0)),u&&F.current&&i){const e=Math.min(ce()+d*(1-ce()),1),t=8-8*d,n=Math.max(0,14-14*d);zn(u,{borderRadius:`${t}px`,transform:Un(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=s*t;zn(G.current,{transform:Un(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:P,isDragging:R,shouldFade:le,closeDrawer:fe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;zn(G.current,{transform:Un(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;H.current&&window.clearTimeout(H.current),zn(G.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&G.current&&(H.current=setTimeout((()=>{const e=mg(G.current,w);zn(G.current,{transition:"none",transform:Un(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Un(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&zn(G.current,{transition:`transform ${pn.DURATION}s cubic-bezier(${pn.EASE.join(",")})`,transform:Un(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:V,modal:g,snapPointsOffset:ae,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:b,container:C,autoFocus:E}},n))}const Fk=re.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:l}=Gu(),s=kk(t,n),u=r&&r.length>0;return l?re.createElement(kU,{onMouseUp:o,ref:s,"data-vaul-overlay":"","data-vaul-snap-points":i&&u?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));Fk.displayName="Drawer.Overlay";const Wk=re.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:l,onDrag:s,keyboardIsOpen:u,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:h,container:m,handleOnly:g,autoFocus:v}=Gu(),[y,b]=re.useState(!1),w=kk(o,a),x=re.useRef(null),_=re.useRef(null),O=re.useRef(!1),k=h&&h.length>0;rH();function S(e){x.current=null,O.current=!1,l(e)}return re.useEffect((()=>{k&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),re.createElement(DU,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&k?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{g||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),v||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?u.current&&(u.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,g||(null==r.onPointerMove||r.onPointerMove.call(r,e),!x.current))return;const t=e.pageY-x.current.y,n=e.pageX-x.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(O.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),a=o>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&o>=0&&o<=n)return a}else if(!(e.y*i<0)&&r>=0&&r<=n)return!a;return O.current=!0,!0})({x:n,y:t},p,o)?s(e):(Math.abs(n)>o||Math.abs(t)>o)&&(x.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),x.current=null,O.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),S(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),S(_.current)}})}));Wk.displayName="Drawer.Content";const iH=250,aH=120,Bk=re.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:s,dismissible:u,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=Gu(),h=re.useRef(null),m=re.useRef(!1);function g(){window.clearTimeout(h.current),m.current=!1}return re.createElement("div",{onClick:function(){m.current?g():window.setTimeout((()=>{!function(){if(a||e||m.current)return void g();if(g(),(!i||0===i.length)&&u)return void o();if(l===i[i.length-1]&&u)return void o();const t=i.findIndex((e=>e===l));if(-1===t)return;const n=i[t+1];s(n)}()}),aH)},onPointerCancel:g,onPointerDown:e=>{c&&f(e),h.current=window.setTimeout((()=>{m.current=!0}),iH)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},re.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function sH({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=Gu();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return re.createElement(Lk,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:a,...n})}function cH(e){const t=Gu(),{container:n=t.container,...r}=e;return re.createElement(NU,{container:n,...r})}Bk.displayName="Drawer.Handle";const di={Root:Lk,NestedRoot:sH,Content:Wk,Overlay:Fk,Trigger:TU,Portal:cH,Handle:Bk,Close:IU,Title:AU,Description:MU},lH=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>D.jsx(di.Root,{direction:t,shouldScaleBackground:e,...n});lH.displayName="Drawer";const Uie=di.Trigger,uH=di.Portal,Hie=di.Close,qk=O.forwardRef((({className:e,...t},n)=>D.jsx(di.Overlay,{ref:n,className:te("fixed inset-0 z-50 bg-black/5",e),...t})));qk.displayName=di.Overlay.displayName;const dH=O.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>D.jsxs(uH,{children:[D.jsx(qk,{}),D.jsxs(di.Content,{ref:o,className:te("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&D.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));dH.displayName="DrawerContent";const fH=({className:e,...t})=>D.jsx("div",{className:te("grid gap-1.5 p-4 text-center sm:text-left",e),...t});fH.displayName="DrawerHeader";const pH=({className:e,...t})=>D.jsx("div",{className:te("mt-auto flex flex-col gap-2 p-4",e),...t});pH.displayName="DrawerFooter";const hH=O.forwardRef((({className:e,...t},n)=>D.jsx(di.Title,{ref:n,className:te("text-lg font-semibold leading-none tracking-tight",e),...t})));hH.displayName=di.Title.displayName;const mH=O.forwardRef((({className:e,...t},n)=>D.jsx(di.Description,{ref:n,className:te("text-sm text-muted-foreground",e),...t})));function m2(e){const t=e+"CollectionProvider",[n,r]=Br(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e+"CollectionSlot",l=e+"CollectionItemSlot",s="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=re.useRef(null),a=re.useRef(new Map).current;return re.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:re.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Nt(t,a(i,n).collectionRef);return re.createElement(zc,{ref:o},r)})),ItemSlot:re.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=re.useRef(null),u=Nt(t,i),c=a(l,n);return re.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),re.createElement(zc,{[s]:"",ref:u},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return re.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${s}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}mH.displayName=di.Description.displayName;const gH=ji(void 0);function Gp(e){const t=Ds(gH);return e||t||"ltr"}const vH=["top","right","bottom","left"],Cs=Math.min,So=Math.max,Wg=Math.round,gg=Math.floor,Es=e=>({x:e,y:e}),yH={left:"right",right:"left",bottom:"top",top:"bottom"},bH={start:"end",end:"start"};function V_(e,t,n){return So(e,Cs(t,n))}function ba(e,t){return"function"==typeof e?e(t):e}function wa(e){return e.split("-")[0]}function Ku(e){return e.split("-")[1]}function g2(e){return"x"===e?"y":"x"}function v2(e){return"y"===e?"height":"width"}function Ps(e){return["top","bottom"].includes(wa(e))?"y":"x"}function y2(e){return g2(Ps(e))}function wH(e,t,n){void 0===n&&(n=!1);const r=Ku(e),o=y2(e),a=v2(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Bg(i)),[i,Bg(i)]}function xH(e){const t=Bg(e);return[G_(e),t,G_(t)]}function G_(e){return e.replace(/start|end/g,(e=>bH[e]))}function _H(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function $H(e,t,n,r){const o=Ku(e);let a=_H(wa(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(G_)))),a}function Bg(e){return e.replace(/left|right|bottom|top/g,(e=>yH[e]))}function SH(e){return{top:0,right:0,bottom:0,left:0,...e}}function zk(e){return"number"!=typeof e?SH(e):{top:e,right:e,bottom:e,left:e}}function qg(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function jO(e,t,n){let{reference:r,floating:o}=e;const a=Ps(t),i=y2(t),l=v2(i),s=wa(t),u="y"===a,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ku(t)){case"start":p[i]-=f*(n&&u?-1:1);break;case"end":p[i]+=f*(n&&u?-1:1)}return p}const CH=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=a.filter(Boolean),s=await(null==i.isRTL?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=jO(u,r,s),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:a,fn:m}=l[n],{x:g,y:v,data:y,reset:b}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=g??c,d=v??d,p={...p,[a]:{...p[a],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(u=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=jO(u,f,s))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Cp(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ba(t,e),h=zk(p),m=l[f?"floating"===d?"reference":"floating":d],g=qg(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),v="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},w=qg(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:s}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}const EH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:u,padding:c=0}=ba(e,t)||{};if(null==u)return{};const d=zk(c),f={x:n,y:r},p=y2(o),h=v2(p),m=await i.getDimensions(u),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u));let O=_?_[b]:0;(!O||!await(null==i.isElement?void 0:i.isElement(_)))&&(O=l.floating[b]||a.floating[h]);const k=w/2-x/2,S=O/2-m[h]/2-1,D=Cs(d[v],S),C=Cs(d[y],S),E=D,N=O-m[h]-C,M=O/2-m[h]/2+k,P=V_(E,M,N),j=!s.arrow&&null!=Ku(o)&&M!==P&&a.reference[h]/2-(M<E?D:C)-m[h]/2<0,T=j?M<E?M-E:M-N:0;return{[p]:f[p]+T,data:{[p]:P,centerOffset:M-P-T,...j&&{alignmentOffset:T}},reset:j}}}),PH=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:s,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=ba(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=wa(o),y=Ps(l),b=wa(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(u.floating)),x=f||(b||!m?[Bg(l)]:xH(l)),_="none"!==h;!f&&_&&x.push(...$H(l,m,h,w));const O=[l,...x],k=await Cp(t,g),S=[];let D=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&S.push(k[v]),d){const e=wH(o,i,w);S.push(k[e[0]],k[e[1]])}if(D=[...D,{placement:o,overflows:S}],!S.every((e=>e<=0))){var C,E;const e=((null==(C=a.flip)?void 0:C.index)||0)+1,t=O[e];if(t)return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(E=D.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var N;const e=null==(N=D.filter((e=>{if(_){const t=Ps(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function LO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FO(e){return vH.some((t=>e[t]>=0))}const OH=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ba(e,t);switch(r){case"referenceHidden":{const e=LO(await Cp(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:FO(e)}}}case"escaped":{const e=LO(await Cp(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:FO(e)}}}default:return{}}}}};async function RH(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=wa(n),l=Ku(n),s="y"===Ps(n),u=["left","top"].includes(i)?-1:1,c=a&&s?-1:1,d=ba(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*c,y:f*u}:{x:f*u,y:p*c}}const TH=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,s=await RH(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:i}}}}},NH=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=ba(e,t),u={x:n,y:r},c=await Cp(t,s),d=Ps(wa(o)),f=g2(d);let p=u[f],h=u[d];if(a){const e="y"===f?"bottom":"right";p=V_(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";h=V_(h+c["y"===d?"top":"left"],h,h-c[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}},kH=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=ba(e,t),c={x:n,y:r},d=Ps(o),f=g2(d);let p=c[f],h=c[d];const m=ba(l,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var v,y;const e="y"===f?"width":"height",t=["top","left"].includes(wa(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(v=i.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},DH=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:s=()=>{},...u}=ba(e,t),c=await Cp(t,u),d=wa(o),f=Ku(o),p="y"===Ps(o),{width:h,height:m}=a.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=d,g="end"===f?"top":"bottom");const y=m-c.top-c.bottom,b=h-c.left-c.right,w=Cs(m-c[g],y),x=Cs(h-c[v],b),_=!t.middlewareData.shift;let O=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(O=y),_&&!f){const e=So(c.left,0),t=So(c.right,0),n=So(c.top,0),r=So(c.bottom,0);p?k=h-2*(0!==e||0!==t?e+t:So(c.left,c.right)):O=m-2*(0!==n||0!==r?n+r:So(c.top,c.bottom))}await s({...t,availableWidth:k,availableHeight:O});const S=await i.getDimensions(l.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}};function Tv(){return typeof window<"u"}function Os(e){return Uk(e)?(e.nodeName||"").toLowerCase():"#document"}function Eo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Pa(e){var t;return null==(t=(Uk(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Uk(e){return!!Tv()&&(e instanceof Node||e instanceof Eo(e).Node)}function Li(e){return!!Tv()&&(e instanceof Element||e instanceof Eo(e).Element)}function Fi(e){return!!Tv()&&(e instanceof HTMLElement||e instanceof Eo(e).HTMLElement)}function WO(e){return!(!Tv()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof Eo(e).ShadowRoot)}function Kp(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function AH(e){return["table","td","th"].includes(Os(e))}function MH(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function b2(e){const t=w2(),n=Li(e)?Vo(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Hk(e){let t=ju(e);for(;Fi(t)&&!Nv(t);){if(b2(t))return t;if(MH(t))return null;t=ju(t)}return null}function w2(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Nv(e){return["html","body","#document"].includes(Os(e))}function Vo(e){return Eo(e).getComputedStyle(e)}function kv(e){return Li(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ju(e){if("html"===Os(e))return e;const t=e.assignedSlot||e.parentNode||WO(e)&&e.host||Pa(e);return WO(t)?t.host:t}function Vk(e){const t=ju(e);return Nv(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fi(t)&&Kp(t)?t:Vk(t)}function Ep(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Vk(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Eo(o);if(a){const e=IH(i);return t.concat(i,i.visualViewport||[],Kp(o)?o:[],e&&n?Ep(e):[])}return t.concat(o,Ep(o,[],n))}function IH(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gk(e){const t=Vo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Fi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Wg(n)!==a||Wg(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function x2(e){return Li(e)?e:e.contextElement}function Ou(e){const t=x2(e);if(!Fi(t))return Es(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Gk(t);let i=(a?Wg(n.width):n.width)/r,l=(a?Wg(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const jH=Es(0);function Kk(e){const t=Eo(e);return w2()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:jH}function LH(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Eo(e))&&t}function Yc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=x2(e);let i=Es(1);t&&(r?Li(r)&&(i=Ou(r)):i=Ou(e));const l=LH(a,n,r)?Kk(a):Es(0);let s=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){const e=Eo(a),t=r&&Li(r)?Eo(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Ou(n),t=n.getBoundingClientRect(),r=Vo(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,u*=e.y,c*=e.x,d*=e.y,s+=o,u+=a,n=Eo(n).frameElement}}return qg({width:c,height:d,x:s,y:u})}const FH=[":popover-open",":modal"];function Yk(e){let t=!1,n=0,r=0;if(FH.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=Hk(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function WH(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=Pa(r),[i]=t?Yk(t.floating):[!1];if(r===a||i)return n;let l={scrollLeft:0,scrollTop:0},s=Es(1);const u=Es(0),c=Fi(r);if((c||!c&&"fixed"!==o)&&(("body"!==Os(r)||Kp(a))&&(l=kv(r)),Fi(r))){const e=Yc(r);s=Ou(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+u.x,y:n.y*s.y-l.scrollTop*s.y+u.y}}function BH(e){return Array.from(e.getClientRects())}function Xk(e){return Yc(Pa(e)).left+kv(e).scrollLeft}function qH(e){const t=Pa(e),n=kv(e),r=e.ownerDocument.body,o=So(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=So(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Xk(e);const l=-n.scrollTop;return"rtl"===Vo(r).direction&&(i+=So(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}function zH(e,t){const n=Eo(e),r=Pa(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=w2();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l,y:s}}function UH(e,t){const n=Yc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Fi(e)?Ou(e):Es(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function BO(e,t,n){let r;if("viewport"===t)r=zH(e,n);else if("document"===t)r=qH(Pa(e));else if(Li(t))r=UH(t,n);else{const n=Kk(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return qg(r)}function Qk(e,t){const n=ju(e);return!(n===t||!Li(n)||Nv(n))&&("fixed"===Vo(n).position||Qk(n,t))}function HH(e,t){const n=t.get(e);if(n)return n;let r=Ep(e,[],!1).filter((e=>Li(e)&&"body"!==Os(e))),o=null;const a="fixed"===Vo(e).position;let i=a?ju(e):e;for(;Li(i)&&!Nv(i);){const t=Vo(i),n=b2(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Kp(i)&&!n&&Qk(e,i))?r=r.filter((e=>e!==i)):o=t,i=ju(i)}return t.set(e,r),r}function VH(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?HH(t,this._c):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=BO(t,n,o);return e.top=So(r.top,e.top),e.right=Cs(r.right,e.right),e.bottom=Cs(r.bottom,e.bottom),e.left=So(r.left,e.left),e}),BO(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function GH(e){const{width:t,height:n}=Gk(e);return{width:t,height:n}}function KH(e,t,n,r){const o=Fi(t),a=Pa(t),i="fixed"===n,l=Yc(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const u=Es(0);if(o||!o&&!i)if(("body"!==Os(t)||Kp(a))&&(s=kv(t)),o){const e=Yc(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else a&&(u.x=Xk(a));let c=l.left+s.scrollLeft-u.x,d=l.top+s.scrollTop-u.y;const[f,p,h]=Yk(r);return f&&(c+=p,d+=h,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function qO(e,t){return Fi(e)&&"fixed"!==Vo(e).position?t?t(e):e.offsetParent:null}function Zk(e,t){const n=Eo(e);if(!Fi(e))return n;let r=qO(e,t);for(;r&&AH(r)&&"static"===Vo(r).position;)r=qO(r,t);return r&&("html"===Os(r)||"body"===Os(r)&&"static"===Vo(r).position&&!b2(r))?n:r||Hk(e)||n}const YH=async function(e){const t=this.getOffsetParent||Zk,n=this.getDimensions;return{reference:KH(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function XH(e){return"rtl"===Vo(e).direction}const QH={convertOffsetParentRelativeRectToViewportRelativeRect:WH,getDocumentElement:Pa,getClippingRect:VH,getOffsetParent:Zk,getElementRects:YH,getClientRects:BH,getDimensions:GH,getScale:Ou,isElement:Li,isRTL:XH};function ZH(e,t){let n,r=null;const o=Pa(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-gg(c)+"px "+-gg(o.clientWidth-(u+d))+"px "+-gg(o.clientHeight-(c+f))+"px "+-gg(u)+"px",threshold:So(0,Cs(1,s))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==s){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),a}function JH(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=x2(e),c=o||a?[...u?Ep(u):[],...Ep(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=u&&l?ZH(u,n):null;let f=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),u&&!s&&p.observe(u),p.observe(t));let h,m=s?Yc(e):null;return s&&function t(){const r=Yc(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(h)}}const eV=NH,tV=PH,nV=DH,rV=OH,zO=EH,oV=kH,iV=(e,t,n)=>{const r=new Map,o={platform:QH,...n},a={...o.platform,_c:r};return CH(e,t,{...o,platform:a})};var Eg=typeof document<"u"?Xc:We;function zg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!zg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||zg(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Jk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UO(e,t){const n=Jk(e);return Math.round(t*n)/n}function wx(e){const t=O.useRef(e);return Eg((()=>{t.current=e})),t}function aV(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:s,open:u}=e,[c,d]=O.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=O.useState(r);zg(f,r)||p(r);const[h,m]=O.useState(null),[g,v]=O.useState(null),y=O.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),b=O.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),w=a||h,x=i||g,_=O.useRef(null),k=O.useRef(null),S=O.useRef(c),D=null!=s,C=wx(s),E=wx(o),N=wx(u),M=O.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};E.current&&(e.platform=E.current),iV(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==N.current};P.current&&!zg(S.current,t)&&(S.current=t,Bi.flushSync((()=>{d(t)})))}))}),[f,t,n,E,N]);Eg((()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const P=O.useRef(!1);Eg((()=>(P.current=!0,()=>{P.current=!1})),[]),Eg((()=>{if(w&&(_.current=w),x&&(k.current=x),w&&x){if(C.current)return C.current(w,x,M);M()}}),[w,x,M,C,D]);const j=O.useMemo((()=>({reference:_,floating:k,setReference:y,setFloating:b})),[y,b]),T=O.useMemo((()=>({reference:w,floating:x})),[w,x]),A=O.useMemo((()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=UO(T.floating,c.x),r=UO(T.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Jk(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,T.floating,c.x,c.y]);return O.useMemo((()=>({...c,update:M,refs:j,elements:T,floatingStyles:A})),[c,M,j,T,A])}const sV=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?zO({element:n.current,padding:r}).fn(t):{}:n?zO({element:n,padding:r}).fn(t):{}}}),cV=(e,t)=>({...TH(e),options:[e,t]}),lV=(e,t)=>({...eV(e),options:[e,t]}),uV=(e,t)=>({...oV(e),options:[e,t]}),dV=(e,t)=>({...tV(e),options:[e,t]}),fV=(e,t)=>({...nV(e),options:[e,t]}),pV=(e,t)=>({...rV(e),options:[e,t]}),hV=(e,t)=>({...sV(e),options:[e,t]}),mV=ye(((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return q(dt.svg,he({},a,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:q("polygon",{points:"0,0 30,0 15,10"}))})),gV=mV,eD="Popper",[tD,Yu]=Br(eD),[vV,nD]=tD(eD),yV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Ke(null);return q(vV,{scope:t,anchor:r,onAnchorChange:o},n)},bV="PopperAnchor",wV=ye(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=nD(bV,n),i=Ae(null),l=Nt(t,i);return We((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:q(dt.div,he({},o,{ref:l}))})),rD="PopperContent",[xV,_V]=tD(rD),$V=ye(((e,t)=>{var n,r,o,a,i,l,s,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...O}=e,k=nD(rD,c),[S,D]=Ke(null),C=Nt(t,(e=>D(e))),[E,N]=Ke(null),M=Ev(E),P=null!==(n=null==M?void 0:M.width)&&void 0!==n?n:0,j=null!==(r=null==M?void 0:M.height)&&void 0!==r?r:0,T=d+("center"!==p?"-"+p:""),A="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},R=Array.isArray(v)?v:[v],L=R.length>0,z={padding:A,boundary:R.filter(PV),altBoundary:L},{refs:I,floatingStyles:F,placement:W,isPositioned:$,middlewareData:B}=aV({strategy:"fixed",placement:T,whileElementsMounted:(...e)=>JH(...e,{animationFrame:"always"===x}),elements:{reference:k.anchor},middleware:[cV({mainAxis:f+j,alignmentAxis:h}),g&&lV({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?uV():void 0,...z}),g&&dV({...z}),fV({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),E&&hV({element:E,padding:m}),OV({arrowWidth:P,arrowHeight:j}),w&&pV({strategy:"referenceHidden",...z})]}),[U,H]=oD(W),K=ao(_);Rr((()=>{$&&(null==K||K())}),[$,K]);const V=null===(o=B.arrow)||void 0===o?void 0:o.x,Y=null===(a=B.arrow)||void 0===a?void 0:a.y,G=0!==(null===(i=B.arrow)||void 0===i?void 0:i.centerOffset),[X,Q]=Ke();return Rr((()=>{S&&Q(window.getComputedStyle(S).zIndex)}),[S]),q("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:$?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[null===(l=B.transformOrigin)||void 0===l?void 0:l.x,null===(s=B.transformOrigin)||void 0===s?void 0:s.y].join(" ")},dir:e.dir},q(xV,{scope:c,placedSide:U,onArrowChange:N,arrowX:V,arrowY:Y,shouldHideArrow:G},q(dt.div,he({"data-side":U,"data-align":H},O,{ref:C,style:{...O.style,animation:$?void 0:"none",opacity:null!==(u=B.hide)&&void 0!==u&&u.referenceHidden?0:void 0}}))))})),SV="PopperArrow",CV={top:"bottom",right:"left",bottom:"top",left:"right"},EV=ye((function(e,t){const{__scopePopper:n,...r}=e,o=_V(SV,n),a=CV[o.placedSide];return q("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},q(gV,he({},r,{ref:t,style:{...r.style,display:"block"}})))}));function PV(e){return null!==e}const OV=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:s,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=oD(l),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(a=null===(i=u.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${g}px`,b=-f+"px"):"top"===p?(y=c?m:`${g}px`,b=`${s.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${v}px`):"left"===p&&(y=`${s.floating.width+f}px`,b=c?m:`${v}px`),{data:{x:y,y:b}}}});function oD(e){const[t,n="center"]=e.split("-");return[t,n]}const Dv=yV,_2=wV,$2=$V,RV=EV,xx="rovingFocusGroup.onEntryFocus",TV={bubbles:!1,cancelable:!0},S2="RovingFocusGroup",[K_,iD,NV]=m2(S2),[kV,Xu]=Br(S2,[NV]),[DV,AV]=kV(S2),MV=ye(((e,t)=>q(K_.Provider,{scope:e.__scopeRovingFocusGroup},q(K_.Slot,{scope:e.__scopeRovingFocusGroup},q(IV,he({},e,{ref:t})))))),IV=ye(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:s,onEntryFocus:u,...c}=e,d=Ae(null),f=Nt(t,d),p=Gp(a),[h=null,m]=si({prop:i,defaultProp:l,onChange:s}),[g,v]=Ke(!1),y=ao(u),b=iD(n),w=Ae(!1),[x,_]=Ke(0);return We((()=>{const e=d.current;if(e)return e.addEventListener(xx,y),()=>e.removeEventListener(xx,y)}),[y]),q(DV,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:h,onItemFocus:Ge((e=>m(e)),[m]),onItemShiftTab:Ge((()=>v(!0)),[]),onFocusableItemAdd:Ge((()=>_((e=>e+1))),[]),onFocusableItemRemove:Ge((()=>_((e=>e-1))),[])},q(dt.div,he({tabIndex:g||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:Xe(e.onMouseDown,(()=>{w.current=!0})),onFocus:Xe(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(xx,TV);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));aD([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:Xe(e.onBlur,(()=>v(!1)))})))})),jV="RovingFocusGroupItem",LV=ye(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,l=Co(),s=a||l,u=AV(jV,n),c=u.currentTabStopId===s,d=iD(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=u;return We((()=>{if(r)return f(),()=>p()}),[r,f,p]),q(K_.ItemSlot,{scope:n,id:s,focusable:r,active:o},q(dt.span,he({tabIndex:c?0:-1,"data-orientation":u.orientation},i,{ref:t,onMouseDown:Xe(e.onMouseDown,(e=>{r?u.onItemFocus(s):e.preventDefault()})),onFocus:Xe(e.onFocus,(()=>u.onItemFocus(s))),onKeyDown:Xe(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=BV(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=u.loop?qV(n,r+1):n.slice(r+1)}setTimeout((()=>aD(n)))}}))})))})),FV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WV(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function BV(e,t,n){const r=WV(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return FV[r]}function aD(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qV(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const C2=MV,E2=LV,Y_=["Enter"," "],zV=["ArrowDown","PageUp","Home"],sD=["ArrowUp","PageDown","End"],UV=[...zV,...sD],HV={ltr:[...Y_,"ArrowRight"],rtl:[...Y_,"ArrowLeft"]},VV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Av="Menu",[Pp,GV,KV]=m2(Av),[Jc,cD]=Br(Av,[KV,Yu,Xu]),Mv=Yu(),lD=Xu(),[uD,js]=Jc(Av),[YV,Yp]=Jc(Av),XV=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=Mv(t),[s,u]=Ke(null),c=Ae(!1),d=ao(a),f=Gp(o);return We((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),q(Dv,l,q(uD,{scope:t,open:n,onOpenChange:d,content:s,onContentChange:u},q(YV,{scope:t,onClose:Ge((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:i},r)))},dD=ye(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Mv(n);return q(_2,he({},o,r,{ref:t}))})),fD="MenuPortal",[QV,pD]=Jc(fD,{forceMount:void 0}),ZV=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=js(fD,t);return q(QV,{scope:t,forceMount:n},q(Ro,{present:n||a.open},q(sv,{asChild:!0,container:o},r)))},ai="MenuContent",[JV,P2]=Jc(ai),eG=ye(((e,t)=>{const n=pD(ai,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=js(ai,e.__scopeMenu),i=Yp(ai,e.__scopeMenu);return q(Pp.Provider,{scope:e.__scopeMenu},q(Ro,{present:r||a.open},q(Pp.Slot,{scope:e.__scopeMenu},i.modal?q(tG,he({},o,{ref:t})):q(nG,he({},o,{ref:t})))))})),tG=ye(((e,t)=>{const n=js(ai,e.__scopeMenu),r=Ae(null),o=Nt(t,r);return We((()=>{const e=r.current;if(e)return jp(e)}),[]),q(O2,he({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Xe(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),nG=ye(((e,t)=>{const n=js(ai,e.__scopeMenu);return q(O2,he({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),O2=ye(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:h,...m}=e,g=js(ai,n),v=Yp(ai,n),y=Mv(n),b=lD(n),w=GV(n),[x,_]=Ke(null),O=Ae(null),k=Nt(t,O,g.onContentChange),S=Ae(0),D=Ae(""),C=Ae(0),E=Ae(null),N=Ae("right"),M=Ae(0),P=h?Ip:As,j=h?{as:zc,allowPinchZoom:!0}:void 0;We((()=>()=>window.clearTimeout(S.current)),[]),$$();const T=Ge((e=>{var t,n;return N.current===(null===(t=E.current)||void 0===t?void 0:t.side)&&$G(e,null===(n=E.current)||void 0===n?void 0:n.area)}),[]);return q(JV,{scope:n,searchRef:D,onItemEnter:Ge((e=>{T(e)&&e.preventDefault()}),[T]),onItemLeave:Ge((e=>{var t;T(e)||(null===(t=O.current)||void 0===t||t.focus(),_(null))}),[T]),onTriggerLeave:Ge((e=>{T(e)&&e.preventDefault()}),[T]),pointerGraceTimerRef:C,onPointerGraceIntentChange:Ge((e=>{E.current=e}),[])},q(P,j,q(_$,{asChild:!0,trapped:o,onMountAutoFocus:Xe(a,(e=>{var t;e.preventDefault(),null===(t=O.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},q(av,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},q(C2,he({asChild:!0},b,{dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:_,onEntryFocus:Xe(s,(e=>{v.isUsingKeyboardRef.current||e.preventDefault()}))}),q($2,he({role:"menu","aria-orientation":"vertical","data-state":wD(g.open),"data-radix-menu-content":"",dir:v.dir},y,m,{ref:k,style:{outline:"none",...m.style},onKeyDown:Xe(m.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=D.current+e,o=w().filter((e=>!e.disabled)),a=document.activeElement,i=null===(t=o.find((e=>e.ref.current===a)))||void 0===t?void 0:t.textValue,l=xG(o.map((e=>e.textValue)),r,i),s=null===(n=o.find((e=>e.textValue===l)))||void 0===n?void 0:n.ref.current;(function e(t){D.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))})(r),s&&setTimeout((()=>s.focus()))})(e.key));const o=O.current;if(e.target!==o||!UV.includes(e.key))return;e.preventDefault();const a=w().filter((e=>!e.disabled)).map((e=>e.ref.current));sD.includes(e.key)&&a.reverse(),bG(a)})),onBlur:Xe(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),D.current="")})),onPointerMove:Xe(e.onPointerMove,Op((e=>{const t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>M.current?"right":"left";N.current=t,M.current=e.clientX}})))})))))))})),hD=ye(((e,t)=>{const{__scopeMenu:n,...r}=e;return q(dt.div,he({role:"group"},r,{ref:t}))})),rG=ye(((e,t)=>{const{__scopeMenu:n,...r}=e;return q(dt.div,he({},r,{ref:t}))})),X_="MenuItem",HO="menu.itemSelect",R2=ye(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=Ae(null),i=Yp(X_,e.__scopeMenu),l=P2(X_,e.__scopeMenu),s=Nt(t,a),u=Ae(!1);return q(mD,he({},o,{ref:s,disabled:n,onClick:Xe(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(HO,{bubbles:!0,cancelable:!0});e.addEventListener(HO,(e=>null==r?void 0:r(e)),{once:!0}),H3(e,t),t.defaultPrevented?u.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),u.current=!0},onPointerUp:Xe(e.onPointerUp,(e=>{var t;u.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:Xe(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||Y_.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),mD=ye(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=P2(X_,n),l=lD(n),s=Ae(null),u=Nt(t,s),[c,d]=Ke(!1),[f,p]=Ke("");return We((()=>{const e=s.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),q(Pp.ItemSlot,{scope:n,disabled:r,textValue:o??f},q(E2,he({asChild:!0},l,{focusable:!r}),q(dt.div,he({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:u,onPointerMove:Xe(e.onPointerMove,Op((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:Xe(e.onPointerLeave,Op((e=>i.onItemLeave(e)))),onFocus:Xe(e.onFocus,(()=>d(!0))),onBlur:Xe(e.onBlur,(()=>d(!1)))}))))})),oG=ye(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return q(vD,{scope:e.__scopeMenu,checked:n},q(R2,he({role:"menuitemcheckbox","aria-checked":Ug(n)?"mixed":n},o,{ref:t,"data-state":T2(n),onSelect:Xe(o.onSelect,(()=>null==r?void 0:r(!!Ug(n)||!n)),{checkForDefaultPrevented:!1})})))})),iG="MenuRadioGroup",[aG,sG]=Jc(iG,{value:void 0,onValueChange:()=>{}}),cG=ye(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=ao(r);return q(aG,{scope:e.__scopeMenu,value:n,onValueChange:a},q(hD,he({},o,{ref:t})))})),lG="MenuRadioItem",uG=ye(((e,t)=>{const{value:n,...r}=e,o=sG(lG,e.__scopeMenu),a=n===o.value;return q(vD,{scope:e.__scopeMenu,checked:a},q(R2,he({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":T2(a),onSelect:Xe(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),gD="MenuItemIndicator",[vD,dG]=Jc(gD,{checked:!1}),fG=ye(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=dG(gD,n);return q(Ro,{present:r||Ug(a.checked)||!0===a.checked},q(dt.span,he({},o,{ref:t,"data-state":T2(a.checked)})))})),pG=ye(((e,t)=>{const{__scopeMenu:n,...r}=e;return q(dt.div,he({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),yD="MenuSub",[hG,bD]=Jc(yD),mG=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=js(yD,t),i=Mv(t),[l,s]=Ke(null),[u,c]=Ke(null),d=ao(o);return We((()=>(!1===a.open&&d(!1),()=>d(!1))),[a.open,d]),q(Dv,i,q(uD,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c},q(hG,{scope:t,contentId:Co(),triggerId:Co(),trigger:l,onTriggerChange:s},n)))},vg="MenuSubTrigger",gG=ye(((e,t)=>{const n=js(vg,e.__scopeMenu),r=Yp(vg,e.__scopeMenu),o=bD(vg,e.__scopeMenu),a=P2(vg,e.__scopeMenu),i=Ae(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:s}=a,u={__scopeMenu:e.__scopeMenu},c=Ge((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return We((()=>c),[c]),We((()=>{const e=l.current;return()=>{window.clearTimeout(e),s(null)}}),[l,s]),q(dD,he({asChild:!0},u),q(mD,he({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":wD(n.open)},e,{ref:iv(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Xe(e.onPointerMove,Op((t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:Xe(e.onPointerLeave,Op((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,i="right"===t,s=i?-5:5,u=r[i?"left":"right"],c=r[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:u,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:u,y:r.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:Xe(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!HV[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),vG="MenuSubContent",yG=ye(((e,t)=>{const n=pD(ai,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=js(ai,e.__scopeMenu),i=Yp(ai,e.__scopeMenu),l=bD(vG,e.__scopeMenu),s=Ae(null),u=Nt(t,s);return q(Pp.Provider,{scope:e.__scopeMenu},q(Ro,{present:r||a.open},q(Pp.Slot,{scope:e.__scopeMenu},q(O2,he({id:l.contentId,"aria-labelledby":l.triggerId},o,{ref:u,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=s.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Xe(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:Xe(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:Xe(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=VV[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function wD(e){return e?"open":"closed"}function Ug(e){return"indeterminate"===e}function T2(e){return Ug(e)?"indeterminate":e?"checked":"unchecked"}function bG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wG(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function xG(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=wG(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function _G(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,l=t[e].y,s=t[a].x,u=t[a].y;l>r!=u>r&&n<(s-i)*(r-l)/(u-l)+i&&(o=!o)}return o}function $G(e,t){if(!t)return!1;return _G({x:e.clientX,y:e.clientY},t)}function Op(e){return t=>"mouse"===t.pointerType?e(t):void 0}const SG=XV,CG=dD,EG=ZV,PG=eG,OG=hD,RG=rG,TG=R2,NG=oG,kG=cG,DG=uG,AG=fG,MG=pG,IG=mG,jG=gG,LG=yG,xD="DropdownMenu",[FG,Vie]=Br(xD,[cD]),Ur=cD(),[WG,_D]=FG(xD),BG=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,s=Ur(t),u=Ae(null),[c=!1,d]=si({prop:o,defaultProp:a,onChange:i});return q(WG,{scope:t,triggerId:Co(),triggerRef:u,contentId:Co(),open:c,onOpenChange:d,onOpenToggle:Ge((()=>d((e=>!e))),[d]),modal:l},q(SG,he({},s,{open:c,onOpenChange:d,dir:r,modal:l}),n))},qG="DropdownMenuTrigger",zG=ye(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=_D(qG,n),i=Ur(n);return q(CG,he({asChild:!0},i),q(dt.button,he({type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:iv(t,a.triggerRef),onPointerDown:Xe(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:Xe(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),UG=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ur(t);return q(EG,he({},r,n))},HG="DropdownMenuContent",VG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_D(HG,n),a=Ur(n),i=Ae(!1);return q(PG,he({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:Xe(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:Xe(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(i.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),GG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(OG,he({},o,r,{ref:t}))})),KG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(RG,he({},o,r,{ref:t}))})),YG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(TG,he({},o,r,{ref:t}))})),XG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(NG,he({},o,r,{ref:t}))})),QG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(kG,he({},o,r,{ref:t}))})),ZG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(DG,he({},o,r,{ref:t}))})),JG=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(AG,he({},o,r,{ref:t}))})),eK=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(MG,he({},o,r,{ref:t}))})),tK=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Ur(t),[l=!1,s]=si({prop:r,defaultProp:a,onChange:o});return q(IG,he({},i,{open:l,onOpenChange:s}),n)},nK=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(jG,he({},o,r,{ref:t}))})),rK=ye(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ur(n);return q(LG,he({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),oK=BG,iK=zG,$D=UG,SD=VG,aK=GG,CD=KG,ED=YG,PD=XG,sK=QG,OD=ZG,cK=JG,N2=eK,lK=tK,RD=nK,TD=rK,Gie=oK,Kie=iK,Yie=aK,Xie=$D,Qie=lK,Zie=sK,uK=O.forwardRef((({className:e,inset:t,children:n,...r},o)=>D.jsxs(RD,{ref:o,className:te("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,D.jsx(v$,{className:"ml-auto h-4 w-4"})]})));uK.displayName=RD.displayName;const dK=O.forwardRef((({className:e,...t},n)=>D.jsx(TD,{ref:n,className:te("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));dK.displayName=TD.displayName;const VO=e=>{e.preventDefault()},fK=O.forwardRef((({className:e,sideOffset:t=4,isPortal:n,...r},o)=>{const a=D.jsx(SD,{ref:o,sideOffset:t,onOpenAutoFocus:VO,onCloseAutoFocus:VO,className:te("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-gray-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...r});return n?D.jsx($D,{children:a}):a}));fK.displayName=SD.displayName;const pK=O.forwardRef((({className:e,inset:t,...n},r)=>D.jsx(ED,{ref:r,className:te("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));pK.displayName=ED.displayName;const hK=O.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=D.jsx(s2,{size:"default",variant:"default",checked:n});return D.jsxs(PD,{ref:a,className:te("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&i,D.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));hK.displayName=PD.displayName;const mK=O.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=D.jsx("div",{className:"flex h-xxs items-center justify-center",children:D.jsx(cK,{children:D.jsx(nv,{size:20})})});return D.jsxs(OD,{ref:o,className:te("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&a,D.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));mK.displayName=OD.displayName;const gK=O.forwardRef((({className:e,inset:t,...n},r)=>D.jsx(CD,{ref:r,className:te("text-sm font-semibold",t&&"pl-xl",e),...n})));gK.displayName=CD.displayName;const vK=O.forwardRef((({className:e,...t},n)=>D.jsx(N2,{ref:n,className:te("-mx-1 my-1 h-px bg-muted",e),...t})));vK.displayName=N2.displayName;const yK=({className:e,...t})=>D.jsx("span",{className:te("ml-auto text-xs tracking-widest opacity-60",e),...t});yK.displayName="DropdownMenuShortcut";const bK=ye(((e,t)=>q(dt.label,he({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),ND=bK,wK=$a("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),kD=O.forwardRef((({className:e,...t},n)=>D.jsx(ND,{ref:n,className:te(wK(),e),...t})));function GO(e,[t,n]){return Math.min(n,Math.max(t,e))}kD.displayName=ND.displayName;const DD=ye(((e,t)=>q(dt.span,he({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),xK=DD,_K=[" ","Enter","ArrowUp","ArrowDown"],$K=[" ","Enter"],Iv="Select",[jv,Lv,SK]=m2(Iv),[Qu,Jie]=Br(Iv,[SK,Yu]),k2=Yu(),[CK,el]=Qu(Iv),[EK,PK]=Qu(Iv),OK=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:s,dir:u,name:c,autoComplete:d,disabled:f,required:p}=e,h=k2(t),[m,g]=Ke(null),[v,y]=Ke(null),[b,w]=Ke(!1),x=Gp(u),[_=!1,O]=si({prop:r,defaultProp:o,onChange:a}),[k,S]=si({prop:i,defaultProp:l,onChange:s}),D=Ae(null),C=!m||!!m.closest("form"),[E,N]=Ke(new Set),M=Array.from(E).map((e=>e.props.value)).join(";");return q(Dv,h,q(CK,{required:p,scope:t,trigger:m,onTriggerChange:g,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:Co(),value:k,onValueChange:S,open:_,onOpenChange:O,dir:x,triggerPointerDownPosRef:D,disabled:f},q(jv.Provider,{scope:t},q(EK,{scope:e.__scopeSelect,onNativeOptionAdd:Ge((e=>{N((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:Ge((e=>{N((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),C?q(LD,{key:M,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:k,onChange:e=>S(e.target.value),disabled:f},void 0===k?q("option",{value:""}):null,Array.from(E)):null))},RK="SelectTrigger",TK=ye(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=k2(n),i=el(RK,n),l=i.disabled||r,s=Nt(t,i.onTriggerChange),u=Lv(n),[c,d,f]=FD((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=WD(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{l||(i.onOpenChange(!0),f())};return q(_2,he({asChild:!0},a),q(dt.button,he({type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":jD(i.value)?"":void 0},o,{ref:s,onClick:Xe(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:Xe(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:Xe(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&_K.includes(e.key)&&(p(),e.preventDefault())}))})))})),NK="SelectValue",kK=ye(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,s=el(NK,n),{onValueNodeHasChildrenChange:u}=s,c=void 0!==a,d=Nt(t,s.onValueNodeChange);return Rr((()=>{u(c)}),[u,c]),q(dt.span,he({},l,{ref:d,style:{pointerEvents:"none"}}),jD(s.value)?q(As,null,i):a)})),DK=ye(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return q(dt.span,he({"aria-hidden":!0},o,{ref:t}),r||"▼")})),AK=e=>q(sv,he({asChild:!0},e)),Lu="SelectContent",MK=ye(((e,t)=>{const n=el(Lu,e.__scopeSelect),[r,o]=Ke();if(Rr((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?Bi.createPortal(q(AD,{scope:e.__scopeSelect},q(jv.Slot,{scope:e.__scopeSelect},q("div",null,e.children))),t):null}return q(IK,he({},e,{ref:t}))})),pa=10,[AD,tl]=Qu(Lu),IK=ye(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:s,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:g,...v}=e,y=el(Lu,n),[b,w]=Ke(null),[x,_]=Ke(null),O=Nt(t,(e=>w(e))),[k,S]=Ke(null),[D,C]=Ke(null),E=Lv(n),[N,M]=Ke(!1),P=Ae(!1);We((()=>{if(b)return jp(b)}),[b]),$$();const j=Ge((e=>{const[t,...n]=E().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[E,x]),T=Ge((()=>j([k,b])),[j,k,b]);We((()=>{N&&T()}),[N,T]);const{onOpenChange:A,triggerPointerDownPosRef:R}=y;We((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=R.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=R.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),R.current=null};return null!==R.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,A,R]),We((()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[A]);const[L,z]=FD((e=>{const t=E().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=WD(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),I=Ge(((e,t,n)=>{const r=!P.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(P.current=!0))}),[y.value]),F=Ge((()=>null==b?void 0:b.focus()),[b]),W=Ge(((e,t,n)=>{const r=!P.current&&!n;(void 0!==y.value&&y.value===t||r)&&C(e)}),[y.value]),$="popper"===r?KO:jK,B=$===KO?{side:l,sideOffset:s,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return q(AD,{scope:n,content:b,viewport:x,onViewportChange:_,itemRefCallback:I,selectedItem:k,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:T,selectedItemText:D,position:r,isPositioned:N,searchRef:L},q(Ip,{as:zc,allowPinchZoom:!0},q(_$,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Xe(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},q(av,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},q($,he({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},v,B,{onPlaced:()=>M(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:Xe(v.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=E().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>j(t))),e.preventDefault()}}))}))))))})),jK=ye(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=el(Lu,n),i=tl(Lu,n),[l,s]=Ke(null),[u,c]=Ke(null),d=Nt(t,(e=>c(e))),f=Lv(n),p=Ae(!1),h=Ae(!0),{viewport:m,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=i,b=Ge((()=>{if(a.trigger&&a.valueNode&&l&&u&&m&&g&&v){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,s=e.width+i,u=Math.max(s,t.width),c=window.innerWidth-pa,d=GO(a,[pa,c-u]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,s=e.width+i,u=Math.max(s,t.width),c=window.innerWidth-pa,d=GO(a,[pa,c-u]);l.style.minWidth=s+"px",l.style.right=d+"px"}const i=f(),s=window.innerHeight-2*pa,c=m.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),_=window.getComputedStyle(m),O=parseInt(_.paddingTop,10),k=parseInt(_.paddingBottom,10),S=e.top+e.height/2-pa,D=s-S,C=g.offsetHeight/2,E=h+y+(g.offsetTop+C),N=w-E;if(E<=S){const e=g===i[i.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-m.offsetTop-m.offsetHeight,n=E+Math.max(D,C+(e?k:0)+t+b);l.style.height=n+"px"}else{const e=g===i[0].ref.current;l.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?O:0)+C)+N;l.style.height=t+"px",m.scrollTop=E-S+m.offsetTop}l.style.margin=`${pa}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=s+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,a.trigger,a.valueNode,l,u,m,g,v,a.dir,r]);Rr((()=>b()),[b]);const[w,x]=Ke();Rr((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const _=Ge((e=>{e&&!0===h.current&&(b(),null==y||y(),h.current=!1)}),[b,y]);return q(LK,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_},q("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},q(dt.div,he({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),KO=ye(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=pa,...a}=e,i=k2(n);return q($2,he({},i,a,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[LK,D2]=Qu(Lu,{}),YO="SelectViewport",FK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e,o=tl(YO,n),a=D2(YO,n),i=Nt(t,o.onViewportChange),l=Ae(0);return q(As,null,q("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),q(jv.Slot,{scope:n},q(dt.div,he({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Xe(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=a;if(null!=r&&r.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*pa,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),l=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))})),WK="SelectGroup",[BK,qK]=Qu(WK),zK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e,o=Co();return q(BK,{scope:n,id:o},q(dt.div,he({role:"group","aria-labelledby":o},r,{ref:t})))})),UK="SelectLabel",HK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e,o=qK(UK,n);return q(dt.div,he({id:o.id},r,{ref:t}))})),Q_="SelectItem",[VK,MD]=Qu(Q_),GK=ye(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=el(Q_,n),s=tl(Q_,n),u=l.value===r,[c,d]=Ke(a??""),[f,p]=Ke(!1),h=Nt(t,(e=>{var t;return null===(t=s.itemRefCallback)||void 0===t?void 0:t.call(s,e,r,o)})),m=Co(),g=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return q(VK,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:Ge((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},q(jv.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},q(dt.div,he({role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},i,{ref:h,onFocus:Xe(i.onFocus,(()=>p(!0))),onBlur:Xe(i.onBlur,(()=>p(!1))),onPointerUp:Xe(i.onPointerUp,g),onPointerMove:Xe(i.onPointerMove,(e=>{var t;o?null===(t=s.onItemLeave)||void 0===t||t.call(s):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Xe(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=s.onItemLeave)||void 0===t||t.call(s))})),onKeyDown:Xe(i.onKeyDown,(e=>{var t;""!==(null===(t=s.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||($K.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),yg="SelectItemText",KK=ye(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=el(yg,n),l=tl(yg,n),s=MD(yg,n),u=PK(yg,n),[c,d]=Ke(null),f=Nt(t,(e=>d(e)),s.onItemTextChange,(e=>{var t;return null===(t=l.itemTextRefCallback)||void 0===t?void 0:t.call(l,e,s.value,s.disabled)})),p=null==c?void 0:c.textContent,h=or((()=>q("option",{key:s.value,value:s.value,disabled:s.disabled},p)),[s.disabled,s.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return Rr((()=>(m(h),()=>g(h))),[m,g,h]),q(As,null,q(dt.span,he({id:s.textId},a,{ref:f})),s.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Bi.createPortal(a.children,i.valueNode):null)})),YK="SelectItemIndicator",XK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e;return MD(YK,n).isSelected?q(dt.span,he({"aria-hidden":!0},r,{ref:t})):null})),XO="SelectScrollUpButton",QK=ye(((e,t)=>{const n=tl(XO,e.__scopeSelect),r=D2(XO,e.__scopeSelect),[o,a]=Ke(!1),i=Nt(t,r.onScrollButtonChange);return Rr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?q(ID,he({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),QO="SelectScrollDownButton",ZK=ye(((e,t)=>{const n=tl(QO,e.__scopeSelect),r=D2(QO,e.__scopeSelect),[o,a]=Ke(!1),i=Nt(t,r.onScrollButtonChange);return Rr((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?q(ID,he({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),ID=ye(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=tl("SelectScrollButton",n),i=Ae(null),l=Lv(n),s=Ge((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return We((()=>()=>s()),[s]),Rr((()=>{var e;const t=l().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[l]),q(dt.div,he({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Xe(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:Xe(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:Xe(o.onPointerLeave,(()=>{s()}))}))})),JK=ye(((e,t)=>{const{__scopeSelect:n,...r}=e;return q(dt.div,he({"aria-hidden":!0},r,{ref:t}))}));function jD(e){return""===e||void 0===e}const LD=ye(((e,t)=>{const{value:n,...r}=e,o=Ae(null),a=Nt(t,o),i=Cv(n);return We((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),q(DD,{asChild:!0},q("select",he({},r,{ref:a,defaultValue:n})))}));function FD(e){const t=ao(e),n=Ae(""),r=Ae(0),o=Ge((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=Ge((()=>{n.current="",window.clearTimeout(r.current)}),[]);return We((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function WD(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let a=eY(e,Math.max(o,0));1===r.length&&(a=a.filter((e=>e!==n)));const i=a.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function eY(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}LD.displayName="BubbleSelect";const BD=OK,A2=TK,qD=kK,tY=DK,nY=AK,zD=MK,rY=FK,UD=zK,HD=HK,VD=GK,oY=KK,iY=XK,GD=QK,KD=ZK,YD=JK,aY=BD,Fv=O.forwardRef((({...e},t)=>D.jsx(aY,{ref:t,...e})));Fv.displayName=BD.displayName;const XD=O.forwardRef(((e,t)=>D.jsx(UD,{ref:t,...e})));XD.displayName=UD.displayName;const M2=O.forwardRef(((e,t)=>D.jsx(qD,{ref:t,...e})));M2.displayName=qD.displayName;const I2=O.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,renderCaret:a=()=>D.jsx(rv,{size:20}),...i},l)=>D.jsxs("div",{className:"w-full",children:[D.jsxs(A2,{ref:l,className:te("flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-gray-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...i,children:[D.jsxs("div",{className:te("flex flex-1 items-center gap-xxs",{"max-w-[90%]":!!a}),children:[o&&D.jsx("span",{className:te("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),D.jsx(tY,{asChild:!0,children:a()})]}),n||r?r?D.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[D.jsx(j3,{size:16}),r]}):D.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[D.jsx(y7,{size:16}),n]}):null]})));I2.displayName="SelectTriggerWrapper";const j2=O.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>D.jsx(I2,{ref:i,className:te("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));j2.displayName=A2.displayName;const Wv=O.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a=O.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(O.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return D.jsx(nY,{children:D.jsx(zD,{ref:o,className:te("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-gray-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:D.jsx(rY,{className:te("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!a},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));Wv.displayName=zD.displayName;const QD=O.forwardRef((({className:e,...t},n)=>D.jsx(HD,{ref:n,className:te("text-sm font-medium text-gray-900",e),...t})));QD.displayName=HD.displayName;const L2=O.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=D.jsx(iY,{children:D.jsx(nv,{size:20})});return D.jsxs(VD,{ref:a,className:te("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&i,D.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:D.jsx(oY,{children:r})}),t&&"right"===n&&i]})}));L2.displayName=VD.displayName;const ZD=O.forwardRef((({className:e,...t},n)=>D.jsx(YD,{ref:n,className:te("-mx-1 my-1 h-px bg-gray-200",e),...t})));ZD.displayName=YD.displayName;const sY=({selectedValues:e=[],onRemoveValue:t})=>{const n=O.useRef(null),[r,o]=O.useState(e.length);return O.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,a=document.createElement("div");Object.assign(a.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(a);let i=0,l=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-gray-100 text-sm font-medium text-gray-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-gray-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}a.appendChild(e);const s=e.offsetWidth+4;if(!(i+s<=r))break;i+=s,l++}document.body.removeChild(a),o(Math.max(1,l))}),[e,t]),{containerRef:n,visibleCount:r}},JD=({hiddenCount:e,selectedValues:t=[],onRemoveValue:n})=>{const r=e=>{e.stopPropagation(),e.preventDefault()};return D.jsx("div",{onPointerDown:r,onMouseDown:r,onClick:r,children:D.jsxs(Fv,{name:"hidden-chips-counter",children:[D.jsx(A2,{asChild:!0,children:D.jsx("div",{children:D.jsx(FN,{text:`+${e}`})})}),D.jsx(Wv,{align:"end",className:"max-h-[250px] w-screen max-w-[300px] gap-xxxs overflow-y-auto",children:t.map((e=>{const t="string"==typeof e?e:e.value;return D.jsxs("div",{className:"flex justify-between p-xxs",onClick:e=>e.stopPropagation(),children:[D.jsx("span",{children:t}),D.jsx(ov,{size:16,className:"cursor-pointer",onClick:()=>null==n?void 0:n(t)})]},t)}))})]})})};JD.displayName="SelectHiddenChipsCounter";const cY=O.forwardRef(((e,t)=>{const{className:n,selectedValues:r=[],placeholder:o,onRemoveValue:a,icon:i,caption:l,error:s,...u}=e,{containerRef:c,visibleCount:d}=sY({selectedValues:r,onRemoveValue:a}),f=r.length-d;return D.jsx(I2,{ref:t,className:n,caption:l,error:s,icon:i,...u,children:D.jsx("div",{ref:c,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===r.length?D.jsx("span",{children:o||"Select options..."}):D.jsxs(Dq,{children:[r.slice(0,d).map((e=>{const t="string"==typeof e?e:e.value;return D.jsx(FN,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==a?void 0:a(t)},t)})),f>0&&D.jsx(JD,{hiddenCount:f,onRemoveValue:a,selectedValues:r})]})})})}));cY.displayName="SelectMultiTrigger";const lY=O.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:a,children:i,...l},s)=>{const u=n?D.jsx(y$,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):D.jsx(s2,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return D.jsxs("div",{ref:s,className:te("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},a),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...l,children:["left"===r&&u,D.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:i}),"right"===r&&u]})}));lY.displayName="SelectCheckboxItem";const uY=O.forwardRef((({className:e,...t},n)=>D.jsx(GD,{ref:n,className:te("flex cursor-default items-center justify-center py-xxs",e),...t,children:D.jsx(h7,{size:16})})));uY.displayName=GD.displayName;const dY=O.forwardRef((({className:e,...t},n)=>D.jsx(KD,{ref:n,className:te("flex cursor-default items-center justify-center p-xxs",e),...t,children:D.jsx(rv,{size:16})})));dY.displayName=KD.displayName;const fY=O.forwardRef((({className:e,children:t,...n},r)=>D.jsx("div",{ref:r,className:te("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));fY.displayName="SelectActions";const pY=O.forwardRef((({className:e,children:t,...n},r)=>D.jsx("div",{ref:r,className:te("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));pY.displayName="SelectFooter";const eae=G8,eA=O.createContext({}),tae=({...e})=>D.jsx(eA.Provider,{value:{name:e.name},children:D.jsx(K8,{...e})}),Ls=()=>{const e=O.useContext(eA),t=O.useContext(tA),n=Y8();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,a=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},tA=O.createContext({}),hY=O.forwardRef((({className:e,...t},n)=>{const r=O.useId();return D.jsx(tA.Provider,{value:{id:r},children:D.jsx("div",{ref:n,className:te("mt-[8px]",e),...t})})}));hY.displayName="FormItem";const mY=O.forwardRef((({className:e,isRequired:t,...n},r)=>{const{formItemId:o}=Ls();return D.jsxs(kD,{ref:r,className:te("mb-2 text-sm font-medium",e),htmlFor:o,...n,children:[t&&"*",n.children]})}));mY.displayName="FormLabel";const gY=O.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=Ls();return D.jsx(Ms,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));gY.displayName="FormControl";const vY=O.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=Ls();return D.jsx("p",{ref:n,id:r,className:te("text-sm text-muted-foreground",e),...t})}));vY.displayName="FormDescription";const yY=O.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=Ls(),i=o?String(null==o?void 0:o.message):t;return i?D.jsxs("p",{ref:r,id:a,className:te("flex items-start gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[D.jsx(j3,{size:16,className:"text-red-dark"})," ",i]}):null}));yY.displayName="FormMessage";const bY=O.forwardRef((({...e},t)=>{const{name:n}=Ls();return D.jsx(Fv,{ref:t,name:n,...e})}));bY.displayName="FormSelect";const wY=O.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=Ls();return D.jsx(j2,{ref:r,id:o,className:e,...n,children:t})}));wY.displayName="FormSelectTrigger";const xY=O.forwardRef(((e,t)=>D.jsx(Wv,{ref:t,...e})));xY.displayName="FormSelectContent";const _Y=O.forwardRef(((e,t)=>D.jsx(L2,{ref:t,...e})));_Y.displayName="FormSelectItem";const $Y=O.forwardRef(((e,t)=>D.jsx(XD,{ref:t,...e})));$Y.displayName="FormSelectGroup";const SY=O.forwardRef(((e,t)=>D.jsx(QD,{ref:t,...e})));SY.displayName="FormSelectLabel";const CY=O.forwardRef(((e,t)=>D.jsx(ZD,{ref:t,...e})));CY.displayName="FormSelectSeparator";const EY=O.forwardRef(((e,t)=>D.jsx(M2,{ref:t,...e})));function Or(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function F2(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>ji(e)));return function(n){const r=(null==n?void 0:n[e])||t;return or((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=ji(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,l=(null==n?void 0:n[e][a])||o,s=or((()=>i),Object.values(i));return q(l.Provider,{value:s},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const l=(null==i?void 0:i[e][a])||o,s=Ds(l);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},PY(r,...t)]}function PY(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return or((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function Rs(e){const t=Ae(e);return We((()=>{t.current=e})),or((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function nA({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=OY({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=Rs(n);return[i,Ge((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function OY({defaultProp:e,onChange:t}){const n=Ke(e),[r]=n,o=Ae(r),a=Rs(t);return We((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function RY(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function TY(...e){return t=>e.forEach((e=>RY(e,t)))}function NY(...e){return Ge(TY(...e),e)}function nl(e){return e.split("-")[0]}function Xp(e){return e.split("-")[1]}function Zu(e){return["top","bottom"].includes(nl(e))?"x":"y"}function W2(e){return"y"===e?"height":"width"}function ZO(e,t,n){let{reference:r,floating:o}=e;const a=r.x+r.width/2-o.width/2,i=r.y+r.height/2-o.height/2,l=Zu(t),s=W2(l),u=r[s]/2-o[s]/2,c="x"===l;let d;switch(nl(t)){case"top":d={x:a,y:r.y-o.height};break;case"bottom":d={x:a,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:i};break;case"left":d={x:r.x-o.width,y:i};break;default:d={x:r.x,y:r.y}}switch(Xp(t)){case"start":d[l]-=u*(n&&c?-1:1);break;case"end":d[l]+=u*(n&&c?-1:1)}return d}EY.displayName="FormSelectValue";const kY=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=ZO(s,r,l),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:h,fn:m}=a[n],{x:g,y:v,data:y,reset:b}=await m({x:u,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:s,platform:i,elements:{reference:e,floating:t}});u=g??u,c=v??c,f={...f,[h]:{...f[h],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(s=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:c}=ZO(s,d,l))),n=-1)}return{x:u,y:c,placement:d,strategy:o,middlewareData:f}};function rA(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function Hg(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Rp(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,h=rA(p),m=l[f?"floating"===d?"reference":"floating":d],g=Hg(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),v=Hg(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...i.floating,x:r,y:o}:i.reference,offsetParent:await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),strategy:s}):i[d]);return{top:g.top-v.top+h.top,bottom:v.bottom-g.bottom+h.bottom,left:g.left-v.left+h.left,right:v.right-g.right+h.right}}const DY=Math.min,Mc=Math.max;function Z_(e,t,n){return Mc(e,DY(t,n))}const JO=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:a,placement:i,rects:l,platform:s}=t;if(null==n)return{};const u=rA(r),c={x:o,y:a},d=Zu(i),f=Xp(i),p=W2(d),h=await s.getDimensions(n),m="y"===d?"top":"left",g="y"===d?"bottom":"right",v=l.reference[p]+l.reference[d]-c[d]-l.floating[p],y=c[d]-l.reference[d],b=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=l.floating[p]);const x=v/2-y/2,_=u[m],O=w-h[p]-u[g],k=w/2-h[p]/2+x,S=Z_(_,k,O),D=("start"===f?u[m]:u[g])>0&&k!==S&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(D?k<_?_-k:O-k:0),data:{[d]:S,centerOffset:k-S}}}}),AY={left:"right",right:"left",bottom:"top",top:"bottom"};function Vg(e){return e.replace(/left|right|bottom|top/g,(e=>AY[e]))}function MY(e,t,n){void 0===n&&(n=!1);const r=Xp(e),o=Zu(e),a=W2(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Vg(i)),{main:i,cross:Vg(i)}}const IY={start:"end",end:"start"};function eR(e){return e.replace(/start|end/g,(e=>IY[e]))}const oA=["top","right","bottom","left"];oA.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const jY=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:a,initialPlacement:i,platform:l,elements:s}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...h}=e,m=nl(r),g=[i,...d||(m!==i&&p?function(e){const t=Vg(e);return[eR(e),t,eR(t)]}(i):[Vg(i)])],v=await Rp(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&y.push(v[m]),c){const{main:e,cross:t}=MY(r,a,await(null==l.isRTL?void 0:l.isRTL(s.floating)));y.push(v[e],v[t])}if(b=[...b,{placement:r,overflows:y}],!y.every((e=>e<=0))){var w,x;const e=(null!=(w=null==(x=o.flip)?void 0:x.index)?w:0)+1,t=g[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var _;const e=null==(_=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0].placement;e&&(n=e);break}case"initialPlacement":n=i}if(r!==n)return{reset:{placement:n}}}return{}}}};function tR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nR(e){return oA.some((t=>e[t]>=0))}const LY=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=tR(await Rp(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:nR(t)}}}case"escaped":{const t=tR(await Rp(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:nR(t)}}}default:return{}}}}},FY=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=nl(n),l=Xp(n),s="x"===Zu(n),u=["left","top"].includes(i)?-1:1,c=a&&s?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function iA(e){return"x"===e?"y":"x"}const WY=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=e,u={x:n,y:r},c=await Rp(t,s),d=Zu(nl(o)),f=iA(d);let p=u[d],h=u[f];if(a){const e="y"===d?"bottom":"right";p=Z_(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";h=Z_(h+c["y"===f?"top":"left"],h,h-c[e])}const m=l.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},BY=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=e,c={x:n,y:r},d=Zu(o),f=iA(d);let p=c[d],h=c[f];const m="function"==typeof l?l({...a,placement:o}):l,g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const e="y"===d?"height":"width",t=a.reference[d]-a.floating[e]+g.mainAxis,n=a.reference[d]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var v,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(nl(o)),n=a.reference[f]-a.floating[e]+(t&&null!=(v=null==(y=i.offset)?void 0:y[f])?v:0)+(t?0:g.crossAxis),r=a.reference[f]+a.reference[e]+(t?0:null!=(b=null==(w=i.offset)?void 0:w[f])?b:0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},qY=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i,...l}=e,s=await Rp(t,l),u=nl(n),c=Xp(n);let d,f;"top"===u||"bottom"===u?(d=u,f=c===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=u,d="end"===c?"top":"bottom");const p=Mc(s.left,0),h=Mc(s.right,0),m=Mc(s.top,0),g=Mc(s.bottom,0),v={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==g?m+g:Mc(s.top,s.bottom)):s[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:Mc(s.left,s.right)):s[f])},y=await o.getDimensions(a.floating);null==i||i({...t,...v});const b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function aA(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Oa(e){if(null==e)return window;if(!aA(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qp(e){return Oa(e).getComputedStyle(e)}function ga(e){return aA(e)?"":e?(e.nodeName||"").toLowerCase():""}function sA(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Wi(e){return e instanceof Oa(e).HTMLElement}function Ts(e){return e instanceof Oa(e).Element}function B2(e){return!(typeof ShadowRoot>"u")&&(e instanceof Oa(e).ShadowRoot||e instanceof ShadowRoot)}function Bv(e){const{overflow:t,overflowX:n,overflowY:r}=Qp(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function zY(e){return["table","td","th"].includes(ga(e))}function rR(e){const t=/firefox/i.test(sA()),n=Qp(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function cA(){return!/^((?!chrome|android).)*safari/i.test(sA())}const oR=Math.min,dp=Math.max,Gg=Math.round;function va(e,t,n){var r,o,a,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let s=1,u=1;t&&Wi(e)&&(s=e.offsetWidth>0&&Gg(l.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Gg(l.height)/e.offsetHeight||1);const c=Ts(e)?Oa(e):window,d=!cA()&&n,f=(l.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/s,p=(l.top+(d&&null!=(a=null==(i=c.visualViewport)?void 0:i.offsetTop)?a:0))/u,h=l.width/s,m=l.height/u;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function _s(e){return(t=e,(t instanceof Oa(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function qv(e){return Ts(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lA(e){return va(_s(e)).left+qv(e).scrollLeft}function UY(e,t,n){const r=Wi(t),o=_s(t),a=va(e,r&&function(e){const t=va(e);return Gg(t.width)!==e.offsetWidth||Gg(t.height)!==e.offsetHeight}(t),"fixed"===n);let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==ga(t)||Bv(o))&&(i=qv(t)),Wi(t)){const e=va(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=lA(o));return{x:a.left+i.scrollLeft-l.x,y:a.top+i.scrollTop-l.y,width:a.width,height:a.height}}function uA(e){return"html"===ga(e)?e:e.assignedSlot||e.parentNode||(B2(e)?e.host:null)||_s(e)}function iR(e){return Wi(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function J_(e){const t=Oa(e);let n=iR(e);for(;n&&zY(n)&&"static"===getComputedStyle(n).position;)n=iR(n);return n&&("html"===ga(n)||"body"===ga(n)&&"static"===getComputedStyle(n).position&&!rR(n))?t:n||function(e){let t=uA(e);for(B2(t)&&(t=t.host);Wi(t)&&!["html","body"].includes(ga(t));){if(rR(t))return t;t=t.parentNode}return null}(e)||t}function aR(e){if(Wi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=va(e);return{width:t.width,height:t.height}}function dA(e){const t=uA(e);return["html","body","#document"].includes(ga(t))?e.ownerDocument.body:Wi(t)&&Bv(t)?t:dA(t)}function Kg(e,t){var n;void 0===t&&(t=[]);const r=dA(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Oa(r),i=o?[a].concat(a.visualViewport||[],Bv(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Kg(i))}function sR(e,t,n){return"viewport"===t?Hg(function(e,t){const n=Oa(e),r=_s(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=cA();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l,y:s}}(e,n)):Ts(t)?function(e,t){const n=va(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):Hg(function(e){var t;const n=_s(e),r=qv(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=dp(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=dp(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+lA(e);const s=-r.scrollTop;return"rtl"===Qp(o||n).direction&&(l+=dp(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:s}}(_s(e)))}function HY(e){const t=Kg(e),n=["absolute","fixed"].includes(Qp(e).position)&&Wi(e)?J_(e):e;return Ts(n)?t.filter((e=>Ts(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&B2(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==ga(e))):[]}const VY={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?HY(t):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=sR(t,n,o);return e.top=dp(r.top,e.top),e.right=oR(r.right,e.right),e.bottom=oR(r.bottom,e.bottom),e.left=dp(r.left,e.left),e}),sR(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Wi(n),a=_s(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==ga(n)||Bv(a))&&(i=qv(n)),Wi(n))){const e=va(n,!0);l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+l.x,y:t.y-i.scrollTop+l.y}},isElement:Ts,getDimensions:aR,getOffsetParent:J_,getDocumentElement:_s,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:UY(t,J_(n),r),floating:{...aR(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Qp(e).direction};function GY(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=!0,animationFrame:l=!1}=r,s=o&&!l,u=a&&!l,c=s||u?[...Ts(e)?Kg(e):[],...Kg(t)]:[];c.forEach((e=>{s&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)}));let d,f=null;if(i){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),Ts(e)&&!l&&f.observe(e),f.observe(t)}let p=l?va(e):null;return l&&function t(){const r=va(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{s&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const KY=(e,t,n)=>kY(e,t,{platform:VY,...n});var e$=typeof document<"u"?Xc:We;function t$(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!t$(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||t$(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function YY(e){const t=O.useRef(e);return e$((()=>{t.current=e})),t}function XY(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=O.useRef(null),i=O.useRef(null),l=YY(o),s=O.useRef(null),[u,c]=O.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=O.useState(t);t$(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=O.useCallback((()=>{!a.current||!i.current||KY(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&Bi.flushSync((()=>{c(e)}))}))}),[d,n,r]);e$((()=>{h.current&&p()}),[p]);const h=O.useRef(!1);e$((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=O.useCallback((()=>{if("function"==typeof s.current&&(s.current(),s.current=null),a.current&&i.current)if(l.current){const e=l.current(a.current,i.current,p);s.current=e}else p()}),[p,l]),g=O.useCallback((e=>{a.current=e,m()}),[m]),v=O.useCallback((e=>{i.current=e,m()}),[m]),y=O.useMemo((()=>({reference:a,floating:i})),[]);return O.useMemo((()=>({...u,update:p,refs:y,reference:g,floating:v})),[u,p,y,g,v])}const QY=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?JO({element:t.current,padding:n}).fn(e):{}:t?JO({element:t,padding:n}).fn(e):{}}};function ZY(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function JY(...e){return t=>e.forEach((e=>ZY(e,t)))}const fA=ye(((e,t)=>{const{children:n,...r}=e,o=ir.toArray(n),a=o.find(tX);if(a){const e=a.props.children,n=o.map((t=>t===a?ir.count(e)>1?ir.only(null):Po(e)?e.props.children:null:t));return q(n$,he({},r,{ref:t}),Po(e)?_a(e,void 0,n):null)}return q(n$,he({},r,{ref:t}),n)}));fA.displayName="Slot";const n$=ye(((e,t)=>{const{children:n,...r}=e;return Po(n)?_a(n,{...nX(r,n.props),ref:JY(t,n.ref)}):ir.count(n)>1?ir.only(null):null}));n$.displayName="SlotClone";const eX=({children:e})=>q(As,null,e);function tX(e){return Po(e)&&e.type===eX}function nX(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const rX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ns=rX.reduce(((e,t)=>{const n=ye(((e,n)=>{const{asChild:r,...o}=e,a=r?fA:t;return We((()=>{window[Symbol.for("radix-ui")]=!0}),[]),q(a,he({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function oX(e,t){e&&Bi.flushSync((()=>e.dispatchEvent(t)))}function iX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function aX(...e){return t=>e.forEach((e=>iX(e,t)))}function pA(...e){return Ge(aX(...e),e)}const ws=null!=globalThis&&globalThis.document?Xc:()=>{};function sX(e){const[t,n]=Ke(void 0);return ws((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const hA="Popper",[q2,zv]=F2(hA),[cX,mA]=q2(hA),lX=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Ke(null);return q(cX,{scope:t,anchor:r,onAnchorChange:o},n)},uX="PopperAnchor",dX=ye(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=mA(uX,n),i=Ae(null),l=pA(t,i);return We((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:q(Ns.div,he({},o,{ref:l}))})),Yg="PopperContent",[fX,nae]=q2(Yg),[pX,hX]=q2(Yg,{hasParent:!1,positionUpdateFns:new Set}),mX=ye(((e,t)=>{var n,r,o,a,i,l,s,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,..._}=e,O=mA(Yg,c),[k,S]=Ke(null),D=pA(t,(e=>S(e))),[C,E]=Ke(null),N=sX(C),M=null!==(n=null==N?void 0:N.width)&&void 0!==n?n:0,P=null!==(r=null==N?void 0:N.height)&&void 0!==r?r:0,j=d+("center"!==p?"-"+p:""),T="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},A=Array.isArray(g)?g:[g],R=A.length>0,L={padding:T,boundary:A.filter(vX),altBoundary:R},{reference:z,floating:I,strategy:F,x:W,y:$,placement:B,middlewareData:U,update:H}=XY({strategy:"fixed",placement:j,whileElementsMounted:GY,middleware:[yX(),FY({mainAxis:f+P,alignmentAxis:h}),w?WY({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?BY():void 0,...L}):void 0,C?QY({element:C,padding:m}):void 0,w?jY({...L}):void 0,qY({...L,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),bX({arrowWidth:M,arrowHeight:P}),b?LY({strategy:"referenceHidden"}):void 0].filter(gX)});ws((()=>{z(O.anchor)}),[z,O.anchor]);const K=null!==W&&null!==$,[V,Y]=gA(B),G=Rs(x);ws((()=>{K&&(null==G||G())}),[K,G]);const X=null===(o=U.arrow)||void 0===o?void 0:o.x,Q=null===(a=U.arrow)||void 0===a?void 0:a.y,Z=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[J,ee]=Ke();ws((()=>{k&&ee(window.getComputedStyle(k).zIndex)}),[k]);const{hasParent:te,positionUpdateFns:ne}=hX(Yg,c),re=!te;Xc((()=>{if(!re)return ne.add(H),()=>{ne.delete(H)}}),[re,ne,H]),ws((()=>{re&&K&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,K,ne]);const oe={"data-side":V,"data-align":Y,..._,ref:D,style:{..._.style,animation:K?void 0:"none",opacity:null!==(l=U.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return q("div",{ref:I,"data-radix-popper-content-wrapper":"",style:{position:F,left:0,top:0,transform:K?`translate3d(${Math.round(W)}px, ${Math.round($)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(s=U.transformOrigin)||void 0===s?void 0:s.x,null===(u=U.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},q(fX,{scope:c,placedSide:V,onArrowChange:E,arrowX:X,arrowY:Q,shouldHideArrow:Z},re?q(pX,{scope:c,hasParent:!0,positionUpdateFns:ne},q(Ns.div,oe)):q(Ns.div,oe)))}));function gX(e){return void 0!==e}function vX(e){return null!==e}const yX=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),bX=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:s,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=gA(l),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,v=(null!==(a=null===(i=u.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?m:`${g}px`,b=-f+"px"):"top"===p?(y=c?m:`${g}px`,b=`${s.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${v}px`):"left"===p&&(y=`${s.floating.width+f}px`,b=c?m:`${v}px`),{data:{x:y,y:b}}}});function gA(e){const[t,n="center"]=e.split("-");return[t,n]}const vA=lX,z2=dX,yA=mX,bA=ye(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?w$.createPortal(q(Ns.div,he({},o,{ref:t})),r):null}));function wX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function xX(...e){return t=>e.forEach((e=>wX(e,t)))}function _X(...e){return Ge(xX(...e),e)}function $X(e,t){return k3(((e,n)=>t[e][n]??e),e)}const Zp=e=>{const{present:t,children:n}=e,r=SX(t),o="function"==typeof n?n({present:r.isPresent}):ir.only(n),a=_X(r.ref,o.ref);return"function"==typeof n||r.isPresent?_a(o,{ref:a}):null};function SX(e){const[t,n]=Ke(),r=Ae({}),o=Ae(e),a=Ae("none"),i=e?"mounted":"unmounted",[l,s]=$X(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return We((()=>{const e=bg(r.current);a.current="mounted"===l?e:"none"}),[l]),ws((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=bg(t);e?s("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?s("UNMOUNT"):s(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,s]),ws((()=>{if(t){const e=e=>{const n=bg(r.current).includes(e.animationName);e.target===t&&n&&Bi.flushSync((()=>s("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=bg(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:Ge((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function bg(e){return(null==e?void 0:e.animationName)||"none"}function CX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function EX(...e){return t=>e.forEach((e=>CX(e,t)))}function PX(...e){return Ge(EX(...e),e)}function OX(e,t=(null==globalThis?void 0:globalThis.document)){const n=Rs(e);We((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}Zp.displayName="Presence";const r$="dismissableLayer.update",RX="dismissableLayer.pointerDownOutside",TX="dismissableLayer.focusOutside";let cR;const NX=ji({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wA=ye(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...u}=e,c=Ds(NX),[d,f]=Ke(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=Ke({}),m=PX(t,(e=>f(e))),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=kX((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==s||s())}),p),O=DX((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==l||l(e),e.defaultPrevented||null==s||s())}),p);return OX((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),We((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(cR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),lR(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=cR)}}),[d,p,r,c]),We((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),lR())}),[d,c]),We((()=>{const e=()=>h({});return document.addEventListener(r$,e),()=>document.removeEventListener(r$,e)}),[]),q(Ns.div,he({},u,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Or(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Or(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Or(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function kX(e,t=(null==globalThis?void 0:globalThis.document)){const n=Rs(e),r=Ae(!1),o=Ae((()=>{}));return We((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){xA(RX,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},a=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function DX(e,t=(null==globalThis?void 0:globalThis.document)){const n=Rs(e),r=Ae(!1);return We((()=>{const e=e=>{e.target&&!r.current&&xA(TX,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lR(){const e=new CustomEvent(r$);document.dispatchEvent(e)}function xA(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?oX(o,a):o.dispatchEvent(a)}let _x;const _A="HoverCard",[$A,rae]=F2(_A,[zv]),U2=zv(),[AX,Uv]=$A(_A),MX=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,s=U2(t),u=Ae(0),c=Ae(0),d=Ae(!1),f=Ae(!1),[p=!1,h]=nA({prop:r,defaultProp:o,onChange:a}),m=Ge((()=>{clearTimeout(c.current),u.current=window.setTimeout((()=>h(!0)),i)}),[i,h]),g=Ge((()=>{clearTimeout(u.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>h(!1)),l))}),[l,h]),v=Ge((()=>h(!1)),[h]);return We((()=>()=>{clearTimeout(u.current),clearTimeout(c.current)}),[]),q(AX,{scope:t,open:p,onOpenChange:h,onOpen:m,onClose:g,onDismiss:v,hasSelectionRef:d,isPointerDownOnContentRef:f},q(vA,s,n))},IX="HoverCardTrigger",jX=ye(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Uv(IX,n),a=U2(n);return q(z2,he({asChild:!0},a),q(Ns.a,he({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:Or(e.onPointerEnter,Xg(o.onOpen)),onPointerLeave:Or(e.onPointerLeave,Xg(o.onClose)),onFocus:Or(e.onFocus,o.onOpen),onBlur:Or(e.onBlur,o.onClose),onTouchStart:Or(e.onTouchStart,(e=>e.preventDefault()))})))})),SA="HoverCardPortal",[LX,FX]=$A(SA,{forceMount:void 0}),WX=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Uv(SA,t);return q(LX,{scope:t,forceMount:n},q(Zp,{present:n||a.open},q(bA,{asChild:!0,container:o},r)))},o$="HoverCardContent",BX=ye(((e,t)=>{const n=FX(o$,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Uv(o$,e.__scopeHoverCard);return q(Zp,{present:r||a.open},q(qX,he({"data-state":a.open?"open":"closed"},o,{onPointerEnter:Or(e.onPointerEnter,Xg(a.onOpen)),onPointerLeave:Or(e.onPointerLeave,Xg(a.onClose)),ref:t})))})),qX=ye(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...l}=e,s=Uv(o$,n),u=U2(n),c=Ae(null),d=NY(t,c),[f,p]=Ke(!1);return We((()=>{if(f){const e=document.body;return _x=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=_x,e.style.webkitUserSelect=_x}}}),[f]),We((()=>{if(c.current){const e=()=>{p(!1),s.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(s.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),s.hasSelectionRef.current=!1,s.isPointerDownOnContentRef.current=!1}}}),[s.isPointerDownOnContentRef,s.hasSelectionRef]),We((()=>{c.current&&zX(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),q(wA,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Or(a,(e=>{e.preventDefault()})),onDismiss:s.onDismiss},q(yA,he({},u,l,{onPointerDown:Or(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),s.hasSelectionRef.current=!1,s.isPointerDownOnContentRef.current=!0})),ref:d,style:{...l.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function Xg(e){return t=>"touch"===t.pointerType?void 0:e()}function zX(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const UX=MX,HX=jX,VX=WX,CA=BX,oae=UX,iae=HX,aae=VX,GX=O.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>D.jsx(CA,{ref:o,align:t,sideOffset:n,className:te("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));GX.displayName=CA.displayName;const Wc=O.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=Ls();return D.jsx("input",{type:t,title:n.disabled?"Disabled":"",className:te("flex w-full rounded-m px-s py-3.5 text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-gray-400 placeholder:text-muted-foreground focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 enabled:hover:outline-2 enabled:hover:outline-gray-400 disabled:bg-transparent disabled:text-gray-300 disabled:outline-gray-200 disabled:ring-0 disabled:ring-transparent disabled:placeholder:text-gray-300",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));function KX(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>O.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return O.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=O.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,s=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=O.useMemo((()=>l),Object.values(l));return D.jsx(s.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const s=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,u=O.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},YX(r,...t)]}function YX(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return O.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function uR(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function XX(...e){return t=>{let n=!1;const r=e.map((e=>{const r=uR(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():uR(e[t],null)}}}}function QX(e){const t=ZX(e),n=O.forwardRef(((e,n)=>{const{children:r,...o}=e,a=O.Children.toArray(r),i=a.find(eQ);if(i){const e=i.props.children,r=a.map((t=>t===i?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t));return D.jsx(t,{...o,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return D.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function ZX(e){const t=O.forwardRef(((e,t)=>{const{children:n,...r}=e;if(O.isValidElement(n)){const e=nQ(n),o=tQ(r,n.props);return n.type!==O.Fragment&&(o.ref=t?XX(t,e):e),O.cloneElement(n,o)}return O.Children.count(n)>1?O.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}Wc.displayName="Input";var JX=Symbol("radix.slottable");function eQ(e){return O.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===JX}function tQ(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function nQ(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var rQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],EA=rQ.reduce(((e,t)=>{const n=QX(`Primitive.${t}`),r=O.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),H2="Progress",V2=100,[oQ,sae]=KX(H2),[iQ,aQ]=oQ(H2),PA=O.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=sQ,...i}=e;(o||0===o)&&!dR(o)&&console.error(cQ(`${o}`,"Progress"));const l=dR(o)?o:V2;null!==r&&!fR(r,l)&&console.error(lQ(`${r}`,"Progress"));const s=fR(r,l)?r:null,u=Qg(s)?a(s,l):void 0;return D.jsx(iQ,{scope:n,value:s,max:l,children:D.jsx(EA.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Qg(s)?s:void 0,"aria-valuetext":u,role:"progressbar","data-state":TA(s,l),"data-value":s??void 0,"data-max":l,...i,ref:t})})}));PA.displayName=H2;var OA="ProgressIndicator",RA=O.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=aQ(OA,n);return D.jsx(EA.div,{"data-state":TA(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function sQ(e,t){return`${Math.round(e/t*100)}%`}function TA(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Qg(e){return"number"==typeof e}function dR(e){return Qg(e)&&!isNaN(e)&&e>0}function fR(e,t){return Qg(e)&&!isNaN(e)&&e<=t&&e>=0}function cQ(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${V2}\`.`}function lQ(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${V2} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}RA.displayName=OA;var NA=PA,uQ=RA;const dQ=O.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>D.jsx(NA,{ref:o,className:te("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:D.jsx(uQ,{className:te("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));dQ.displayName=NA.displayName;const kA="Radio",[fQ,DA]=Br(kA),[pQ,hQ]=fQ(kA),mQ=ye(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:s,...u}=e,[c,d]=Ke(null),f=Nt(t,(e=>d(e))),p=Ae(!1),h=!c||!!c.closest("form");return q(pQ,{scope:n,checked:o,disabled:i},q(dt.button,he({type:"button",role:"radio","aria-checked":o,"data-state":AA(o),"data-disabled":i?"":void 0,disabled:i,value:l},u,{ref:f,onClick:Xe(e.onClick,(e=>{o||null==s||s(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&q(yQ,{control:c,bubbles:!p.current,name:r,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),gQ="RadioIndicator",vQ=ye(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=hQ(gQ,n);return q(Ro,{present:r||a.checked},q(dt.span,he({"data-state":AA(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),yQ=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=Cv(n),l=Ev(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),q("input",he({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function AA(e){return e?"checked":"unchecked"}const bQ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],MA="RadioGroup",[wQ,cae]=Br(MA,[Xu,DA]),IA=Xu(),jA=DA(),[xQ,_Q]=wQ(MA),$Q=ye(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:s,dir:u,loop:c=!0,onValueChange:d,...f}=e,p=IA(n),h=Gp(u),[m,g]=si({prop:a,defaultProp:o,onChange:d});return q(xQ,{scope:n,name:r,required:i,disabled:l,value:m,onValueChange:g},q(C2,he({asChild:!0},p,{orientation:s,dir:h,loop:c}),q(dt.div,he({role:"radiogroup","aria-required":i,"aria-orientation":s,"data-disabled":l?"":void 0,dir:h},f,{ref:t}))))})),SQ="RadioGroupItem",CQ=ye(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=_Q(SQ,n),i=a.disabled||r,l=IA(n),s=jA(n),u=Ae(null),c=Nt(t,u),d=a.value===o.value,f=Ae(!1);return We((()=>{const e=e=>{bQ.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),q(E2,he({asChild:!0},l,{focusable:!i,active:d}),q(mQ,he({disabled:i,required:a.required,checked:d},s,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:Xe((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Xe(o.onFocus,(()=>{var e;f.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),EQ=ye(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=jA(n);return q(vQ,he({},o,r,{ref:t}))})),LA=$Q,FA=CQ,PQ=EQ,OQ=O.forwardRef((({className:e,...t},n)=>D.jsx(LA,{className:te("grid gap-2",e),...t,ref:n})));OQ.displayName=LA.displayName;const RQ=O.forwardRef((({className:e,...t},n)=>D.jsx(FA,{ref:n,className:te("aspect-square size-6 rounded-full border border-gray-300 disabled:cursor-not-allowed disabled:border-gray-100 disabled:bg-gray-100","data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 hover:data-[state=checked]:border-blue_120","disabled:data-[state=checked]:border-gray-100 disabled:data-[state=checked]:bg-gray-100","transition-[border] duration-200 hover:data-[state=checked]:bg-blue_120 md:hover:border-2",e),...t,children:D.jsx(PQ,{className:"flex items-center justify-center",children:D.jsx(g7,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--gray-300)":"white",color:t.disabled?"var(--gray-300)":"white"}})})})));RQ.displayName=FA.displayName;const TQ=lv,lae=P$,uae=Uu,NQ=uv,WA=O.forwardRef((({className:e,...t},n)=>D.jsx(qu,{className:te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));WA.displayName=qu.displayName;const kQ=$a("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),BA=O.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>D.jsxs(NQ,{children:[D.jsx(WA,{className:te("bg-gray-900/70",n)}),D.jsxs(zu,{ref:a,className:te(kQ({side:e}),t),...o,children:[r,D.jsxs(Uu,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[D.jsx(ov,{className:"h-4 w-4"}),D.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));BA.displayName=zu.displayName;const qA=({className:e,...t})=>D.jsx("div",{className:te("flex flex-col space-y-2 text-center sm:text-left",e),...t});qA.displayName="SheetHeader";const DQ=({className:e,...t})=>D.jsx("div",{className:te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DQ.displayName="SheetFooter";const zA=O.forwardRef((({className:e,...t},n)=>D.jsx(Lp,{ref:n,className:te("text-lg font-semibold text-foreground",e),...t})));zA.displayName=Lp.displayName;const UA=O.forwardRef((({className:e,...t},n)=>D.jsx(Fp,{ref:n,className:te("text-sm text-muted-foreground",e),...t})));UA.displayName=Fp.displayName;const[Hv,dae]=Br("Tooltip",[Yu]),Vv=Yu(),AQ="TooltipProvider",MQ=700,i$="tooltip.open",[IQ,G2]=Hv(AQ),HA=e=>{const{__scopeTooltip:t,delayDuration:n=MQ,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,l]=Ke(!0),s=Ae(!1),u=Ae(0);return We((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),q(IQ,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:Ge((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:Ge((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:s,onPointerInTransitChange:Ge((e=>{s.current=e}),[]),disableHoverableContent:o},a)},K2="Tooltip",[jQ,Jp]=Hv(K2),VA=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,s=G2(K2,e.__scopeTooltip),u=Vv(t),[c,d]=Ke(null),f=Co(),p=Ae(0),h=i??s.disableHoverableContent,m=l??s.delayDuration,g=Ae(!1),[v=!1,y]=si({prop:r,defaultProp:o,onChange:e=>{e?(s.onOpen(),document.dispatchEvent(new CustomEvent(i$))):s.onClose(),null==a||a(e)}}),b=or((()=>v?g.current?"delayed-open":"instant-open":"closed"),[v]),w=Ge((()=>{window.clearTimeout(p.current),g.current=!1,y(!0)}),[y]),x=Ge((()=>{window.clearTimeout(p.current),y(!1)}),[y]),_=Ge((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{g.current=!0,y(!0)}),m)}),[m,y]);return We((()=>()=>window.clearTimeout(p.current)),[]),q(Dv,u,q(jQ,{scope:t,contentId:f,open:v,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:Ge((()=>{s.isOpenDelayed?_():w()}),[s.isOpenDelayed,_,w]),onTriggerLeave:Ge((()=>{h?x():window.clearTimeout(p.current)}),[x,h]),onOpen:w,onClose:x,disableHoverableContent:h},n))},pR="TooltipTrigger",GA=ye(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jp(pR,n),a=G2(pR,n),i=Vv(n),l=Nt(t,Ae(null),o.onTriggerChange),s=Ae(!1),u=Ae(!1),c=Ge((()=>s.current=!1),[]);return We((()=>()=>document.removeEventListener("pointerup",c)),[c]),q(_2,he({asChild:!0},i),q(dt.button,he({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:Xe(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)})),onPointerLeave:Xe(e.onPointerLeave,(()=>{o.onTriggerLeave(),u.current=!1})),onPointerDown:Xe(e.onPointerDown,(()=>{s.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:Xe(e.onFocus,(()=>{s.current||o.onOpen()})),onBlur:Xe(e.onBlur,o.onClose),onClick:Xe(e.onClick,o.onClose)})))})),KA="TooltipPortal",[LQ,FQ]=Hv(KA,{forceMount:void 0}),WQ=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Jp(KA,t);return q(LQ,{scope:t,forceMount:n},q(Ro,{present:n||a.open},q(sv,{asChild:!0,container:o},r)))},Tp="TooltipContent",YA=ye(((e,t)=>{const n=FQ(Tp,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Jp(Tp,e.__scopeTooltip);return q(Ro,{present:r||i.open},i.disableHoverableContent?q(XA,he({side:o},a,{ref:t})):q(BQ,he({side:o},a,{ref:t})))})),BQ=ye(((e,t)=>{const n=Jp(Tp,e.__scopeTooltip),r=G2(Tp,e.__scopeTooltip),o=Ae(null),a=Nt(t,o),[i,l]=Ke(null),{trigger:s,onClose:u}=n,c=o.current,{onPointerInTransitChange:d}=r,f=Ge((()=>{l(null),d(!1)}),[d]),p=Ge(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=XQ([...GQ(r,VQ(r,n.getBoundingClientRect())),...KQ(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return We((()=>()=>f()),[f]),We((()=>{if(s&&c){const e=e=>p(e,c),t=e=>p(e,s);return s.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{s.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[s,c,p,f]),We((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==s?void 0:s.contains(t))||(null==c?void 0:c.contains(t)),o=!YQ(n,i);r?f():o&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[s,c,i,u,f]),q(XA,he({},e,{ref:a}))})),[qQ,zQ]=Hv(K2,{isInside:!1}),XA=ye(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,s=Jp(Tp,n),u=Vv(n),{onClose:c}=s;return We((()=>(document.addEventListener(i$,c),()=>document.removeEventListener(i$,c))),[c]),We((()=>{if(s.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(s.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[s.trigger,c]),q(av,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},q($2,he({"data-state":s.stateAttribute},u,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),q(x$,null,r),q(qQ,{scope:n,isInside:!0},q(xK,{id:s.contentId,role:"tooltip"},o||r))))})),UQ="TooltipArrow",HQ=ye(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vv(n);return zQ(UQ,n).isInside?null:q(RV,he({},o,r,{ref:t}))}));function VQ(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function GQ(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function KQ(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function YQ(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e].x,l=t[e].y,s=t[a].x,u=t[a].y;l>r!=u>r&&n<(s-i)*(r-l)/(u-l)+i&&(o=!o)}return o}function XQ(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),QQ(t)}function QQ(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const ZQ=HA,JQ=VA,eZ=GA,tZ=WQ,QA=YA,nZ=HQ,ZA=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},rZ=e=>{if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)},oZ=e=>rZ(e)&&"type"in e&&"string"==typeof e.type,xt=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>oZ(t)&&t.type===e,t};xt("remoteReady"),xt("askLogin"),xt("reselectUser"),xt("requestLogout"),xt("setConfirmLeavePage"),xt("requestChangePath"),xt("wsSubscribe"),xt("wsUnSubscribe"),xt("hostStoreConnect"),xt("remoteLogin"),xt("remoteLogout"),xt("wsOnMessage"),xt("setRouterPath");const JA=xt("setDeviceType"),eM=xt("setDeviceWidth");xt("setUserError"),xt("setUserIsError"),xt("setUserPending"),xt("setUserSuccess"),xt("setUserData"),xt("updateAccountData"),xt("updateUser"),xt("addNotification"),xt("markNotification"),xt("setNotificationsError"),xt("setNotificationsList"),xt("setNotificationsPending"),xt("setNotificationsTotalCount"),xt("setNotificationsUnreadCount"),xt("acceptAllFollowRequests"),xt("resetNotificationsState"),xt("undoNotification"),xt("setInstanceInfo"),xt("setInstanceInfoPending"),xt("setInstanceInfoError"),xt("setPlatformSettings"),xt("setProfileSettings"),xt("setGroupData"),xt("setGroupLoading"),xt("requestLocalStorageGet"),xt("requestLocalStorageSet"),xt("requestLocalStorageRemove"),xt("requestLocalStorageClear"),xt("requestLocalStorageKeys"),xt("requestLocalStorageHas"),xt("sendLocalStorageResponse"),xt("sendLocalStorageChanged");const fp="8.48.0",xa=globalThis;function Y2(e,t,n){const r=xa,o=r.__SENTRY__=r.__SENTRY__||{},a=o[fp]=o[fp]||{};return a[e]||(a[e]=t())}const tM=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,iZ="Sentry Logger ",hR=["debug","info","warn","error","log","assert","trace"],mR={};function aZ(e){if(!("console"in xa))return e();const t=xa.console,n={},r=Object.keys(mR);r.forEach((e=>{const r=mR[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function sZ(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return tM?hR.forEach((n=>{t[n]=(...t)=>{e&&aZ((()=>{xa.console[n](`${iZ}[${n}]:`,...t)}))}})):hR.forEach((e=>{t[e]=()=>{}})),t}const Pg=Y2("logger",sZ);function X2(){return Q2(xa),xa}function Q2(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||fp,t[fp]=t[fp]||{}}const cZ=Object.prototype.toString;function lZ(e,t){return cZ.call(e)===`[object ${t}]`}function uZ(e){return lZ(e,"Object")}function dZ(e){return!(!e||!e.then||"function"!=typeof e.then)}function fZ(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{tM&&Pg.log(`Failed to add non-enumerable property "${t}" to object`,e)}}const nM=1e3;function rM(){return Date.now()/nM}function pZ(){const{performance:e}=xa;if(!e||!e.now)return rM;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/nM}const hZ=pZ();function Ru(){const e=xa,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function mZ(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||hZ(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Ru()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function gR(){return Ru()}function vR(){return Ru().substring(16)}function oM(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=oM(r[e],t[e],n-1));return r}(()=>{const{performance:e}=xa;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=o<t,i=e.timing&&e.timing.navigationStart,l="number"==typeof i?Math.abs(i+n-r):t;(a||l<t)&&(o<=l&&e.timeOrigin)})();const a$="_sentrySpan";function yR(e,t){t?fZ(e,a$,t):delete e[a$]}function bR(e){return e[a$]}const gZ=100;class Z2{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:gR(),spanId:vR()}}clone(){const e=new Z2;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,yR(e,bR(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&mZ(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof Np?[t.getScopeData(),t.getRequestSession()]:uZ(t)?[e,e.requestSession]:[],{tags:o,extra:a,user:i,contexts:l,level:s,fingerprint:u=[],propagationContext:c}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...a},this._contexts={...this._contexts,...l},i&&Object.keys(i).length&&(this._user=i),s&&(this._level=s),u.length&&(this._fingerprint=u),c&&(this._propagationContext=c),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,yR(this,void 0),this._attachments=[],this.setPropagationContext({traceId:gR()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:gZ;if(n<=0)return this;const r={timestamp:rM(),...e},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:bR(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=oM(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:vR(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:Ru();if(!this._client)return Pg.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:Ru();if(!this._client)return Pg.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Ru();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Pg.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Np=Z2;function vZ(){return Y2("defaultCurrentScope",(()=>new Np))}function yZ(){return Y2("defaultIsolationScope",(()=>new Np))}class bZ{constructor(e,t){let n,r;n=e||new Np,r=t||new Np,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return dZ(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Fu(){const e=Q2(X2());return e.stack=e.stack||new bZ(vZ(),yZ())}function wZ(e){return Fu().withScope(e)}function xZ(e,t){const n=Fu();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function wR(e){return Fu().withScope((()=>e(Fu().getIsolationScope())))}function _Z(){return{withIsolationScope:wR,withScope:wZ,withSetScope:xZ,withSetIsolationScope:(e,t)=>wR(t),getCurrentScope:()=>Fu().getScope(),getIsolationScope:()=>Fu().getIsolationScope()}}function iM(e){const t=Q2(e);return t.acs?t.acs:_Z()}function aM(){return iM(X2()).getCurrentScope()}function $Z(){return iM(X2()).getIsolationScope()}function SZ(e,t){return aM().captureException(e,void 0)}function CZ(e,t){const n={captureContext:t};return aM().captureMessage(e,void 0,n)}function EZ(e,t){$Z().setExtra(e,t)}const PZ=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return EZ("exceptionMessage",t),void SZ(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}CZ(t)},OZ=()=>"object"!=typeof window,RZ="wlsy",sM=()=>{try{return window.localStorage}catch(e){console.warn("Error getting window.localStorage storage",e)}},TZ=()=>{const e=new Set,t=sM();if(!t)return[];for(let n=0;n<(null==t?void 0:t.length);n+=1){const r=null==t?void 0:t.key(n);"string"==typeof r&&e.add(r)}return Array.from(e)},NZ=e=>{const t=`${RZ}`,n=e=>`${t}:${e}`,r=()=>TZ().filter((e=>e.startsWith(`${t}:`))),o=e=>e.slice(t.length+1),a=sM(),i=e=>{try{return null==a?void 0:a.getItem(n(e))}catch{return null}},l=(e,t)=>{try{null==a||a.setItem(n(e),String(t))}catch{return}};return{getItem:i,setItem:l,removeItem:e=>{try{null==a||a.removeItem(n(e))}catch{return}},clear:()=>{try{r().forEach((e=>null==a?void 0:a.removeItem(e)))}catch{return}},keys:()=>r().map(o),has:e=>null!==i(e),getJSON:e=>{const t=i(e);if(null==t)return null;try{return JSON.parse(t)}catch{return null}},setJSON:(e,t)=>{try{l(e,JSON.stringify(t))}catch{return}}}},xR=["debug","info","warn","error"],kZ=(e,t)=>{const n=xR.indexOf(e);return xR.indexOf(t)>=n},wg=(e,t,n,...r)=>{kZ(t,e)&&console.log(`[${e}] ${n}`,...r)},DZ=()=>NZ().getItem("logger_lvl"),AZ=(e=(OZ()?"info":DZ()||"warn"))=>{let t=e;return{debug:(e,...n)=>wg("debug",t,e,...n),info:(e,...n)=>wg("info",t,e,...n),warn:(e,...n)=>wg("warn",t,e,...n),error:(e,...n)=>(PZ(e,...n),wg("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}};AZ(),D3("requestMicroFrontendFetch"),D3("sendMicroFrontendFetchResponse");const MZ={deviceType:ZA(),deviceWidth:window.innerWidth},Gv=X8({name:"ui",initialState:MZ,reducers:{},extraReducers:e=>{e.addCase(JA,((e,{payload:t})=>{e.deviceType=t})),e.addCase(eM,((e,{payload:t})=>{e.deviceWidth=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectDeviceWidth:e=>e.deviceWidth,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var $x,_R,Sx,$R,Cx,SR,Ex,CR,Px,ER,Ox,PR,Rx,OR,Tx,RR,Nx,TR,kx,NR,Dx,kR,Ax,DR,Mx,AR,Ix,MR,jx,IR,Lx,jR,Fx,LR,Wx,FR,Bx,WR,qx,BR,zx,qR,Ux,zR,Hx,UR,Vx,HR,Gx,VR,Kx,GR,Yx,KR,Xx,YR,Qx,XR,Zx,QR,Jx,ZR,e_,JR,t_,e3,n_,t3,r_,n3,o_,r3,i_,o3,a_,i3,s_,a3,c_,s3,l_,c3;function cM(){if(_R)return $x;_R=1;var e=fN(),t=e&&new e;return $x=t}function lM(){if($R)return Sx;$R=1;var e=Hp(),t=cM();return Sx=t?function(e,n){return t.set(e,n),e}:e}function Kv(){if(SR)return Cx;SR=1;var e=Sv(),t=Go();return Cx=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),a=n.apply(o,r);return t(a)?a:o}},Cx}function IZ(){if(CR)return Ex;CR=1;var e=Kv(),t=zr();return Ex=function(n,r,o){var a=1&r,i=e(n);return function e(){return(this&&this!==t&&this instanceof e?i:n).apply(a?o:this,arguments)}},Ex}function uM(){if(ER)return Px;ER=1;var e=Math.max;return Px=function(t,n,r,o){for(var a=-1,i=t.length,l=r.length,s=-1,u=n.length,c=e(i-l,0),d=Array(u+c),f=!o;++s<u;)d[s]=n[s];for(;++a<l;)(f||a<i)&&(d[r[a]]=t[a]);for(;c--;)d[s++]=t[a++];return d}}function dM(){if(PR)return Ox;PR=1;var e=Math.max;return Ox=function(t,n,r,o){for(var a=-1,i=t.length,l=-1,s=r.length,u=-1,c=n.length,d=e(i-s,0),f=Array(d+c),p=!o;++a<d;)f[a]=t[a];for(var h=a;++u<c;)f[h+u]=n[u];for(;++l<s;)(p||a<i)&&(f[h+r[l]]=t[a++]);return f}}function jZ(){if(OR)return Rx;return OR=1,Rx=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function J2(){if(RR)return Tx;return RR=1,Tx=function(){}}function eS(){if(TR)return Nx;TR=1;var e=Sv(),t=J2();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,Nx=n}function fM(){if(NR)return kx;NR=1;var e=cM(),t=vN();return kx=e?function(t){return e.get(t)}:t}function LZ(){if(kR)return Dx;kR=1;return Dx={}}function FZ(){if(DR)return Ax;DR=1;var e=LZ(),t=Object.prototype.hasOwnProperty;return Ax=function(n){for(var r=n.name+"",o=e[r],a=t.call(e,r)?o.length:0;a--;){var i=o[a],l=i.func;if(null==l||l==n)return i.name}return r}}function pM(){if(AR)return Mx;AR=1;var e=Sv(),t=J2();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,Mx=n}function WZ(){if(MR)return Ix;MR=1;var e=eS(),t=pM(),n=$v();return Ix=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function BZ(){if(IR)return jx;IR=1;var e=eS(),t=pM(),n=J2(),r=qr(),o=To(),a=WZ(),i=Object.prototype.hasOwnProperty;function l(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(i.call(n,"__wrapped__"))return a(n)}return new t(n)}return l.prototype=n.prototype,l.prototype.constructor=l,jx=l}function qZ(){if(jR)return Lx;jR=1;var e=eS(),t=fM(),n=FZ(),r=BZ();return Lx=function(o){var a=n(o),i=r[a];if("function"!=typeof i||!(a in e.prototype))return!1;if(o===i)return!0;var l=t(i);return!!l&&o===l[0]}}function hM(){if(LR)return Fx;LR=1;var e=lM(),t=SN()(e);return Fx=t}function zZ(){if(FR)return Wx;FR=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return Wx=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function UZ(){if(WR)return Bx;WR=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return Bx=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function HZ(){if(BR)return qx;BR=1;var e=o2(),t=gN(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return qx=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function mM(){if(qR)return zx;qR=1;var e=zZ(),t=UZ(),n=e2(),r=HZ();return zx=function(o,a,i){var l=a+"";return n(o,t(l,r(e(l),i)))}}function gM(){if(zR)return Ux;zR=1;var e=qZ(),t=hM(),n=mM();return Ux=function(r,o,a,i,l,s,u,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var h=[r,o,l,p?s:void 0,p?u:void 0,p?void 0:s,p?void 0:u,c,d,f],m=a.apply(void 0,h);return e(r)&&t(m,h),m.placeholder=i,n(m,r,o)}}function vM(){if(UR)return Hx;return UR=1,Hx=function(e){return e.placeholder}}function VZ(){if(HR)return Vx;HR=1;var e=$v(),t=bv(),n=Math.min;return Vx=function(r,o){for(var a=r.length,i=n(o.length,a),l=e(r);i--;){var s=o[i];r[i]=t(s,a)?l[s]:void 0}return r}}function tS(){if(VR)return Gx;VR=1;var e="__lodash_placeholder__";return Gx=function(t,n){for(var r=-1,o=t.length,a=0,i=[];++r<o;){var l=t[r];(l===n||l===e)&&(t[r]=e,i[a++]=r)}return i}}function yM(){if(GR)return Kx;GR=1;var e=uM(),t=dM(),n=jZ(),r=Kv(),o=gM(),a=vM(),i=VZ(),l=tS(),s=zr();return Kx=function u(c,d,f,p,h,m,g,v,y,b){var w=128&d,x=1&d,_=2&d,O=24&d,k=512&d,S=_?void 0:r(c);return function D(){for(var C=arguments.length,E=Array(C),N=C;N--;)E[N]=arguments[N];if(O)var M=a(D),P=n(E,M);if(p&&(E=e(E,p,h,O)),m&&(E=t(E,m,g,O)),C-=P,O&&C<b){var j=l(E,M);return o(c,d,u,D.placeholder,f,E,j,v,y,b-C)}var T=x?f:this,A=_?T[c]:c;return C=E.length,v?E=i(E,v):k&&C>1&&E.reverse(),w&&y<C&&(E.length=y),this&&this!==s&&this instanceof D&&(A=S||r(A)),A.apply(T,E)}},Kx}function GZ(){if(KR)return Yx;KR=1;var e=J$(),t=Kv(),n=yM(),r=gM(),o=vM(),a=tS(),i=zr();return Yx=function(l,s,u){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,h=o(t);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:a(f,h);return(d-=m.length)<u?r(l,s,n,t.placeholder,void 0,f,m,void 0,void 0,u-d):e(this&&this!==i&&this instanceof t?c:l,this,f)}},Yx}function KZ(){if(YR)return Xx;YR=1;var e=J$(),t=Kv(),n=zr();return Xx=function(r,o,a,i){var l=1&o,s=t(r);return function t(){for(var o=-1,u=arguments.length,c=-1,d=i.length,f=Array(d+u),p=this&&this!==n&&this instanceof t?s:r;++c<d;)f[c]=i[c];for(;u--;)f[c++]=arguments[++o];return e(p,l?a:this,f)}},Xx}function YZ(){if(XR)return Qx;XR=1;var e=uM(),t=dM(),n=tS(),r="__lodash_placeholder__",o=128,a=Math.min;return Qx=function(i,l){var s=i[1],u=l[1],c=s|u,d=c<131,f=u==o&&8==s||u==o&&256==s&&i[7].length<=l[8]||384==u&&l[7].length<=l[8]&&8==s;if(!d&&!f)return i;1&u&&(i[2]=l[2],c|=1&s?0:4);var p=l[3];if(p){var h=i[3];i[3]=h?e(h,p,l[4]):p,i[4]=h?n(i[3],r):l[4]}return(p=l[5])&&(h=i[5],i[5]=h?t(h,p,l[6]):p,i[6]=h?n(i[5],r):l[6]),(p=l[7])&&(i[7]=p),u&o&&(i[8]=null==i[8]?l[8]:a(i[8],l[8])),null==i[9]&&(i[9]=l[9]),i[0]=l[0],i[1]=c,i}}function nS(){if(QR)return Zx;QR=1;var e=lM(),t=IZ(),n=GZ(),r=yM(),o=KZ(),a=fM(),i=YZ(),l=hM(),s=mM(),u=kN(),c=Math.max;return Zx=function(d,f,p,h,m,g,v,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=h?h.length:0;if(w||(f&=-97,h=m=void 0),v=void 0===v?v:c(u(v),0),y=void 0===y?y:u(y),w-=m?m.length:0,64&f){var x=h,_=m;h=m=void 0}var O=b?void 0:a(d),k=[d,f,p,h,m,x,_,g,v,y];if(O&&i(k,O),d=k[0],f=k[1],p=k[2],h=k[3],m=k[4],!(y=k[9]=void 0===k[9]?b?0:d.length:c(k[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)S=8==f||16==f?n(d,f,y):32!=f&&33!=f||m.length?r.apply(void 0,k):o(d,f,p,h);else var S=t(d,f,p);return s((O?e:l)(S,k),d,f)}}function XZ(){if(ZR)return Jx;ZR=1;var e=nS();return Jx=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function QZ(){if(JR)return e_;JR=1;var e=IN();return e_=function(t){return e(t,4)}}function ZZ(){if(e3)return t_;e3=1;var e=nS();function t(n,r,o){var a=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return a.placeholder=t.placeholder,a}return t.placeholder={},t_=t}function JZ(){if(t3)return n_;t3=1;var e=Ca(),t=To(),n=aq();return n_=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function eJ(){if(n3)return r_;n3=1;var e=Up(),t=To();return r_=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function tJ(){if(r3)return o_;r3=1;var e=IN(),t=Q$();return o_=function(n){return t("function"==typeof n?n:e(n,1))}}function nJ(){if(o3)return i_;o3=1;var e=nS(),t=Pq(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return i_=n}function rJ(){if(i3)return a_;i3=1;var e=j$(),t=$v(),n=qr(),r=Vu(),o=IT(),a=Bp(),i=L$();return a_=function(l){return n(l)?e(l,a):r(l)?[l]:t(o(i(l)))}}function oJ(){return a3||(a3=1,s_={ary:XZ(),assign:AN(),clone:QZ(),curry:ZZ(),forEach:o2(),isArray:qr(),isError:JZ(),isFunction:fv(),isWeakMap:eJ(),iteratee:tJ(),keys:lN(),rearg:nJ(),toInteger:kN(),toPath:rJ()}),s_}function iJ(){if(s3)return c_;s3=1;var e=M3(),t=oJ();return c_=function(n,r,o){return e(t,n,r,o)}}function aJ(){if(c3)return l_;c3=1;var e=iJ()("debounce",TN());return e.placeholder=A3(),l_=e}var sJ=aJ();const cJ=Oo(sJ);function l3(e,t,n=window){const r=Ae(t);We((()=>{r.current=t}),[t]),We((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const lJ=e=>{const t=cJ(150)(e);l3("resize",t),l3("orientationchange",t)},fae=()=>{const e=Q8();lJ((()=>{const t=ZA();e(JA(t)),e(eM(window.innerWidth))}))},pae=()=>tv(Gv.selectors.selectDeviceType),uJ=()=>tv(Gv.selectors.selectIsMobile),hae=()=>tv(Gv.selectors.selectIsTablet),mae=()=>tv(Gv.selectors.selectIsDesktop);function u3({className:e,...t}){return D.jsx("div",{className:te("animate-pulse rounded-md bg-muted",e),...t})}const dJ="sidebar_state",fJ=604800,pJ="12rem",hJ="18rem",mJ="2rem",gJ="b",bM=O.createContext(null);function Yv(){const e=O.useContext(bM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const vJ=O.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},l)=>{const s=uJ(),[u,c]=O.useState(!1),[d,f]=O.useState(e),p=t??d,h=O.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${dJ}=${t}; path=/; max-age=${fJ}`}),[n,p]),m=O.useCallback((()=>s?c((e=>!e)):h((e=>!e))),[s,h,c]);O.useEffect((()=>{const e=e=>{e.key===gJ&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[m]);const g=p?"expanded":"collapsed",v=O.useMemo((()=>({state:g,open:p,setOpen:h,isMobile:s,openMobile:u,setOpenMobile:c,toggleSidebar:m})),[g,p,h,s,u,c,m]);return D.jsx(bM.Provider,{value:v,children:D.jsx(HA,{delayDuration:0,children:D.jsx("div",{style:{"--sidebar-width":pJ,"--sidebar-width-icon":mJ,...o},className:te("group/sidebar-wrapper flex min-h-svh w-full bg-gray-100 has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:a})})})}));vJ.displayName="SidebarProvider";const yJ=O.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},i)=>{const{isMobile:l,state:s,openMobile:u,setOpenMobile:c}=Yv();return"none"===n?D.jsx("div",{className:te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):l?D.jsx(TQ,{open:u,onOpenChange:c,children:D.jsxs(BA,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":hJ},side:e,children:[D.jsxs(qA,{className:"sr-only",children:[D.jsx(zA,{children:"Sidebar"}),D.jsx(UA,{children:"Displays the mobile sidebar."})]}),D.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):D.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":s,"data-collapsible":"collapsed"===s?n:"","data-variant":t,"data-side":e,children:[D.jsx("div",{className:te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),D.jsx("div",{className:te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:D.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));yJ.displayName="Sidebar";const bJ=O.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=Yv();return D.jsx(Is,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:te("size-6 text-gray-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?D.jsx(C7,{size:16}):D.jsx($7,{size:16})})}));bJ.displayName="SidebarTrigger";const wJ=O.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Yv();return D.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));wJ.displayName="SidebarRail";const xJ=O.forwardRef((({className:e,...t},n)=>D.jsx("main",{ref:n,className:te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));xJ.displayName="SidebarInset";const _J=O.forwardRef((({className:e,...t},n)=>D.jsx(Wc,{ref:n,"data-sidebar":"input",className:te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));_J.displayName="SidebarInput";const $J=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"header",className:te("flex flex-col gap-xxs p-xs",e),...t})));$J.displayName="SidebarHeader";const SJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"footer",className:te("flex flex-col gap-2 p-2",e),...t})));SJ.displayName="SidebarFooter";const CJ=O.forwardRef((({className:e,...t},n)=>D.jsx(N2,{ref:n,"data-sidebar":"separator",className:te("mx-2 w-auto bg-sidebar-border",e),...t})));CJ.displayName="SidebarSeparator";const EJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"content",className:te("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));EJ.displayName="SidebarContent";const PJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"group",className:te("relative flex w-full min-w-0 flex-col pt-xs",e),...t})));PJ.displayName="SidebarGroup";const OJ=O.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?Ms:"div";return D.jsx(o,{ref:r,"data-sidebar":"group-label",className:te("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-gray-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));OJ.displayName="SidebarGroupLabel";const RJ=O.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?Ms:"button";return D.jsx(o,{ref:r,"data-sidebar":"group-action",className:te("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));RJ.displayName="SidebarGroupAction";const TJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"group-content",className:te("w-full text-sm",e),...t})));TJ.displayName="SidebarGroupContent";const NJ=O.forwardRef((({className:e,...t},n)=>D.jsx("ul",{ref:n,"data-sidebar":"menu",className:te("flex w-full min-w-0 flex-col p-xs font-semibold text-gray-700 [&_svg]:size-4",e),...t})));NJ.displayName="SidebarMenu";const kJ=O.forwardRef((({className:e,...t},n)=>D.jsx("li",{ref:n,"data-sidebar":"menu-item",className:te("group/menu-item relative",e),...t})));kJ.displayName="SidebarMenuItem";const DJ=$a("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),AJ=O.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},l)=>{const s=e?Ms:"button",{isMobile:u,state:c}=Yv(),d=D.jsx(s,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:te(DJ({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),D.jsxs(VA,{children:[D.jsx(GA,{asChild:!0,children:d}),D.jsx(YA,{side:"right",align:"center",hidden:"collapsed"!==c||u,...o})]})):d}));AJ.displayName="SidebarMenuButton";const MJ=O.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?Ms:"button";return D.jsx(a,{ref:o,"data-sidebar":"menu-action",className:te("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));MJ.displayName="SidebarMenuAction";const IJ=O.forwardRef((({className:e,...t},n)=>D.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:te("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));IJ.displayName="SidebarMenuBadge";const jJ=O.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=O.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return D.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:te("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&D.jsx(u3,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),D.jsx(u3,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));jJ.displayName="SidebarMenuSkeleton";const LJ=O.forwardRef((({className:e,...t},n)=>D.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:te("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));LJ.displayName="SidebarMenuSub";const FJ=O.forwardRef((({...e},t)=>D.jsx("li",{ref:t,...e})));FJ.displayName="SidebarMenuSubItem";const WJ=O.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?Ms:"a";return D.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:te("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-gray-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));WJ.displayName="SidebarMenuSubButton";const wM="Switch",[BJ,gae]=Br(wM),[qJ,zJ]=BJ(wM),UJ=ye(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:s="on",onCheckedChange:u,...c}=e,[d,f]=Ke(null),p=Nt(t,(e=>f(e))),h=Ae(!1),m=!d||!!d.closest("form"),[g=!1,v]=si({prop:o,defaultProp:a,onChange:u});return q(qJ,{scope:n,checked:g,disabled:l},q(dt.button,he({type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":xM(g),"data-disabled":l?"":void 0,disabled:l,value:s},c,{ref:p,onClick:Xe(e.onClick,(e=>{v((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&q(GJ,{control:d,bubbles:!h.current,name:r,value:s,checked:g,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),HJ="SwitchThumb",VJ=ye(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=zJ(HJ,n);return q(dt.span,he({"data-state":xM(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),GJ=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=Ae(null),i=Cv(n),l=Ev(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),q("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function xM(e){return e?"checked":"unchecked"}const _M=UJ,KJ=VJ,YJ=O.forwardRef((({className:e,...t},n)=>D.jsx(_M,{className:te("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-gray-200","disabled:cursor-not-allowed disabled:!bg-gray-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-gray-300",e),...t,ref:n,children:D.jsx(KJ,{className:te("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-gray-300":t.disabled})})})));YJ.displayName=_M.displayName;const $M="Tabs",[XJ,vae]=Br($M,[Xu]),SM=Xu(),[QJ,rS]=XJ($M),ZJ=ye(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:s="automatic",...u}=e,c=Gp(l),[d,f]=si({prop:r,onChange:o,defaultProp:a});return q(QJ,{scope:n,baseId:Co(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:s},q(dt.div,he({dir:c,"data-orientation":i},u,{ref:t})))})),JJ="TabsList",eee=ye(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=rS(JJ,n),i=SM(n);return q(C2,he({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),q(dt.div,he({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),tee="TabsTrigger",nee=ye(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=rS(tee,n),l=SM(n),s=CM(i.baseId,r),u=EM(i.baseId,r),c=r===i.value;return q(E2,he({asChild:!0},l,{focusable:!o,active:c}),q(dt.button,he({type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:s},a,{ref:t,onMouseDown:Xe(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:Xe(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:Xe(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),ree="TabsContent",oee=ye(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=rS(ree,n),s=CM(l.baseId,r),u=EM(l.baseId,r),c=r===l.value,d=Ae(c);return We((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),q(Ro,{present:o||c},(({present:n})=>q(dt.div,he({"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":s,hidden:!n,id:u,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&a)))}));function CM(e,t){return`${e}-trigger-${t}`}function EM(e,t){return`${e}-content-${t}`}const iee=ZJ,PM=eee,OM=nee,RM=oee,yae=iee,TM=O.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>D.jsx(PM,{ref:r,"data-testid":"tabsList",className:t?te("inline-flex w-full items-center justify-start gap-s p-none text-muted-foreground","relative after:absolute after:bottom-0 after:left-0 after:h-[1px] after:w-full after:bg-gray-200",e):e,...n})));TM.displayName=PM.displayName;const NM=O.forwardRef((({className:e,children:t,isFullWidthTab:n,...r},o)=>D.jsx(OM,{ref:o,asChild:!0,className:e??te("inline-flex items-center justify-center whitespace-nowrap text-base","z-2 transition-background h-m cursor-pointer focus-visible:outline-none","font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","group relative text-gray-500 hover:[&_svg]:fill-gray-900","after:absolute after:bottom-0 after:left-0 after:z-[1] after:h-0.5 after:w-full data-[state=active]:after:bg-gray-900",{"flex-1":n}),...r,children:t})));NM.displayName=OM.displayName;const aee=O.forwardRef((({className:e,...t},n)=>D.jsx(RM,{ref:n,className:te("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));aee.displayName=RM.displayName;const see=({icon:e,label:t,value:n,href:r,asChild:o,className:a,isFullWidthTab:i,disabled:l})=>{const s=D.jsxs("span",{className:"flex items-center justify-center gap-xxs group-hover:text-gray-900 group-data-[state=active]:text-gray-900 [&_svg]:pointer-events-none",children:[e,t]});return D.jsx(NM,{value:n,className:a,disabled:l,asChild:o,isFullWidthTab:i,children:r?D.jsx(Z8,{to:r,className:"flex h-full w-full items-center justify-center",children:s}):s})},bae=({items:e,children:t,className:n})=>D.jsxs(TM,{className:te("no-scrollbar z-0 mt-m overflow-x-auto px-m",n),children:[e.map((t=>D.jsx(see,{isFullWidthTab:e.length<=3,...t},t.value))),t]}),cee=O.forwardRef((({className:e,...t},n)=>D.jsx("table",{ref:n,className:te("w-full caption-bottom text-sm",e),...t})));cee.displayName="Table";const lee=O.forwardRef((({className:e,...t},n)=>D.jsx("thead",{ref:n,className:te("[&_tr]:border-b",e),...t})));lee.displayName="TableHeader";const uee=O.forwardRef((({className:e,...t},n)=>D.jsx("tbody",{ref:n,className:te("[&_tr:last-child]:border-0",e),...t})));uee.displayName="TableBody";const dee=O.forwardRef((({className:e,...t},n)=>D.jsx("tfoot",{ref:n,className:te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));dee.displayName="TableFooter";const fee=O.forwardRef((({className:e,...t},n)=>D.jsx("tr",{ref:n,className:te("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted","[&:hover_button[data-disabled]]:!bg-gray-200 [&:hover_button[disabled]]:!bg-gray-200",e),...t})));fee.displayName="TableRow";const pee=O.forwardRef((({className:e,...t},n)=>D.jsx("th",{ref:n,className:te("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-gray-200 text-sm text-gray-500 [&:not(:last-child)]:border-r",e),...t})));pee.displayName="TableHead";const hee=O.forwardRef((({className:e,...t},n)=>D.jsx("td",{ref:n,className:te("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-gray-200 text-base text-gray-700 [&:not(:last-child)]:border-r",e),...t})));hee.displayName="TableCell";const mee=O.forwardRef((({className:e,...t},n)=>D.jsx("caption",{ref:n,className:te("mt-s text-sm text-muted-foreground",e),...t})));mee.displayName="TableCaption";const gee=(e,t)=>te("flex w-full rounded-m px-s py-xs text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out placeholder:inherit placeholder:text-gray-400 placeholder:text-muted-foreground hover:outline-2 hover:outline-gray-400 focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-gray-300 disabled:outline-gray-200",{"bg-red_30_17 outline-red-dark":!!e},t),vee=O.forwardRef((({className:e,...t},n)=>{const{error:r}=Ls();return D.jsx("textarea",{className:gee(!!r,e),ref:n,...t})}));vee.displayName="Textarea";const pp={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,134,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,250,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,221],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:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],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,50]},kM=Object.create(null);for(const e in pp)Object.hasOwn(pp,e)&&(kM[pp[e]]=e);const Hn={to:{},get:{}};function $s(e,t,n){return Math.min(Math.max(t,e),n)}function xg(e){const t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}Hn.get=function(e){let t,n;switch(e.slice(0,3).toLowerCase()){case"hsl":t=Hn.get.hsl(e),n="hsl";break;case"hwb":t=Hn.get.hwb(e),n="hwb";break;default:t=Hn.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},Hn.get.rgb=function(e){if(!e)return null;let t,n,r,o=[0,0,0,1];if(t=e.match(/^#([a-f\d]{6})([a-f\d]{2})?$/i)){for(r=t[2],t=t[1],n=0;n<3;n++){const e=2*n;o[n]=Number.parseInt(t.slice(e,e+2),16)}r&&(o[3]=Number.parseInt(r,16)/255)}else if(t=e.match(/^#([a-f\d]{3,4})$/i)){for(t=t[1],r=t[3],n=0;n<3;n++)o[n]=Number.parseInt(t[n]+t[n],16);r&&(o[3]=Number.parseInt(r+r,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=Number.parseInt(t[n+1],10);t[4]&&(o[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:Object.hasOwn(pp,t[1])?(o=pp[t[1]],o[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*Number.parseFloat(t[n+1]));t[4]&&(o[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=$s(o[n],0,255);return o[3]=$s(o[3],0,1),o},Hn.get.hsl=function(e){if(!e)return null;const t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,$s(Number.parseFloat(t[2]),0,100),$s(Number.parseFloat(t[3]),0,100),$s(Number.isNaN(e)?1:e,0,1)]}return null},Hn.get.hwb=function(e){if(!e)return null;const t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,$s(Number.parseFloat(t[2]),0,100),$s(Number.parseFloat(t[3]),0,100),$s(Number.isNaN(e)?1:e,0,1)]}return null},Hn.to.hex=function(...e){return"#"+xg(e[0])+xg(e[1])+xg(e[2])+(e[3]<1?xg(Math.round(255*e[3])):"")},Hn.to.rgb=function(...e){return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},Hn.to.rgb.percent=function(...e){const t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},Hn.to.hsl=function(...e){return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Hn.to.hwb=function(...e){let t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Hn.to.keyword=function(...e){return kM[e.slice(0,3)]};const kp={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,134,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,250,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,221],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:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],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,50]},DM={};for(const e of Object.keys(kp))DM[kp[e]]=e;const ze={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},ya=(6/29)**3;function Tu(e){const t=e>.0031308?1.055*e**.4166666666666667-.055:12.92*e;return Math.min(Math.max(0,t),1)}function Nu(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}for(const e of Object.keys(ze)){if(!("channels"in ze[e]))throw new Error("missing channels property: "+e);if(!("labels"in ze[e]))throw new Error("missing channel labels property: "+e);if(ze[e].labels.length!==ze[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=ze[e];delete ze[e].channels,delete ze[e].labels,Object.defineProperty(ze[e],"channels",{value:t}),Object.defineProperty(ze[e],"labels",{value:n})}function yee(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}function bee(){const e={},t=Object.keys(ze);for(let{length:n}=t,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function wee(e){const t=bee(),n=[e];for(t[e].distance=0;n.length>0;){const e=n.pop(),r=Object.keys(ze[e]);for(let{length:o}=r,a=0;a<o;a++){const o=r[a],i=t[o];-1===i.distance&&(i.distance=t[e].distance+1,i.parent=e,n.unshift(o))}}return t}function xee(e,t){return function(n){return t(e(n))}}function _ee(e,t){const n=[t[e].parent,e];let r=ze[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),r=xee(ze[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}function $ee(e){const t=wee(e),n={},r=Object.keys(t);for(let{length:e}=r,o=0;o<e;o++){const e=r[o];null!==t[e].parent&&(n[e]=_ee(e,t))}return n}ze.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=a-o;let l,s;switch(a){case o:l=0;break;case t:l=(n-r)/i;break;case n:l=2+(r-t)/i;break;case r:l=4+(t-n)/i}l=Math.min(60*l,360),l<0&&(l+=360);const u=(o+a)/2;return s=a===o?0:u<=.5?i/(a+o):i/(2-a-o),[l,100*s,100*u]},ze.rgb.hsv=function(e){let t,n,r,o,a;const i=e[0]/255,l=e[1]/255,s=e[2]/255,u=Math.max(i,l,s),c=u-Math.min(i,l,s),d=function(e){return(u-e)/6/c+.5};if(0===c)o=0,a=0;else{switch(a=c/u,t=d(i),n=d(l),r=d(s),u){case i:o=r-n;break;case l:o=1/3+t-r;break;case s:o=2/3+n-t}o<0?o+=1:o>1&&(o-=1)}return[360*o,100*a,100*u]},ze.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=ze.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,100*a,100*r]},ze.rgb.oklab=function(e){const t=Nu(e[0]/255),n=Nu(e[1]/255),r=Nu(e[2]/255),o=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),i=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r);return[100*(.2104542553*o+.793617785*a-.0040720468*i),100*(1.9779984951*o-2.428592205*a+.4505937099*i),100*(.0259040371*o+.7827717662*a-.808675766*i)]},ze.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},ze.rgb.keyword=function(e){const t=DM[e];if(t)return t;let n,r=Number.POSITIVE_INFINITY;for(const t of Object.keys(kp)){const o=yee(e,kp[t]);o<r&&(r=o,n=t)}return n},ze.keyword.rgb=function(e){return kp[e]},ze.rgb.xyz=function(e){const t=Nu(e[0]/255),n=Nu(e[1]/255),r=Nu(e[2]/255);return[100*(.4124564*t+.3575761*n+.1804375*r),100*(.2126729*t+.7151522*n+.072175*r),100*(.0193339*t+.119192*n+.9503041*r)]},ze.rgb.lab=function(e){const t=ze.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>ya?n**(1/3):7.787*n+16/116,r=r>ya?r**(1/3):7.787*r+16/116,o=o>ya?o**(1/3):7.787*o+16/116;return[116*r-16,500*(n-r),200*(r-o)]},ze.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a;if(0===n)return a=255*r,[a,a,a];const i=r<.5?r*(1+n):r+n-r*n,l=2*r-i,s=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,a=6*o<1?l+6*(i-l)*o:2*o<1?i:3*o<2?l+(i-l)*(2/3-o)*6:l,s[e]=255*a;return s},ze.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;return[t,100*(0===r?2*o/(a+o):2*n/(r+n)),100*((r+n)/2)]},ze.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),i=255*r*(1-n),l=255*r*(1-n*a),s=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,s,i];case 1:return[l,r,i];case 2:return[i,r,s];case 3:return[i,l,r];case 4:return[s,i,r];case 5:return[r,i,l]}},ze.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,i;i=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,i/=2,[t,100*a,100*i]},ze.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const i=Math.floor(6*t),l=1-r;a=6*t-i,1&i&&(a=1-a);const s=n+a*(l-n);let u,c,d;switch(i){default:case 6:case 0:u=l,c=s,d=n;break;case 1:u=s,c=l,d=n;break;case 2:u=n,c=l,d=s;break;case 3:u=n,c=s,d=l;break;case 4:u=s,c=n,d=l;break;case 5:u=l,c=n,d=s}return[255*u,255*c,255*d]},ze.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},ze.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,i;return o=3.2404542*t+-1.5371385*n+-.4985314*r,a=-.969266*t+1.8760108*n+.041556*r,i=.0556434*t+-.2040259*n+1.0572252*r,o=Tu(o),a=Tu(a),i=Tu(i),[255*o,255*a,255*i]},ze.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>ya?t**(1/3):7.787*t+16/116,n=n>ya?n**(1/3):7.787*n+16/116,r=r>ya?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},ze.xyz.oklab=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=Math.cbrt(.8189330101*t+.3618667424*n-.1288597137*r),a=Math.cbrt(.0329845436*t+.9293118715*n+.0361456387*r),i=Math.cbrt(.0482003018*t+.2643662691*n+.633851707*r);return[100*(.2104542553*o+.793617785*a-.0040720468*i),100*(1.9779984951*o-2.428592205*a+.4505937099*i),100*(.0259040371*o+.7827717662*a-.808675766*i)]},ze.oklab.oklch=function(e){return ze.lab.lch(e)},ze.oklab.xyz=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=(.999999998*t+.396337792*n+.215803758*r)**3,a=(1.000000008*t-.105561342*n-.063854175*r)**3,i=(1.000000055*t-.089484182*n-1.291485538*r)**3;return[100*(1.227013851*o-.55779998*a+.281256149*i),100*(-.040580178*o+1.11225687*a-.071676679*i),100*(-.076381285*o-.421481978*a+1.58616322*i)]},ze.oklab.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=(t+.3963377774*n+.2158037573*r)**3,a=(t-.1055613458*n-.0638541728*r)**3,i=(t-.0894841775*n-1.291485548*r)**3;return[255*Tu(4.0767416621*o-3.3077115913*a+.2309699292*i),255*Tu(-1.2684380046*o+2.6097574011*a-.3413193965*i),255*Tu(-.0041960863*o-.7034186147*a+1.707614701*i)]},ze.oklch.oklab=function(e){return ze.lch.lab(e)},ze.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,a=t**3,i=r**3;return n=o>ya?o:(n-16/116)/7.787,t=a>ya?a:(t-16/116)/7.787,r=i>ya?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},ze.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},ze.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},ze.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=null===t?ze.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let i=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===a&&(i+=60),i},ze.hsv.ansi16=function(e){return ze.rgb.ansi16(ze.hsv.rgb(e),e[2])},ze.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t>>4==n>>4&&n>>4==r>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},ze.ansi16.rgb=function(e){let t=(e=e[0])%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(Math.trunc(e>50)+1);return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},ze.ansi256.rgb=function(e){if((e=e[0])>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},ze.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".slice(t.length)+t},ze.hex.rgb=function(e){const t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=[...n].map((e=>e+e)).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},ze.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),i=o-a;let l;return l=i<=0?0:o===t?(n-r)/i%6:o===n?2+(r-t)/i:4+(t-n)/i,l/=6,l%=1,[360*l,100*i,100*(i<1?a/(1-i):0)]},ze.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},ze.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},ze.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],a=t%1*6,i=a%1,l=1-i;let s=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return s=(1-n)*r,[255*(n*o[0]+s),255*(n*o[1]+s),255*(n*o[2]+s)]},ze.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},ze.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},ze.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},ze.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},ze.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},ze.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},ze.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},ze.gray.hsl=function(e){return[0,0,e[0]]},ze.gray.hsv=ze.gray.hsl,ze.gray.hwb=function(e){return[0,100,e[0]]},ze.gray.cmyk=function(e){return[0,0,0,e[0]]},ze.gray.lab=function(e){return[e[0],0,0]},ze.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(n.length)+n},ze.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const rr={},See=Object.keys(ze);function Cee(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function Eee(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let{length:e}=r,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}for(const e of See){rr[e]={},Object.defineProperty(rr[e],"channels",{value:ze[e].channels}),Object.defineProperty(rr[e],"labels",{value:ze[e].labels});const t=$ee(e),n=Object.keys(t);for(const r of n){const n=t[r];rr[e][r]=Eee(n),rr[e][r].raw=Cee(n)}}const AM=["keyword","gray","hex"],s$={};for(const e of Object.keys(rr))s$[[...rr[e].labels].sort().join("")]=e;const hp={};function nn(e,t){if(!(this instanceof nn))return new nn(e,t);if(t&&t in AM&&(t=null),t&&!(t in rr))throw new Error("Unknown model: "+t);let n,r;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof nn)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=Hn.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,r=rr[this.model].channels,this.color=t.value.slice(0,r),this.valpha="number"==typeof t.value[r]?t.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=rr[this.model].channels;const n=Array.prototype.slice.call(e,0,r);this.color=c$(n,r),this.valpha="number"==typeof e[r]?e[r]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const r=t.sort().join("");if(!(r in s$))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=s$[r];const{labels:o}=rr[this.model],a=[];for(n=0;n<o.length;n++)a.push(e[o[n]]);this.color=c$(a)}if(hp[this.model])for(r=rr[this.model].channels,n=0;n<r;n++){const e=hp[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}nn.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Hn.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const n=1===t.valpha?t.color:[...t.color,this.valpha];return Hn.to[t.model](...n)},percentString(e){const t=this.rgb().round("number"==typeof e?e:1),n=1===t.valpha?t.color:[...t.color,this.valpha];return Hn.to.rgb.percent(...n)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=rr[this.model],{labels:n}=rr[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new nn([...this.color.map(Oee(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new nn([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:yn("rgb",0,qn(255)),green:yn("rgb",1,qn(255)),blue:yn("rgb",2,qn(255)),hue:yn(["hsl","hsv","hsl","hwb","hcg"],0,(e=>(e%360+360)%360)),saturationl:yn("hsl",1,qn(100)),lightness:yn("hsl",2,qn(100)),saturationv:yn("hsv",1,qn(100)),value:yn("hsv",2,qn(100)),chroma:yn("hcg",1,qn(100)),gray:yn("hcg",2,qn(100)),white:yn("hwb",1,qn(100)),wblack:yn("hwb",2,qn(100)),cyan:yn("cmyk",0,qn(100)),magenta:yn("cmyk",1,qn(100)),yellow:yn("cmyk",2,qn(100)),black:yn("cmyk",3,qn(100)),x:yn("xyz",0,qn(95.047)),y:yn("xyz",1,qn(100)),z:yn("xyz",2,qn(108.833)),l:yn("lab",0,qn(100)),a:yn("lab",1),b:yn("lab",2),keyword(e){return void 0!==e?new nn(e):rr[this.model].keyword(this.color)},hex(e){return void 0!==e?new nn(e):Hn.to.hex(...this.rgb().round().color)},hexa(e){if(void 0!==e)return new nn(e);const t=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),Hn.to.hex(...t)+n},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return nn.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,a=2*o-1,i=n.alpha()-r.alpha(),l=((a*i==-1?a:(a+i)/(1+a*i))+1)/2,s=1-l;return nn.rgb(l*n.red()+s*r.red(),l*n.green()+s*r.green(),l*n.blue()+s*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(const e of Object.keys(rr)){if(AM.includes(e))continue;const{channels:t}=rr[e];nn.prototype[e]=function(...t){return this.model===e?new nn(this):t.length>0?new nn(t,e):new nn([...Ree(rr[this.model][e].raw(this.color)),this.valpha],e)},nn[e]=function(...n){let r=n[0];return"number"==typeof r&&(r=c$(n,t)),new nn(r,e)}}function Pee(e,t){return Number(e.toFixed(t))}function Oee(e){return function(t){return Pee(t,e)}}function yn(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(hp[r]||(hp[r]=[]))[t]=n;return e=e[0],function(r){let o;return void 0!==r?(n&&(r=n(r)),o=this[e](),o.color[t]=r,o):(o=this[e]().color[t],n&&(o=n(o)),o)}}function qn(e){return function(t){return Math.max(0,Math.min(e,t))}}function Ree(e){return Array.isArray(e)?e:[e]}function c$(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}function MM(e,[t,n]){return Math.min(n,Math.max(t,e))}function Eu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function d3(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function IM(...e){return t=>{let n=!1;const r=e.map((e=>{const r=d3(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():d3(e[t],null)}}}}function ks(...e){return O.useCallback(IM(...e),e)}function jM(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>O.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return O.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=O.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,s=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=O.useMemo((()=>l),Object.values(l));return D.jsx(s.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const s=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,u=O.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Tee(r,...t)]}function Tee(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return O.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var LM=null!=globalThis&&globalThis.document?O.useLayoutEffect:()=>{},Nee=O[" useInsertionEffect ".trim().toString()]||LM;function kee({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=Dee({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:o;{const t=O.useRef(void 0!==e);O.useEffect((()=>{const e=t.current;e!==l&&console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=l}),[l,r])}return[s,O.useCallback((t=>{var n;if(l){const r=Aee(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else a(t)}),[l,e,a,i])]}function Dee({defaultProp:e,onChange:t}){const[n,r]=O.useState(e),o=O.useRef(n),a=O.useRef(t);return Nee((()=>{a.current=t}),[t]),O.useEffect((()=>{var e;o.current!==n&&(null==(e=a.current)||e.call(a,n),o.current=n)}),[n,o]),[n,r,a]}function Aee(e){return"function"==typeof e}var Mee=O.createContext(void 0);function Iee(e){const t=O.useContext(Mee);return e||t||"ltr"}function jee(e){const t=O.useRef({value:e,previous:e});return O.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function Lee(e){const[t,n]=O.useState(void 0);return LM((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}function l$(e){const t=Fee(e),n=O.forwardRef(((e,n)=>{const{children:r,...o}=e,a=O.Children.toArray(r),i=a.find(Bee);if(i){const e=i.props.children,r=a.map((t=>t===i?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t));return D.jsx(t,{...o,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return D.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Fee(e){const t=O.forwardRef(((e,t)=>{const{children:n,...r}=e;if(O.isValidElement(n)){const e=zee(n),o=qee(r,n.props);return n.type!==O.Fragment&&(o.ref=t?IM(t,e):e),O.cloneElement(n,o)}return O.Children.count(n)>1?O.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Wee=Symbol("radix.slottable");function Bee(e){return O.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Wee}function qee(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function zee(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Uee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],eh=Uee.reduce(((e,t)=>{const n=l$(`Primitive.${t}`),r=O.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Hee(e){const t=e+"CollectionProvider",[n,r]=jM(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=re.useRef(null),a=re.useRef(new Map).current;return D.jsx(o,{scope:t,itemMap:a,collectionRef:r,children:n})};i.displayName=t;const l=e+"CollectionSlot",s=l$(l),u=re.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=ks(t,a(l,n).collectionRef);return D.jsx(s,{ref:o,children:r})}));u.displayName=l;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=l$(c),p=re.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=re.useRef(null),l=ks(t,i),s=a(c,n);return re.useEffect((()=>(s.itemMap.set(i,{ref:i,...o}),()=>{s.itemMap.delete(i)}))),D.jsx(f,{[d]:"",ref:l,children:r})}));return p.displayName=c,[{Provider:i,Slot:u,ItemSlot:p},function(t){const n=a(e+"CollectionConsumer",t);return re.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}var FM=["PageUp","PageDown"],WM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],BM={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ju="Slider",[u$,Vee,Gee]=Hee(Ju),[qM,wae]=jM(Ju,[Gee]),[Kee,Xv]=qM(Ju),zM=O.forwardRef(((e,t)=>{const{name:n,min:r=0,max:o=100,step:a=1,orientation:i="horizontal",disabled:l=!1,minStepsBetweenThumbs:s=0,defaultValue:u=[r],value:c,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:h,...m}=e,g=O.useRef(new Set),v=O.useRef(0),y="horizontal"===i?Yee:Xee,[b=[],w]=kee({prop:c,defaultProp:u,onChange:e=>{var t;null==(t=[...g.current][v.current])||t.focus(),d(e)}}),x=O.useRef(b);function _(e,t,{commit:n}={commit:!1}){const i=ite(a),l=MM(ate(Math.round((e-r)/a)*a+r,i),[r,o]);w(((e=[])=>{const r=Jee(e,l,t);if(ote(r,s*a)){v.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e}))}return D.jsx(Kee,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:v,thumbs:g.current,values:b,orientation:i,form:h,children:D.jsx(u$.Provider,{scope:e.__scopeSlider,children:D.jsx(u$.Slot,{scope:e.__scopeSlider,children:D.jsx(y,{"aria-disabled":l,"data-disabled":l?"":void 0,...m,ref:t,onPointerDown:Eu(m.onPointerDown,(()=>{l||(x.current=b)})),min:r,max:o,inverted:p,onSlideStart:l?void 0:function(e){_(e,tte(b,e))},onSlideMove:l?void 0:function(e){_(e,v.current)},onSlideEnd:l?void 0:function(){const e=x.current[v.current];b[v.current]!==e&&f(b)},onHomeKeyDown:()=>!l&&_(r,0,{commit:!0}),onEndKeyDown:()=>!l&&_(o,b.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=FM.includes(e.key)||e.shiftKey&&WM.includes(e.key)?10:1,r=v.current;_(b[r]+a*n*t,r,{commit:!0})}}})})})})}));zM.displayName=Ju;var[UM,HM]=qM(Ju,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Yee=O.forwardRef(((e,t)=>{const{min:n,max:r,dir:o,inverted:a,onSlideStart:i,onSlideMove:l,onSlideEnd:s,onStepKeyDown:u,...c}=e,[d,f]=O.useState(null),p=ks(t,(e=>f(e))),h=O.useRef(void 0),m=Iee(o),g="ltr"===m,v=g&&!a||!g&&a;function y(e){const t=h.current||d.getBoundingClientRect(),o=oS([0,t.width],v?[n,r]:[r,n]);return h.current=t,o(e-t.left)}return D.jsx(UM,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:D.jsx(VM,{dir:m,"data-orientation":"horizontal",...c,ref:p,style:{...c.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);null==i||i(t)},onSlideMove:e=>{const t=y(e.clientX);null==l||l(t)},onSlideEnd:()=>{h.current=void 0,null==s||s()},onStepKeyDown:e=>{const t=BM[v?"from-left":"from-right"].includes(e.key);null==u||u({event:e,direction:t?-1:1})}})})})),Xee=O.forwardRef(((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:a,onSlideMove:i,onSlideEnd:l,onStepKeyDown:s,...u}=e,c=O.useRef(null),d=ks(t,c),f=O.useRef(void 0),p=!o;function h(e){const t=f.current||c.current.getBoundingClientRect(),o=oS([0,t.height],p?[r,n]:[n,r]);return f.current=t,o(e-t.top)}return D.jsx(UM,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:D.jsx(VM,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=h(e.clientY);null==a||a(t)},onSlideMove:e=>{const t=h(e.clientY);null==i||i(t)},onSlideEnd:()=>{f.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=BM[p?"from-bottom":"from-top"].includes(e.key);null==s||s({event:e,direction:t?-1:1})}})})})),VM=O.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:a,onHomeKeyDown:i,onEndKeyDown:l,onStepKeyDown:s,...u}=e,c=Xv(Ju,n);return D.jsx(eh.span,{...u,ref:t,onKeyDown:Eu(e.onKeyDown,(e=>{"Home"===e.key?(i(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):FM.concat(WM).includes(e.key)&&(s(e),e.preventDefault())})),onPointerDown:Eu(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),c.thumbs.has(t)?t.focus():r(e)})),onPointerMove:Eu(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:Eu(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))}))})})),GM="SliderTrack",KM=O.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=Xv(GM,n);return D.jsx(eh.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));KM.displayName=GM;var d$="SliderRange",YM=O.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=Xv(d$,n),a=HM(d$,n),i=ks(t,O.useRef(null)),l=o.values.length,s=o.values.map((e=>ZM(e,o.min,o.max))),u=l>1?Math.min(...s):0,c=100-Math.max(...s);return D.jsx(eh.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:i,style:{...e.style,[a.startEdge]:u+"%",[a.endEdge]:c+"%"}})}));YM.displayName=d$;var f$="SliderThumb",XM=O.forwardRef(((e,t)=>{const n=Vee(e.__scopeSlider),[r,o]=O.useState(null),a=ks(t,(e=>o(e))),i=O.useMemo((()=>r?n().findIndex((e=>e.ref.current===r)):-1),[n,r]);return D.jsx(Qee,{...e,ref:a,index:i})})),Qee=O.forwardRef(((e,t)=>{const{__scopeSlider:n,index:r,name:o,...a}=e,i=Xv(f$,n),l=HM(f$,n),[s,u]=O.useState(null),c=ks(t,(e=>u(e))),d=!s||(i.form||!!s.closest("form")),f=Lee(s),p=i.values[r],h=void 0===p?0:ZM(p,i.min,i.max),m=ete(r,i.values.length),g=null==f?void 0:f[l.size],v=g?nte(g,h,l.direction):0;return O.useEffect((()=>{if(s)return i.thumbs.add(s),()=>{i.thumbs.delete(s)}}),[s,i.thumbs]),D.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${h}% + ${v}px)`},children:[D.jsx(u$.ItemSlot,{scope:e.__scopeSlider,children:D.jsx(eh.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":i.min,"aria-valuenow":p,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...a,ref:c,style:void 0===p?{display:"none"}:e.style,onFocus:Eu(e.onFocus,(()=>{i.valueIndexToChangeRef.current=r}))})}),d&&D.jsx(QM,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:p},r)]})}));XM.displayName=f$;var Zee="RadioBubbleInput",QM=O.forwardRef((({__scopeSlider:e,value:t,...n},r)=>{const o=O.useRef(null),a=ks(o,r),i=jee(t);return O.useEffect((()=>{const e=o.current;if(!e)return;const n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("input",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}}),[i,t]),D.jsx(eh.input,{style:{display:"none"},...n,ref:a,defaultValue:t})}));function Jee(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}function ZM(e,t,n){return MM(100/(n-t)*(e-t),[0,100])}function ete(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}function tte(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}function nte(e,t,n){const r=e/2;return(r-oS([0,50],[0,r])(t)*n)*n}function rte(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}function ote(e,t){if(t>0){const n=rte(e);return Math.min(...n)>=t}return!0}function oS(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ite(e){return(String(e).split(".")[1]||"").length}function ate(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}QM.displayName=Zee;var JM=zM,e6=KM,t6=YM,n6=XM;const r6=ji(void 0),ed=()=>{const e=Ds(r6);if(!e)throw new Error("useColorPicker must be used within a ColorPickerProvider");return e},xae=({value:e,defaultValue:t="#000000",onChange:n,className:r,...o})=>{const a=nn(e),i=nn(t),[l,s]=Ke((()=>{const e=a.hue();if(null!=e&&!Number.isNaN(e))return Math.round(e);const t=i.hue();return null==t||Number.isNaN(t)?0:Math.round(t)})()),[u,c]=Ke((()=>{const e=a.saturationv();if(null!=e&&!Number.isNaN(e))return Math.round(e);const t=i.saturationv();return null==t||Number.isNaN(t)?100:Math.round(t)})()),[d,f]=Ke((()=>{const e=a.lightness();if(null!=e&&!Number.isNaN(e))return Math.round(e);const t=i.lightness();return null==t||Number.isNaN(t)?50:Math.round(t)})()),[p,h]=Ke((()=>{const e=a.alpha();if(null!=e&&!Number.isNaN(e))return Math.round(100*e);const t=i.alpha();return null==t||Number.isNaN(t)?100:Math.round(100*t)})()),[m,g]=Ke("hex"),v=Ae(e?nn(e).hex():nn(t).hex()),y=Ae(!0);return We((()=>{if(e){const t=nn(e),[n,r,o]=t.hsl().array();s(Math.round(n||0)),c(Math.round(r||0)),f(Math.round(o||0)),h(Math.round(100*(t.alpha()||0))),v.current=t.hex(),y.current=!0}}),[e]),We((()=>{if(y.current)y.current=!1;else if(n){const e=nn.hsl(l,u,d).alpha(p/100);if(e.hex()!==v.current){const t=e.rgb().array();n([t[0],t[1],t[2],p/100])}}}),[l,u,d,p,n]),D.jsx(r6.Provider,{value:{hue:l,saturation:u,lightness:d,alpha:p,mode:m,setHue:s,setSaturation:c,setLightness:f,setAlpha:h,setMode:g},children:D.jsx("div",{className:te("flex size-full flex-col gap-s",r),...o,children:o.children})})},ste=V8((({className:e,...t})=>{const n=Ae(null),[r,o]=Ke(!1),[a,i]=Ke(0),[l,s]=Ke(0),{hue:u,saturation:c,lightness:d,setSaturation:f,setLightness:p}=ed(),h=or((()=>`linear-gradient(0deg, rgba(0,0,0,1), rgba(0,0,0,0)),\n linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,0)),\n hsl(${u}, 100%, 50%)`),[u]);We((()=>{if(!r){const e=c/100,t=e<.01?100:50+50*(1-e),n=t>0?1-d/t:0;i(Math.max(0,Math.min(1,e))),s(Math.max(0,Math.min(1,n)))}}),[c,d,r]);const m=Ge(((e,t)=>{if(!n.current)return;const r=n.current.getBoundingClientRect(),o=Math.max(0,Math.min(1,(e-r.left)/r.width)),a=Math.max(0,Math.min(1,(t-r.top)/r.height));i(o),s(a),f(100*o);p((o<.01?100:50+50*(1-o))*(1-a))}),[f,p]),g=Ge((e=>{r&&m(e.clientX,e.clientY)}),[r,m]);return We((()=>{const e=()=>o(!1);return r&&(window.addEventListener("pointermove",g),window.addEventListener("pointerup",e)),()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",e)}}),[r,g]),D.jsx("div",{className:te("relative size-full cursor-crosshair rounded",e),onPointerDown:e=>{e.preventDefault(),o(!0),m(e.clientX,e.clientY)},ref:n,style:{background:h},...t,children:D.jsx("div",{className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white",style:{left:100*a+"%",top:100*l+"%",boxShadow:"0 0 0 1px rgba(0,0,0,0.5)"}})})}));ste.displayName="ColorPickerSelection";const _ae=({className:e,...t})=>{const{hue:n,setHue:r}=ed();return D.jsxs(JM,{className:te("relative flex h-4 w-full touch-none",e),max:360,onValueChange:([e])=>r(e),step:1,value:[n],...t,children:[D.jsx(e6,{className:"relative my-0.5 h-3 w-full grow rounded-full bg-[linear-gradient(90deg,#FF0000,#FFFF00,#00FF00,#00FFFF,#0000FF,#FF00FF,#FF0000)]",children:D.jsx(t6,{className:"absolute h-full"})}),D.jsx(n6,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]})},$ae=({className:e,...t})=>{const{alpha:n,setAlpha:r}=ed();return D.jsxs(JM,{className:te("relative flex h-4 w-full touch-none",e),max:100,onValueChange:([e])=>r(e),step:1,value:[n],...t,children:[D.jsxs(e6,{className:"relative my-0.5 h-3 w-full grow rounded-full",style:{background:'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==") left center'},children:[D.jsx("div",{className:"absolute inset-0 rounded-full bg-gradient-to-r from-transparent to-black/50"}),D.jsx(t6,{className:"absolute h-full rounded-full bg-transparent"})]}),D.jsx(n6,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]})},Sae=({className:e,...t})=>{const{setHue:n,setSaturation:r,setLightness:o,setAlpha:a}=ed();return D.jsx(Is,{className:te("shrink-0 rounded-lg text-muted-foreground",e),onClick:()=>{(async()=>{try{if(!window.EyeDropper)throw new Error("EyeDropper API not supported");const e=nn((await(new window.EyeDropper).open()).sRGBHex),[t,i,l]=e.hsl().array();n(t),r(i),o(l),a(100)}catch(e){console.error("EyeDropper failed:",e)}})()},size:"icon_l",variant:"secondary",type:"button",...t,children:D.jsx(P7,{size:24})})},cte=["hex","rgb","css","hsl"],Cae=({...e})=>{const{mode:t,setMode:n}=ed();return D.jsxs(Fv,{onValueChange:n,value:t,children:[D.jsx(j2,{className:"h-8 w-20 shrink-0 text-xs",...e,children:D.jsx(M2,{placeholder:"Mode"})}),D.jsx(Wv,{children:cte.map((e=>D.jsx(L2,{className:"text-xs",value:e,children:e.toUpperCase()},e)))})]})},u_=({className:e,...t})=>D.jsxs("div",{className:"relative",children:[D.jsx(Wc,{readOnly:!0,type:"text",...t,className:te("h-8 w-[3.25rem] rounded-l-none bg-secondary px-xxs text-xs shadow-none",e)}),D.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground",children:"%"})]}),Eae=({className:e,hidePercentage:t=!0,...n})=>{const{hue:r,saturation:o,lightness:a,alpha:i,mode:l}=ed(),s=nn.hsl(r,o,a,i/100);if("hex"===l){const r=s.hex();return D.jsxs("div",{className:te("relative flex w-full items-center -space-x-px rounded-md shadow-sm",e),...n,children:[D.jsx(Wc,{className:"h-8 rounded-r-none bg-secondary px-2 text-xs shadow-none",readOnly:!0,type:"text",value:r}),!t&&D.jsx(u_,{value:i})]})}if("rgb"===l){const t=s.rgb().array().map((e=>Math.round(e)));return D.jsxs("div",{className:te("flex items-center -space-x-px rounded-md shadow-sm",e),...n,children:[t.map(((t,n)=>D.jsx(Wc,{className:te("h-8 rounded-r-none bg-secondary px-xxs text-xs shadow-none",n&&"rounded-l-none",e),readOnly:!0,type:"text",value:t},n))),D.jsx(u_,{value:i})]})}if("css"===l){const t=s.rgb().array().map((e=>Math.round(e)));return D.jsx("div",{className:te("w-full rounded-md shadow-sm",e),...n,children:D.jsx(Wc,{className:"h-8 w-full bg-secondary px-xxs text-xs shadow-none",readOnly:!0,type:"text",value:`rgba(${t.join(", ")}, ${i}%)`,...n})})}if("hsl"===l){const t=s.hsl().array().map((e=>Math.round(e)));return D.jsxs("div",{className:te("flex items-center -space-x-px rounded-md shadow-sm",e),...n,children:[t.map(((t,n)=>D.jsx(Wc,{className:te("h-8 rounded-r-none bg-secondary px-xxs text-xs shadow-none",n&&"rounded-l-none",e),readOnly:!0,type:"text",value:t},n))),D.jsx(u_,{value:i})]})}return null},Pae=ZQ,lte=JQ,ute=eZ,dte=$a("z-tooltip animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 relative data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md text-sm px-3 py-1.5",small:"rounded-sm p-xxs text-sm"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-gray-800 text-gray-50 [&_svg]:fill-gray-700"},defaultVariants:{size:"small",theme:"dark"}}}),o6=O.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,children:o,isPortal:a=!0,withArrow:i=!0,...l},s)=>{const u=D.jsx(D.Fragment,{children:D.jsxs(QA,{ref:s,sideOffset:t,className:te(dte({size:n,theme:r,className:e})),...l,children:[o,i&&D.jsxs(D.Fragment,{children:[D.jsx(nZ,{height:4,width:8}),D.jsx("div",{className:"absolute bottom-0 left-0 h-full w-full rounded-sm border border-gray-700"})]})]})});return a?D.jsx(tZ,{children:u}):u}));o6.displayName=QA.displayName;const fte=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>D.jsxs(lte,{children:[D.jsx(ute,{className:n,...r,children:e}),t&&D.jsx(o6,{...o,children:t})]}),Oae=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>D.jsx("div",{className:"hidden",children:D.jsx("input",{type:"file","data-button":"input file",accept:e,multiple:t,onChange:({target:e})=>{if(!e.files)return;const t=Array.from(e.files).map((e=>({file:e,objectUrl:URL.createObjectURL(e)})));n(t),e.value=""},onClick:e=>{e.stopPropagation(),r&&e.preventDefault()}})});function pte(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function i6(...e){return t=>e.forEach((e=>pte(e,t)))}function a6(...e){return Ge(i6(...e),e)}let d_=0;function hte(){We((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:f3()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:f3()),d_++,()=>{1===d_&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),d_--}}),[])}function f3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}function mte(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function gte(...e){return t=>e.forEach((e=>mte(e,t)))}function vte(...e){return Ge(gte(...e),e)}const f_="focusScope.autoFocusOnMount",p_="focusScope.autoFocusOnUnmount",p3={bubbles:!1,cancelable:!0},yte=ye(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=Ke(null),u=Rs(o),c=Rs(a),d=Ae(null),f=vte(t,(e=>s(e))),p=Ae({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;We((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ic(d.current,{select:!0})},t=function(e){p.paused||!l||l.contains(e.relatedTarget)||Ic(d.current,{select:!0})};return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),We((()=>{if(l){m3.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(f_,p3);l.addEventListener(f_,u),l.dispatchEvent(t),t.defaultPrevented||(bte(Ste(s6(l)),{select:!0}),document.activeElement===e&&Ic(l))}return()=>{l.removeEventListener(f_,u),setTimeout((()=>{const t=new CustomEvent(p_,p3);l.addEventListener(p_,c),l.dispatchEvent(t),t.defaultPrevented||Ic(e??document.body,{select:!0}),l.removeEventListener(p_,c),m3.remove(p)}),0)}}}),[l,u,c,p]);const h=Ge((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=wte(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ic(a,{select:!0})):(e.preventDefault(),n&&Ic(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return q(Ns.div,he({tabIndex:-1},i,{ref:f,onKeyDown:h}))}));function bte(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ic(r,{select:t}),document.activeElement!==n)return}function wte(e){const t=s6(e);return[h3(t,e),h3(t.reverse(),e)]}function s6(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function h3(e,t){for(const n of e)if(!xte(n,{upTo:t}))return n}function xte(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function _te(e){return e instanceof HTMLInputElement&&"select"in e}function Ic(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_te(e)&&t&&e.select()}}const m3=$te();function $te(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=g3(e,t),e.unshift(t)},remove(t){var n;e=g3(e,t),null===(n=e[0])||void 0===n||n.resume()}}}function g3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function Ste(e){return e.filter((e=>"A"!==e.tagName))}const Cte=O.useId||(()=>{});let Ete=0;function Pte(e){const[t,n]=O.useState(Cte());return ws((()=>{e||n((e=>e??String(Ete++)))}),[e]),e||(t?`radix-${t}`:"")}const c6=ye(((e,t)=>{const{children:n,...r}=e,o=ir.toArray(n),a=o.find(Rte);if(a){const e=a.props.children,n=o.map((t=>t===a?ir.count(e)>1?ir.only(null):Po(e)?e.props.children:null:t));return q(p$,he({},r,{ref:t}),Po(e)?_a(e,void 0,n):null)}return q(p$,he({},r,{ref:t}),n)}));c6.displayName="Slot";const p$=ye(((e,t)=>{const{children:n,...r}=e;return Po(n)?_a(n,{...Tte(r,n.props),ref:i6(t,n.ref)}):ir.count(n)>1?ir.only(null):null}));p$.displayName="SlotClone";const Ote=({children:e})=>q(As,null,e);function Rte(e){return Po(e)&&e.type===Ote}function Tte(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}const l6="Popover",[u6,Rae]=F2(l6,[zv]),Qv=zv(),[Nte,rl]=u6(l6),kte=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Qv(t),s=Ae(null),[u,c]=Ke(!1),[d=!1,f]=nA({prop:r,defaultProp:o,onChange:a});return q(vA,l,q(Nte,{scope:t,contentId:Pte(),triggerRef:s,open:d,onOpenChange:f,onOpenToggle:Ge((()=>f((e=>!e))),[f]),hasCustomAnchor:u,onCustomAnchorAdd:Ge((()=>c(!0)),[]),onCustomAnchorRemove:Ge((()=>c(!1)),[]),modal:i},n))},Dte="PopoverAnchor",Ate=ye(((e,t)=>{const{__scopePopover:n,...r}=e,o=rl(Dte,n),a=Qv(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return We((()=>(i(),()=>l())),[i,l]),q(z2,he({},a,r,{ref:t}))})),Mte="PopoverTrigger",Ite=ye(((e,t)=>{const{__scopePopover:n,...r}=e,o=rl(Mte,n),a=Qv(n),i=a6(t,o.triggerRef),l=q(Ns.button,he({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":p6(o.open)},r,{ref:i,onClick:Or(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?l:q(z2,he({asChild:!0},a),l)})),d6="PopoverPortal",[jte,Lte]=u6(d6,{forceMount:void 0}),Fte=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=rl(d6,t);return q(jte,{scope:t,forceMount:n},q(Zp,{present:n||a.open},q(bA,{asChild:!0,container:o},r)))},Dp="PopoverContent",Wte=ye(((e,t)=>{const n=Lte(Dp,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=rl(Dp,e.__scopePopover);return q(Zp,{present:r||a.open},a.modal?q(Bte,he({},o,{ref:t})):q(qte,he({},o,{ref:t})))})),Bte=ye(((e,t)=>{const n=rl(Dp,e.__scopePopover),r=Ae(null),o=a6(t,r),a=Ae(!1);return We((()=>{const e=r.current;if(e)return jp(e)}),[]),q(Ip,{as:c6,allowPinchZoom:!0},q(f6,he({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Or(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),a.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Or(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Or(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),qte=ye(((e,t)=>{const n=rl(Dp,e.__scopePopover),r=Ae(!1);return q(f6,he({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;(null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented)||(r.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());r.current=!1},onInteractOutside:t=>{var o,a;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault()}}))})),f6=ye(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:c,...d}=e,f=rl(Dp,n),p=Qv(n);return hte(),q(yte,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a},q(wA,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1)},q(yA,he({"data-state":p6(f.open),role:"dialog",id:f.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}));function p6(e){return e?"open":"closed"}const zte=kte,Ute=Ate,Hte=Ite,Vte=Fte,Gte=Wte;function Tae({...e}){return D.jsx(zte,{"data-slot":"popover",...e})}function Nae({...e}){return D.jsx(Hte,{"data-slot":"popover-trigger",...e})}function kae({className:e,align:t="center",sideOffset:n=4,withPortal:r,animate:o=!0,...a}){const i=D.jsx(Gte,{"data-slot":"popover-content",align:t,sideOffset:n,className:te("origin-(--radix-popover-content-transform-origin) outline-hidden z-50 flex w-[100vw] max-w-[600px] flex-col gap-xs rounded-lg border border-gray-200 bg-popover px-none py-xs text-popover-foreground shadow-[0_0_12px_0_rgba(0,0,0,0.15)] data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e,o&&"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),...a});return r?D.jsx(Vte,{children:i}):i}function Dae({...e}){return D.jsx(Ute,{"data-slot":"popover-anchor",...e})}function Kte(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const h_={},sp={};function Bc(e,t){try{const n=(h_[e]||(h_[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in sp?sp[n]:v3(n,n.split(":"))}catch{if(e in sp)return sp[e];const t=null==e?void 0:e.match(Yte);return t?v3(e,t.slice(1)):NaN}}const Yte=/([+-]\d\d):?(\d\d)?/;function v3(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return sp[e]=60*n+r>0?60*n+r+o:60*n-r-o}class Ii extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Bc(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),h6(this),h$(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Ii(...t,e):new Ii(Date.now(),e)}withTimeZone(e){return new Ii(+this,e)}getTimezoneOffset(){const e=-Bc(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),h$(this),+this}[Symbol.for("constructDateFrom")](e){return new Ii(+new Date(e),this.timeZone)}}const y3=/^(get|set)(?!UTC)/;function h$(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-Bc(e.timeZone,e)))}function Xte(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),h6(e)}function h6(e){const t=Bc(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=o- -new Date(+r).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const s=new Date(+e);s.setUTCSeconds(0);const u=o>0?s.getSeconds():(s.getSeconds()-60)%60,c=Math.round(-60*Bc(e.timeZone,e))%60;(c||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+c),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+c+u));const d=Bc(e.timeZone,e),f=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-f-l;if(f!==n&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const t=Bc(e.timeZone,e),n=f-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!y3.test(e))return;const t=e.replace(y3,"$1UTC");Ii.prototype[t]&&(e.startsWith("get")?Ii.prototype[e]=function(){return this.internal[t]()}:(Ii.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Xte(this),+this},Ii.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),h$(this),+this}))}));class Er extends Ii{static tz(e,...t){return t.length?new Er(...t,e):new Er(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${null==e?void 0:e.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${Kte(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:(null==t?void 0:t.timeZone)||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:(null==t?void 0:t.timeZone)||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:(null==t?void 0:t.timeZone)||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Er(+this,e)}[Symbol.for("constructDateFrom")](e){return new Er(+new Date(e),this.timeZone)}}const m6=6048e5,Qte=864e5,b3=Symbol.for("constructDateFrom");function Vn(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&b3 in e?e[b3](t):e instanceof Date?new e.constructor(t):new Date(t)}function Kt(e,t){return Vn(t||e,e)}function g6(e,t,n){const r=Kt(e,null==n?void 0:n.in);return isNaN(t)?Vn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function v6(e,t,n){const r=Kt(e,null==n?void 0:n.in);if(isNaN(t))return Vn(e,NaN);if(!t)return r;const o=r.getDate(),a=Vn(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);return o>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Zte={};function th(){return Zte}function Wu(e,t){var n,r,o,a;const i=th(),l=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??i.weekStartsOn??(null==(a=null==(o=i.locale)?void 0:o.options)?void 0:a.weekStartsOn)??0,s=Kt(e,null==t?void 0:t.in),u=s.getDay(),c=(u<l?7:0)+u-l;return s.setDate(s.getDate()-c),s.setHours(0,0,0,0),s}function Ap(e,t){return Wu(e,{...t,weekStartsOn:1})}function y6(e,t){const n=Kt(e,null==t?void 0:t.in),r=n.getFullYear(),o=Vn(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Ap(o),i=Vn(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const l=Ap(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function w3(e){const t=Kt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function td(e,...t){const n=Vn.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}function Mp(e,t){const n=Kt(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function b6(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t),a=Mp(r),i=Mp(o),l=+a-w3(a),s=+i-w3(i);return Math.round((l-s)/Qte)}function Jte(e,t){const n=y6(e,t),r=Vn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ap(r)}function ene(e,t,n){return g6(e,7*t,n)}function tne(e,t,n){return v6(e,12*t,n)}function nne(e,t){let n,r=null==t?void 0:t.in;return e.forEach((e=>{!r&&"object"==typeof e&&(r=Vn.bind(null,e));const t=Kt(e,r);(!n||n<t||isNaN(+t))&&(n=t)})),Vn(r,n||NaN)}function rne(e,t){let n,r=null==t?void 0:t.in;return e.forEach((e=>{!r&&"object"==typeof e&&(r=Vn.bind(null,e));const t=Kt(e,r);(!n||n>t||isNaN(+t))&&(n=t)})),Vn(r,n||NaN)}function one(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t);return+Mp(r)==+Mp(o)}function w6(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function ine(e){return!(!w6(e)&&"number"!=typeof e||isNaN(+Kt(e)))}function ane(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}function sne(e,t){const n=Kt(e,null==t?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function cne(e,t){const[n,r]=td(e,t.start,t.end);return{start:n,end:r}}function lne(e,t){const{start:n,end:r}=cne(null==t?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);const l=[];for(;+i<=a;)l.push(Vn(n,i)),i.setMonth(i.getMonth()+1);return o?l.reverse():l}function une(e,t){const n=Kt(e,null==t?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function dne(e,t){const n=Kt(e,null==t?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function x6(e,t){const n=Kt(e,null==t?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function _6(e,t){var n,r,o,a;const i=th(),l=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??i.weekStartsOn??(null==(a=null==(o=i.locale)?void 0:o.options)?void 0:a.weekStartsOn)??0,s=Kt(e,null==t?void 0:t.in),u=s.getDay(),c=6+(u<l?-7:0)-(u-l);return s.setDate(s.getDate()+c),s.setHours(23,59,59,999),s}function fne(e,t){return _6(e,{...t,weekStartsOn:1})}const pne={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"}},hne=(e,t,n)=>{let r;const o=pne[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function m_(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const mne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},gne={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vne={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yne={date:m_({formats:mne,defaultWidth:"full"}),time:m_({formats:gne,defaultWidth:"full"}),dateTime:m_({formats:vne,defaultWidth:"full"})},bne={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wne=(e,t,n,r)=>bne[e];function tp(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const xne={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_ne={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$ne={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"]},Sne={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"]},Cne={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"}},Ene={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"}},Pne=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},One={ordinalNumber:Pne,era:tp({values:xne,defaultWidth:"wide"}),quarter:tp({values:_ne,defaultWidth:"wide",argumentCallback:e=>e-1}),month:tp({values:$ne,defaultWidth:"wide"}),day:tp({values:Sne,defaultWidth:"wide"}),dayPeriod:tp({values:Cne,defaultWidth:"wide",formattingValues:Ene,defaultFormattingWidth:"wide"})};function np(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?Tne(l,(e=>e.test(i))):Rne(l,(e=>e.test(i)));let u;u=e.valueCallback?e.valueCallback(s):s,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(i.length)}}}function Rne(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Tne(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Nne(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;return{value:i,rest:t.slice(o.length)}}}const kne=/^(\d+)(th|st|nd|rd)?/i,Dne=/\d+/i,Ane={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},Mne={any:[/^b/i,/^(a|c)/i]},Ine={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jne={any:[/1/i,/2/i,/3/i,/4/i]},Lne={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},Fne={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]},Wne={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},Bne={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]},qne={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},zne={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}},Une={ordinalNumber:Nne({matchPattern:kne,parsePattern:Dne,valueCallback:e=>parseInt(e,10)}),era:np({matchPatterns:Ane,defaultMatchWidth:"wide",parsePatterns:Mne,defaultParseWidth:"any"}),quarter:np({matchPatterns:Ine,defaultMatchWidth:"wide",parsePatterns:jne,defaultParseWidth:"any",valueCallback:e=>e+1}),month:np({matchPatterns:Lne,defaultMatchWidth:"wide",parsePatterns:Fne,defaultParseWidth:"any"}),day:np({matchPatterns:Wne,defaultMatchWidth:"wide",parsePatterns:Bne,defaultParseWidth:"any"}),dayPeriod:np({matchPatterns:qne,defaultMatchWidth:"any",parsePatterns:zne,defaultParseWidth:"any"})},iS={code:"en-US",formatDistance:hne,formatLong:yne,formatRelative:wne,localize:One,match:Une,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Hne(e,t){const n=Kt(e,null==t?void 0:t.in);return b6(n,x6(n))+1}function $6(e,t){const n=Kt(e,null==t?void 0:t.in),r=+Ap(n)-+Jte(n);return Math.round(r/m6)+1}function S6(e,t){var n,r,o,a;const i=Kt(e,null==t?void 0:t.in),l=i.getFullYear(),s=th(),u=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??(null==(a=null==(o=s.locale)?void 0:o.options)?void 0:a.firstWeekContainsDate)??1,c=Vn((null==t?void 0:t.in)||e,0);c.setFullYear(l+1,0,u),c.setHours(0,0,0,0);const d=Wu(c,t),f=Vn((null==t?void 0:t.in)||e,0);f.setFullYear(l,0,u),f.setHours(0,0,0,0);const p=Wu(f,t);return+i>=+d?l+1:+i>=+p?l:l-1}function Vne(e,t){var n,r,o,a;const i=th(),l=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??i.firstWeekContainsDate??(null==(a=null==(o=i.locale)?void 0:o.options)?void 0:a.firstWeekContainsDate)??1,s=S6(e,t),u=Vn((null==t?void 0:t.in)||e,0);return u.setFullYear(s,0,l),u.setHours(0,0,0,0),Wu(u,t)}function C6(e,t){const n=Kt(e,null==t?void 0:t.in),r=+Wu(n,t)-+Vne(n,t);return Math.round(r/m6)+1}function Wt(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const gs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Wt("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Wt(n+1,2)},d:(e,t)=>Wt(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Wt(e.getHours()%12||12,t.length),H:(e,t)=>Wt(e.getHours(),t.length),m:(e,t)=>Wt(e.getMinutes(),t.length),s:(e,t)=>Wt(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Wt(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Su={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},x3={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return gs.y(e,t)},Y:function(e,t,n,r){const o=S6(e,r),a=o>0?o:1-o;if("YY"===t){return Wt(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Wt(a,t.length)},R:function(e,t){return Wt(y6(e),t.length)},u:function(e,t){return Wt(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Wt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Wt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return gs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Wt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=C6(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Wt(o,t.length)},I:function(e,t,n){const r=$6(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Wt(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):gs.d(e,t)},D:function(e,t,n){const r=Hne(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Wt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Wt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Wt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Wt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?Su.noon:0===r?Su.midnight:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?Su.evening:r>=12?Su.afternoon:r>=4?Su.morning:Su.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return gs.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):gs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Wt(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Wt(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):gs.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):gs.s(e,t)},S:function(e,t){return gs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return $3(r);case"XXXX":case"XX":return jc(r);default:return jc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $3(r);case"xxxx":case"xx":return jc(r);default:return jc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_3(r,":");default:return"GMT"+jc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_3(r,":");default:return"GMT"+jc(r,":")}},t:function(e,t,n){return Wt(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Wt(+e,t.length)}};function _3(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+Wt(a,2)}function $3(e,t){return e%60==0?(e>0?"-":"+")+Wt(Math.abs(e)/60,2):jc(e,t)}function jc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Wt(Math.trunc(r/60),2)+t+Wt(r%60,2)}const S3=(e,t)=>{switch(e){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"})}},E6=(e,t)=>{switch(e){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"})}},Gne=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return S3(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",S3(r,t)).replace("{{time}}",E6(o,t))},Kne={p:E6,P:Gne},Yne=/^D+$/,Xne=/^Y+$/,Qne=["D","DD","YY","YYYY"];function Zne(e){return Yne.test(e)}function Jne(e){return Xne.test(e)}function ere(e,t,n){const r=tre(e,t,n);if(console.warn(r),Qne.includes(e))throw new RangeError(r)}function tre(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const nre=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rre=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ore=/^'([^]*?)'?$/,ire=/''/g,are=/[a-zA-Z]/;function sre(e,t,n){var r,o,a,i,l,s,u,c;const d=th(),f=(null==n?void 0:n.locale)??d.locale??iS,p=(null==n?void 0:n.firstWeekContainsDate)??(null==(o=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(i=null==(a=d.locale)?void 0:a.options)?void 0:i.firstWeekContainsDate)??1,h=(null==n?void 0:n.weekStartsOn)??(null==(s=null==(l=null==n?void 0:n.locale)?void 0:l.options)?void 0:s.weekStartsOn)??d.weekStartsOn??(null==(c=null==(u=d.locale)?void 0:u.options)?void 0:c.weekStartsOn)??0,m=Kt(e,null==n?void 0:n.in);if(!ine(m))throw new RangeError("Invalid time value");let g=t.match(rre).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Kne[t])(e,f.formatLong)}return e})).join("").match(nre).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:cre(e)};if(x3[t])return{isToken:!0,value:e};if(t.match(are))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));f.localize.preprocessor&&(g=f.localize.preprocessor(m,g));const v={firstWeekContainsDate:p,weekStartsOn:h,locale:f};return g.map((r=>{if(!r.isToken)return r.value;const o=r.value;((null==n||!n.useAdditionalWeekYearTokens)&&Jne(o)||(null==n||!n.useAdditionalDayOfYearTokens)&&Zne(o))&&ere(o,t,String(e));return(0,x3[o[0]])(m,o,f.localize,v)})).join("")}function cre(e){const t=e.match(ore);return t?t[1].replace(ire,"'"):e}function lre(e,t){const n=Kt(e,null==t?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Vn(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function ure(e,t){return Kt(e,null==t?void 0:t.in).getMonth()}function dre(e,t){return Kt(e,null==t?void 0:t.in).getFullYear()}function fre(e,t){return+Kt(e)>+Kt(t)}function pre(e,t){return+Kt(e)<+Kt(t)}function hre(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function mre(e,t,n){const[r,o]=td(null==n?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function gre(e,t,n){const r=Kt(e,null==n?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=Vn(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const l=lre(i);return r.setMonth(t,Math.min(a,l)),r}function vre(e,t,n){const r=Kt(e,null==n?void 0:n.in);return isNaN(+r)?Vn(e,NaN):(r.setFullYear(t),r)}const C3=5,yre=4;function bre(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),a=t.addDays(o,34);return t.getMonth(e)===t.getMonth(a)?5:4}function P6(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function wre(e,t){const n=P6(e,t),r=bre(e,t);return t.addDays(n,7*r-1)}class Ra{constructor(e,t){this.Date=Date,this.today=()=>{var e;return null!=(e=this.overrides)&&e.today?this.overrides.today():this.options.timeZone?Er.tz(this.options.timeZone):new this.Date},this.newDate=(e,t,n)=>{var r;return null!=(r=this.overrides)&&r.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new Er(e,t,n,this.options.timeZone):new Date(e,t,n)},this.addDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addDays?this.overrides.addDays(e,t):g6(e,t)},this.addMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addMonths?this.overrides.addMonths(e,t):v6(e,t)},this.addWeeks=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addWeeks?this.overrides.addWeeks(e,t):ene(e,t)},this.addYears=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addYears?this.overrides.addYears(e,t):tne(e,t)},this.differenceInCalendarDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):b6(e,t)},this.differenceInCalendarMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):ane(e,t)},this.eachMonthOfInterval=e=>{var t;return null!=(t=this.overrides)&&t.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):lne(e)},this.endOfBroadcastWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):wre(e,this)},this.endOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfISOWeek?this.overrides.endOfISOWeek(e):fne(e)},this.endOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.endOfMonth?this.overrides.endOfMonth(e):sne(e)},this.endOfWeek=(e,t)=>{var n;return null!=(n=this.overrides)&&n.endOfWeek?this.overrides.endOfWeek(e,t):_6(e,this.options)},this.endOfYear=e=>{var t;return null!=(t=this.overrides)&&t.endOfYear?this.overrides.endOfYear(e):dne(e)},this.format=(e,t,n)=>{var r;const o=null!=(r=this.overrides)&&r.format?this.overrides.format(e,t,this.options):sre(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(o):o},this.getISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.getISOWeek?this.overrides.getISOWeek(e):$6(e)},this.getMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.getMonth?this.overrides.getMonth(e,this.options):ure(e,this.options)},this.getYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.getYear?this.overrides.getYear(e,this.options):dre(e,this.options)},this.getWeek=(e,t)=>{var n;return null!=(n=this.overrides)&&n.getWeek?this.overrides.getWeek(e,this.options):C6(e,this.options)},this.isAfter=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isAfter?this.overrides.isAfter(e,t):fre(e,t)},this.isBefore=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isBefore?this.overrides.isBefore(e,t):pre(e,t)},this.isDate=e=>{var t;return null!=(t=this.overrides)&&t.isDate?this.overrides.isDate(e):w6(e)},this.isSameDay=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameDay?this.overrides.isSameDay(e,t):one(e,t)},this.isSameMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameMonth?this.overrides.isSameMonth(e,t):hre(e,t)},this.isSameYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameYear?this.overrides.isSameYear(e,t):mre(e,t)},this.max=e=>{var t;return null!=(t=this.overrides)&&t.max?this.overrides.max(e):nne(e)},this.min=e=>{var t;return null!=(t=this.overrides)&&t.min?this.overrides.min(e):rne(e)},this.setMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setMonth?this.overrides.setMonth(e,t):gre(e,t)},this.setYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setYear?this.overrides.setYear(e,t):vre(e,t)},this.startOfBroadcastWeek=(e,t)=>{var n;return null!=(n=this.overrides)&&n.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):P6(e,this)},this.startOfDay=e=>{var t;return null!=(t=this.overrides)&&t.startOfDay?this.overrides.startOfDay(e):Mp(e)},this.startOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.startOfISOWeek?this.overrides.startOfISOWeek(e):Ap(e)},this.startOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.startOfMonth?this.overrides.startOfMonth(e):une(e)},this.startOfWeek=(e,t)=>{var n;return null!=(n=this.overrides)&&n.startOfWeek?this.overrides.startOfWeek(e,this.options):Wu(e,this.options)},this.startOfYear=e=>{var t;return null!=(t=this.overrides)&&t.startOfYear?this.overrides.startOfYear(e):x6(e)},this.options={locale:iS,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,(e=>t[e]||e))}formatNumber(e){return this.replaceDigits(e.toString())}}const qi=new Ra;class O6{constructor(e,t,n=qi){this.date=e,this.displayMonth=t,this.outside=!(!t||n.isSameMonth(e,t)),this.dateLib=n}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class xre{constructor(e,t){this.date=e,this.weeks=t}}class _re{constructor(e,t){this.days=t,this.weekNumber=e}}function $re(e){return re.createElement("button",{...e})}function Sre(e){return re.createElement("span",{...e})}function Cre(e){const{size:t=24,orientation:n="left",className:r}=e;return re.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&re.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&re.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&re.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&re.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Ere(e){const{day:t,modifiers:n,...r}=e;return re.createElement("td",{...r})}function Pre(e){const{day:t,modifiers:n,...r}=e,o=re.useRef(null);return re.useEffect((()=>{var e;n.focused&&(null==(e=o.current)||e.focus())}),[n.focused]),re.createElement("button",{ref:o,...r})}var ut,hn,oi,$o;function Ore(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[ut.Dropdown],n].join(" "),l=null==t?void 0:t.find((({value:e})=>e===a.value));return re.createElement("span",{"data-disabled":a.disabled,className:o[ut.DropdownRoot]},re.createElement(r.Select,{className:i,...a},null==t?void 0:t.map((({value:e,label:t,disabled:n})=>re.createElement(r.Option,{key:e,value:e,disabled:n},t)))),re.createElement("span",{className:o[ut.CaptionLabel],"aria-hidden":!0},null==l?void 0:l.label,re.createElement(r.Chevron,{orientation:"down",size:18,className:o[ut.Chevron]})))}function Rre(e){return re.createElement("div",{...e})}function Tre(e){return re.createElement("div",{...e})}function Nre(e){const{calendarMonth:t,displayIndex:n,...r}=e;return re.createElement("div",{...r},e.children)}function kre(e){const{calendarMonth:t,displayIndex:n,...r}=e;return re.createElement("div",{...r})}function Dre(e){return re.createElement("table",{...e})}function Are(e){return re.createElement("div",{...e})}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(ut||(ut={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(hn||(hn={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(oi||(oi={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}($o||($o={}));const R6=ji(void 0);function nh(){const e=Ds(R6);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}function Mre(e){const{components:t}=nh();return re.createElement(t.Dropdown,{...e})}function Ire(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:l,labels:{labelPrevious:s,labelNext:u}}=nh(),c=Ge((e=>{o&&(null==n||n(e))}),[o,n]),d=Ge((e=>{r&&(null==t||t(e))}),[r,t]);return re.createElement("nav",{...a},re.createElement(i.PreviousMonthButton,{type:"button",className:l[ut.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":s(r),onClick:d},re.createElement(i.Chevron,{disabled:!r||void 0,className:l[ut.Chevron],orientation:"left"})),re.createElement(i.NextMonthButton,{type:"button",className:l[ut.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":u(o),onClick:c},re.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:l[ut.Chevron]})))}function jre(e){const{components:t}=nh();return re.createElement(t.Button,{...e})}function Lre(e){return re.createElement("option",{...e})}function Fre(e){const{components:t}=nh();return re.createElement(t.Button,{...e})}function Wre(e){const{rootRef:t,...n}=e;return re.createElement("div",{...n,ref:t})}function Bre(e){return re.createElement("select",{...e})}function qre(e){const{week:t,...n}=e;return re.createElement("tr",{...n})}function zre(e){return re.createElement("th",{...e})}function Ure(e){return re.createElement("thead",{"aria-hidden":!0},re.createElement("tr",{...e}))}function Hre(e){const{week:t,...n}=e;return re.createElement("th",{...n})}function Vre(e){return re.createElement("th",{...e})}function Gre(e){return re.createElement("tbody",{...e})}function Kre(e){const{components:t}=nh();return re.createElement(t.Dropdown,{...e})}const Yre=Object.freeze(Object.defineProperty({__proto__:null,Button:$re,CaptionLabel:Sre,Chevron:Cre,Day:Ere,DayButton:Pre,Dropdown:Ore,DropdownNav:Rre,Footer:Tre,Month:Nre,MonthCaption:kre,MonthGrid:Dre,Months:Are,MonthsDropdown:Mre,Nav:Ire,NextMonthButton:jre,Option:Lre,PreviousMonthButton:Fre,Root:Wre,Select:Bre,Week:qre,WeekNumber:Hre,WeekNumberHeader:Vre,Weekday:zre,Weekdays:Ure,Weeks:Gre,YearsDropdown:Kre},Symbol.toStringTag,{value:"Module"}));function ha(e,t,n=!1,r=qi){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:l}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?l(a,t):!(n||!o)&&l(o,t)}function T6(e){return!!(e&&"object"==typeof e&&"before"in e&&"after"in e)}function aS(e){return!(!e||"object"!=typeof e||!("from"in e))}function N6(e){return!(!e||"object"!=typeof e||!("after"in e))}function k6(e){return!(!e||"object"!=typeof e||!("before"in e))}function D6(e){return!(!e||"object"!=typeof e||!("dayOfWeek"in e))}function A6(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ma(e,t,n=qi){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some((t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(A6(t,n))return t.includes(e);if(aS(t))return ha(t,e,!1,n);if(D6(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(T6(t)){const n=a(t.before,e)>0,r=a(t.after,e)<0;return i(t.before,t.after)?r&&n:n||r}return N6(t)?a(e,t.after)>0:k6(t)?a(t.before,e)>0:"function"==typeof t&&t(e)}))}function Xre(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:l,showOutsideDays:s,broadcastCalendar:u,today:c}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:h,endOfMonth:m,isAfter:g}=o,v=n&&p(n),y=r&&m(r),b={[hn.focused]:[],[hn.outside]:[],[hn.disabled]:[],[hn.hidden]:[],[hn.today]:[]},w={};for(const t of e){const{date:e,displayMonth:n}=t,r=!(!n||f(e,n)),p=!(!v||!h(e,v)),m=!(!y||!g(e,y)),x=!(!a||!ma(e,a,o)),_=!(!i||!ma(e,i,o))||p||m||!u&&!s&&r||u&&!1===s&&r,O=d(e,c??o.today());r&&b.outside.push(t),x&&b.disabled.push(t),_&&b.hidden.push(t),O&&b.today.push(t),l&&Object.keys(l).forEach((n=>{const r=null==l?void 0:l[n];r&&ma(e,r,o)&&(w[n]?w[n].push(t):w[n]=[t])}))}return e=>{const t={[hn.focused]:!1,[hn.disabled]:!1,[hn.hidden]:!1,[hn.outside]:!1,[hn.today]:!1},n={};for(const n in b){const r=b[n];t[n]=r.some((t=>t===e))}for(const t in w)n[t]=w[t].some((t=>t===e));return{...t,...n}}}function Qre(e,t,n={}){return Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[r])=>(n[r]?e.push(n[r]):t[hn[r]]?e.push(t[hn[r]]):t[oi[r]]&&e.push(t[oi[r]]),e)),[t[ut.Day]])}function Zre(e){return{...Yre,...e}}function Jre(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach((([e,n])=>{e.startsWith("data-")&&(t[e]=n)})),t}function sS(){const e={};for(const t in ut)e[ut[t]]=`rdp-${ut[t]}`;for(const t in hn)e[hn[t]]=`rdp-${hn[t]}`;for(const t in oi)e[oi[t]]=`rdp-${oi[t]}`;for(const t in $o)e[$o[t]]=`rdp-${$o[t]}`;return e}function M6(e,t,n){return(n??new Ra(t)).format(e,"LLLL y")}const eoe=M6;function toe(e,t,n){return(n??new Ra(t)).format(e,"d")}function noe(e,t=qi){return t.format(e,"LLLL")}function roe(e,t,n){return(n??new Ra(t)).format(e,"cccccc")}function ooe(e,t=qi){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function ioe(){return""}function I6(e,t=qi){return t.format(e,"yyyy")}const aoe=I6,soe=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:M6,formatDay:toe,formatMonthCaption:eoe,formatMonthDropdown:noe,formatWeekNumber:ooe,formatWeekNumberHeader:ioe,formatWeekdayName:roe,formatYearCaption:aoe,formatYearDropdown:I6},Symbol.toStringTag,{value:"Module"}));function coe(e){return null!=e&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),null!=e&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...soe,...e}}function loe(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:l,eachMonthOfInterval:s,getMonth:u}=o;return s({start:i(e),end:l(e)}).map((e=>{const i=r.formatMonthDropdown(e,o);return{value:u(e),label:i,disabled:t&&e<a(t)||n&&e>a(n)||!1}}))}function uoe(e,t={},n={}){let r={...null==t?void 0:t[ut.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{r={...r,...null==n?void 0:n[e]}})),r}function doe(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let t=0;t<7;t++){const n=e.addDays(o,t);a.push(n)}return a}function foe(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:i,addYears:l,getYear:s,isBefore:u,isSameYear:c}=r,d=a(e),f=i(t),p=[];let h=d;for(;u(h,f)||c(h,f);)p.push(h),h=l(h,1);return o&&p.reverse(),p.map((e=>{const t=n.formatYearDropdown(e,r);return{value:s(e),label:t,disabled:!1}}))}function j6(e,t,n,r){let o=(r??new Ra(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const poe=j6;function L6(e,t,n){return(n??new Ra(t)).format(e,"LLLL y")}const hoe=L6;function moe(e,t,n,r){let o=(r??new Ra(n)).format(e,"PPPP");return null!=t&&t.today&&(o=`Today, ${o}`),o}function goe(e){return"Choose the Month"}function voe(){return""}function yoe(e){return"Go to the Next Month"}function boe(e){return"Go to the Previous Month"}function woe(e,t,n){return(n??new Ra(t)).format(e,"cccc")}function xoe(e,t){return`Week ${e}`}function _oe(e){return"Week Number"}function $oe(e){return"Choose the Year"}const Soe=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:hoe,labelDay:poe,labelDayButton:j6,labelGrid:L6,labelGridcell:moe,labelMonthDropdown:goe,labelNav:voe,labelNext:yoe,labelPrevious:boe,labelWeekNumber:xoe,labelWeekNumberHeader:_oe,labelWeekday:woe,labelYearDropdown:$oe},Symbol.toStringTag,{value:"Module"})),rh=e=>e instanceof HTMLElement?e:null,g_=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Coe=e=>rh(e.querySelector("[data-animated-month]")),v_=e=>rh(e.querySelector("[data-animated-caption]")),y_=e=>rh(e.querySelector("[data-animated-weeks]")),Eoe=e=>rh(e.querySelector("[data-animated-nav]")),Poe=e=>rh(e.querySelector("[data-animated-weekdays]"));function Ooe(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=Ae(null),l=Ae(r),s=Ae(!1);Xc((()=>{const u=l.current;if(l.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==u.length&&r.length===u.length))return;const c=a.isSameMonth(r[0].date,u[0].date),d=a.isAfter(r[0].date,u[0].date),f=d?n[$o.caption_after_enter]:n[$o.caption_before_enter],p=d?n[$o.weeks_after_enter]:n[$o.weeks_before_enter],h=i.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(g_(m).forEach((e=>{if(!(e instanceof HTMLElement))return;const t=Coe(e);t&&e.contains(t)&&e.removeChild(t);const n=v_(e);n&&n.classList.remove(f);const r=y_(e);r&&r.classList.remove(p)})),i.current=m):i.current=null,s.current||c||o)return;const g=h instanceof HTMLElement?g_(h):[],v=g_(e.current);if(null!=v&&v.every((e=>e instanceof HTMLElement))&&g&&g.every((e=>e instanceof HTMLElement))){s.current=!0,e.current.style.isolation="isolate";const t=Eoe(e.current);t&&(t.style.zIndex="1"),v.forEach(((r,o)=>{const a=g[o];if(!a)return;r.style.position="relative",r.style.overflow="hidden";const i=v_(r);i&&i.classList.add(f);const l=y_(r);l&&l.classList.add(p);a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const u=Poe(a);u&&(u.style.opacity="0");const c=v_(a);c&&(c.classList.add(d?n[$o.caption_before_exit]:n[$o.caption_after_exit]),c.addEventListener("animationend",(()=>{s.current=!1,e.current&&(e.current.style.isolation=""),t&&(t.style.zIndex=""),i&&i.classList.remove(f),l&&l.classList.remove(p),r.style.position="",r.style.overflow="",r.contains(a)&&r.removeChild(a)})));const h=y_(a);h&&h.classList.add(d?n[$o.weeks_before_exit]:n[$o.weeks_after_exit]),r.insertBefore(a,r.firstChild)}))}}))}function Roe(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:l,broadcastCalendar:s}=n??{},{addDays:u,differenceInCalendarDays:c,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:h,endOfWeek:m,isAfter:g,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=r,w=s?v(o,r):i?y(o):b(o),x=c(s?f(a):i?p(h(a)):m(h(a)),w),_=d(a,o)+1,O=[];for(let e=0;e<=x;e++){const n=u(w,e);if(t&&g(n,t))break;O.push(n)}const k=(s?35:42)*_;if(l&&O.length<k){const e=k-O.length;for(let t=0;t<e;t++){const e=u(O[O.length-1],1);O.push(e)}}return O}function Toe(e){const t=[];return e.reduce(((e,n)=>{const r=n.weeks.reduce(((e,t)=>e.concat(t.days.slice())),t.slice());return e.concat(r.slice())}),t.slice())}function Noe(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;a.push(o)}return a}function E3(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:l=1}=e;let s=o||a||i;const{differenceInCalendarMonths:u,addMonths:c,startOfMonth:d}=r;if(n&&u(n,s)<l-1){s=c(n,-1*(l-1))}return t&&u(s,t)<0&&(s=t),d(s)}function koe(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:l,endOfWeek:s,getISOWeek:u,getWeek:c,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,h=e.reduce(((e,h)=>{const m=n.broadcastCalendar?d(h,r):n.ISOWeek?f(h):p(h),g=n.broadcastCalendar?a(h):n.ISOWeek?i(l(h)):s(l(h)),v=t.filter((e=>e>=m&&e<=g)),y=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<y){const e=t.filter((e=>{const t=y-v.length;return e>g&&e<=o(g,t)}));v.push(...e)}const b=v.reduce(((e,t)=>{const o=n.ISOWeek?u(t):c(t),a=e.find((e=>e.weekNumber===o)),i=new O6(t,h,r);return a?a.days.push(i):e.push(new _re(o,[i])),e}),[]),w=new xre(h,b);return e.push(w),e}),[]);return n.reverseMonths?h.reverse():h}function Doe(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:l,addYears:s,endOfYear:u,newDate:c,today:d}=t,{fromYear:f,toYear:p,fromMonth:h,toMonth:m}=e;!n&&h&&(n=h),!n&&f&&(n=t.newDate(f,0,1)),!r&&m&&(r=m),!r&&p&&(r=c(p,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=i(n):f?n=c(f,0,1):!n&&g&&(n=o(s(e.today??d(),-100))),r?r=l(r):p?r=c(p,11,31):!r&&g&&(r=u(e.today??d())),[n&&a(n),r&&a(r)]}function Aoe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:l,differenceInCalendarMonths:s}=r,u=o?a:1,c=i(e);return t&&s(t,e)<a?void 0:l(c,u)}function Moe(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:l,differenceInCalendarMonths:s}=r,u=o?a??1:1,c=i(e);return t&&s(c,t)<=0?void 0:l(c,-u)}function Ioe(e){return e.reduce(((e,t)=>e.concat(t.weeks.slice())),[].slice())}function Zv(e,t){const[n,r]=Ke(e);return[void 0===t?n:t,r]}function joe(e,t){const[n,r]=Doe(e,t),{startOfMonth:o,endOfMonth:a}=t,i=E3(e,n,r,t),[l,s]=Zv(i,e.month?i:void 0);We((()=>{const o=E3(e,n,r,t);s(o)}),[e.timeZone]);const u=Noe(l,r,e,t),c=koe(u,Roe(u,e.endMonth?a(e.endMonth):void 0,e,t),e,t),d=Ioe(c),f=Toe(c),p=Moe(l,n,e,t),h=Aoe(l,r,e,t),{disableNavigation:m,onMonthChange:g}=e,v=e=>{if(m)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),s(t),null==g||g(t)};return{months:c,weeks:d,days:f,navStart:n,navEnd:r,previousMonth:p,nextMonth:h,goToMonth:v,goToDay:e=>{(e=>d.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||v(e.date)}}}var Mi;function P3(e){return!e[hn.disabled]&&!e[hn.hidden]&&!e[hn.outside]}function Loe(e,t,n,r){let o,a=-1;for(const i of e){const e=t(i);P3(e)&&(e[hn.focused]&&a<Mi.FocusedModifier?(o=i,a=Mi.FocusedModifier):null!=r&&r.isEqualTo(i)&&a<Mi.LastFocused?(o=i,a=Mi.LastFocused):n(i.date)&&a<Mi.Selected?(o=i,a=Mi.Selected):e[hn.today]&&a<Mi.Today&&(o=i,a=Mi.Today))}return o||(o=e.find((e=>P3(t(e))))),o}function Foe(e,t,n,r,o,a,i){const{ISOWeek:l,broadcastCalendar:s}=a,{addDays:u,addMonths:c,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:h,endOfWeek:m,max:g,min:v,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:w}=i;let x={day:u,week:d,month:c,year:f,startOfWeek:e=>s?y(e,i):l?b(e):w(e),endOfWeek:e=>s?p(e):l?h(e):m(e)}[e](n,"after"===t?1:-1);return"before"===t&&r?x=g([r,x]):"after"===t&&o&&(x=v([o,x])),x}function F6(e,t,n,r,o,a,i,l=0){if(l>365)return;const s=Foe(e,t,n.date,r,o,a,i),u=!(!a.disabled||!ma(s,a.disabled,i)),c=!(!a.hidden||!ma(s,a.hidden,i)),d=new O6(s,s,i);return u||c?F6(e,t,d,r,o,a,i,l+1):d}function Woe(e,t,n,r,o){const{autoFocus:a}=e,[i,l]=Ke(),s=Loe(t.days,n,r||(()=>!1),i),[u,c]=Ke(a?s:void 0);return{isFocusTarget:e=>!(null==s||!s.isEqualTo(e)),setFocused:c,focused:u,blur:()=>{l(u),c(void 0)},moveFocus:(n,r)=>{if(!u)return;const a=F6(n,r,u,t.navStart,t.navEnd,e,o);a&&(t.goToDay(a),c(a))}}}function Boe(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Zv(n,o?n:void 0),l=o?n:a,{isSameDay:s}=t,u=e=>(null==l?void 0:l.some((t=>s(t,e))))??!1,{min:c,max:d}=e;return{selected:l,select:(e,t,n)=>{let a=[...l??[]];if(u(e)){if((null==l?void 0:l.length)===c||r&&1===(null==l?void 0:l.length))return;a=null==l?void 0:l.filter((t=>!s(t,e)))}else a=(null==l?void 0:l.length)===d?[e]:[...a,e];return o||i(a),null==o||o(a,e,t,n),a},isSelected:u}}function qoe(e,t,n=0,r=0,o=!1,a=qi){const{from:i,to:l}=t||{},{isSameDay:s,isAfter:u,isBefore:c}=a;let d;if(i||l){if(i&&!l)d=s(i,e)?0===n?{from:i,to:e}:o?{from:i,to:void 0}:void 0:c(e,i)?{from:e,to:i}:{from:i,to:e};else if(i&&l)if(s(i,e)&&s(l,e))d=o?{from:i,to:l}:void 0;else if(s(i,e))d={from:i,to:n>0?void 0:e};else if(s(l,e))d={from:e,to:n>0?void 0:e};else if(c(e,i))d={from:e,to:l};else if(u(e,i))d={from:i,to:e};else{if(!u(e,l))throw new Error("Invalid range");d={from:i,to:e}}}else d={from:e,to:n>0?void 0:e};if(null!=d&&d.from&&null!=d&&d.to){const t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}function zoe(e,t,n=qi){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let e=0;e<=i;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function O3(e,t,n=qi){return ha(e,t.from,!1,n)||ha(e,t.to,!1,n)||ha(t,e.from,!1,n)||ha(t,e.to,!1,n)}function Uoe(e,t,n=qi){const r=Array.isArray(t)?t:[t];if(r.filter((e=>"function"!=typeof e)).some((t=>"boolean"==typeof t?t:n.isDate(t)?ha(e,t,!1,n):A6(t,n)?t.some((t=>ha(e,t,!1,n))):aS(t)?!(!t.from||!t.to)&&O3(e,{from:t.from,to:t.to},n):D6(t)?zoe(e,t.dayOfWeek,n):T6(t)?n.isAfter(t.before,t.after)?O3(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):ma(e.from,t,n)||ma(e.to,t,n):!(!N6(t)&&!k6(t))&&(ma(e.from,t,n)||ma(e.to,t,n)))))return!0;const o=r.filter((e=>"function"==typeof e));if(o.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(o.some((e=>e(t))))return!0;t=n.addDays(t,1)}}return!1}function Hoe(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[l,s]=Zv(o,i?o:void 0),u=i?o:l;return{selected:u,select:(o,l,c)=>{const{min:d,max:f}=e,p=o?qoe(o,u,d,f,a,t):void 0;return r&&n&&null!=p&&p.from&&p.to&&Uoe({from:p.from,to:p.to},n,t)&&(p.from=o,p.to=void 0),i||s(p),null==i||i(p,o,l,c),p},isSelected:e=>u&&ha(u,e,!1,t)}}function Voe(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Zv(n,o?n:void 0),l=o?n:a,{isSameDay:s}=t;return{selected:l,select:(e,t,n)=>{let a=e;return!r&&l&&l&&s(e,l)&&(a=void 0),o||i(a),null==o||o(a,e,t,n),a},isSelected:e=>!!l&&s(l,e)}}function Goe(e,t){const n=Voe(e,t),r=Boe(e,t),o=Hoe(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Koe(e){var t;let n=e;n.timeZone&&(n={...e},n.today&&(n.today=new Er(n.today,n.timeZone)),n.month&&(n.month=new Er(n.month,n.timeZone)),n.defaultMonth&&(n.defaultMonth=new Er(n.defaultMonth,n.timeZone)),n.startMonth&&(n.startMonth=new Er(n.startMonth,n.timeZone)),n.endMonth&&(n.endMonth=new Er(n.endMonth,n.timeZone)),"single"===n.mode&&n.selected?n.selected=new Er(n.selected,n.timeZone):"multiple"===n.mode&&n.selected?n.selected=null==(t=n.selected)?void 0:t.map((e=>new Er(e,n.timeZone))):"range"===n.mode&&n.selected&&(n.selected={from:n.selected.from?new Er(n.selected.from,n.timeZone):void 0,to:n.selected.to?new Er(n.selected.to,n.timeZone):void 0}));const{components:r,formatters:o,labels:a,dateLib:i,locale:l,classNames:s}=or((()=>{const e={...iS,...n.locale};return{dateLib:new Ra({locale:e,weekStartsOn:n.broadcastCalendar?1:n.weekStartsOn,firstWeekContainsDate:n.firstWeekContainsDate,useAdditionalWeekYearTokens:n.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:n.useAdditionalDayOfYearTokens,timeZone:n.timeZone,numerals:n.numerals},n.dateLib),components:Zre(n.components),formatters:coe(n.formatters),labels:{...Soe,...n.labels},locale:e,classNames:{...sS(),...n.classNames}}}),[n.locale,n.broadcastCalendar,n.weekStartsOn,n.firstWeekContainsDate,n.useAdditionalWeekYearTokens,n.useAdditionalDayOfYearTokens,n.timeZone,n.numerals,n.dateLib,n.components,n.formatters,n.labels,n.classNames]),{captionLayout:u,mode:c,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:h,onDayFocus:m,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:y,onNextClick:b,onPrevClick:w,showWeekNumber:x,styles:_}=n,{formatCaption:O,formatDay:k,formatMonthDropdown:S,formatWeekNumber:D,formatWeekNumberHeader:C,formatWeekdayName:E,formatYearDropdown:N}=o,M=joe(n,i),{days:P,months:j,navStart:T,navEnd:A,previousMonth:R,nextMonth:L,goToMonth:z}=M,I=Xre(P,n,T,A,i),{isSelected:F,select:W,selected:$}=Goe(n,i)??{},{blur:q,focused:B,isFocusTarget:U,moveFocus:H,setFocused:K}=Woe(n,M,I,F??(()=>!1),i),{labelDayButton:V,labelGridcell:Y,labelGrid:G,labelMonthDropdown:X,labelNav:Q,labelPrevious:Z,labelNext:J,labelWeekday:ee,labelWeekNumber:te,labelWeekNumberHeader:ne,labelYearDropdown:oe}=a,ae=or((()=>doe(i,n.ISOWeek)),[i,n.ISOWeek]),ie=void 0!==c||void 0!==h,le=Ge((()=>{R&&(z(R),null==w||w(R))}),[R,z,w]),se=Ge((()=>{L&&(z(L),null==b||b(L))}),[z,L,b]),ue=Ge(((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),K(e),null==W||W(e.date,t,n),null==h||h(e.date,t,n)}),[W,h,K]),ce=Ge(((e,t)=>n=>{K(e),null==m||m(e.date,t,n)}),[m,K]),de=Ge(((e,t)=>n=>{q(),null==p||p(e.date,t,n)}),[q,p]),fe=Ge(((e,t)=>r=>{const o={ArrowLeft:[r.shiftKey?"month":"day","rtl"===n.dir?"after":"before"],ArrowRight:[r.shiftKey?"month":"day","rtl"===n.dir?"before":"after"],ArrowDown:[r.shiftKey?"year":"week","after"],ArrowUp:[r.shiftKey?"year":"week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];H(e,t)}null==g||g(e.date,t,r)}),[H,g,n.dir]),pe=Ge(((e,t)=>n=>{null==v||v(e.date,t,n)}),[v]),he=Ge(((e,t)=>n=>{null==y||y(e.date,t,n)}),[y]),me=Ge((e=>t=>{const n=Number(t.target.value),r=i.setMonth(i.startOfMonth(e),n);z(r)}),[i,z]),ge=Ge((e=>t=>{const n=Number(t.target.value),r=i.setYear(i.startOfMonth(e),n);z(r)}),[i,z]),{className:ve,style:ye}=or((()=>({className:[s[ut.Root],n.className].filter(Boolean).join(" "),style:{...null==_?void 0:_[ut.Root],...n.style}})),[s,n.className,n.style,_]),be=Jre(n),we=Ae(null);Ooe(we,!!n.animate,{classNames:s,months:j,focused:B,dateLib:i});const xe={dayPickerProps:n,selected:$,select:W,isSelected:F,months:j,nextMonth:L,previousMonth:R,goToMonth:z,getModifiers:I,components:r,classNames:s,styles:_,labels:a,formatters:o};return re.createElement(R6.Provider,{value:xe},re.createElement(r.Root,{rootRef:n.animate?we:void 0,className:ve,style:ye,dir:n.dir,id:n.id,lang:n.lang,nonce:n.nonce,title:n.title,role:n.role,"aria-label":n["aria-label"],...be},re.createElement(r.Months,{className:s[ut.Months],style:null==_?void 0:_[ut.Months]},!n.hideNavigation&&!d&&re.createElement(r.Nav,{"data-animated-nav":n.animate?"true":void 0,className:s[ut.Nav],style:null==_?void 0:_[ut.Nav],"aria-label":Q(),onPreviousClick:le,onNextClick:se,previousMonth:R,nextMonth:L}),j.map(((e,t)=>re.createElement(r.Month,{"data-animated-month":n.animate?"true":void 0,className:s[ut.Month],style:null==_?void 0:_[ut.Month],key:t,displayIndex:t,calendarMonth:e},"around"===d&&!n.hideNavigation&&0===t&&re.createElement(r.PreviousMonthButton,{type:"button",className:s[ut.PreviousMonthButton],tabIndex:R?void 0:-1,"aria-disabled":!R||void 0,"aria-label":Z(R),onClick:le,"data-animated-button":n.animate?"true":void 0},re.createElement(r.Chevron,{disabled:!R||void 0,className:s[ut.Chevron],orientation:"rtl"===n.dir?"right":"left"})),re.createElement(r.MonthCaption,{"data-animated-caption":n.animate?"true":void 0,className:s[ut.MonthCaption],style:null==_?void 0:_[ut.MonthCaption],calendarMonth:e,displayIndex:t},null!=u&&u.startsWith("dropdown")?re.createElement(r.DropdownNav,{className:s[ut.Dropdowns],style:null==_?void 0:_[ut.Dropdowns]},"dropdown"===u||"dropdown-months"===u?re.createElement(r.MonthsDropdown,{className:s[ut.MonthsDropdown],"aria-label":X(),classNames:s,components:r,disabled:!!n.disableNavigation,onChange:me(e.date),options:loe(e.date,T,A,o,i),style:null==_?void 0:_[ut.Dropdown],value:i.getMonth(e.date)}):re.createElement("span",null,S(e.date,i)),"dropdown"===u||"dropdown-years"===u?re.createElement(r.YearsDropdown,{className:s[ut.YearsDropdown],"aria-label":oe(i.options),classNames:s,components:r,disabled:!!n.disableNavigation,onChange:ge(e.date),options:foe(T,A,o,i,!!n.reverseYears),style:null==_?void 0:_[ut.Dropdown],value:i.getYear(e.date)}):re.createElement("span",null,N(e.date,i)),re.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},O(e.date,i.options,i))):re.createElement(r.CaptionLabel,{className:s[ut.CaptionLabel],role:"status","aria-live":"polite"},O(e.date,i.options,i))),"around"===d&&!n.hideNavigation&&t===f-1&&re.createElement(r.NextMonthButton,{type:"button",className:s[ut.NextMonthButton],tabIndex:L?void 0:-1,"aria-disabled":!L||void 0,"aria-label":J(L),onClick:se,"data-animated-button":n.animate?"true":void 0},re.createElement(r.Chevron,{disabled:!L||void 0,className:s[ut.Chevron],orientation:"rtl"===n.dir?"left":"right"})),t===f-1&&"after"===d&&!n.hideNavigation&&re.createElement(r.Nav,{"data-animated-nav":n.animate?"true":void 0,className:s[ut.Nav],style:null==_?void 0:_[ut.Nav],"aria-label":Q(),onPreviousClick:le,onNextClick:se,previousMonth:R,nextMonth:L}),re.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===c||"range"===c,"aria-label":G(e.date,i.options,i)||void 0,className:s[ut.MonthGrid],style:null==_?void 0:_[ut.MonthGrid]},!n.hideWeekdays&&re.createElement(r.Weekdays,{"data-animated-weekdays":n.animate?"true":void 0,className:s[ut.Weekdays],style:null==_?void 0:_[ut.Weekdays]},x&&re.createElement(r.WeekNumberHeader,{"aria-label":ne(i.options),className:s[ut.WeekNumberHeader],style:null==_?void 0:_[ut.WeekNumberHeader],scope:"col"},C()),ae.map((e=>re.createElement(r.Weekday,{"aria-label":ee(e,i.options,i),className:s[ut.Weekday],key:String(e),style:null==_?void 0:_[ut.Weekday],scope:"col"},E(e,i.options,i))))),re.createElement(r.Weeks,{"data-animated-weeks":n.animate?"true":void 0,className:s[ut.Weeks],style:null==_?void 0:_[ut.Weeks]},e.weeks.map((e=>re.createElement(r.Week,{className:s[ut.Week],key:e.weekNumber,style:null==_?void 0:_[ut.Week],week:e},x&&re.createElement(r.WeekNumber,{week:e,style:null==_?void 0:_[ut.WeekNumber],"aria-label":te(e.weekNumber,{locale:l}),className:s[ut.WeekNumber],scope:"row",role:"rowheader"},D(e.weekNumber,i)),e.days.map((e=>{const{date:t}=e,o=I(e);if(o[hn.focused]=!o.hidden&&!(null==B||!B.isEqualTo(e)),o[oi.selected]=(null==F?void 0:F(t))||o.selected,aS($)){const{from:e,to:n}=$;o[oi.range_start]=!!(e&&n&&i.isSameDay(t,e)),o[oi.range_end]=!!(e&&n&&i.isSameDay(t,n)),o[oi.range_middle]=ha($,t,!0,i)}const a=uoe(o,_,n.modifiersStyles),l=Qre(o,s,n.modifiersClassNames),u=ie||o.hidden?void 0:Y(t,o,i.options,i);return re.createElement(r.Day,{key:`${i.format(t,"yyyy-MM-dd")}_${i.format(e.displayMonth,"yyyy-MM")}`,day:e,modifiers:o,className:l.join(" "),style:a,role:"gridcell","aria-selected":o.selected||void 0,"aria-label":u,"data-day":i.format(t,"yyyy-MM-dd"),"data-month":e.outside?i.format(t,"yyyy-MM"):void 0,"data-selected":o.selected||void 0,"data-disabled":o.disabled||void 0,"data-hidden":o.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":o.focused||void 0,"data-today":o.today||void 0},!o.hidden&&ie?re.createElement(r.DayButton,{className:s[ut.DayButton],style:null==_?void 0:_[ut.DayButton],type:"button",day:e,modifiers:o,disabled:o.disabled||void 0,tabIndex:U(e)?0:-1,"aria-label":V(t,o,i.options,i),onClick:ue(e,o),onBlur:de(e,o),onFocus:ce(e,o),onKeyDown:fe(e,o),onMouseEnter:pe(e,o),onMouseLeave:he(e,o)},k(t,i.options,i)):!o.hidden&&k(e.date,i.options,i))}))))))))))),n.footer&&re.createElement(r.Footer,{className:s[ut.Footer],style:null==_?void 0:_[ut.Footer],role:"status","aria-live":"polite"},n.footer)))}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(Mi||(Mi={}));var R3,Og={exports:{}},Yoe=Og.exports;function Xoe(){return R3||(R3=1,Og.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",u="month",c="quarter",d="year",f="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,u),a=n-o<0,i=t.clone().add(r+(a?-1:1),u);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:s,d:l,D:f,h:i,m:a,s:o,ms:r,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=g;var x="$isDayjsObject",_=function(e){return e instanceof D||!(!e||!e[x])},O=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var a=t.toLowerCase();w[a]&&(o=a),n&&(w[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var l=t.name;w[l]=t,o=l}return!r&&o&&(b=o),o||!r&&b},k=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new D(n)},S=y;S.l=O,S.i=_,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function g(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return this.$d.toString()!==p},v.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return k(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<k(e)},v.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!S.u(t)||t,c=S.p(e),p=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(l)},h=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return r?p(1,0):p(31,11);case u:return r?p(1,g):p(0,g+1);case s:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return p(r?v-w:v+(6-w),g);case l:case f:return h(y+"Hours",0);case i:return h(y+"Minutes",1);case a:return h(y+"Seconds",2);case o:return h(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,s=S.p(e),c="set"+(this.$u?"UTC":""),p=(n={},n[l]=c+"Date",n[f]=c+"Date",n[u]=c+"Month",n[d]=c+"FullYear",n[i]=c+"Hours",n[a]=c+"Minutes",n[o]=c+"Seconds",n[r]=c+"Milliseconds",n)[s],h=s===l?this.$D+(t-this.$W):t;if(s===u||s===d){var m=this.clone().set(f,1);m.$d[p](h),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[S.p(e)]()},v.add=function(r,c){var f,p=this;r=Number(r);var h=S.p(c),m=function(e){var t=k(p);return S.w(t.date(t.date()+Math.round(e*r)),p)};if(h===u)return this.set(u,this.$M+r);if(h===d)return this.set(d,this.$y+r);if(h===l)return m(1);if(h===s)return m(7);var g=(f={},f[a]=t,f[i]=n,f[o]=e,f)[h]||1,v=this.$d.getTime()+r*g;return S.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),a=this.$H,i=this.$m,l=this.$M,s=n.weekdays,u=n.months,c=n.meridiem,d=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},f=function(e){return S.s(a%12||12,e,"0")},h=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return S.s(t.$y,4,"0");case"M":return l+1;case"MM":return S.s(l+1,2,"0");case"MMM":return d(n.monthsShort,l,u,3);case"MMMM":return d(u,l);case"D":return t.$D;case"DD":return S.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,s,2);case"ddd":return d(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(a);case"HH":return S.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return h(a,i,!0);case"A":return h(a,i,!1);case"m":return String(i);case"mm":return S.s(i,2,"0");case"s":return String(t.$s);case"ss":return S.s(t.$s,2,"0");case"SSS":return S.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,f,p){var h,m=this,g=S.p(f),v=k(r),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,w=function(){return S.m(m,v)};switch(g){case d:h=w()/12;break;case u:h=w();break;case c:h=w()/3;break;case s:h=(b-y)/6048e5;break;case l:h=(b-y)/864e5;break;case i:h=b/n;break;case a:h=b/t;break;case o:h=b/e;break;default:h=b}return p?h:S.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=O(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),C=D.prototype;return k.prototype=C,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",l],["$M",u],["$y",d],["$D",f]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,D,k),e.$i=!0),k},k.locale=O,k.isDayjs=_,k.unix=function(e){return k(1e3*e)},k.en=w[b],k.Ls=w,k.p={},k}()),Og.exports}var Qoe=Xoe();const Zg=Oo(Qoe);function Aae({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="dropdown",buttonVariant:o="tertiary",formatters:a,components:i,dropdownMode:l="calendar",onDropdownModeChange:s,onMonthYearSelect:u,...c}){const d=sS(),f=e=>()=>{null==s||s(l===e?"calendar":e)},p=()=>{if("calendar"===l)return null;const e=l,t="months"===e?(c.month||new Date).getMonth():(c.month||new Date).getFullYear();return D.jsx(oie,{type:e,selectedValue:t,onSelect:t=>((e,t)=>{null==u||u(e,t),null==s||s("calendar")})(e,t),displayMonth:c.month||new Date,disabled:"function"==typeof c.disabled?c.disabled:void 0})};return D.jsx(Koe,{showOutsideDays:n,className:te("group/calendar bg-background [--cell-size:2.5rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...a},classNames:{root:te("w-auto",d.root),months:te("flex gap-s flex-col md:flex-row relative",d.months),month:te("flex flex-col w-full gap-s",d.month),month_grid:te("mx-xs",d.month_grid),nav:te("flex items-center gap-xxxs w-full absolute top-0 inset-x-0 justify-between pointer-events-none px-xs",d.nav),button_previous:te(mp({variant:o}),"size-(--cell-size) min-w-0 aria-disabled:opacity-50 p-0 select-none pointer-events-auto",d.button_previous,"calendar"!==l&&"pointer-events-none opacity-50"),button_next:te(mp({variant:o}),"size-(--cell-size) min-w-0 aria-disabled:opacity-50 p-0 select-none pointer-events-auto",d.button_next,"calendar"!==l&&"pointer-events-none opacity-50"),month_caption:te("flex items-center justify-center h-[40px] w-full px-(--cell-size)",d.month_caption),dropdowns:te("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5 pointer-events-auto",d.dropdowns),dropdown_root:te("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",d.dropdown_root),dropdown:te("absolute bg-popover inset-0 opacity-0",d.dropdown),caption_label:te("select-none font-medium","label"===r?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",d.caption_label),table:"w-full border-collapse",weekdays:te("flex",d.weekdays),weekday:te("rounded-m flex-1 text-sm text-gray-500 font-medium select-none",d.weekday),week:te("flex w-full mt-2 gap-xxxs",d.week),week_number_header:te("select-none w-(--cell-size)",d.week_number_header),week_number:te("text-[0.8rem] select-none text-muted-foreground",d.week_number),day:te("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none","[&:first-child]:before:hidden [&:last-child]:after:hidden",d.day),range_start:te("rounded-l-m bg-gray-100",d.range_start),range_middle:te("rounded-none bg-gray-100",d.range_middle),range_end:te("rounded-r-m bg-gray-100",d.range_end),today:te("shadow-[inset_0_0_0_1px_rgb(226,232,240)] rounded-m"),outside:te("pointer-events-none text-gray-400 opacity-30 ",d.outside),disabled:te("text-gray-300",d.disabled),hidden:te("invisible",d.hidden),...t},components:{Root:({className:e,rootRef:t,...n})=>D.jsx("div",{"data-slot":"calendar",ref:t,className:te(e),...n}),Chevron:({className:e,orientation:t,...n})=>"left"===t?D.jsx(g$,{className:te("size-5 text-gray-900",e),...n}):"right"===t?D.jsx(v$,{className:te("size-5 text-gray-900",e),...n}):D.jsx(rv,{className:te("size-5",e),...n}),DayButton:Zoe,WeekNumber:({children:e,...t})=>D.jsx("td",{...t,children:D.jsx("div",{className:"size-(--cell-size) flex items-center justify-center text-center",children:e})}),..."calendar"!==l?{MonthGrid:()=>D.jsx(p,{})}:{},MonthsDropdown:()=>D.jsx(T3,{type:"months",displayMonth:c.month||new Date,dropdownMode:l,onToggle:f("months")}),YearsDropdown:()=>D.jsx(T3,{type:"years",displayMonth:c.month||new Date,dropdownMode:l,onToggle:f("years")}),...i},...c})}function Zoe({className:e,day:t,modifiers:n,disabled:r,...o}){const a=sS(),i=O.useRef(null);O.useEffect((()=>{var e;n.focused&&(null==(e=i.current)||e.focus())}),[n.focused]);const l=D.jsx(Is,{ref:i,variant:"tertiary",size:"none",disabled:r,"data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:te(["flex h-10 w-10 items-center justify-center","rounded-m border-none text-base font-normal leading-none text-gray-900 outline-none focus:outline-none active:outline-none","transition-colors hover:bg-gray-100 hover:text-gray-900","data-[range-end=true]:rounded-m data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-m","data-[range-end=true]:bg-blue_100 data-[range-middle=true]:bg-gray-100 data-[range-start=true]:bg-blue_100","data-[range-start=true]:relative data-[range-start=true]:after:absolute data-[range-start=true]:after:inset-y-0 data-[range-start=true]:after:-right-[2px] data-[range-start=true]:after:z-10 data-[range-start=true]:after:w-[2px] data-[range-start=true]:after:bg-gray-100","data-[range-middle=true]:relative data-[range-middle=true]:before:absolute data-[range-middle=true]:before:inset-y-0 data-[range-middle=true]:before:-left-[2px] data-[range-middle=true]:before:z-10 data-[range-middle=true]:before:w-[2px] data-[range-middle=true]:before:bg-gray-100","data-[range-middle=true]:after:absolute data-[range-middle=true]:after:inset-y-0 data-[range-middle=true]:after:-right-[2px] data-[range-middle=true]:after:z-10 data-[range-middle=true]:after:w-[2px] data-[range-middle=true]:after:bg-gray-100","data-[range-end=true]:relative data-[range-end=true]:before:absolute data-[range-end=true]:before:inset-y-0 data-[range-end=true]:before:-left-[2px] data-[range-end=true]:before:z-10 data-[range-end=true]:before:w-[2px] data-[range-end=true]:before:bg-gray-100","data-[selected-single=true]:border-blue_100 data-[selected-single=true]:bg-blue_100 data-[selected-single=true]:text-white data-[selected-single=true]:hover:bg-blue_120","data-[range-end=true]:text-primary-foreground data-[range-middle=true]:text-accent-foreground","data-[range-start=true]:text-primary-foreground data-[selected-single=true]:text-white","group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10","dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70"].join(" "),a.day,e),...o});return r?D.jsx(fte,{theme:"dark",size:"small",tooltipText:"This date is not available",triggerProps:{asChild:!0},children:D.jsx("span",{children:l})}):l}function Joe({item:e,isSelected:t,onSelect:n}){return D.jsxs("div",{onClick:()=>n(e.value),className:te("relative flex cursor-default select-none items-center justify-start gap-xxs rounded-m p-xxs","text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","cursor-pointer focus:bg-accent focus:text-accent-foreground",t&&"bg-gray-100"),role:"button",tabIndex:0,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),n(e.value))},children:[D.jsx("div",{className:te("flex flex-1 items-center justify-start gap-xxs text-gray-900"),children:e.label}),t&&D.jsx("div",{className:"absolute right-xxs",children:D.jsx(nv,{size:20,className:"text-gray-900"})})]})}function eie({items:e,selectedValue:t,onSelect:n,className:r}){return D.jsx("div",{className:te("no-scrollbar flex max-h-[300px] flex-col gap-xxxs overflow-y-auto",r),children:e.map((e=>D.jsx(Joe,{item:e,isSelected:e.value===t,onSelect:n},e.key)))})}function T3({type:e,displayMonth:t,dropdownMode:n,onToggle:r}){const o="months"===e&&"years"===n||"years"===e&&"months"===n,a="months"===e?Zg(t).format("MMM"):Zg(t).format("YYYY");return D.jsxs(Is,{variant:"secondary",size:"s",onClick:r,disabled:o,type:"button",children:[a,D.jsx(rv,{size:16,className:"ml-xxxs"})]})}const W6=(e,t,n)=>{const r=new Date(e,t+1,0).getDate();for(let o=1;o<=r;o++){if(!n(new Date(e,t,o)))return!0}return!1},tie=(e,t)=>{for(let n=0;n<12;n++)if(W6(e,n,t))return!0;return!1},nie=(e,t)=>{const n=Array.from({length:12},((e,t)=>({value:t,label:Zg().month(t).format("MMMM"),key:t})));return t?n.filter((n=>W6(e,n.value,t))):n},rie=e=>{const t=Zg().year()-100,n=Array.from({length:200},((e,n)=>{const r=t+n;return{value:r,label:r.toString(),key:r}}));return e?n.filter((t=>tie(t.value,e))):n};function oie({type:e,selectedValue:t,onSelect:n,displayMonth:r,disabled:o}){const a="months"===e?nie(r.getFullYear(),o):rie(o);return D.jsx("div",{className:"border-t border-gray-200 px-xxs py-xxs",children:D.jsx(eie,{items:a,selectedValue:t,onSelect:n})})}const Mae=({as:e="div",children:t,className:n,...r})=>q(e,{className:te(n),...r},t);function iie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function aie(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>O.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return O.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=O.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,s=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=O.useMemo((()=>l),Object.values(l));return D.jsx(s.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const s=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,u=O.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},sie(r,...t)]}function sie(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return O.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function B6(e){const t=O.useRef(e);return O.useEffect((()=>{t.current=e})),O.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function cie({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=lie({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=B6(n);return[i,O.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function lie({defaultProp:e,onChange:t}){const n=O.useState(e),[r]=n,o=O.useRef(r),a=B6(t);return O.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}var Jg=null!=globalThis&&globalThis.document?O.useLayoutEffect:()=>{};function N3(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function q6(...e){return t=>{let n=!1;const r=e.map((e=>{const r=N3(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():N3(e[t],null)}}}}function z6(...e){return O.useCallback(q6(...e),e)}var U6=O.forwardRef(((e,t)=>{const{children:n,...r}=e,o=O.Children.toArray(n),a=o.find(die);if(a){const e=a.props.children,n=o.map((t=>t===a?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t));return D.jsx(m$,{...r,ref:t,children:O.isValidElement(e)?O.cloneElement(e,void 0,n):null})}return D.jsx(m$,{...r,ref:t,children:n})}));U6.displayName="Slot";var m$=O.forwardRef(((e,t)=>{const{children:n,...r}=e;if(O.isValidElement(n)){const e=pie(n),o=fie(r,n.props);return n.type!==O.Fragment&&(o.ref=t?q6(t,e):e),O.cloneElement(n,o)}return O.Children.count(n)>1?O.Children.only(null):null}));m$.displayName="SlotClone";var uie=({children:e})=>D.jsx(D.Fragment,{children:e});function die(e){return O.isValidElement(e)&&e.type===uie}function fie(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{a(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function pie(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var hie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],cS=hie.reduce(((e,t)=>{const n=O.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?U6:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),D.jsx(a,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function mie(e,t){return O.useReducer(((e,n)=>t[e][n]??e),e)}var H6=e=>{const{present:t,children:n}=e,r=gie(t),o="function"==typeof n?n({present:r.isPresent}):O.Children.only(n),a=z6(r.ref,vie(o));return"function"==typeof n||r.isPresent?O.cloneElement(o,{ref:a}):null};function gie(e){const[t,n]=O.useState(),r=O.useRef({}),o=O.useRef(e),a=O.useRef("none"),i=e?"mounted":"unmounted",[l,s]=mie(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect((()=>{const e=_g(r.current);a.current="mounted"===l?e:"none"}),[l]),Jg((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=_g(t);e?s("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?s("UNMOUNT"):s(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,s]),Jg((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=_g(r.current).includes(a.animationName);if(a.target===t&&i&&(s("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},l=e=>{e.target===t&&(a.current=_g(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")}),[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:O.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function _g(e){return(null==e?void 0:e.animationName)||"none"}function vie(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}H6.displayName="Presence";var yie=O.useId||(()=>{}),bie=0;function wie(e){const[t,n]=O.useState(yie());return Jg((()=>{e||n((e=>e??String(bie++)))}),[e]),e||(t?`radix-${t}`:"")}var lS="Collapsible",[xie,Iae]=aie(lS),[_ie,uS]=xie(lS),V6=O.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[s=!1,u]=cie({prop:r,defaultProp:o,onChange:i});return D.jsx(_ie,{scope:n,disabled:a,contentId:wie(),open:s,onOpenToggle:O.useCallback((()=>u((e=>!e))),[u]),children:D.jsx(cS.div,{"data-state":fS(s),"data-disabled":a?"":void 0,...l,ref:t})})}));V6.displayName=lS;var G6="CollapsibleTrigger",K6=O.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=uS(G6,n);return D.jsx(cS.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":fS(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:iie(e.onClick,o.onOpenToggle)})}));K6.displayName=G6;var dS="CollapsibleContent",Y6=O.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=uS(dS,e.__scopeCollapsible);return D.jsx(H6,{present:n||o.open,children:({present:e})=>D.jsx($ie,{...r,ref:t,present:e})})}));Y6.displayName=dS;var $ie=O.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=uS(dS,n),[l,s]=O.useState(r),u=O.useRef(null),c=z6(t,u),d=O.useRef(0),f=d.current,p=O.useRef(0),h=p.current,m=i.open||l,g=O.useRef(m),v=O.useRef(void 0);return O.useEffect((()=>{const e=requestAnimationFrame((()=>g.current=!1));return()=>cancelAnimationFrame(e)}),[]),Jg((()=>{const e=u.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),s(r)}}),[i.open,r]),D.jsx(cS.div,{"data-state":fS(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&o})}));function fS(e){return e?"open":"closed"}var Sie=V6;const jae=Sie,Lae=K6,Fae=Y6;export{Die as AlertDialog,cj as AlertDialogAction,lj as AlertDialogCancel,rj as AlertDialogContent,sj as AlertDialogDescription,ij as AlertDialogFooter,oj as AlertDialogHeader,bT as AlertDialogOverlay,nj as AlertDialogPortal,aj as AlertDialogTitle,Aie as AlertDialogTrigger,CT as Avatar,PT as AvatarFallback,ET as AvatarImage,Is as Button,Tie as ButtonLoader,Aae as Calendar,Zoe as CalendarDayButton,yj as Card,_j as CardContent,xj as CardDescription,$j as CardFooter,bj as CardHeader,wj as CardTitle,oL as Carousel,iL as CarouselContent,aL as CarouselItem,cL as CarouselNext,sL as CarouselPrevious,Rq as ChartContainer,jie as ChartLegend,kq as ChartLegendContent,Tq as ChartStyle,Iie as ChartTooltip,Nq as ChartTooltipContent,s2 as Checkbox,FN as ChipsItem,Dq as ChipsWrapper,jae as Collapsible,Fae as CollapsibleContent,Lae as CollapsibleTrigger,xae as ColorPicker,$ae as ColorPickerAlpha,Sae as ColorPickerEyeDropper,Eae as ColorPickerFormat,_ae as ColorPickerHue,Cae as ColorPickerOutput,ste as ColorPickerSelection,JN as Command,Bie as CommandDialog,_z as CommandEmpty,$z as CommandGroup,wz as CommandInput,Cz as CommandItem,xz as CommandList,Sz as CommandSeparator,Ez as CommandShortcut,pz as Dialog,Wie as DialogClose,QN as DialogContent,bz as DialogDescription,ZN as DialogFooter,vz as DialogHeader,XN as DialogOverlay,hz as DialogPortal,yz as DialogTitle,Fie as DialogTrigger,lH as Drawer,Hie as DrawerClose,dH as DrawerContent,mH as DrawerDescription,pH as DrawerFooter,fH as DrawerHeader,qk as DrawerOverlay,uH as DrawerPortal,hH as DrawerTitle,Uie as DrawerTrigger,eie as DropdownList,Joe as DropdownListItem,Gie as DropdownMenu,hK as DropdownMenuCheckboxItem,fK as DropdownMenuContent,Yie as DropdownMenuGroup,pK as DropdownMenuItem,gK as DropdownMenuLabel,Xie as DropdownMenuPortal,Zie as DropdownMenuRadioGroup,mK as DropdownMenuRadioItem,vK as DropdownMenuSeparator,yK as DropdownMenuShortcut,Qie as DropdownMenuSub,dK as DropdownMenuSubContent,uK as DropdownMenuSubTrigger,Kie as DropdownMenuTrigger,oie as DropdownSelector,T3 as DropdownTriggerButton,eae as Form,gY as FormControl,vY as FormDescription,tae as FormField,hY as FormItem,mY as FormLabel,yY as FormMessage,bY as FormSelect,xY as FormSelectContent,$Y as FormSelectGroup,_Y as FormSelectItem,SY as FormSelectLabel,CY as FormSelectSeparator,wY as FormSelectTrigger,EY as FormSelectValue,oae as HoverCard,GX as HoverCardContent,aae as HoverCardPortal,iae as HoverCardTrigger,Wc as Input,Oae as InputFile,kD as Label,Tae as Popover,Dae as PopoverAnchor,kae as PopoverContent,Nae as PopoverTrigger,dQ as Progress,OQ as RadioGroup,RQ as RadioGroupItem,Fv as Select,fY as SelectActions,lY as SelectCheckboxItem,Wv as SelectContent,pY as SelectFooter,XD as SelectGroup,L2 as SelectItem,QD as SelectLabel,cY as SelectMultiTrigger,dY as SelectScrollDownButton,uY as SelectScrollUpButton,ZD as SelectSeparator,j2 as SelectTrigger,M2 as SelectValue,TQ as Sheet,uae as SheetClose,BA as SheetContent,UA as SheetDescription,DQ as SheetFooter,qA as SheetHeader,WA as SheetOverlay,NQ as SheetPortal,zA as SheetTitle,lae as SheetTrigger,yJ as Sidebar,EJ as SidebarContent,SJ as SidebarFooter,PJ as SidebarGroup,RJ as SidebarGroupAction,TJ as SidebarGroupContent,OJ as SidebarGroupLabel,$J as SidebarHeader,_J as SidebarInput,xJ as SidebarInset,NJ as SidebarMenu,MJ as SidebarMenuAction,IJ as SidebarMenuBadge,AJ as SidebarMenuButton,kJ as SidebarMenuItem,jJ as SidebarMenuSkeleton,LJ as SidebarMenuSub,WJ as SidebarMenuSubButton,FJ as SidebarMenuSubItem,vJ as SidebarProvider,wJ as SidebarRail,CJ as SidebarSeparator,bJ as SidebarTrigger,u3 as Skeleton,YJ as Switch,cee as Table,uee as TableBody,mee as TableCaption,hee as TableCell,dee as TableFooter,pee as TableHead,lee as TableHeader,fee as TableRow,yae as Tabs,aee as TabsContent,bae as TabsControls,TM as TabsList,NM as TabsTrigger,vee as Textarea,lte as Tooltip,o6 as TooltipContent,Pae as TooltipProvider,ute as TooltipTrigger,fte as TooltipWrapper,mp as buttonVariants,te as cn,gee as getTextareaClassName,Mae as styledElement,Gv as uiSlice,dv as useCarousel,ed as useColorPicker,pae as useDeviceType,fae as useDeviceTypeUpdater,Ls as useFormField,mae as useIsDesktop,uJ as useIsMobile,hae as useIsTablet,Yv as useSidebar};
|