@wellesley/ui 1.0.206 → 1.0.207
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
|
@@ -75,7 +75,7 @@ function l6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&
|
|
|
75
75
|
*
|
|
76
76
|
* This source code is licensed under the MIT license found in the
|
|
77
77
|
* LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/function Z9(){if(ZC)return Et;ZC=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"),u=Symbol.for("react.server_context"),s=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"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){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 u:case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),Et.ContextConsumer=l,Et.ContextProvider=i,Et.Element=t,Et.ForwardRef=s,Et.Fragment=r,Et.Lazy=p,Et.Memo=f,Et.Portal=n,Et.Profiler=a,Et.StrictMode=o,Et.Suspense=c,Et.SuspenseList=d,Et.isAsyncMode=function(){return!1},Et.isConcurrentMode=function(){return!1},Et.isContextConsumer=function(e){return h(e)===l},Et.isContextProvider=function(e){return h(e)===i},Et.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Et.isForwardRef=function(e){return h(e)===s},Et.isFragment=function(e){return h(e)===r},Et.isLazy=function(e){return h(e)===p},Et.isMemo=function(e){return h(e)===f},Et.isPortal=function(e){return h(e)===n},Et.isProfiler=function(e){return h(e)===a},Et.isStrictMode=function(e){return h(e)===o},Et.isSuspense=function(e){return h(e)===c},Et.isSuspenseList=function(e){return h(e)===d},Et.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===s||t.$$typeof===e||void 0!==t.getModuleId)},Et.typeOf=h,Et}function J9(){return JC||(JC=1,y0.exports=Z9()),y0.exports}function cA(){if(eE)return b0;eE=1;var e=Ji(),t=lo();return b0=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function e4(){if(tE)return w0;tE=1;var e=cA();return w0=function(t){return e(t)&&t!=+t}}J9();var t4=e4();const n4=ao(t4);var r4=cA();const o4=ao(r4);var am=function(e){return lA(e)&&e.indexOf("%")===e.length-1},Fo=function(e){return o4(e)&&!n4(e)},Pm=function(e){return Fo(e)||lA(e)};function mx(e){return(mx="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 i4=["viewBox","children"],a4=["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"],nE=["points","pathLength"],x0={svg:i4,polygon:nE,polyline:nE},fA=["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"],s4=function(e,t,n){return function(r){return e(t,n,r),null}},l4=function(e,t,n){if(!uA(e)||"object"!==mx(e))return null;var r=null;return Object.keys(e).forEach((function(o){var a=e[o];fA.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=s4(a,t,n))})),r},u4=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},c4=function(e,t,n,r){var o,a=null!==(o=null==x0?void 0:x0[r])&&void 0!==o?o:[];return!Rm(e)&&(r&&a.includes(t)||a4.includes(t))||fA.includes(t)},dA=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(p.isValidElement(e)&&(r=e.props),!uA(r))return null;var o={};return Object.keys(r).forEach((function(e){var a;c4(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])})),o},f4=["children","width","height","viewBox","className","style","title","desc"];function vx(){return vx=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},vx.apply(this,arguments)}function d4(e,t){if(null==e)return{};var n,r,o=p4(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 p4(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 h4(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,a=e.className,i=e.style,l=e.title,u=e.desc,s=d4(e,f4),c=o||{width:n,height:r,x:0,y:0},d=Ya("recharts-surface",a);return de.createElement("svg",vx({},dA(s,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),de.createElement("title",null,l),de.createElement("desc",null,u),t)}var _0,rE,$0,oE,S0,iE,C0,aE,E0,sE,R0,lE,P0,uE,T0,cE,$m=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 m4(){if(rE)return _0;return rE=1,_0=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 v4(){if(oE)return $0;oE=1;var e=m4();return $0=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function pA(){if(iE)return S0;iE=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return S0=function(t){return e.test(t)}}function g4(){if(aE)return C0;return aE=1,C0=function(e){return e.split("")}}function y4(){if(sE)return E0;sE=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+")"+"?",u="[\\ufe0e\\ufe0f]?",s=u+l+("(?:\\u200d(?:"+[o,a,i].join("|")+")"+u+l+")*"),c="(?:"+[o+n+"?",n,a,i,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+s,"g");return E0=function(e){return e.match(d)||[]}}function b4(){if(lE)return R0;lE=1;var e=g4(),t=pA(),n=y4();return R0=function(r){return t(r)?n(r):e(r)}}function w4(){if(uE)return P0;uE=1;var e=v4(),t=pA(),n=b4(),r=E_();return P0=function(o){return function(a){a=r(a);var i=t(a)?n(a):void 0,l=i?i[0]:a.charAt(0),u=i?e(i,1).join(""):a.slice(1);return l[o]()+u}}}function x4(){if(cE)return T0;cE=1;var e=w4()("toUpperCase");return T0=e}var _4=x4();const hA=ao(_4);function sm(e){return function(){return e}}const mA=Math.cos,Tm=Math.sin,Ho=Math.sqrt,Om=Math.PI,dv=2*Om,gx=Math.PI,yx=2*gx,el=1e-6,$4=yx-el;function vA(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function S4(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vA;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 C4{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?vA:S4(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,u=r-t,s=a-e,c=i-t,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>el)if(Math.abs(c*l-u*s)>el&&o){let f=n-a,p=r-i,m=l*l+u*u,h=f*f+p*p,v=Math.sqrt(m),g=Math.sqrt(d),y=o*Math.tan((gx-Math.acos((m+d-h)/(2*v*g)))/2),b=y/g,w=y/v;Math.abs(b-1)>el&&this._append`L${e+b*s},${t+b*c}`,this._append`A${o},${o},0,0,${+(c*f>s*p)},${this._x1=e+w*l},${this._y1=t+w*u}`}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),u=e+i,s=t+l,c=1^a,d=a?r-o:o-r;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>el||Math.abs(this._y1-s)>el)&&this._append`L${u},${s}`,n&&(d<0&&(d=d%yx+yx),d>$4?this._append`A${n},${n},0,1,${c},${e-i},${t-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=s}`:d>el&&this._append`A${n},${n},0,${+(d>=gx)},${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 E4(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 C4(t)}const P_={draw(e,t){const n=Ho(t/Om);e.moveTo(n,0),e.arc(0,0,n,0,dv)}},R4={draw(e,t){const n=Ho(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()}},gA=Ho(1/3),P4=2*gA,T4={draw(e,t){const n=Ho(t/P4),r=n*gA;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},O4={draw(e,t){const n=Ho(t),r=-n/2;e.rect(r,r,n,n)}},A4=.8908130915292852,yA=Tm(Om/10)/Tm(7*Om/10),N4=Tm(dv/10)*yA,k4=-mA(dv/10)*yA,D4={draw(e,t){const n=Ho(t*A4),r=N4*n,o=k4*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=dv*t/5,i=mA(a),l=Tm(a);e.lineTo(l*n,-i*n),e.lineTo(i*r-l*o,l*r+i*o)}e.closePath()}},O0=Ho(3),I4={draw(e,t){const n=-Ho(t/(3*O0));e.moveTo(0,2*n),e.lineTo(-O0*n,-n),e.lineTo(O0*n,-n),e.closePath()}},_o=-.5,$o=Ho(3)/2,bx=1/Ho(12),M4=3*(bx/2+1),j4={draw(e,t){const n=Ho(t/M4),r=n/2,o=n*bx,a=r,i=n*bx+n,l=-a,u=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(l,u),e.lineTo(_o*r-$o*o,$o*r+_o*o),e.lineTo(_o*a-$o*i,$o*a+_o*i),e.lineTo(_o*l-$o*u,$o*l+_o*u),e.lineTo(_o*r+$o*o,_o*o-$o*r),e.lineTo(_o*a+$o*i,_o*i-$o*a),e.lineTo(_o*l+$o*u,_o*u-$o*l),e.closePath()}};function L4(e,t){let n=null,r=E4(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:sm(e||P_),t="function"==typeof t?t:sm(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:sm(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:sm(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function Ed(e){return(Ed="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 F4=["type","size","sizeType"];function wx(){return wx=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},wx.apply(this,arguments)}function fE(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 dE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fE(Object(n),!0).forEach((function(t){B4(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function B4(e,t,n){return(t=z4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z4(e){var t=q4(e,"string");return"symbol"==Ed(t)?t:t+""}function q4(e,t){if("object"!=Ed(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ed(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function W4(e,t){if(null==e)return{};var n,r,o=U4(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 U4(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 bA={symbolCircle:P_,symbolCross:R4,symbolDiamond:T4,symbolSquare:O4,symbolStar:D4,symbolTriangle:I4,symbolWye:j4},H4=Math.PI/180,V4=function(e){var t="symbol".concat(hA(e));return bA[t]||P_},G4=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*H4;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}},K4=function(e,t){bA["symbol".concat(hA(e))]=t},wA=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,u=dE(dE({},W4(e,F4)),{},{type:r,size:a,sizeType:l}),s=u.className,c=u.cx,d=u.cy,f=dA(u,!0);return c===+c&&d===+d&&a===+a?de.createElement("path",wx({},f,{className:Ya("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=V4(r),L4().type(t).size(G4(a,l,r))())})):null};function Vu(e){return(Vu="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 xx(){return xx=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},xx.apply(this,arguments)}function pE(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 Y4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pE(Object(n),!0).forEach((function(t){Rd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q4(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,_A(r.key),r)}}function Z4(e,t,n){return Q4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function J4(e,t,n){return t=Am(t),ej(e,xA()?Reflect.construct(t,n||[],Am(e).constructor):t.apply(e,n))}function ej(e,t){if(t&&("object"===Vu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tj(e)}function tj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(xA=function(){return!!e})()}function Am(e){return(Am=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nj(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&&_x(e,t)}function _x(e,t){return(_x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Rd(e,t,n){return(t=_A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _A(e){var t=rj(e,"string");return"symbol"==Vu(t)?t:t+""}function rj(e,t){if("object"!=Vu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Vu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}wA.registerSymbol=K4;var A0,hE,N0,mE,k0,vE,D0,gE,I0,yE,M0,bE,j0,wE,L0,xE,F0,_E,B0,$E,z0,SE,q0,CE,W0,EE,U0,RE,H0,PE,V0,TE,G0,OE,K0,AE,Y0,NE,X0,kE,Q0,DE,Z0,IE,J0,ME,eb,jE,So=32,T_=function(){function e(){return X4(this,e),J4(this,e,arguments)}return nj(e,p.PureComponent),Z4(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=So/2,r=So/6,o=So/3,a=e.inactive?t:e.color;if("plainline"===e.type)return de.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:So,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return de.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(So,"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 de.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(So/8,"h").concat(So,"v").concat(3*So/4,"h").concat(-So,"z"),className:"recharts-legend-icon"});if(de.isValidElement(e.legendIcon)){var i=Y4({},e);return delete i.legendIcon,de.cloneElement(e.legendIcon,i)}return de.createElement(wA,{fill:a,cx:n,cy:n,size:So,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:So,height:So},u={display:"horizontal"===o?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||a,c=Ya(Rd(Rd({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=Rm(t.value)?null:t.value;$m(!Rm(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 de.createElement("li",xx({className:c,style:u,key:"legend-item-".concat(n)},l4(e.props,t,n)),de.createElement(h4,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),de.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 de.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function oj(){if(hE)return A0;hE=1;var e=cv();return A0=function(){this.__data__=new e,this.size=0}}function ij(){if(mE)return N0;return mE=1,N0=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function aj(){if(vE)return k0;return vE=1,k0=function(e){return this.__data__.get(e)}}function sj(){if(gE)return D0;return gE=1,D0=function(e){return this.__data__.has(e)}}function lj(){if(yE)return I0;yE=1;var e=cv(),t=$_(),n=S_();return I0=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 O_(){if(bE)return M0;bE=1;var e=cv(),t=oj(),n=ij(),r=aj(),o=sj(),a=lj();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,M0=i}function uj(){if(wE)return j0;wE=1;return j0=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function cj(){if(xE)return L0;return xE=1,L0=function(e){return this.__data__.has(e)}}function $A(){if(_E)return F0;_E=1;var e=S_(),t=uj(),n=cj();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,F0=r}function fj(){if($E)return B0;return $E=1,B0=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 SA(){if(SE)return z0;return SE=1,z0=function(e,t){return e.has(t)}}function CA(){if(CE)return q0;CE=1;var e=$A(),t=fj(),n=SA();return q0=function(r,o,a,i,l,u){var s=1&a,c=r.length,d=o.length;if(c!=d&&!(s&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var m=-1,h=!0,v=2&a?new e:void 0;for(u.set(r,o),u.set(o,r);++m<c;){var g=r[m],y=o[m];if(i)var b=s?i(y,g,m,o,r,u):i(g,y,m,r,o,u);if(void 0!==b){if(b)continue;h=!1;break}if(v){if(!t(o,(function(e,t){if(!n(v,t)&&(g===e||l(g,e,a,i,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!l(g,y,a,i,u)){h=!1;break}}return u.delete(r),u.delete(o),h}}function EA(){if(EE)return W0;EE=1;var e=xr().Uint8Array;return W0=e}function dj(){if(RE)return U0;return RE=1,U0=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function A_(){if(PE)return H0;return PE=1,H0=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function pj(){if(TE)return V0;TE=1;var e=ic(),t=EA(),n=lv(),r=CA(),o=dj(),a=A_(),i=e?e.prototype:void 0,l=i?i.valueOf:void 0;return V0=function(e,i,u,s,c,d,f){switch(u){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 m=1&s;if(p||(p=a),e.size!=i.size&&!m)return!1;var h=f.get(e);if(h)return h==i;s|=2,f.set(e,i);var v=r(p(e),p(i),s,c,d,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(i)}return!1}}function N_(){if(OE)return G0;return OE=1,G0=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function RA(){if(AE)return K0;AE=1;var e=N_(),t=wr();return K0=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function hj(){if(NE)return Y0;return NE=1,Y0=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 PA(){if(kE)return X0;return kE=1,X0=function(){return[]}}function k_(){if(DE)return Q0;DE=1;var e=hj(),t=PA(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Q0=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function mj(){if(IE)return Z0;return IE=1,Z0=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function vj(){if(ME)return J0;ME=1;var e=Ji(),t=lo();return J0=function(n){return t(n)&&"[object Arguments]"==e(n)}}function D_(){if(jE)return eb;jE=1;var e=vj(),t=lo(),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 eb=a}Rd(T_,"displayName","Legend"),Rd(T_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var tb,LE,FE,nb,BE,rb,zE,ob,qE,ib,WE,md={exports:{}};function gj(){if(LE)return tb;return LE=1,tb=function(){return!1}}function I_(){return FE||(FE=1,e=md,t=md.exports,n=xr(),r=gj(),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),md.exports;var e,t,n,r,o,a,i,l}function pv(){if(BE)return nb;BE=1;var e=/^(?:0|[1-9]\d*)$/;return nb=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 M_(){if(zE)return rb;zE=1;return rb=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function yj(){if(qE)return ob;qE=1;var e=Ji(),t=M_(),n=lo(),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,ob=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function hv(){if(WE)return ib;return WE=1,ib=function(e){return function(t){return e(t)}}}md.exports;var UE,ab,HE,sb,VE,lb,GE,ub,KE,cb,YE,fb,XE,db,QE,pb,ZE,hb,JE,mb,eR,vb,tR,gb,nR,yb,rR,bb,oR,wb,iR,xb,aR,_b,sR,$b,lR,Sb,uR,Cb,cR,Eb,fR,Rb,dR,Pb,pR,Tb,hR,Ob,mR,Ab,vR,Nb,gR,kb,yR,Db,bR,Ib,wR,Mb,xR,jb,_R,Lb,$R,Fb,SR,Bb,CR,zb,ER,qb,RR,Wb,PR,Ub,TR,Hb,OR,Vb,AR,vd={exports:{}};function j_(){return UE||(UE=1,e=vd,t=vd.exports,n=rA(),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),vd.exports;var e,t,n,r,o,a,i}function TA(){if(HE)return ab;HE=1;var e=yj(),t=hv(),n=j_(),r=n&&n.isTypedArray,o=r?t(r):e;return ab=o}function OA(){if(VE)return sb;VE=1;var e=mj(),t=D_(),n=wr(),r=I_(),o=pv(),a=TA(),i=Object.prototype.hasOwnProperty;return sb=function(l,u){var s=n(l),c=!s&&t(l),d=!s&&!c&&r(l),f=!s&&!c&&!d&&a(l),p=s||c||d||f,m=p?e(l.length,String):[],h=m.length;for(var v in l)(u||i.call(l,v))&&(!p||!("length"==v||d&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,h)))&&m.push(v);return m}}function L_(){if(GE)return lb;GE=1;var e=Object.prototype;return lb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function AA(){if(KE)return ub;return KE=1,ub=function(e,t){return function(n){return e(t(n))}}}function bj(){if(YE)return cb;YE=1;var e=AA()(Object.keys,Object);return cb=e}function NA(){if(XE)return fb;XE=1;var e=L_(),t=bj(),n=Object.prototype.hasOwnProperty;return fb=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 Vd(){if(QE)return db;QE=1;var e=av(),t=M_();return db=function(n){return null!=n&&t(n.length)&&!e(n)}}function Gd(){if(ZE)return pb;ZE=1;var e=OA(),t=NA(),n=Vd();return pb=function(r){return n(r)?e(r):t(r)}}function kA(){if(JE)return hb;JE=1;var e=RA(),t=k_(),n=Gd();return hb=function(r){return e(r,n,t)}}function wj(){if(eR)return mb;eR=1;var e=kA(),t=Object.prototype.hasOwnProperty;return mb=function(n,r,o,a,i,l){var u=1&o,s=e(n),c=s.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=s[d];if(!(u?f in r:t.call(r,f)))return!1}var p=l.get(n),m=l.get(r);if(p&&m)return p==r&&m==n;var h=!0;l.set(n,r),l.set(r,n);for(var v=u;++d<c;){var g=n[f=s[d]],y=r[f];if(a)var b=u?a(y,g,f,r,n,l):a(g,y,f,n,r,l);if(!(void 0===b?g===y||i(g,y,o,a,l):b)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){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)&&(h=!1)}return l.delete(n),l.delete(r),h}}function xj(){if(tR)return vb;tR=1;var e=vl()(xr(),"DataView");return vb=e}function _j(){if(nR)return gb;nR=1;var e=vl()(xr(),"Promise");return gb=e}function DA(){if(rR)return yb;rR=1;var e=vl()(xr(),"Set");return yb=e}function IA(){if(oR)return bb;oR=1;var e=vl()(xr(),"WeakMap");return bb=e}function Kd(){if(iR)return wb;iR=1;var e=xj(),t=$_(),n=_j(),r=DA(),o=IA(),a=Ji(),i=oA(),l="[object Map]",u="[object Promise]",s="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),m=i(n),h=i(r),v=i(o),g=a;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=l||n&&g(n.resolve())!=u||r&&g(new r)!=s||o&&g(new o)!=c)&&(g=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 m:return u;case h:return s;case v:return c}return t}),wb=g}function $j(){if(aR)return xb;aR=1;var e=O_(),t=CA(),n=pj(),r=wj(),o=Kd(),a=wr(),i=I_(),l=TA(),u="[object Arguments]",s="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return xb=function(f,p,m,h,v,g){var y=a(f),b=a(p),w=y?s:o(f),x=b?s:o(p),_=(w=w==u?c:w)==c,E=(x=x==u?c:x)==c,S=w==x;if(S&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(S&&!_)return g||(g=new e),y||l(f)?t(f,p,m,h,v,g):n(f,p,w,m,h,v,g);if(!(1&m)){var k=_&&d.call(f,"__wrapped__"),C=E&&d.call(p,"__wrapped__");if(k||C){var N=k?f.value():f,O=C?p.value():p;return g||(g=new e),v(N,O,m,h,g)}}return!!S&&(g||(g=new e),r(f,p,m,h,v,g))}}function MA(){if(sR)return _b;sR=1;var e=$j(),t=lo();return _b=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))},_b}function Sj(){if(lR)return $b;lR=1;var e=O_(),t=MA();return $b=function(n,r,o,a){var i=o.length,l=i,u=!a;if(null==n)return!l;for(n=Object(n);i--;){var s=o[i];if(u&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<l;){var c=(s=o[i])[0],d=n[c],f=s[1];if(u&&s[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(a)var m=a(d,f,c,n,r,p);if(!(void 0===m?t(f,d,3,a,p):m))return!1}}return!0}}function jA(){if(uR)return Sb;uR=1;var e=Po();return Sb=function(t){return t==t&&!e(t)}}function Cj(){if(cR)return Cb;cR=1;var e=jA(),t=Gd();return Cb=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 LA(){if(fR)return Eb;return fR=1,Eb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function Ej(){if(dR)return Rb;dR=1;var e=Sj(),t=Cj(),n=LA();return Rb=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 Rj(){if(pR)return Pb;return pR=1,Pb=function(e,t){return null!=e&&t in Object(e)}}function Pj(){if(hR)return Tb;hR=1;var e=aA(),t=D_(),n=wr(),r=pv(),o=M_(),a=Hd();return Tb=function(i,l,u){for(var s=-1,c=(l=e(l,i)).length,d=!1;++s<c;){var f=a(l[s]);if(!(d=null!=i&&u(i,f)))break;i=i[f]}return d||++s!=c?d:!!(c=null==i?0:i.length)&&o(c)&&r(f,c)&&(n(i)||t(i))}}function Tj(){if(mR)return Ob;mR=1;var e=Rj(),t=Pj();return Ob=function(n,r){return null!=n&&t(n,r,e)}}function Oj(){if(vR)return Ab;vR=1;var e=MA(),t=sA(),n=Tj(),r=__(),o=jA(),a=LA(),i=Hd();return Ab=function(l,u){return r(l)&&o(u)?a(i(l),u):function(r){var o=t(r,l);return void 0===o&&o===u?n(r,l):e(u,o,3)}}}function Yd(){if(gR)return Nb;return gR=1,Nb=function(e){return e}}function Aj(){if(yR)return kb;return yR=1,kb=function(e){return function(t){return null==t?void 0:t[e]}}}function Nj(){if(bR)return Db;bR=1;var e=R_();return Db=function(t){return function(n){return e(n,t)}}}function kj(){if(wR)return Ib;wR=1;var e=Aj(),t=Nj(),n=__(),r=Hd();return Ib=function(o){return n(o)?e(r(o)):t(o)}}function F_(){if(xR)return Mb;xR=1;var e=Ej(),t=Oj(),n=Yd(),r=wr(),o=kj();return Mb=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 Dj(){if(_R)return jb;return _R=1,jb=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 Ij(){if($R)return Lb;return $R=1,Lb=function(e){return e!=e}}function Mj(){if(SR)return Fb;return SR=1,Fb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function jj(){if(CR)return Bb;CR=1;var e=Dj(),t=Ij(),n=Mj();return Bb=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function FA(){if(ER)return zb;ER=1;var e=jj();return zb=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function Lj(){if(RR)return qb;return RR=1,qb=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 BA(){if(PR)return Wb;return PR=1,Wb=function(){}}function Fj(){if(TR)return Ub;TR=1;var e=DA(),t=BA(),n=A_(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Ub=r}function Bj(){if(OR)return Hb;OR=1;var e=$A(),t=FA(),n=Lj(),r=SA(),o=Fj(),a=A_();return Hb=function(i,l,u){var s=-1,c=t,d=i.length,f=!0,p=[],m=p;if(u)f=!1,c=n;else if(d>=200){var h=l?null:o(i);if(h)return a(h);f=!1,c=r,m=new e}else m=l?[]:p;e:for(;++s<d;){var v=i[s],g=l?l(v):v;if(v=u||0!==v?v:0,f&&g==g){for(var y=m.length;y--;)if(m[y]===g)continue e;l&&m.push(g),p.push(v)}else c(m,g,u)||(m!==p&&m.push(g),p.push(v))}return p}}function zj(){if(AR)return Vb;AR=1;var e=F_(),t=Bj();return Vb=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}vd.exports;var qj=zj();const NR=ao(qj);function zA(e,t,n){return!0===t?NR(e,n):Rm(t)?NR(e,t):e}function Gu(e){return(Gu="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 Wj=["ref"];function kR(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 Ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kR(Object(n),!0).forEach((function(t){mv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Uj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DR(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,WA(r.key),r)}}function Hj(e,t,n){return DR(e.prototype,t),DR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vj(e,t,n){return t=Nm(t),Gj(e,qA()?Reflect.construct(t,n,Nm(e).constructor):t.apply(e,n))}function Gj(e,t){if(t&&("object"===Gu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Kj(e)}function Kj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(qA=function(){return!!e})()}function Nm(e){return(Nm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yj(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&&$x(e,t)}function $x(e,t){return($x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mv(e,t,n){return(t=WA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WA(e){var t=Xj(e,"string");return"symbol"==Gu(t)?t:t+""}function Xj(e,t){if("object"!=Gu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Qj(e,t){if(null==e)return{};var n,r,o=Zj(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 Zj(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 Jj(e){return e.value}function eL(e,t){if(de.isValidElement(e))return de.cloneElement(e,t);if("function"==typeof e)return de.createElement(e,t);t.ref;var n=Qj(t,Wj);return de.createElement(T_,n)}var Gb,MR,Kb,jR,Yb,LR,Xb,FR,Qb,BR,Zb,zR,Jb,qR,e1,WR,t1,UR,n1,HR,r1,VR,o1,GR,i1,KR,a1,YR,s1,XR,l1,QR,u1,ZR,c1,JR,f1,eP,d1,tP,p1,nP,h1,rP,IR=1,B_=function(){function e(){var t;Uj(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return mv(t=Vj(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return Yj(e,p.PureComponent),Hj(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)>IR||Math.abs(t.height-this.lastBoundingBox.height)>IR)&&(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?Ui({},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,u=r.chartWidth,s=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:((u||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:((s||0)-this.getBBoxSnapshot().height)/2}}else n="bottom"===i?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Ui(Ui({},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,u=Ui(Ui({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return de.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(t){e.wrapperNode=t}},eL(n,Ui(Ui({},this.props),{},{payload:zA(l,i,Jj)})))}}],[{key:"getWithHeight",value:function(e,t){var n=Ui(Ui({},this.defaultProps),e.props).layout;return"vertical"===n&&Fo(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function tL(){if(MR)return Gb;MR=1;var e=ic(),t=D_(),n=wr(),r=e?e.isConcatSpreadable:void 0;return Gb=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function UA(){if(jR)return Kb;jR=1;var e=N_(),t=tL();return Kb=function n(r,o,a,i,l){var u=-1,s=r.length;for(a||(a=t),l||(l=[]);++u<s;){var c=r[u];o>0&&a(c)?o>1?n(c,o-1,a,i,l):e(l,c):i||(l[l.length]=c)}return l},Kb}function nL(){if(LR)return Yb;return LR=1,Yb=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var u=i[e?l:++o];if(!1===n(a[u],u,a))break}return t}}}function rL(){if(FR)return Xb;FR=1;var e=nL()();return Xb=e}function oL(){if(BR)return Qb;BR=1;var e=rL(),t=Gd();return Qb=function(n,r){return n&&e(n,r,t)}}function iL(){if(zR)return Zb;zR=1;var e=Vd();return Zb=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 aL(){if(qR)return Jb;qR=1;var e=oL(),t=iL()(e);return Jb=t}function sL(){if(WR)return e1;WR=1;var e=aL(),t=Vd();return e1=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 lL(){if(UR)return t1;return UR=1,t1=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function uL(){if(HR)return n1;HR=1;var e=ac();return n1=function(t,n){if(t!==n){var r=void 0!==t,o=null===t,a=t==t,i=e(t),l=void 0!==n,u=null===n,s=n==n,c=e(n);if(!u&&!c&&!i&&t>n||i&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!a)return 1;if(!o&&!i&&!c&&t<n||c&&r&&a&&!o&&!i||u&&r&&a||!l&&a||!s)return-1}return 0}}function cL(){if(VR)return r1;VR=1;var e=uL();return r1=function(t,n,r){for(var o=-1,a=t.criteria,i=n.criteria,l=a.length,u=r.length;++o<l;){var s=e(a[o],i[o]);if(s)return o>=u?s:s*("desc"==r[o]?-1:1)}return t.index-n.index}}function fL(){if(GR)return o1;GR=1;var e=C_(),t=R_(),n=F_(),r=sL(),o=lL(),a=hv(),i=cL(),l=Yd(),u=wr();return o1=function(s,c,d){c=c.length?e(c,(function(e){return u(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(s,(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 z_(){if(KR)return i1;return KR=1,i1=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 HA(){if(YR)return a1;YR=1;var e=z_(),t=Math.max;return a1=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),u=Array(l);++i<l;)u[i]=a[r+i];i=-1;for(var s=Array(r+1);++i<r;)s[i]=a[i];return s[r]=o(u),e(n,this,s)}},a1}function dL(){if(XR)return s1;return XR=1,s1=function(e){return function(){return e}}}function VA(){if(QR)return l1;QR=1;var e=vl(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return l1=t}function pL(){if(ZR)return u1;ZR=1;var e=dL(),t=VA(),n=Yd();return u1=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function GA(){if(JR)return c1;JR=1;var e=Date.now;return c1=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)}},c1}function q_(){if(eP)return f1;eP=1;var e=pL(),t=GA()(e);return f1=t}function hL(){if(tP)return d1;tP=1;var e=Yd(),t=HA(),n=q_();return d1=function(r,o){return n(t(r,o,e),r+"")}}function mL(){if(nP)return p1;nP=1;var e=lv(),t=Vd(),n=pv(),r=Po();return p1=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 vL(){if(rP)return h1;rP=1;var e=UA(),t=fL(),n=hL(),r=mL(),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 h1=o}mv(B_,"displayName","Legend"),mv(B_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var gL=vL();const yL=ao(gL);function Pd(e){return(Pd="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 Sx(){return Sx=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},Sx.apply(this,arguments)}function bL(e,t){return $L(e)||_L(e,t)||xL(e,t)||wL()}function wL(){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 xL(e,t){if(e){if("string"==typeof e)return oP(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 oP(e,t)}}function oP(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 _L(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function $L(e){if(Array.isArray(e))return e}function iP(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 m1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iP(Object(n),!0).forEach((function(t){SL(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SL(e,t,n){return(t=CL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CL(e){var t=EL(e,"string");return"symbol"==Pd(t)?t:t+""}function EL(e,t){if("object"!=Pd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function RL(e){return Array.isArray(e)&&Pm(e[0])&&Pm(e[1])?e.join(" ~ "):e}var PL=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,u=void 0===l?{}:l,s=e.payload,c=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,v=e.accessibilityLayer,g=void 0!==v&&v,y=m1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=m1({margin:0},u),w=!G9(m),x=w?m:"",_=Ya("recharts-default-tooltip",f),E=Ya("recharts-tooltip-label",p);w&&h&&null!=s&&(x=h(m,s));var S=g?{role:"status","aria-live":"assertive"}:{};return de.createElement("div",Sx({className:_,style:y},S),de.createElement("p",{className:E,style:b},de.isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(d?yL(s,d):s).map((function(e,t){if("none"===e.type)return null;var r=m1({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||c||RL,a=e.value,l=e.name,u=a,d=l;if(null!=u&&null!=d){var f=o(a,l,e,t,s);if(Array.isArray(f)){var p=bL(f,2);u=p[0],d=p[1]}else u=f}return de.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},Pm(d)?de.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Pm(d)?de.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,de.createElement("span",{className:"recharts-tooltip-item-value"},u),de.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return de.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Td(e){return(Td="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 lm(e,t,n){return(t=TL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TL(e){var t=OL(e,"string");return"symbol"==Td(t)?t:t+""}function OL(e,t){if("object"!=Td(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Td(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var cd="recharts-tooltip-wrapper",AL={visibility:"hidden"};function NL(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ya(cd,lm(lm(lm(lm({},"".concat(cd,"-right"),Fo(n)&&t&&Fo(t.x)&&n>=t.x),"".concat(cd,"-left"),Fo(n)&&t&&Fo(t.x)&&n<t.x),"".concat(cd,"-bottom"),Fo(r)&&t&&Fo(t.y)&&r>=t.y),"".concat(cd,"-top"),Fo(r)&&t&&Fo(t.y)&&r<t.y))}function aP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,s=e.viewBoxDimension;if(a&&Fo(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<u[r]?Math.max(d,u[r]):Math.max(c,u[r]):d+l>u[r]+s?Math.max(c,u[r]):Math.max(d,u[r])}function kL(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 DL(e){var t,n,r,o=e.allowEscapeViewBox,a=e.coordinate,i=e.offsetTopLeft,l=e.position,u=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return s.height>0&&s.width>0&&a?t=kL({translateX:n=aP({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=aP({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=AL,{cssProperties:t,cssClasses:NL({translateX:n,translateY:r,coordinate:a})}}function Ku(e){return(Ku="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 sP(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 lP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sP(Object(n),!0).forEach((function(t){Ex(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function IL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ML(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,YA(r.key),r)}}function jL(e,t,n){return ML(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LL(e,t,n){return t=km(t),FL(e,KA()?Reflect.construct(t,n,km(e).constructor):t.apply(e,n))}function FL(e,t){if(t&&("object"===Ku(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return BL(e)}function BL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(KA=function(){return!!e})()}function km(e){return(km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zL(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&&Cx(e,t)}function Cx(e,t){return(Cx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ex(e,t,n){return(t=YA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YA(e){var t=qL(e,"string");return"symbol"==Ku(t)?t:t+""}function qL(e,t){if("object"!=Ku(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uP=1,WL=function(){function e(){var t;IL(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ex(t=LL(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Ex(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 zL(e,p.PureComponent),jL(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>uP||Math.abs(e.height-this.state.lastBoundingBox.height)>uP)&&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,u=t.hasPayload,s=t.isAnimationActive,c=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,v=DL({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),g=v.cssClasses,y=v.cssProperties,b=lP(lP({transition:s&&n?"transform ".concat(o,"ms ").concat(a):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&u?"visible":"hidden",position:"absolute",top:0,left:0},h);return de.createElement("div",{tabIndex:-1,className:g,style:b,ref:function(t){e.wrapperNode=t}},i)}}])}(),UL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Sm={isSsr:UL(),get:function(e){return Sm[e]},set:function(e,t){if("string"==typeof e)Sm[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){Sm[t]=e[t]}))}}};function Yu(e){return(Yu="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 cP(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 fP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cP(Object(n),!0).forEach((function(t){W_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function HL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VL(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,QA(r.key),r)}}function GL(e,t,n){return VL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KL(e,t,n){return t=Dm(t),YL(e,XA()?Reflect.construct(t,n||[],Dm(e).constructor):t.apply(e,n))}function YL(e,t){if(t&&("object"===Yu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return XL(e)}function XL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(XA=function(){return!!e})()}function Dm(e){return(Dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function QL(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&&Rx(e,t)}function Rx(e,t){return(Rx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function W_(e,t,n){return(t=QA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QA(e){var t=ZL(e,"string");return"symbol"==Yu(t)?t:t+""}function ZL(e,t){if("object"!=Yu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function JL(e){return e.dataKey}function eF(e,t){return de.isValidElement(e)?de.cloneElement(e,t):"function"==typeof e?de.createElement(e,t):de.createElement(PL,t)}var v1,dP,g1,pP,y1,hP,b1,mP,w1,vP,x1,gP,U_=function(){function e(){return HL(this,e),KL(this,e,arguments)}return QL(e,p.PureComponent),GL(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,u=t.filterNull,s=t.isAnimationActive,c=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,v=t.viewBox,g=t.wrapperStyle,y=d??[];u&&y.length&&(y=zA(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,JL));var b=y.length>0;return de.createElement(WL,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:s,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:m,useTranslate3d:h,viewBox:v,wrapperStyle:g},eF(i,fP(fP({},this.props),{},{payload:y})))}}])}();function tF(){if(dP)return v1;dP=1;var e=xr();return v1=function(){return e.Date.now()}}function nF(){if(pP)return g1;pP=1;var e=/\s/;return g1=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function rF(){if(hP)return y1;hP=1;var e=nF(),t=/^\s+/;return y1=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function ZA(){if(mP)return b1;mP=1;var e=rF(),t=Po(),n=ac(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return b1=function(l){if("number"==typeof l)return l;if(n(l))return NaN;if(t(l)){var u="function"==typeof l.valueOf?l.valueOf():l;l=t(u)?u+"":u}if("string"!=typeof l)return 0===l?l:+l;l=e(l);var s=o.test(l);return s||a.test(l)?i(l.slice(2),s?2:8):r.test(l)?NaN:+l}}function JA(){if(vP)return w1;vP=1;var e=Po(),t=tF(),n=ZA(),r=Math.max,o=Math.min;return w1=function(a,i,l){var u,s,c,d,f,p,m=0,h=!1,v=!1,g=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function y(e){var t=u,n=s;return u=s=void 0,m=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||v&&e-m>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return v?o(t,c-(e-m)):t}(e))}function x(e){return f=void 0,g&&u?y(e):(u=s=void 0,d)}function _(){var e=t(),n=b(e);if(u=arguments,s=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(w,i),h?y(e):d}(p);if(v)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)&&(h=!!l.leading,c=(v="maxWait"in l)?r(n(l.maxWait)||0,i):c,g="trailing"in l?!!l.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=p=s=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},w1}function oF(){if(gP)return x1;gP=1;var e=JA(),t=Po();return x1=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})}}W_(U_,"displayName","Tooltip"),W_(U_,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Sm.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 iF=oF();const aF=ao(iF);function Od(e){return(Od="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 yP(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 um(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yP(Object(n),!0).forEach((function(t){sF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sF(e,t,n){return(t=lF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lF(e){var t=uF(e,"string");return"symbol"==Od(t)?t:t+""}function uF(e,t){if("object"!=Od(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Od(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function cF(e,t){return hF(e)||pF(e,t)||dF(e,t)||fF()}function fF(){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 dF(e,t){if(e){if("string"==typeof e)return bP(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 bP(e,t)}}function bP(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 pF(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function hF(e){if(Array.isArray(e))return e}var _1,wP,$1,xP,S1,_P,C1,$P,E1,SP,R1,CP,P1,EP,T1,RP,O1,PP,A1,TP,N1,OP,k1,AP,D1,NP,mF=p.forwardRef((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,u=void 0===l?"100%":l,s=e.minWidth,c=void 0===s?0:s,d=e.minHeight,f=e.maxHeight,m=e.children,h=e.debounce,v=void 0===h?0:h,g=e.id,y=e.className,b=e.onResize,w=e.style,x=void 0===w?{}:w,_=p.useRef(null),E=p.useRef();E.current=b,p.useImperativeHandle(t,(function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})}));var S=cF(p.useState({containerWidth:o.width,containerHeight:o.height}),2),k=S[0],C=S[1],N=p.useCallback((function(e,t){C((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);p.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;N(r,o),null===(t=E.current)||void 0===t||t.call(E,r,o)};v>0&&(e=aF(e,v,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=_.current.getBoundingClientRect(),r=n.width,o=n.height;return N(r,o),t.observe(_.current),function(){t.disconnect()}}),[N,v]);var O=p.useMemo((function(){var e=k.containerWidth,t=k.containerHeight;if(e<0||t<0)return null;$m(am(i)||am(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,u),$m(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=am(i)?e:i,o=am(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),$m(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,u,c,d,n);var a=!Array.isArray(m)&&u4(m.type).endsWith("Chart");return de.Children.map(m,(function(e){return de.isValidElement(e)?p.cloneElement(e,um({width:r,height:o},a?{style:um({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,m,u,f,d,c,k,i]);return de.createElement("div",{id:g?"".concat(g):void 0,className:Ya("recharts-responsive-container",y),style:um(um({},x),{},{width:i,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:_},O)}));function H_(){if(wP)return _1;wP=1;var e=AA()(Object.getPrototypeOf,Object);return _1=e}function vF(){if(xP)return $1;xP=1;var e=Ji(),t=H_(),n=lo(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,l=a.call(Object);return $1=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=i.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&a.call(u)==l}}function gF(){if(_P)return S1;_P=1;var e=ZA(),t=1/0;return S1=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function eN(){if($P)return C1;$P=1;var e=VA();return C1=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function tN(){if(SP)return E1;SP=1;var e=gF();return E1=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function V_(){if(CP)return R1;return CP=1,R1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function nN(){if(EP)return P1;EP=1;var e=eN(),t=lv(),n=Object.prototype.hasOwnProperty;return P1=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 vv(){if(RP)return T1;RP=1;var e=nN(),t=eN();return T1=function(n,r,o,a){var i=!o;o||(o={});for(var l=-1,u=r.length;++l<u;){var s=r[l],c=a?a(o[s],n[s],s,o,n):void 0;void 0===c&&(c=n[s]),i?t(o,s,c):e(o,s,c)}return o}}function rN(){if(PP)return O1;PP=1;var e=vv(),t=Gd();return O1=function(n,r){return n&&e(r,t(r),n)}}function yF(){if(TP)return A1;return TP=1,A1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function bF(){if(OP)return N1;OP=1;var e=Po(),t=L_(),n=yF(),r=Object.prototype.hasOwnProperty;return N1=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 G_(){if(AP)return k1;AP=1;var e=OA(),t=bF(),n=Vd();return k1=function(r){return n(r)?e(r,!0):t(r)}}function wF(){if(NP)return D1;NP=1;var e=vv(),t=G_();return D1=function(n,r){return n&&e(r,t(r),n)}}var kP,I1,DP,M1,IP,j1,MP,L1,jP,F1,LP,B1,FP,z1,BP,q1,zP,W1,qP,U1,WP,H1,UP,V1,HP,G1,VP,K1,GP,Y1,KP,X1,YP,Q1,XP,Z1,QP,J1,ZP,ew,JP,tw,e2,gd={exports:{}};function xF(){return kP||(kP=1,e=gd,t=gd.exports,n=xr(),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}),gd.exports;var e,t,n,r,o,a,i}function gv(){if(DP)return I1;return DP=1,I1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function _F(){if(IP)return M1;IP=1;var e=vv(),t=k_();return M1=function(n,r){return e(n,t(n),r)}}function oN(){if(MP)return j1;MP=1;var e=N_(),t=H_(),n=k_(),r=PA(),o=Object.getOwnPropertySymbols;return j1=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function $F(){if(jP)return L1;jP=1;var e=vv(),t=oN();return L1=function(n,r){return e(n,t(n),r)}}function SF(){if(LP)return F1;LP=1;var e=RA(),t=oN(),n=G_();return F1=function(r){return e(r,n,t)}}function CF(){if(FP)return B1;FP=1;var e=Object.prototype.hasOwnProperty;return B1=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 K_(){if(BP)return z1;BP=1;var e=EA();return z1=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function EF(){if(zP)return q1;zP=1;var e=K_();return q1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function RF(){if(qP)return W1;qP=1;var e=/\w*$/;return W1=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function PF(){if(WP)return U1;WP=1;var e=ic(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return U1=function(e){return n?Object(n.call(e)):{}}}function TF(){if(UP)return H1;UP=1;var e=K_();return H1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function OF(){if(HP)return V1;HP=1;var e=K_(),t=EF(),n=RF(),r=PF(),o=TF();return V1=function(a,i,l){var u=a.constructor;switch(i){case"[object ArrayBuffer]":return e(a);case"[object Boolean]":case"[object Date]":return new u(+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 u;case"[object Number]":case"[object String]":return new u(a);case"[object RegExp]":return n(a);case"[object Symbol]":return r(a)}}}function yv(){if(VP)return G1;VP=1;var e=Po(),t=Object.create;return G1=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 AF(){if(GP)return K1;GP=1;var e=yv(),t=H_(),n=L_();return K1=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function NF(){if(KP)return Y1;KP=1;var e=Kd(),t=lo();return Y1=function(n){return t(n)&&"[object Map]"==e(n)}}function kF(){if(YP)return X1;YP=1;var e=NF(),t=hv(),n=j_(),r=n&&n.isMap,o=r?t(r):e;return X1=o}function DF(){if(XP)return Q1;XP=1;var e=Kd(),t=lo();return Q1=function(n){return t(n)&&"[object Set]"==e(n)}}function IF(){if(QP)return Z1;QP=1;var e=DF(),t=hv(),n=j_(),r=n&&n.isSet,o=r?t(r):e;return Z1=o}function iN(){if(ZP)return J1;ZP=1;var e=O_(),t=V_(),n=nN(),r=rN(),o=wF(),a=xF(),i=gv(),l=_F(),u=$F(),s=kA(),c=SF(),d=Kd(),f=CF(),p=OF(),m=AF(),h=wr(),v=I_(),g=kF(),y=Po(),b=IF(),w=Gd(),x=G_(),_="[object Arguments]",E="[object Function]",S="[object Object]",k={};return k[_]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[S]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[E]=k["[object WeakMap]"]=!1,J1=function C(N,O,R,P,j,T){var D,I=1&O,A=2&O,L=4&O;if(R&&(D=j?R(N,P,j,T):R(N)),void 0!==D)return D;if(!y(N))return N;var M=h(N);if(M){if(D=f(N),!I)return i(N,D)}else{var z=d(N),F=z==E||"[object GeneratorFunction]"==z;if(v(N))return a(N,I);if(z==S||z==_||F&&!j){if(D=A||F?{}:m(N),!I)return A?u(N,o(D,N)):l(N,r(D,N))}else{if(!k[z])return j?N:{};D=p(N,z,I)}}T||(T=new e);var B=T.get(N);if(B)return B;T.set(N,D),b(N)?N.forEach((function(e){D.add(C(e,O,R,e,N,T))})):g(N)&&N.forEach((function(e,t){D.set(t,C(e,O,R,t,N,T))}));var $=M?void 0:(L?A?c:s:A?x:w)(N);return t($||N,(function(e,t){$&&(e=N[t=e]),n(D,t,C(e,O,R,t,N,T))})),D},J1}function MF(){if(JP)return ew;JP=1;var e=UA();return ew=function(t){return(null==t?0:t.length)?e(t,1):[]}}function jF(){if(e2)return tw;e2=1;var e=MF(),t=HA(),n=q_();return tw=function(r){return n(t(r,void 0,e),r+"")}}gd.exports;const LF={light:"",dark:".dark"},aN=p.createContext(null);function sN(){const e=p.useContext(aN);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const FF=p.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=p.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return I.jsx(aN.Provider,{value:{config:r},children:I.jsxs("div",{"data-chart":l,ref:a,className:le("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:[I.jsx(BF,{id:l,config:r}),I.jsx(mF,{children:n})]})})}));FF.displayName="Chart";const BF=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?I.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(LF).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},xZ=U_,zF=p.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:l,labelClassName:u,formatter:s,color:c,nameKey:d,labelKey:f},m)=>{const{config:h}=sN(),v=p.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=Px(h,n,r),s=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=h[i])?void 0:e.label)||i;return l?I.jsx("div",{className:le("font-medium",u),children:l(s,t)}):s?I.jsx("div",{className:le("font-medium",u),children:s}):null}),[i,l,t,o,u,h,f]);if(!e||null==t||!t.length)return null;const g=1===t.length&&"dot"!==r,y=t.length>10;return I.jsxs("div",{ref:m,className:le("grid min-w-[8rem] items-start gap-1.5 rounded-sm border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",y&&"min-w-[16rem]",n),children:[g?null:v,I.jsx("div",{className:le("grid gap-1.5",y&&"grid-cols-2 gap-x-4"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=Px(h,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"";return I.jsx("div",{className:le("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"),children:s&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?s(e.value,e.name,e,t,[e.payload]):I.jsxs(I.Fragment,{children:[null!=i&&i.icon?I.jsx(i.icon,{}):!a&&I.jsx("div",{className:le("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===r,"my-0.5":g&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),I.jsxs("div",{className:le("flex flex-1 justify-between leading-none",g?"items-end":"items-center"),children:[I.jsxs("div",{className:"grid gap-1.5",children:[g?v:null,I.jsx("span",{className:"text-muted-foreground",children:(null==i?void 0:i.label)||e.name})]}),e.value&&I.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));zF.displayName="ChartTooltip";const _Z=B_,qF=p.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:l}=sN(),u=p.useRef({});return p.useEffect((()=>{if(a&&u.current[a]){const e=u.current[a];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[a]),null!=n&&n.length?I.jsx("div",{ref:i,className:le("flex h-[150px] w-full flex-wrap items-center justify-center gap-6 overflow-y-auto pb-10",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,s=Px(l,e,i),c=!!o&&i===a;return I.jsxs("div",{ref:e=>{e?u.current[i]=e:delete u.current[i]},className:le("group flex cursor-pointer select-none items-center gap-2 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!=s&&s.icon&&!t?I.jsx(s.icon,{}):I.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:e.color||""}}),I.jsx("span",{className:"min-w-[max-content]",children:(null==s?void 0:s.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function Px(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]}qF.displayName="ChartLegend";const WF=({children:e,className:t})=>I.jsx("div",{className:le("flex flex-wrap gap-1",t),children:e}),t2=({text:e,icon:t,disabled:n,avatarSrc:r,onClick:o,onRemove:a})=>I.jsxs("div",{onClick:n?void 0:o,className:le("flex cursor-pointer items-center gap-xxxs rounded-sm bg-slate-100 p-xxs text-sm font-medium text-slate-900 transition-all hover:bg-slate-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-slate-100 text-slate-300"),children:[r&&I.jsxs(KO,{className:le("size-6 text-[10px]"),children:[I.jsx(YO,{src:r,alt:e}),I.jsx(XO,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,I.jsx("span",{children:e}),a&&I.jsx("button",{onClick:e=>{e.stopPropagation(),null==a||a()},disabled:n,className:"pointer-events-auto cursor-pointer ",children:I.jsx(o_,{size:16})})]});function bv(e){const t=p.useRef({value:e,previous:e});return p.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function wv(e){const[t,n]=p.useState(void 0);return ar((()=>{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 lN="Checkbox",[UF,$Z]=br(lN),[HF,VF]=UF(lN),GF=p.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=p.useState(null),m=_t(t,(e=>f(e))),h=p.useRef(!1),v=!d||!!d.closest("form"),[g=!1,y]=Wo({prop:o,defaultProp:a,onChange:s}),b=p.useRef(g);return p.useEffect((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>y(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,y]),p.createElement(HF,{scope:n,state:g,disabled:l},p.createElement(et.button,pe({type:"button",role:"checkbox","aria-checked":al(g)?"mixed":g,"aria-required":i,"data-state":uN(g),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:m,onKeyDown:Be(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Be(e.onClick,(e=>{y((e=>!!al(e)||!e)),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),v&&p.createElement(XF,{control:d,bubbles:!h.current,name:r,value:u,checked:g,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),KF="CheckboxIndicator",YF=p.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=VF(KF,n);return p.createElement(Ro,{present:r||al(a.state)||!0===a.state},p.createElement(et.span,pe({"data-state":uN(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),XF=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=p.useRef(null),i=bv(n),l=wv(t);return p.useEffect((()=>{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=al(n),o.call(e,!al(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),p.createElement("input",pe({type:"checkbox","aria-hidden":!0,defaultChecked:!al(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function al(e){return"indeterminate"===e}function uN(e){return al(e)?"indeterminate":e?"checked":"unchecked"}const cN=GF,QF=YF,ZF=Qi("transition-[border-width,background-color] duration-300 relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border border-blue_100 data-[state=unchecked]:border-slate-300 data-[state=checked]:text-primary-foreground disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-slate-100 md:hover:!border-[2px] md:hover:data-[state=checked]:bg-blue_120"}},defaultVariants:{size:"default",variant:"default"}}),Y_=p.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},a)=>{const[i]=p.useState(o.checked),[l,u]=p.useState(!1);p.useEffect((()=>{i!==o.checked&&u(!0)}),[o.checked]);const s=e=>"minus"===r?I.jsx(k6,{...e}):I.jsx(r_,{...e});return I.jsxs(cN,{ref:a,className:le(e,ZF({size:t,variant:n})),...o,children:[I.jsx("div",{className:le("transform-origin-center absolute left-0 top-0 size-full",{"bg-blue_100":(l||i)&&!o.disabled,"animate-fill-in":o.checked&&l,"animate-fill-out":!o.checked&&l})}),I.jsx(QF,{className:"relative flex items-center justify-center text-current",children:I.jsx(s,{className:"size-xxxs",color:o.disabled?"var(--slate-300)":"white"})})]})}));Y_.displayName=cN.displayName;var n2=1,JF=.9,eB=.8,tB=.17,nw=.1,rw=.999,nB=.9999,rB=.99,oB=/[\\\/_+.#"@\[\(\{&]/,iB=/[\\\/_+.#"@\[\(\{&]/g,aB=/[\s-]/,fN=/[\s-]/g;function Tx(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?n2:rB;var l=`${o},${a}`;if(void 0!==i[l])return i[l];for(var u,s,c,d,f=r.charAt(a),p=n.indexOf(f,o),m=0;p>=0;)(u=Tx(e,t,n,r,p+1,a+1,i))>m&&(p===o?u*=n2:oB.test(e.charAt(p-1))?(u*=eB,(c=e.slice(o,p-1).match(iB))&&o>0&&(u*=Math.pow(rw,c.length))):aB.test(e.charAt(p-1))?(u*=JF,(d=e.slice(o,p-1).match(fN))&&o>0&&(u*=Math.pow(rw,d.length))):(u*=tB,o>0&&(u*=Math.pow(rw,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=nB)),(u<nw&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((s=Tx(e,t,n,r,p+1,a+2,i))*nw>u&&(u=s*nw)),u>m&&(m=u),p=n.indexOf(f,p+1);return i[l]=m,m}function r2(e){return e.toLowerCase().replace(fN," ")}function sB(e,t,n){return Tx(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,r2(e),r2(t),0,0,{})}var fd='[cmdk-group=""]',ow='[cmdk-group-items=""]',lB='[cmdk-group-heading=""]',X_='[cmdk-item=""]',o2=`${X_}:not([aria-disabled="true"])`,Ox="cmdk-item-select",rl="data-value",uB=(e,t,n)=>sB(e,t,n),dN=p.createContext(void 0),Xd=()=>p.useContext(dN),pN=p.createContext(void 0),Q_=()=>p.useContext(pN),hN=p.createContext(void 0),mN=p.forwardRef(((e,t)=>{let n=qu((()=>{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=qu((()=>new Set)),o=qu((()=>new Map)),a=qu((()=>new Map)),i=qu((()=>new Set)),l=vN(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:m,loop:h,disablePointerSelection:v=!1,vimBindings:g=!0,...y}=e,b=p.useId(),w=p.useId(),x=p.useId(),_=p.useRef(null),E=wB();ul((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,S.emit()}}),[c]),ul((()=>{E(6,P)}),[]);let S=p.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)R(),N(),E(1,O);else if("value"===e&&(r||E(5,P),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))}S.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),k=p.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,C(t,r)),E(2,(()=>{N(),S.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]))),E(3,(()=>{R(),N(),n.current.value||O(),S.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();E(4,(()=>{R(),(null==t?void 0:t.getAttribute("id"))===e&&O(),S.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:u||e["aria-label"],disablePointerSelection:v,listId:b,inputId:x,labelId:w,listInnerRef:_})),[]);function C(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:uB;return e?a(e,n.current.search,t):0}function N(){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=_.current;T().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(ow);t?t.appendChild(e.parentElement===t?e:e.closest(`${ow} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${ow} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=_.current.querySelector(`${fd}[${rl}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function O(){let e=T().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(rl);S.setState("value",t||void 0)}function R(){var e,t,i,u;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let s=0;for(let o of r.current){let r=C(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(i=a.current.get(o))?void 0:i.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&s++}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=s}function P(){var e,t,n;let r=j();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(fd))?void 0:t.querySelector(lB))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function j(){var e;return null==(e=_.current)?void 0:e.querySelector(`${X_}[aria-selected="true"]`)}function T(){var e;return Array.from(null==(e=_.current)?void 0:e.querySelectorAll(o2))}function D(e){let t=T()[e];t&&S.setState("value",t.getAttribute(rl))}function I(e){var t;let n=j(),r=T(),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&&S.setState("value",a.getAttribute(rl))}function A(e){let t,n=j(),r=null==n?void 0:n.closest(fd);for(;r&&!t;)r=e>0?yB(r,fd):bB(r,fd),t=null==r?void 0:r.querySelector(o2);t?S.setState("value",t.getAttribute(rl)):I(e)}let L=()=>D(T().length-1),M=e=>{e.preventDefault(),e.metaKey?L():e.altKey?A(1):I(1)},z=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?A(-1):I(-1)};return p.createElement(et.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=y.onKeyDown)||t.call(y,e),!e.defaultPrevented)switch(e.key){case"n":case"j":g&&e.ctrlKey&&M(e);break;case"ArrowDown":M(e);break;case"p":case"k":g&&e.ctrlKey&&z(e);break;case"ArrowUp":z(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),L();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=j();if(t){let e=new Event(Ox);t.dispatchEvent(e)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:_B},u),xv(e,(e=>p.createElement(pN.Provider,{value:S},p.createElement(dN.Provider,{value:k},e)))))})),cB=p.forwardRef(((e,t)=>{var n,r;let o=p.useId(),a=p.useRef(null),i=p.useContext(hN),l=Xd(),u=vN(e),s=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;ul((()=>{if(!s)return l.item(o,null==i?void 0:i.id)}),[s]);let c=gN(o,a,[e.value,e.children,a],e.keywords),d=Q_(),f=cl((e=>e.value&&e.value===c.current)),m=cl((e=>!(!s&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function h(){var e,t;v(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function v(){d.setState("value",c.current,!0)}if(p.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(Ox,h),()=>t.removeEventListener(Ox,h)}),[m,e.onSelect,e.disabled]),!m)return null;let{disabled:g,value:y,onSelect:b,forceMount:w,keywords:x,..._}=e;return p.createElement(et.div,{ref:Ad([a,t]),..._,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||l.disablePointerSelection?void 0:v,onClick:g?void 0:h},e.children)})),fB=p.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=p.useId(),l=p.useRef(null),u=p.useRef(null),s=p.useId(),c=Xd(),d=cl((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));ul((()=>c.group(i)),[]),gN(i,l,[e.value,e.heading,u]);let f=p.useMemo((()=>({id:i,forceMount:o})),[o]);return p.createElement(et.div,{ref:Ad([l,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&p.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},n),xv(e,(e=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},p.createElement(hN.Provider,{value:f},e)))))})),dB=p.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=p.useRef(null),a=cl((e=>!e.search));return n||a?p.createElement(et.div,{ref:Ad([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),pB=p.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=Q_(),i=cl((e=>e.search)),l=cl((e=>e.value)),u=Xd(),s=p.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${X_}[${rl}="${encodeURIComponent(l)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return p.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),p.createElement(et.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":s,id:u.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),hB=p.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=p.useRef(null),i=p.useRef(null),l=Xd();return p.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)}}}),[]),p.createElement(et.div,{ref:Ad([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},xv(e,(e=>p.createElement("div",{ref:Ad([i,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),mB=p.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return p.createElement(rv,{open:n,onOpenChange:r},p.createElement(ov,{container:i},p.createElement(nc,{"cmdk-overlay":"",className:o}),p.createElement(rc,{"aria-label":e.label,"cmdk-dialog":"",className:a},p.createElement(mN,{ref:t,...l}))))})),vB=p.forwardRef(((e,t)=>cl((e=>0===e.filtered.count))?p.createElement(et.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),gB=p.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return p.createElement(et.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},xv(e,(e=>p.createElement("div",{"aria-hidden":!0},e))))})),Br=Object.assign(mN,{List:hB,Item:cB,Input:pB,Group:fB,Separator:dB,Dialog:mB,Empty:vB,Loading:gB});function yB(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function bB(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function vN(e){let t=p.useRef(e);return ul((()=>{t.current=e})),t}var ul=typeof window>"u"?p.useEffect:p.useLayoutEffect;function qu(e){let t=p.useRef();return void 0===t.current&&(t.current=e()),t}function Ad(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function cl(e){let t=Q_(),n=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,n,n)}function gN(e,t,n,r=[]){let o=p.useRef(),a=Xd();return ul((()=>{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}})(),u=r.map((e=>e.trim()));a.value(e,l,u),null==(i=t.current)||i.setAttribute(rl,l),o.current=l})),o}var wB=()=>{let[e,t]=p.useState(),n=qu((()=>new Map));return ul((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function xB(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function xv({asChild:e,children:t},n){return e&&p.isValidElement(t)?p.cloneElement(xB(t),{ref:t.ref},n(t.props.children)):n(t)}var _B={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const $B=rv,SZ=m_,SB=ov,CZ=oc,yN=p.forwardRef((({className:e,...t},n)=>(p.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{e.forEach((e=>e&&(e.style.filter="none")))}}),[]),I.jsx(nc,{ref:n,"data-testid":"dialog_overlay",className:le("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));yN.displayName=nc.displayName;const CB=Qi("",{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-slate-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-slate-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),EB=Qi("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),bN=p.forwardRef((({title:e,titleIcon:t,className:n,showClose:r=!0,closeVariant:o="outsideCard",closeSize:a="big",children:i,overlayClassName:l,childrenClassName:u,onBack:s,onCloseModal:c,renderFooter:d,...f},p)=>{const m=I.jsxs(oc,{className:le(CB({closeVariant:o})),children:[I.jsx(o_,{onClick:c,fill:"currentColor",className:le(EB({closeSize:a}))}),I.jsx("span",{className:"sr-only",children:"Close"})]});return I.jsxs(SB,{children:[I.jsx(yN,{className:l,onClick:c}),r&&"insideCard"!==o&&m,I.jsxs(rc,{ref:p,className:le("fixed left-[50%] top-[50%] z-100 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),...f,children:[e&&I.jsxs("h3",{className:"flex items-center justify-center gap-xxs border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",children:[t,e]}),I.jsx("div",{className:le("p-m",u),children:i}),r&&"insideCard"===o&&m,s&&I.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:s,className:"absolute left-m top-m",children:I.jsx(oO,{color:"var(--slate-400)",size:24})}),I.jsx(wN,{className:"empty:hidden",children:null==d?void 0:d()})]})]})}));bN.displayName=rc.displayName;const RB=({className:e,...t})=>I.jsx("div",{className:le("border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",e),...t});RB.displayName="DialogHeader";const wN=({className:e,...t})=>I.jsx("div",{className:le("flex border-t border-slate-200 p-m",e),...t});wN.displayName="DialogFooter";const PB=p.forwardRef((({className:e,...t},n)=>I.jsx(qd,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",e),...t})));PB.displayName=qd.displayName;const TB=p.forwardRef((({className:e,...t},n)=>I.jsx(Wd,{ref:n,className:le("text-sm text-muted-foreground",e),...t})));TB.displayName=Wd.displayName;const xN=p.forwardRef((({className:e,...t},n)=>I.jsx(Br,{ref:n,className:le("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));xN.displayName=Br.displayName;const EZ=({children:e,...t})=>I.jsx($B,{...t,children:I.jsx(bN,{className:"overflow-hidden p-0 shadow-lg",children:I.jsx(xN,{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})})}),OB=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:I.jsx(Br.Input,{ref:n,className:le("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})})));OB.displayName=Br.Input.displayName;const AB=p.forwardRef((({className:e,...t},n)=>I.jsx(Br.List,{ref:n,className:le("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));AB.displayName=Br.List.displayName;const NB=p.forwardRef(((e,t)=>I.jsx(Br.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));NB.displayName=Br.Empty.displayName;const kB=p.forwardRef((({className:e,...t},n)=>I.jsx(Br.Group,{ref:n,className:le("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})));kB.displayName=Br.Group.displayName;const DB=p.forwardRef((({className:e,...t},n)=>I.jsx(Br.Separator,{ref:n,className:le("-mx-1 h-px bg-border",e),...t})));DB.displayName=Br.Separator.displayName;const IB=p.forwardRef((({className:e,...t},n)=>I.jsx(Br.Item,{ref:n,className:le("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})));IB.displayName=Br.Item.displayName;const MB=({className:e,...t})=>I.jsx("span",{className:le("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function Ga(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 i2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function _N(...e){return t=>{let n=!1;const r=e.map((e=>{const r=i2(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():i2(e[t],null)}}}}function gl(...e){return p.useCallback(_N(...e),e)}function jB(e,t){const n=p.createContext(t),r=e=>{const{children:t,...r}=e,o=p.useMemo((()=>r),Object.values(r));return I.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=p.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function LB(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>p.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return p.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=p.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=p.useMemo((()=>l),Object.values(l));return I.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=p.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},FB(r,...t)]}function FB(...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 p.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}MB.displayName="CommandShortcut";var Im=null!=globalThis&&globalThis.document?p.useLayoutEffect:()=>{},BB=_d[" useId ".trim().toString()]||(()=>{}),zB=0;function iw(e){const[t,n]=p.useState(BB());return Im((()=>{e||n((e=>e??String(zB++)))}),[e]),e||(t?`radix-${t}`:"")}function fl(e){const t=p.useRef(e);return p.useEffect((()=>{t.current=e})),p.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function qB({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=WB({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=fl(n);return[i,p.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function WB({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),a=fl(t);return p.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function $N(e){const t=UB(e),n=p.forwardRef(((e,n)=>{const{children:r,...o}=e,a=p.Children.toArray(r),i=a.find(VB);if(i){const e=i.props.children,r=a.map((t=>t===i?p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null:t));return I.jsx(t,{...o,ref:n,children:p.isValidElement(e)?p.cloneElement(e,void 0,r):null})}return I.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function UB(e){const t=p.forwardRef(((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const e=KB(n),o=GB(r,n.props);return n.type!==p.Fragment&&(o.ref=t?_N(t,e):e),p.cloneElement(n,o)}return p.Children.count(n)>1?p.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var HB=Symbol("radix.slottable");function VB(e){return p.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===HB}function GB(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 KB(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 YB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ea=YB.reduce(((e,t)=>{const n=$N(`Primitive.${t}`),r=p.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function XB(e,t){e&&wi.flushSync((()=>e.dispatchEvent(t)))}function QB(e,t=(null==globalThis?void 0:globalThis.document)){const n=fl(e);p.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 a2,ZB="DismissableLayer",Ax="dismissableLayer.update",JB="dismissableLayer.pointerDownOutside",ez="dismissableLayer.focusOutside",SN=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),CN=p.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,s=p.useContext(SN),[c,d]=p.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,m]=p.useState({}),h=gl(t,(e=>d(e))),v=Array.from(s.layers),[g]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=c?v.indexOf(c):-1,w=s.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=rz((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));!x||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f),E=oz((e=>{const t=e.target;[...s.branches].some((e=>e.contains(t)))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f);return QB((e=>{b===s.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),p.useEffect((()=>{if(c)return n&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(a2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),s2(),()=>{n&&1===s.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=a2)}}),[c,f,n,s]),p.useEffect((()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),s2())}),[c,s]),p.useEffect((()=>{const e=()=>m({});return document.addEventListener(Ax,e),()=>document.removeEventListener(Ax,e)}),[]),I.jsx(ea.div,{...u,ref:h,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Ga(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ga(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ga(e.onPointerDownCapture,_.onPointerDownCapture)})}));CN.displayName=ZB;var tz="DismissableLayerBranch",nz=p.forwardRef(((e,t)=>{const n=p.useContext(SN),r=p.useRef(null),o=gl(t,r);return p.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),I.jsx(ea.div,{...e,ref:o})}));function rz(e,t=(null==globalThis?void 0:globalThis.document)){const n=fl(e),r=p.useRef(!1),o=p.useRef((()=>{}));return p.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){EN(JB,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 oz(e,t=(null==globalThis?void 0:globalThis.document)){const n=fl(e),r=p.useRef(!1);return p.useEffect((()=>{const e=e=>{e.target&&!r.current&&EN(ez,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 s2(){const e=new CustomEvent(Ax);document.dispatchEvent(e)}function EN(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?XB(o,a):o.dispatchEvent(a)}nz.displayName=tz;var aw="focusScope.autoFocusOnMount",sw="focusScope.autoFocusOnUnmount",l2={bubbles:!1,cancelable:!0},iz="FocusScope",RN=p.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=p.useState(null),s=fl(o),c=fl(a),d=p.useRef(null),f=gl(t,(e=>u(e))),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect((()=>{if(r){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ha(d.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ha(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ha(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,m.paused]),p.useEffect((()=>{if(l){c2.add(m);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(aw,l2);l.addEventListener(aw,s),l.dispatchEvent(t),t.defaultPrevented||(az(fz(PN(l)),{select:!0}),document.activeElement===e&&Ha(l))}return()=>{l.removeEventListener(aw,s),setTimeout((()=>{const t=new CustomEvent(sw,l2);l.addEventListener(sw,c),l.dispatchEvent(t),t.defaultPrevented||Ha(e??document.body,{select:!0}),l.removeEventListener(sw,c),c2.remove(m)}),0)}}}),[l,s,c,m]);const h=p.useCallback((e=>{if(!n&&!r||m.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]=sz(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ha(a,{select:!0})):(e.preventDefault(),n&&Ha(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,m.paused]);return I.jsx(ea.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})}));function az(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ha(r,{select:t}),document.activeElement!==n)return}function sz(e){const t=PN(e);return[u2(t,e),u2(t.reverse(),e)]}function PN(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 u2(e,t){for(const n of e)if(!lz(n,{upTo:t}))return n}function lz(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 uz(e){return e instanceof HTMLInputElement&&"select"in e}function Ha(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uz(e)&&t&&e.select()}}RN.displayName=iz;var c2=cz();function cz(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=f2(e,t),e.unshift(t)},remove(t){var n;e=f2(e,t),null==(n=e[0])||n.resume()}}}function f2(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function fz(e){return e.filter((e=>"A"!==e.tagName))}var dz="Portal",TN=p.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=p.useState(!1);Im((()=>i(!0)),[]);const l=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?s_.createPortal(I.jsx(ea.div,{...o,ref:t}),l):null}));function pz(e,t){return p.useReducer(((e,n)=>t[e][n]??e),e)}TN.displayName=dz;var _v=e=>{const{present:t,children:n}=e,r=hz(t),o="function"==typeof n?n({present:r.isPresent}):p.Children.only(n),a=gl(r.ref,mz(o));return"function"==typeof n||r.isPresent?p.cloneElement(o,{ref:a}):null};function hz(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),a=p.useRef("none"),i=e?"mounted":"unmounted",[l,u]=pz(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect((()=>{const e=cm(r.current);a.current="mounted"===l?e:"none"}),[l]),Im((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=cm(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Im((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=cm(r.current).includes(a.animationName);if(a.target===t&&i&&(u("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=cm(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)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function cm(e){return(null==e?void 0:e.animationName)||"none"}function mz(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)}_v.displayName="Presence";var lw=0;function vz(){p.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??d2()),document.body.insertAdjacentElement("beforeend",e[1]??d2()),lw++,()=>{1===lw&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),lw--}}),[])}function d2(){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 ON=bO(),uw=function(){},$v=p.forwardRef((function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:uw,onWheelCapture:uw,onTouchMoveCapture:uw}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,u=e.className,s=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,m=e.noIsolation,h=e.inert,v=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=e.gapMode,w=d_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,_=yO([n,t]),E=ir(ir({},w),o);return p.createElement(p.Fragment,null,c&&p.createElement(x,{sideCar:ON,removeScrollBar:s,shards:d,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:b}),i?p.cloneElement(p.Children.only(l),ir(ir({},E),{ref:_})):p.createElement(y,ir({},E,{className:u,ref:_}),l))}));$v.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$v.classNames={fullWidth:bd,zeroRight:yd};var Nx=!1;if(typeof window<"u")try{var fm=Object.defineProperty({},"passive",{get:function(){return Nx=!0,!0}});window.addEventListener("test",fm,fm),window.removeEventListener("test",fm,fm)}catch{Nx=!1}var Bu=!!Nx&&{passive:!1},gz=function(e){return"TEXTAREA"===e.tagName},AN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!gz(e)&&"visible"===n[t])},yz=function(e){return AN(e,"overflowY")},bz=function(e){return AN(e,"overflowX")},p2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),NN(e,r)){var o=kN(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wz=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},xz=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},NN=function(e,t){return"v"===e?yz(t):bz(t)},kN=function(e,t){return"v"===e?wz(t):xz(t)},_z=function(e,t){return"h"===e&&"rtl"===t?-1:1},$z=function(e,t,n,r,o){var a=_z(e,window.getComputedStyle(t).direction),i=a*r,l=n.target,u=t.contains(l),s=!1,c=i>0,d=0,f=0;do{var p=kN(e,l),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&NN(e,l)&&(d+=h,f+=m),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(s=!0),s},dm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},h2=function(e){return[e.deltaX,e.deltaY]},m2=function(e){return e&&"current"in e?e.current:e},Sz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cz=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ez=0,zu=[];function Rz(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(Ez++)[0],a=p.useState(p_)[0],i=p.useRef(e);p.useEffect((function(){i.current=e}),[e]),p.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=gO([e.lockRef.current],(e.shards||[]).map(m2),!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=p.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=dm(e),l=n.current,u="deltaX"in e?e.deltaX:l[0]-a[0],s="deltaY"in e?e.deltaY:l[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=p2(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=p2(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return $z(p,t,e,"h"===p?u:s,!0)}),[]),u=p.useCallback((function(e){var n=e;if(zu.length&&zu[zu.length-1]===a){var r="deltaY"in n?h2(n):dm(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Sz(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(i.current.shards||[]).map(m2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?l(n,u[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=p.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:Pz(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),c=p.useCallback((function(e){n.current=dm(e),r.current=void 0}),[]),d=p.useCallback((function(t){s(t.type,h2(t),t.target,l(t,e.lockRef.current))}),[]),f=p.useCallback((function(t){s(t.type,dm(t),t.target,l(t,e.lockRef.current))}),[]);p.useEffect((function(){return zu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Bu),document.addEventListener("touchmove",u,Bu),document.addEventListener("touchstart",c,Bu),function(){zu=zu.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,Bu),document.removeEventListener("touchmove",u,Bu),document.removeEventListener("touchstart",c,Bu)}}),[]);var m=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(a,{styles:Cz(o)}):null,m?p.createElement($O,{gapMode:e.gapMode}):null)}function Pz(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tz=xO(ON,Rz);var DN=p.forwardRef((function(e,t){return p.createElement($v,ir({},e,{ref:t,sideCar:Tz}))}));DN.classNames=$v.classNames;var Z_="Dialog",[IN,RZ]=LB(Z_),[Oz,Vo]=IN(Z_),MN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=p.useRef(null),u=p.useRef(null),[s=!1,c]=qB({prop:r,defaultProp:o,onChange:a});return I.jsx(Oz,{scope:t,triggerRef:l,contentRef:u,contentId:iw(),titleId:iw(),descriptionId:iw(),open:s,onOpenChange:c,onOpenToggle:p.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};MN.displayName=Z_;var jN="DialogTrigger",LN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(jN,n),a=gl(t,o.triggerRef);return I.jsx(ea.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":t$(o.open),...r,ref:a,onClick:Ga(e.onClick,o.onOpenToggle)})}));LN.displayName=jN;var J_="DialogPortal",[Az,FN]=IN(J_,{forceMount:void 0}),BN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Vo(J_,t);return I.jsx(Az,{scope:t,forceMount:n,children:p.Children.map(r,(e=>I.jsx(_v,{present:n||a.open,children:I.jsx(TN,{asChild:!0,container:o,children:e})})))})};BN.displayName=J_;var Mm="DialogOverlay",zN=p.forwardRef(((e,t)=>{const n=FN(Mm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Vo(Mm,e.__scopeDialog);return a.modal?I.jsx(_v,{present:r||a.open,children:I.jsx(kz,{...o,ref:t})}):null}));zN.displayName=Mm;var Nz=$N("DialogOverlay.RemoveScroll"),kz=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(Mm,n);return I.jsx(DN,{as:Nz,allowPinchZoom:!0,shards:[o.contentRef],children:I.jsx(ea.div,{"data-state":t$(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),dl="DialogContent",qN=p.forwardRef(((e,t)=>{const n=FN(dl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Vo(dl,e.__scopeDialog);return I.jsx(_v,{present:r||a.open,children:a.modal?I.jsx(Dz,{...o,ref:t}):I.jsx(Iz,{...o,ref:t})})}));qN.displayName=dl;var Dz=p.forwardRef(((e,t)=>{const n=Vo(dl,e.__scopeDialog),r=p.useRef(null),o=gl(t,n.contentRef,r);return p.useEffect((()=>{const e=r.current;if(e)return nv(e)}),[]),I.jsx(WN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ga(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:Ga(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ga(e.onFocusOutside,(e=>e.preventDefault()))})})),Iz=p.forwardRef(((e,t)=>{const n=Vo(dl,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return I.jsx(WN,{...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()}})})),WN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Vo(dl,n),u=p.useRef(null),s=gl(t,u);return vz(),I.jsxs(I.Fragment,{children:[I.jsx(RN,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:I.jsx(CN,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":t$(l.open),...i,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(Mz,{titleId:l.titleId}),I.jsx(Lz,{contentRef:u,descriptionId:l.descriptionId})]})]})})),e$="DialogTitle",UN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(e$,n);return I.jsx(ea.h2,{id:o.titleId,...r,ref:t})}));UN.displayName=e$;var HN="DialogDescription",VN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(HN,n);return I.jsx(ea.p,{id:o.descriptionId,...r,ref:t})}));VN.displayName=HN;var GN="DialogClose",KN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(GN,n);return I.jsx(ea.button,{type:"button",...r,ref:t,onClick:Ga(e.onClick,(()=>o.onOpenChange(!1)))})}));function t$(e){return e?"open":"closed"}KN.displayName=GN;var YN="DialogTitleWarning",[PZ,XN]=jB(YN,{contentName:dl,titleName:e$,docsSlug:"dialog"}),Mz=({titleId:e})=>{const t=XN(YN),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 p.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},jz="DialogDescriptionWarning",Lz=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${XN(jz).contentName}}.`;return p.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},Fz=MN,Bz=LN,zz=BN,qz=zN,Wz=qN,Uz=UN,Hz=VN,Vz=KN;function Gz(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 QN=de.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}),sc=()=>{const e=de.useContext(QN);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Gz("[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 Kz=24,Yz=typeof window<"u"?p.useLayoutEffect:p.useEffect;function v2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Xz(){return n$(/^Mac/)}function Qz(){return n$(/^iPhone/)}function g2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Zz(){return n$(/^iPad/)||Xz()&&navigator.maxTouchPoints>1}function ZN(){return Qz()||Zz()}function n$(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const cw=typeof document<"u"&&window.visualViewport;function y2(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function JN(e){for(y2(e)&&(e=e.parentElement);e&&!y2(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Jz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let fw,pm=0;function eq(e={}){let{isDisabled:t}=e;Yz((()=>{if(!t)return pm++,1===pm&&ZN()&&(fw=tq()),()=>{pm--,0===pm&&(null==fw||fw())}}),[t])}function tq(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=v2(nq(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=v2(dd(document,"touchstart",(n=>{e=JN(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),dd(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}),dd(document,"touchend",(e=>{let t=e.target;kx(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),dd(document,"focus",(e=>{let t=e.target;kx(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",cw&&(cw.height<window.innerHeight?requestAnimationFrame((()=>{b2(t)})):cw.addEventListener("resize",(()=>b2(t)),{once:!0}))})))}),!0),dd(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function nq(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function dd(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function b2(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=JN(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 kx(e){return e instanceof HTMLInputElement&&!Jz.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function rq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function oq(...e){return t=>e.forEach((e=>rq(e,t)))}function ek(...e){return p.useCallback(oq(...e),e)}const tk=new WeakMap;function _n(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&&tk.set(e,r)}function iq(e,t){if(!(e&&e instanceof HTMLElement))return;let n=tk.get(e);n&&(e.style[t]=n[t])}const $n=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function hm(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(", ")[$n(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[$n(t)?5:4]):null)}function aq(e){return 8*(Math.log(e+1)-2)}function dw(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function sq(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const Xt={DURATION:.5,EASE:[.32,.72,0,1]},nk=.4,lq=.25,uq=100,rk=8,Js=16,Dx=26,pw="vaul-dragging";function ok(e){const t=de.useRef(e);return de.useEffect((()=>{t.current=e})),de.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function cq({defaultProp:e,onChange:t}){const n=de.useState(e),[r]=n,o=de.useRef(r),a=ok(t);return de.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function ik({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=cq({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=ok(n);return[i,de.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function fq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:l="bottom",container:u,snapToSequentialPoint:s}){const[c,d]=ik({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=de.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);de.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const m=de.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),h=de.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),v=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===c||!n,g=de.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.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)),$n(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,u]),y=de.useMemo((()=>null!==h?null==g?void 0:g[h]:null),[g,h]),b=de.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(u),_n(r.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:$n(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==a&&u<a?_n(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"0"}):_n(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,a,o,d]);return de.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[c,e,n,g,b]),{isLastSnapPoint:m,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!g||void 0===a)return null;const r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?h+1:h-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===a)return;const u="bottom"===l||"right"===l?(y??0)-e:(y??0)+e,c=0===h,d=e>0;if(h===a-1&&_n(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`}),!s&&r>2&&!d)return void(i?t():b(g[0]));if(!s&&r>2&&d&&g&&n)return void b(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=$n(l)?window.innerHeight:window.innerWidth;if(r>nk&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m)return void b(g[n.length-1]);if(c&&e<0&&i&&t(),null===h)return;b(g[h+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<g[g.length-1]||("top"===l||"left"===l)&&t>g[g.length-1]||_n(r.current,{transform:$n(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const dq=()=>()=>{};function pq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=sc(),a=de.useRef(null),i=p.useMemo((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}de.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;sq(r&&!o?dw(document.body,{background:"black"}):dq,dw(t,{transformOrigin:$n(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Xt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xt.EASE.join(",")})`}));const n=dw(t,{borderRadius:"8px",overflow:"hidden",...$n(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*Xt.DURATION)}}}),[t,n,i])}let pd=null;function hq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,l]=de.useState((()=>typeof window<"u"?window.location.href:"")),u=de.useRef(0),s=de.useCallback((()=>{if(g2()&&null===pd&&e&&!a){pd={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:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=de.useCallback((()=>{if(g2()&&null!==pd&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,pd),window.requestAnimationFrame((()=>{o&&i!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),pd=null}}),[i]);return de.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),de.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&s(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,i,t,n,s,c]),{restorePositionSetting:c}}function ak({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=lq,scrollLockTimeout:s=uq,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:v=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:S=!1,repositionInputs:k=!0,onAnimationEnd:C,container:N,autoFocus:O=!1}){var R,P;const[j=!1,T]=ik({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*Xt.DURATION),e&&!v&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[D,I]=de.useState(!1),[A,L]=de.useState(!1),[M,z]=de.useState(!1),F=de.useRef(null),B=de.useRef(null),$=de.useRef(null),W=de.useRef(null),U=de.useRef(null),H=de.useRef(!1),V=de.useRef(null),q=de.useRef(0),K=de.useRef(!1),G=de.useRef(0),X=de.useRef(null),Q=de.useRef((null==(R=X.current)?void 0:R.getBoundingClientRect().height)||0),Y=de.useRef((null==(P=X.current)?void 0:P.getBoundingClientRect().width)||0),Z=de.useRef(0),J=de.useCallback((e=>{a&&e===oe.length-1&&(B.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ae,shouldFade:ie,getPercentageDragged:le}=fq({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:X,fadeFromIndex:f,overlayRef:F,onSnapPointChange:J,direction:w,container:N,snapToSequentialPoint:E});eq({isDisabled:!j||A||!v||M||!D||!k||!_});const{restorePositionSetting:ue}=hq({isOpen:j,modal:v,nested:y,hasBeenOpened:D,preventScrollRestoration:S,noBodyStyles:b});function se(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const a=null==(n=window.getSelection())?void 0:n.toString(),i=X.current?hm(X.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(B.current&&l.getTime()-B.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=U.current)?void 0:r.getTime())<s&&0===i||t)return U.current=l,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return U.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function fe(e){!A||!X.current||(X.current.classList.remove(pw),H.current=!1,L(!1),W.current=new Date),null==g||g(),e||T(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*Xt.DURATION)}function pe(){if(!X.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=hm(X.current,w);_n(X.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`}),_n(F.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&j&&_n(e,{borderRadius:"8px",overflow:"hidden",...$n(w)?{transform:`scale(${se()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${se()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Xt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xt.EASE.join(",")})`},!0)}return de.useEffect((()=>{var e;function t(){if(!X.current||!k)return;if(kx(document.activeElement)||K.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=X.current.getBoundingClientRect().height||0,i=o>.8*n;Z.current||(Z.current=o);const l=X.current.getBoundingClientRect().top;if(Math.abs(G.current-r)>60&&(K.current=!K.current),a&&a.length>0&&oe&&te){r+=oe[te]||0}if(G.current=r,o>t||K.current){const e=X.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?l:26)),X.current.style.height=h?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else X.current.style.height=`${Z.current}px`;a&&a.length>0&&!K.current?X.current.style.bottom="0px":X.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,oe]),de.useEffect((()=>(j&&(_n(document.documentElement,{scrollBehavior:"auto"}),B.current=new Date),()=>{iq(document.documentElement,"scrollBehavior")})),[j]),de.createElement(Fz,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?I(!0):fe(!0),T(e))},open:j},de.createElement(QN.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:X,overlayRef:F,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||X.current&&!X.current.contains(e.target)||(Q.current=(null==(t=X.current)?void 0:t.getBoundingClientRect().height)||0,Y.current=(null==(n=X.current)?void 0:n.getBoundingClientRect().width)||0,L(!0),$.current=new Date,ZN()&&window.addEventListener("touchend",(()=>H.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),q.current=$n(w)?e.pageY:e.pageX)},onRelease:function(e){if(!A||!X.current)return;X.current.classList.remove(pw),H.current=!1,L(!1),W.current=new Date;const t=hm(X.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===$.current)return;const n=W.current.getTime()-$.current.getTime(),r=q.current-($n(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(z(!0),setTimeout((()=>{z(!1)}),200)),a)return re({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>nk)return fe(),void(null==o||o(e,!1));var l;const s=Math.min(null!=(l=X.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=X.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:s)*u)return fe(),void(null==o||o(e,!1));null==o||o(e,!0),pe()},onDrag:function(e){if(X.current&&A){const t="bottom"===w||"right"===w?1:-1,n=(q.current-($n(w)?e.pageY:e.pageX))*t,o=n>0,l=a&&!c&&!o;if(l&&0===te)return;const u=Math.abs(n),s=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?Q.current:Y.current);const p=le(u,o);if(null!==p&&(d=p),l&&d>=1||!H.current&&!ce(e.target,o))return;if(X.current.classList.add(pw),H.current=!0,_n(X.current,{transition:"none"}),_n(F.current,{transition:"none"}),a&&ae({draggedDistance:n}),o&&!a){const e=aq(n),r=Math.min(-1*e,0)*t;return void _n(X.current,{transform:$n(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((ie||f&&te===f-1)&&(null==r||r(e,d),_n(F.current,{opacity:`${m}`,transition:"none"},!0)),s&&F.current&&i){const e=Math.min(se()+d*(1-se()),1),t=8-8*d,n=Math.max(0,14-14*d);_n(s,{borderRadius:`${t}px`,transform:$n(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=u*t;_n(X.current,{transform:$n(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:j,isDragging:A,shouldFade:ie,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;_n(X.current,{transform:$n(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;V.current&&window.clearTimeout(V.current),_n(X.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&X.current&&(V.current=setTimeout((()=>{const e=hm(X.current,w);_n(X.current,{transition:"none",transform:$n(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=$n(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&_n(X.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:$n(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:K,modal:v,snapPointsOffset:oe,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:b,container:N,autoFocus:O}},n))}const sk=de.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:l}=sc(),u=ek(t,n),s=r&&r.length>0;return l?de.createElement(qz,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&s?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));sk.displayName="Drawer.Overlay";const lk=de.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:l,onDrag:u,keyboardIsOpen:s,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:m,container:h,handleOnly:v,autoFocus:g}=sc(),[y,b]=de.useState(!1),w=ek(o,a),x=de.useRef(null),_=de.useRef(null),E=de.useRef(!1),S=m&&m.length>0;pq();function k(e){x.current=null,E.current=!1,l(e)}return de.useEffect((()=>{S&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),de.createElement(Wz,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&S?"true":"false","data-vaul-custom-container":h?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{v||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?s.current&&(s.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,v||(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(E.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 E.current=!0,!0})({x:n,y:t},p,o)?u(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,E.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),k(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),k(_.current)}})}));lk.displayName="Drawer.Content";const mq=250,vq=120,uk=de.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:s,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=sc(),m=de.useRef(null),h=de.useRef(!1);function v(){window.clearTimeout(m.current),h.current=!1}return de.createElement("div",{onClick:function(){h.current?v():window.setTimeout((()=>{!function(){if(a||e||h.current)return void v();if(v(),(!i||0===i.length)&&s)return void o();if(l===i[i.length-1]&&s)return void o();const t=i.findIndex((e=>e===l));if(-1===t)return;const n=i[t+1];u(n)}()}),vq)},onPointerCancel:v,onPointerDown:e=>{c&&f(e),m.current=window.setTimeout((()=>{h.current=!0}),mq)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},de.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function gq({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=sc();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return de.createElement(ak,{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 yq(e){const t=sc(),{container:n=t.container,...r}=e;return de.createElement(zz,{container:n,...r})}uk.displayName="Drawer.Handle";const Go={Root:ak,NestedRoot:gq,Content:lk,Overlay:sk,Trigger:Bz,Portal:yq,Handle:uk,Close:Vz,Title:Uz,Description:Hz},bq=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>I.jsx(Go.Root,{direction:t,shouldScaleBackground:e,...n});bq.displayName="Drawer";const TZ=Go.Trigger,wq=Go.Portal,OZ=Go.Close,ck=p.forwardRef((({className:e,...t},n)=>I.jsx(Go.Overlay,{ref:n,className:le("fixed inset-0 z-50 bg-black/5",e),...t})));ck.displayName=Go.Overlay.displayName;const xq=p.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>I.jsxs(wq,{children:[I.jsx(ck,{}),I.jsxs(Go.Content,{ref:o,className:le("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&&I.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));xq.displayName="DrawerContent";const _q=({className:e,...t})=>I.jsx("div",{className:le("grid gap-1.5 p-4 text-center sm:text-left",e),...t});_q.displayName="DrawerHeader";const $q=({className:e,...t})=>I.jsx("div",{className:le("mt-auto flex flex-col gap-2 p-4",e),...t});$q.displayName="DrawerFooter";const Sq=p.forwardRef((({className:e,...t},n)=>I.jsx(Go.Title,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",e),...t})));Sq.displayName=Go.Title.displayName;const Cq=p.forwardRef((({className:e,...t},n)=>I.jsx(Go.Description,{ref:n,className:le("text-sm text-muted-foreground",e),...t})));function r$(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",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=de.useRef(null),a=de.useRef(new Map).current;return de.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:de.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=_t(t,a(i,n).collectionRef);return de.createElement(sl,{ref:o},r)})),ItemSlot:de.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=de.useRef(null),s=_t(t,i),c=a(l,n);return de.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),de.createElement(sl,{[u]:"",ref:s},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return de.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}Cq.displayName=Go.Description.displayName;const Eq=p.createContext(void 0);function Qd(e){const t=p.useContext(Eq);return e||t||"ltr"}const Rq=["top","right","bottom","left"],Xa=Math.min,eo=Math.max,jm=Math.round,mm=Math.floor,Qa=e=>({x:e,y:e}),Pq={left:"right",right:"left",bottom:"top",top:"bottom"},Tq={start:"end",end:"start"};function Ix(e,t,n){return eo(e,Xa(t,n))}function Ki(e,t){return"function"==typeof e?e(t):e}function Yi(e){return e.split("-")[0]}function lc(e){return e.split("-")[1]}function o$(e){return"x"===e?"y":"x"}function i$(e){return"y"===e?"height":"width"}function Za(e){return["top","bottom"].includes(Yi(e))?"y":"x"}function a$(e){return o$(Za(e))}function Oq(e,t,n){void 0===n&&(n=!1);const r=lc(e),o=a$(e),a=i$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lm(i)),[i,Lm(i)]}function Aq(e){const t=Lm(e);return[Mx(e),t,Mx(t)]}function Mx(e){return e.replace(/start|end/g,(e=>Tq[e]))}function Nq(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 kq(e,t,n,r){const o=lc(e);let a=Nq(Yi(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Mx)))),a}function Lm(e){return e.replace(/left|right|bottom|top/g,(e=>Pq[e]))}function Dq(e){return{top:0,right:0,bottom:0,left:0,...e}}function fk(e){return"number"!=typeof e?Dq(e):{top:e,right:e,bottom:e,left:e}}function Fm(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 w2(e,t,n){let{reference:r,floating:o}=e;const a=Za(t),i=a$(t),l=i$(i),u=Yi(t),s="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(u){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(lc(t)){case"start":p[i]-=f*(n&&s?-1:1);break;case"end":p[i]+=f*(n&&s?-1:1)}return p}const Iq=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=a.filter(Boolean),u=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=w2(s,r,u),f=r,p={},m=0;for(let n=0;n<l.length;n++){const{name:a,fn:h}=l[n],{x:v,y:g,data:y,reset:b}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:i,elements:{reference:e,floating:t}});c=v??c,d=g??d,p={...p,[a]:{...p[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(s=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=w2(s,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Nd(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ki(t,e),m=fk(p),h=l[f?"floating"===d?"reference":"floating":d],v=Fm(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g="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=Fm(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-w.top+m.top)/b.y,bottom:(w.bottom-v.bottom+m.bottom)/b.y,left:(v.left-w.left+m.left)/b.x,right:(w.right-v.right+m.right)/b.x}}const Mq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:u}=t,{element:s,padding:c=0}=Ki(e,t)||{};if(null==s)return{};const d=fk(c),f={x:n,y:r},p=a$(o),m=i$(p),h=await i.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let E=_?_[b]:0;(!E||!await(null==i.isElement?void 0:i.isElement(_)))&&(E=l.floating[b]||a.floating[m]);const S=w/2-x/2,k=E/2-h[m]/2-1,C=Xa(d[g],k),N=Xa(d[y],k),O=C,R=E-h[m]-N,P=E/2-h[m]/2+S,j=Ix(O,P,R),T=!u.arrow&&null!=lc(o)&&P!==j&&a.reference[m]/2-(P<O?C:N)-h[m]/2<0,D=T?P<O?P-O:P-R:0;return{[p]:f[p]+D,data:{[p]:j,centerOffset:P-j-D,...T&&{alignmentOffset:D}},reset:T}}}),jq=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:u,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=Ki(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=Yi(o),y=Za(l),b=Yi(l)===l,w=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=f||(b||!h?[Lm(l)]:Aq(l)),_="none"!==m;!f&&_&&x.push(...kq(l,h,m,w));const E=[l,...x],S=await Nd(t,v),k=[];let C=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&k.push(S[g]),d){const e=Oq(o,i,w);k.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:o,overflows:k}],!k.every((e=>e<=0))){var N,O;const e=((null==(N=a.flip)?void 0:N.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(O=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=C.filter((e=>{if(_){const t=Za(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:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function x2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _2(e){return Rq.some((t=>e[t]>=0))}const Lq=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ki(e,t);switch(r){case"referenceHidden":{const e=x2(await Nd(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_2(e)}}}case"escaped":{const e=x2(await Nd(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_2(e)}}}default:return{}}}}};async function Fq(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Yi(n),l=lc(n),u="y"===Za(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d=Ki(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}const Bq=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,u=await Fq(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},zq=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}}},...u}=Ki(e,t),s={x:n,y:r},c=await Nd(t,u),d=Za(Yi(o)),f=o$(d);let p=s[f],m=s[d];if(a){const e="y"===f?"bottom":"right";p=Ix(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";m=Ix(m+c["y"===d?"top":"left"],m,m-c[e])}const h=l.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:i}}}}}},qq=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:u=!0,crossAxis:s=!0}=Ki(e,t),c={x:n,y:r},d=Za(o),f=o$(d);let p=c[f],m=c[d];const h=Ki(l,t),v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+v.mainAxis,n=a.reference[f]+a.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(Yi(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Wq=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:u=()=>{},...s}=Ki(e,t),c=await Nd(t,s),d=Yi(o),f=lc(o),p="y"===Za(o),{width:m,height:h}=a.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const y=h-c.top-c.bottom,b=m-c.left-c.right,w=Xa(h-c[v],y),x=Xa(m-c[g],b),_=!t.middlewareData.shift;let E=w,S=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),_&&!f){const e=eo(c.left,0),t=eo(c.right,0),n=eo(c.top,0),r=eo(c.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:eo(c.left,c.right)):E=h-2*(0!==n||0!==r?n+r:eo(c.top,c.bottom))}await u({...t,availableWidth:S,availableHeight:E});const k=await i.getDimensions(l.floating);return m!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Sv(){return typeof window<"u"}function Ja(e){return dk(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ta(e){var t;return null==(t=(dk(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function dk(e){return!!Sv()&&(e instanceof Node||e instanceof no(e).Node)}function gi(e){return!!Sv()&&(e instanceof Element||e instanceof no(e).Element)}function yi(e){return!!Sv()&&(e instanceof HTMLElement||e instanceof no(e).HTMLElement)}function $2(e){return!(!Sv()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof no(e).ShadowRoot)}function Zd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Eo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Uq(e){return["table","td","th"].includes(Ja(e))}function Hq(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function s$(e){const t=l$(),n=gi(e)?Eo(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 pk(e){let t=Xu(e);for(;yi(t)&&!Cv(t);){if(s$(t))return t;if(Hq(t))return null;t=Xu(t)}return null}function l$(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Cv(e){return["html","body","#document"].includes(Ja(e))}function Eo(e){return no(e).getComputedStyle(e)}function Ev(e){return gi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xu(e){if("html"===Ja(e))return e;const t=e.assignedSlot||e.parentNode||$2(e)&&e.host||ta(e);return $2(t)?t.host:t}function hk(e){const t=Xu(e);return Cv(t)?e.ownerDocument?e.ownerDocument.body:e.body:yi(t)&&Zd(t)?t:hk(t)}function kd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=hk(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=no(o);if(a){const e=Vq(i);return t.concat(i,i.visualViewport||[],Zd(o)?o:[],e&&n?kd(e):[])}return t.concat(o,kd(o,[],n))}function Vq(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mk(e){const t=Eo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=jm(n)!==a||jm(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function u$(e){return gi(e)?e:e.contextElement}function Uu(e){const t=u$(e);if(!yi(t))return Qa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mk(t);let i=(a?jm(n.width):n.width)/r,l=(a?jm(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Gq=Qa(0);function vk(e){const t=no(e);return l$()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Gq}function Kq(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==no(e))&&t}function pl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=u$(e);let i=Qa(1);t&&(r?gi(r)&&(i=Uu(r)):i=Uu(e));const l=Kq(a,n,r)?vk(a):Qa(0);let u=(o.left+l.x)/i.x,s=(o.top+l.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){const e=no(a),t=r&&gi(r)?no(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Uu(n),t=n.getBoundingClientRect(),r=Eo(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,s*=e.y,c*=e.x,d*=e.y,u+=o,s+=a,n=no(n).frameElement}}return Fm({width:c,height:d,x:u,y:s})}const Yq=[":popover-open",":modal"];function gk(e){let t=!1,n=0,r=0;if(Yq.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=pk(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Xq(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=ta(r),[i]=t?gk(t.floating):[!1];if(r===a||i)return n;let l={scrollLeft:0,scrollTop:0},u=Qa(1);const s=Qa(0),c=yi(r);if((c||!c&&"fixed"!==o)&&(("body"!==Ja(r)||Zd(a))&&(l=Ev(r)),yi(r))){const e=pl(r);u=Uu(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+s.x,y:n.y*u.y-l.scrollTop*u.y+s.y}}function Qq(e){return Array.from(e.getClientRects())}function yk(e){return pl(ta(e)).left+Ev(e).scrollLeft}function Zq(e){const t=ta(e),n=Ev(e),r=e.ownerDocument.body,o=eo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=eo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+yk(e);const l=-n.scrollTop;return"rtl"===Eo(r).direction&&(i+=eo(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}function Jq(e,t){const n=no(e),r=ta(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const e=l$();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}function eW(e,t){const n=pl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=yi(e)?Uu(e):Qa(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function S2(e,t,n){let r;if("viewport"===t)r=Jq(e,n);else if("document"===t)r=Zq(ta(e));else if(gi(t))r=eW(t,n);else{const n=vk(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Fm(r)}function bk(e,t){const n=Xu(e);return!(n===t||!gi(n)||Cv(n))&&("fixed"===Eo(n).position||bk(n,t))}function tW(e,t){const n=t.get(e);if(n)return n;let r=kd(e,[],!1).filter((e=>gi(e)&&"body"!==Ja(e))),o=null;const a="fixed"===Eo(e).position;let i=a?Xu(e):e;for(;gi(i)&&!Cv(i);){const t=Eo(i),n=s$(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Zd(i)&&!n&&bk(e,i))?r=r.filter((e=>e!==i)):o=t,i=Xu(i)}return t.set(e,r),r}function nW(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?tW(t,this._c):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=S2(t,n,o);return e.top=eo(r.top,e.top),e.right=Xa(r.right,e.right),e.bottom=Xa(r.bottom,e.bottom),e.left=eo(r.left,e.left),e}),S2(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rW(e){const{width:t,height:n}=mk(e);return{width:t,height:n}}function oW(e,t,n,r){const o=yi(t),a=ta(t),i="fixed"===n,l=pl(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const s=Qa(0);if(o||!o&&!i)if(("body"!==Ja(t)||Zd(a))&&(u=Ev(t)),o){const e=pl(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=yk(a));let c=l.left+u.scrollLeft-s.x,d=l.top+u.scrollTop-s.y;const[f,p,m]=gk(r);return f&&(c+=p,d+=m,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function C2(e,t){return yi(e)&&"fixed"!==Eo(e).position?t?t(e):e.offsetParent:null}function wk(e,t){const n=no(e);if(!yi(e))return n;let r=C2(e,t);for(;r&&Uq(r)&&"static"===Eo(r).position;)r=C2(r,t);return r&&("html"===Ja(r)||"body"===Ja(r)&&"static"===Eo(r).position&&!s$(r))?n:r||pk(e)||n}const iW=async function(e){const t=this.getOffsetParent||wk,n=this.getDimensions;return{reference:oW(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function aW(e){return"rtl"===Eo(e).direction}const sW={convertOffsetParentRelativeRectToViewportRelativeRect:Xq,getDocumentElement:ta,getClippingRect:nW,getOffsetParent:wk,getElementRects:iW,getClientRects:Qq,getDimensions:rW,getScale:Uu,isElement:gi,isRTL:aW};function lW(e,t){let n,r=null;const o=ta(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,u){void 0===l&&(l=!1),void 0===u&&(u=1),a();const{left:s,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-mm(c)+"px "+-mm(o.clientWidth-(s+d))+"px "+-mm(o.clientHeight-(c+f))+"px "+-mm(s)+"px",threshold:eo(0,Xa(1,u))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==u){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(h,p)}r.observe(e)}(!0),a}function uW(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:u=!1}=r,s=u$(e),c=o||a?[...s?kd(s):[],...kd(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=s&&l?lW(s,n):null;let f=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),s&&!u&&p.observe(s),p.observe(t));let m,h=u?pl(e):null;return u&&function t(){const r=pl(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,m=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,u&&cancelAnimationFrame(m)}}const cW=zq,fW=jq,dW=Wq,pW=Lq,E2=Mq,hW=qq,mW=(e,t,n)=>{const r=new Map,o={platform:sW,...n},a={...o.platform,_c:r};return Iq(e,t,{...o,platform:a})};var Cm=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Bm(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(!Bm(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||Bm(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function xk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function R2(e,t){const n=xk(e);return Math.round(t*n)/n}function hw(e){const t=p.useRef(e);return Cm((()=>{t.current=e})),t}function vW(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:u,open:s}=e,[c,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);Bm(f,r)||m(r);const[h,v]=p.useState(null),[g,y]=p.useState(null),b=p.useCallback((e=>{e!==E.current&&(E.current=e,v(e))}),[]),w=p.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),x=a||h,_=i||g,E=p.useRef(null),S=p.useRef(null),k=p.useRef(c),C=null!=u,N=hw(u),O=hw(o),R=hw(s),P=p.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),mW(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};j.current&&!Bm(k.current,t)&&(k.current=t,wi.flushSync((()=>{d(t)})))}))}),[f,t,n,O,R]);Cm((()=>{!1===s&&k.current.isPositioned&&(k.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const j=p.useRef(!1);Cm((()=>(j.current=!0,()=>{j.current=!1})),[]),Cm((()=>{if(x&&(E.current=x),_&&(S.current=_),x&&_){if(N.current)return N.current(x,_,P);P()}}),[x,_,P,N,C]);const T=p.useMemo((()=>({reference:E,floating:S,setReference:b,setFloating:w})),[b,w]),D=p.useMemo((()=>({reference:x,floating:_})),[x,_]),I=p.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=R2(D.floating,c.x),r=R2(D.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...xk(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,D.floating,c.x,c.y]);return p.useMemo((()=>({...c,update:P,refs:T,elements:D,floatingStyles:I})),[c,P,T,D,I])}const gW=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?E2({element:n.current,padding:r}).fn(t):{}:n?E2({element:n,padding:r}).fn(t):{}}}),yW=(e,t)=>({...Bq(e),options:[e,t]}),bW=(e,t)=>({...cW(e),options:[e,t]}),wW=(e,t)=>({...hW(e),options:[e,t]}),xW=(e,t)=>({...fW(e),options:[e,t]}),_W=(e,t)=>({...dW(e),options:[e,t]}),$W=(e,t)=>({...pW(e),options:[e,t]}),SW=(e,t)=>({...gW(e),options:[e,t]}),_k="Popper",[$k,uc]=br(_k),[CW,Sk]=$k(_k),EW=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement(CW,{scope:t,anchor:r,onAnchorChange:o},n)},RW="PopperAnchor",PW=p.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Sk(RW,n),i=p.useRef(null),l=_t(t,i);return p.useEffect((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:p.createElement(et.div,pe({},o,{ref:l}))})),Ck="PopperContent",[TW,AZ]=$k(Ck),OW=p.forwardRef(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:m="center",alignOffset:h=0,arrowPadding:v=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:w="partial",hideWhenDetached:x=!1,updatePositionStrategy:_="optimized",onPlaced:E,...S}=e,k=Sk(Ck,c),[C,N]=p.useState(null),O=_t(t,(e=>N(e))),[R,P]=p.useState(null),j=wv(R),T=null!==(n=null==j?void 0:j.width)&&void 0!==n?n:0,D=null!==(r=null==j?void 0:j.height)&&void 0!==r?r:0,I=d+("center"!==m?"-"+m:""),A="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},L=Array.isArray(y)?y:[y],M=L.length>0,z={padding:A,boundary:L.filter(AW),altBoundary:M},{refs:F,floatingStyles:B,placement:$,isPositioned:W,middlewareData:U}=vW({strategy:"fixed",placement:I,whileElementsMounted:(...e)=>uW(...e,{animationFrame:"always"===_}),elements:{reference:k.anchor},middleware:[yW({mainAxis:f+D,alignmentAxis:h}),g&&bW({mainAxis:!0,crossAxis:!1,limiter:"partial"===w?wW():void 0,...z}),g&&xW({...z}),_W({...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`)}}),R&&SW({element:R,padding:v}),NW({arrowWidth:T,arrowHeight:D}),x&&$W({strategy:"referenceHidden",...z})]}),[H,V]=Ek($),q=Fr(E);ar((()=>{W&&(null==q||q())}),[W,q]);const K=null===(o=U.arrow)||void 0===o?void 0:o.x,G=null===(a=U.arrow)||void 0===a?void 0:a.y,X=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[Q,Y]=p.useState();return ar((()=>{C&&Y(window.getComputedStyle(C).zIndex)}),[C]),p.createElement("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[null===(l=U.transformOrigin)||void 0===l?void 0:l.x,null===(u=U.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},p.createElement(TW,{scope:c,placedSide:H,onArrowChange:P,arrowX:K,arrowY:G,shouldHideArrow:X},p.createElement(et.div,pe({"data-side":H,"data-align":V},S,{ref:O,style:{...S.style,animation:W?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}}))))}));function AW(e){return null!==e}const NW=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=Ek(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?h:`${v}px`,b=-f+"px"):"top"===p?(y=c?h:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?h:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?h:`${g}px`),{data:{x:y,y:b}}}});function Ek(e){const[t,n="center"]=e.split("-");return[t,n]}const Rv=EW,c$=PW,f$=OW,mw="rovingFocusGroup.onEntryFocus",kW={bubbles:!1,cancelable:!0},d$="RovingFocusGroup",[jx,Rk,DW]=r$(d$),[IW,cc]=br(d$,[DW]),[MW,jW]=IW(d$),LW=p.forwardRef(((e,t)=>p.createElement(jx.Provider,{scope:e.__scopeRovingFocusGroup},p.createElement(jx.Slot,{scope:e.__scopeRovingFocusGroup},p.createElement(FW,pe({},e,{ref:t})))))),FW=p.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,...c}=e,d=p.useRef(null),f=_t(t,d),m=Qd(a),[h=null,v]=Wo({prop:i,defaultProp:l,onChange:u}),[g,y]=p.useState(!1),b=Fr(s),w=Rk(n),x=p.useRef(!1),[_,E]=p.useState(0);return p.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(mw,b),()=>e.removeEventListener(mw,b)}),[b]),p.createElement(MW,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:h,onItemFocus:p.useCallback((e=>v(e)),[v]),onItemShiftTab:p.useCallback((()=>y(!0)),[]),onFocusableItemAdd:p.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:p.useCallback((()=>E((e=>e-1))),[])},p.createElement(et.div,pe({tabIndex:g||0===_?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:Be(e.onMouseDown,(()=>{x.current=!0})),onFocus:Be(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(mw,kW);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));Pk([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:Be(e.onBlur,(()=>y(!1)))})))})),BW="RovingFocusGroupItem",zW=p.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,l=to(),u=a||l,s=jW(BW,n),c=s.currentTabStopId===u,d=Rk(n),{onFocusableItemAdd:f,onFocusableItemRemove:m}=s;return p.useEffect((()=>{if(r)return f(),()=>m()}),[r,f,m]),p.createElement(jx.ItemSlot,{scope:n,id:u,focusable:r,active:o},p.createElement(et.span,pe({tabIndex:c?0:-1,"data-orientation":s.orientation},i,{ref:t,onMouseDown:Be(e.onMouseDown,(e=>{r?s.onItemFocus(u):e.preventDefault()})),onFocus:Be(e.onFocus,(()=>s.onItemFocus(u))),onKeyDown:Be(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void s.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=UW(e,s.orientation,s.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=s.loop?HW(n,r+1):n.slice(r+1)}setTimeout((()=>Pk(n)))}}))})))})),qW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WW(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function UW(e,t,n){const r=WW(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return qW[r]}function Pk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function HW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const p$=LW,h$=zW,Lx=["Enter"," "],VW=["ArrowDown","PageUp","Home"],Tk=["ArrowUp","PageDown","End"],GW=[...VW,...Tk],KW={ltr:[...Lx,"ArrowRight"],rtl:[...Lx,"ArrowLeft"]},YW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pv="Menu",[Dd,XW,QW]=r$(Pv),[yl,Ok]=br(Pv,[QW,uc,cc]),Tv=uc(),Ak=cc(),[Nk,rs]=yl(Pv),[ZW,Jd]=yl(Pv),JW=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=Tv(t),[u,s]=p.useState(null),c=p.useRef(!1),d=Fr(a),f=Qd(o);return p.useEffect((()=>{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})}}),[]),p.createElement(Rv,l,p.createElement(Nk,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s},p.createElement(ZW,{scope:t,onClose:p.useCallback((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:i},r)))},kk=p.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Tv(n);return p.createElement(c$,pe({},o,r,{ref:t}))})),Dk="MenuPortal",[eU,Ik]=yl(Dk,{forceMount:void 0}),tU=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=rs(Dk,t);return p.createElement(eU,{scope:t,forceMount:n},p.createElement(Ro,{present:n||a.open},p.createElement(c_,{asChild:!0,container:o},r)))},qo="MenuContent",[nU,m$]=yl(qo),rU=p.forwardRef(((e,t)=>{const n=Ik(qo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=rs(qo,e.__scopeMenu),i=Jd(qo,e.__scopeMenu);return p.createElement(Dd.Provider,{scope:e.__scopeMenu},p.createElement(Ro,{present:r||a.open},p.createElement(Dd.Slot,{scope:e.__scopeMenu},i.modal?p.createElement(oU,pe({},o,{ref:t})):p.createElement(iU,pe({},o,{ref:t})))))})),oU=p.forwardRef(((e,t)=>{const n=rs(qo,e.__scopeMenu),r=p.useRef(null),o=_t(t,r);return p.useEffect((()=>{const e=r.current;if(e)return nv(e)}),[]),p.createElement(v$,pe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Be(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),iU=p.forwardRef(((e,t)=>{const n=rs(qo,e.__scopeMenu);return p.createElement(v$,pe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),v$=p.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,disableOutsideScroll:h,...v}=e,g=rs(qo,n),y=Jd(qo,n),b=Tv(n),w=Ak(n),x=XW(n),[_,E]=p.useState(null),S=p.useRef(null),k=_t(t,S,g.onContentChange),C=p.useRef(0),N=p.useRef(""),O=p.useRef(0),R=p.useRef(null),P=p.useRef("right"),j=p.useRef(0),T=h?tv:p.Fragment,D=h?{as:sl,allowPinchZoom:!0}:void 0;p.useEffect((()=>()=>window.clearTimeout(C.current)),[]),f_();const I=p.useCallback((e=>{var t,n;return P.current===(null===(t=R.current)||void 0===t?void 0:t.side)&&EU(e,null===(n=R.current)||void 0===n?void 0:n.area)}),[]);return p.createElement(nU,{scope:n,searchRef:N,onItemEnter:p.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),onItemLeave:p.useCallback((e=>{var t;I(e)||(null===(t=S.current)||void 0===t||t.focus(),E(null))}),[I]),onTriggerLeave:p.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),pointerGraceTimerRef:O,onPointerGraceIntentChange:p.useCallback((e=>{R.current=e}),[])},p.createElement(T,D,p.createElement(u_,{asChild:!0,trapped:o,onMountAutoFocus:Be(a,(e=>{var t;e.preventDefault(),null===(t=S.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},p.createElement(Jm,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m},p.createElement(p$,pe({asChild:!0},w,{dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:E,onEntryFocus:Be(u,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()}))}),p.createElement(f$,pe({role:"menu","aria-orientation":"vertical","data-state":qk(g.open),"data-radix-menu-content":"",dir:y.dir},b,v,{ref:k,style:{outline:"none",...v.style},onKeyDown:Be(v.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=N.current+e,o=x().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=SU(o.map((e=>e.textValue)),r,i),u=null===(n=o.find((e=>e.textValue===l)))||void 0===n?void 0:n.ref.current;(function e(t){N.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=S.current;if(e.target!==o||!GW.includes(e.key))return;e.preventDefault();const a=x().filter((e=>!e.disabled)).map((e=>e.ref.current));Tk.includes(e.key)&&a.reverse(),_U(a)})),onBlur:Be(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),N.current="")})),onPointerMove:Be(e.onPointerMove,Id((e=>{const t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>j.current?"right":"left";P.current=t,j.current=e.clientX}})))})))))))})),Mk=p.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.createElement(et.div,pe({role:"group"},r,{ref:t}))})),aU=p.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.createElement(et.div,pe({},r,{ref:t}))})),Fx="MenuItem",P2="menu.itemSelect",g$=p.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=p.useRef(null),i=Jd(Fx,e.__scopeMenu),l=m$(Fx,e.__scopeMenu),u=_t(t,a),s=p.useRef(!1);return p.createElement(jk,pe({},o,{ref:u,disabled:n,onClick:Be(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(P2,{bubbles:!0,cancelable:!0});e.addEventListener(P2,(e=>null==r?void 0:r(e)),{once:!0}),hO(e,t),t.defaultPrevented?s.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),s.current=!0},onPointerUp:Be(e.onPointerUp,(e=>{var t;s.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:Be(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||Lx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),jk=p.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=m$(Fx,n),l=Ak(n),u=p.useRef(null),s=_t(t,u),[c,d]=p.useState(!1),[f,m]=p.useState("");return p.useEffect((()=>{const e=u.current;var t;e&&m((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),p.createElement(Dd.ItemSlot,{scope:n,disabled:r,textValue:o??f},p.createElement(h$,pe({asChild:!0},l,{focusable:!r}),p.createElement(et.div,pe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:s,onPointerMove:Be(e.onPointerMove,Id((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:Be(e.onPointerLeave,Id((e=>i.onItemLeave(e)))),onFocus:Be(e.onFocus,(()=>d(!0))),onBlur:Be(e.onBlur,(()=>d(!1)))}))))})),sU=p.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.createElement(Fk,{scope:e.__scopeMenu,checked:n},p.createElement(g$,pe({role:"menuitemcheckbox","aria-checked":zm(n)?"mixed":n},o,{ref:t,"data-state":y$(n),onSelect:Be(o.onSelect,(()=>null==r?void 0:r(!!zm(n)||!n)),{checkForDefaultPrevented:!1})})))})),lU="MenuRadioGroup",[uU,cU]=yl(lU,{value:void 0,onValueChange:()=>{}}),fU=p.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Fr(r);return p.createElement(uU,{scope:e.__scopeMenu,value:n,onValueChange:a},p.createElement(Mk,pe({},o,{ref:t})))})),dU="MenuRadioItem",pU=p.forwardRef(((e,t)=>{const{value:n,...r}=e,o=cU(dU,e.__scopeMenu),a=n===o.value;return p.createElement(Fk,{scope:e.__scopeMenu,checked:a},p.createElement(g$,pe({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":y$(a),onSelect:Be(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),Lk="MenuItemIndicator",[Fk,hU]=yl(Lk,{checked:!1}),mU=p.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=hU(Lk,n);return p.createElement(Ro,{present:r||zm(a.checked)||!0===a.checked},p.createElement(et.span,pe({},o,{ref:t,"data-state":y$(a.checked)})))})),vU=p.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.createElement(et.div,pe({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),Bk="MenuSub",[gU,zk]=yl(Bk),yU=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=rs(Bk,t),i=Tv(t),[l,u]=p.useState(null),[s,c]=p.useState(null),d=Fr(o);return p.useEffect((()=>(!1===a.open&&d(!1),()=>d(!1))),[a.open,d]),p.createElement(Rv,i,p.createElement(Nk,{scope:t,open:r,onOpenChange:d,content:s,onContentChange:c},p.createElement(gU,{scope:t,contentId:to(),triggerId:to(),trigger:l,onTriggerChange:u},n)))},vm="MenuSubTrigger",bU=p.forwardRef(((e,t)=>{const n=rs(vm,e.__scopeMenu),r=Jd(vm,e.__scopeMenu),o=zk(vm,e.__scopeMenu),a=m$(vm,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,s={__scopeMenu:e.__scopeMenu},c=p.useCallback((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return p.useEffect((()=>c),[c]),p.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}}),[l,u]),p.createElement(kk,pe({asChild:!0},s),p.createElement(jk,pe({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":qk(n.open)},e,{ref:Zm(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:Be(e.onPointerMove,Id((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:Be(e.onPointerLeave,Id((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,u=i?-5:5,s=r[i?"left":"right"],c=r[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:s,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:s,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:Be(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!KW[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),wU="MenuSubContent",xU=p.forwardRef(((e,t)=>{const n=Ik(qo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=rs(qo,e.__scopeMenu),i=Jd(qo,e.__scopeMenu),l=zk(wU,e.__scopeMenu),u=p.useRef(null),s=_t(t,u);return p.createElement(Dd.Provider,{scope:e.__scopeMenu},p.createElement(Ro,{present:r||a.open},p.createElement(Dd.Slot,{scope:e.__scopeMenu},p.createElement(v$,pe({id:l.contentId,"aria-labelledby":l.triggerId},o,{ref:s,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Be(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:Be(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:Be(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=YW[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function qk(e){return e?"open":"closed"}function zm(e){return"indeterminate"===e}function y$(e){return zm(e)?"indeterminate":e?"checked":"unchecked"}function _U(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $U(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function SU(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=$U(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 CU(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,u=t[a].x,s=t[a].y;l>r!=s>r&&n<(u-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function EU(e,t){if(!t)return!1;return CU({x:e.clientX,y:e.clientY},t)}function Id(e){return t=>"mouse"===t.pointerType?e(t):void 0}const RU=JW,PU=kk,TU=tU,OU=rU,AU=Mk,NU=aU,kU=g$,DU=sU,IU=fU,MU=pU,jU=mU,LU=vU,FU=yU,BU=bU,zU=xU,Wk="DropdownMenu",[qU,NZ]=br(Wk,[Ok]),_r=Ok(),[WU,Uk]=qU(Wk),UU=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=_r(t),s=p.useRef(null),[c=!1,d]=Wo({prop:o,defaultProp:a,onChange:i});return p.createElement(WU,{scope:t,triggerId:to(),triggerRef:s,contentId:to(),open:c,onOpenChange:d,onOpenToggle:p.useCallback((()=>d((e=>!e))),[d]),modal:l},p.createElement(RU,pe({},u,{open:c,onOpenChange:d,dir:r,modal:l}),n))},HU="DropdownMenuTrigger",VU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Uk(HU,n),i=_r(n);return p.createElement(PU,pe({asChild:!0},i),p.createElement(et.button,pe({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:Zm(t,a.triggerRef),onPointerDown:Be(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:Be(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),GU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=_r(t);return p.createElement(TU,pe({},r,n))},KU="DropdownMenuContent",YU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Uk(KU,n),a=_r(n),i=p.useRef(!1);return p.createElement(OU,pe({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:Be(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:Be(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)"}}))})),XU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(AU,pe({},o,r,{ref:t}))})),QU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(NU,pe({},o,r,{ref:t}))})),ZU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(kU,pe({},o,r,{ref:t}))})),JU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(DU,pe({},o,r,{ref:t}))})),eH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(IU,pe({},o,r,{ref:t}))})),tH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(MU,pe({},o,r,{ref:t}))})),nH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(jU,pe({},o,r,{ref:t}))})),rH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(LU,pe({},o,r,{ref:t}))})),oH=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=_r(t),[l=!1,u]=Wo({prop:r,defaultProp:a,onChange:o});return p.createElement(FU,pe({},i,{open:l,onOpenChange:u}),n)},iH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(BU,pe({},o,r,{ref:t}))})),aH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(zU,pe({},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)"}}))})),sH=UU,lH=VU,Hk=GU,Vk=YU,uH=XU,Gk=QU,Kk=ZU,Yk=JU,cH=eH,Xk=tH,fH=nH,b$=rH,dH=oH,Qk=iH,Zk=aH,kZ=sH,DZ=lH,IZ=uH,MZ=Hk,jZ=dH,LZ=cH,pH=p.forwardRef((({className:e,inset:t,children:n,...r},o)=>I.jsxs(Qk,{ref:o,className:le("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,I.jsx(iO,{className:"ml-auto h-4 w-4"})]})));pH.displayName=Qk.displayName;const hH=p.forwardRef((({className:e,...t},n)=>I.jsx(Zk,{ref:n,className:le("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})));hH.displayName=Zk.displayName;const mH=p.forwardRef((({className:e,sideOffset:t=4,...n},r)=>I.jsx(Hk,{children:I.jsx(Vk,{ref:r,sideOffset:t,className:le("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-slate-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),...n})})));mH.displayName=Vk.displayName;const vH=p.forwardRef((({className:e,inset:t,...n},r)=>I.jsx(Kk,{ref:r,className:le("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));vH.displayName=Kk.displayName;const gH=p.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=I.jsx(Y_,{size:"default",variant:"default",checked:n});return I.jsxs(Yk,{ref:a,className:le("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-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,I.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));gH.displayName=Yk.displayName;const yH=p.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=I.jsx("div",{className:"flex h-xxs items-center justify-center",children:I.jsx(fH,{children:I.jsx(r_,{size:20})})});return I.jsxs(Xk,{ref:o,className:le("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-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,I.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));yH.displayName=Xk.displayName;const bH=p.forwardRef((({className:e,inset:t,...n},r)=>I.jsx(Gk,{ref:r,className:le("text-sm font-semibold",t&&"pl-xl",e),...n})));bH.displayName=Gk.displayName;const wH=p.forwardRef((({className:e,...t},n)=>I.jsx(b$,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",e),...t})));wH.displayName=b$.displayName;const xH=({className:e,...t})=>I.jsx("span",{className:le("ml-auto text-xs tracking-widest opacity-60",e),...t});xH.displayName="DropdownMenuShortcut";var _H=e=>"checkbox"===e.type,$H=e=>e instanceof Date,Jk=e=>null==e;const SH=e=>"object"==typeof e;var fc=e=>!Jk(e)&&!Array.isArray(e)&&SH(e)&&!$H(e),CH=e=>fc(e)&&e.target?_H(e.target)?e.target.checked:e.target.value:e,EH=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,RH=(e,t)=>e.has(EH(t)),PH=e=>{const t=e.constructor&&e.constructor.prototype;return fc(t)&&t.hasOwnProperty("isPrototypeOf")},TH=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function w$(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(TH&&(e instanceof Blob||e instanceof FileList)||!n&&!fc(e))return e;if(t=n?[]:{},n||PH(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=w$(e[n]));else t=e}return t}var e3=e=>Array.isArray(e)?e.filter(Boolean):[],Bx=e=>void 0===e,or=(e,t,n)=>{if(!t||!fc(e))return n;const r=e3(t.split(/[,[\].]+?/)).reduce(((e,t)=>Jk(e)?e:e[t]),e);return Bx(r)||r===e?Bx(e[t])?n:e[t]:r},T2=e=>"boolean"==typeof e;const O2={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},A2={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},t3=de.createContext(null),Ov=()=>de.useContext(t3),OH=e=>{const{children:t,...n}=e;return de.createElement(t3.Provider,{value:n},t)};var AH=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const o=a;return t._proxyFormState[o]!==A2.all&&(t._proxyFormState[o]=!r||A2.all),n&&(n[o]=!0),e[o]}});return o},NH=e=>fc(e)&&!Object.keys(e).length,kH=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return NH(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find((e=>t[e]===!r))},DH=e=>Array.isArray(e)?e:[e],n3=(e,t,n)=>!e||!t||e===t||DH(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function r3(e){const t=de.useRef(e);t.current=e,de.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}function IH(e){const t=Ov(),{control:n=t.control,disabled:r,name:o,exact:a}=e,[i,l]=de.useState(n._formState),u=de.useRef(!0),s=de.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=de.useRef(o);return c.current=o,r3({disabled:r,next:e=>u.current&&n3(c.current,e.name,a)&&kH(e,s.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),de.useEffect((()=>(u.current=!0,s.current.isValid&&n._updateValid(!0),()=>{u.current=!1})),[n]),AH(i,n,s.current,!1)}var MH=e=>"string"==typeof e,jH=(e,t,n,r,o)=>MH(e)?or(n,e,o):Array.isArray(e)?e.map((e=>or(n,e))):n;function LH(e){const t=Ov(),{control:n=t.control,name:r,defaultValue:o,disabled:a,exact:i}=e,l=de.useRef(r);l.current=r,r3({disabled:a,subject:n._subjects.values,next:e=>{n3(l.current,e.name,i)&&s(w$(jH(l.current,n._names,e.values||n._formValues,!1,o)))}});const[u,s]=de.useState(n._getWatch(r,o));return de.useEffect((()=>n._removeUnmounted())),u}var FH=e=>/^\w*$/.test(e),BH=e=>e3(e.replace(/["|']|\]/g,"").split(/\.|\[/)),N2=(e,t,n)=>{let r=-1;const o=FH(t)?[t]:BH(t),a=o.length,i=a-1;for(;++r<a;){const t=o[r];let a=n;if(r!==i){const n=e[t];a=fc(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}e[t]=a,e=e[t]}return e};function zH(e){const t=Ov(),{name:n,disabled:r,control:o=t.control,shouldUnregister:a}=e,i=RH(o._names.array,n),l=LH({control:o,name:n,defaultValue:or(o._formValues,n,or(o._defaultValues,n,e.defaultValue)),exact:!0}),u=IH({control:o,name:n}),s=de.useRef(o.register(n,{...e.rules,value:l,...T2(e.disabled)?{disabled:e.disabled}:{}}));return de.useEffect((()=>{const e=o._options.shouldUnregister||a,t=(e,t)=>{const n=or(o._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=w$(or(o._options.defaultValues,n));N2(o._defaultValues,n,e),Bx(or(o._formValues,n))&&N2(o._formValues,n,e)}return()=>{(i?e&&!o._state.action:e)?o.unregister(n):t(n,!1)}}),[n,o,i,a]),de.useEffect((()=>{or(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:or(o._fields,n)._f.value})}),[r,n,o]),{field:{name:n,value:l,...T2(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:de.useCallback((e=>s.current.onChange({target:{value:CH(e),name:n},type:O2.CHANGE})),[n]),onBlur:de.useCallback((()=>s.current.onBlur({target:{value:or(o._formValues,n),name:n},type:O2.BLUR})),[n,o]),ref:e=>{const t=or(o._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!or(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!or(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!or(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!or(u.validatingFields,n)},error:{enumerable:!0,get:()=>or(u.errors,n)}})}}const qH=e=>e.render(zH(e));function k2(e,[t,n]){return Math.min(n,Math.max(t,e))}const o3=p.forwardRef(((e,t)=>p.createElement(et.span,pe({},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}})))),WH=o3,UH=[" ","Enter","ArrowUp","ArrowDown"],HH=[" ","Enter"],Av="Select",[Nv,kv,VH]=r$(Av),[dc,FZ]=br(Av,[VH,uc]),x$=uc(),[GH,bl]=dc(Av),[KH,YH]=dc(Av),XH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:u,dir:s,name:c,autoComplete:d,disabled:f,required:m}=e,h=x$(t),[v,g]=p.useState(null),[y,b]=p.useState(null),[w,x]=p.useState(!1),_=Qd(s),[E=!1,S]=Wo({prop:r,defaultProp:o,onChange:a}),[k,C]=Wo({prop:i,defaultProp:l,onChange:u}),N=p.useRef(null),O=!v||!!v.closest("form"),[R,P]=p.useState(new Set),j=Array.from(R).map((e=>e.props.value)).join(";");return p.createElement(Rv,h,p.createElement(GH,{required:m,scope:t,trigger:v,onTriggerChange:g,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:to(),value:k,onValueChange:C,open:E,onOpenChange:S,dir:_,triggerPointerDownPosRef:N,disabled:f},p.createElement(Nv.Provider,{scope:t},p.createElement(KH,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback((e=>{P((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:p.useCallback((e=>{P((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),O?p.createElement(u3,{key:j,"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:d,value:k,onChange:e=>C(e.target.value),disabled:f},void 0===k?p.createElement("option",{value:""}):null,Array.from(R)):null))},QH="SelectTrigger",ZH=p.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=x$(n),i=bl(QH,n),l=i.disabled||r,u=_t(t,i.onTriggerChange),s=kv(n),[c,d,f]=c3((e=>{const t=s().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=f3(t,e,n);void 0!==r&&i.onValueChange(r.value)})),m=()=>{l||(i.onOpenChange(!0),f())};return p.createElement(c$,pe({asChild:!0},a),p.createElement(et.button,pe({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":l3(i.value)?"":void 0},o,{ref:u,onClick:Be(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:Be(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:Be(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&UH.includes(e.key)&&(m(),e.preventDefault())}))})))})),JH="SelectValue",eV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,u=bl(JH,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==a,d=_t(t,u.onValueNodeChange);return ar((()=>{s(c)}),[s,c]),p.createElement(et.span,pe({},l,{ref:d,style:{pointerEvents:"none"}}),l3(u.value)?p.createElement(p.Fragment,null,i):a)})),tV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.createElement(et.span,pe({"aria-hidden":!0},o,{ref:t}),r||"▼")})),nV=e=>p.createElement(c_,pe({asChild:!0},e)),Qu="SelectContent",rV=p.forwardRef(((e,t)=>{const n=bl(Qu,e.__scopeSelect),[r,o]=p.useState();if(ar((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?wi.createPortal(p.createElement(i3,{scope:e.__scopeSelect},p.createElement(Nv.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),t):null}return p.createElement(oV,pe({},e,{ref:t}))})),Hi=10,[i3,wl]=dc(Qu),oV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:g,...y}=e,b=bl(Qu,n),[w,x]=p.useState(null),[_,E]=p.useState(null),S=_t(t,(e=>x(e))),[k,C]=p.useState(null),[N,O]=p.useState(null),R=kv(n),[P,j]=p.useState(!1),T=p.useRef(!1);p.useEffect((()=>{if(w)return nv(w)}),[w]),f_();const D=p.useCallback((e=>{const[t,...n]=R().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&&_&&(_.scrollTop=0),n===r&&_&&(_.scrollTop=_.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[R,_]),I=p.useCallback((()=>D([k,w])),[D,k,w]);p.useEffect((()=>{P&&I()}),[P,I]);const{onOpenChange:A,triggerPointerDownPosRef:L}=b;p.useEffect((()=>{if(w){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=L.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=L.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,A,L]),p.useEffect((()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[A]);const[M,z]=c3((e=>{const t=R().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=f3(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),F=p.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&(C(e),r&&(T.current=!0))}),[b.value]),B=p.useCallback((()=>null==w?void 0:w.focus()),[w]),$=p.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&O(e)}),[b.value]),W="popper"===r?D2:iV,U=W===D2?{side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:g}:{};return p.createElement(i3,{scope:n,content:w,viewport:_,onViewportChange:E,itemRefCallback:F,selectedItem:k,onItemLeave:B,itemTextRefCallback:$,focusSelectedItem:I,selectedItemText:N,position:r,isPositioned:P,searchRef:M},p.createElement(tv,{as:sl,allowPinchZoom:!0},p.createElement(u_,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Be(o,(e=>{var t;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},p.createElement(Jm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},p.createElement(W,pe({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault()},y,U,{onPlaced:()=>j(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Be(y.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=R().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((()=>D(t))),e.preventDefault()}}))}))))))})),iV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=bl(Qu,n),i=wl(Qu,n),[l,u]=p.useState(null),[s,c]=p.useState(null),d=_t(t,(e=>c(e))),f=kv(n),m=p.useRef(!1),h=p.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,w=p.useCallback((()=>{if(a.trigger&&a.valueNode&&l&&s&&v&&g&&y){const e=a.trigger.getBoundingClientRect(),t=s.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=y.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,u=e.width+i,s=Math.max(u,t.width),c=window.innerWidth-Hi,d=k2(a,[Hi,c-s]);l.style.minWidth=u+"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,u=e.width+i,s=Math.max(u,t.width),c=window.innerWidth-Hi,d=k2(a,[Hi,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const i=f(),u=window.innerHeight-2*Hi,c=v.scrollHeight,d=window.getComputedStyle(s),p=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=p+h+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),_=window.getComputedStyle(v),E=parseInt(_.paddingTop,10),S=parseInt(_.paddingBottom,10),k=e.top+e.height/2-Hi,C=u-k,N=g.offsetHeight/2,O=p+h+(g.offsetTop+N),R=w-O;if(O<=k){const e=g===i[i.length-1].ref.current;l.style.bottom="0px";const t=s.clientHeight-v.offsetTop-v.offsetHeight,n=O+Math.max(C,N+(e?S:0)+t+b);l.style.height=n+"px"}else{const e=g===i[0].ref.current;l.style.top="0px";const t=Math.max(k,p+v.offsetTop+(e?E:0)+N)+R;l.style.height=t+"px",v.scrollTop=O-k+v.offsetTop}l.style.margin=`${Hi}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>m.current=!0))}}),[f,a.trigger,a.valueNode,l,s,v,g,y,a.dir,r]);ar((()=>w()),[w]);const[x,_]=p.useState();ar((()=>{s&&_(window.getComputedStyle(s).zIndex)}),[s]);const E=p.useCallback((e=>{e&&!0===h.current&&(w(),null==b||b(),h.current=!1)}),[w,b]);return p.createElement(aV,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:E},p.createElement("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x}},p.createElement(et.div,pe({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),D2=p.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Hi,...a}=e,i=x$(n);return p.createElement(f$,pe({},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)"}}))})),[aV,_$]=dc(Qu,{}),I2="SelectViewport",sV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=wl(I2,n),a=_$(I2,n),i=_t(t,o.onViewportChange),l=p.useRef(0);return p.createElement(p.Fragment,null,p.createElement("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}"}}),p.createElement(Nv.Slot,{scope:n},p.createElement(et.div,pe({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Be(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*Hi,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}))}))))})),lV="SelectGroup",[uV,cV]=dc(lV),fV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=to();return p.createElement(uV,{scope:n,id:o},p.createElement(et.div,pe({role:"group","aria-labelledby":o},r,{ref:t})))})),dV="SelectLabel",pV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=cV(dV,n);return p.createElement(et.div,pe({id:o.id},r,{ref:t}))})),zx="SelectItem",[hV,a3]=dc(zx),mV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=bl(zx,n),u=wl(zx,n),s=l.value===r,[c,d]=p.useState(a??""),[f,m]=p.useState(!1),h=_t(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),v=to(),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 p.createElement(hV,{scope:n,value:r,disabled:o,textId:v,isSelected:s,onItemTextChange:p.useCallback((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},p.createElement(Nv.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},p.createElement(et.div,pe({role:"option","aria-labelledby":v,"data-highlighted":f?"":void 0,"aria-selected":s&&f,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},i,{ref:h,onFocus:Be(i.onFocus,(()=>m(!0))),onBlur:Be(i.onBlur,(()=>m(!1))),onPointerUp:Be(i.onPointerUp,g),onPointerMove:Be(i.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Be(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:Be(i.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(HH.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),gm="SelectItemText",vV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=bl(gm,n),l=wl(gm,n),u=a3(gm,n),s=YH(gm,n),[c,d]=p.useState(null),f=_t(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=l.itemTextRefCallback)||void 0===t?void 0:t.call(l,e,u.value,u.disabled)})),m=null==c?void 0:c.textContent,h=p.useMemo((()=>p.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},m)),[u.disabled,u.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:g}=s;return ar((()=>(v(h),()=>g(h))),[v,g,h]),p.createElement(p.Fragment,null,p.createElement(et.span,pe({id:u.textId},a,{ref:f})),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?wi.createPortal(a.children,i.valueNode):null)})),gV="SelectItemIndicator",yV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return a3(gV,n).isSelected?p.createElement(et.span,pe({"aria-hidden":!0},r,{ref:t})):null})),M2="SelectScrollUpButton",bV=p.forwardRef(((e,t)=>{const n=wl(M2,e.__scopeSelect),r=_$(M2,e.__scopeSelect),[o,a]=p.useState(!1),i=_t(t,r.onScrollButtonChange);return ar((()=>{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?p.createElement(s3,pe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),j2="SelectScrollDownButton",wV=p.forwardRef(((e,t)=>{const n=wl(j2,e.__scopeSelect),r=_$(j2,e.__scopeSelect),[o,a]=p.useState(!1),i=_t(t,r.onScrollButtonChange);return ar((()=>{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?p.createElement(s3,pe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),s3=p.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=wl("SelectScrollButton",n),i=p.useRef(null),l=kv(n),u=p.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return p.useEffect((()=>()=>u()),[u]),ar((()=>{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]),p.createElement(et.div,pe({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Be(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:Be(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:Be(o.onPointerLeave,(()=>{u()}))}))})),xV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(et.div,pe({"aria-hidden":!0},r,{ref:t}))}));function l3(e){return""===e||void 0===e}const u3=p.forwardRef(((e,t)=>{const{value:n,...r}=e,o=p.useRef(null),a=_t(t,o),i=bv(n);return p.useEffect((()=>{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]),p.createElement(o3,{asChild:!0},p.createElement("select",pe({},r,{ref:a,defaultValue:n})))}));function c3(e){const t=Fr(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback((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=p.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return p.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function f3(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=_V(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 _V(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}u3.displayName="BubbleSelect";const d3=XH,p3=ZH,h3=eV,$V=tV,SV=nV,m3=rV,CV=sV,v3=fV,g3=pV,y3=mV,EV=vV,RV=yV,b3=bV,w3=wV,x3=xV,PV=d3,_3=p.forwardRef((({...e},t)=>I.jsx(PV,{ref:t,...e})));_3.displayName=d3.displayName;const $3=p.forwardRef(((e,t)=>I.jsx(v3,{ref:t,...e})));$3.displayName=v3.displayName;const S3=p.forwardRef(((e,t)=>I.jsx(h3,{ref:t,...e})));S3.displayName=h3.displayName;const $$=p.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>I.jsxs("div",{className:"w-full",children:[I.jsxs(p3,{ref:i,className:le("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-1 focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...a,children:[I.jsxs("div",{className:"flex flex-1 items-center gap-xxs",children:[o&&I.jsx("span",{className:le("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),I.jsx($V,{asChild:!0,children:I.jsx(rO,{size:20})})]}),n||r?r?I.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[I.jsx(aO,{size:16}),r]}):I.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[I.jsx(T6,{size:16}),n]}):null]})));$$.displayName="SelectTriggerWrapper";const C3=p.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>I.jsx($$,{ref:i,className:le("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));C3.displayName=p3.displayName;const E3=p.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a=p.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(p.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 I.jsx(SV,{children:I.jsx(m3,{ref:o,className:le("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-slate-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:I.jsx(CV,{className:le("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})})})}));E3.displayName=m3.displayName;const R3=p.forwardRef((({className:e,...t},n)=>I.jsx(g3,{ref:n,className:le("text-sm font-medium text-slate-900",e),...t})));R3.displayName=g3.displayName;const P3=p.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=I.jsx(RV,{children:I.jsx(r_,{size:20})});return I.jsxs(y3,{ref:a,className:le("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&i,I.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:I.jsx(EV,{children:r})}),t&&"right"===n&&i]})}));P3.displayName=y3.displayName;const T3=p.forwardRef((({className:e,...t},n)=>I.jsx(x3,{ref:n,className:le("-mx-1 my-1 h-px bg-slate-200",e),...t})));T3.displayName=x3.displayName;const TV=(e,t)=>{const n=p.useRef(null),[r,o]=p.useState(e.length);return p.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-slate-100 text-sm font-medium text-slate-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-slate-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 u=e.offsetWidth+4;if(!(i+u<=r))break;i+=u,l++}document.body.removeChild(a),o(Math.max(1,l))}),[e,t]),{containerRef:n,visibleCount:r}},OV=p.forwardRef((({className:e,selectedValues:t=[],placeholder:n,onRemoveValue:r,icon:o,caption:a,error:i,...l},u)=>{const{containerRef:s,visibleCount:c}=TV(t,r),d=t.length-c;return I.jsx($$,{ref:u,className:e,caption:a,error:i,icon:o,...l,children:I.jsx("div",{ref:s,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===t.length?I.jsx("span",{children:n||"Select options..."}):I.jsxs(WF,{children:[t.slice(0,c).map((e=>{const t="string"==typeof e?e:e.value;return I.jsx(t2,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==r?void 0:r(t)},t)})),d>0&&I.jsx(t2,{text:`+${d}`})]})})})}));OV.displayName="SelectMultiTrigger";const AV=p.forwardRef((({value:e,isSelected:t=!1,checkboxPosition:n="right",onSelect:r,className:o,children:a,...i},l)=>{const u=I.jsx(Y_,{size:"default",variant:"default",checked:t}),s=()=>{null==r||r(e)};return I.jsxs("div",{ref:l,className:le("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground",o),onClick:s,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),s())},...i,children:["left"===n&&u,I.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:a}),"right"===n&&u]})}));AV.displayName="SelectCheckboxItem";const NV=p.forwardRef((({className:e,...t},n)=>I.jsx(b3,{ref:n,className:le("flex cursor-default items-center justify-center py-xxs",e),...t,children:I.jsx(C6,{size:16})})));NV.displayName=b3.displayName;const kV=p.forwardRef((({className:e,...t},n)=>I.jsx(w3,{ref:n,className:le("flex cursor-default items-center justify-center p-xxs",e),...t,children:I.jsx(rO,{size:16})})));kV.displayName=w3.displayName;const DV=p.forwardRef((({className:e,children:t,...n},r)=>I.jsx("div",{ref:r,className:le("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));DV.displayName="SelectActions";const IV=p.forwardRef((({className:e,children:t,...n},r)=>I.jsx("div",{ref:r,className:le("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));IV.displayName="SelectFooter";const BZ=OH,O3=p.createContext({}),zZ=({...e})=>I.jsx(O3.Provider,{value:{name:e.name},children:I.jsx(qH,{...e})}),os=()=>{const e=p.useContext(O3),t=p.useContext(A3),n=Ov();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}},A3=p.createContext({}),MV=p.forwardRef((({className:e,...t},n)=>{const r=p.useId();return I.jsx(A3.Provider,{value:{id:r},children:I.jsx("div",{ref:n,className:le("mt-[8px]",e),...t})})}));MV.displayName="FormItem";const jV=p.forwardRef((({className:e,isRequired:t,...n},r)=>{var o;const{formItemId:a}=os();return I.jsx(tD,{ref:r,className:le("mb-2 text-sm font-medium",e),htmlFor:a,...n,children:t?`*${null==(o=n.children)?void 0:o.toString()}`:n.children})}));jV.displayName="FormLabel";const LV=p.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=os();return I.jsx(ns,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));LV.displayName="FormControl";const FV=p.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=os();return I.jsx("p",{ref:n,id:r,className:le("text-sm text-muted-foreground",e),...t})}));FV.displayName="FormDescription";const BV=p.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=os(),i=o?String(null==o?void 0:o.message):t;return i?I.jsxs("p",{ref:r,id:a,className:le("flex items-center gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[I.jsx(aO,{size:16,className:"text-red-dark"})," ",i]}):null}));BV.displayName="FormMessage";const zV=p.forwardRef((({...e},t)=>{const{name:n}=os();return I.jsx(_3,{ref:t,name:n,...e})}));zV.displayName="FormSelect";const qV=p.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=os();return I.jsx(C3,{ref:r,id:o,className:e,...n,children:t})}));qV.displayName="FormSelectTrigger";const WV=p.forwardRef(((e,t)=>I.jsx(E3,{ref:t,...e})));WV.displayName="FormSelectContent";const UV=p.forwardRef(((e,t)=>I.jsx(P3,{ref:t,...e})));UV.displayName="FormSelectItem";const HV=p.forwardRef(((e,t)=>I.jsx($3,{ref:t,...e})));HV.displayName="FormSelectGroup";const VV=p.forwardRef(((e,t)=>I.jsx(R3,{ref:t,...e})));VV.displayName="FormSelectLabel";const GV=p.forwardRef(((e,t)=>I.jsx(T3,{ref:t,...e})));GV.displayName="FormSelectSeparator";const KV=p.forwardRef(((e,t)=>I.jsx(S3,{ref:t,...e})));function Co(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 N3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>p.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return p.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=p.createContext(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,l=(null==n?void 0:n[e][a])||o,u=p.useMemo((()=>i),Object.values(i));return p.createElement(l.Provider,{value:u},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const l=(null==i?void 0:i[e][a])||o,u=p.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},YV(r,...t)]}function YV(...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 p.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function pc(e){const t=p.useRef(e);return p.useEffect((()=>{t.current=e})),p.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function XV({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=QV({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=pc(n);return[i,p.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function QV({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),a=pc(t);return p.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function ZV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function JV(...e){return t=>e.forEach((e=>ZV(e,t)))}function eG(...e){return p.useCallback(JV(...e),e)}function xl(e){return e.split("-")[0]}function ep(e){return e.split("-")[1]}function hc(e){return["top","bottom"].includes(xl(e))?"x":"y"}function S$(e){return"y"===e?"height":"width"}function L2(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=hc(t),u=S$(l),s=r[u]/2-o[u]/2,c="x"===l;let d;switch(xl(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(ep(t)){case"start":d[l]-=s*(n&&c?-1:1);break;case"end":d[l]+=s*(n&&c?-1:1)}return d}KV.displayName="FormSelectValue";const tG=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 u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:c}=L2(u,r,l),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:m,fn:h}=a[n],{x:v,y:g,data:y,reset:b}=await h({x:s,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});s=v??s,c=g??c,f={...f,[m]:{...f[m],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:s,y:c}=L2(u,d,l))),n=-1)}return{x:s,y:c,placement:d,strategy:o,middlewareData:f}};function k3(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 qm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Md(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,m=k3(p),h=l[f?"floating"===d?"reference":"floating":d],v=qm(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g=qm(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:u}):i[d]);return{top:v.top-g.top+m.top,bottom:g.bottom-v.bottom+m.bottom,left:v.left-g.left+m.left,right:g.right-v.right+m.right}}const nG=Math.min,tl=Math.max;function qx(e,t,n){return tl(e,nG(t,n))}const F2=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:a,placement:i,rects:l,platform:u}=t;if(null==n)return{};const s=k3(r),c={x:o,y:a},d=hc(i),f=ep(i),p=S$(d),m=await u.getDimensions(n),h="y"===d?"top":"left",v="y"===d?"bottom":"right",g=l.reference[p]+l.reference[d]-c[d]-l.floating[p],y=c[d]-l.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=l.floating[p]);const x=g/2-y/2,_=s[h],E=w-m[p]-s[v],S=w/2-m[p]/2+x,k=qx(_,S,E),C=("start"===f?s[h]:s[v])>0&&S!==k&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(C?S<_?_-S:E-S:0),data:{[d]:k,centerOffset:S-k}}}}),rG={left:"right",right:"left",bottom:"top",top:"bottom"};function Wm(e){return e.replace(/left|right|bottom|top/g,(e=>rG[e]))}function oG(e,t,n){void 0===n&&(n=!1);const r=ep(e),o=hc(e),a=S$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Wm(i)),{main:i,cross:Wm(i)}}const iG={start:"end",end:"start"};function B2(e){return e.replace(/start|end/g,(e=>iG[e]))}const D3=["top","right","bottom","left"];D3.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const aG=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:u}=t,{mainAxis:s=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...m}=e,h=xl(r),v=[i,...d||(h!==i&&p?function(e){const t=Wm(e);return[B2(e),t,B2(t)]}(i):[Wm(i)])],g=await Md(t,m),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(g[h]),c){const{main:e,cross:t}=oG(r,a,await(null==l.isRTL?void 0:l.isRTL(u.floating)));y.push(g[e],g[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=v[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 z2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function q2(e){return D3.some((t=>e[t]>=0))}const sG=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=z2(await Md(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:q2(t)}}}case"escaped":{const t=z2(await Md(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:q2(t)}}}default:return{}}}}},lG=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=xl(n),l=ep(n),u="x"===hc(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function I3(e){return"x"===e?"y":"x"}const uG=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}}},...u}=e,s={x:n,y:r},c=await Md(t,u),d=hc(xl(o)),f=I3(d);let p=s[d],m=s[f];if(a){const e="y"===d?"bottom":"right";p=qx(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";m=qx(m+c["y"===f?"top":"left"],m,m-c[e])}const h=l.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},cG=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:u=!0,crossAxis:s=!0}=e,c={x:n,y:r},d=hc(o),f=I3(d);let p=c[d],m=c[f];const h="function"==typeof l?l({...a,placement:o}):l,v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===d?"height":"width",t=a.reference[d]-a.floating[e]+v.mainAxis,n=a.reference[d]+a.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(xl(o)),n=a.reference[f]-a.floating[e]+(t&&null!=(g=null==(y=i.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=a.reference[f]+a.reference[e]+(t?0:null!=(b=null==(w=i.offset)?void 0:w[f])?b:0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},fG=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,u=await Md(t,l),s=xl(n),c=ep(n);let d,f;"top"===s||"bottom"===s?(d=s,f=c===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=s,d="end"===c?"top":"bottom");const p=tl(u.left,0),m=tl(u.right,0),h=tl(u.top,0),v=tl(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==h||0!==v?h+v:tl(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==m?p+m:tl(u.left,u.right)):u[f])},y=await o.getDimensions(a.floating);null==i||i({...t,...g});const b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function M3(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function na(e){if(null==e)return window;if(!M3(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function tp(e){return na(e).getComputedStyle(e)}function Vi(e){return M3(e)?"":e?(e.nodeName||"").toLowerCase():""}function j3(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function bi(e){return e instanceof na(e).HTMLElement}function es(e){return e instanceof na(e).Element}function C$(e){return!(typeof ShadowRoot>"u")&&(e instanceof na(e).ShadowRoot||e instanceof ShadowRoot)}function Dv(e){const{overflow:t,overflowX:n,overflowY:r}=tp(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function dG(e){return["table","td","th"].includes(Vi(e))}function W2(e){const t=/firefox/i.test(j3()),n=tp(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 L3(){return!/^((?!chrome|android).)*safari/i.test(j3())}const U2=Math.min,xd=Math.max,Um=Math.round;function Gi(e,t,n){var r,o,a,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let u=1,s=1;t&&bi(e)&&(u=e.offsetWidth>0&&Um(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Um(l.height)/e.offsetHeight||1);const c=es(e)?na(e):window,d=!L3()&&n,f=(l.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(l.top+(d&&null!=(a=null==(i=c.visualViewport)?void 0:i.offsetTop)?a:0))/s,m=l.width/u,h=l.height/s;return{width:m,height:h,top:p,right:f+m,bottom:p+h,left:f,x:f,y:p}}function Ka(e){return(t=e,(t instanceof na(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Iv(e){return es(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function F3(e){return Gi(Ka(e)).left+Iv(e).scrollLeft}function pG(e,t,n){const r=bi(t),o=Ka(t),a=Gi(e,r&&function(e){const t=Gi(e);return Um(t.width)!==e.offsetWidth||Um(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"!==Vi(t)||Dv(o))&&(i=Iv(t)),bi(t)){const e=Gi(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=F3(o));return{x:a.left+i.scrollLeft-l.x,y:a.top+i.scrollTop-l.y,width:a.width,height:a.height}}function B3(e){return"html"===Vi(e)?e:e.assignedSlot||e.parentNode||(C$(e)?e.host:null)||Ka(e)}function H2(e){return bi(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Wx(e){const t=na(e);let n=H2(e);for(;n&&dG(n)&&"static"===getComputedStyle(n).position;)n=H2(n);return n&&("html"===Vi(n)||"body"===Vi(n)&&"static"===getComputedStyle(n).position&&!W2(n))?t:n||function(e){let t=B3(e);for(C$(t)&&(t=t.host);bi(t)&&!["html","body"].includes(Vi(t));){if(W2(t))return t;t=t.parentNode}return null}(e)||t}function V2(e){if(bi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Gi(e);return{width:t.width,height:t.height}}function z3(e){const t=B3(e);return["html","body","#document"].includes(Vi(t))?e.ownerDocument.body:bi(t)&&Dv(t)?t:z3(t)}function Hm(e,t){var n;void 0===t&&(t=[]);const r=z3(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=na(r),i=o?[a].concat(a.visualViewport||[],Dv(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Hm(i))}function G2(e,t,n){return"viewport"===t?qm(function(e,t){const n=na(e),r=Ka(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const e=L3();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}(e,n)):es(t)?function(e,t){const n=Gi(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):qm(function(e){var t;const n=Ka(e),r=Iv(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=xd(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=xd(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+F3(e);const u=-r.scrollTop;return"rtl"===tp(o||n).direction&&(l+=xd(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:u}}(Ka(e)))}function hG(e){const t=Hm(e),n=["absolute","fixed"].includes(tp(e).position)&&bi(e)?Wx(e):e;return es(n)?t.filter((e=>es(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&C$(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Vi(e))):[]}const mG={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?hG(t):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=G2(t,n,o);return e.top=xd(r.top,e.top),e.right=U2(r.right,e.right),e.bottom=U2(r.bottom,e.bottom),e.left=xd(r.left,e.left),e}),G2(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=bi(n),a=Ka(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Vi(n)||Dv(a))&&(i=Iv(n)),bi(n))){const e=Gi(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:es,getDimensions:V2,getOffsetParent:Wx,getDocumentElement:Ka,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:pG(t,Wx(n),r),floating:{...V2(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===tp(e).direction};function vG(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=!0,animationFrame:l=!1}=r,u=o&&!l,s=a&&!l,c=u||s?[...es(e)?Hm(e):[],...Hm(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));let d,f=null;if(i){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),es(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Gi(e):null;return l&&function t(){const r=Gi(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=>{u&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const gG=(e,t,n)=>tG(e,t,{platform:mG,...n});var Ux=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Hx(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(!Hx(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||Hx(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function yG(e){const t=p.useRef(e);return Ux((()=>{t.current=e})),t}function bG(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=p.useRef(null),i=p.useRef(null),l=yG(o),u=p.useRef(null),[s,c]=p.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=p.useState(t);Hx(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 m=p.useCallback((()=>{!a.current||!i.current||gG(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&wi.flushSync((()=>{c(e)}))}))}),[d,n,r]);Ux((()=>{h.current&&m()}),[m]);const h=p.useRef(!1);Ux((()=>(h.current=!0,()=>{h.current=!1})),[]);const v=p.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),a.current&&i.current)if(l.current){const e=l.current(a.current,i.current,m);u.current=e}else m()}),[m,l]),g=p.useCallback((e=>{a.current=e,v()}),[v]),y=p.useCallback((e=>{i.current=e,v()}),[v]),b=p.useMemo((()=>({reference:a,floating:i})),[]);return p.useMemo((()=>({...s,update:m,refs:b,reference:g,floating:y})),[s,m,b,g,y])}const wG=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?F2({element:t.current,padding:n}).fn(e):{}:t?F2({element:t,padding:n}).fn(e):{}}};function xG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function _G(...e){return t=>e.forEach((e=>xG(e,t)))}const q3=p.forwardRef(((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),a=o.find(SG);if(a){const e=a.props.children,n=o.map((t=>t===a?p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null:t));return p.createElement(Vx,pe({},r,{ref:t}),p.isValidElement(e)?p.cloneElement(e,void 0,n):null)}return p.createElement(Vx,pe({},r,{ref:t}),n)}));q3.displayName="Slot";const Vx=p.forwardRef(((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...CG(r,n.props),ref:_G(t,n.ref)}):p.Children.count(n)>1?p.Children.only(null):null}));Vx.displayName="SlotClone";const $G=({children:e})=>p.createElement(p.Fragment,null,e);function SG(e){return p.isValidElement(e)&&e.type===$G}function CG(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 EG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Zu=EG.reduce(((e,t)=>{const n=p.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?q3:t;return p.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),p.createElement(a,pe({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function RG(e,t){e&&wi.flushSync((()=>e.dispatchEvent(t)))}function PG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function TG(...e){return t=>e.forEach((e=>PG(e,t)))}function W3(...e){return p.useCallback(TG(...e),e)}const il=null!=globalThis&&globalThis.document?p.useLayoutEffect:()=>{};function OG(e){const[t,n]=p.useState(void 0);return il((()=>{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 U3="Popper",[E$,H3]=N3(U3),[AG,V3]=E$(U3),NG=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement(AG,{scope:t,anchor:r,onAnchorChange:o},n)},kG="PopperAnchor",DG=p.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=V3(kG,n),i=p.useRef(null),l=W3(t,i);return p.useEffect((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:p.createElement(Zu.div,pe({},o,{ref:l}))})),Vm="PopperContent",[IG,qZ]=E$(Vm),[MG,jG]=E$(Vm,{hasParent:!1,positionUpdateFns:new Set}),LG=p.forwardRef(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:m="center",alignOffset:h=0,arrowPadding:v=0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,avoidCollisions:x=!0,onPlaced:_,...E}=e,S=V3(Vm,c),[k,C]=p.useState(null),N=W3(t,(e=>C(e))),[O,R]=p.useState(null),P=OG(O),j=null!==(n=null==P?void 0:P.width)&&void 0!==n?n:0,T=null!==(r=null==P?void 0:P.height)&&void 0!==r?r:0,D=d+("center"!==m?"-"+m:""),I="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},A=Array.isArray(g)?g:[g],L=A.length>0,M={padding:I,boundary:A.filter(BG),altBoundary:L},{reference:z,floating:F,strategy:B,x:$,y:W,placement:U,middlewareData:H,update:V}=bG({strategy:"fixed",placement:D,whileElementsMounted:vG,middleware:[zG(),lG({mainAxis:f+T,alignmentAxis:h}),x?uG({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?cG():void 0,...M}):void 0,O?wG({element:O,padding:v}):void 0,x?aG({...M}):void 0,fG({...M,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`)}}),qG({arrowWidth:j,arrowHeight:T}),w?sG({strategy:"referenceHidden"}):void 0].filter(FG)});il((()=>{z(S.anchor)}),[z,S.anchor]);const q=null!==$&&null!==W,[K,G]=G3(U),X=pc(_);il((()=>{q&&(null==X||X())}),[q,X]);const Q=null===(o=H.arrow)||void 0===o?void 0:o.x,Y=null===(a=H.arrow)||void 0===a?void 0:a.y,Z=0!==(null===(i=H.arrow)||void 0===i?void 0:i.centerOffset),[J,ee]=p.useState();il((()=>{k&&ee(window.getComputedStyle(k).zIndex)}),[k]);const{hasParent:te,positionUpdateFns:ne}=jG(Vm,c),re=!te;p.useLayoutEffect((()=>{if(!re)return ne.add(V),()=>{ne.delete(V)}}),[re,ne,V]),il((()=>{re&&q&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,q,ne]);const oe={"data-side":K,"data-align":G,...E,ref:N,style:{...E.style,animation:q?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return p.createElement("div",{ref:F,"data-radix-popper-content-wrapper":"",style:{position:B,left:0,top:0,transform:q?`translate3d(${Math.round($)}px, ${Math.round(W)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(u=H.transformOrigin)||void 0===u?void 0:u.x,null===(s=H.transformOrigin)||void 0===s?void 0:s.y].join(" ")},dir:e.dir},p.createElement(IG,{scope:c,placedSide:K,onArrowChange:R,arrowX:Q,arrowY:Y,shouldHideArrow:Z},re?p.createElement(MG,{scope:c,hasParent:!0,positionUpdateFns:ne},p.createElement(Zu.div,oe)):p.createElement(Zu.div,oe)))}));function FG(e){return void 0!==e}function BG(e){return null!==e}const zG=()=>({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`),{}}}),qG=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=G3(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?h:`${v}px`,b=-f+"px"):"top"===p?(y=c?h:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?h:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?h:`${g}px`),{data:{x:y,y:b}}}});function G3(e){const[t,n="center"]=e.split("-");return[t,n]}const WG=NG,UG=DG,HG=LG,VG=p.forwardRef(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?s_.createPortal(p.createElement(Zu.div,pe({},o,{ref:t})),r):null}));function GG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function KG(...e){return t=>e.forEach((e=>GG(e,t)))}function YG(...e){return p.useCallback(KG(...e),e)}function XG(e,t){return p.useReducer(((e,n)=>t[e][n]??e),e)}const R$=e=>{const{present:t,children:n}=e,r=QG(t),o="function"==typeof n?n({present:r.isPresent}):p.Children.only(n),a=YG(r.ref,o.ref);return"function"==typeof n||r.isPresent?p.cloneElement(o,{ref:a}):null};function QG(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),a=p.useRef("none"),i=e?"mounted":"unmounted",[l,u]=XG(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect((()=>{const e=ym(r.current);a.current="mounted"===l?e:"none"}),[l]),il((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=ym(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),il((()=>{if(t){const e=e=>{const n=ym(r.current).includes(e.animationName);e.target===t&&n&&wi.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=ym(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)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function ym(e){return(null==e?void 0:e.animationName)||"none"}function ZG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function JG(...e){return t=>e.forEach((e=>ZG(e,t)))}function eK(...e){return p.useCallback(JG(...e),e)}function tK(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e);p.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}R$.displayName="Presence";const Gx="dismissableLayer.update",nK="dismissableLayer.pointerDownOutside",rK="dismissableLayer.focusOutside";let K2;const oK=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iK=p.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...s}=e,c=p.useContext(oK),[d,f]=p.useState(null),m=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=p.useState({}),v=eK(t,(e=>f(e))),g=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),w=d?g.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,E=aK((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!_||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),m),S=sK((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==l||l(e),e.defaultPrevented||null==u||u())}),m);return tK((e=>{w===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),m),p.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(K2=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Y2(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=K2)}}),[d,m,r,c]),p.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Y2())}),[d,c]),p.useEffect((()=>{const e=()=>h({});return document.addEventListener(Gx,e),()=>document.removeEventListener(Gx,e)}),[]),p.createElement(Zu.div,pe({},s,{ref:v,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:Co(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Co(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Co(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function aK(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=p.useRef(!1),o=p.useRef((()=>{}));return p.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){K3(nK,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 sK(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=p.useRef(!1);return p.useEffect((()=>{const e=e=>{e.target&&!r.current&&K3(rK,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 Y2(){const e=new CustomEvent(Gx);document.dispatchEvent(e)}function K3(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?RG(o,a):o.dispatchEvent(a)}let vw;const Y3="HoverCard",[X3,WZ]=N3(Y3,[H3]),P$=H3(),[lK,Mv]=X3(Y3),uK=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,u=P$(t),s=p.useRef(0),c=p.useRef(0),d=p.useRef(!1),f=p.useRef(!1),[m=!1,h]=XV({prop:r,defaultProp:o,onChange:a}),v=p.useCallback((()=>{clearTimeout(c.current),s.current=window.setTimeout((()=>h(!0)),i)}),[i,h]),g=p.useCallback((()=>{clearTimeout(s.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>h(!1)),l))}),[l,h]),y=p.useCallback((()=>h(!1)),[h]);return p.useEffect((()=>()=>{clearTimeout(s.current),clearTimeout(c.current)}),[]),p.createElement(lK,{scope:t,open:m,onOpenChange:h,onOpen:v,onClose:g,onDismiss:y,hasSelectionRef:d,isPointerDownOnContentRef:f},p.createElement(WG,u,n))},cK="HoverCardTrigger",fK=p.forwardRef(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Mv(cK,n),a=P$(n);return p.createElement(UG,pe({asChild:!0},a),p.createElement(Zu.a,pe({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:Co(e.onPointerEnter,Gm(o.onOpen)),onPointerLeave:Co(e.onPointerLeave,Gm(o.onClose)),onFocus:Co(e.onFocus,o.onOpen),onBlur:Co(e.onBlur,o.onClose),onTouchStart:Co(e.onTouchStart,(e=>e.preventDefault()))})))})),Q3="HoverCardPortal",[dK,pK]=X3(Q3,{forceMount:void 0}),hK=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Mv(Q3,t);return p.createElement(dK,{scope:t,forceMount:n},p.createElement(R$,{present:n||a.open},p.createElement(VG,{asChild:!0,container:o},r)))},Kx="HoverCardContent",mK=p.forwardRef(((e,t)=>{const n=pK(Kx,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Mv(Kx,e.__scopeHoverCard);return p.createElement(R$,{present:r||a.open},p.createElement(vK,pe({"data-state":a.open?"open":"closed"},o,{onPointerEnter:Co(e.onPointerEnter,Gm(a.onOpen)),onPointerLeave:Co(e.onPointerLeave,Gm(a.onClose)),ref:t})))})),vK=p.forwardRef(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...l}=e,u=Mv(Kx,n),s=P$(n),c=p.useRef(null),d=eG(t,c),[f,m]=p.useState(!1);return p.useEffect((()=>{if(f){const e=document.body;return vw=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=vw,e.style.webkitUserSelect=vw}}}),[f]),p.useEffect((()=>{if(c.current){const e=()=>{m(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),p.useEffect((()=>{c.current&&gK(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),p.createElement(iK,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Co(a,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},p.createElement(HG,pe({},s,l,{onPointerDown:Co(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&m(!0),u.hasSelectionRef.current=!1,u.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 Gm(e){return t=>"touch"===t.pointerType?void 0:e()}function gK(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 yK=uK,bK=fK,wK=hK,Z3=mK,UZ=yK,HZ=bK,VZ=wK,xK=p.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>I.jsx(Z3,{ref:o,align:t,sideOffset:n,className:le("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})));xK.displayName=Z3.displayName;const J3=p.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=os();return I.jsx("input",{type:t,className:le("flex w-full rounded-m px-4 py-3.5 text-base text-slate-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-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));J3.displayName="Input";const _K=p.forwardRef(((e,t)=>p.createElement(et.label,pe({},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()}})))),eD=_K,$K=Qi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),tD=p.forwardRef((({className:e,...t},n)=>I.jsx(eD,{ref:n,className:le($K(),e),...t})));tD.displayName=eD.displayName;const nD="Radio",[SK,rD]=br(nD),[CK,EK]=SK(nD),RK=p.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,...s}=e,[c,d]=p.useState(null),f=_t(t,(e=>d(e))),m=p.useRef(!1),h=!c||!!c.closest("form");return p.createElement(CK,{scope:n,checked:o,disabled:i},p.createElement(et.button,pe({type:"button",role:"radio","aria-checked":o,"data-state":oD(o),"data-disabled":i?"":void 0,disabled:i,value:l},s,{ref:f,onClick:Be(e.onClick,(e=>{o||null==u||u(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&p.createElement(OK,{control:c,bubbles:!m.current,name:r,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),PK="RadioIndicator",TK=p.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=EK(PK,n);return p.createElement(Ro,{present:r||a.checked},p.createElement(et.span,pe({"data-state":oD(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),OK=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=p.useRef(null),i=bv(n),l=wv(t);return p.useEffect((()=>{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]),p.createElement("input",pe({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 oD(e){return e?"checked":"unchecked"}const AK=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],iD="RadioGroup",[NK,GZ]=br(iD,[cc,rD]),aD=cc(),sD=rD(),[kK,DK]=NK(iD),IK=p.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:u,dir:s,loop:c=!0,onValueChange:d,...f}=e,m=aD(n),h=Qd(s),[v,g]=Wo({prop:a,defaultProp:o,onChange:d});return p.createElement(kK,{scope:n,name:r,required:i,disabled:l,value:v,onValueChange:g},p.createElement(p$,pe({asChild:!0},m,{orientation:u,dir:h,loop:c}),p.createElement(et.div,pe({role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h},f,{ref:t}))))})),MK="RadioGroupItem",jK=p.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=DK(MK,n),i=a.disabled||r,l=aD(n),u=sD(n),s=p.useRef(null),c=_t(t,s),d=a.value===o.value,f=p.useRef(!1);return p.useEffect((()=>{const e=e=>{AK.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)}}),[]),p.createElement(h$,pe({asChild:!0},l,{focusable:!i,active:d}),p.createElement(RK,pe({disabled:i,required:a.required,checked:d},u,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:Be((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Be(o.onFocus,(()=>{var e;f.current&&(null===(e=s.current)||void 0===e||e.click())}))})))})),LK=p.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=sD(n);return p.createElement(TK,pe({},o,r,{ref:t}))})),lD=IK,uD=jK,FK=LK,BK=p.forwardRef((({className:e,...t},n)=>I.jsx(lD,{className:le("grid gap-2",e),...t,ref:n})));BK.displayName=lD.displayName;const zK=p.forwardRef((({className:e,...t},n)=>I.jsx(uD,{ref:n,className:le("aspect-square size-6 rounded-full border border-slate-300 disabled:cursor-not-allowed disabled:border-slate-100 disabled:bg-slate-100 data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 md:hover:border-2",e),...t,children:I.jsx(FK,{className:"flex items-center justify-center",children:I.jsx(R6,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));zK.displayName=uD.displayName;const qK=rv,KZ=m_,YZ=oc,WK=ov,cD=p.forwardRef((({className:e,...t},n)=>I.jsx(nc,{className:le("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})));cD.displayName=nc.displayName;const UK=Qi("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"}}),fD=p.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>I.jsxs(WK,{children:[I.jsx(cD,{className:le("bg-slate-900/70",n)}),I.jsxs(rc,{ref:a,className:le(UK({side:e}),t),...o,children:[r,I.jsxs(oc,{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:[I.jsx(o_,{className:"h-4 w-4"}),I.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));fD.displayName=rc.displayName;const dD=({className:e,...t})=>I.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});dD.displayName="SheetHeader";const HK=({className:e,...t})=>I.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});HK.displayName="SheetFooter";const pD=p.forwardRef((({className:e,...t},n)=>I.jsx(qd,{ref:n,className:le("text-lg font-semibold text-foreground",e),...t})));pD.displayName=qd.displayName;const hD=p.forwardRef((({className:e,...t},n)=>I.jsx(Wd,{ref:n,className:le("text-sm text-muted-foreground",e),...t})));hD.displayName=Wd.displayName;const[jv,XZ]=br("Tooltip",[uc]),T$=uc(),VK="TooltipProvider",GK=700,Yx="tooltip.open",[KK,O$]=jv(VK),mD=e=>{const{__scopeTooltip:t,delayDuration:n=GK,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,l]=p.useState(!0),u=p.useRef(!1),s=p.useRef(0);return p.useEffect((()=>{const e=s.current;return()=>window.clearTimeout(e)}),[]),p.createElement(KK,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:p.useCallback((()=>{window.clearTimeout(s.current),l(!1)}),[]),onClose:p.useCallback((()=>{window.clearTimeout(s.current),s.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:p.useCallback((e=>{u.current=e}),[]),disableHoverableContent:o},a)},A$="Tooltip",[YK,Lv]=jv(A$),vD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=O$(A$,e.__scopeTooltip),s=T$(t),[c,d]=p.useState(null),f=to(),m=p.useRef(0),h=i??u.disableHoverableContent,v=l??u.delayDuration,g=p.useRef(!1),[y=!1,b]=Wo({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Yx))):u.onClose(),null==a||a(e)}}),w=p.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=p.useCallback((()=>{window.clearTimeout(m.current),g.current=!1,b(!0)}),[b]),_=p.useCallback((()=>{window.clearTimeout(m.current),b(!1)}),[b]),E=p.useCallback((()=>{window.clearTimeout(m.current),m.current=window.setTimeout((()=>{g.current=!0,b(!0)}),v)}),[v,b]);return p.useEffect((()=>()=>window.clearTimeout(m.current)),[]),p.createElement(Rv,s,p.createElement(YK,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:c,onTriggerChange:d,onTriggerEnter:p.useCallback((()=>{u.isOpenDelayed?E():x()}),[u.isOpenDelayed,E,x]),onTriggerLeave:p.useCallback((()=>{h?_():window.clearTimeout(m.current)}),[_,h]),onOpen:x,onClose:_,disableHoverableContent:h},n))},X2="TooltipTrigger",gD=p.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Lv(X2,n),a=O$(X2,n),i=T$(n),l=_t(t,p.useRef(null),o.onTriggerChange),u=p.useRef(!1),s=p.useRef(!1),c=p.useCallback((()=>u.current=!1),[]);return p.useEffect((()=>()=>document.removeEventListener("pointerup",c)),[c]),p.createElement(c$,pe({asChild:!0},i),p.createElement(et.button,pe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:Be(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!s.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)})),onPointerLeave:Be(e.onPointerLeave,(()=>{o.onTriggerLeave(),s.current=!1})),onPointerDown:Be(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:Be(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:Be(e.onBlur,o.onClose),onClick:Be(e.onClick,o.onClose)})))})),XK="TooltipPortal",[QZ,QK]=jv(XK,{forceMount:void 0}),jd="TooltipContent",yD=p.forwardRef(((e,t)=>{const n=QK(jd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Lv(jd,e.__scopeTooltip);return p.createElement(Ro,{present:r||i.open},i.disableHoverableContent?p.createElement(bD,pe({side:o},a,{ref:t})):p.createElement(ZK,pe({side:o},a,{ref:t})))})),ZK=p.forwardRef(((e,t)=>{const n=Lv(jd,e.__scopeTooltip),r=O$(jd,e.__scopeTooltip),o=p.useRef(null),a=_t(t,o),[i,l]=p.useState(null),{trigger:u,onClose:s}=n,c=o.current,{onPointerInTransitChange:d}=r,f=p.useCallback((()=>{l(null),d(!1)}),[d]),m=p.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=oY([...tY(r,eY(r,n.getBoundingClientRect())),...nY(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return p.useEffect((()=>()=>f()),[f]),p.useEffect((()=>{if(u&&c){const e=e=>m(e,c),t=e=>m(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,m,f]),p.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!rY(n,i);r?f():o&&(f(),s())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,i,s,f]),p.createElement(bD,pe({},e,{ref:a}))})),[JK,ZZ]=jv(A$,{isInside:!1}),bD=p.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=Lv(jd,n),s=T$(n),{onClose:c}=u;return p.useEffect((()=>(document.addEventListener(Yx,c),()=>document.removeEventListener(Yx,c))),[c]),p.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),p.createElement(Jm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},p.createElement(f$,pe({"data-state":u.stateAttribute},s,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)"}}),p.createElement(l_,null,r),p.createElement(JK,{scope:n,isInside:!0},p.createElement(WH,{id:u.contentId,role:"tooltip"},o||r))))}));function eY(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 tY(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 nY(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 rY(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,u=t[a].x,s=t[a].y;l>r!=s>r&&n<(u-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function oY(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)),iY(t)}function iY(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 aY=mD,sY=vD,lY=gD,wD=yD;function uY(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)}function cY(e){return uY(e)&&"type"in e&&"string"==typeof e.type}var xD=Symbol.for("immer-nothing"),Q2=Symbol.for("immer-draftable"),oo=Symbol.for("immer-state");function Bo(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ju=Object.getPrototypeOf;function ts(e){return!!e&&!!e[oo]}function Xi(e){var t;return!!e&&(_D(e)||Array.isArray(e)||!!e[Q2]||!(null==(t=e.constructor)||!t[Q2])||Bv(e)||zv(e))}var fY=Object.prototype.constructor.toString();function _D(e){if(!e||"object"!=typeof e)return!1;const t=Ju(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===fY}function Ld(e,t){0===Fv(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function Fv(e){const t=e[oo];return t?t.type_:Array.isArray(e)?1:Bv(e)?2:zv(e)?3:0}function Xx(e,t){return 2===Fv(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $D(e,t,n){const r=Fv(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function dY(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Bv(e){return e instanceof Map}function zv(e){return e instanceof Set}function nl(e){return e.copy_||e.base_}function Qx(e,t){if(Bv(e))return new Map(e);if(zv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&_D(e))return Ju(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[oo];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],a=n[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(Ju(e),n)}function N$(e,t=!1){return qv(e)||ts(e)||!Xi(e)||(Fv(e)>1&&(e.set=e.add=e.clear=e.delete=pY),Object.freeze(e),t&&Ld(e,((e,t)=>N$(t,!0)))),e}function pY(){Bo(2)}function qv(e){return Object.isFrozen(e)}var Fd,hY={};function hl(e){const t=hY[e];return t||Bo(0,e),t}function SD(){return Fd}function mY(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Z2(e,t){t&&(hl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zx(e){Jx(e),e.drafts_.forEach(vY),e.drafts_=null}function Jx(e){e===Fd&&(Fd=e.parent_)}function J2(e){return Fd=mY(Fd,e)}function vY(e){const t=e[oo];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function eT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[oo].modified_&&(Zx(t),Bo(4)),Xi(e)&&(e=Km(t,e),t.parent_||Ym(t,e)),t.patches_&&hl("Patches").generateReplacementPatches_(n[oo].base_,e,t.patches_,t.inversePatches_)):e=Km(t,n,[]),Zx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xD?e:void 0}function Km(e,t,n){if(qv(t))return t;const r=t[oo];if(!r)return Ld(t,((o,a)=>tT(e,r,t,o,a,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Ym(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,a=!1;3===r.type_&&(o=new Set(t),t.clear(),a=!0),Ld(o,((o,i)=>tT(e,r,t,o,i,n,a))),Ym(e,t,!1),n&&e.patches_&&hl("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function tT(e,t,n,r,o,a,i){if(ts(o)){const i=Km(e,o,a&&t&&3!==t.type_&&!Xx(t.assigned_,r)?a.concat(r):void 0);if($D(n,r,i),!ts(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(Xi(o)&&!qv(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Km(e,o),(!t||!t.scope_.parent_)&&Ym(e,o)}}function Ym(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&N$(t,n)}function gY(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:SD(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=k$;n&&(o=[r],a=Bd);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=i,l}var k$={get(e,t){if(t===oo)return e;const n=nl(e);if(!Xx(n,t))return yY(e,n,t);const r=n[t];return e.finalized_||!Xi(r)?r:r===gw(e.base_,t)?(yw(e),e.copy_[t]=t_(r,e)):r},has:(e,t)=>t in nl(e),ownKeys:e=>Reflect.ownKeys(nl(e)),set(e,t,n){const r=CD(nl(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=gw(nl(e),t),o=null==r?void 0:r[oo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(dY(n,r)&&(void 0!==n||Xx(e.base_,t)))return!0;yw(e),e_(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==gw(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,yw(e),e_(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=nl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){Bo(11)},getPrototypeOf:e=>Ju(e.base_),setPrototypeOf(){Bo(12)}},Bd={};function gw(e,t){const n=e[oo];return(n?nl(n):e)[t]}function yY(e,t,n){var r;const o=CD(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function CD(e,t){if(!(t in e))return;let n=Ju(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ju(n)}}function e_(e){e.modified_||(e.modified_=!0,e.parent_&&e_(e.parent_))}function yw(e){e.copy_||(e.copy_=Qx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Ld(k$,((e,t)=>{Bd[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Bd.deleteProperty=function(e,t){return Bd.set.call(this,e,t,void 0)},Bd.set=function(e,t,n){return k$.set.call(this,e[0],t,n,e[0])};var bY=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&Bo(6),void 0!==n&&"function"!=typeof n&&Bo(7),Xi(e)){const o=J2(this),a=t_(e,void 0);let i=!0;try{r=t(a),i=!1}finally{i?Zx(o):Jx(o)}return Z2(o,n),eT(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===xD&&(r=void 0),this.autoFreeze_&&N$(r,!0),n){const t=[],o=[];hl("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Bo(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Xi(e)||Bo(8),ts(e)&&(e=ED(e));const t=J2(this),n=t_(e,void 0);return n[oo].isManual_=!0,Jx(t),n}finishDraft(e,t){const n=e&&e[oo];(!n||!n.isManual_)&&Bo(9);const{scope_:r}=n;return Z2(r,t),eT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=hl("Patches").applyPatches_;return ts(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function t_(e,t){const n=Bv(e)?hl("MapSet").proxyMap_(e,t):zv(e)?hl("MapSet").proxySet_(e,t):gY(e,t);return(t?t.scope_:SD()).drafts_.push(n),n}function ED(e){return ts(e)||Bo(10,e),RD(e)}function RD(e){if(!Xi(e)||qv(e))return e;const t=e[oo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Qx(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Qx(e,!0);return Ld(n,((e,t)=>{$D(n,e,RD(t))})),t&&(t.finalized_=!1),n}var io=new bY,PD=io.produce;function wY(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function xY(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function _Y(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}io.produceWithPatches.bind(io),io.setAutoFreeze.bind(io),io.setUseStrictShallowCopy.bind(io),io.applyPatches.bind(io),io.createDraft.bind(io),io.finishDraft.bind(io);var nT=e=>Array.isArray(e)?e:[e];function $Y(e){const t=Array.isArray(e[0])?e[0]:e;return _Y(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function SY(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var CY=class{constructor(e){this.value=e}deref(){return this.value}},EY=typeof WeakRef<"u"?WeakRef:CY,RY=0,rT=1;function bm(){return{s:RY,v:void 0,o:null,p:null}}function D$(e,t={}){let n=bm();const{resultEqualityCheck:r}=t;let o,a=0;function i(){var t;let i=n;const{length:l}=arguments;for(let e=0,t=l;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=i.o;null===e&&(i.o=e=new WeakMap);const n=e.get(t);void 0===n?(i=bm(),e.set(t,i)):i=n}else{let e=i.p;null===e&&(i.p=e=new Map);const n=e.get(t);void 0===n?(i=bm(),e.set(t,i)):i=n}}const u=i;let s;if(i.s===rT?s=i.v:(s=e.apply(null,arguments),a++),u.s=rT,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,s)&&(s=e,0!==a&&a--),o="object"==typeof s&&null!==s||"function"==typeof s?new EY(s):s}return u.v=s,s}return i.clearCache=()=>{n=bm(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function TD(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),wY(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const l={...n,...a},{memoize:u,memoizeOptions:s=[],argsMemoize:c=D$,argsMemoizeOptions:d=[],devModeChecks:f={}}=l,p=nT(s),m=nT(d),h=$Y(e),v=u((function(){return r++,i.apply(null,arguments)}),...p),g=c((function(){o++;const e=SY(h,arguments);return t=v.apply(null,e),t}),...m);return Object.assign(g,{resultFunc:i,memoizedResultFunc:v,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var PY=TD(D$),TY=Object.assign(((e,t=PY)=>{xY(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>TY}),OY=(...e)=>{const t=TD(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(ts(e)?ED(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};function ec(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(ro(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>cY(t)&&t.type===e,n}function oT(e){return Xi(e)?PD(e,(()=>{})):e}function iT(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error(ro(10));const r=n.insert(t,e);return e.set(t,r),r}function OD(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(ro(28));if(r in t)throw new Error(ro(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function AY(e){return"function"==typeof e}function NY(e,t){let n,[r,o,a]=OD(t);if(AY(e))n=()=>oT(e());else{const t=oT(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[a]),i.reduce(((e,n)=>{if(n){if(ts(e)){const r=n(e,t);return void 0===r?e:r}if(Xi(e))return PD(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(ro(9))}return r}}return e}),e)}return i.getInitialState=n,i}OY(D$);var kY="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",DY=(e=21)=>{let t="",n=e;for(;n--;)t+=kY[64*Math.random()|0];return t},IY=Symbol.for("rtk-slice-createasyncthunk");function MY(e,t){return`${e}/${t}`}function jY({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[IY];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(ro(11));const o=("function"==typeof e.reducers?e.reducers(BY()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(ro(12));if(n in i.sliceCaseReducersByType)throw new Error(ro(13));return i.sliceCaseReducersByType[n]=t,l},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),l),exposeAction:(e,t)=>(i.actionCreators[e]=t,l),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,l)};function u(){const[t={},n=[],r]="function"==typeof e.extraReducers?OD(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return NY(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}a.forEach((r=>{const a=o[r],i={reducerName:r,type:MY(t,r),createNotation:"function"==typeof e.reducers};qY(a)?UY(i,a,l,n):zY(i,a,l)}));const s=e=>e,c=new Map;let d;function f(e,t){return d||(d=u()),d(e,t)}function p(){return d||(d=u()),d.getInitialState()}function m(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function o(t=s){const r=iT(c,n,{insert:()=>new WeakMap});return iT(r,t,{insert:()=>{const r={};for(const[o,a]of Object.entries(e.selectors??{}))r[o]=LY(a,t,p,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const h={name:t,reducer:f,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:p,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},n),{...h,...m(o,!0)}}};return h}}function LY(e,t,n,r){function o(o,...a){let i=t(o);return typeof i>"u"&&r&&(i=n()),e(i,...a)}return o.unwrapped=e,o}var FY=jY();function BY(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function zY({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!WY(r))throw new Error(ro(17));a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?ec(e,i):ec(e))}function qY(e){return"asyncThunk"===e._reducerDefinitionType}function WY(e){return"reducerWithPrepare"===e._reducerDefinitionType}function UY({type:e,reducerName:t},n,r,o){if(!o)throw new Error(ro(18));const{payloadCreator:a,fulfilled:i,pending:l,rejected:u,settled:s,options:c}=n,d=o(e,a,c);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),l&&r.addCase(d.pending,l),u&&r.addCase(d.rejected,u),s&&r.addMatcher(d.settled,s),r.exposeCaseReducer(t,{fulfilled:i||wm,pending:l||wm,rejected:u||wm,settled:s||wm})}function wm(){}var HY=(e,t)=>{if("function"!=typeof e)throw new Error(ro(32))},I$="listenerMiddleware",VY=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:a}=e;if(t)o=ec(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(ro(21));return HY(a),{predicate:o,type:t,effect:a}},GY=Object.assign((e=>{const{type:t,predicate:n,effect:r}=VY(e);return{id:DY(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ro(22))}}}),{withTypes:()=>GY}),KY=Object.assign(ec(`${I$}/add`),{withTypes:()=>KY});ec(`${I$}/removeAll`);var YY=Object.assign(ec(`${I$}/remove`),{withTypes:()=>YY});function ro(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const AD=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},XY={deviceType:AD()},np=FY({name:"ui",initialState:XY,reducers:{setDeviceType:(e,{payload:t})=>{e.deviceType=t}},selectors:{selectDeviceType:e=>e.deviceType,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var bw,aT,ww,sT,xw,lT,_w,uT,$w,cT,Sw,fT,Cw,dT,Ew,pT,Rw,hT,Pw,mT,Tw,vT,Ow,gT,Aw,yT,Nw,bT,kw,wT,Dw,xT,Iw,_T,Mw,$T,jw,ST,Lw,CT,Fw,ET,Bw,RT,zw,PT,qw,TT,Ww,OT,Uw,AT,Hw,NT,Vw,kT,Gw,DT,Kw,IT,Yw,MT,Xw,jT,Qw,LT,Zw,FT,Jw,BT,ex,zT,tx,qT,nx,WT,rx,UT,ox,HT,ix,VT;function ND(){if(aT)return bw;aT=1;var e=IA(),t=e&&new e;return bw=t}function kD(){if(sT)return ww;sT=1;var e=Yd(),t=ND();return ww=t?function(e,n){return t.set(e,n),e}:e}function Wv(){if(lT)return xw;lT=1;var e=yv(),t=Po();return xw=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}},xw}function QY(){if(uT)return _w;uT=1;var e=Wv(),t=xr();return _w=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)}},_w}function DD(){if(cT)return $w;cT=1;var e=Math.max;return $w=function(t,n,r,o){for(var a=-1,i=t.length,l=r.length,u=-1,s=n.length,c=e(i-l,0),d=Array(s+c),f=!o;++u<s;)d[u]=n[u];for(;++a<l;)(f||a<i)&&(d[r[a]]=t[a]);for(;c--;)d[u++]=t[a++];return d}}function ID(){if(fT)return Sw;fT=1;var e=Math.max;return Sw=function(t,n,r,o){for(var a=-1,i=t.length,l=-1,u=r.length,s=-1,c=n.length,d=e(i-u,0),f=Array(d+c),p=!o;++a<d;)f[a]=t[a];for(var m=a;++s<c;)f[m+s]=n[s];for(;++l<u;)(p||a<i)&&(f[m+r[l]]=t[a++]);return f}}function ZY(){if(dT)return Cw;return dT=1,Cw=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function M$(){if(pT)return Ew;return pT=1,Ew=function(){}}function j$(){if(hT)return Rw;hT=1;var e=yv(),t=M$();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,Rw=n}function MD(){if(mT)return Pw;mT=1;var e=ND(),t=BA();return Pw=e?function(t){return e.get(t)}:t}function JY(){if(vT)return Tw;vT=1;return Tw={}}function eX(){if(gT)return Ow;gT=1;var e=JY(),t=Object.prototype.hasOwnProperty;return Ow=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 jD(){if(yT)return Aw;yT=1;var e=yv(),t=M$();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,Aw=n}function tX(){if(bT)return Nw;bT=1;var e=j$(),t=jD(),n=gv();return Nw=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 nX(){if(wT)return kw;wT=1;var e=j$(),t=jD(),n=M$(),r=wr(),o=lo(),a=tX(),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,kw=l}function rX(){if(xT)return Dw;xT=1;var e=j$(),t=MD(),n=eX(),r=nX();return Dw=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 LD(){if(_T)return Iw;_T=1;var e=kD(),t=GA()(e);return Iw=t}function oX(){if($T)return Mw;$T=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return Mw=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function iX(){if(ST)return jw;ST=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return jw=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 aX(){if(CT)return Lw;CT=1;var e=V_(),t=FA(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return Lw=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function FD(){if(ET)return Fw;ET=1;var e=oX(),t=iX(),n=q_(),r=aX();return Fw=function(o,a,i){var l=a+"";return n(o,t(l,r(e(l),i)))}}function BD(){if(RT)return Bw;RT=1;var e=rX(),t=LD(),n=FD();return Bw=function(r,o,a,i,l,u,s,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var m=[r,o,l,p?u:void 0,p?s:void 0,p?void 0:u,p?void 0:s,c,d,f],h=a.apply(void 0,m);return e(r)&&t(h,m),h.placeholder=i,n(h,r,o)}}function zD(){if(PT)return zw;return PT=1,zw=function(e){return e.placeholder}}function sX(){if(TT)return qw;TT=1;var e=gv(),t=pv(),n=Math.min;return qw=function(r,o){for(var a=r.length,i=n(o.length,a),l=e(r);i--;){var u=o[i];r[i]=t(u,a)?l[u]:void 0}return r}}function L$(){if(OT)return Ww;OT=1;var e="__lodash_placeholder__";return Ww=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 qD(){if(AT)return Uw;AT=1;var e=DD(),t=ID(),n=ZY(),r=Wv(),o=BD(),a=zD(),i=sX(),l=L$(),u=xr();return Uw=function s(c,d,f,p,m,h,v,g,y,b){var w=128&d,x=1&d,_=2&d,E=24&d,S=512&d,k=_?void 0:r(c);return function C(){for(var N=arguments.length,O=Array(N),R=N;R--;)O[R]=arguments[R];if(E)var P=a(C),j=n(O,P);if(p&&(O=e(O,p,m,E)),h&&(O=t(O,h,v,E)),N-=j,E&&N<b){var T=l(O,P);return o(c,d,s,C.placeholder,f,O,T,g,y,b-N)}var D=x?f:this,I=_?D[c]:c;return N=O.length,g?O=i(O,g):S&&N>1&&O.reverse(),w&&y<N&&(O.length=y),this&&this!==u&&this instanceof C&&(I=k||r(I)),I.apply(D,O)}},Uw}function lX(){if(NT)return Hw;NT=1;var e=z_(),t=Wv(),n=qD(),r=BD(),o=zD(),a=L$(),i=xr();return Hw=function(l,u,s){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,m=o(t);p--;)f[p]=arguments[p];var h=d<3&&f[0]!==m&&f[d-1]!==m?[]:a(f,m);return(d-=h.length)<s?r(l,u,n,t.placeholder,void 0,f,h,void 0,void 0,s-d):e(this&&this!==i&&this instanceof t?c:l,this,f)}},Hw}function uX(){if(kT)return Vw;kT=1;var e=z_(),t=Wv(),n=xr();return Vw=function(r,o,a,i){var l=1&o,u=t(r);return function t(){for(var o=-1,s=arguments.length,c=-1,d=i.length,f=Array(d+s),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=i[c];for(;s--;)f[c++]=arguments[++o];return e(p,l?a:this,f)}},Vw}function cX(){if(DT)return Gw;DT=1;var e=DD(),t=ID(),n=L$(),r="__lodash_placeholder__",o=128,a=Math.min;return Gw=function(i,l){var u=i[1],s=l[1],c=u|s,d=c<131,f=s==o&&8==u||s==o&&256==u&&i[7].length<=l[8]||384==s&&l[7].length<=l[8]&&8==u;if(!d&&!f)return i;1&s&&(i[2]=l[2],c|=1&u?0:4);var p=l[3];if(p){var m=i[3];i[3]=m?e(m,p,l[4]):p,i[4]=m?n(i[3],r):l[4]}return(p=l[5])&&(m=i[5],i[5]=m?t(m,p,l[6]):p,i[6]=m?n(i[5],r):l[6]),(p=l[7])&&(i[7]=p),s&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 F$(){if(IT)return Kw;IT=1;var e=kD(),t=QY(),n=lX(),r=qD(),o=uX(),a=MD(),i=cX(),l=LD(),u=FD(),s=tN(),c=Math.max;return Kw=function(d,f,p,m,h,v,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=m?m.length:0;if(w||(f&=-97,m=h=void 0),g=void 0===g?g:c(s(g),0),y=void 0===y?y:s(y),w-=h?h.length:0,64&f){var x=m,_=h;m=h=void 0}var E=b?void 0:a(d),S=[d,f,p,m,h,x,_,v,g,y];if(E&&i(S,E),d=S[0],f=S[1],p=S[2],m=S[3],h=S[4],!(y=S[9]=void 0===S[9]?b?0:d.length:c(S[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)k=8==f||16==f?n(d,f,y):32!=f&&33!=f||h.length?r.apply(void 0,S):o(d,f,p,m);else var k=t(d,f,p);return u((E?e:l)(k,S),d,f)}}function fX(){if(MT)return Yw;MT=1;var e=F$();return Yw=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 dX(){if(jT)return Xw;jT=1;var e=iN();return Xw=function(t){return e(t,4)}}function pX(){if(LT)return Qw;LT=1;var e=F$();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={},Qw=t}function hX(){if(FT)return Zw;FT=1;var e=Ji(),t=lo(),n=vF();return Zw=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 mX(){if(BT)return Jw;BT=1;var e=Kd(),t=lo();return Jw=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function vX(){if(zT)return ex;zT=1;var e=iN(),t=F_();return ex=function(n){return t("function"==typeof n?n:e(n,1))}}function gX(){if(qT)return tx;qT=1;var e=F$(),t=jF(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return tx=n}function yX(){if(WT)return nx;WT=1;var e=C_(),t=gv(),n=wr(),r=ac(),o=iA(),a=Hd(),i=E_();return nx=function(l){return n(l)?e(l,a):r(l)?[l]:t(o(i(l)))}}function bX(){return UT||(UT=1,rx={ary:fX(),assign:rN(),clone:dX(),curry:pX(),forEach:V_(),isArray:wr(),isError:hX(),isFunction:av(),isWeakMap:mX(),iteratee:vX(),keys:NA(),rearg:gX(),toInteger:tN(),toPath:yX()}),rx}function wX(){if(HT)return ox;HT=1;var e=tO(),t=bX();return ox=function(n,r,o){return e(t,n,r,o)}}function xX(){if(VT)return ix;VT=1;var e=wX()("debounce",JA());return e.placeholder=eO(),ix=e}var _X=xX();const $X=ao(_X);function GT(e,t,n=window){const r=p.useRef(t);p.useEffect((()=>{r.current=t}),[t]),p.useEffect((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const SX=e=>{const t=$X(150)(e);GT("resize",t),GT("orientationchange",t)};var KT,YT,ax={exports:{}},sx={};
|
|
78
|
+
*/function Z9(){if(ZC)return Et;ZC=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"),u=Symbol.for("react.server_context"),s=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"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){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 u:case l:case s:case p:case f:case i:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),Et.ContextConsumer=l,Et.ContextProvider=i,Et.Element=t,Et.ForwardRef=s,Et.Fragment=r,Et.Lazy=p,Et.Memo=f,Et.Portal=n,Et.Profiler=a,Et.StrictMode=o,Et.Suspense=c,Et.SuspenseList=d,Et.isAsyncMode=function(){return!1},Et.isConcurrentMode=function(){return!1},Et.isContextConsumer=function(e){return h(e)===l},Et.isContextProvider=function(e){return h(e)===i},Et.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Et.isForwardRef=function(e){return h(e)===s},Et.isFragment=function(e){return h(e)===r},Et.isLazy=function(e){return h(e)===p},Et.isMemo=function(e){return h(e)===f},Et.isPortal=function(e){return h(e)===n},Et.isProfiler=function(e){return h(e)===a},Et.isStrictMode=function(e){return h(e)===o},Et.isSuspense=function(e){return h(e)===c},Et.isSuspenseList=function(e){return h(e)===d},Et.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===s||t.$$typeof===e||void 0!==t.getModuleId)},Et.typeOf=h,Et}function J9(){return JC||(JC=1,y0.exports=Z9()),y0.exports}function cA(){if(eE)return b0;eE=1;var e=Ji(),t=lo();return b0=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function e4(){if(tE)return w0;tE=1;var e=cA();return w0=function(t){return e(t)&&t!=+t}}J9();var t4=e4();const n4=ao(t4);var r4=cA();const o4=ao(r4);var am=function(e){return lA(e)&&e.indexOf("%")===e.length-1},Fo=function(e){return o4(e)&&!n4(e)},Pm=function(e){return Fo(e)||lA(e)};function mx(e){return(mx="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 i4=["viewBox","children"],a4=["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"],nE=["points","pathLength"],x0={svg:i4,polygon:nE,polyline:nE},fA=["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"],s4=function(e,t,n){return function(r){return e(t,n,r),null}},l4=function(e,t,n){if(!uA(e)||"object"!==mx(e))return null;var r=null;return Object.keys(e).forEach((function(o){var a=e[o];fA.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=s4(a,t,n))})),r},u4=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},c4=function(e,t,n,r){var o,a=null!==(o=null==x0?void 0:x0[r])&&void 0!==o?o:[];return!Rm(e)&&(r&&a.includes(t)||a4.includes(t))||fA.includes(t)},dA=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(p.isValidElement(e)&&(r=e.props),!uA(r))return null;var o={};return Object.keys(r).forEach((function(e){var a;c4(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])})),o},f4=["children","width","height","viewBox","className","style","title","desc"];function vx(){return vx=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},vx.apply(this,arguments)}function d4(e,t){if(null==e)return{};var n,r,o=p4(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 p4(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 h4(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,a=e.className,i=e.style,l=e.title,u=e.desc,s=d4(e,f4),c=o||{width:n,height:r,x:0,y:0},d=Ya("recharts-surface",a);return de.createElement("svg",vx({},dA(s,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),de.createElement("title",null,l),de.createElement("desc",null,u),t)}var _0,rE,$0,oE,S0,iE,C0,aE,E0,sE,R0,lE,P0,uE,T0,cE,$m=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 m4(){if(rE)return _0;return rE=1,_0=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 v4(){if(oE)return $0;oE=1;var e=m4();return $0=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function pA(){if(iE)return S0;iE=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return S0=function(t){return e.test(t)}}function g4(){if(aE)return C0;return aE=1,C0=function(e){return e.split("")}}function y4(){if(sE)return E0;sE=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+")"+"?",u="[\\ufe0e\\ufe0f]?",s=u+l+("(?:\\u200d(?:"+[o,a,i].join("|")+")"+u+l+")*"),c="(?:"+[o+n+"?",n,a,i,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+s,"g");return E0=function(e){return e.match(d)||[]}}function b4(){if(lE)return R0;lE=1;var e=g4(),t=pA(),n=y4();return R0=function(r){return t(r)?n(r):e(r)}}function w4(){if(uE)return P0;uE=1;var e=v4(),t=pA(),n=b4(),r=E_();return P0=function(o){return function(a){a=r(a);var i=t(a)?n(a):void 0,l=i?i[0]:a.charAt(0),u=i?e(i,1).join(""):a.slice(1);return l[o]()+u}}}function x4(){if(cE)return T0;cE=1;var e=w4()("toUpperCase");return T0=e}var _4=x4();const hA=ao(_4);function sm(e){return function(){return e}}const mA=Math.cos,Tm=Math.sin,Ho=Math.sqrt,Om=Math.PI,dv=2*Om,gx=Math.PI,yx=2*gx,el=1e-6,$4=yx-el;function vA(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function S4(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vA;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 C4{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?vA:S4(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,u=r-t,s=a-e,c=i-t,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>el)if(Math.abs(c*l-u*s)>el&&o){let f=n-a,p=r-i,m=l*l+u*u,h=f*f+p*p,v=Math.sqrt(m),g=Math.sqrt(d),y=o*Math.tan((gx-Math.acos((m+d-h)/(2*v*g)))/2),b=y/g,w=y/v;Math.abs(b-1)>el&&this._append`L${e+b*s},${t+b*c}`,this._append`A${o},${o},0,0,${+(c*f>s*p)},${this._x1=e+w*l},${this._y1=t+w*u}`}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),u=e+i,s=t+l,c=1^a,d=a?r-o:o-r;null===this._x1?this._append`M${u},${s}`:(Math.abs(this._x1-u)>el||Math.abs(this._y1-s)>el)&&this._append`L${u},${s}`,n&&(d<0&&(d=d%yx+yx),d>$4?this._append`A${n},${n},0,1,${c},${e-i},${t-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=s}`:d>el&&this._append`A${n},${n},0,${+(d>=gx)},${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 E4(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 C4(t)}const P_={draw(e,t){const n=Ho(t/Om);e.moveTo(n,0),e.arc(0,0,n,0,dv)}},R4={draw(e,t){const n=Ho(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()}},gA=Ho(1/3),P4=2*gA,T4={draw(e,t){const n=Ho(t/P4),r=n*gA;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},O4={draw(e,t){const n=Ho(t),r=-n/2;e.rect(r,r,n,n)}},A4=.8908130915292852,yA=Tm(Om/10)/Tm(7*Om/10),N4=Tm(dv/10)*yA,k4=-mA(dv/10)*yA,D4={draw(e,t){const n=Ho(t*A4),r=N4*n,o=k4*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=dv*t/5,i=mA(a),l=Tm(a);e.lineTo(l*n,-i*n),e.lineTo(i*r-l*o,l*r+i*o)}e.closePath()}},O0=Ho(3),I4={draw(e,t){const n=-Ho(t/(3*O0));e.moveTo(0,2*n),e.lineTo(-O0*n,-n),e.lineTo(O0*n,-n),e.closePath()}},_o=-.5,$o=Ho(3)/2,bx=1/Ho(12),M4=3*(bx/2+1),j4={draw(e,t){const n=Ho(t/M4),r=n/2,o=n*bx,a=r,i=n*bx+n,l=-a,u=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(l,u),e.lineTo(_o*r-$o*o,$o*r+_o*o),e.lineTo(_o*a-$o*i,$o*a+_o*i),e.lineTo(_o*l-$o*u,$o*l+_o*u),e.lineTo(_o*r+$o*o,_o*o-$o*r),e.lineTo(_o*a+$o*i,_o*i-$o*a),e.lineTo(_o*l+$o*u,_o*u-$o*l),e.closePath()}};function L4(e,t){let n=null,r=E4(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:sm(e||P_),t="function"==typeof t?t:sm(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:sm(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:sm(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function Ed(e){return(Ed="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 F4=["type","size","sizeType"];function wx(){return wx=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},wx.apply(this,arguments)}function fE(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 dE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fE(Object(n),!0).forEach((function(t){B4(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function B4(e,t,n){return(t=z4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z4(e){var t=q4(e,"string");return"symbol"==Ed(t)?t:t+""}function q4(e,t){if("object"!=Ed(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ed(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function W4(e,t){if(null==e)return{};var n,r,o=U4(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 U4(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 bA={symbolCircle:P_,symbolCross:R4,symbolDiamond:T4,symbolSquare:O4,symbolStar:D4,symbolTriangle:I4,symbolWye:j4},H4=Math.PI/180,V4=function(e){var t="symbol".concat(hA(e));return bA[t]||P_},G4=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*H4;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}},K4=function(e,t){bA["symbol".concat(hA(e))]=t},wA=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,u=dE(dE({},W4(e,F4)),{},{type:r,size:a,sizeType:l}),s=u.className,c=u.cx,d=u.cy,f=dA(u,!0);return c===+c&&d===+d&&a===+a?de.createElement("path",wx({},f,{className:Ya("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=V4(r),L4().type(t).size(G4(a,l,r))())})):null};function Vu(e){return(Vu="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 xx(){return xx=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},xx.apply(this,arguments)}function pE(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 Y4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pE(Object(n),!0).forEach((function(t){Rd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q4(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,_A(r.key),r)}}function Z4(e,t,n){return Q4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function J4(e,t,n){return t=Am(t),ej(e,xA()?Reflect.construct(t,n||[],Am(e).constructor):t.apply(e,n))}function ej(e,t){if(t&&("object"===Vu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tj(e)}function tj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(xA=function(){return!!e})()}function Am(e){return(Am=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nj(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&&_x(e,t)}function _x(e,t){return(_x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Rd(e,t,n){return(t=_A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _A(e){var t=rj(e,"string");return"symbol"==Vu(t)?t:t+""}function rj(e,t){if("object"!=Vu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Vu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}wA.registerSymbol=K4;var A0,hE,N0,mE,k0,vE,D0,gE,I0,yE,M0,bE,j0,wE,L0,xE,F0,_E,B0,$E,z0,SE,q0,CE,W0,EE,U0,RE,H0,PE,V0,TE,G0,OE,K0,AE,Y0,NE,X0,kE,Q0,DE,Z0,IE,J0,ME,eb,jE,So=32,T_=function(){function e(){return X4(this,e),J4(this,e,arguments)}return nj(e,p.PureComponent),Z4(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=So/2,r=So/6,o=So/3,a=e.inactive?t:e.color;if("plainline"===e.type)return de.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:So,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return de.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(So,"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 de.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(So/8,"h").concat(So,"v").concat(3*So/4,"h").concat(-So,"z"),className:"recharts-legend-icon"});if(de.isValidElement(e.legendIcon)){var i=Y4({},e);return delete i.legendIcon,de.cloneElement(e.legendIcon,i)}return de.createElement(wA,{fill:a,cx:n,cy:n,size:So,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:So,height:So},u={display:"horizontal"===o?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||a,c=Ya(Rd(Rd({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=Rm(t.value)?null:t.value;$m(!Rm(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 de.createElement("li",xx({className:c,style:u,key:"legend-item-".concat(n)},l4(e.props,t,n)),de.createElement(h4,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),de.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 de.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function oj(){if(hE)return A0;hE=1;var e=cv();return A0=function(){this.__data__=new e,this.size=0}}function ij(){if(mE)return N0;return mE=1,N0=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function aj(){if(vE)return k0;return vE=1,k0=function(e){return this.__data__.get(e)}}function sj(){if(gE)return D0;return gE=1,D0=function(e){return this.__data__.has(e)}}function lj(){if(yE)return I0;yE=1;var e=cv(),t=$_(),n=S_();return I0=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 O_(){if(bE)return M0;bE=1;var e=cv(),t=oj(),n=ij(),r=aj(),o=sj(),a=lj();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,M0=i}function uj(){if(wE)return j0;wE=1;return j0=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function cj(){if(xE)return L0;return xE=1,L0=function(e){return this.__data__.has(e)}}function $A(){if(_E)return F0;_E=1;var e=S_(),t=uj(),n=cj();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,F0=r}function fj(){if($E)return B0;return $E=1,B0=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 SA(){if(SE)return z0;return SE=1,z0=function(e,t){return e.has(t)}}function CA(){if(CE)return q0;CE=1;var e=$A(),t=fj(),n=SA();return q0=function(r,o,a,i,l,u){var s=1&a,c=r.length,d=o.length;if(c!=d&&!(s&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var m=-1,h=!0,v=2&a?new e:void 0;for(u.set(r,o),u.set(o,r);++m<c;){var g=r[m],y=o[m];if(i)var b=s?i(y,g,m,o,r,u):i(g,y,m,r,o,u);if(void 0!==b){if(b)continue;h=!1;break}if(v){if(!t(o,(function(e,t){if(!n(v,t)&&(g===e||l(g,e,a,i,u)))return v.push(t)}))){h=!1;break}}else if(g!==y&&!l(g,y,a,i,u)){h=!1;break}}return u.delete(r),u.delete(o),h}}function EA(){if(EE)return W0;EE=1;var e=xr().Uint8Array;return W0=e}function dj(){if(RE)return U0;return RE=1,U0=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function A_(){if(PE)return H0;return PE=1,H0=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function pj(){if(TE)return V0;TE=1;var e=ic(),t=EA(),n=lv(),r=CA(),o=dj(),a=A_(),i=e?e.prototype:void 0,l=i?i.valueOf:void 0;return V0=function(e,i,u,s,c,d,f){switch(u){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 m=1&s;if(p||(p=a),e.size!=i.size&&!m)return!1;var h=f.get(e);if(h)return h==i;s|=2,f.set(e,i);var v=r(p(e),p(i),s,c,d,f);return f.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(i)}return!1}}function N_(){if(OE)return G0;return OE=1,G0=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function RA(){if(AE)return K0;AE=1;var e=N_(),t=wr();return K0=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function hj(){if(NE)return Y0;return NE=1,Y0=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 PA(){if(kE)return X0;return kE=1,X0=function(){return[]}}function k_(){if(DE)return Q0;DE=1;var e=hj(),t=PA(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Q0=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function mj(){if(IE)return Z0;return IE=1,Z0=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function vj(){if(ME)return J0;ME=1;var e=Ji(),t=lo();return J0=function(n){return t(n)&&"[object Arguments]"==e(n)}}function D_(){if(jE)return eb;jE=1;var e=vj(),t=lo(),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 eb=a}Rd(T_,"displayName","Legend"),Rd(T_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var tb,LE,FE,nb,BE,rb,zE,ob,qE,ib,WE,md={exports:{}};function gj(){if(LE)return tb;return LE=1,tb=function(){return!1}}function I_(){return FE||(FE=1,e=md,t=md.exports,n=xr(),r=gj(),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),md.exports;var e,t,n,r,o,a,i,l}function pv(){if(BE)return nb;BE=1;var e=/^(?:0|[1-9]\d*)$/;return nb=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 M_(){if(zE)return rb;zE=1;return rb=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function yj(){if(qE)return ob;qE=1;var e=Ji(),t=M_(),n=lo(),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,ob=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function hv(){if(WE)return ib;return WE=1,ib=function(e){return function(t){return e(t)}}}md.exports;var UE,ab,HE,sb,VE,lb,GE,ub,KE,cb,YE,fb,XE,db,QE,pb,ZE,hb,JE,mb,eR,vb,tR,gb,nR,yb,rR,bb,oR,wb,iR,xb,aR,_b,sR,$b,lR,Sb,uR,Cb,cR,Eb,fR,Rb,dR,Pb,pR,Tb,hR,Ob,mR,Ab,vR,Nb,gR,kb,yR,Db,bR,Ib,wR,Mb,xR,jb,_R,Lb,$R,Fb,SR,Bb,CR,zb,ER,qb,RR,Wb,PR,Ub,TR,Hb,OR,Vb,AR,vd={exports:{}};function j_(){return UE||(UE=1,e=vd,t=vd.exports,n=rA(),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),vd.exports;var e,t,n,r,o,a,i}function TA(){if(HE)return ab;HE=1;var e=yj(),t=hv(),n=j_(),r=n&&n.isTypedArray,o=r?t(r):e;return ab=o}function OA(){if(VE)return sb;VE=1;var e=mj(),t=D_(),n=wr(),r=I_(),o=pv(),a=TA(),i=Object.prototype.hasOwnProperty;return sb=function(l,u){var s=n(l),c=!s&&t(l),d=!s&&!c&&r(l),f=!s&&!c&&!d&&a(l),p=s||c||d||f,m=p?e(l.length,String):[],h=m.length;for(var v in l)(u||i.call(l,v))&&(!p||!("length"==v||d&&("offset"==v||"parent"==v)||f&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,h)))&&m.push(v);return m}}function L_(){if(GE)return lb;GE=1;var e=Object.prototype;return lb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function AA(){if(KE)return ub;return KE=1,ub=function(e,t){return function(n){return e(t(n))}}}function bj(){if(YE)return cb;YE=1;var e=AA()(Object.keys,Object);return cb=e}function NA(){if(XE)return fb;XE=1;var e=L_(),t=bj(),n=Object.prototype.hasOwnProperty;return fb=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 Vd(){if(QE)return db;QE=1;var e=av(),t=M_();return db=function(n){return null!=n&&t(n.length)&&!e(n)}}function Gd(){if(ZE)return pb;ZE=1;var e=OA(),t=NA(),n=Vd();return pb=function(r){return n(r)?e(r):t(r)}}function kA(){if(JE)return hb;JE=1;var e=RA(),t=k_(),n=Gd();return hb=function(r){return e(r,n,t)}}function wj(){if(eR)return mb;eR=1;var e=kA(),t=Object.prototype.hasOwnProperty;return mb=function(n,r,o,a,i,l){var u=1&o,s=e(n),c=s.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=s[d];if(!(u?f in r:t.call(r,f)))return!1}var p=l.get(n),m=l.get(r);if(p&&m)return p==r&&m==n;var h=!0;l.set(n,r),l.set(r,n);for(var v=u;++d<c;){var g=n[f=s[d]],y=r[f];if(a)var b=u?a(y,g,f,r,n,l):a(g,y,f,n,r,l);if(!(void 0===b?g===y||i(g,y,o,a,l):b)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){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)&&(h=!1)}return l.delete(n),l.delete(r),h}}function xj(){if(tR)return vb;tR=1;var e=vl()(xr(),"DataView");return vb=e}function _j(){if(nR)return gb;nR=1;var e=vl()(xr(),"Promise");return gb=e}function DA(){if(rR)return yb;rR=1;var e=vl()(xr(),"Set");return yb=e}function IA(){if(oR)return bb;oR=1;var e=vl()(xr(),"WeakMap");return bb=e}function Kd(){if(iR)return wb;iR=1;var e=xj(),t=$_(),n=_j(),r=DA(),o=IA(),a=Ji(),i=oA(),l="[object Map]",u="[object Promise]",s="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),m=i(n),h=i(r),v=i(o),g=a;return(e&&g(new e(new ArrayBuffer(1)))!=d||t&&g(new t)!=l||n&&g(n.resolve())!=u||r&&g(new r)!=s||o&&g(new o)!=c)&&(g=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 m:return u;case h:return s;case v:return c}return t}),wb=g}function $j(){if(aR)return xb;aR=1;var e=O_(),t=CA(),n=pj(),r=wj(),o=Kd(),a=wr(),i=I_(),l=TA(),u="[object Arguments]",s="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return xb=function(f,p,m,h,v,g){var y=a(f),b=a(p),w=y?s:o(f),x=b?s:o(p),_=(w=w==u?c:w)==c,E=(x=x==u?c:x)==c,S=w==x;if(S&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(S&&!_)return g||(g=new e),y||l(f)?t(f,p,m,h,v,g):n(f,p,w,m,h,v,g);if(!(1&m)){var k=_&&d.call(f,"__wrapped__"),C=E&&d.call(p,"__wrapped__");if(k||C){var N=k?f.value():f,O=C?p.value():p;return g||(g=new e),v(N,O,m,h,g)}}return!!S&&(g||(g=new e),r(f,p,m,h,v,g))}}function MA(){if(sR)return _b;sR=1;var e=$j(),t=lo();return _b=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))},_b}function Sj(){if(lR)return $b;lR=1;var e=O_(),t=MA();return $b=function(n,r,o,a){var i=o.length,l=i,u=!a;if(null==n)return!l;for(n=Object(n);i--;){var s=o[i];if(u&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<l;){var c=(s=o[i])[0],d=n[c],f=s[1];if(u&&s[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(a)var m=a(d,f,c,n,r,p);if(!(void 0===m?t(f,d,3,a,p):m))return!1}}return!0}}function jA(){if(uR)return Sb;uR=1;var e=Po();return Sb=function(t){return t==t&&!e(t)}}function Cj(){if(cR)return Cb;cR=1;var e=jA(),t=Gd();return Cb=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 LA(){if(fR)return Eb;return fR=1,Eb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function Ej(){if(dR)return Rb;dR=1;var e=Sj(),t=Cj(),n=LA();return Rb=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 Rj(){if(pR)return Pb;return pR=1,Pb=function(e,t){return null!=e&&t in Object(e)}}function Pj(){if(hR)return Tb;hR=1;var e=aA(),t=D_(),n=wr(),r=pv(),o=M_(),a=Hd();return Tb=function(i,l,u){for(var s=-1,c=(l=e(l,i)).length,d=!1;++s<c;){var f=a(l[s]);if(!(d=null!=i&&u(i,f)))break;i=i[f]}return d||++s!=c?d:!!(c=null==i?0:i.length)&&o(c)&&r(f,c)&&(n(i)||t(i))}}function Tj(){if(mR)return Ob;mR=1;var e=Rj(),t=Pj();return Ob=function(n,r){return null!=n&&t(n,r,e)}}function Oj(){if(vR)return Ab;vR=1;var e=MA(),t=sA(),n=Tj(),r=__(),o=jA(),a=LA(),i=Hd();return Ab=function(l,u){return r(l)&&o(u)?a(i(l),u):function(r){var o=t(r,l);return void 0===o&&o===u?n(r,l):e(u,o,3)}}}function Yd(){if(gR)return Nb;return gR=1,Nb=function(e){return e}}function Aj(){if(yR)return kb;return yR=1,kb=function(e){return function(t){return null==t?void 0:t[e]}}}function Nj(){if(bR)return Db;bR=1;var e=R_();return Db=function(t){return function(n){return e(n,t)}}}function kj(){if(wR)return Ib;wR=1;var e=Aj(),t=Nj(),n=__(),r=Hd();return Ib=function(o){return n(o)?e(r(o)):t(o)}}function F_(){if(xR)return Mb;xR=1;var e=Ej(),t=Oj(),n=Yd(),r=wr(),o=kj();return Mb=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 Dj(){if(_R)return jb;return _R=1,jb=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 Ij(){if($R)return Lb;return $R=1,Lb=function(e){return e!=e}}function Mj(){if(SR)return Fb;return SR=1,Fb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function jj(){if(CR)return Bb;CR=1;var e=Dj(),t=Ij(),n=Mj();return Bb=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function FA(){if(ER)return zb;ER=1;var e=jj();return zb=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function Lj(){if(RR)return qb;return RR=1,qb=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 BA(){if(PR)return Wb;return PR=1,Wb=function(){}}function Fj(){if(TR)return Ub;TR=1;var e=DA(),t=BA(),n=A_(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Ub=r}function Bj(){if(OR)return Hb;OR=1;var e=$A(),t=FA(),n=Lj(),r=SA(),o=Fj(),a=A_();return Hb=function(i,l,u){var s=-1,c=t,d=i.length,f=!0,p=[],m=p;if(u)f=!1,c=n;else if(d>=200){var h=l?null:o(i);if(h)return a(h);f=!1,c=r,m=new e}else m=l?[]:p;e:for(;++s<d;){var v=i[s],g=l?l(v):v;if(v=u||0!==v?v:0,f&&g==g){for(var y=m.length;y--;)if(m[y]===g)continue e;l&&m.push(g),p.push(v)}else c(m,g,u)||(m!==p&&m.push(g),p.push(v))}return p}}function zj(){if(AR)return Vb;AR=1;var e=F_(),t=Bj();return Vb=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}vd.exports;var qj=zj();const NR=ao(qj);function zA(e,t,n){return!0===t?NR(e,n):Rm(t)?NR(e,t):e}function Gu(e){return(Gu="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 Wj=["ref"];function kR(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 Ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kR(Object(n),!0).forEach((function(t){mv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Uj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DR(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,WA(r.key),r)}}function Hj(e,t,n){return DR(e.prototype,t),DR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vj(e,t,n){return t=Nm(t),Gj(e,qA()?Reflect.construct(t,n,Nm(e).constructor):t.apply(e,n))}function Gj(e,t){if(t&&("object"===Gu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Kj(e)}function Kj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(qA=function(){return!!e})()}function Nm(e){return(Nm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yj(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&&$x(e,t)}function $x(e,t){return($x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mv(e,t,n){return(t=WA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WA(e){var t=Xj(e,"string");return"symbol"==Gu(t)?t:t+""}function Xj(e,t){if("object"!=Gu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Qj(e,t){if(null==e)return{};var n,r,o=Zj(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 Zj(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 Jj(e){return e.value}function eL(e,t){if(de.isValidElement(e))return de.cloneElement(e,t);if("function"==typeof e)return de.createElement(e,t);t.ref;var n=Qj(t,Wj);return de.createElement(T_,n)}var Gb,MR,Kb,jR,Yb,LR,Xb,FR,Qb,BR,Zb,zR,Jb,qR,e1,WR,t1,UR,n1,HR,r1,VR,o1,GR,i1,KR,a1,YR,s1,XR,l1,QR,u1,ZR,c1,JR,f1,eP,d1,tP,p1,nP,h1,rP,IR=1,B_=function(){function e(){var t;Uj(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return mv(t=Vj(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return Yj(e,p.PureComponent),Hj(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)>IR||Math.abs(t.height-this.lastBoundingBox.height)>IR)&&(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?Ui({},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,u=r.chartWidth,s=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:((u||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:((s||0)-this.getBBoxSnapshot().height)/2}}else n="bottom"===i?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Ui(Ui({},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,u=Ui(Ui({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return de.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(t){e.wrapperNode=t}},eL(n,Ui(Ui({},this.props),{},{payload:zA(l,i,Jj)})))}}],[{key:"getWithHeight",value:function(e,t){var n=Ui(Ui({},this.defaultProps),e.props).layout;return"vertical"===n&&Fo(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function tL(){if(MR)return Gb;MR=1;var e=ic(),t=D_(),n=wr(),r=e?e.isConcatSpreadable:void 0;return Gb=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function UA(){if(jR)return Kb;jR=1;var e=N_(),t=tL();return Kb=function n(r,o,a,i,l){var u=-1,s=r.length;for(a||(a=t),l||(l=[]);++u<s;){var c=r[u];o>0&&a(c)?o>1?n(c,o-1,a,i,l):e(l,c):i||(l[l.length]=c)}return l},Kb}function nL(){if(LR)return Yb;return LR=1,Yb=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var u=i[e?l:++o];if(!1===n(a[u],u,a))break}return t}}}function rL(){if(FR)return Xb;FR=1;var e=nL()();return Xb=e}function oL(){if(BR)return Qb;BR=1;var e=rL(),t=Gd();return Qb=function(n,r){return n&&e(n,r,t)}}function iL(){if(zR)return Zb;zR=1;var e=Vd();return Zb=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 aL(){if(qR)return Jb;qR=1;var e=oL(),t=iL()(e);return Jb=t}function sL(){if(WR)return e1;WR=1;var e=aL(),t=Vd();return e1=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 lL(){if(UR)return t1;return UR=1,t1=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function uL(){if(HR)return n1;HR=1;var e=ac();return n1=function(t,n){if(t!==n){var r=void 0!==t,o=null===t,a=t==t,i=e(t),l=void 0!==n,u=null===n,s=n==n,c=e(n);if(!u&&!c&&!i&&t>n||i&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!a)return 1;if(!o&&!i&&!c&&t<n||c&&r&&a&&!o&&!i||u&&r&&a||!l&&a||!s)return-1}return 0}}function cL(){if(VR)return r1;VR=1;var e=uL();return r1=function(t,n,r){for(var o=-1,a=t.criteria,i=n.criteria,l=a.length,u=r.length;++o<l;){var s=e(a[o],i[o]);if(s)return o>=u?s:s*("desc"==r[o]?-1:1)}return t.index-n.index}}function fL(){if(GR)return o1;GR=1;var e=C_(),t=R_(),n=F_(),r=sL(),o=lL(),a=hv(),i=cL(),l=Yd(),u=wr();return o1=function(s,c,d){c=c.length?e(c,(function(e){return u(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(s,(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 z_(){if(KR)return i1;return KR=1,i1=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 HA(){if(YR)return a1;YR=1;var e=z_(),t=Math.max;return a1=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),u=Array(l);++i<l;)u[i]=a[r+i];i=-1;for(var s=Array(r+1);++i<r;)s[i]=a[i];return s[r]=o(u),e(n,this,s)}},a1}function dL(){if(XR)return s1;return XR=1,s1=function(e){return function(){return e}}}function VA(){if(QR)return l1;QR=1;var e=vl(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return l1=t}function pL(){if(ZR)return u1;ZR=1;var e=dL(),t=VA(),n=Yd();return u1=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function GA(){if(JR)return c1;JR=1;var e=Date.now;return c1=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)}},c1}function q_(){if(eP)return f1;eP=1;var e=pL(),t=GA()(e);return f1=t}function hL(){if(tP)return d1;tP=1;var e=Yd(),t=HA(),n=q_();return d1=function(r,o){return n(t(r,o,e),r+"")}}function mL(){if(nP)return p1;nP=1;var e=lv(),t=Vd(),n=pv(),r=Po();return p1=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 vL(){if(rP)return h1;rP=1;var e=UA(),t=fL(),n=hL(),r=mL(),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 h1=o}mv(B_,"displayName","Legend"),mv(B_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var gL=vL();const yL=ao(gL);function Pd(e){return(Pd="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 Sx(){return Sx=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},Sx.apply(this,arguments)}function bL(e,t){return $L(e)||_L(e,t)||xL(e,t)||wL()}function wL(){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 xL(e,t){if(e){if("string"==typeof e)return oP(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 oP(e,t)}}function oP(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 _L(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function $L(e){if(Array.isArray(e))return e}function iP(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 m1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iP(Object(n),!0).forEach((function(t){SL(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SL(e,t,n){return(t=CL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CL(e){var t=EL(e,"string");return"symbol"==Pd(t)?t:t+""}function EL(e,t){if("object"!=Pd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function RL(e){return Array.isArray(e)&&Pm(e[0])&&Pm(e[1])?e.join(" ~ "):e}var PL=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,u=void 0===l?{}:l,s=e.payload,c=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,v=e.accessibilityLayer,g=void 0!==v&&v,y=m1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=m1({margin:0},u),w=!G9(m),x=w?m:"",_=Ya("recharts-default-tooltip",f),E=Ya("recharts-tooltip-label",p);w&&h&&null!=s&&(x=h(m,s));var S=g?{role:"status","aria-live":"assertive"}:{};return de.createElement("div",Sx({className:_,style:y},S),de.createElement("p",{className:E,style:b},de.isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(d?yL(s,d):s).map((function(e,t){if("none"===e.type)return null;var r=m1({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||c||RL,a=e.value,l=e.name,u=a,d=l;if(null!=u&&null!=d){var f=o(a,l,e,t,s);if(Array.isArray(f)){var p=bL(f,2);u=p[0],d=p[1]}else u=f}return de.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},Pm(d)?de.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Pm(d)?de.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,de.createElement("span",{className:"recharts-tooltip-item-value"},u),de.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return de.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Td(e){return(Td="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 lm(e,t,n){return(t=TL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TL(e){var t=OL(e,"string");return"symbol"==Td(t)?t:t+""}function OL(e,t){if("object"!=Td(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Td(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var cd="recharts-tooltip-wrapper",AL={visibility:"hidden"};function NL(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ya(cd,lm(lm(lm(lm({},"".concat(cd,"-right"),Fo(n)&&t&&Fo(t.x)&&n>=t.x),"".concat(cd,"-left"),Fo(n)&&t&&Fo(t.x)&&n<t.x),"".concat(cd,"-bottom"),Fo(r)&&t&&Fo(t.y)&&r>=t.y),"".concat(cd,"-top"),Fo(r)&&t&&Fo(t.y)&&r<t.y))}function aP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,s=e.viewBoxDimension;if(a&&Fo(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<u[r]?Math.max(d,u[r]):Math.max(c,u[r]):d+l>u[r]+s?Math.max(c,u[r]):Math.max(d,u[r])}function kL(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 DL(e){var t,n,r,o=e.allowEscapeViewBox,a=e.coordinate,i=e.offsetTopLeft,l=e.position,u=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,d=e.viewBox;return s.height>0&&s.width>0&&a?t=kL({translateX:n=aP({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=aP({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=AL,{cssProperties:t,cssClasses:NL({translateX:n,translateY:r,coordinate:a})}}function Ku(e){return(Ku="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 sP(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 lP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sP(Object(n),!0).forEach((function(t){Ex(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function IL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ML(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,YA(r.key),r)}}function jL(e,t,n){return ML(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LL(e,t,n){return t=km(t),FL(e,KA()?Reflect.construct(t,n,km(e).constructor):t.apply(e,n))}function FL(e,t){if(t&&("object"===Ku(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return BL(e)}function BL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(KA=function(){return!!e})()}function km(e){return(km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zL(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&&Cx(e,t)}function Cx(e,t){return(Cx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ex(e,t,n){return(t=YA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YA(e){var t=qL(e,"string");return"symbol"==Ku(t)?t:t+""}function qL(e,t){if("object"!=Ku(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uP=1,WL=function(){function e(){var t;IL(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ex(t=LL(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Ex(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 zL(e,p.PureComponent),jL(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>uP||Math.abs(e.height-this.state.lastBoundingBox.height)>uP)&&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,u=t.hasPayload,s=t.isAnimationActive,c=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,v=DL({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),g=v.cssClasses,y=v.cssProperties,b=lP(lP({transition:s&&n?"transform ".concat(o,"ms ").concat(a):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&u?"visible":"hidden",position:"absolute",top:0,left:0},h);return de.createElement("div",{tabIndex:-1,className:g,style:b,ref:function(t){e.wrapperNode=t}},i)}}])}(),UL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Sm={isSsr:UL(),get:function(e){return Sm[e]},set:function(e,t){if("string"==typeof e)Sm[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){Sm[t]=e[t]}))}}};function Yu(e){return(Yu="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 cP(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 fP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cP(Object(n),!0).forEach((function(t){W_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function HL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VL(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,QA(r.key),r)}}function GL(e,t,n){return VL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KL(e,t,n){return t=Dm(t),YL(e,XA()?Reflect.construct(t,n||[],Dm(e).constructor):t.apply(e,n))}function YL(e,t){if(t&&("object"===Yu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return XL(e)}function XL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(XA=function(){return!!e})()}function Dm(e){return(Dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function QL(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&&Rx(e,t)}function Rx(e,t){return(Rx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function W_(e,t,n){return(t=QA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QA(e){var t=ZL(e,"string");return"symbol"==Yu(t)?t:t+""}function ZL(e,t){if("object"!=Yu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function JL(e){return e.dataKey}function eF(e,t){return de.isValidElement(e)?de.cloneElement(e,t):"function"==typeof e?de.createElement(e,t):de.createElement(PL,t)}var v1,dP,g1,pP,y1,hP,b1,mP,w1,vP,x1,gP,U_=function(){function e(){return HL(this,e),KL(this,e,arguments)}return QL(e,p.PureComponent),GL(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,u=t.filterNull,s=t.isAnimationActive,c=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,v=t.viewBox,g=t.wrapperStyle,y=d??[];u&&y.length&&(y=zA(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,JL));var b=y.length>0;return de.createElement(WL,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:s,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:m,useTranslate3d:h,viewBox:v,wrapperStyle:g},eF(i,fP(fP({},this.props),{},{payload:y})))}}])}();function tF(){if(dP)return v1;dP=1;var e=xr();return v1=function(){return e.Date.now()}}function nF(){if(pP)return g1;pP=1;var e=/\s/;return g1=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function rF(){if(hP)return y1;hP=1;var e=nF(),t=/^\s+/;return y1=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function ZA(){if(mP)return b1;mP=1;var e=rF(),t=Po(),n=ac(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return b1=function(l){if("number"==typeof l)return l;if(n(l))return NaN;if(t(l)){var u="function"==typeof l.valueOf?l.valueOf():l;l=t(u)?u+"":u}if("string"!=typeof l)return 0===l?l:+l;l=e(l);var s=o.test(l);return s||a.test(l)?i(l.slice(2),s?2:8):r.test(l)?NaN:+l}}function JA(){if(vP)return w1;vP=1;var e=Po(),t=tF(),n=ZA(),r=Math.max,o=Math.min;return w1=function(a,i,l){var u,s,c,d,f,p,m=0,h=!1,v=!1,g=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function y(e){var t=u,n=s;return u=s=void 0,m=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||v&&e-m>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return v?o(t,c-(e-m)):t}(e))}function x(e){return f=void 0,g&&u?y(e):(u=s=void 0,d)}function _(){var e=t(),n=b(e);if(u=arguments,s=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(w,i),h?y(e):d}(p);if(v)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)&&(h=!!l.leading,c=(v="maxWait"in l)?r(n(l.maxWait)||0,i):c,g="trailing"in l?!!l.trailing:g),_.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=p=s=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},w1}function oF(){if(gP)return x1;gP=1;var e=JA(),t=Po();return x1=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})}}W_(U_,"displayName","Tooltip"),W_(U_,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Sm.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 iF=oF();const aF=ao(iF);function Od(e){return(Od="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 yP(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 um(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yP(Object(n),!0).forEach((function(t){sF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sF(e,t,n){return(t=lF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lF(e){var t=uF(e,"string");return"symbol"==Od(t)?t:t+""}function uF(e,t){if("object"!=Od(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Od(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function cF(e,t){return hF(e)||pF(e,t)||dF(e,t)||fF()}function fF(){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 dF(e,t){if(e){if("string"==typeof e)return bP(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 bP(e,t)}}function bP(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 pF(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,s=!1;try{if(a=(n=n.call(e)).next,0!==t)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function hF(e){if(Array.isArray(e))return e}var _1,wP,$1,xP,S1,_P,C1,$P,E1,SP,R1,CP,P1,EP,T1,RP,O1,PP,A1,TP,N1,OP,k1,AP,D1,NP,mF=p.forwardRef((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,u=void 0===l?"100%":l,s=e.minWidth,c=void 0===s?0:s,d=e.minHeight,f=e.maxHeight,m=e.children,h=e.debounce,v=void 0===h?0:h,g=e.id,y=e.className,b=e.onResize,w=e.style,x=void 0===w?{}:w,_=p.useRef(null),E=p.useRef();E.current=b,p.useImperativeHandle(t,(function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})}));var S=cF(p.useState({containerWidth:o.width,containerHeight:o.height}),2),k=S[0],C=S[1],N=p.useCallback((function(e,t){C((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);p.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;N(r,o),null===(t=E.current)||void 0===t||t.call(E,r,o)};v>0&&(e=aF(e,v,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=_.current.getBoundingClientRect(),r=n.width,o=n.height;return N(r,o),t.observe(_.current),function(){t.disconnect()}}),[N,v]);var O=p.useMemo((function(){var e=k.containerWidth,t=k.containerHeight;if(e<0||t<0)return null;$m(am(i)||am(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,u),$m(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=am(i)?e:i,o=am(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),$m(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,u,c,d,n);var a=!Array.isArray(m)&&u4(m.type).endsWith("Chart");return de.Children.map(m,(function(e){return de.isValidElement(e)?p.cloneElement(e,um({width:r,height:o},a?{style:um({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,m,u,f,d,c,k,i]);return de.createElement("div",{id:g?"".concat(g):void 0,className:Ya("recharts-responsive-container",y),style:um(um({},x),{},{width:i,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:_},O)}));function H_(){if(wP)return _1;wP=1;var e=AA()(Object.getPrototypeOf,Object);return _1=e}function vF(){if(xP)return $1;xP=1;var e=Ji(),t=H_(),n=lo(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,l=a.call(Object);return $1=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=i.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&a.call(u)==l}}function gF(){if(_P)return S1;_P=1;var e=ZA(),t=1/0;return S1=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function eN(){if($P)return C1;$P=1;var e=VA();return C1=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function tN(){if(SP)return E1;SP=1;var e=gF();return E1=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function V_(){if(CP)return R1;return CP=1,R1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function nN(){if(EP)return P1;EP=1;var e=eN(),t=lv(),n=Object.prototype.hasOwnProperty;return P1=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 vv(){if(RP)return T1;RP=1;var e=nN(),t=eN();return T1=function(n,r,o,a){var i=!o;o||(o={});for(var l=-1,u=r.length;++l<u;){var s=r[l],c=a?a(o[s],n[s],s,o,n):void 0;void 0===c&&(c=n[s]),i?t(o,s,c):e(o,s,c)}return o}}function rN(){if(PP)return O1;PP=1;var e=vv(),t=Gd();return O1=function(n,r){return n&&e(r,t(r),n)}}function yF(){if(TP)return A1;return TP=1,A1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function bF(){if(OP)return N1;OP=1;var e=Po(),t=L_(),n=yF(),r=Object.prototype.hasOwnProperty;return N1=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 G_(){if(AP)return k1;AP=1;var e=OA(),t=bF(),n=Vd();return k1=function(r){return n(r)?e(r,!0):t(r)}}function wF(){if(NP)return D1;NP=1;var e=vv(),t=G_();return D1=function(n,r){return n&&e(r,t(r),n)}}var kP,I1,DP,M1,IP,j1,MP,L1,jP,F1,LP,B1,FP,z1,BP,q1,zP,W1,qP,U1,WP,H1,UP,V1,HP,G1,VP,K1,GP,Y1,KP,X1,YP,Q1,XP,Z1,QP,J1,ZP,ew,JP,tw,e2,gd={exports:{}};function xF(){return kP||(kP=1,e=gd,t=gd.exports,n=xr(),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}),gd.exports;var e,t,n,r,o,a,i}function gv(){if(DP)return I1;return DP=1,I1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function _F(){if(IP)return M1;IP=1;var e=vv(),t=k_();return M1=function(n,r){return e(n,t(n),r)}}function oN(){if(MP)return j1;MP=1;var e=N_(),t=H_(),n=k_(),r=PA(),o=Object.getOwnPropertySymbols;return j1=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function $F(){if(jP)return L1;jP=1;var e=vv(),t=oN();return L1=function(n,r){return e(n,t(n),r)}}function SF(){if(LP)return F1;LP=1;var e=RA(),t=oN(),n=G_();return F1=function(r){return e(r,n,t)}}function CF(){if(FP)return B1;FP=1;var e=Object.prototype.hasOwnProperty;return B1=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 K_(){if(BP)return z1;BP=1;var e=EA();return z1=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function EF(){if(zP)return q1;zP=1;var e=K_();return q1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function RF(){if(qP)return W1;qP=1;var e=/\w*$/;return W1=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function PF(){if(WP)return U1;WP=1;var e=ic(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return U1=function(e){return n?Object(n.call(e)):{}}}function TF(){if(UP)return H1;UP=1;var e=K_();return H1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function OF(){if(HP)return V1;HP=1;var e=K_(),t=EF(),n=RF(),r=PF(),o=TF();return V1=function(a,i,l){var u=a.constructor;switch(i){case"[object ArrayBuffer]":return e(a);case"[object Boolean]":case"[object Date]":return new u(+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 u;case"[object Number]":case"[object String]":return new u(a);case"[object RegExp]":return n(a);case"[object Symbol]":return r(a)}}}function yv(){if(VP)return G1;VP=1;var e=Po(),t=Object.create;return G1=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 AF(){if(GP)return K1;GP=1;var e=yv(),t=H_(),n=L_();return K1=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function NF(){if(KP)return Y1;KP=1;var e=Kd(),t=lo();return Y1=function(n){return t(n)&&"[object Map]"==e(n)}}function kF(){if(YP)return X1;YP=1;var e=NF(),t=hv(),n=j_(),r=n&&n.isMap,o=r?t(r):e;return X1=o}function DF(){if(XP)return Q1;XP=1;var e=Kd(),t=lo();return Q1=function(n){return t(n)&&"[object Set]"==e(n)}}function IF(){if(QP)return Z1;QP=1;var e=DF(),t=hv(),n=j_(),r=n&&n.isSet,o=r?t(r):e;return Z1=o}function iN(){if(ZP)return J1;ZP=1;var e=O_(),t=V_(),n=nN(),r=rN(),o=wF(),a=xF(),i=gv(),l=_F(),u=$F(),s=kA(),c=SF(),d=Kd(),f=CF(),p=OF(),m=AF(),h=wr(),v=I_(),g=kF(),y=Po(),b=IF(),w=Gd(),x=G_(),_="[object Arguments]",E="[object Function]",S="[object Object]",k={};return k[_]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[S]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[E]=k["[object WeakMap]"]=!1,J1=function C(N,O,R,P,j,T){var D,I=1&O,A=2&O,L=4&O;if(R&&(D=j?R(N,P,j,T):R(N)),void 0!==D)return D;if(!y(N))return N;var M=h(N);if(M){if(D=f(N),!I)return i(N,D)}else{var z=d(N),F=z==E||"[object GeneratorFunction]"==z;if(v(N))return a(N,I);if(z==S||z==_||F&&!j){if(D=A||F?{}:m(N),!I)return A?u(N,o(D,N)):l(N,r(D,N))}else{if(!k[z])return j?N:{};D=p(N,z,I)}}T||(T=new e);var B=T.get(N);if(B)return B;T.set(N,D),b(N)?N.forEach((function(e){D.add(C(e,O,R,e,N,T))})):g(N)&&N.forEach((function(e,t){D.set(t,C(e,O,R,t,N,T))}));var $=M?void 0:(L?A?c:s:A?x:w)(N);return t($||N,(function(e,t){$&&(e=N[t=e]),n(D,t,C(e,O,R,t,N,T))})),D},J1}function MF(){if(JP)return ew;JP=1;var e=UA();return ew=function(t){return(null==t?0:t.length)?e(t,1):[]}}function jF(){if(e2)return tw;e2=1;var e=MF(),t=HA(),n=q_();return tw=function(r){return n(t(r,void 0,e),r+"")}}gd.exports;const LF={light:"",dark:".dark"},aN=p.createContext(null);function sN(){const e=p.useContext(aN);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const FF=p.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=p.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return I.jsx(aN.Provider,{value:{config:r},children:I.jsxs("div",{"data-chart":l,ref:a,className:le("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:[I.jsx(BF,{id:l,config:r}),I.jsx(mF,{children:n})]})})}));FF.displayName="Chart";const BF=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?I.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(LF).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},xZ=U_,zF=p.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:l,labelClassName:u,formatter:s,color:c,nameKey:d,labelKey:f},m)=>{const{config:h}=sN(),v=p.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=Px(h,n,r),s=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=h[i])?void 0:e.label)||i;return l?I.jsx("div",{className:le("font-medium",u),children:l(s,t)}):s?I.jsx("div",{className:le("font-medium",u),children:s}):null}),[i,l,t,o,u,h,f]);if(!e||null==t||!t.length)return null;const g=1===t.length&&"dot"!==r,y=t.length>10;return I.jsxs("div",{ref:m,className:le("grid min-w-[8rem] items-start gap-1.5 rounded-sm border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",y&&"min-w-[16rem]",n),children:[g?null:v,I.jsx("div",{className:le("grid gap-1.5",y&&"grid-cols-2 gap-x-4"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=Px(h,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"";return I.jsx("div",{className:le("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"),children:s&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?s(e.value,e.name,e,t,[e.payload]):I.jsxs(I.Fragment,{children:[null!=i&&i.icon?I.jsx(i.icon,{}):!a&&I.jsx("div",{className:le("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===r,"my-0.5":g&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),I.jsxs("div",{className:le("flex flex-1 justify-between leading-none",g?"items-end":"items-center"),children:[I.jsxs("div",{className:"grid gap-1.5",children:[g?v:null,I.jsx("span",{className:"text-muted-foreground",children:(null==i?void 0:i.label)||e.name})]}),e.value&&I.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));zF.displayName="ChartTooltip";const _Z=B_,qF=p.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:l}=sN(),u=p.useRef({});return p.useEffect((()=>{if(a&&u.current[a]){const e=u.current[a];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[a]),null!=n&&n.length?I.jsx("div",{ref:i,className:le("flex h-[150px] w-full flex-wrap items-center justify-center gap-6 overflow-y-auto pb-10",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,s=Px(l,e,i),c=!!o&&i===a;return I.jsxs("div",{ref:e=>{e?u.current[i]=e:delete u.current[i]},className:le("group flex cursor-pointer select-none items-center gap-2 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!=s&&s.icon&&!t?I.jsx(s.icon,{}):I.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:e.color||""}}),I.jsx("span",{className:"min-w-[max-content]",children:(null==s?void 0:s.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function Px(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]}qF.displayName="ChartLegend";const WF=({children:e,className:t})=>I.jsx("div",{className:le("flex flex-wrap gap-1",t),children:e}),t2=({text:e,icon:t,disabled:n,avatarSrc:r,onClick:o,onRemove:a})=>I.jsxs("div",{onClick:n?void 0:o,className:le("flex cursor-pointer items-center gap-xxxs rounded-sm bg-slate-100 p-xxs text-sm font-medium text-slate-900 transition-all hover:bg-slate-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-slate-100 text-slate-300"),children:[r&&I.jsxs(KO,{className:le("size-6 text-[10px]"),children:[I.jsx(YO,{src:r,alt:e}),I.jsx(XO,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,I.jsx("span",{children:e}),a&&I.jsx("button",{onClick:e=>{e.stopPropagation(),null==a||a()},disabled:n,className:"pointer-events-auto cursor-pointer ",children:I.jsx(o_,{size:16})})]});function bv(e){const t=p.useRef({value:e,previous:e});return p.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function wv(e){const[t,n]=p.useState(void 0);return ar((()=>{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 lN="Checkbox",[UF,$Z]=br(lN),[HF,VF]=UF(lN),GF=p.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=p.useState(null),m=_t(t,(e=>f(e))),h=p.useRef(!1),v=!d||!!d.closest("form"),[g=!1,y]=Wo({prop:o,defaultProp:a,onChange:s}),b=p.useRef(g);return p.useEffect((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>y(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,y]),p.createElement(HF,{scope:n,state:g,disabled:l},p.createElement(et.button,pe({type:"button",role:"checkbox","aria-checked":al(g)?"mixed":g,"aria-required":i,"data-state":uN(g),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:m,onKeyDown:Be(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Be(e.onClick,(e=>{y((e=>!!al(e)||!e)),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),v&&p.createElement(XF,{control:d,bubbles:!h.current,name:r,value:u,checked:g,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),KF="CheckboxIndicator",YF=p.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=VF(KF,n);return p.createElement(Ro,{present:r||al(a.state)||!0===a.state},p.createElement(et.span,pe({"data-state":uN(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),XF=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=p.useRef(null),i=bv(n),l=wv(t);return p.useEffect((()=>{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=al(n),o.call(e,!al(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),p.createElement("input",pe({type:"checkbox","aria-hidden":!0,defaultChecked:!al(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function al(e){return"indeterminate"===e}function uN(e){return al(e)?"indeterminate":e?"checked":"unchecked"}const cN=GF,QF=YF,ZF=Qi("transition-[border-width,background-color] duration-300 relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border border-blue_100 data-[state=unchecked]:border-slate-300 data-[state=checked]:text-primary-foreground disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-slate-100 md:hover:!border-[2px] md:hover:data-[state=checked]:bg-blue_120"}},defaultVariants:{size:"default",variant:"default"}}),Y_=p.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},a)=>{const[i]=p.useState(o.checked),[l,u]=p.useState(!1);p.useEffect((()=>{i!==o.checked&&u(!0)}),[o.checked]);const s=e=>"minus"===r?I.jsx(k6,{...e}):I.jsx(r_,{...e});return I.jsxs(cN,{ref:a,className:le(e,ZF({size:t,variant:n})),...o,children:[I.jsx("div",{className:le("transform-origin-center absolute left-0 top-0 size-full",{"bg-blue_100":(l||i)&&!o.disabled,"animate-fill-in":o.checked&&l,"animate-fill-out":!o.checked&&l})}),I.jsx(QF,{className:"relative flex items-center justify-center text-current",children:I.jsx(s,{className:"size-xxxs",color:o.disabled?"var(--slate-300)":"white"})})]})}));Y_.displayName=cN.displayName;var n2=1,JF=.9,eB=.8,tB=.17,nw=.1,rw=.999,nB=.9999,rB=.99,oB=/[\\\/_+.#"@\[\(\{&]/,iB=/[\\\/_+.#"@\[\(\{&]/g,aB=/[\s-]/,fN=/[\s-]/g;function Tx(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?n2:rB;var l=`${o},${a}`;if(void 0!==i[l])return i[l];for(var u,s,c,d,f=r.charAt(a),p=n.indexOf(f,o),m=0;p>=0;)(u=Tx(e,t,n,r,p+1,a+1,i))>m&&(p===o?u*=n2:oB.test(e.charAt(p-1))?(u*=eB,(c=e.slice(o,p-1).match(iB))&&o>0&&(u*=Math.pow(rw,c.length))):aB.test(e.charAt(p-1))?(u*=JF,(d=e.slice(o,p-1).match(fN))&&o>0&&(u*=Math.pow(rw,d.length))):(u*=tB,o>0&&(u*=Math.pow(rw,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=nB)),(u<nw&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((s=Tx(e,t,n,r,p+1,a+2,i))*nw>u&&(u=s*nw)),u>m&&(m=u),p=n.indexOf(f,p+1);return i[l]=m,m}function r2(e){return e.toLowerCase().replace(fN," ")}function sB(e,t,n){return Tx(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,r2(e),r2(t),0,0,{})}var fd='[cmdk-group=""]',ow='[cmdk-group-items=""]',lB='[cmdk-group-heading=""]',X_='[cmdk-item=""]',o2=`${X_}:not([aria-disabled="true"])`,Ox="cmdk-item-select",rl="data-value",uB=(e,t,n)=>sB(e,t,n),dN=p.createContext(void 0),Xd=()=>p.useContext(dN),pN=p.createContext(void 0),Q_=()=>p.useContext(pN),hN=p.createContext(void 0),mN=p.forwardRef(((e,t)=>{let n=qu((()=>{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=qu((()=>new Set)),o=qu((()=>new Map)),a=qu((()=>new Map)),i=qu((()=>new Set)),l=vN(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:m,loop:h,disablePointerSelection:v=!1,vimBindings:g=!0,...y}=e,b=p.useId(),w=p.useId(),x=p.useId(),_=p.useRef(null),E=wB();ul((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,S.emit()}}),[c]),ul((()=>{E(6,P)}),[]);let S=p.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)R(),N(),E(1,O);else if("value"===e&&(r||E(5,P),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))}S.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),k=p.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,C(t,r)),E(2,(()=>{N(),S.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]))),E(3,(()=>{R(),N(),n.current.value||O(),S.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();E(4,(()=>{R(),(null==t?void 0:t.getAttribute("id"))===e&&O(),S.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:u||e["aria-label"],disablePointerSelection:v,listId:b,inputId:x,labelId:w,listInnerRef:_})),[]);function C(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:uB;return e?a(e,n.current.search,t):0}function N(){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=_.current;T().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(ow);t?t.appendChild(e.parentElement===t?e:e.closest(`${ow} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${ow} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=_.current.querySelector(`${fd}[${rl}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function O(){let e=T().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(rl);S.setState("value",t||void 0)}function R(){var e,t,i,u;if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let s=0;for(let o of r.current){let r=C(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(i=a.current.get(o))?void 0:i.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&s++}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=s}function P(){var e,t,n;let r=j();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(fd))?void 0:t.querySelector(lB))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function j(){var e;return null==(e=_.current)?void 0:e.querySelector(`${X_}[aria-selected="true"]`)}function T(){var e;return Array.from(null==(e=_.current)?void 0:e.querySelectorAll(o2))}function D(e){let t=T()[e];t&&S.setState("value",t.getAttribute(rl))}function I(e){var t;let n=j(),r=T(),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&&S.setState("value",a.getAttribute(rl))}function A(e){let t,n=j(),r=null==n?void 0:n.closest(fd);for(;r&&!t;)r=e>0?yB(r,fd):bB(r,fd),t=null==r?void 0:r.querySelector(o2);t?S.setState("value",t.getAttribute(rl)):I(e)}let L=()=>D(T().length-1),M=e=>{e.preventDefault(),e.metaKey?L():e.altKey?A(1):I(1)},z=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?A(-1):I(-1)};return p.createElement(et.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=y.onKeyDown)||t.call(y,e),!e.defaultPrevented)switch(e.key){case"n":case"j":g&&e.ctrlKey&&M(e);break;case"ArrowDown":M(e);break;case"p":case"k":g&&e.ctrlKey&&z(e);break;case"ArrowUp":z(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),L();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=j();if(t){let e=new Event(Ox);t.dispatchEvent(e)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:_B},u),xv(e,(e=>p.createElement(pN.Provider,{value:S},p.createElement(dN.Provider,{value:k},e)))))})),cB=p.forwardRef(((e,t)=>{var n,r;let o=p.useId(),a=p.useRef(null),i=p.useContext(hN),l=Xd(),u=vN(e),s=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;ul((()=>{if(!s)return l.item(o,null==i?void 0:i.id)}),[s]);let c=gN(o,a,[e.value,e.children,a],e.keywords),d=Q_(),f=cl((e=>e.value&&e.value===c.current)),m=cl((e=>!(!s&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function h(){var e,t;v(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function v(){d.setState("value",c.current,!0)}if(p.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(Ox,h),()=>t.removeEventListener(Ox,h)}),[m,e.onSelect,e.disabled]),!m)return null;let{disabled:g,value:y,onSelect:b,forceMount:w,keywords:x,..._}=e;return p.createElement(et.div,{ref:Ad([a,t]),..._,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||l.disablePointerSelection?void 0:v,onClick:g?void 0:h},e.children)})),fB=p.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=p.useId(),l=p.useRef(null),u=p.useRef(null),s=p.useId(),c=Xd(),d=cl((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));ul((()=>c.group(i)),[]),gN(i,l,[e.value,e.heading,u]);let f=p.useMemo((()=>({id:i,forceMount:o})),[o]);return p.createElement(et.div,{ref:Ad([l,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&p.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:s},n),xv(e,(e=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},p.createElement(hN.Provider,{value:f},e)))))})),dB=p.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=p.useRef(null),a=cl((e=>!e.search));return n||a?p.createElement(et.div,{ref:Ad([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),pB=p.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=Q_(),i=cl((e=>e.search)),l=cl((e=>e.value)),u=Xd(),s=p.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${X_}[${rl}="${encodeURIComponent(l)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return p.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),p.createElement(et.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":s,id:u.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),hB=p.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=p.useRef(null),i=p.useRef(null),l=Xd();return p.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)}}}),[]),p.createElement(et.div,{ref:Ad([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},xv(e,(e=>p.createElement("div",{ref:Ad([i,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),mB=p.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return p.createElement(rv,{open:n,onOpenChange:r},p.createElement(ov,{container:i},p.createElement(nc,{"cmdk-overlay":"",className:o}),p.createElement(rc,{"aria-label":e.label,"cmdk-dialog":"",className:a},p.createElement(mN,{ref:t,...l}))))})),vB=p.forwardRef(((e,t)=>cl((e=>0===e.filtered.count))?p.createElement(et.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),gB=p.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return p.createElement(et.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},xv(e,(e=>p.createElement("div",{"aria-hidden":!0},e))))})),Br=Object.assign(mN,{List:hB,Item:cB,Input:pB,Group:fB,Separator:dB,Dialog:mB,Empty:vB,Loading:gB});function yB(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function bB(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function vN(e){let t=p.useRef(e);return ul((()=>{t.current=e})),t}var ul=typeof window>"u"?p.useEffect:p.useLayoutEffect;function qu(e){let t=p.useRef();return void 0===t.current&&(t.current=e()),t}function Ad(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function cl(e){let t=Q_(),n=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,n,n)}function gN(e,t,n,r=[]){let o=p.useRef(),a=Xd();return ul((()=>{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}})(),u=r.map((e=>e.trim()));a.value(e,l,u),null==(i=t.current)||i.setAttribute(rl,l),o.current=l})),o}var wB=()=>{let[e,t]=p.useState(),n=qu((()=>new Map));return ul((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function xB(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function xv({asChild:e,children:t},n){return e&&p.isValidElement(t)?p.cloneElement(xB(t),{ref:t.ref},n(t.props.children)):n(t)}var _B={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const $B=rv,SZ=m_,SB=ov,CZ=oc,yN=p.forwardRef((({className:e,...t},n)=>(p.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{e.forEach((e=>e&&(e.style.filter="none")))}}),[]),I.jsx(nc,{ref:n,"data-testid":"dialog_overlay",className:le("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));yN.displayName=nc.displayName;const CB=Qi("",{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-slate-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-slate-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),EB=Qi("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),bN=p.forwardRef((({title:e,titleIcon:t,className:n,showClose:r=!0,closeVariant:o="outsideCard",closeSize:a="big",children:i,overlayClassName:l,childrenClassName:u,onBack:s,onCloseModal:c,renderFooter:d,...f},p)=>{const m=I.jsxs(oc,{className:le(CB({closeVariant:o})),children:[I.jsx(o_,{onClick:c,fill:"currentColor",className:le(EB({closeSize:a}))}),I.jsx("span",{className:"sr-only",children:"Close"})]});return I.jsxs(SB,{children:[I.jsx(yN,{className:l,onClick:c}),r&&"insideCard"!==o&&m,I.jsxs(rc,{ref:p,className:le("fixed left-[50%] top-[50%] z-100 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),...f,children:[e&&I.jsxs("h3",{className:"flex items-center justify-center gap-xxs border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",children:[t,e]}),I.jsx("div",{className:le("p-m",u),children:i}),r&&"insideCard"===o&&m,s&&I.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:s,className:"absolute left-m top-m",children:I.jsx(oO,{color:"var(--slate-400)",size:24})}),I.jsx(wN,{className:"empty:hidden",children:null==d?void 0:d()})]})]})}));bN.displayName=rc.displayName;const RB=({className:e,...t})=>I.jsx("div",{className:le("border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",e),...t});RB.displayName="DialogHeader";const wN=({className:e,...t})=>I.jsx("div",{className:le("flex border-t border-slate-200 p-m",e),...t});wN.displayName="DialogFooter";const PB=p.forwardRef((({className:e,...t},n)=>I.jsx(qd,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",e),...t})));PB.displayName=qd.displayName;const TB=p.forwardRef((({className:e,...t},n)=>I.jsx(Wd,{ref:n,className:le("text-sm text-muted-foreground",e),...t})));TB.displayName=Wd.displayName;const xN=p.forwardRef((({className:e,...t},n)=>I.jsx(Br,{ref:n,className:le("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));xN.displayName=Br.displayName;const EZ=({children:e,...t})=>I.jsx($B,{...t,children:I.jsx(bN,{className:"overflow-hidden p-0 shadow-lg",children:I.jsx(xN,{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})})}),OB=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:I.jsx(Br.Input,{ref:n,className:le("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})})));OB.displayName=Br.Input.displayName;const AB=p.forwardRef((({className:e,...t},n)=>I.jsx(Br.List,{ref:n,className:le("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));AB.displayName=Br.List.displayName;const NB=p.forwardRef(((e,t)=>I.jsx(Br.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));NB.displayName=Br.Empty.displayName;const kB=p.forwardRef((({className:e,...t},n)=>I.jsx(Br.Group,{ref:n,className:le("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})));kB.displayName=Br.Group.displayName;const DB=p.forwardRef((({className:e,...t},n)=>I.jsx(Br.Separator,{ref:n,className:le("-mx-1 h-px bg-border",e),...t})));DB.displayName=Br.Separator.displayName;const IB=p.forwardRef((({className:e,...t},n)=>I.jsx(Br.Item,{ref:n,className:le("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})));IB.displayName=Br.Item.displayName;const MB=({className:e,...t})=>I.jsx("span",{className:le("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function Ga(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 i2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function _N(...e){return t=>{let n=!1;const r=e.map((e=>{const r=i2(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():i2(e[t],null)}}}}function gl(...e){return p.useCallback(_N(...e),e)}function jB(e,t){const n=p.createContext(t),r=e=>{const{children:t,...r}=e,o=p.useMemo((()=>r),Object.values(r));return I.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=p.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function LB(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>p.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return p.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=p.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=p.useMemo((()=>l),Object.values(l));return I.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=p.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},FB(r,...t)]}function FB(...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 p.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}MB.displayName="CommandShortcut";var Im=null!=globalThis&&globalThis.document?p.useLayoutEffect:()=>{},BB=_d[" useId ".trim().toString()]||(()=>{}),zB=0;function iw(e){const[t,n]=p.useState(BB());return Im((()=>{e||n((e=>e??String(zB++)))}),[e]),e||(t?`radix-${t}`:"")}function fl(e){const t=p.useRef(e);return p.useEffect((()=>{t.current=e})),p.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function qB({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=WB({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=fl(n);return[i,p.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function WB({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),a=fl(t);return p.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function $N(e){const t=UB(e),n=p.forwardRef(((e,n)=>{const{children:r,...o}=e,a=p.Children.toArray(r),i=a.find(VB);if(i){const e=i.props.children,r=a.map((t=>t===i?p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null:t));return I.jsx(t,{...o,ref:n,children:p.isValidElement(e)?p.cloneElement(e,void 0,r):null})}return I.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function UB(e){const t=p.forwardRef(((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const e=KB(n),o=GB(r,n.props);return n.type!==p.Fragment&&(o.ref=t?_N(t,e):e),p.cloneElement(n,o)}return p.Children.count(n)>1?p.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var HB=Symbol("radix.slottable");function VB(e){return p.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===HB}function GB(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 KB(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 YB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ea=YB.reduce(((e,t)=>{const n=$N(`Primitive.${t}`),r=p.forwardRef(((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function XB(e,t){e&&wi.flushSync((()=>e.dispatchEvent(t)))}function QB(e,t=(null==globalThis?void 0:globalThis.document)){const n=fl(e);p.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 a2,ZB="DismissableLayer",Ax="dismissableLayer.update",JB="dismissableLayer.pointerDownOutside",ez="dismissableLayer.focusOutside",SN=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),CN=p.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,s=p.useContext(SN),[c,d]=p.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,m]=p.useState({}),h=gl(t,(e=>d(e))),v=Array.from(s.layers),[g]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=c?v.indexOf(c):-1,w=s.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=rz((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));!x||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f),E=oz((e=>{const t=e.target;[...s.branches].some((e=>e.contains(t)))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f);return QB((e=>{b===s.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),f),p.useEffect((()=>{if(c)return n&&(0===s.layersWithOutsidePointerEventsDisabled.size&&(a2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),s2(),()=>{n&&1===s.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=a2)}}),[c,f,n,s]),p.useEffect((()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),s2())}),[c,s]),p.useEffect((()=>{const e=()=>m({});return document.addEventListener(Ax,e),()=>document.removeEventListener(Ax,e)}),[]),I.jsx(ea.div,{...u,ref:h,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Ga(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ga(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ga(e.onPointerDownCapture,_.onPointerDownCapture)})}));CN.displayName=ZB;var tz="DismissableLayerBranch",nz=p.forwardRef(((e,t)=>{const n=p.useContext(SN),r=p.useRef(null),o=gl(t,r);return p.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),I.jsx(ea.div,{...e,ref:o})}));function rz(e,t=(null==globalThis?void 0:globalThis.document)){const n=fl(e),r=p.useRef(!1),o=p.useRef((()=>{}));return p.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){EN(JB,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 oz(e,t=(null==globalThis?void 0:globalThis.document)){const n=fl(e),r=p.useRef(!1);return p.useEffect((()=>{const e=e=>{e.target&&!r.current&&EN(ez,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 s2(){const e=new CustomEvent(Ax);document.dispatchEvent(e)}function EN(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?XB(o,a):o.dispatchEvent(a)}nz.displayName=tz;var aw="focusScope.autoFocusOnMount",sw="focusScope.autoFocusOnUnmount",l2={bubbles:!1,cancelable:!0},iz="FocusScope",RN=p.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=p.useState(null),s=fl(o),c=fl(a),d=p.useRef(null),f=gl(t,(e=>u(e))),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect((()=>{if(r){let e=function(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ha(d.current,{select:!0})},t=function(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ha(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ha(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,m.paused]),p.useEffect((()=>{if(l){c2.add(m);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(aw,l2);l.addEventListener(aw,s),l.dispatchEvent(t),t.defaultPrevented||(az(fz(PN(l)),{select:!0}),document.activeElement===e&&Ha(l))}return()=>{l.removeEventListener(aw,s),setTimeout((()=>{const t=new CustomEvent(sw,l2);l.addEventListener(sw,c),l.dispatchEvent(t),t.defaultPrevented||Ha(e??document.body,{select:!0}),l.removeEventListener(sw,c),c2.remove(m)}),0)}}}),[l,s,c,m]);const h=p.useCallback((e=>{if(!n&&!r||m.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]=sz(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ha(a,{select:!0})):(e.preventDefault(),n&&Ha(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,m.paused]);return I.jsx(ea.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})}));function az(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ha(r,{select:t}),document.activeElement!==n)return}function sz(e){const t=PN(e);return[u2(t,e),u2(t.reverse(),e)]}function PN(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 u2(e,t){for(const n of e)if(!lz(n,{upTo:t}))return n}function lz(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 uz(e){return e instanceof HTMLInputElement&&"select"in e}function Ha(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uz(e)&&t&&e.select()}}RN.displayName=iz;var c2=cz();function cz(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=f2(e,t),e.unshift(t)},remove(t){var n;e=f2(e,t),null==(n=e[0])||n.resume()}}}function f2(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function fz(e){return e.filter((e=>"A"!==e.tagName))}var dz="Portal",TN=p.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=p.useState(!1);Im((()=>i(!0)),[]);const l=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?s_.createPortal(I.jsx(ea.div,{...o,ref:t}),l):null}));function pz(e,t){return p.useReducer(((e,n)=>t[e][n]??e),e)}TN.displayName=dz;var _v=e=>{const{present:t,children:n}=e,r=hz(t),o="function"==typeof n?n({present:r.isPresent}):p.Children.only(n),a=gl(r.ref,mz(o));return"function"==typeof n||r.isPresent?p.cloneElement(o,{ref:a}):null};function hz(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),a=p.useRef("none"),i=e?"mounted":"unmounted",[l,u]=pz(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect((()=>{const e=cm(r.current);a.current="mounted"===l?e:"none"}),[l]),Im((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=cm(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Im((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=cm(r.current).includes(a.animationName);if(a.target===t&&i&&(u("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=cm(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)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function cm(e){return(null==e?void 0:e.animationName)||"none"}function mz(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)}_v.displayName="Presence";var lw=0;function vz(){p.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??d2()),document.body.insertAdjacentElement("beforeend",e[1]??d2()),lw++,()=>{1===lw&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),lw--}}),[])}function d2(){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 ON=bO(),uw=function(){},$v=p.forwardRef((function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:uw,onWheelCapture:uw,onTouchMoveCapture:uw}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,u=e.className,s=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,m=e.noIsolation,h=e.inert,v=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=e.gapMode,w=d_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,_=yO([n,t]),E=ir(ir({},w),o);return p.createElement(p.Fragment,null,c&&p.createElement(x,{sideCar:ON,removeScrollBar:s,shards:d,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:b}),i?p.cloneElement(p.Children.only(l),ir(ir({},E),{ref:_})):p.createElement(y,ir({},E,{className:u,ref:_}),l))}));$v.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$v.classNames={fullWidth:bd,zeroRight:yd};var Nx=!1;if(typeof window<"u")try{var fm=Object.defineProperty({},"passive",{get:function(){return Nx=!0,!0}});window.addEventListener("test",fm,fm),window.removeEventListener("test",fm,fm)}catch{Nx=!1}var Bu=!!Nx&&{passive:!1},gz=function(e){return"TEXTAREA"===e.tagName},AN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!gz(e)&&"visible"===n[t])},yz=function(e){return AN(e,"overflowY")},bz=function(e){return AN(e,"overflowX")},p2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),NN(e,r)){var o=kN(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wz=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},xz=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},NN=function(e,t){return"v"===e?yz(t):bz(t)},kN=function(e,t){return"v"===e?wz(t):xz(t)},_z=function(e,t){return"h"===e&&"rtl"===t?-1:1},$z=function(e,t,n,r,o){var a=_z(e,window.getComputedStyle(t).direction),i=a*r,l=n.target,u=t.contains(l),s=!1,c=i>0,d=0,f=0;do{var p=kN(e,l),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&NN(e,l)&&(d+=h,f+=m),l=l instanceof ShadowRoot?l.host:l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(s=!0),s},dm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},h2=function(e){return[e.deltaX,e.deltaY]},m2=function(e){return e&&"current"in e?e.current:e},Sz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cz=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ez=0,zu=[];function Rz(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(Ez++)[0],a=p.useState(p_)[0],i=p.useRef(e);p.useEffect((function(){i.current=e}),[e]),p.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=gO([e.lockRef.current],(e.shards||[]).map(m2),!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=p.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=dm(e),l=n.current,u="deltaX"in e?e.deltaX:l[0]-a[0],s="deltaY"in e?e.deltaY:l[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=p2(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=p2(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return $z(p,t,e,"h"===p?u:s,!0)}),[]),u=p.useCallback((function(e){var n=e;if(zu.length&&zu[zu.length-1]===a){var r="deltaY"in n?h2(n):dm(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Sz(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(i.current.shards||[]).map(m2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?l(n,u[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=p.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:Pz(r)};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),c=p.useCallback((function(e){n.current=dm(e),r.current=void 0}),[]),d=p.useCallback((function(t){s(t.type,h2(t),t.target,l(t,e.lockRef.current))}),[]),f=p.useCallback((function(t){s(t.type,dm(t),t.target,l(t,e.lockRef.current))}),[]);p.useEffect((function(){return zu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Bu),document.addEventListener("touchmove",u,Bu),document.addEventListener("touchstart",c,Bu),function(){zu=zu.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,Bu),document.removeEventListener("touchmove",u,Bu),document.removeEventListener("touchstart",c,Bu)}}),[]);var m=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(a,{styles:Cz(o)}):null,m?p.createElement($O,{gapMode:e.gapMode}):null)}function Pz(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tz=xO(ON,Rz);var DN=p.forwardRef((function(e,t){return p.createElement($v,ir({},e,{ref:t,sideCar:Tz}))}));DN.classNames=$v.classNames;var Z_="Dialog",[IN,RZ]=LB(Z_),[Oz,Vo]=IN(Z_),MN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=p.useRef(null),u=p.useRef(null),[s=!1,c]=qB({prop:r,defaultProp:o,onChange:a});return I.jsx(Oz,{scope:t,triggerRef:l,contentRef:u,contentId:iw(),titleId:iw(),descriptionId:iw(),open:s,onOpenChange:c,onOpenToggle:p.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};MN.displayName=Z_;var jN="DialogTrigger",LN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(jN,n),a=gl(t,o.triggerRef);return I.jsx(ea.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":t$(o.open),...r,ref:a,onClick:Ga(e.onClick,o.onOpenToggle)})}));LN.displayName=jN;var J_="DialogPortal",[Az,FN]=IN(J_,{forceMount:void 0}),BN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Vo(J_,t);return I.jsx(Az,{scope:t,forceMount:n,children:p.Children.map(r,(e=>I.jsx(_v,{present:n||a.open,children:I.jsx(TN,{asChild:!0,container:o,children:e})})))})};BN.displayName=J_;var Mm="DialogOverlay",zN=p.forwardRef(((e,t)=>{const n=FN(Mm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Vo(Mm,e.__scopeDialog);return a.modal?I.jsx(_v,{present:r||a.open,children:I.jsx(kz,{...o,ref:t})}):null}));zN.displayName=Mm;var Nz=$N("DialogOverlay.RemoveScroll"),kz=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(Mm,n);return I.jsx(DN,{as:Nz,allowPinchZoom:!0,shards:[o.contentRef],children:I.jsx(ea.div,{"data-state":t$(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),dl="DialogContent",qN=p.forwardRef(((e,t)=>{const n=FN(dl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Vo(dl,e.__scopeDialog);return I.jsx(_v,{present:r||a.open,children:a.modal?I.jsx(Dz,{...o,ref:t}):I.jsx(Iz,{...o,ref:t})})}));qN.displayName=dl;var Dz=p.forwardRef(((e,t)=>{const n=Vo(dl,e.__scopeDialog),r=p.useRef(null),o=gl(t,n.contentRef,r);return p.useEffect((()=>{const e=r.current;if(e)return nv(e)}),[]),I.jsx(WN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ga(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:Ga(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ga(e.onFocusOutside,(e=>e.preventDefault()))})})),Iz=p.forwardRef(((e,t)=>{const n=Vo(dl,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return I.jsx(WN,{...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()}})})),WN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Vo(dl,n),u=p.useRef(null),s=gl(t,u);return vz(),I.jsxs(I.Fragment,{children:[I.jsx(RN,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:I.jsx(CN,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":t$(l.open),...i,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(Mz,{titleId:l.titleId}),I.jsx(Lz,{contentRef:u,descriptionId:l.descriptionId})]})]})})),e$="DialogTitle",UN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(e$,n);return I.jsx(ea.h2,{id:o.titleId,...r,ref:t})}));UN.displayName=e$;var HN="DialogDescription",VN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(HN,n);return I.jsx(ea.p,{id:o.descriptionId,...r,ref:t})}));VN.displayName=HN;var GN="DialogClose",KN=p.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vo(GN,n);return I.jsx(ea.button,{type:"button",...r,ref:t,onClick:Ga(e.onClick,(()=>o.onOpenChange(!1)))})}));function t$(e){return e?"open":"closed"}KN.displayName=GN;var YN="DialogTitleWarning",[PZ,XN]=jB(YN,{contentName:dl,titleName:e$,docsSlug:"dialog"}),Mz=({titleId:e})=>{const t=XN(YN),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 p.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},jz="DialogDescriptionWarning",Lz=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${XN(jz).contentName}}.`;return p.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},Fz=MN,Bz=LN,zz=BN,qz=zN,Wz=qN,Uz=UN,Hz=VN,Vz=KN;function Gz(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 QN=de.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}),sc=()=>{const e=de.useContext(QN);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Gz("[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 Kz=24,Yz=typeof window<"u"?p.useLayoutEffect:p.useEffect;function v2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Xz(){return n$(/^Mac/)}function Qz(){return n$(/^iPhone/)}function g2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Zz(){return n$(/^iPad/)||Xz()&&navigator.maxTouchPoints>1}function ZN(){return Qz()||Zz()}function n$(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const cw=typeof document<"u"&&window.visualViewport;function y2(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function JN(e){for(y2(e)&&(e=e.parentElement);e&&!y2(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Jz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let fw,pm=0;function eq(e={}){let{isDisabled:t}=e;Yz((()=>{if(!t)return pm++,1===pm&&ZN()&&(fw=tq()),()=>{pm--,0===pm&&(null==fw||fw())}}),[t])}function tq(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=v2(nq(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=v2(dd(document,"touchstart",(n=>{e=JN(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),dd(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}),dd(document,"touchend",(e=>{let t=e.target;kx(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),dd(document,"focus",(e=>{let t=e.target;kx(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",cw&&(cw.height<window.innerHeight?requestAnimationFrame((()=>{b2(t)})):cw.addEventListener("resize",(()=>b2(t)),{once:!0}))})))}),!0),dd(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function nq(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function dd(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function b2(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=JN(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 kx(e){return e instanceof HTMLInputElement&&!Jz.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function rq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function oq(...e){return t=>e.forEach((e=>rq(e,t)))}function ek(...e){return p.useCallback(oq(...e),e)}const tk=new WeakMap;function _n(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&&tk.set(e,r)}function iq(e,t){if(!(e&&e instanceof HTMLElement))return;let n=tk.get(e);n&&(e.style[t]=n[t])}const $n=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function hm(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(", ")[$n(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[$n(t)?5:4]):null)}function aq(e){return 8*(Math.log(e+1)-2)}function dw(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function sq(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const Xt={DURATION:.5,EASE:[.32,.72,0,1]},nk=.4,lq=.25,uq=100,rk=8,Js=16,Dx=26,pw="vaul-dragging";function ok(e){const t=de.useRef(e);return de.useEffect((()=>{t.current=e})),de.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function cq({defaultProp:e,onChange:t}){const n=de.useState(e),[r]=n,o=de.useRef(r),a=ok(t);return de.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function ik({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=cq({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=ok(n);return[i,de.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function fq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:l="bottom",container:u,snapToSequentialPoint:s}){const[c,d]=ik({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=de.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);de.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const m=de.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),h=de.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),v=n&&n.length>0&&(a||0===a)&&!Number.isNaN(a)&&n[a]===c||!n,g=de.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.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)),$n(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,u]),y=de.useMemo((()=>null!==h?null==g?void 0:g[h]:null),[g,h]),b=de.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(u),_n(r.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:$n(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==a&&u<a?_n(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"0"}):_n(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,a,o,d]);return de.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[c,e,n,g,b]),{isLastSnapPoint:m,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!g||void 0===a)return null;const r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?h+1:h-1,i=r?g[o]-g[o-1]:g[o+1]-g[o],l=e/Math.abs(i);return r?1-l:l},setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===a)return;const u="bottom"===l||"right"===l?(y??0)-e:(y??0)+e,c=0===h,d=e>0;if(h===a-1&&_n(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`}),!s&&r>2&&!d)return void(i?t():b(g[0]));if(!s&&r>2&&d&&g&&n)return void b(g[n.length-1]);const f=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=$n(l)?window.innerHeight:window.innerWidth;if(r>nk&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m)return void b(g[n.length-1]);if(c&&e<0&&i&&t(),null===h)return;b(g[h+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<g[g.length-1]||("top"===l||"left"===l)&&t>g[g.length-1]||_n(r.current,{transform:$n(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const dq=()=>()=>{};function pq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=sc(),a=de.useRef(null),i=p.useMemo((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}de.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;sq(r&&!o?dw(document.body,{background:"black"}):dq,dw(t,{transformOrigin:$n(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Xt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xt.EASE.join(",")})`}));const n=dw(t,{borderRadius:"8px",overflow:"hidden",...$n(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*Xt.DURATION)}}}),[t,n,i])}let pd=null;function hq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,l]=de.useState((()=>typeof window<"u"?window.location.href:"")),u=de.useRef(0),s=de.useCallback((()=>{if(g2()&&null===pd&&e&&!a){pd={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:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=de.useCallback((()=>{if(g2()&&null!==pd&&!a){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,pd),window.requestAnimationFrame((()=>{o&&i!==window.location.href?l(window.location.href):window.scrollTo(t,e)})),pd=null}}),[i]);return de.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),de.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&s(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,i,t,n,s,c]),{restorePositionSetting:c}}function ak({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=lq,scrollLockTimeout:s=uq,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:v=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:S=!1,repositionInputs:k=!0,onAnimationEnd:C,container:N,autoFocus:O=!1}){var R,P;const[j=!1,T]=ik({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*Xt.DURATION),e&&!v&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[D,I]=de.useState(!1),[A,L]=de.useState(!1),[M,z]=de.useState(!1),F=de.useRef(null),B=de.useRef(null),$=de.useRef(null),W=de.useRef(null),U=de.useRef(null),H=de.useRef(!1),V=de.useRef(null),q=de.useRef(0),K=de.useRef(!1),G=de.useRef(0),X=de.useRef(null),Q=de.useRef((null==(R=X.current)?void 0:R.getBoundingClientRect().height)||0),Y=de.useRef((null==(P=X.current)?void 0:P.getBoundingClientRect().width)||0),Z=de.useRef(0),J=de.useCallback((e=>{a&&e===oe.length-1&&(B.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ae,shouldFade:ie,getPercentageDragged:le}=fq({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:X,fadeFromIndex:f,overlayRef:F,onSnapPointChange:J,direction:w,container:N,snapToSequentialPoint:E});eq({isDisabled:!j||A||!v||M||!D||!k||!_});const{restorePositionSetting:ue}=hq({isOpen:j,modal:v,nested:y,hasBeenOpened:D,preventScrollRestoration:S,noBodyStyles:b});function se(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const a=null==(n=window.getSelection())?void 0:n.toString(),i=X.current?hm(X.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(B.current&&l.getTime()-B.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=U.current)?void 0:r.getTime())<s&&0===i||t)return U.current=l,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return U.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function fe(e){!A||!X.current||(X.current.classList.remove(pw),H.current=!1,L(!1),W.current=new Date),null==g||g(),e||T(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*Xt.DURATION)}function pe(){if(!X.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=hm(X.current,w);_n(X.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`}),_n(F.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&j&&_n(e,{borderRadius:"8px",overflow:"hidden",...$n(w)?{transform:`scale(${se()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${se()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Xt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xt.EASE.join(",")})`},!0)}return de.useEffect((()=>{var e;function t(){if(!X.current||!k)return;if(kx(document.activeElement)||K.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=X.current.getBoundingClientRect().height||0,i=o>.8*n;Z.current||(Z.current=o);const l=X.current.getBoundingClientRect().top;if(Math.abs(G.current-r)>60&&(K.current=!K.current),a&&a.length>0&&oe&&te){r+=oe[te]||0}if(G.current=r,o>t||K.current){const e=X.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?l:26)),X.current.style.height=h?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else X.current.style.height=`${Z.current}px`;a&&a.length>0&&!K.current?X.current.style.bottom="0px":X.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,oe]),de.useEffect((()=>(j&&(_n(document.documentElement,{scrollBehavior:"auto"}),B.current=new Date),()=>{iq(document.documentElement,"scrollBehavior")})),[j]),de.createElement(Fz,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?I(!0):fe(!0),T(e))},open:j},de.createElement(QN.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:X,overlayRef:F,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||X.current&&!X.current.contains(e.target)||(Q.current=(null==(t=X.current)?void 0:t.getBoundingClientRect().height)||0,Y.current=(null==(n=X.current)?void 0:n.getBoundingClientRect().width)||0,L(!0),$.current=new Date,ZN()&&window.addEventListener("touchend",(()=>H.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),q.current=$n(w)?e.pageY:e.pageX)},onRelease:function(e){if(!A||!X.current)return;X.current.classList.remove(pw),H.current=!1,L(!1),W.current=new Date;const t=hm(X.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===$.current)return;const n=W.current.getTime()-$.current.getTime(),r=q.current-($n(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(z(!0),setTimeout((()=>{z(!1)}),200)),a)return re({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>nk)return fe(),void(null==o||o(e,!1));var l;const s=Math.min(null!=(l=X.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=X.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:s)*u)return fe(),void(null==o||o(e,!1));null==o||o(e,!0),pe()},onDrag:function(e){if(X.current&&A){const t="bottom"===w||"right"===w?1:-1,n=(q.current-($n(w)?e.pageY:e.pageX))*t,o=n>0,l=a&&!c&&!o;if(l&&0===te)return;const u=Math.abs(n),s=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?Q.current:Y.current);const p=le(u,o);if(null!==p&&(d=p),l&&d>=1||!H.current&&!ce(e.target,o))return;if(X.current.classList.add(pw),H.current=!0,_n(X.current,{transition:"none"}),_n(F.current,{transition:"none"}),a&&ae({draggedDistance:n}),o&&!a){const e=aq(n),r=Math.min(-1*e,0)*t;return void _n(X.current,{transform:$n(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((ie||f&&te===f-1)&&(null==r||r(e,d),_n(F.current,{opacity:`${m}`,transition:"none"},!0)),s&&F.current&&i){const e=Math.min(se()+d*(1-se()),1),t=8-8*d,n=Math.max(0,14-14*d);_n(s,{borderRadius:`${t}px`,transform:$n(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=u*t;_n(X.current,{transform:$n(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:j,isDragging:A,shouldFade:ie,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;_n(X.current,{transform:$n(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;V.current&&window.clearTimeout(V.current),_n(X.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&X.current&&(V.current=setTimeout((()=>{const e=hm(X.current,w);_n(X.current,{transition:"none",transform:$n(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=$n(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&_n(X.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:$n(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:K,modal:v,snapPointsOffset:oe,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:b,container:N,autoFocus:O}},n))}const sk=de.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:l}=sc(),u=ek(t,n),s=r&&r.length>0;return l?de.createElement(qz,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&s?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));sk.displayName="Drawer.Overlay";const lk=de.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:l,onDrag:u,keyboardIsOpen:s,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:m,container:h,handleOnly:v,autoFocus:g}=sc(),[y,b]=de.useState(!1),w=ek(o,a),x=de.useRef(null),_=de.useRef(null),E=de.useRef(!1),S=m&&m.length>0;pq();function k(e){x.current=null,E.current=!1,l(e)}return de.useEffect((()=>{S&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),de.createElement(Wz,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&S?"true":"false","data-vaul-custom-container":h?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{v||(null==r.onPointerDown||r.onPointerDown.call(r,e),x.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?s.current&&(s.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(_.current=e,v||(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(E.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 E.current=!0,!0})({x:n,y:t},p,o)?u(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,E.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),k(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),k(_.current)}})}));lk.displayName="Drawer.Content";const mq=250,vq=120,uk=de.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:l,setActiveSnapPoint:u,dismissible:s,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=sc(),m=de.useRef(null),h=de.useRef(!1);function v(){window.clearTimeout(m.current),h.current=!1}return de.createElement("div",{onClick:function(){h.current?v():window.setTimeout((()=>{!function(){if(a||e||h.current)return void v();if(v(),(!i||0===i.length)&&s)return void o();if(l===i[i.length-1]&&s)return void o();const t=i.findIndex((e=>e===l));if(-1===t)return;const n=i[t+1];u(n)}()}),vq)},onPointerCancel:v,onPointerDown:e=>{c&&f(e),m.current=window.setTimeout((()=>{h.current=!0}),mq)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},de.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function gq({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=sc();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return de.createElement(ak,{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 yq(e){const t=sc(),{container:n=t.container,...r}=e;return de.createElement(zz,{container:n,...r})}uk.displayName="Drawer.Handle";const Go={Root:ak,NestedRoot:gq,Content:lk,Overlay:sk,Trigger:Bz,Portal:yq,Handle:uk,Close:Vz,Title:Uz,Description:Hz},bq=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>I.jsx(Go.Root,{direction:t,shouldScaleBackground:e,...n});bq.displayName="Drawer";const TZ=Go.Trigger,wq=Go.Portal,OZ=Go.Close,ck=p.forwardRef((({className:e,...t},n)=>I.jsx(Go.Overlay,{ref:n,className:le("fixed inset-0 z-50 bg-black/5",e),...t})));ck.displayName=Go.Overlay.displayName;const xq=p.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>I.jsxs(wq,{children:[I.jsx(ck,{}),I.jsxs(Go.Content,{ref:o,className:le("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&&I.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));xq.displayName="DrawerContent";const _q=({className:e,...t})=>I.jsx("div",{className:le("grid gap-1.5 p-4 text-center sm:text-left",e),...t});_q.displayName="DrawerHeader";const $q=({className:e,...t})=>I.jsx("div",{className:le("mt-auto flex flex-col gap-2 p-4",e),...t});$q.displayName="DrawerFooter";const Sq=p.forwardRef((({className:e,...t},n)=>I.jsx(Go.Title,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",e),...t})));Sq.displayName=Go.Title.displayName;const Cq=p.forwardRef((({className:e,...t},n)=>I.jsx(Go.Description,{ref:n,className:le("text-sm text-muted-foreground",e),...t})));function r$(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",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=de.useRef(null),a=de.useRef(new Map).current;return de.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:de.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=_t(t,a(i,n).collectionRef);return de.createElement(sl,{ref:o},r)})),ItemSlot:de.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=de.useRef(null),s=_t(t,i),c=a(l,n);return de.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),de.createElement(sl,{[u]:"",ref:s},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return de.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}Cq.displayName=Go.Description.displayName;const Eq=p.createContext(void 0);function Qd(e){const t=p.useContext(Eq);return e||t||"ltr"}const Rq=["top","right","bottom","left"],Xa=Math.min,eo=Math.max,jm=Math.round,mm=Math.floor,Qa=e=>({x:e,y:e}),Pq={left:"right",right:"left",bottom:"top",top:"bottom"},Tq={start:"end",end:"start"};function Ix(e,t,n){return eo(e,Xa(t,n))}function Ki(e,t){return"function"==typeof e?e(t):e}function Yi(e){return e.split("-")[0]}function lc(e){return e.split("-")[1]}function o$(e){return"x"===e?"y":"x"}function i$(e){return"y"===e?"height":"width"}function Za(e){return["top","bottom"].includes(Yi(e))?"y":"x"}function a$(e){return o$(Za(e))}function Oq(e,t,n){void 0===n&&(n=!1);const r=lc(e),o=a$(e),a=i$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lm(i)),[i,Lm(i)]}function Aq(e){const t=Lm(e);return[Mx(e),t,Mx(t)]}function Mx(e){return e.replace(/start|end/g,(e=>Tq[e]))}function Nq(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 kq(e,t,n,r){const o=lc(e);let a=Nq(Yi(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(Mx)))),a}function Lm(e){return e.replace(/left|right|bottom|top/g,(e=>Pq[e]))}function Dq(e){return{top:0,right:0,bottom:0,left:0,...e}}function fk(e){return"number"!=typeof e?Dq(e):{top:e,right:e,bottom:e,left:e}}function Fm(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 w2(e,t,n){let{reference:r,floating:o}=e;const a=Za(t),i=a$(t),l=i$(i),u=Yi(t),s="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(u){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(lc(t)){case"start":p[i]-=f*(n&&s?-1:1);break;case"end":p[i]+=f*(n&&s?-1:1)}return p}const Iq=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=a.filter(Boolean),u=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=w2(s,r,u),f=r,p={},m=0;for(let n=0;n<l.length;n++){const{name:a,fn:h}=l[n],{x:v,y:g,data:y,reset:b}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:i,elements:{reference:e,floating:t}});c=v??c,d=g??d,p={...p,[a]:{...p[a],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(s=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=w2(s,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Nd(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ki(t,e),m=fk(p),h=l[f?"floating"===d?"reference":"floating":d],v=Fm(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g="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=Fm(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-w.top+m.top)/b.y,bottom:(w.bottom-v.bottom+m.bottom)/b.y,left:(v.left-w.left+m.left)/b.x,right:(w.right-v.right+m.right)/b.x}}const Mq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:u}=t,{element:s,padding:c=0}=Ki(e,t)||{};if(null==s)return{};const d=fk(c),f={x:n,y:r},p=a$(o),m=i$(p),h=await i.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let E=_?_[b]:0;(!E||!await(null==i.isElement?void 0:i.isElement(_)))&&(E=l.floating[b]||a.floating[m]);const S=w/2-x/2,k=E/2-h[m]/2-1,C=Xa(d[g],k),N=Xa(d[y],k),O=C,R=E-h[m]-N,P=E/2-h[m]/2+S,j=Ix(O,P,R),T=!u.arrow&&null!=lc(o)&&P!==j&&a.reference[m]/2-(P<O?C:N)-h[m]/2<0,D=T?P<O?P-O:P-R:0;return{[p]:f[p]+D,data:{[p]:j,centerOffset:P-j-D,...T&&{alignmentOffset:D}},reset:T}}}),jq=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:u,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=Ki(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=Yi(o),y=Za(l),b=Yi(l)===l,w=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=f||(b||!h?[Lm(l)]:Aq(l)),_="none"!==m;!f&&_&&x.push(...kq(l,h,m,w));const E=[l,...x],S=await Nd(t,v),k=[];let C=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&k.push(S[g]),d){const e=Oq(o,i,w);k.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:o,overflows:k}],!k.every((e=>e<=0))){var N,O;const e=((null==(N=a.flip)?void 0:N.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(O=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=C.filter((e=>{if(_){const t=Za(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:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function x2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _2(e){return Rq.some((t=>e[t]>=0))}const Lq=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ki(e,t);switch(r){case"referenceHidden":{const e=x2(await Nd(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_2(e)}}}case"escaped":{const e=x2(await Nd(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_2(e)}}}default:return{}}}}};async function Fq(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Yi(n),l=lc(n),u="y"===Za(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d=Ki(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}const Bq=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,u=await Fq(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},zq=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}}},...u}=Ki(e,t),s={x:n,y:r},c=await Nd(t,u),d=Za(Yi(o)),f=o$(d);let p=s[f],m=s[d];if(a){const e="y"===f?"bottom":"right";p=Ix(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";m=Ix(m+c["y"===d?"top":"left"],m,m-c[e])}const h=l.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:i}}}}}},qq=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:u=!0,crossAxis:s=!0}=Ki(e,t),c={x:n,y:r},d=Za(o),f=o$(d);let p=c[f],m=c[d];const h=Ki(l,t),v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+v.mainAxis,n=a.reference[f]+a.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(Yi(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Wq=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:u=()=>{},...s}=Ki(e,t),c=await Nd(t,s),d=Yi(o),f=lc(o),p="y"===Za(o),{width:m,height:h}=a.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const y=h-c.top-c.bottom,b=m-c.left-c.right,w=Xa(h-c[v],y),x=Xa(m-c[g],b),_=!t.middlewareData.shift;let E=w,S=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),_&&!f){const e=eo(c.left,0),t=eo(c.right,0),n=eo(c.top,0),r=eo(c.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:eo(c.left,c.right)):E=h-2*(0!==n||0!==r?n+r:eo(c.top,c.bottom))}await u({...t,availableWidth:S,availableHeight:E});const k=await i.getDimensions(l.floating);return m!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Sv(){return typeof window<"u"}function Ja(e){return dk(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ta(e){var t;return null==(t=(dk(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function dk(e){return!!Sv()&&(e instanceof Node||e instanceof no(e).Node)}function gi(e){return!!Sv()&&(e instanceof Element||e instanceof no(e).Element)}function yi(e){return!!Sv()&&(e instanceof HTMLElement||e instanceof no(e).HTMLElement)}function $2(e){return!(!Sv()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof no(e).ShadowRoot)}function Zd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Eo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Uq(e){return["table","td","th"].includes(Ja(e))}function Hq(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function s$(e){const t=l$(),n=gi(e)?Eo(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 pk(e){let t=Xu(e);for(;yi(t)&&!Cv(t);){if(s$(t))return t;if(Hq(t))return null;t=Xu(t)}return null}function l$(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Cv(e){return["html","body","#document"].includes(Ja(e))}function Eo(e){return no(e).getComputedStyle(e)}function Ev(e){return gi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xu(e){if("html"===Ja(e))return e;const t=e.assignedSlot||e.parentNode||$2(e)&&e.host||ta(e);return $2(t)?t.host:t}function hk(e){const t=Xu(e);return Cv(t)?e.ownerDocument?e.ownerDocument.body:e.body:yi(t)&&Zd(t)?t:hk(t)}function kd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=hk(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=no(o);if(a){const e=Vq(i);return t.concat(i,i.visualViewport||[],Zd(o)?o:[],e&&n?kd(e):[])}return t.concat(o,kd(o,[],n))}function Vq(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mk(e){const t=Eo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=jm(n)!==a||jm(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function u$(e){return gi(e)?e:e.contextElement}function Uu(e){const t=u$(e);if(!yi(t))return Qa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mk(t);let i=(a?jm(n.width):n.width)/r,l=(a?jm(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Gq=Qa(0);function vk(e){const t=no(e);return l$()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Gq}function Kq(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==no(e))&&t}function pl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=u$(e);let i=Qa(1);t&&(r?gi(r)&&(i=Uu(r)):i=Uu(e));const l=Kq(a,n,r)?vk(a):Qa(0);let u=(o.left+l.x)/i.x,s=(o.top+l.y)/i.y,c=o.width/i.x,d=o.height/i.y;if(a){const e=no(a),t=r&&gi(r)?no(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Uu(n),t=n.getBoundingClientRect(),r=Eo(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,s*=e.y,c*=e.x,d*=e.y,u+=o,s+=a,n=no(n).frameElement}}return Fm({width:c,height:d,x:u,y:s})}const Yq=[":popover-open",":modal"];function gk(e){let t=!1,n=0,r=0;if(Yq.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=pk(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Xq(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=ta(r),[i]=t?gk(t.floating):[!1];if(r===a||i)return n;let l={scrollLeft:0,scrollTop:0},u=Qa(1);const s=Qa(0),c=yi(r);if((c||!c&&"fixed"!==o)&&(("body"!==Ja(r)||Zd(a))&&(l=Ev(r)),yi(r))){const e=pl(r);u=Uu(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+s.x,y:n.y*u.y-l.scrollTop*u.y+s.y}}function Qq(e){return Array.from(e.getClientRects())}function yk(e){return pl(ta(e)).left+Ev(e).scrollLeft}function Zq(e){const t=ta(e),n=Ev(e),r=e.ownerDocument.body,o=eo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=eo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+yk(e);const l=-n.scrollTop;return"rtl"===Eo(r).direction&&(i+=eo(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}function Jq(e,t){const n=no(e),r=ta(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const e=l$();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}function eW(e,t){const n=pl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=yi(e)?Uu(e):Qa(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function S2(e,t,n){let r;if("viewport"===t)r=Jq(e,n);else if("document"===t)r=Zq(ta(e));else if(gi(t))r=eW(t,n);else{const n=vk(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Fm(r)}function bk(e,t){const n=Xu(e);return!(n===t||!gi(n)||Cv(n))&&("fixed"===Eo(n).position||bk(n,t))}function tW(e,t){const n=t.get(e);if(n)return n;let r=kd(e,[],!1).filter((e=>gi(e)&&"body"!==Ja(e))),o=null;const a="fixed"===Eo(e).position;let i=a?Xu(e):e;for(;gi(i)&&!Cv(i);){const t=Eo(i),n=s$(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Zd(i)&&!n&&bk(e,i))?r=r.filter((e=>e!==i)):o=t,i=Xu(i)}return t.set(e,r),r}function nW(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?tW(t,this._c):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=S2(t,n,o);return e.top=eo(r.top,e.top),e.right=Xa(r.right,e.right),e.bottom=Xa(r.bottom,e.bottom),e.left=eo(r.left,e.left),e}),S2(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rW(e){const{width:t,height:n}=mk(e);return{width:t,height:n}}function oW(e,t,n,r){const o=yi(t),a=ta(t),i="fixed"===n,l=pl(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const s=Qa(0);if(o||!o&&!i)if(("body"!==Ja(t)||Zd(a))&&(u=Ev(t)),o){const e=pl(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=yk(a));let c=l.left+u.scrollLeft-s.x,d=l.top+u.scrollTop-s.y;const[f,p,m]=gk(r);return f&&(c+=p,d+=m,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function C2(e,t){return yi(e)&&"fixed"!==Eo(e).position?t?t(e):e.offsetParent:null}function wk(e,t){const n=no(e);if(!yi(e))return n;let r=C2(e,t);for(;r&&Uq(r)&&"static"===Eo(r).position;)r=C2(r,t);return r&&("html"===Ja(r)||"body"===Ja(r)&&"static"===Eo(r).position&&!s$(r))?n:r||pk(e)||n}const iW=async function(e){const t=this.getOffsetParent||wk,n=this.getDimensions;return{reference:oW(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function aW(e){return"rtl"===Eo(e).direction}const sW={convertOffsetParentRelativeRectToViewportRelativeRect:Xq,getDocumentElement:ta,getClippingRect:nW,getOffsetParent:wk,getElementRects:iW,getClientRects:Qq,getDimensions:rW,getScale:Uu,isElement:gi,isRTL:aW};function lW(e,t){let n,r=null;const o=ta(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,u){void 0===l&&(l=!1),void 0===u&&(u=1),a();const{left:s,top:c,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-mm(c)+"px "+-mm(o.clientWidth-(s+d))+"px "+-mm(o.clientHeight-(c+f))+"px "+-mm(s)+"px",threshold:eo(0,Xa(1,u))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==u){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(h,p)}r.observe(e)}(!0),a}function uW(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:u=!1}=r,s=u$(e),c=o||a?[...s?kd(s):[],...kd(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=s&&l?lW(s,n):null;let f=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),s&&!u&&p.observe(s),p.observe(t));let m,h=u?pl(e):null;return u&&function t(){const r=pl(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,m=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,u&&cancelAnimationFrame(m)}}const cW=zq,fW=jq,dW=Wq,pW=Lq,E2=Mq,hW=qq,mW=(e,t,n)=>{const r=new Map,o={platform:sW,...n},a={...o.platform,_c:r};return Iq(e,t,{...o,platform:a})};var Cm=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Bm(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(!Bm(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||Bm(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function xk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function R2(e,t){const n=xk(e);return Math.round(t*n)/n}function hw(e){const t=p.useRef(e);return Cm((()=>{t.current=e})),t}function vW(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:u,open:s}=e,[c,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);Bm(f,r)||m(r);const[h,v]=p.useState(null),[g,y]=p.useState(null),b=p.useCallback((e=>{e!==E.current&&(E.current=e,v(e))}),[]),w=p.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),x=a||h,_=i||g,E=p.useRef(null),S=p.useRef(null),k=p.useRef(c),C=null!=u,N=hw(u),O=hw(o),R=hw(s),P=p.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),mW(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};j.current&&!Bm(k.current,t)&&(k.current=t,wi.flushSync((()=>{d(t)})))}))}),[f,t,n,O,R]);Cm((()=>{!1===s&&k.current.isPositioned&&(k.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const j=p.useRef(!1);Cm((()=>(j.current=!0,()=>{j.current=!1})),[]),Cm((()=>{if(x&&(E.current=x),_&&(S.current=_),x&&_){if(N.current)return N.current(x,_,P);P()}}),[x,_,P,N,C]);const T=p.useMemo((()=>({reference:E,floating:S,setReference:b,setFloating:w})),[b,w]),D=p.useMemo((()=>({reference:x,floating:_})),[x,_]),I=p.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=R2(D.floating,c.x),r=R2(D.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...xk(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,D.floating,c.x,c.y]);return p.useMemo((()=>({...c,update:P,refs:T,elements:D,floatingStyles:I})),[c,P,T,D,I])}const gW=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?E2({element:n.current,padding:r}).fn(t):{}:n?E2({element:n,padding:r}).fn(t):{}}}),yW=(e,t)=>({...Bq(e),options:[e,t]}),bW=(e,t)=>({...cW(e),options:[e,t]}),wW=(e,t)=>({...hW(e),options:[e,t]}),xW=(e,t)=>({...fW(e),options:[e,t]}),_W=(e,t)=>({...dW(e),options:[e,t]}),$W=(e,t)=>({...pW(e),options:[e,t]}),SW=(e,t)=>({...gW(e),options:[e,t]}),_k="Popper",[$k,uc]=br(_k),[CW,Sk]=$k(_k),EW=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement(CW,{scope:t,anchor:r,onAnchorChange:o},n)},RW="PopperAnchor",PW=p.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Sk(RW,n),i=p.useRef(null),l=_t(t,i);return p.useEffect((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:p.createElement(et.div,pe({},o,{ref:l}))})),Ck="PopperContent",[TW,AZ]=$k(Ck),OW=p.forwardRef(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:m="center",alignOffset:h=0,arrowPadding:v=0,avoidCollisions:g=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:w="partial",hideWhenDetached:x=!1,updatePositionStrategy:_="optimized",onPlaced:E,...S}=e,k=Sk(Ck,c),[C,N]=p.useState(null),O=_t(t,(e=>N(e))),[R,P]=p.useState(null),j=wv(R),T=null!==(n=null==j?void 0:j.width)&&void 0!==n?n:0,D=null!==(r=null==j?void 0:j.height)&&void 0!==r?r:0,I=d+("center"!==m?"-"+m:""),A="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},L=Array.isArray(y)?y:[y],M=L.length>0,z={padding:A,boundary:L.filter(AW),altBoundary:M},{refs:F,floatingStyles:B,placement:$,isPositioned:W,middlewareData:U}=vW({strategy:"fixed",placement:I,whileElementsMounted:(...e)=>uW(...e,{animationFrame:"always"===_}),elements:{reference:k.anchor},middleware:[yW({mainAxis:f+D,alignmentAxis:h}),g&&bW({mainAxis:!0,crossAxis:!1,limiter:"partial"===w?wW():void 0,...z}),g&&xW({...z}),_W({...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`)}}),R&&SW({element:R,padding:v}),NW({arrowWidth:T,arrowHeight:D}),x&&$W({strategy:"referenceHidden",...z})]}),[H,V]=Ek($),q=Fr(E);ar((()=>{W&&(null==q||q())}),[W,q]);const K=null===(o=U.arrow)||void 0===o?void 0:o.x,G=null===(a=U.arrow)||void 0===a?void 0:a.y,X=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[Q,Y]=p.useState();return ar((()=>{C&&Y(window.getComputedStyle(C).zIndex)}),[C]),p.createElement("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[null===(l=U.transformOrigin)||void 0===l?void 0:l.x,null===(u=U.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},p.createElement(TW,{scope:c,placedSide:H,onArrowChange:P,arrowX:K,arrowY:G,shouldHideArrow:X},p.createElement(et.div,pe({"data-side":H,"data-align":V},S,{ref:O,style:{...S.style,animation:W?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}}))))}));function AW(e){return null!==e}const NW=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=Ek(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?h:`${v}px`,b=-f+"px"):"top"===p?(y=c?h:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?h:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?h:`${g}px`),{data:{x:y,y:b}}}});function Ek(e){const[t,n="center"]=e.split("-");return[t,n]}const Rv=EW,c$=PW,f$=OW,mw="rovingFocusGroup.onEntryFocus",kW={bubbles:!1,cancelable:!0},d$="RovingFocusGroup",[jx,Rk,DW]=r$(d$),[IW,cc]=br(d$,[DW]),[MW,jW]=IW(d$),LW=p.forwardRef(((e,t)=>p.createElement(jx.Provider,{scope:e.__scopeRovingFocusGroup},p.createElement(jx.Slot,{scope:e.__scopeRovingFocusGroup},p.createElement(FW,pe({},e,{ref:t})))))),FW=p.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,...c}=e,d=p.useRef(null),f=_t(t,d),m=Qd(a),[h=null,v]=Wo({prop:i,defaultProp:l,onChange:u}),[g,y]=p.useState(!1),b=Fr(s),w=Rk(n),x=p.useRef(!1),[_,E]=p.useState(0);return p.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(mw,b),()=>e.removeEventListener(mw,b)}),[b]),p.createElement(MW,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:h,onItemFocus:p.useCallback((e=>v(e)),[v]),onItemShiftTab:p.useCallback((()=>y(!0)),[]),onFocusableItemAdd:p.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:p.useCallback((()=>E((e=>e-1))),[])},p.createElement(et.div,pe({tabIndex:g||0===_?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:Be(e.onMouseDown,(()=>{x.current=!0})),onFocus:Be(e.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(mw,kW);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));Pk([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:Be(e.onBlur,(()=>y(!1)))})))})),BW="RovingFocusGroupItem",zW=p.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,l=to(),u=a||l,s=jW(BW,n),c=s.currentTabStopId===u,d=Rk(n),{onFocusableItemAdd:f,onFocusableItemRemove:m}=s;return p.useEffect((()=>{if(r)return f(),()=>m()}),[r,f,m]),p.createElement(jx.ItemSlot,{scope:n,id:u,focusable:r,active:o},p.createElement(et.span,pe({tabIndex:c?0:-1,"data-orientation":s.orientation},i,{ref:t,onMouseDown:Be(e.onMouseDown,(e=>{r?s.onItemFocus(u):e.preventDefault()})),onFocus:Be(e.onFocus,(()=>s.onItemFocus(u))),onKeyDown:Be(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void s.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=UW(e,s.orientation,s.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=s.loop?HW(n,r+1):n.slice(r+1)}setTimeout((()=>Pk(n)))}}))})))})),qW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WW(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function UW(e,t,n){const r=WW(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return qW[r]}function Pk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function HW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const p$=LW,h$=zW,Lx=["Enter"," "],VW=["ArrowDown","PageUp","Home"],Tk=["ArrowUp","PageDown","End"],GW=[...VW,...Tk],KW={ltr:[...Lx,"ArrowRight"],rtl:[...Lx,"ArrowLeft"]},YW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pv="Menu",[Dd,XW,QW]=r$(Pv),[yl,Ok]=br(Pv,[QW,uc,cc]),Tv=uc(),Ak=cc(),[Nk,rs]=yl(Pv),[ZW,Jd]=yl(Pv),JW=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=Tv(t),[u,s]=p.useState(null),c=p.useRef(!1),d=Fr(a),f=Qd(o);return p.useEffect((()=>{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})}}),[]),p.createElement(Rv,l,p.createElement(Nk,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s},p.createElement(ZW,{scope:t,onClose:p.useCallback((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:i},r)))},kk=p.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=Tv(n);return p.createElement(c$,pe({},o,r,{ref:t}))})),Dk="MenuPortal",[eU,Ik]=yl(Dk,{forceMount:void 0}),tU=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=rs(Dk,t);return p.createElement(eU,{scope:t,forceMount:n},p.createElement(Ro,{present:n||a.open},p.createElement(c_,{asChild:!0,container:o},r)))},qo="MenuContent",[nU,m$]=yl(qo),rU=p.forwardRef(((e,t)=>{const n=Ik(qo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=rs(qo,e.__scopeMenu),i=Jd(qo,e.__scopeMenu);return p.createElement(Dd.Provider,{scope:e.__scopeMenu},p.createElement(Ro,{present:r||a.open},p.createElement(Dd.Slot,{scope:e.__scopeMenu},i.modal?p.createElement(oU,pe({},o,{ref:t})):p.createElement(iU,pe({},o,{ref:t})))))})),oU=p.forwardRef(((e,t)=>{const n=rs(qo,e.__scopeMenu),r=p.useRef(null),o=_t(t,r);return p.useEffect((()=>{const e=r.current;if(e)return nv(e)}),[]),p.createElement(v$,pe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Be(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),iU=p.forwardRef(((e,t)=>{const n=rs(qo,e.__scopeMenu);return p.createElement(v$,pe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),v$=p.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,disableOutsideScroll:h,...v}=e,g=rs(qo,n),y=Jd(qo,n),b=Tv(n),w=Ak(n),x=XW(n),[_,E]=p.useState(null),S=p.useRef(null),k=_t(t,S,g.onContentChange),C=p.useRef(0),N=p.useRef(""),O=p.useRef(0),R=p.useRef(null),P=p.useRef("right"),j=p.useRef(0),T=h?tv:p.Fragment,D=h?{as:sl,allowPinchZoom:!0}:void 0;p.useEffect((()=>()=>window.clearTimeout(C.current)),[]),f_();const I=p.useCallback((e=>{var t,n;return P.current===(null===(t=R.current)||void 0===t?void 0:t.side)&&EU(e,null===(n=R.current)||void 0===n?void 0:n.area)}),[]);return p.createElement(nU,{scope:n,searchRef:N,onItemEnter:p.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),onItemLeave:p.useCallback((e=>{var t;I(e)||(null===(t=S.current)||void 0===t||t.focus(),E(null))}),[I]),onTriggerLeave:p.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),pointerGraceTimerRef:O,onPointerGraceIntentChange:p.useCallback((e=>{R.current=e}),[])},p.createElement(T,D,p.createElement(u_,{asChild:!0,trapped:o,onMountAutoFocus:Be(a,(e=>{var t;e.preventDefault(),null===(t=S.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},p.createElement(Jm,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m},p.createElement(p$,pe({asChild:!0},w,{dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:E,onEntryFocus:Be(u,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()}))}),p.createElement(f$,pe({role:"menu","aria-orientation":"vertical","data-state":qk(g.open),"data-radix-menu-content":"",dir:y.dir},b,v,{ref:k,style:{outline:"none",...v.style},onKeyDown:Be(v.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=N.current+e,o=x().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=SU(o.map((e=>e.textValue)),r,i),u=null===(n=o.find((e=>e.textValue===l)))||void 0===n?void 0:n.ref.current;(function e(t){N.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=S.current;if(e.target!==o||!GW.includes(e.key))return;e.preventDefault();const a=x().filter((e=>!e.disabled)).map((e=>e.ref.current));Tk.includes(e.key)&&a.reverse(),_U(a)})),onBlur:Be(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),N.current="")})),onPointerMove:Be(e.onPointerMove,Id((e=>{const t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>j.current?"right":"left";P.current=t,j.current=e.clientX}})))})))))))})),Mk=p.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.createElement(et.div,pe({role:"group"},r,{ref:t}))})),aU=p.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.createElement(et.div,pe({},r,{ref:t}))})),Fx="MenuItem",P2="menu.itemSelect",g$=p.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=p.useRef(null),i=Jd(Fx,e.__scopeMenu),l=m$(Fx,e.__scopeMenu),u=_t(t,a),s=p.useRef(!1);return p.createElement(jk,pe({},o,{ref:u,disabled:n,onClick:Be(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(P2,{bubbles:!0,cancelable:!0});e.addEventListener(P2,(e=>null==r?void 0:r(e)),{once:!0}),hO(e,t),t.defaultPrevented?s.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),s.current=!0},onPointerUp:Be(e.onPointerUp,(e=>{var t;s.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:Be(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||Lx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),jk=p.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=m$(Fx,n),l=Ak(n),u=p.useRef(null),s=_t(t,u),[c,d]=p.useState(!1),[f,m]=p.useState("");return p.useEffect((()=>{const e=u.current;var t;e&&m((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),p.createElement(Dd.ItemSlot,{scope:n,disabled:r,textValue:o??f},p.createElement(h$,pe({asChild:!0},l,{focusable:!r}),p.createElement(et.div,pe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:s,onPointerMove:Be(e.onPointerMove,Id((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:Be(e.onPointerLeave,Id((e=>i.onItemLeave(e)))),onFocus:Be(e.onFocus,(()=>d(!0))),onBlur:Be(e.onBlur,(()=>d(!1)))}))))})),sU=p.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.createElement(Fk,{scope:e.__scopeMenu,checked:n},p.createElement(g$,pe({role:"menuitemcheckbox","aria-checked":zm(n)?"mixed":n},o,{ref:t,"data-state":y$(n),onSelect:Be(o.onSelect,(()=>null==r?void 0:r(!!zm(n)||!n)),{checkForDefaultPrevented:!1})})))})),lU="MenuRadioGroup",[uU,cU]=yl(lU,{value:void 0,onValueChange:()=>{}}),fU=p.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Fr(r);return p.createElement(uU,{scope:e.__scopeMenu,value:n,onValueChange:a},p.createElement(Mk,pe({},o,{ref:t})))})),dU="MenuRadioItem",pU=p.forwardRef(((e,t)=>{const{value:n,...r}=e,o=cU(dU,e.__scopeMenu),a=n===o.value;return p.createElement(Fk,{scope:e.__scopeMenu,checked:a},p.createElement(g$,pe({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":y$(a),onSelect:Be(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),Lk="MenuItemIndicator",[Fk,hU]=yl(Lk,{checked:!1}),mU=p.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=hU(Lk,n);return p.createElement(Ro,{present:r||zm(a.checked)||!0===a.checked},p.createElement(et.span,pe({},o,{ref:t,"data-state":y$(a.checked)})))})),vU=p.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return p.createElement(et.div,pe({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),Bk="MenuSub",[gU,zk]=yl(Bk),yU=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=rs(Bk,t),i=Tv(t),[l,u]=p.useState(null),[s,c]=p.useState(null),d=Fr(o);return p.useEffect((()=>(!1===a.open&&d(!1),()=>d(!1))),[a.open,d]),p.createElement(Rv,i,p.createElement(Nk,{scope:t,open:r,onOpenChange:d,content:s,onContentChange:c},p.createElement(gU,{scope:t,contentId:to(),triggerId:to(),trigger:l,onTriggerChange:u},n)))},vm="MenuSubTrigger",bU=p.forwardRef(((e,t)=>{const n=rs(vm,e.__scopeMenu),r=Jd(vm,e.__scopeMenu),o=zk(vm,e.__scopeMenu),a=m$(vm,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,s={__scopeMenu:e.__scopeMenu},c=p.useCallback((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return p.useEffect((()=>c),[c]),p.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}}),[l,u]),p.createElement(kk,pe({asChild:!0},s),p.createElement(jk,pe({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":qk(n.open)},e,{ref:Zm(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:Be(e.onPointerMove,Id((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:Be(e.onPointerLeave,Id((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,u=i?-5:5,s=r[i?"left":"right"],c=r[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:s,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:s,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:Be(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!KW[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),wU="MenuSubContent",xU=p.forwardRef(((e,t)=>{const n=Ik(qo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=rs(qo,e.__scopeMenu),i=Jd(qo,e.__scopeMenu),l=zk(wU,e.__scopeMenu),u=p.useRef(null),s=_t(t,u);return p.createElement(Dd.Provider,{scope:e.__scopeMenu},p.createElement(Ro,{present:r||a.open},p.createElement(Dd.Slot,{scope:e.__scopeMenu},p.createElement(v$,pe({id:l.contentId,"aria-labelledby":l.triggerId},o,{ref:s,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Be(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:Be(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:Be(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=YW[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function qk(e){return e?"open":"closed"}function zm(e){return"indeterminate"===e}function y$(e){return zm(e)?"indeterminate":e?"checked":"unchecked"}function _U(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $U(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function SU(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=$U(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 CU(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,u=t[a].x,s=t[a].y;l>r!=s>r&&n<(u-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function EU(e,t){if(!t)return!1;return CU({x:e.clientX,y:e.clientY},t)}function Id(e){return t=>"mouse"===t.pointerType?e(t):void 0}const RU=JW,PU=kk,TU=tU,OU=rU,AU=Mk,NU=aU,kU=g$,DU=sU,IU=fU,MU=pU,jU=mU,LU=vU,FU=yU,BU=bU,zU=xU,Wk="DropdownMenu",[qU,NZ]=br(Wk,[Ok]),_r=Ok(),[WU,Uk]=qU(Wk),UU=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=_r(t),s=p.useRef(null),[c=!1,d]=Wo({prop:o,defaultProp:a,onChange:i});return p.createElement(WU,{scope:t,triggerId:to(),triggerRef:s,contentId:to(),open:c,onOpenChange:d,onOpenToggle:p.useCallback((()=>d((e=>!e))),[d]),modal:l},p.createElement(RU,pe({},u,{open:c,onOpenChange:d,dir:r,modal:l}),n))},HU="DropdownMenuTrigger",VU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Uk(HU,n),i=_r(n);return p.createElement(PU,pe({asChild:!0},i),p.createElement(et.button,pe({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:Zm(t,a.triggerRef),onPointerDown:Be(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:Be(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),GU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=_r(t);return p.createElement(TU,pe({},r,n))},KU="DropdownMenuContent",YU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Uk(KU,n),a=_r(n),i=p.useRef(!1);return p.createElement(OU,pe({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:Be(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:Be(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)"}}))})),XU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(AU,pe({},o,r,{ref:t}))})),QU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(NU,pe({},o,r,{ref:t}))})),ZU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(kU,pe({},o,r,{ref:t}))})),JU=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(DU,pe({},o,r,{ref:t}))})),eH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(IU,pe({},o,r,{ref:t}))})),tH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(MU,pe({},o,r,{ref:t}))})),nH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(jU,pe({},o,r,{ref:t}))})),rH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(LU,pe({},o,r,{ref:t}))})),oH=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=_r(t),[l=!1,u]=Wo({prop:r,defaultProp:a,onChange:o});return p.createElement(FU,pe({},i,{open:l,onOpenChange:u}),n)},iH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(BU,pe({},o,r,{ref:t}))})),aH=p.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=_r(n);return p.createElement(zU,pe({},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)"}}))})),sH=UU,lH=VU,Hk=GU,Vk=YU,uH=XU,Gk=QU,Kk=ZU,Yk=JU,cH=eH,Xk=tH,fH=nH,b$=rH,dH=oH,Qk=iH,Zk=aH,kZ=sH,DZ=lH,IZ=uH,MZ=Hk,jZ=dH,LZ=cH,pH=p.forwardRef((({className:e,inset:t,children:n,...r},o)=>I.jsxs(Qk,{ref:o,className:le("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,I.jsx(iO,{className:"ml-auto h-4 w-4"})]})));pH.displayName=Qk.displayName;const hH=p.forwardRef((({className:e,...t},n)=>I.jsx(Zk,{ref:n,className:le("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})));hH.displayName=Zk.displayName;const mH=p.forwardRef((({className:e,sideOffset:t=4,...n},r)=>I.jsx(Hk,{children:I.jsx(Vk,{ref:r,sideOffset:t,className:le("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-slate-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),...n})})));mH.displayName=Vk.displayName;const vH=p.forwardRef((({className:e,inset:t,...n},r)=>I.jsx(Kk,{ref:r,className:le("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));vH.displayName=Kk.displayName;const gH=p.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=I.jsx(Y_,{size:"default",variant:"default",checked:n});return I.jsxs(Yk,{ref:a,className:le("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-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,I.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));gH.displayName=Yk.displayName;const yH=p.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=I.jsx("div",{className:"flex h-xxs items-center justify-center",children:I.jsx(fH,{children:I.jsx(r_,{size:20})})});return I.jsxs(Xk,{ref:o,className:le("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-slate-900"," outline-none transition-colors hover:bg-slate-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,I.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));yH.displayName=Xk.displayName;const bH=p.forwardRef((({className:e,inset:t,...n},r)=>I.jsx(Gk,{ref:r,className:le("text-sm font-semibold",t&&"pl-xl",e),...n})));bH.displayName=Gk.displayName;const wH=p.forwardRef((({className:e,...t},n)=>I.jsx(b$,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",e),...t})));wH.displayName=b$.displayName;const xH=({className:e,...t})=>I.jsx("span",{className:le("ml-auto text-xs tracking-widest opacity-60",e),...t});xH.displayName="DropdownMenuShortcut";var _H=e=>"checkbox"===e.type,$H=e=>e instanceof Date,Jk=e=>null==e;const SH=e=>"object"==typeof e;var fc=e=>!Jk(e)&&!Array.isArray(e)&&SH(e)&&!$H(e),CH=e=>fc(e)&&e.target?_H(e.target)?e.target.checked:e.target.value:e,EH=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,RH=(e,t)=>e.has(EH(t)),PH=e=>{const t=e.constructor&&e.constructor.prototype;return fc(t)&&t.hasOwnProperty("isPrototypeOf")},TH=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function w$(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(TH&&(e instanceof Blob||e instanceof FileList)||!n&&!fc(e))return e;if(t=n?[]:{},n||PH(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=w$(e[n]));else t=e}return t}var e3=e=>Array.isArray(e)?e.filter(Boolean):[],Bx=e=>void 0===e,or=(e,t,n)=>{if(!t||!fc(e))return n;const r=e3(t.split(/[,[\].]+?/)).reduce(((e,t)=>Jk(e)?e:e[t]),e);return Bx(r)||r===e?Bx(e[t])?n:e[t]:r},T2=e=>"boolean"==typeof e;const O2={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},A2={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},t3=de.createContext(null),Ov=()=>de.useContext(t3),OH=e=>{const{children:t,...n}=e;return de.createElement(t3.Provider,{value:n},t)};var AH=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const o=a;return t._proxyFormState[o]!==A2.all&&(t._proxyFormState[o]=!r||A2.all),n&&(n[o]=!0),e[o]}});return o},NH=e=>fc(e)&&!Object.keys(e).length,kH=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return NH(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find((e=>t[e]===!r))},DH=e=>Array.isArray(e)?e:[e],n3=(e,t,n)=>!e||!t||e===t||DH(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function r3(e){const t=de.useRef(e);t.current=e,de.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}function IH(e){const t=Ov(),{control:n=t.control,disabled:r,name:o,exact:a}=e,[i,l]=de.useState(n._formState),u=de.useRef(!0),s=de.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=de.useRef(o);return c.current=o,r3({disabled:r,next:e=>u.current&&n3(c.current,e.name,a)&&kH(e,s.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),de.useEffect((()=>(u.current=!0,s.current.isValid&&n._updateValid(!0),()=>{u.current=!1})),[n]),AH(i,n,s.current,!1)}var MH=e=>"string"==typeof e,jH=(e,t,n,r,o)=>MH(e)?or(n,e,o):Array.isArray(e)?e.map((e=>or(n,e))):n;function LH(e){const t=Ov(),{control:n=t.control,name:r,defaultValue:o,disabled:a,exact:i}=e,l=de.useRef(r);l.current=r,r3({disabled:a,subject:n._subjects.values,next:e=>{n3(l.current,e.name,i)&&s(w$(jH(l.current,n._names,e.values||n._formValues,!1,o)))}});const[u,s]=de.useState(n._getWatch(r,o));return de.useEffect((()=>n._removeUnmounted())),u}var FH=e=>/^\w*$/.test(e),BH=e=>e3(e.replace(/["|']|\]/g,"").split(/\.|\[/)),N2=(e,t,n)=>{let r=-1;const o=FH(t)?[t]:BH(t),a=o.length,i=a-1;for(;++r<a;){const t=o[r];let a=n;if(r!==i){const n=e[t];a=fc(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}e[t]=a,e=e[t]}return e};function zH(e){const t=Ov(),{name:n,disabled:r,control:o=t.control,shouldUnregister:a}=e,i=RH(o._names.array,n),l=LH({control:o,name:n,defaultValue:or(o._formValues,n,or(o._defaultValues,n,e.defaultValue)),exact:!0}),u=IH({control:o,name:n}),s=de.useRef(o.register(n,{...e.rules,value:l,...T2(e.disabled)?{disabled:e.disabled}:{}}));return de.useEffect((()=>{const e=o._options.shouldUnregister||a,t=(e,t)=>{const n=or(o._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=w$(or(o._options.defaultValues,n));N2(o._defaultValues,n,e),Bx(or(o._formValues,n))&&N2(o._formValues,n,e)}return()=>{(i?e&&!o._state.action:e)?o.unregister(n):t(n,!1)}}),[n,o,i,a]),de.useEffect((()=>{or(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:or(o._fields,n)._f.value})}),[r,n,o]),{field:{name:n,value:l,...T2(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:de.useCallback((e=>s.current.onChange({target:{value:CH(e),name:n},type:O2.CHANGE})),[n]),onBlur:de.useCallback((()=>s.current.onBlur({target:{value:or(o._formValues,n),name:n},type:O2.BLUR})),[n,o]),ref:e=>{const t=or(o._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!or(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!or(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!or(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!or(u.validatingFields,n)},error:{enumerable:!0,get:()=>or(u.errors,n)}})}}const qH=e=>e.render(zH(e)),WH=p.forwardRef(((e,t)=>p.createElement(et.label,pe({},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()}})))),o3=WH,UH=Qi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i3=p.forwardRef((({className:e,...t},n)=>I.jsx(o3,{ref:n,className:le(UH(),e),...t})));function k2(e,[t,n]){return Math.min(n,Math.max(t,e))}i3.displayName=o3.displayName;const a3=p.forwardRef(((e,t)=>p.createElement(et.span,pe({},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}})))),HH=a3,VH=[" ","Enter","ArrowUp","ArrowDown"],GH=[" ","Enter"],Av="Select",[Nv,kv,KH]=r$(Av),[dc,FZ]=br(Av,[KH,uc]),x$=uc(),[YH,bl]=dc(Av),[XH,QH]=dc(Av),ZH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:u,dir:s,name:c,autoComplete:d,disabled:f,required:m}=e,h=x$(t),[v,g]=p.useState(null),[y,b]=p.useState(null),[w,x]=p.useState(!1),_=Qd(s),[E=!1,S]=Wo({prop:r,defaultProp:o,onChange:a}),[k,C]=Wo({prop:i,defaultProp:l,onChange:u}),N=p.useRef(null),O=!v||!!v.closest("form"),[R,P]=p.useState(new Set),j=Array.from(R).map((e=>e.props.value)).join(";");return p.createElement(Rv,h,p.createElement(YH,{required:m,scope:t,trigger:v,onTriggerChange:g,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:to(),value:k,onValueChange:C,open:E,onOpenChange:S,dir:_,triggerPointerDownPosRef:N,disabled:f},p.createElement(Nv.Provider,{scope:t},p.createElement(XH,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback((e=>{P((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:p.useCallback((e=>{P((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),O?p.createElement(f3,{key:j,"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:d,value:k,onChange:e=>C(e.target.value),disabled:f},void 0===k?p.createElement("option",{value:""}):null,Array.from(R)):null))},JH="SelectTrigger",eV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=x$(n),i=bl(JH,n),l=i.disabled||r,u=_t(t,i.onTriggerChange),s=kv(n),[c,d,f]=d3((e=>{const t=s().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=p3(t,e,n);void 0!==r&&i.onValueChange(r.value)})),m=()=>{l||(i.onOpenChange(!0),f())};return p.createElement(c$,pe({asChild:!0},a),p.createElement(et.button,pe({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":c3(i.value)?"":void 0},o,{ref:u,onClick:Be(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:Be(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(m(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:Be(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&VH.includes(e.key)&&(m(),e.preventDefault())}))})))})),tV="SelectValue",nV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,u=bl(tV,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==a,d=_t(t,u.onValueNodeChange);return ar((()=>{s(c)}),[s,c]),p.createElement(et.span,pe({},l,{ref:d,style:{pointerEvents:"none"}}),c3(u.value)?p.createElement(p.Fragment,null,i):a)})),rV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.createElement(et.span,pe({"aria-hidden":!0},o,{ref:t}),r||"▼")})),oV=e=>p.createElement(c_,pe({asChild:!0},e)),Qu="SelectContent",iV=p.forwardRef(((e,t)=>{const n=bl(Qu,e.__scopeSelect),[r,o]=p.useState();if(ar((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?wi.createPortal(p.createElement(s3,{scope:e.__scopeSelect},p.createElement(Nv.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),t):null}return p.createElement(aV,pe({},e,{ref:t}))})),Hi=10,[s3,wl]=dc(Qu),aV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:g,...y}=e,b=bl(Qu,n),[w,x]=p.useState(null),[_,E]=p.useState(null),S=_t(t,(e=>x(e))),[k,C]=p.useState(null),[N,O]=p.useState(null),R=kv(n),[P,j]=p.useState(!1),T=p.useRef(!1);p.useEffect((()=>{if(w)return nv(w)}),[w]),f_();const D=p.useCallback((e=>{const[t,...n]=R().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&&_&&(_.scrollTop=0),n===r&&_&&(_.scrollTop=_.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[R,_]),I=p.useCallback((()=>D([k,w])),[D,k,w]);p.useEffect((()=>{P&&I()}),[P,I]);const{onOpenChange:A,triggerPointerDownPosRef:L}=b;p.useEffect((()=>{if(w){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=L.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=L.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,A,L]),p.useEffect((()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[A]);const[M,z]=d3((e=>{const t=R().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=p3(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),F=p.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&(C(e),r&&(T.current=!0))}),[b.value]),B=p.useCallback((()=>null==w?void 0:w.focus()),[w]),$=p.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&O(e)}),[b.value]),W="popper"===r?D2:sV,U=W===D2?{side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:g}:{};return p.createElement(s3,{scope:n,content:w,viewport:_,onViewportChange:E,itemRefCallback:F,selectedItem:k,onItemLeave:B,itemTextRefCallback:$,focusSelectedItem:I,selectedItemText:N,position:r,isPositioned:P,searchRef:M},p.createElement(tv,{as:sl,allowPinchZoom:!0},p.createElement(u_,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Be(o,(e=>{var t;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},p.createElement(Jm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},p.createElement(W,pe({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault()},y,U,{onPlaced:()=>j(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Be(y.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=R().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((()=>D(t))),e.preventDefault()}}))}))))))})),sV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=bl(Qu,n),i=wl(Qu,n),[l,u]=p.useState(null),[s,c]=p.useState(null),d=_t(t,(e=>c(e))),f=kv(n),m=p.useRef(!1),h=p.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,w=p.useCallback((()=>{if(a.trigger&&a.valueNode&&l&&s&&v&&g&&y){const e=a.trigger.getBoundingClientRect(),t=s.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=y.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,u=e.width+i,s=Math.max(u,t.width),c=window.innerWidth-Hi,d=k2(a,[Hi,c-s]);l.style.minWidth=u+"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,u=e.width+i,s=Math.max(u,t.width),c=window.innerWidth-Hi,d=k2(a,[Hi,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const i=f(),u=window.innerHeight-2*Hi,c=v.scrollHeight,d=window.getComputedStyle(s),p=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=p+h+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*g.offsetHeight,w),_=window.getComputedStyle(v),E=parseInt(_.paddingTop,10),S=parseInt(_.paddingBottom,10),k=e.top+e.height/2-Hi,C=u-k,N=g.offsetHeight/2,O=p+h+(g.offsetTop+N),R=w-O;if(O<=k){const e=g===i[i.length-1].ref.current;l.style.bottom="0px";const t=s.clientHeight-v.offsetTop-v.offsetHeight,n=O+Math.max(C,N+(e?S:0)+t+b);l.style.height=n+"px"}else{const e=g===i[0].ref.current;l.style.top="0px";const t=Math.max(k,p+v.offsetTop+(e?E:0)+N)+R;l.style.height=t+"px",v.scrollTop=O-k+v.offsetTop}l.style.margin=`${Hi}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>m.current=!0))}}),[f,a.trigger,a.valueNode,l,s,v,g,y,a.dir,r]);ar((()=>w()),[w]);const[x,_]=p.useState();ar((()=>{s&&_(window.getComputedStyle(s).zIndex)}),[s]);const E=p.useCallback((e=>{e&&!0===h.current&&(w(),null==b||b(),h.current=!1)}),[w,b]);return p.createElement(lV,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:E},p.createElement("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x}},p.createElement(et.div,pe({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),D2=p.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Hi,...a}=e,i=x$(n);return p.createElement(f$,pe({},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)"}}))})),[lV,_$]=dc(Qu,{}),I2="SelectViewport",uV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=wl(I2,n),a=_$(I2,n),i=_t(t,o.onViewportChange),l=p.useRef(0);return p.createElement(p.Fragment,null,p.createElement("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}"}}),p.createElement(Nv.Slot,{scope:n},p.createElement(et.div,pe({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Be(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*Hi,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}))}))))})),cV="SelectGroup",[fV,dV]=dc(cV),pV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=to();return p.createElement(fV,{scope:n,id:o},p.createElement(et.div,pe({role:"group","aria-labelledby":o},r,{ref:t})))})),hV="SelectLabel",mV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=dV(hV,n);return p.createElement(et.div,pe({id:o.id},r,{ref:t}))})),zx="SelectItem",[vV,l3]=dc(zx),gV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=bl(zx,n),u=wl(zx,n),s=l.value===r,[c,d]=p.useState(a??""),[f,m]=p.useState(!1),h=_t(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),v=to(),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 p.createElement(vV,{scope:n,value:r,disabled:o,textId:v,isSelected:s,onItemTextChange:p.useCallback((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},p.createElement(Nv.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},p.createElement(et.div,pe({role:"option","aria-labelledby":v,"data-highlighted":f?"":void 0,"aria-selected":s&&f,"data-state":s?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},i,{ref:h,onFocus:Be(i.onFocus,(()=>m(!0))),onBlur:Be(i.onBlur,(()=>m(!1))),onPointerUp:Be(i.onPointerUp,g),onPointerMove:Be(i.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Be(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:Be(i.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(GH.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),gm="SelectItemText",yV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=bl(gm,n),l=wl(gm,n),u=l3(gm,n),s=QH(gm,n),[c,d]=p.useState(null),f=_t(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=l.itemTextRefCallback)||void 0===t?void 0:t.call(l,e,u.value,u.disabled)})),m=null==c?void 0:c.textContent,h=p.useMemo((()=>p.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},m)),[u.disabled,u.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:g}=s;return ar((()=>(v(h),()=>g(h))),[v,g,h]),p.createElement(p.Fragment,null,p.createElement(et.span,pe({id:u.textId},a,{ref:f})),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?wi.createPortal(a.children,i.valueNode):null)})),bV="SelectItemIndicator",wV=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return l3(bV,n).isSelected?p.createElement(et.span,pe({"aria-hidden":!0},r,{ref:t})):null})),M2="SelectScrollUpButton",xV=p.forwardRef(((e,t)=>{const n=wl(M2,e.__scopeSelect),r=_$(M2,e.__scopeSelect),[o,a]=p.useState(!1),i=_t(t,r.onScrollButtonChange);return ar((()=>{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?p.createElement(u3,pe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),j2="SelectScrollDownButton",_V=p.forwardRef(((e,t)=>{const n=wl(j2,e.__scopeSelect),r=_$(j2,e.__scopeSelect),[o,a]=p.useState(!1),i=_t(t,r.onScrollButtonChange);return ar((()=>{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?p.createElement(u3,pe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),u3=p.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=wl("SelectScrollButton",n),i=p.useRef(null),l=kv(n),u=p.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return p.useEffect((()=>()=>u()),[u]),ar((()=>{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]),p.createElement(et.div,pe({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Be(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:Be(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:Be(o.onPointerLeave,(()=>{u()}))}))})),$V=p.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(et.div,pe({"aria-hidden":!0},r,{ref:t}))}));function c3(e){return""===e||void 0===e}const f3=p.forwardRef(((e,t)=>{const{value:n,...r}=e,o=p.useRef(null),a=_t(t,o),i=bv(n);return p.useEffect((()=>{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]),p.createElement(a3,{asChild:!0},p.createElement("select",pe({},r,{ref:a,defaultValue:n})))}));function d3(e){const t=Fr(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback((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=p.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return p.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function p3(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=SV(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 SV(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}f3.displayName="BubbleSelect";const h3=ZH,m3=eV,v3=nV,CV=rV,EV=oV,g3=iV,RV=uV,y3=pV,b3=mV,w3=gV,PV=yV,TV=wV,x3=xV,_3=_V,$3=$V,OV=h3,S3=p.forwardRef((({...e},t)=>I.jsx(OV,{ref:t,...e})));S3.displayName=h3.displayName;const C3=p.forwardRef(((e,t)=>I.jsx(y3,{ref:t,...e})));C3.displayName=y3.displayName;const E3=p.forwardRef(((e,t)=>I.jsx(v3,{ref:t,...e})));E3.displayName=v3.displayName;const $$=p.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>I.jsxs("div",{className:"w-full",children:[I.jsxs(m3,{ref:i,className:le("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-1 focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...a,children:[I.jsxs("div",{className:"flex flex-1 items-center gap-xxs",children:[o&&I.jsx("span",{className:le("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),I.jsx(CV,{asChild:!0,children:I.jsx(rO,{size:20})})]}),n||r?r?I.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[I.jsx(aO,{size:16}),r]}):I.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[I.jsx(T6,{size:16}),n]}):null]})));$$.displayName="SelectTriggerWrapper";const R3=p.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>I.jsx($$,{ref:i,className:le("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));R3.displayName=m3.displayName;const P3=p.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const a=p.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(p.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 I.jsx(EV,{children:I.jsx(g3,{ref:o,className:le("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-slate-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:I.jsx(RV,{className:le("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})})})}));P3.displayName=g3.displayName;const T3=p.forwardRef((({className:e,...t},n)=>I.jsx(b3,{ref:n,className:le("text-sm font-medium text-slate-900",e),...t})));T3.displayName=b3.displayName;const O3=p.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=I.jsx(TV,{children:I.jsx(r_,{size:20})});return I.jsxs(w3,{ref:a,className:le("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&i,I.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:I.jsx(PV,{children:r})}),t&&"right"===n&&i]})}));O3.displayName=w3.displayName;const A3=p.forwardRef((({className:e,...t},n)=>I.jsx($3,{ref:n,className:le("-mx-1 my-1 h-px bg-slate-200",e),...t})));A3.displayName=$3.displayName;const AV=(e,t)=>{const n=p.useRef(null),[r,o]=p.useState(e.length);return p.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-slate-100 text-sm font-medium text-slate-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-slate-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 u=e.offsetWidth+4;if(!(i+u<=r))break;i+=u,l++}document.body.removeChild(a),o(Math.max(1,l))}),[e,t]),{containerRef:n,visibleCount:r}},NV=p.forwardRef((({className:e,selectedValues:t=[],placeholder:n,onRemoveValue:r,icon:o,caption:a,error:i,...l},u)=>{const{containerRef:s,visibleCount:c}=AV(t,r),d=t.length-c;return I.jsx($$,{ref:u,className:e,caption:a,error:i,icon:o,...l,children:I.jsx("div",{ref:s,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===t.length?I.jsx("span",{children:n||"Select options..."}):I.jsxs(WF,{children:[t.slice(0,c).map((e=>{const t="string"==typeof e?e:e.value;return I.jsx(t2,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==r?void 0:r(t)},t)})),d>0&&I.jsx(t2,{text:`+${d}`})]})})})}));NV.displayName="SelectMultiTrigger";const kV=p.forwardRef((({value:e,isSelected:t=!1,checkboxPosition:n="right",onSelect:r,className:o,children:a,...i},l)=>{const u=I.jsx(Y_,{size:"default",variant:"default",checked:t}),s=()=>{null==r||r(e)};return I.jsxs("div",{ref:l,className:le("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-slate-900 outline-none transition-colors hover:bg-slate-100","focus:bg-accent focus:text-accent-foreground",o),onClick:s,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),s())},...i,children:["left"===n&&u,I.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:a}),"right"===n&&u]})}));kV.displayName="SelectCheckboxItem";const DV=p.forwardRef((({className:e,...t},n)=>I.jsx(x3,{ref:n,className:le("flex cursor-default items-center justify-center py-xxs",e),...t,children:I.jsx(C6,{size:16})})));DV.displayName=x3.displayName;const IV=p.forwardRef((({className:e,...t},n)=>I.jsx(_3,{ref:n,className:le("flex cursor-default items-center justify-center p-xxs",e),...t,children:I.jsx(rO,{size:16})})));IV.displayName=_3.displayName;const MV=p.forwardRef((({className:e,children:t,...n},r)=>I.jsx("div",{ref:r,className:le("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));MV.displayName="SelectActions";const jV=p.forwardRef((({className:e,children:t,...n},r)=>I.jsx("div",{ref:r,className:le("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));jV.displayName="SelectFooter";const BZ=OH,N3=p.createContext({}),zZ=({...e})=>I.jsx(N3.Provider,{value:{name:e.name},children:I.jsx(qH,{...e})}),os=()=>{const e=p.useContext(N3),t=p.useContext(k3),n=Ov();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}},k3=p.createContext({}),LV=p.forwardRef((({className:e,...t},n)=>{const r=p.useId();return I.jsx(k3.Provider,{value:{id:r},children:I.jsx("div",{ref:n,className:le("mt-[8px]",e),...t})})}));LV.displayName="FormItem";const FV=p.forwardRef((({className:e,isRequired:t,...n},r)=>{var o;const{formItemId:a}=os();return I.jsx(i3,{ref:r,className:le("mb-2 text-sm font-medium",e),htmlFor:a,...n,children:t?`*${null==(o=n.children)?void 0:o.toString()}`:n.children})}));FV.displayName="FormLabel";const BV=p.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=os();return I.jsx(ns,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));BV.displayName="FormControl";const zV=p.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=os();return I.jsx("p",{ref:n,id:r,className:le("text-sm text-muted-foreground",e),...t})}));zV.displayName="FormDescription";const qV=p.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=os(),i=o?String(null==o?void 0:o.message):t;return i?I.jsxs("p",{ref:r,id:a,className:le("flex items-center gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[I.jsx(aO,{size:16,className:"text-red-dark"})," ",i]}):null}));qV.displayName="FormMessage";const WV=p.forwardRef((({...e},t)=>{const{name:n}=os();return I.jsx(S3,{ref:t,name:n,...e})}));WV.displayName="FormSelect";const UV=p.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=os();return I.jsx(R3,{ref:r,id:o,className:e,...n,children:t})}));UV.displayName="FormSelectTrigger";const HV=p.forwardRef(((e,t)=>I.jsx(P3,{ref:t,...e})));HV.displayName="FormSelectContent";const VV=p.forwardRef(((e,t)=>I.jsx(O3,{ref:t,...e})));VV.displayName="FormSelectItem";const GV=p.forwardRef(((e,t)=>I.jsx(C3,{ref:t,...e})));GV.displayName="FormSelectGroup";const KV=p.forwardRef(((e,t)=>I.jsx(T3,{ref:t,...e})));KV.displayName="FormSelectLabel";const YV=p.forwardRef(((e,t)=>I.jsx(A3,{ref:t,...e})));YV.displayName="FormSelectSeparator";const XV=p.forwardRef(((e,t)=>I.jsx(E3,{ref:t,...e})));function Co(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=[]){let n=[];const r=()=>{const t=n.map((e=>p.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return p.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=p.createContext(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,l=(null==n?void 0:n[e][a])||o,u=p.useMemo((()=>i),Object.values(i));return p.createElement(l.Provider,{value:u},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const l=(null==i?void 0:i[e][a])||o,u=p.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},QV(r,...t)]}function QV(...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 p.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function pc(e){const t=p.useRef(e);return p.useEffect((()=>{t.current=e})),p.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function ZV({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=JV({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=pc(n);return[i,p.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function JV({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),a=pc(t);return p.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function eG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function tG(...e){return t=>e.forEach((e=>eG(e,t)))}function nG(...e){return p.useCallback(tG(...e),e)}function xl(e){return e.split("-")[0]}function ep(e){return e.split("-")[1]}function hc(e){return["top","bottom"].includes(xl(e))?"x":"y"}function S$(e){return"y"===e?"height":"width"}function L2(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=hc(t),u=S$(l),s=r[u]/2-o[u]/2,c="x"===l;let d;switch(xl(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(ep(t)){case"start":d[l]-=s*(n&&c?-1:1);break;case"end":d[l]+=s*(n&&c?-1:1)}return d}XV.displayName="FormSelectValue";const rG=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 u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:c}=L2(u,r,l),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:m,fn:h}=a[n],{x:v,y:g,data:y,reset:b}=await h({x:s,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});s=v??s,c=g??c,f={...f,[m]:{...f[m],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:s,y:c}=L2(u,d,l))),n=-1)}return{x:s,y:c,placement:d,strategy:o,middlewareData:f}};function I3(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 qm(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Md(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,m=I3(p),h=l[f?"floating"===d?"reference":"floating":d],v=qm(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g=qm(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:u}):i[d]);return{top:v.top-g.top+m.top,bottom:g.bottom-v.bottom+m.bottom,left:v.left-g.left+m.left,right:g.right-v.right+m.right}}const oG=Math.min,tl=Math.max;function qx(e,t,n){return tl(e,oG(t,n))}const F2=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:a,placement:i,rects:l,platform:u}=t;if(null==n)return{};const s=I3(r),c={x:o,y:a},d=hc(i),f=ep(i),p=S$(d),m=await u.getDimensions(n),h="y"===d?"top":"left",v="y"===d?"bottom":"right",g=l.reference[p]+l.reference[d]-c[d]-l.floating[p],y=c[d]-l.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=l.floating[p]);const x=g/2-y/2,_=s[h],E=w-m[p]-s[v],S=w/2-m[p]/2+x,k=qx(_,S,E),C=("start"===f?s[h]:s[v])>0&&S!==k&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(C?S<_?_-S:E-S:0),data:{[d]:k,centerOffset:S-k}}}}),iG={left:"right",right:"left",bottom:"top",top:"bottom"};function Wm(e){return e.replace(/left|right|bottom|top/g,(e=>iG[e]))}function aG(e,t,n){void 0===n&&(n=!1);const r=ep(e),o=hc(e),a=S$(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Wm(i)),{main:i,cross:Wm(i)}}const sG={start:"end",end:"start"};function B2(e){return e.replace(/start|end/g,(e=>sG[e]))}const M3=["top","right","bottom","left"];M3.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const lG=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:u}=t,{mainAxis:s=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...m}=e,h=xl(r),v=[i,...d||(h!==i&&p?function(e){const t=Wm(e);return[B2(e),t,B2(t)]}(i):[Wm(i)])],g=await Md(t,m),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(g[h]),c){const{main:e,cross:t}=aG(r,a,await(null==l.isRTL?void 0:l.isRTL(u.floating)));y.push(g[e],g[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=v[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 z2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function q2(e){return M3.some((t=>e[t]>=0))}const uG=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=z2(await Md(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:q2(t)}}}case"escaped":{const t=z2(await Md(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:q2(t)}}}default:return{}}}}},cG=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=xl(n),l=ep(n),u="x"===hc(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function j3(e){return"x"===e?"y":"x"}const fG=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}}},...u}=e,s={x:n,y:r},c=await Md(t,u),d=hc(xl(o)),f=j3(d);let p=s[d],m=s[f];if(a){const e="y"===d?"bottom":"right";p=qx(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";m=qx(m+c["y"===f?"top":"left"],m,m-c[e])}const h=l.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},dG=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:u=!0,crossAxis:s=!0}=e,c={x:n,y:r},d=hc(o),f=j3(d);let p=c[d],m=c[f];const h="function"==typeof l?l({...a,placement:o}):l,v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===d?"height":"width",t=a.reference[d]-a.floating[e]+v.mainAxis,n=a.reference[d]+a.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(xl(o)),n=a.reference[f]-a.floating[e]+(t&&null!=(g=null==(y=i.offset)?void 0:y[f])?g:0)+(t?0:v.crossAxis),r=a.reference[f]+a.reference[e]+(t?0:null!=(b=null==(w=i.offset)?void 0:w[f])?b:0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},pG=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,u=await Md(t,l),s=xl(n),c=ep(n);let d,f;"top"===s||"bottom"===s?(d=s,f=c===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(f=s,d="end"===c?"top":"bottom");const p=tl(u.left,0),m=tl(u.right,0),h=tl(u.top,0),v=tl(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==h||0!==v?h+v:tl(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==m?p+m:tl(u.left,u.right)):u[f])},y=await o.getDimensions(a.floating);null==i||i({...t,...g});const b=await o.getDimensions(a.floating);return y.width!==b.width||y.height!==b.height?{reset:{rects:!0}}:{}}}};function L3(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function na(e){if(null==e)return window;if(!L3(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function tp(e){return na(e).getComputedStyle(e)}function Vi(e){return L3(e)?"":e?(e.nodeName||"").toLowerCase():""}function F3(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function bi(e){return e instanceof na(e).HTMLElement}function es(e){return e instanceof na(e).Element}function C$(e){return!(typeof ShadowRoot>"u")&&(e instanceof na(e).ShadowRoot||e instanceof ShadowRoot)}function Dv(e){const{overflow:t,overflowX:n,overflowY:r}=tp(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function hG(e){return["table","td","th"].includes(Vi(e))}function W2(e){const t=/firefox/i.test(F3()),n=tp(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 B3(){return!/^((?!chrome|android).)*safari/i.test(F3())}const U2=Math.min,xd=Math.max,Um=Math.round;function Gi(e,t,n){var r,o,a,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let u=1,s=1;t&&bi(e)&&(u=e.offsetWidth>0&&Um(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Um(l.height)/e.offsetHeight||1);const c=es(e)?na(e):window,d=!B3()&&n,f=(l.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(l.top+(d&&null!=(a=null==(i=c.visualViewport)?void 0:i.offsetTop)?a:0))/s,m=l.width/u,h=l.height/s;return{width:m,height:h,top:p,right:f+m,bottom:p+h,left:f,x:f,y:p}}function Ka(e){return(t=e,(t instanceof na(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Iv(e){return es(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function z3(e){return Gi(Ka(e)).left+Iv(e).scrollLeft}function mG(e,t,n){const r=bi(t),o=Ka(t),a=Gi(e,r&&function(e){const t=Gi(e);return Um(t.width)!==e.offsetWidth||Um(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"!==Vi(t)||Dv(o))&&(i=Iv(t)),bi(t)){const e=Gi(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=z3(o));return{x:a.left+i.scrollLeft-l.x,y:a.top+i.scrollTop-l.y,width:a.width,height:a.height}}function q3(e){return"html"===Vi(e)?e:e.assignedSlot||e.parentNode||(C$(e)?e.host:null)||Ka(e)}function H2(e){return bi(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Wx(e){const t=na(e);let n=H2(e);for(;n&&hG(n)&&"static"===getComputedStyle(n).position;)n=H2(n);return n&&("html"===Vi(n)||"body"===Vi(n)&&"static"===getComputedStyle(n).position&&!W2(n))?t:n||function(e){let t=q3(e);for(C$(t)&&(t=t.host);bi(t)&&!["html","body"].includes(Vi(t));){if(W2(t))return t;t=t.parentNode}return null}(e)||t}function V2(e){if(bi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Gi(e);return{width:t.width,height:t.height}}function W3(e){const t=q3(e);return["html","body","#document"].includes(Vi(t))?e.ownerDocument.body:bi(t)&&Dv(t)?t:W3(t)}function Hm(e,t){var n;void 0===t&&(t=[]);const r=W3(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=na(r),i=o?[a].concat(a.visualViewport||[],Dv(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Hm(i))}function G2(e,t,n){return"viewport"===t?qm(function(e,t){const n=na(e),r=Ka(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;const e=B3();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}(e,n)):es(t)?function(e,t){const n=Gi(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):qm(function(e){var t;const n=Ka(e),r=Iv(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=xd(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=xd(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let l=-r.scrollLeft+z3(e);const u=-r.scrollTop;return"rtl"===tp(o||n).direction&&(l+=xd(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:u}}(Ka(e)))}function vG(e){const t=Hm(e),n=["absolute","fixed"].includes(tp(e).position)&&bi(e)?Wx(e):e;return es(n)?t.filter((e=>es(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&C$(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Vi(e))):[]}const gG={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?vG(t):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=G2(t,n,o);return e.top=xd(r.top,e.top),e.right=U2(r.right,e.right),e.bottom=U2(r.bottom,e.bottom),e.left=xd(r.left,e.left),e}),G2(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=bi(n),a=Ka(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Vi(n)||Dv(a))&&(i=Iv(n)),bi(n))){const e=Gi(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:es,getDimensions:V2,getOffsetParent:Wx,getDocumentElement:Ka,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:mG(t,Wx(n),r),floating:{...V2(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===tp(e).direction};function yG(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=!0,animationFrame:l=!1}=r,u=o&&!l,s=a&&!l,c=u||s?[...es(e)?Hm(e):[],...Hm(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));let d,f=null;if(i){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),es(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Gi(e):null;return l&&function t(){const r=Gi(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=>{u&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const bG=(e,t,n)=>rG(e,t,{platform:gG,...n});var Ux=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Hx(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(!Hx(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||Hx(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function wG(e){const t=p.useRef(e);return Ux((()=>{t.current=e})),t}function xG(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const a=p.useRef(null),i=p.useRef(null),l=wG(o),u=p.useRef(null),[s,c]=p.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=p.useState(t);Hx(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 m=p.useCallback((()=>{!a.current||!i.current||bG(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&wi.flushSync((()=>{c(e)}))}))}),[d,n,r]);Ux((()=>{h.current&&m()}),[m]);const h=p.useRef(!1);Ux((()=>(h.current=!0,()=>{h.current=!1})),[]);const v=p.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),a.current&&i.current)if(l.current){const e=l.current(a.current,i.current,m);u.current=e}else m()}),[m,l]),g=p.useCallback((e=>{a.current=e,v()}),[v]),y=p.useCallback((e=>{i.current=e,v()}),[v]),b=p.useMemo((()=>({reference:a,floating:i})),[]);return p.useMemo((()=>({...s,update:m,refs:b,reference:g,floating:y})),[s,m,b,g,y])}const _G=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?F2({element:t.current,padding:n}).fn(e):{}:t?F2({element:t,padding:n}).fn(e):{}}};function $G(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function SG(...e){return t=>e.forEach((e=>$G(e,t)))}const U3=p.forwardRef(((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),a=o.find(EG);if(a){const e=a.props.children,n=o.map((t=>t===a?p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null:t));return p.createElement(Vx,pe({},r,{ref:t}),p.isValidElement(e)?p.cloneElement(e,void 0,n):null)}return p.createElement(Vx,pe({},r,{ref:t}),n)}));U3.displayName="Slot";const Vx=p.forwardRef(((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...RG(r,n.props),ref:SG(t,n.ref)}):p.Children.count(n)>1?p.Children.only(null):null}));Vx.displayName="SlotClone";const CG=({children:e})=>p.createElement(p.Fragment,null,e);function EG(e){return p.isValidElement(e)&&e.type===CG}function RG(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 PG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Zu=PG.reduce(((e,t)=>{const n=p.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?U3:t;return p.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),p.createElement(a,pe({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function TG(e,t){e&&wi.flushSync((()=>e.dispatchEvent(t)))}function OG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function AG(...e){return t=>e.forEach((e=>OG(e,t)))}function H3(...e){return p.useCallback(AG(...e),e)}const il=null!=globalThis&&globalThis.document?p.useLayoutEffect:()=>{};function NG(e){const[t,n]=p.useState(void 0);return il((()=>{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 V3="Popper",[E$,G3]=D3(V3),[kG,K3]=E$(V3),DG=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement(kG,{scope:t,anchor:r,onAnchorChange:o},n)},IG="PopperAnchor",MG=p.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=K3(IG,n),i=p.useRef(null),l=H3(t,i);return p.useEffect((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:p.createElement(Zu.div,pe({},o,{ref:l}))})),Vm="PopperContent",[jG,qZ]=E$(Vm),[LG,FG]=E$(Vm,{hasParent:!1,positionUpdateFns:new Set}),BG=p.forwardRef(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:m="center",alignOffset:h=0,arrowPadding:v=0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,avoidCollisions:x=!0,onPlaced:_,...E}=e,S=K3(Vm,c),[k,C]=p.useState(null),N=H3(t,(e=>C(e))),[O,R]=p.useState(null),P=NG(O),j=null!==(n=null==P?void 0:P.width)&&void 0!==n?n:0,T=null!==(r=null==P?void 0:P.height)&&void 0!==r?r:0,D=d+("center"!==m?"-"+m:""),I="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},A=Array.isArray(g)?g:[g],L=A.length>0,M={padding:I,boundary:A.filter(qG),altBoundary:L},{reference:z,floating:F,strategy:B,x:$,y:W,placement:U,middlewareData:H,update:V}=xG({strategy:"fixed",placement:D,whileElementsMounted:yG,middleware:[WG(),cG({mainAxis:f+T,alignmentAxis:h}),x?fG({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?dG():void 0,...M}):void 0,O?_G({element:O,padding:v}):void 0,x?lG({...M}):void 0,pG({...M,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`)}}),UG({arrowWidth:j,arrowHeight:T}),w?uG({strategy:"referenceHidden"}):void 0].filter(zG)});il((()=>{z(S.anchor)}),[z,S.anchor]);const q=null!==$&&null!==W,[K,G]=Y3(U),X=pc(_);il((()=>{q&&(null==X||X())}),[q,X]);const Q=null===(o=H.arrow)||void 0===o?void 0:o.x,Y=null===(a=H.arrow)||void 0===a?void 0:a.y,Z=0!==(null===(i=H.arrow)||void 0===i?void 0:i.centerOffset),[J,ee]=p.useState();il((()=>{k&&ee(window.getComputedStyle(k).zIndex)}),[k]);const{hasParent:te,positionUpdateFns:ne}=FG(Vm,c),re=!te;p.useLayoutEffect((()=>{if(!re)return ne.add(V),()=>{ne.delete(V)}}),[re,ne,V]),il((()=>{re&&q&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,q,ne]);const oe={"data-side":K,"data-align":G,...E,ref:N,style:{...E.style,animation:q?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return p.createElement("div",{ref:F,"data-radix-popper-content-wrapper":"",style:{position:B,left:0,top:0,transform:q?`translate3d(${Math.round($)}px, ${Math.round(W)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(u=H.transformOrigin)||void 0===u?void 0:u.x,null===(s=H.transformOrigin)||void 0===s?void 0:s.y].join(" ")},dir:e.dir},p.createElement(jG,{scope:c,placedSide:K,onArrowChange:R,arrowX:Q,arrowY:Y,shouldHideArrow:Z},re?p.createElement(LG,{scope:c,hasParent:!0,positionUpdateFns:ne},p.createElement(Zu.div,oe)):p.createElement(Zu.div,oe)))}));function zG(e){return void 0!==e}function qG(e){return null!==e}const WG=()=>({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`),{}}}),UG=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,a,i;const{placement:l,rects:u,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=Y3(l),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(a=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==a?a:0)+f/2;let y="",b="";return"bottom"===p?(y=c?h:`${v}px`,b=-f+"px"):"top"===p?(y=c?h:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?h:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?h:`${g}px`),{data:{x:y,y:b}}}});function Y3(e){const[t,n="center"]=e.split("-");return[t,n]}const HG=DG,VG=MG,GG=BG,KG=p.forwardRef(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?s_.createPortal(p.createElement(Zu.div,pe({},o,{ref:t})),r):null}));function YG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function XG(...e){return t=>e.forEach((e=>YG(e,t)))}function QG(...e){return p.useCallback(XG(...e),e)}function ZG(e,t){return p.useReducer(((e,n)=>t[e][n]??e),e)}const R$=e=>{const{present:t,children:n}=e,r=JG(t),o="function"==typeof n?n({present:r.isPresent}):p.Children.only(n),a=QG(r.ref,o.ref);return"function"==typeof n||r.isPresent?p.cloneElement(o,{ref:a}):null};function JG(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),a=p.useRef("none"),i=e?"mounted":"unmounted",[l,u]=ZG(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect((()=>{const e=ym(r.current);a.current="mounted"===l?e:"none"}),[l]),il((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=ym(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),il((()=>{if(t){const e=e=>{const n=ym(r.current).includes(e.animationName);e.target===t&&n&&wi.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=ym(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)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function ym(e){return(null==e?void 0:e.animationName)||"none"}function eK(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function tK(...e){return t=>e.forEach((e=>eK(e,t)))}function nK(...e){return p.useCallback(tK(...e),e)}function rK(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e);p.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}R$.displayName="Presence";const Gx="dismissableLayer.update",oK="dismissableLayer.pointerDownOutside",iK="dismissableLayer.focusOutside";let K2;const aK=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sK=p.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...s}=e,c=p.useContext(aK),[d,f]=p.useState(null),m=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=p.useState({}),v=nK(t,(e=>f(e))),g=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),w=d?g.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,E=lK((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!_||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),m),S=uK((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==l||l(e),e.defaultPrevented||null==u||u())}),m);return rK((e=>{w===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),m),p.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(K2=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Y2(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=K2)}}),[d,m,r,c]),p.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Y2())}),[d,c]),p.useEffect((()=>{const e=()=>h({});return document.addEventListener(Gx,e),()=>document.removeEventListener(Gx,e)}),[]),p.createElement(Zu.div,pe({},s,{ref:v,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:Co(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Co(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Co(e.onPointerDownCapture,E.onPointerDownCapture)}))}));function lK(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=p.useRef(!1),o=p.useRef((()=>{}));return p.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){X3(oK,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 uK(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=p.useRef(!1);return p.useEffect((()=>{const e=e=>{e.target&&!r.current&&X3(iK,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 Y2(){const e=new CustomEvent(Gx);document.dispatchEvent(e)}function X3(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?TG(o,a):o.dispatchEvent(a)}let vw;const Q3="HoverCard",[Z3,WZ]=D3(Q3,[G3]),P$=G3(),[cK,Mv]=Z3(Q3),fK=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,u=P$(t),s=p.useRef(0),c=p.useRef(0),d=p.useRef(!1),f=p.useRef(!1),[m=!1,h]=ZV({prop:r,defaultProp:o,onChange:a}),v=p.useCallback((()=>{clearTimeout(c.current),s.current=window.setTimeout((()=>h(!0)),i)}),[i,h]),g=p.useCallback((()=>{clearTimeout(s.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>h(!1)),l))}),[l,h]),y=p.useCallback((()=>h(!1)),[h]);return p.useEffect((()=>()=>{clearTimeout(s.current),clearTimeout(c.current)}),[]),p.createElement(cK,{scope:t,open:m,onOpenChange:h,onOpen:v,onClose:g,onDismiss:y,hasSelectionRef:d,isPointerDownOnContentRef:f},p.createElement(HG,u,n))},dK="HoverCardTrigger",pK=p.forwardRef(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Mv(dK,n),a=P$(n);return p.createElement(VG,pe({asChild:!0},a),p.createElement(Zu.a,pe({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:Co(e.onPointerEnter,Gm(o.onOpen)),onPointerLeave:Co(e.onPointerLeave,Gm(o.onClose)),onFocus:Co(e.onFocus,o.onOpen),onBlur:Co(e.onBlur,o.onClose),onTouchStart:Co(e.onTouchStart,(e=>e.preventDefault()))})))})),J3="HoverCardPortal",[hK,mK]=Z3(J3,{forceMount:void 0}),vK=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Mv(J3,t);return p.createElement(hK,{scope:t,forceMount:n},p.createElement(R$,{present:n||a.open},p.createElement(KG,{asChild:!0,container:o},r)))},Kx="HoverCardContent",gK=p.forwardRef(((e,t)=>{const n=mK(Kx,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Mv(Kx,e.__scopeHoverCard);return p.createElement(R$,{present:r||a.open},p.createElement(yK,pe({"data-state":a.open?"open":"closed"},o,{onPointerEnter:Co(e.onPointerEnter,Gm(a.onOpen)),onPointerLeave:Co(e.onPointerLeave,Gm(a.onClose)),ref:t})))})),yK=p.forwardRef(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...l}=e,u=Mv(Kx,n),s=P$(n),c=p.useRef(null),d=nG(t,c),[f,m]=p.useState(!1);return p.useEffect((()=>{if(f){const e=document.body;return vw=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=vw,e.style.webkitUserSelect=vw}}}),[f]),p.useEffect((()=>{if(c.current){const e=()=>{m(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),p.useEffect((()=>{c.current&&bK(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),p.createElement(sK,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Co(a,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},p.createElement(GG,pe({},s,l,{onPointerDown:Co(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&m(!0),u.hasSelectionRef.current=!1,u.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 Gm(e){return t=>"touch"===t.pointerType?void 0:e()}function bK(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 wK=fK,xK=pK,_K=vK,eD=gK,UZ=wK,HZ=xK,VZ=_K,$K=p.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>I.jsx(eD,{ref:o,align:t,sideOffset:n,className:le("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})));$K.displayName=eD.displayName;const tD=p.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=os();return I.jsx("input",{type:t,className:le("flex w-full rounded-m px-4 py-3.5 text-base text-slate-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-muted-foreground placeholder:text-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));tD.displayName="Input";const nD="Radio",[SK,rD]=br(nD),[CK,EK]=SK(nD),RK=p.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,...s}=e,[c,d]=p.useState(null),f=_t(t,(e=>d(e))),m=p.useRef(!1),h=!c||!!c.closest("form");return p.createElement(CK,{scope:n,checked:o,disabled:i},p.createElement(et.button,pe({type:"button",role:"radio","aria-checked":o,"data-state":oD(o),"data-disabled":i?"":void 0,disabled:i,value:l},s,{ref:f,onClick:Be(e.onClick,(e=>{o||null==u||u(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&p.createElement(OK,{control:c,bubbles:!m.current,name:r,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),PK="RadioIndicator",TK=p.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=EK(PK,n);return p.createElement(Ro,{present:r||a.checked},p.createElement(et.span,pe({"data-state":oD(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),OK=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=p.useRef(null),i=bv(n),l=wv(t);return p.useEffect((()=>{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]),p.createElement("input",pe({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 oD(e){return e?"checked":"unchecked"}const AK=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],iD="RadioGroup",[NK,GZ]=br(iD,[cc,rD]),aD=cc(),sD=rD(),[kK,DK]=NK(iD),IK=p.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:u,dir:s,loop:c=!0,onValueChange:d,...f}=e,m=aD(n),h=Qd(s),[v,g]=Wo({prop:a,defaultProp:o,onChange:d});return p.createElement(kK,{scope:n,name:r,required:i,disabled:l,value:v,onValueChange:g},p.createElement(p$,pe({asChild:!0},m,{orientation:u,dir:h,loop:c}),p.createElement(et.div,pe({role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h},f,{ref:t}))))})),MK="RadioGroupItem",jK=p.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=DK(MK,n),i=a.disabled||r,l=aD(n),u=sD(n),s=p.useRef(null),c=_t(t,s),d=a.value===o.value,f=p.useRef(!1);return p.useEffect((()=>{const e=e=>{AK.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)}}),[]),p.createElement(h$,pe({asChild:!0},l,{focusable:!i,active:d}),p.createElement(RK,pe({disabled:i,required:a.required,checked:d},u,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:Be((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Be(o.onFocus,(()=>{var e;f.current&&(null===(e=s.current)||void 0===e||e.click())}))})))})),LK=p.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=sD(n);return p.createElement(TK,pe({},o,r,{ref:t}))})),lD=IK,uD=jK,FK=LK,BK=p.forwardRef((({className:e,...t},n)=>I.jsx(lD,{className:le("grid gap-2",e),...t,ref:n})));BK.displayName=lD.displayName;const zK=p.forwardRef((({className:e,...t},n)=>I.jsx(uD,{ref:n,className:le("aspect-square size-6 rounded-full border border-slate-300 disabled:cursor-not-allowed disabled:border-slate-100 disabled:bg-slate-100 data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 md:hover:border-2",e),...t,children:I.jsx(FK,{className:"flex items-center justify-center",children:I.jsx(R6,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));zK.displayName=uD.displayName;const qK=rv,KZ=m_,YZ=oc,WK=ov,cD=p.forwardRef((({className:e,...t},n)=>I.jsx(nc,{className:le("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})));cD.displayName=nc.displayName;const UK=Qi("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"}}),fD=p.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>I.jsxs(WK,{children:[I.jsx(cD,{className:le("bg-slate-900/70",n)}),I.jsxs(rc,{ref:a,className:le(UK({side:e}),t),...o,children:[r,I.jsxs(oc,{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:[I.jsx(o_,{className:"h-4 w-4"}),I.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));fD.displayName=rc.displayName;const dD=({className:e,...t})=>I.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});dD.displayName="SheetHeader";const HK=({className:e,...t})=>I.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});HK.displayName="SheetFooter";const pD=p.forwardRef((({className:e,...t},n)=>I.jsx(qd,{ref:n,className:le("text-lg font-semibold text-foreground",e),...t})));pD.displayName=qd.displayName;const hD=p.forwardRef((({className:e,...t},n)=>I.jsx(Wd,{ref:n,className:le("text-sm text-muted-foreground",e),...t})));hD.displayName=Wd.displayName;const[jv,XZ]=br("Tooltip",[uc]),T$=uc(),VK="TooltipProvider",GK=700,Yx="tooltip.open",[KK,O$]=jv(VK),mD=e=>{const{__scopeTooltip:t,delayDuration:n=GK,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,l]=p.useState(!0),u=p.useRef(!1),s=p.useRef(0);return p.useEffect((()=>{const e=s.current;return()=>window.clearTimeout(e)}),[]),p.createElement(KK,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:p.useCallback((()=>{window.clearTimeout(s.current),l(!1)}),[]),onClose:p.useCallback((()=>{window.clearTimeout(s.current),s.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:p.useCallback((e=>{u.current=e}),[]),disableHoverableContent:o},a)},A$="Tooltip",[YK,Lv]=jv(A$),vD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=O$(A$,e.__scopeTooltip),s=T$(t),[c,d]=p.useState(null),f=to(),m=p.useRef(0),h=i??u.disableHoverableContent,v=l??u.delayDuration,g=p.useRef(!1),[y=!1,b]=Wo({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Yx))):u.onClose(),null==a||a(e)}}),w=p.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=p.useCallback((()=>{window.clearTimeout(m.current),g.current=!1,b(!0)}),[b]),_=p.useCallback((()=>{window.clearTimeout(m.current),b(!1)}),[b]),E=p.useCallback((()=>{window.clearTimeout(m.current),m.current=window.setTimeout((()=>{g.current=!0,b(!0)}),v)}),[v,b]);return p.useEffect((()=>()=>window.clearTimeout(m.current)),[]),p.createElement(Rv,s,p.createElement(YK,{scope:t,contentId:f,open:y,stateAttribute:w,trigger:c,onTriggerChange:d,onTriggerEnter:p.useCallback((()=>{u.isOpenDelayed?E():x()}),[u.isOpenDelayed,E,x]),onTriggerLeave:p.useCallback((()=>{h?_():window.clearTimeout(m.current)}),[_,h]),onOpen:x,onClose:_,disableHoverableContent:h},n))},X2="TooltipTrigger",gD=p.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Lv(X2,n),a=O$(X2,n),i=T$(n),l=_t(t,p.useRef(null),o.onTriggerChange),u=p.useRef(!1),s=p.useRef(!1),c=p.useCallback((()=>u.current=!1),[]);return p.useEffect((()=>()=>document.removeEventListener("pointerup",c)),[c]),p.createElement(c$,pe({asChild:!0},i),p.createElement(et.button,pe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:Be(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!s.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)})),onPointerLeave:Be(e.onPointerLeave,(()=>{o.onTriggerLeave(),s.current=!1})),onPointerDown:Be(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:Be(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:Be(e.onBlur,o.onClose),onClick:Be(e.onClick,o.onClose)})))})),XK="TooltipPortal",[QZ,QK]=jv(XK,{forceMount:void 0}),jd="TooltipContent",yD=p.forwardRef(((e,t)=>{const n=QK(jd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Lv(jd,e.__scopeTooltip);return p.createElement(Ro,{present:r||i.open},i.disableHoverableContent?p.createElement(bD,pe({side:o},a,{ref:t})):p.createElement(ZK,pe({side:o},a,{ref:t})))})),ZK=p.forwardRef(((e,t)=>{const n=Lv(jd,e.__scopeTooltip),r=O$(jd,e.__scopeTooltip),o=p.useRef(null),a=_t(t,o),[i,l]=p.useState(null),{trigger:u,onClose:s}=n,c=o.current,{onPointerInTransitChange:d}=r,f=p.useCallback((()=>{l(null),d(!1)}),[d]),m=p.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=oY([...tY(r,eY(r,n.getBoundingClientRect())),...nY(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return p.useEffect((()=>()=>f()),[f]),p.useEffect((()=>{if(u&&c){const e=e=>m(e,c),t=e=>m(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,m,f]),p.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!rY(n,i);r?f():o&&(f(),s())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,i,s,f]),p.createElement(bD,pe({},e,{ref:a}))})),[JK,ZZ]=jv(A$,{isInside:!1}),bD=p.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=Lv(jd,n),s=T$(n),{onClose:c}=u;return p.useEffect((()=>(document.addEventListener(Yx,c),()=>document.removeEventListener(Yx,c))),[c]),p.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),p.createElement(Jm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},p.createElement(f$,pe({"data-state":u.stateAttribute},s,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)"}}),p.createElement(l_,null,r),p.createElement(JK,{scope:n,isInside:!0},p.createElement(HH,{id:u.contentId,role:"tooltip"},o||r))))}));function eY(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 tY(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 nY(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 rY(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,u=t[a].x,s=t[a].y;l>r!=s>r&&n<(u-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function oY(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)),iY(t)}function iY(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 aY=mD,sY=vD,lY=gD,wD=yD;function uY(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)}function cY(e){return uY(e)&&"type"in e&&"string"==typeof e.type}var xD=Symbol.for("immer-nothing"),Q2=Symbol.for("immer-draftable"),oo=Symbol.for("immer-state");function Bo(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ju=Object.getPrototypeOf;function ts(e){return!!e&&!!e[oo]}function Xi(e){var t;return!!e&&(_D(e)||Array.isArray(e)||!!e[Q2]||!(null==(t=e.constructor)||!t[Q2])||Bv(e)||zv(e))}var fY=Object.prototype.constructor.toString();function _D(e){if(!e||"object"!=typeof e)return!1;const t=Ju(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===fY}function Ld(e,t){0===Fv(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function Fv(e){const t=e[oo];return t?t.type_:Array.isArray(e)?1:Bv(e)?2:zv(e)?3:0}function Xx(e,t){return 2===Fv(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $D(e,t,n){const r=Fv(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function dY(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Bv(e){return e instanceof Map}function zv(e){return e instanceof Set}function nl(e){return e.copy_||e.base_}function Qx(e,t){if(Bv(e))return new Map(e);if(zv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&_D(e))return Ju(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[oo];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],a=n[o];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(Ju(e),n)}function N$(e,t=!1){return qv(e)||ts(e)||!Xi(e)||(Fv(e)>1&&(e.set=e.add=e.clear=e.delete=pY),Object.freeze(e),t&&Ld(e,((e,t)=>N$(t,!0)))),e}function pY(){Bo(2)}function qv(e){return Object.isFrozen(e)}var Fd,hY={};function hl(e){const t=hY[e];return t||Bo(0,e),t}function SD(){return Fd}function mY(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Z2(e,t){t&&(hl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zx(e){Jx(e),e.drafts_.forEach(vY),e.drafts_=null}function Jx(e){e===Fd&&(Fd=e.parent_)}function J2(e){return Fd=mY(Fd,e)}function vY(e){const t=e[oo];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function eT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[oo].modified_&&(Zx(t),Bo(4)),Xi(e)&&(e=Km(t,e),t.parent_||Ym(t,e)),t.patches_&&hl("Patches").generateReplacementPatches_(n[oo].base_,e,t.patches_,t.inversePatches_)):e=Km(t,n,[]),Zx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xD?e:void 0}function Km(e,t,n){if(qv(t))return t;const r=t[oo];if(!r)return Ld(t,((o,a)=>tT(e,r,t,o,a,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Ym(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,a=!1;3===r.type_&&(o=new Set(t),t.clear(),a=!0),Ld(o,((o,i)=>tT(e,r,t,o,i,n,a))),Ym(e,t,!1),n&&e.patches_&&hl("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function tT(e,t,n,r,o,a,i){if(ts(o)){const i=Km(e,o,a&&t&&3!==t.type_&&!Xx(t.assigned_,r)?a.concat(r):void 0);if($D(n,r,i),!ts(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(Xi(o)&&!qv(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Km(e,o),(!t||!t.scope_.parent_)&&Ym(e,o)}}function Ym(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&N$(t,n)}function gY(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:SD(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=k$;n&&(o=[r],a=Bd);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=i,l}var k$={get(e,t){if(t===oo)return e;const n=nl(e);if(!Xx(n,t))return yY(e,n,t);const r=n[t];return e.finalized_||!Xi(r)?r:r===gw(e.base_,t)?(yw(e),e.copy_[t]=t_(r,e)):r},has:(e,t)=>t in nl(e),ownKeys:e=>Reflect.ownKeys(nl(e)),set(e,t,n){const r=CD(nl(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=gw(nl(e),t),o=null==r?void 0:r[oo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(dY(n,r)&&(void 0!==n||Xx(e.base_,t)))return!0;yw(e),e_(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==gw(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,yw(e),e_(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=nl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){Bo(11)},getPrototypeOf:e=>Ju(e.base_),setPrototypeOf(){Bo(12)}},Bd={};function gw(e,t){const n=e[oo];return(n?nl(n):e)[t]}function yY(e,t,n){var r;const o=CD(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function CD(e,t){if(!(t in e))return;let n=Ju(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ju(n)}}function e_(e){e.modified_||(e.modified_=!0,e.parent_&&e_(e.parent_))}function yw(e){e.copy_||(e.copy_=Qx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Ld(k$,((e,t)=>{Bd[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Bd.deleteProperty=function(e,t){return Bd.set.call(this,e,t,void 0)},Bd.set=function(e,t,n){return k$.set.call(this,e[0],t,n,e[0])};var bY=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&Bo(6),void 0!==n&&"function"!=typeof n&&Bo(7),Xi(e)){const o=J2(this),a=t_(e,void 0);let i=!0;try{r=t(a),i=!1}finally{i?Zx(o):Jx(o)}return Z2(o,n),eT(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===xD&&(r=void 0),this.autoFreeze_&&N$(r,!0),n){const t=[],o=[];hl("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Bo(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Xi(e)||Bo(8),ts(e)&&(e=ED(e));const t=J2(this),n=t_(e,void 0);return n[oo].isManual_=!0,Jx(t),n}finishDraft(e,t){const n=e&&e[oo];(!n||!n.isManual_)&&Bo(9);const{scope_:r}=n;return Z2(r,t),eT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=hl("Patches").applyPatches_;return ts(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function t_(e,t){const n=Bv(e)?hl("MapSet").proxyMap_(e,t):zv(e)?hl("MapSet").proxySet_(e,t):gY(e,t);return(t?t.scope_:SD()).drafts_.push(n),n}function ED(e){return ts(e)||Bo(10,e),RD(e)}function RD(e){if(!Xi(e)||qv(e))return e;const t=e[oo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Qx(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Qx(e,!0);return Ld(n,((e,t)=>{$D(n,e,RD(t))})),t&&(t.finalized_=!1),n}var io=new bY,PD=io.produce;function wY(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function xY(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function _Y(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}io.produceWithPatches.bind(io),io.setAutoFreeze.bind(io),io.setUseStrictShallowCopy.bind(io),io.applyPatches.bind(io),io.createDraft.bind(io),io.finishDraft.bind(io);var nT=e=>Array.isArray(e)?e:[e];function $Y(e){const t=Array.isArray(e[0])?e[0]:e;return _Y(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function SY(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var CY=class{constructor(e){this.value=e}deref(){return this.value}},EY=typeof WeakRef<"u"?WeakRef:CY,RY=0,rT=1;function bm(){return{s:RY,v:void 0,o:null,p:null}}function D$(e,t={}){let n=bm();const{resultEqualityCheck:r}=t;let o,a=0;function i(){var t;let i=n;const{length:l}=arguments;for(let e=0,t=l;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=i.o;null===e&&(i.o=e=new WeakMap);const n=e.get(t);void 0===n?(i=bm(),e.set(t,i)):i=n}else{let e=i.p;null===e&&(i.p=e=new Map);const n=e.get(t);void 0===n?(i=bm(),e.set(t,i)):i=n}}const u=i;let s;if(i.s===rT?s=i.v:(s=e.apply(null,arguments),a++),u.s=rT,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,s)&&(s=e,0!==a&&a--),o="object"==typeof s&&null!==s||"function"==typeof s?new EY(s):s}return u.v=s,s}return i.clearCache=()=>{n=bm(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function TD(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,a={},i=e.pop();"object"==typeof i&&(a=i,i=e.pop()),wY(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const l={...n,...a},{memoize:u,memoizeOptions:s=[],argsMemoize:c=D$,argsMemoizeOptions:d=[],devModeChecks:f={}}=l,p=nT(s),m=nT(d),h=$Y(e),v=u((function(){return r++,i.apply(null,arguments)}),...p),g=c((function(){o++;const e=SY(h,arguments);return t=v.apply(null,e),t}),...m);return Object.assign(g,{resultFunc:i,memoizedResultFunc:v,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var PY=TD(D$),TY=Object.assign(((e,t=PY)=>{xY(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>TY}),OY=(...e)=>{const t=TD(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(ts(e)?ED(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};function ec(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(ro(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>cY(t)&&t.type===e,n}function oT(e){return Xi(e)?PD(e,(()=>{})):e}function iT(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error(ro(10));const r=n.insert(t,e);return e.set(t,r),r}function OD(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(ro(28));if(r in t)throw new Error(ro(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function AY(e){return"function"==typeof e}function NY(e,t){let n,[r,o,a]=OD(t);if(AY(e))n=()=>oT(e());else{const t=oT(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[a]),i.reduce(((e,n)=>{if(n){if(ts(e)){const r=n(e,t);return void 0===r?e:r}if(Xi(e))return PD(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(ro(9))}return r}}return e}),e)}return i.getInitialState=n,i}OY(D$);var kY="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",DY=(e=21)=>{let t="",n=e;for(;n--;)t+=kY[64*Math.random()|0];return t},IY=Symbol.for("rtk-slice-createasyncthunk");function MY(e,t){return`${e}/${t}`}function jY({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[IY];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(ro(11));const o=("function"==typeof e.reducers?e.reducers(BY()):e.reducers)||{},a=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(ro(12));if(n in i.sliceCaseReducersByType)throw new Error(ro(13));return i.sliceCaseReducersByType[n]=t,l},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),l),exposeAction:(e,t)=>(i.actionCreators[e]=t,l),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,l)};function u(){const[t={},n=[],r]="function"==typeof e.extraReducers?OD(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return NY(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}a.forEach((r=>{const a=o[r],i={reducerName:r,type:MY(t,r),createNotation:"function"==typeof e.reducers};qY(a)?UY(i,a,l,n):zY(i,a,l)}));const s=e=>e,c=new Map;let d;function f(e,t){return d||(d=u()),d(e,t)}function p(){return d||(d=u()),d.getInitialState()}function m(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function o(t=s){const r=iT(c,n,{insert:()=>new WeakMap});return iT(r,t,{insert:()=>{const r={};for(const[o,a]of Object.entries(e.selectors??{}))r[o]=LY(a,t,p,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const h={name:t,reducer:f,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:p,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},n),{...h,...m(o,!0)}}};return h}}function LY(e,t,n,r){function o(o,...a){let i=t(o);return typeof i>"u"&&r&&(i=n()),e(i,...a)}return o.unwrapped=e,o}var FY=jY();function BY(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function zY({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!WY(r))throw new Error(ro(17));a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?ec(e,i):ec(e))}function qY(e){return"asyncThunk"===e._reducerDefinitionType}function WY(e){return"reducerWithPrepare"===e._reducerDefinitionType}function UY({type:e,reducerName:t},n,r,o){if(!o)throw new Error(ro(18));const{payloadCreator:a,fulfilled:i,pending:l,rejected:u,settled:s,options:c}=n,d=o(e,a,c);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),l&&r.addCase(d.pending,l),u&&r.addCase(d.rejected,u),s&&r.addMatcher(d.settled,s),r.exposeCaseReducer(t,{fulfilled:i||wm,pending:l||wm,rejected:u||wm,settled:s||wm})}function wm(){}var HY=(e,t)=>{if("function"!=typeof e)throw new Error(ro(32))},I$="listenerMiddleware",VY=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:a}=e;if(t)o=ec(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(ro(21));return HY(a),{predicate:o,type:t,effect:a}},GY=Object.assign((e=>{const{type:t,predicate:n,effect:r}=VY(e);return{id:DY(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ro(22))}}}),{withTypes:()=>GY}),KY=Object.assign(ec(`${I$}/add`),{withTypes:()=>KY});ec(`${I$}/removeAll`);var YY=Object.assign(ec(`${I$}/remove`),{withTypes:()=>YY});function ro(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const AD=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},XY={deviceType:AD()},np=FY({name:"ui",initialState:XY,reducers:{setDeviceType:(e,{payload:t})=>{e.deviceType=t}},selectors:{selectDeviceType:e=>e.deviceType,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var bw,aT,ww,sT,xw,lT,_w,uT,$w,cT,Sw,fT,Cw,dT,Ew,pT,Rw,hT,Pw,mT,Tw,vT,Ow,gT,Aw,yT,Nw,bT,kw,wT,Dw,xT,Iw,_T,Mw,$T,jw,ST,Lw,CT,Fw,ET,Bw,RT,zw,PT,qw,TT,Ww,OT,Uw,AT,Hw,NT,Vw,kT,Gw,DT,Kw,IT,Yw,MT,Xw,jT,Qw,LT,Zw,FT,Jw,BT,ex,zT,tx,qT,nx,WT,rx,UT,ox,HT,ix,VT;function ND(){if(aT)return bw;aT=1;var e=IA(),t=e&&new e;return bw=t}function kD(){if(sT)return ww;sT=1;var e=Yd(),t=ND();return ww=t?function(e,n){return t.set(e,n),e}:e}function Wv(){if(lT)return xw;lT=1;var e=yv(),t=Po();return xw=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}},xw}function QY(){if(uT)return _w;uT=1;var e=Wv(),t=xr();return _w=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)}},_w}function DD(){if(cT)return $w;cT=1;var e=Math.max;return $w=function(t,n,r,o){for(var a=-1,i=t.length,l=r.length,u=-1,s=n.length,c=e(i-l,0),d=Array(s+c),f=!o;++u<s;)d[u]=n[u];for(;++a<l;)(f||a<i)&&(d[r[a]]=t[a]);for(;c--;)d[u++]=t[a++];return d}}function ID(){if(fT)return Sw;fT=1;var e=Math.max;return Sw=function(t,n,r,o){for(var a=-1,i=t.length,l=-1,u=r.length,s=-1,c=n.length,d=e(i-u,0),f=Array(d+c),p=!o;++a<d;)f[a]=t[a];for(var m=a;++s<c;)f[m+s]=n[s];for(;++l<u;)(p||a<i)&&(f[m+r[l]]=t[a++]);return f}}function ZY(){if(dT)return Cw;return dT=1,Cw=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function M$(){if(pT)return Ew;return pT=1,Ew=function(){}}function j$(){if(hT)return Rw;hT=1;var e=yv(),t=M$();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,Rw=n}function MD(){if(mT)return Pw;mT=1;var e=ND(),t=BA();return Pw=e?function(t){return e.get(t)}:t}function JY(){if(vT)return Tw;vT=1;return Tw={}}function eX(){if(gT)return Ow;gT=1;var e=JY(),t=Object.prototype.hasOwnProperty;return Ow=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 jD(){if(yT)return Aw;yT=1;var e=yv(),t=M$();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,Aw=n}function tX(){if(bT)return Nw;bT=1;var e=j$(),t=jD(),n=gv();return Nw=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 nX(){if(wT)return kw;wT=1;var e=j$(),t=jD(),n=M$(),r=wr(),o=lo(),a=tX(),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,kw=l}function rX(){if(xT)return Dw;xT=1;var e=j$(),t=MD(),n=eX(),r=nX();return Dw=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 LD(){if(_T)return Iw;_T=1;var e=kD(),t=GA()(e);return Iw=t}function oX(){if($T)return Mw;$T=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return Mw=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function iX(){if(ST)return jw;ST=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return jw=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 aX(){if(CT)return Lw;CT=1;var e=V_(),t=FA(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return Lw=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function FD(){if(ET)return Fw;ET=1;var e=oX(),t=iX(),n=q_(),r=aX();return Fw=function(o,a,i){var l=a+"";return n(o,t(l,r(e(l),i)))}}function BD(){if(RT)return Bw;RT=1;var e=rX(),t=LD(),n=FD();return Bw=function(r,o,a,i,l,u,s,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var m=[r,o,l,p?u:void 0,p?s:void 0,p?void 0:u,p?void 0:s,c,d,f],h=a.apply(void 0,m);return e(r)&&t(h,m),h.placeholder=i,n(h,r,o)}}function zD(){if(PT)return zw;return PT=1,zw=function(e){return e.placeholder}}function sX(){if(TT)return qw;TT=1;var e=gv(),t=pv(),n=Math.min;return qw=function(r,o){for(var a=r.length,i=n(o.length,a),l=e(r);i--;){var u=o[i];r[i]=t(u,a)?l[u]:void 0}return r}}function L$(){if(OT)return Ww;OT=1;var e="__lodash_placeholder__";return Ww=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 qD(){if(AT)return Uw;AT=1;var e=DD(),t=ID(),n=ZY(),r=Wv(),o=BD(),a=zD(),i=sX(),l=L$(),u=xr();return Uw=function s(c,d,f,p,m,h,v,g,y,b){var w=128&d,x=1&d,_=2&d,E=24&d,S=512&d,k=_?void 0:r(c);return function C(){for(var N=arguments.length,O=Array(N),R=N;R--;)O[R]=arguments[R];if(E)var P=a(C),j=n(O,P);if(p&&(O=e(O,p,m,E)),h&&(O=t(O,h,v,E)),N-=j,E&&N<b){var T=l(O,P);return o(c,d,s,C.placeholder,f,O,T,g,y,b-N)}var D=x?f:this,I=_?D[c]:c;return N=O.length,g?O=i(O,g):S&&N>1&&O.reverse(),w&&y<N&&(O.length=y),this&&this!==u&&this instanceof C&&(I=k||r(I)),I.apply(D,O)}},Uw}function lX(){if(NT)return Hw;NT=1;var e=z_(),t=Wv(),n=qD(),r=BD(),o=zD(),a=L$(),i=xr();return Hw=function(l,u,s){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,m=o(t);p--;)f[p]=arguments[p];var h=d<3&&f[0]!==m&&f[d-1]!==m?[]:a(f,m);return(d-=h.length)<s?r(l,u,n,t.placeholder,void 0,f,h,void 0,void 0,s-d):e(this&&this!==i&&this instanceof t?c:l,this,f)}},Hw}function uX(){if(kT)return Vw;kT=1;var e=z_(),t=Wv(),n=xr();return Vw=function(r,o,a,i){var l=1&o,u=t(r);return function t(){for(var o=-1,s=arguments.length,c=-1,d=i.length,f=Array(d+s),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=i[c];for(;s--;)f[c++]=arguments[++o];return e(p,l?a:this,f)}},Vw}function cX(){if(DT)return Gw;DT=1;var e=DD(),t=ID(),n=L$(),r="__lodash_placeholder__",o=128,a=Math.min;return Gw=function(i,l){var u=i[1],s=l[1],c=u|s,d=c<131,f=s==o&&8==u||s==o&&256==u&&i[7].length<=l[8]||384==s&&l[7].length<=l[8]&&8==u;if(!d&&!f)return i;1&s&&(i[2]=l[2],c|=1&u?0:4);var p=l[3];if(p){var m=i[3];i[3]=m?e(m,p,l[4]):p,i[4]=m?n(i[3],r):l[4]}return(p=l[5])&&(m=i[5],i[5]=m?t(m,p,l[6]):p,i[6]=m?n(i[5],r):l[6]),(p=l[7])&&(i[7]=p),s&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 F$(){if(IT)return Kw;IT=1;var e=kD(),t=QY(),n=lX(),r=qD(),o=uX(),a=MD(),i=cX(),l=LD(),u=FD(),s=tN(),c=Math.max;return Kw=function(d,f,p,m,h,v,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=m?m.length:0;if(w||(f&=-97,m=h=void 0),g=void 0===g?g:c(s(g),0),y=void 0===y?y:s(y),w-=h?h.length:0,64&f){var x=m,_=h;m=h=void 0}var E=b?void 0:a(d),S=[d,f,p,m,h,x,_,v,g,y];if(E&&i(S,E),d=S[0],f=S[1],p=S[2],m=S[3],h=S[4],!(y=S[9]=void 0===S[9]?b?0:d.length:c(S[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)k=8==f||16==f?n(d,f,y):32!=f&&33!=f||h.length?r.apply(void 0,S):o(d,f,p,m);else var k=t(d,f,p);return u((E?e:l)(k,S),d,f)}}function fX(){if(MT)return Yw;MT=1;var e=F$();return Yw=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 dX(){if(jT)return Xw;jT=1;var e=iN();return Xw=function(t){return e(t,4)}}function pX(){if(LT)return Qw;LT=1;var e=F$();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={},Qw=t}function hX(){if(FT)return Zw;FT=1;var e=Ji(),t=lo(),n=vF();return Zw=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 mX(){if(BT)return Jw;BT=1;var e=Kd(),t=lo();return Jw=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function vX(){if(zT)return ex;zT=1;var e=iN(),t=F_();return ex=function(n){return t("function"==typeof n?n:e(n,1))}}function gX(){if(qT)return tx;qT=1;var e=F$(),t=jF(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return tx=n}function yX(){if(WT)return nx;WT=1;var e=C_(),t=gv(),n=wr(),r=ac(),o=iA(),a=Hd(),i=E_();return nx=function(l){return n(l)?e(l,a):r(l)?[l]:t(o(i(l)))}}function bX(){return UT||(UT=1,rx={ary:fX(),assign:rN(),clone:dX(),curry:pX(),forEach:V_(),isArray:wr(),isError:hX(),isFunction:av(),isWeakMap:mX(),iteratee:vX(),keys:NA(),rearg:gX(),toInteger:tN(),toPath:yX()}),rx}function wX(){if(HT)return ox;HT=1;var e=tO(),t=bX();return ox=function(n,r,o){return e(t,n,r,o)}}function xX(){if(VT)return ix;VT=1;var e=wX()("debounce",JA());return e.placeholder=eO(),ix=e}var _X=xX();const $X=ao(_X);function GT(e,t,n=window){const r=p.useRef(t);p.useEffect((()=>{r.current=t}),[t]),p.useEffect((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const SX=e=>{const t=$X(150)(e);GT("resize",t),GT("orientationchange",t)};var KT,YT,ax={exports:{}},sx={};
|
|
79
79
|
/**
|
|
80
80
|
* @license React
|
|
81
81
|
* use-sync-external-store-with-selector.production.min.js
|
|
@@ -84,4 +84,4 @@ function l6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&
|
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the MIT license found in the
|
|
86
86
|
* LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/function CX(){if(KT)return sx;KT=1;var e=Qm();var t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,o=e.useEffect,a=e.useMemo,i=e.useDebugValue;return sx.useSyncExternalStoreWithSelector=function(e,l,u,s,c){var d=r(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a((function(){function e(e){if(!o){if(o=!0,n=e,e=s(e),void 0!==c&&f.hasValue){var a=f.value;if(c(a,e))return r=a}return r=e}if(a=r,t(n,e))return a;var i=s(e);return void 0!==c&&c(a,i)?a:(n=e,r=i)}var n,r,o=!1,a=void 0===u?null:u;return[function(){return e(l())},null===a?void 0:function(){return e(a())}]}),[l,u,s,c]);var p=n(e,d[0],d[1]);return o((function(){f.hasValue=!0,f.value=p}),[p]),i(p),p},sx}function EX(){return YT||(YT=1,ax.exports=CX()),ax.exports}var RX=EX(),vi="default"in _d?de:_d,XT=Symbol.for("react-redux-context"),QT=typeof globalThis<"u"?globalThis:{};function PX(){if(!vi.createContext)return{};const e=QT[XT]??(QT[XT]=new Map);let t=e.get(vi.createContext);return t||(t=vi.createContext(null),e.set(vi.createContext,t)),t}var ml=PX(),TX=()=>{throw new Error("uSES not initialized!")};function B$(e=ml){return function(){return vi.useContext(e)}}var WD=B$(),UD=TX,OX=e=>{UD=e},AX=(e,t)=>e===t;function NX(e=ml){const t=e===ml?WD:B$(e),n=(e,n={})=>{const{equalityFn:r=AX,devModeChecks:o={}}="function"==typeof n?{equalityFn:n}:n,{store:a,subscription:i,getServerState:l,stabilityCheck:u,identityFunctionCheck:s}=t();vi.useRef(!0);const c=vi.useCallback({[e.name]:t=>e(t)}[e.name],[e,u,o.stabilityCheck]),d=UD(i.addNestedSub,a.getState,l||a.getState,c,r);return vi.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var Uv=NX(),kX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function HD(e=ml){const t=e===ml?WD:B$(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}kX?vi.useLayoutEffect:vi.useEffect;var DX=HD();function IX(e=ml){const t=e===ml?DX:HD(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var MX=IX();OX(RX.useSyncExternalStoreWithSelector);const JZ=()=>{const e=MX();SX((()=>{const t=AD();e(np.actions.setDeviceType(t))}))},eJ=()=>Uv(np.selectors.selectDeviceType),jX=()=>Uv(np.selectors.selectIsMobile),tJ=()=>Uv(np.selectors.selectIsTablet),nJ=()=>Uv(np.selectors.selectIsDesktop);function ZT({className:e,...t}){return I.jsx("div",{className:le("animate-pulse rounded-md bg-muted",e),...t})}const LX="sidebar_state",FX=604800,BX="14rem",zX="18rem",qX="3rem",WX="b",VD=p.createContext(null);function Hv(){const e=p.useContext(VD);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const UX=p.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},l)=>{const u=jX(),[s,c]=p.useState(!1),[d,f]=p.useState(e),m=t??d,h=p.useCallback((e=>{const t="function"==typeof e?e(m):e;n?n(t):f(t),document.cookie=`${LX}=${t}; path=/; max-age=${FX}`}),[n,m]),v=p.useCallback((()=>u?c((e=>!e)):h((e=>!e))),[u,h,c]);p.useEffect((()=>{const e=e=>{e.key===WX&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[v]);const g=m?"expanded":"collapsed",y=p.useMemo((()=>({state:g,open:m,setOpen:h,isMobile:u,openMobile:s,setOpenMobile:c,toggleSidebar:v})),[g,m,h,u,s,c,v]);return I.jsx(VD.Provider,{value:y,children:I.jsx(mD,{delayDuration:0,children:I.jsx("div",{style:{"--sidebar-width":BX,"--sidebar-width-icon":qX,...o},className:le("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:a})})})}));UX.displayName="SidebarProvider";const HX=p.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},i)=>{const{isMobile:l,state:u,openMobile:s,setOpenMobile:c}=Hv();return"none"===n?I.jsx("div",{className:le("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):l?I.jsx(qK,{open:s,onOpenChange:c,children:I.jsxs(fD,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":zX},side:e,children:[I.jsxs(dD,{className:"sr-only",children:[I.jsx(pD,{children:"Sidebar"}),I.jsx(hD,{children:"Displays the mobile sidebar."})]}),I.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):I.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[I.jsx("div",{className:le("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]")}),I.jsx("div",{className:le("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:I.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})})]})}));HX.displayName="Sidebar";const VX=p.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=Hv();return I.jsx(zd,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:le("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?I.jsx(j6,{size:16}):I.jsx(I6,{size:16})})}));VX.displayName="SidebarTrigger";const GX=p.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Hv();return I.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:le("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})}));GX.displayName="SidebarRail";const KX=p.forwardRef((({className:e,...t},n)=>I.jsx("main",{ref:n,className:le("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})));KX.displayName="SidebarInset";const YX=p.forwardRef((({className:e,...t},n)=>I.jsx(J3,{ref:n,"data-sidebar":"input",className:le("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));YX.displayName="SidebarInput";const XX=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"header",className:le("flex flex-col gap-2 p-2",e),...t})));XX.displayName="SidebarHeader";const QX=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"footer",className:le("flex flex-col gap-2 p-2",e),...t})));QX.displayName="SidebarFooter";const ZX=p.forwardRef((({className:e,...t},n)=>I.jsx(b$,{ref:n,"data-sidebar":"separator",className:le("mx-2 w-auto bg-sidebar-border",e),...t})));ZX.displayName="SidebarSeparator";const JX=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"content",className:le("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));JX.displayName="SidebarContent";const eQ=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"group",className:le("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));eQ.displayName="SidebarGroup";const tQ=p.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?ns:"div";return I.jsx(o,{ref:r,"data-sidebar":"group-label",className:le("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-slate-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})}));tQ.displayName="SidebarGroupLabel";const nQ=p.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?ns:"button";return I.jsx(o,{ref:r,"data-sidebar":"group-action",className:le("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})}));nQ.displayName="SidebarGroupAction";const rQ=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"group-content",className:le("w-full text-sm",e),...t})));rQ.displayName="SidebarGroupContent";const oQ=p.forwardRef((({className:e,...t},n)=>I.jsx("ul",{ref:n,"data-sidebar":"menu",className:le("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));oQ.displayName="SidebarMenu";const iQ=p.forwardRef((({className:e,...t},n)=>I.jsx("li",{ref:n,"data-sidebar":"menu-item",className:le("group/menu-item relative",e),...t})));iQ.displayName="SidebarMenuItem";const aQ=Qi("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"}}),sQ=p.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},l)=>{const u=e?ns:"button",{isMobile:s,state:c}=Hv(),d=I.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:le(aQ({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),I.jsxs(vD,{children:[I.jsx(gD,{asChild:!0,children:d}),I.jsx(yD,{side:"right",align:"center",hidden:"collapsed"!==c||s,...o})]})):d}));sQ.displayName="SidebarMenuButton";const lQ=p.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?ns:"button";return I.jsx(a,{ref:o,"data-sidebar":"menu-action",className:le("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})}));lQ.displayName="SidebarMenuAction";const uQ=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:le("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})));uQ.displayName="SidebarMenuBadge";const cQ=p.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=p.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return I.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:le("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&I.jsx(ZT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),I.jsx(ZT,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));cQ.displayName="SidebarMenuSkeleton";const fQ=p.forwardRef((({className:e,...t},n)=>I.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:le("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));fQ.displayName="SidebarMenuSub";const dQ=p.forwardRef((({...e},t)=>I.jsx("li",{ref:t,...e})));dQ.displayName="SidebarMenuSubItem";const pQ=p.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?ns:"a";return I.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:le("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-slate-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})}));pQ.displayName="SidebarMenuSubButton";const GD="Switch",[hQ,rJ]=br(GD),[mQ,vQ]=hQ(GD),gQ=p.forwardRef(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=p.useState(null),m=_t(t,(e=>f(e))),h=p.useRef(!1),v=!d||!!d.closest("form"),[g=!1,y]=Wo({prop:o,defaultProp:a,onChange:s});return p.createElement(mQ,{scope:n,checked:g,disabled:l},p.createElement(et.button,pe({type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":KD(g),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:m,onClick:Be(e.onClick,(e=>{y((e=>!e)),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),v&&p.createElement(wQ,{control:d,bubbles:!h.current,name:r,value:u,checked:g,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),yQ="SwitchThumb",bQ=p.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=vQ(yQ,n);return p.createElement(et.span,pe({"data-state":KD(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),wQ=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=p.useRef(null),i=bv(n),l=wv(t);return p.useEffect((()=>{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]),p.createElement("input",pe({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 KD(e){return e?"checked":"unchecked"}const YD=gQ,xQ=bQ,_Q=p.forwardRef((({className:e,...t},n)=>I.jsx(YD,{className:le("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-slate-200","disabled:cursor-not-allowed disabled:!bg-slate-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-slate-300",e),...t,ref:n,children:I.jsx(xQ,{className:le("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-slate-300":t.disabled})})})));_Q.displayName=YD.displayName;const XD="Tabs",[$Q,oJ]=br(XD,[cc]),QD=cc(),[SQ,z$]=$Q(XD),CQ=p.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:u="automatic",...s}=e,c=Qd(l),[d,f]=Wo({prop:r,onChange:o,defaultProp:a});return p.createElement(SQ,{scope:n,baseId:to(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:u},p.createElement(et.div,pe({dir:c,"data-orientation":i},s,{ref:t})))})),EQ="TabsList",RQ=p.forwardRef(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=z$(EQ,n),i=QD(n);return p.createElement(p$,pe({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),p.createElement(et.div,pe({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),PQ="TabsTrigger",TQ=p.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=z$(PQ,n),l=QD(n),u=ZD(i.baseId,r),s=JD(i.baseId,r),c=r===i.value;return p.createElement(h$,pe({asChild:!0},l,{focusable:!o,active:c}),p.createElement(et.button,pe({type:"button",role:"tab","aria-selected":c,"aria-controls":s,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},a,{ref:t,onMouseDown:Be(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:Be(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:Be(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),OQ="TabsContent",AQ=p.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=z$(OQ,n),u=ZD(l.baseId,r),s=JD(l.baseId,r),c=r===l.value,d=p.useRef(c);return p.useEffect((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),p.createElement(Ro,{present:o||c},(({present:n})=>p.createElement(et.div,pe({"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:s,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&a)))}));function ZD(e,t){return`${e}-trigger-${t}`}function JD(e,t){return`${e}-content-${t}`}const NQ=CQ,eI=RQ,tI=TQ,nI=AQ,iJ=NQ,kQ=p.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>I.jsx(eI,{ref:r,"data-testid":"tabsList",className:t?le("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));kQ.displayName=eI.displayName;const DQ=p.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},o)=>I.jsx(tI,{ref:o,className:t?le("inline-flex items-center justify-center whitespace-nowrap p-xxs pb-[calc(theme(spacing.xxs)-2px)] pt-xxs text-basering-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring border-b-2 border-transparent font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-slate-900","group relative before:absolute before:inset-xxxs before:rounded-sm before:bg-transparent before:transition-colors hover:before:bg-slate-50",e):e,...r,children:I.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));DQ.displayName=tI.displayName;const IQ=p.forwardRef((({className:e,...t},n)=>I.jsx(nI,{ref:n,className:le("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));IQ.displayName=nI.displayName;const MQ=p.forwardRef((({className:e,...t},n)=>I.jsx("table",{ref:n,className:le("w-full caption-bottom text-sm",e),...t})));MQ.displayName="Table";const jQ=p.forwardRef((({className:e,...t},n)=>I.jsx("thead",{ref:n,className:le("[&_tr]:border-b",e),...t})));jQ.displayName="TableHeader";const LQ=p.forwardRef((({className:e,...t},n)=>I.jsx("tbody",{ref:n,className:le("[&_tr:last-child]:border-0",e),...t})));LQ.displayName="TableBody";const FQ=p.forwardRef((({className:e,...t},n)=>I.jsx("tfoot",{ref:n,className:le("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));FQ.displayName="TableFooter";const BQ=p.forwardRef((({className:e,...t},n)=>I.jsx("tr",{ref:n,className:le("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",e),...t})));BQ.displayName="TableRow";const zQ=p.forwardRef((({className:e,...t},n)=>I.jsx("th",{ref:n,className:le("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-slate-200 text-sm text-slate-500 [&:not(:last-child)]:border-r",e),...t})));zQ.displayName="TableHead";const qQ=p.forwardRef((({className:e,...t},n)=>I.jsx("td",{ref:n,className:le("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-slate-200 text-base text-slate-700 [&:not(:last-child)]:border-r",e),...t})));qQ.displayName="TableCell";const WQ=p.forwardRef((({className:e,...t},n)=>I.jsx("caption",{ref:n,className:le("mt-s text-sm text-muted-foreground",e),...t})));WQ.displayName="TableCaption";const UQ=(e,t)=>le("flex w-full rounded-m px-4 py-3.5 text-base text-slate-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-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!e},t),HQ=p.forwardRef((({className:e,...t},n)=>{const{error:r}=os();return I.jsx("textarea",{className:UQ(!!r,e),ref:n,...t})}));HQ.displayName="Textarea";const aJ=aY,VQ=sY,GQ=lY,KQ=Qi("z-50 overflow-hidden shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 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 border text-sm px-3 py-1.5",small:"rounded-md border px-[11px] py-[3px] text-base leading-[16px]"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-slate-900_90 text-slate-50"},defaultVariants:{size:"small",theme:"dark"}}}),rI=p.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...o},a)=>I.jsx(wD,{ref:a,sideOffset:t,className:le(KQ({size:n,theme:r,className:e})),...o})));rI.displayName=wD.displayName;const sJ=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>I.jsxs(VQ,{children:[I.jsx(GQ,{className:n,...r,children:e}),t&&I.jsx(rI,{...o,children:t})]}),lJ=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>I.jsx("div",{className:"hidden",children:I.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()}})}),uJ=({as:e="div",children:t,className:n,...r})=>p.createElement(e,{className:le(n),...r},t);function YQ(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 XQ(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>p.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return p.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=p.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=p.useMemo((()=>l),Object.values(l));return I.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=p.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},QQ(r,...t)]}function QQ(...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 p.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function oI(e){const t=p.useRef(e);return p.useEffect((()=>{t.current=e})),p.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function ZQ({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=JQ({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=oI(n);return[i,p.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function JQ({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),a=oI(t);return p.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}var Xm=null!=globalThis&&globalThis.document?p.useLayoutEffect:()=>{};function JT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function iI(...e){return t=>{let n=!1;const r=e.map((e=>{const r=JT(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():JT(e[t],null)}}}}function aI(...e){return p.useCallback(iI(...e),e)}var sI=p.forwardRef(((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),a=o.find(tZ);if(a){const e=a.props.children,n=o.map((t=>t===a?p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null:t));return I.jsx(n_,{...r,ref:t,children:p.isValidElement(e)?p.cloneElement(e,void 0,n):null})}return I.jsx(n_,{...r,ref:t,children:n})}));sI.displayName="Slot";var n_=p.forwardRef(((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const e=rZ(n),o=nZ(r,n.props);return n.type!==p.Fragment&&(o.ref=t?iI(t,e):e),p.cloneElement(n,o)}return p.Children.count(n)>1?p.Children.only(null):null}));n_.displayName="SlotClone";var eZ=({children:e})=>I.jsx(I.Fragment,{children:e});function tZ(e){return p.isValidElement(e)&&e.type===eZ}function nZ(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 rZ(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 oZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],q$=oZ.reduce(((e,t)=>{const n=p.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?sI:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(a,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function iZ(e,t){return p.useReducer(((e,n)=>t[e][n]??e),e)}var lI=e=>{const{present:t,children:n}=e,r=aZ(t),o="function"==typeof n?n({present:r.isPresent}):p.Children.only(n),a=aI(r.ref,sZ(o));return"function"==typeof n||r.isPresent?p.cloneElement(o,{ref:a}):null};function aZ(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),a=p.useRef("none"),i=e?"mounted":"unmounted",[l,u]=iZ(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect((()=>{const e=xm(r.current);a.current="mounted"===l?e:"none"}),[l]),Xm((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=xm(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Xm((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=xm(r.current).includes(a.animationName);if(a.target===t&&i&&(u("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=xm(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)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function xm(e){return(null==e?void 0:e.animationName)||"none"}function sZ(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)}lI.displayName="Presence";var lZ=_d.useId||(()=>{}),uZ=0;function cZ(e){const[t,n]=p.useState(lZ());return Xm((()=>{e||n((e=>e??String(uZ++)))}),[e]),e||(t?`radix-${t}`:"")}var W$="Collapsible",[fZ,cJ]=XQ(W$),[dZ,U$]=fZ(W$),uI=p.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u=!1,s]=ZQ({prop:r,defaultProp:o,onChange:i});return I.jsx(dZ,{scope:n,disabled:a,contentId:cZ(),open:u,onOpenToggle:p.useCallback((()=>s((e=>!e))),[s]),children:I.jsx(q$.div,{"data-state":V$(u),"data-disabled":a?"":void 0,...l,ref:t})})}));uI.displayName=W$;var cI="CollapsibleTrigger",fI=p.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=U$(cI,n);return I.jsx(q$.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":V$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:YQ(e.onClick,o.onOpenToggle)})}));fI.displayName=cI;var H$="CollapsibleContent",dI=p.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=U$(H$,e.__scopeCollapsible);return I.jsx(lI,{present:n||o.open,children:({present:e})=>I.jsx(pZ,{...r,ref:t,present:e})})}));dI.displayName=H$;var pZ=p.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=U$(H$,n),[l,u]=p.useState(r),s=p.useRef(null),c=aI(t,s),d=p.useRef(0),f=d.current,m=p.useRef(0),h=m.current,v=i.open||l,g=p.useRef(v),y=p.useRef(void 0);return p.useEffect((()=>{const e=requestAnimationFrame((()=>g.current=!1));return()=>cancelAnimationFrame(e)}),[]),Xm((()=>{const e=s.current;if(e){y.current=y.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,m.current=t.width,g.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),u(r)}}),[i.open,r]),I.jsx(q$.div,{"data-state":V$(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...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:v&&o})}));function V$(e){return e?"open":"closed"}var hZ=uI;const fJ=hZ,dJ=fI,pJ=dI;export{yZ as AlertDialog,y5 as AlertDialogAction,b5 as AlertDialogCancel,p5 as AlertDialogContent,g5 as AlertDialogDescription,m5 as AlertDialogFooter,h5 as AlertDialogHeader,qO as AlertDialogOverlay,d5 as AlertDialogPortal,v5 as AlertDialogTitle,bZ as AlertDialogTrigger,KO as Avatar,XO as AvatarFallback,YO as AvatarImage,zd as Button,mZ as ButtonLoader,P5 as Card,N5 as CardContent,A5 as CardDescription,k5 as CardFooter,T5 as CardHeader,O5 as CardTitle,h9 as Carousel,m9 as CarouselContent,v9 as CarouselItem,y9 as CarouselNext,g9 as CarouselPrevious,FF as ChartContainer,_Z as ChartLegend,qF as ChartLegendContent,BF as ChartStyle,xZ as ChartTooltip,zF as ChartTooltipContent,Y_ as Checkbox,t2 as ChipsItem,WF as ChipsWrapper,fJ as Collapsible,pJ as CollapsibleContent,dJ as CollapsibleTrigger,xN as Command,EZ as CommandDialog,NB as CommandEmpty,kB as CommandGroup,OB as CommandInput,IB as CommandItem,AB as CommandList,DB as CommandSeparator,MB as CommandShortcut,$B as Dialog,CZ as DialogClose,bN as DialogContent,TB as DialogDescription,wN as DialogFooter,RB as DialogHeader,yN as DialogOverlay,SB as DialogPortal,PB as DialogTitle,SZ as DialogTrigger,bq as Drawer,OZ as DrawerClose,xq as DrawerContent,Cq as DrawerDescription,$q as DrawerFooter,_q as DrawerHeader,ck as DrawerOverlay,wq as DrawerPortal,Sq as DrawerTitle,TZ as DrawerTrigger,kZ as DropdownMenu,gH as DropdownMenuCheckboxItem,mH as DropdownMenuContent,IZ as DropdownMenuGroup,vH as DropdownMenuItem,bH as DropdownMenuLabel,MZ as DropdownMenuPortal,LZ as DropdownMenuRadioGroup,yH as DropdownMenuRadioItem,wH as DropdownMenuSeparator,xH as DropdownMenuShortcut,jZ as DropdownMenuSub,hH as DropdownMenuSubContent,pH as DropdownMenuSubTrigger,DZ as DropdownMenuTrigger,BZ as Form,LV as FormControl,FV as FormDescription,zZ as FormField,MV as FormItem,jV as FormLabel,BV as FormMessage,zV as FormSelect,WV as FormSelectContent,HV as FormSelectGroup,UV as FormSelectItem,VV as FormSelectLabel,GV as FormSelectSeparator,qV as FormSelectTrigger,KV as FormSelectValue,UZ as HoverCard,xK as HoverCardContent,VZ as HoverCardPortal,HZ as HoverCardTrigger,J3 as Input,lJ as InputFile,tD as Label,BK as RadioGroup,zK as RadioGroupItem,_3 as Select,DV as SelectActions,AV as SelectCheckboxItem,E3 as SelectContent,IV as SelectFooter,$3 as SelectGroup,P3 as SelectItem,R3 as SelectLabel,OV as SelectMultiTrigger,kV as SelectScrollDownButton,NV as SelectScrollUpButton,T3 as SelectSeparator,C3 as SelectTrigger,S3 as SelectValue,qK as Sheet,YZ as SheetClose,fD as SheetContent,hD as SheetDescription,HK as SheetFooter,dD as SheetHeader,cD as SheetOverlay,WK as SheetPortal,pD as SheetTitle,KZ as SheetTrigger,HX as Sidebar,JX as SidebarContent,QX as SidebarFooter,eQ as SidebarGroup,nQ as SidebarGroupAction,rQ as SidebarGroupContent,tQ as SidebarGroupLabel,XX as SidebarHeader,YX as SidebarInput,KX as SidebarInset,oQ as SidebarMenu,lQ as SidebarMenuAction,uQ as SidebarMenuBadge,sQ as SidebarMenuButton,iQ as SidebarMenuItem,cQ as SidebarMenuSkeleton,fQ as SidebarMenuSub,pQ as SidebarMenuSubButton,dQ as SidebarMenuSubItem,UX as SidebarProvider,GX as SidebarRail,ZX as SidebarSeparator,VX as SidebarTrigger,ZT as Skeleton,_Q as Switch,MQ as Table,LQ as TableBody,WQ as TableCaption,qQ as TableCell,FQ as TableFooter,zQ as TableHead,jQ as TableHeader,BQ as TableRow,iJ as Tabs,IQ as TabsContent,kQ as TabsList,DQ as TabsTrigger,HQ as Textarea,VQ as Tooltip,rI as TooltipContent,aJ as TooltipProvider,GQ as TooltipTrigger,sJ as TooltipWrapper,a_ as buttonVariants,le as cn,UQ as getTextareaClassName,uJ as styledElement,np as uiSlice,iv as useCarousel,eJ as useDeviceType,JZ as useDeviceTypeUpdater,os as useFormField,nJ as useIsDesktop,jX as useIsMobile,tJ as useIsTablet,Hv as useSidebar};
|
|
87
|
+
*/function CX(){if(KT)return sx;KT=1;var e=Qm();var t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,o=e.useEffect,a=e.useMemo,i=e.useDebugValue;return sx.useSyncExternalStoreWithSelector=function(e,l,u,s,c){var d=r(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a((function(){function e(e){if(!o){if(o=!0,n=e,e=s(e),void 0!==c&&f.hasValue){var a=f.value;if(c(a,e))return r=a}return r=e}if(a=r,t(n,e))return a;var i=s(e);return void 0!==c&&c(a,i)?a:(n=e,r=i)}var n,r,o=!1,a=void 0===u?null:u;return[function(){return e(l())},null===a?void 0:function(){return e(a())}]}),[l,u,s,c]);var p=n(e,d[0],d[1]);return o((function(){f.hasValue=!0,f.value=p}),[p]),i(p),p},sx}function EX(){return YT||(YT=1,ax.exports=CX()),ax.exports}var RX=EX(),vi="default"in _d?de:_d,XT=Symbol.for("react-redux-context"),QT=typeof globalThis<"u"?globalThis:{};function PX(){if(!vi.createContext)return{};const e=QT[XT]??(QT[XT]=new Map);let t=e.get(vi.createContext);return t||(t=vi.createContext(null),e.set(vi.createContext,t)),t}var ml=PX(),TX=()=>{throw new Error("uSES not initialized!")};function B$(e=ml){return function(){return vi.useContext(e)}}var WD=B$(),UD=TX,OX=e=>{UD=e},AX=(e,t)=>e===t;function NX(e=ml){const t=e===ml?WD:B$(e),n=(e,n={})=>{const{equalityFn:r=AX,devModeChecks:o={}}="function"==typeof n?{equalityFn:n}:n,{store:a,subscription:i,getServerState:l,stabilityCheck:u,identityFunctionCheck:s}=t();vi.useRef(!0);const c=vi.useCallback({[e.name]:t=>e(t)}[e.name],[e,u,o.stabilityCheck]),d=UD(i.addNestedSub,a.getState,l||a.getState,c,r);return vi.useDebugValue(d),d};return Object.assign(n,{withTypes:()=>n}),n}var Uv=NX(),kX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function HD(e=ml){const t=e===ml?WD:B$(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}kX?vi.useLayoutEffect:vi.useEffect;var DX=HD();function IX(e=ml){const t=e===ml?DX:HD(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var MX=IX();OX(RX.useSyncExternalStoreWithSelector);const JZ=()=>{const e=MX();SX((()=>{const t=AD();e(np.actions.setDeviceType(t))}))},eJ=()=>Uv(np.selectors.selectDeviceType),jX=()=>Uv(np.selectors.selectIsMobile),tJ=()=>Uv(np.selectors.selectIsTablet),nJ=()=>Uv(np.selectors.selectIsDesktop);function ZT({className:e,...t}){return I.jsx("div",{className:le("animate-pulse rounded-md bg-muted",e),...t})}const LX="sidebar_state",FX=604800,BX="14rem",zX="18rem",qX="3rem",WX="b",VD=p.createContext(null);function Hv(){const e=p.useContext(VD);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const UX=p.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},l)=>{const u=jX(),[s,c]=p.useState(!1),[d,f]=p.useState(e),m=t??d,h=p.useCallback((e=>{const t="function"==typeof e?e(m):e;n?n(t):f(t),document.cookie=`${LX}=${t}; path=/; max-age=${FX}`}),[n,m]),v=p.useCallback((()=>u?c((e=>!e)):h((e=>!e))),[u,h,c]);p.useEffect((()=>{const e=e=>{e.key===WX&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),v())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[v]);const g=m?"expanded":"collapsed",y=p.useMemo((()=>({state:g,open:m,setOpen:h,isMobile:u,openMobile:s,setOpenMobile:c,toggleSidebar:v})),[g,m,h,u,s,c,v]);return I.jsx(VD.Provider,{value:y,children:I.jsx(mD,{delayDuration:0,children:I.jsx("div",{style:{"--sidebar-width":BX,"--sidebar-width-icon":qX,...o},className:le("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:a})})})}));UX.displayName="SidebarProvider";const HX=p.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},i)=>{const{isMobile:l,state:u,openMobile:s,setOpenMobile:c}=Hv();return"none"===n?I.jsx("div",{className:le("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):l?I.jsx(qK,{open:s,onOpenChange:c,children:I.jsxs(fD,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":zX},side:e,children:[I.jsxs(dD,{className:"sr-only",children:[I.jsx(pD,{children:"Sidebar"}),I.jsx(hD,{children:"Displays the mobile sidebar."})]}),I.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):I.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[I.jsx("div",{className:le("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]")}),I.jsx("div",{className:le("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:I.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})})]})}));HX.displayName="Sidebar";const VX=p.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=Hv();return I.jsx(zd,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:le("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?I.jsx(j6,{size:16}):I.jsx(I6,{size:16})})}));VX.displayName="SidebarTrigger";const GX=p.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Hv();return I.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:le("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})}));GX.displayName="SidebarRail";const KX=p.forwardRef((({className:e,...t},n)=>I.jsx("main",{ref:n,className:le("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})));KX.displayName="SidebarInset";const YX=p.forwardRef((({className:e,...t},n)=>I.jsx(tD,{ref:n,"data-sidebar":"input",className:le("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));YX.displayName="SidebarInput";const XX=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"header",className:le("flex flex-col gap-2 p-2",e),...t})));XX.displayName="SidebarHeader";const QX=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"footer",className:le("flex flex-col gap-2 p-2",e),...t})));QX.displayName="SidebarFooter";const ZX=p.forwardRef((({className:e,...t},n)=>I.jsx(b$,{ref:n,"data-sidebar":"separator",className:le("mx-2 w-auto bg-sidebar-border",e),...t})));ZX.displayName="SidebarSeparator";const JX=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"content",className:le("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));JX.displayName="SidebarContent";const eQ=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"group",className:le("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));eQ.displayName="SidebarGroup";const tQ=p.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?ns:"div";return I.jsx(o,{ref:r,"data-sidebar":"group-label",className:le("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-slate-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})}));tQ.displayName="SidebarGroupLabel";const nQ=p.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?ns:"button";return I.jsx(o,{ref:r,"data-sidebar":"group-action",className:le("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})}));nQ.displayName="SidebarGroupAction";const rQ=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"group-content",className:le("w-full text-sm",e),...t})));rQ.displayName="SidebarGroupContent";const oQ=p.forwardRef((({className:e,...t},n)=>I.jsx("ul",{ref:n,"data-sidebar":"menu",className:le("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));oQ.displayName="SidebarMenu";const iQ=p.forwardRef((({className:e,...t},n)=>I.jsx("li",{ref:n,"data-sidebar":"menu-item",className:le("group/menu-item relative",e),...t})));iQ.displayName="SidebarMenuItem";const aQ=Qi("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"}}),sQ=p.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},l)=>{const u=e?ns:"button",{isMobile:s,state:c}=Hv(),d=I.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:le(aQ({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),I.jsxs(vD,{children:[I.jsx(gD,{asChild:!0,children:d}),I.jsx(yD,{side:"right",align:"center",hidden:"collapsed"!==c||s,...o})]})):d}));sQ.displayName="SidebarMenuButton";const lQ=p.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?ns:"button";return I.jsx(a,{ref:o,"data-sidebar":"menu-action",className:le("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})}));lQ.displayName="SidebarMenuAction";const uQ=p.forwardRef((({className:e,...t},n)=>I.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:le("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})));uQ.displayName="SidebarMenuBadge";const cQ=p.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=p.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return I.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:le("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&I.jsx(ZT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),I.jsx(ZT,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));cQ.displayName="SidebarMenuSkeleton";const fQ=p.forwardRef((({className:e,...t},n)=>I.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:le("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));fQ.displayName="SidebarMenuSub";const dQ=p.forwardRef((({...e},t)=>I.jsx("li",{ref:t,...e})));dQ.displayName="SidebarMenuSubItem";const pQ=p.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?ns:"a";return I.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:le("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-slate-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})}));pQ.displayName="SidebarMenuSubButton";const GD="Switch",[hQ,rJ]=br(GD),[mQ,vQ]=hQ(GD),gQ=p.forwardRef(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=p.useState(null),m=_t(t,(e=>f(e))),h=p.useRef(!1),v=!d||!!d.closest("form"),[g=!1,y]=Wo({prop:o,defaultProp:a,onChange:s});return p.createElement(mQ,{scope:n,checked:g,disabled:l},p.createElement(et.button,pe({type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":KD(g),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:m,onClick:Be(e.onClick,(e=>{y((e=>!e)),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),v&&p.createElement(wQ,{control:d,bubbles:!h.current,name:r,value:u,checked:g,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),yQ="SwitchThumb",bQ=p.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=vQ(yQ,n);return p.createElement(et.span,pe({"data-state":KD(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),wQ=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=p.useRef(null),i=bv(n),l=wv(t);return p.useEffect((()=>{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]),p.createElement("input",pe({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 KD(e){return e?"checked":"unchecked"}const YD=gQ,xQ=bQ,_Q=p.forwardRef((({className:e,...t},n)=>I.jsx(YD,{className:le("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-slate-200","disabled:cursor-not-allowed disabled:!bg-slate-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-slate-300",e),...t,ref:n,children:I.jsx(xQ,{className:le("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-slate-300":t.disabled})})})));_Q.displayName=YD.displayName;const XD="Tabs",[$Q,oJ]=br(XD,[cc]),QD=cc(),[SQ,z$]=$Q(XD),CQ=p.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:u="automatic",...s}=e,c=Qd(l),[d,f]=Wo({prop:r,onChange:o,defaultProp:a});return p.createElement(SQ,{scope:n,baseId:to(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:u},p.createElement(et.div,pe({dir:c,"data-orientation":i},s,{ref:t})))})),EQ="TabsList",RQ=p.forwardRef(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=z$(EQ,n),i=QD(n);return p.createElement(p$,pe({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),p.createElement(et.div,pe({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),PQ="TabsTrigger",TQ=p.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=z$(PQ,n),l=QD(n),u=ZD(i.baseId,r),s=JD(i.baseId,r),c=r===i.value;return p.createElement(h$,pe({asChild:!0},l,{focusable:!o,active:c}),p.createElement(et.button,pe({type:"button",role:"tab","aria-selected":c,"aria-controls":s,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},a,{ref:t,onMouseDown:Be(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:Be(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:Be(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),OQ="TabsContent",AQ=p.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=z$(OQ,n),u=ZD(l.baseId,r),s=JD(l.baseId,r),c=r===l.value,d=p.useRef(c);return p.useEffect((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),p.createElement(Ro,{present:o||c},(({present:n})=>p.createElement(et.div,pe({"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!n,id:s,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),n&&a)))}));function ZD(e,t){return`${e}-trigger-${t}`}function JD(e,t){return`${e}-content-${t}`}const NQ=CQ,eI=RQ,tI=TQ,nI=AQ,iJ=NQ,kQ=p.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>I.jsx(eI,{ref:r,"data-testid":"tabsList",className:t?le("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));kQ.displayName=eI.displayName;const DQ=p.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},o)=>I.jsx(tI,{ref:o,className:t?le("inline-flex items-center justify-center whitespace-nowrap p-xxs pb-[calc(theme(spacing.xxs)-2px)] pt-xxs text-basering-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring border-b-2 border-transparent font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-slate-900","group relative before:absolute before:inset-xxxs before:rounded-sm before:bg-transparent before:transition-colors hover:before:bg-slate-50",e):e,...r,children:I.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));DQ.displayName=tI.displayName;const IQ=p.forwardRef((({className:e,...t},n)=>I.jsx(nI,{ref:n,className:le("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));IQ.displayName=nI.displayName;const MQ=p.forwardRef((({className:e,...t},n)=>I.jsx("table",{ref:n,className:le("w-full caption-bottom text-sm",e),...t})));MQ.displayName="Table";const jQ=p.forwardRef((({className:e,...t},n)=>I.jsx("thead",{ref:n,className:le("[&_tr]:border-b",e),...t})));jQ.displayName="TableHeader";const LQ=p.forwardRef((({className:e,...t},n)=>I.jsx("tbody",{ref:n,className:le("[&_tr:last-child]:border-0",e),...t})));LQ.displayName="TableBody";const FQ=p.forwardRef((({className:e,...t},n)=>I.jsx("tfoot",{ref:n,className:le("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));FQ.displayName="TableFooter";const BQ=p.forwardRef((({className:e,...t},n)=>I.jsx("tr",{ref:n,className:le("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",e),...t})));BQ.displayName="TableRow";const zQ=p.forwardRef((({className:e,...t},n)=>I.jsx("th",{ref:n,className:le("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-slate-200 text-sm text-slate-500 [&:not(:last-child)]:border-r",e),...t})));zQ.displayName="TableHead";const qQ=p.forwardRef((({className:e,...t},n)=>I.jsx("td",{ref:n,className:le("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-slate-200 text-base text-slate-700 [&:not(:last-child)]:border-r",e),...t})));qQ.displayName="TableCell";const WQ=p.forwardRef((({className:e,...t},n)=>I.jsx("caption",{ref:n,className:le("mt-s text-sm text-muted-foreground",e),...t})));WQ.displayName="TableCaption";const UQ=(e,t)=>le("flex w-full rounded-m px-4 py-3.5 text-base text-slate-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-slate-400 hover:outline-2 hover:outline-slate-400 focus-visible:bg-slate-50 focus-visible:text-slate-900 focus-visible:outline-2 focus-visible:outline-blue_120 disabled:cursor-not-allowed disabled:select-none disabled:text-slate-300 disabled:outline-slate-200",{"bg-red_30_17 outline-red-dark":!!e},t),HQ=p.forwardRef((({className:e,...t},n)=>{const{error:r}=os();return I.jsx("textarea",{className:UQ(!!r,e),ref:n,...t})}));HQ.displayName="Textarea";const aJ=aY,VQ=sY,GQ=lY,KQ=Qi("z-50 overflow-hidden shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 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 border text-sm px-3 py-1.5",small:"rounded-md border px-[11px] py-[3px] text-base leading-[16px]"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-slate-900_90 text-slate-50"},defaultVariants:{size:"small",theme:"dark"}}}),rI=p.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...o},a)=>I.jsx(wD,{ref:a,sideOffset:t,className:le(KQ({size:n,theme:r,className:e})),...o})));rI.displayName=wD.displayName;const sJ=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>I.jsxs(VQ,{children:[I.jsx(GQ,{className:n,...r,children:e}),t&&I.jsx(rI,{...o,children:t})]}),lJ=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>I.jsx("div",{className:"hidden",children:I.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()}})}),uJ=({as:e="div",children:t,className:n,...r})=>p.createElement(e,{className:le(n),...r},t);function YQ(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 XQ(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>p.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return p.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=p.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...l}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,s=p.useMemo((()=>l),Object.values(l));return I.jsx(u.Provider,{value:s,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const u=(null==(l=null==i?void 0:i[e])?void 0:l[a])||o,s=p.useContext(u);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},QQ(r,...t)]}function QQ(...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 p.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function oI(e){const t=p.useRef(e);return p.useEffect((()=>{t.current=e})),p.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function ZQ({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=JQ({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=oI(n);return[i,p.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function JQ({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),a=oI(t);return p.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}var Xm=null!=globalThis&&globalThis.document?p.useLayoutEffect:()=>{};function JT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function iI(...e){return t=>{let n=!1;const r=e.map((e=>{const r=JT(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():JT(e[t],null)}}}}function aI(...e){return p.useCallback(iI(...e),e)}var sI=p.forwardRef(((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),a=o.find(tZ);if(a){const e=a.props.children,n=o.map((t=>t===a?p.Children.count(e)>1?p.Children.only(null):p.isValidElement(e)?e.props.children:null:t));return I.jsx(n_,{...r,ref:t,children:p.isValidElement(e)?p.cloneElement(e,void 0,n):null})}return I.jsx(n_,{...r,ref:t,children:n})}));sI.displayName="Slot";var n_=p.forwardRef(((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const e=rZ(n),o=nZ(r,n.props);return n.type!==p.Fragment&&(o.ref=t?iI(t,e):e),p.cloneElement(n,o)}return p.Children.count(n)>1?p.Children.only(null):null}));n_.displayName="SlotClone";var eZ=({children:e})=>I.jsx(I.Fragment,{children:e});function tZ(e){return p.isValidElement(e)&&e.type===eZ}function nZ(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 rZ(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 oZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],q$=oZ.reduce(((e,t)=>{const n=p.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?sI:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(a,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function iZ(e,t){return p.useReducer(((e,n)=>t[e][n]??e),e)}var lI=e=>{const{present:t,children:n}=e,r=aZ(t),o="function"==typeof n?n({present:r.isPresent}):p.Children.only(n),a=aI(r.ref,sZ(o));return"function"==typeof n||r.isPresent?p.cloneElement(o,{ref:a}):null};function aZ(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),a=p.useRef("none"),i=e?"mounted":"unmounted",[l,u]=iZ(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect((()=>{const e=xm(r.current);a.current="mounted"===l?e:"none"}),[l]),Xm((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=xm(t);e?u("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),Xm((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=xm(r.current).includes(a.animationName);if(a.target===t&&i&&(u("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=xm(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)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function xm(e){return(null==e?void 0:e.animationName)||"none"}function sZ(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)}lI.displayName="Presence";var lZ=_d.useId||(()=>{}),uZ=0;function cZ(e){const[t,n]=p.useState(lZ());return Xm((()=>{e||n((e=>e??String(uZ++)))}),[e]),e||(t?`radix-${t}`:"")}var W$="Collapsible",[fZ,cJ]=XQ(W$),[dZ,U$]=fZ(W$),uI=p.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u=!1,s]=ZQ({prop:r,defaultProp:o,onChange:i});return I.jsx(dZ,{scope:n,disabled:a,contentId:cZ(),open:u,onOpenToggle:p.useCallback((()=>s((e=>!e))),[s]),children:I.jsx(q$.div,{"data-state":V$(u),"data-disabled":a?"":void 0,...l,ref:t})})}));uI.displayName=W$;var cI="CollapsibleTrigger",fI=p.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=U$(cI,n);return I.jsx(q$.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":V$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:YQ(e.onClick,o.onOpenToggle)})}));fI.displayName=cI;var H$="CollapsibleContent",dI=p.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=U$(H$,e.__scopeCollapsible);return I.jsx(lI,{present:n||o.open,children:({present:e})=>I.jsx(pZ,{...r,ref:t,present:e})})}));dI.displayName=H$;var pZ=p.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=U$(H$,n),[l,u]=p.useState(r),s=p.useRef(null),c=aI(t,s),d=p.useRef(0),f=d.current,m=p.useRef(0),h=m.current,v=i.open||l,g=p.useRef(v),y=p.useRef(void 0);return p.useEffect((()=>{const e=requestAnimationFrame((()=>g.current=!1));return()=>cancelAnimationFrame(e)}),[]),Xm((()=>{const e=s.current;if(e){y.current=y.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,m.current=t.width,g.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),u(r)}}),[i.open,r]),I.jsx(q$.div,{"data-state":V$(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...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:v&&o})}));function V$(e){return e?"open":"closed"}var hZ=uI;const fJ=hZ,dJ=fI,pJ=dI;export{yZ as AlertDialog,y5 as AlertDialogAction,b5 as AlertDialogCancel,p5 as AlertDialogContent,g5 as AlertDialogDescription,m5 as AlertDialogFooter,h5 as AlertDialogHeader,qO as AlertDialogOverlay,d5 as AlertDialogPortal,v5 as AlertDialogTitle,bZ as AlertDialogTrigger,KO as Avatar,XO as AvatarFallback,YO as AvatarImage,zd as Button,mZ as ButtonLoader,P5 as Card,N5 as CardContent,A5 as CardDescription,k5 as CardFooter,T5 as CardHeader,O5 as CardTitle,h9 as Carousel,m9 as CarouselContent,v9 as CarouselItem,y9 as CarouselNext,g9 as CarouselPrevious,FF as ChartContainer,_Z as ChartLegend,qF as ChartLegendContent,BF as ChartStyle,xZ as ChartTooltip,zF as ChartTooltipContent,Y_ as Checkbox,t2 as ChipsItem,WF as ChipsWrapper,fJ as Collapsible,pJ as CollapsibleContent,dJ as CollapsibleTrigger,xN as Command,EZ as CommandDialog,NB as CommandEmpty,kB as CommandGroup,OB as CommandInput,IB as CommandItem,AB as CommandList,DB as CommandSeparator,MB as CommandShortcut,$B as Dialog,CZ as DialogClose,bN as DialogContent,TB as DialogDescription,wN as DialogFooter,RB as DialogHeader,yN as DialogOverlay,SB as DialogPortal,PB as DialogTitle,SZ as DialogTrigger,bq as Drawer,OZ as DrawerClose,xq as DrawerContent,Cq as DrawerDescription,$q as DrawerFooter,_q as DrawerHeader,ck as DrawerOverlay,wq as DrawerPortal,Sq as DrawerTitle,TZ as DrawerTrigger,kZ as DropdownMenu,gH as DropdownMenuCheckboxItem,mH as DropdownMenuContent,IZ as DropdownMenuGroup,vH as DropdownMenuItem,bH as DropdownMenuLabel,MZ as DropdownMenuPortal,LZ as DropdownMenuRadioGroup,yH as DropdownMenuRadioItem,wH as DropdownMenuSeparator,xH as DropdownMenuShortcut,jZ as DropdownMenuSub,hH as DropdownMenuSubContent,pH as DropdownMenuSubTrigger,DZ as DropdownMenuTrigger,BZ as Form,BV as FormControl,zV as FormDescription,zZ as FormField,LV as FormItem,FV as FormLabel,qV as FormMessage,WV as FormSelect,HV as FormSelectContent,GV as FormSelectGroup,VV as FormSelectItem,KV as FormSelectLabel,YV as FormSelectSeparator,UV as FormSelectTrigger,XV as FormSelectValue,UZ as HoverCard,$K as HoverCardContent,VZ as HoverCardPortal,HZ as HoverCardTrigger,tD as Input,lJ as InputFile,i3 as Label,BK as RadioGroup,zK as RadioGroupItem,S3 as Select,MV as SelectActions,kV as SelectCheckboxItem,P3 as SelectContent,jV as SelectFooter,C3 as SelectGroup,O3 as SelectItem,T3 as SelectLabel,NV as SelectMultiTrigger,IV as SelectScrollDownButton,DV as SelectScrollUpButton,A3 as SelectSeparator,R3 as SelectTrigger,E3 as SelectValue,qK as Sheet,YZ as SheetClose,fD as SheetContent,hD as SheetDescription,HK as SheetFooter,dD as SheetHeader,cD as SheetOverlay,WK as SheetPortal,pD as SheetTitle,KZ as SheetTrigger,HX as Sidebar,JX as SidebarContent,QX as SidebarFooter,eQ as SidebarGroup,nQ as SidebarGroupAction,rQ as SidebarGroupContent,tQ as SidebarGroupLabel,XX as SidebarHeader,YX as SidebarInput,KX as SidebarInset,oQ as SidebarMenu,lQ as SidebarMenuAction,uQ as SidebarMenuBadge,sQ as SidebarMenuButton,iQ as SidebarMenuItem,cQ as SidebarMenuSkeleton,fQ as SidebarMenuSub,pQ as SidebarMenuSubButton,dQ as SidebarMenuSubItem,UX as SidebarProvider,GX as SidebarRail,ZX as SidebarSeparator,VX as SidebarTrigger,ZT as Skeleton,_Q as Switch,MQ as Table,LQ as TableBody,WQ as TableCaption,qQ as TableCell,FQ as TableFooter,zQ as TableHead,jQ as TableHeader,BQ as TableRow,iJ as Tabs,IQ as TabsContent,kQ as TabsList,DQ as TabsTrigger,HQ as Textarea,VQ as Tooltip,rI as TooltipContent,aJ as TooltipProvider,GQ as TooltipTrigger,sJ as TooltipWrapper,a_ as buttonVariants,le as cn,UQ as getTextareaClassName,uJ as styledElement,np as uiSlice,iv as useCarousel,eJ as useDeviceType,JZ as useDeviceTypeUpdater,os as useFormField,nJ as useIsDesktop,jX as useIsMobile,tJ as useIsTablet,Hv as useSidebar};
|