@wellesley/ui 1.0.311 → 1.0.313

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.
Files changed (2) hide show
  1. package/index.mjs +1 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -66,4 +66,4 @@ import*as P from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import ye,{forw
66
66
  *
67
67
  * This source code is licensed under the MIT license found in the
68
68
  * LICENSE file in the root directory of this source tree.
69
- */function r9(){if(_C)return Nt;_C=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"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case l:case s:case p:case f:case i:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),Nt.ContextConsumer=l,Nt.ContextProvider=i,Nt.Element=t,Nt.ForwardRef=s,Nt.Fragment=r,Nt.Lazy=p,Nt.Memo=f,Nt.Portal=n,Nt.Profiler=a,Nt.StrictMode=o,Nt.Suspense=c,Nt.SuspenseList=d,Nt.isAsyncMode=function(){return!1},Nt.isConcurrentMode=function(){return!1},Nt.isContextConsumer=function(e){return m(e)===l},Nt.isContextProvider=function(e){return m(e)===i},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return m(e)===s},Nt.isFragment=function(e){return m(e)===r},Nt.isLazy=function(e){return m(e)===p},Nt.isMemo=function(e){return m(e)===f},Nt.isPortal=function(e){return m(e)===n},Nt.isProfiler=function(e){return m(e)===a},Nt.isStrictMode=function(e){return m(e)===o},Nt.isSuspense=function(e){return m(e)===c},Nt.isSuspenseList=function(e){return m(e)===d},Nt.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===s||t.$$typeof===e||void 0!==t.getModuleId)},Nt.typeOf=m,Nt}function o9(){return $C||($C=1,iy.exports=r9()),iy.exports}function $O(){if(SC)return ay;SC=1;var e=ta(),t=fo();return ay=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function i9(){if(CC)return sy;CC=1;var e=$O();return sy=function(t){return e(t)&&t!=+t}}o9();var a9=i9();const s9=Oo(a9);var l9=$O();const u9=Oo(l9);var tv=function(e){return xO(e)&&e.indexOf("%")===e.length-1},Wo=function(e){return u9(e)&&!s9(e)},xv=function(e){return Wo(e)||xO(e)};function Zw(e){return(Zw="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 c9=["viewBox","children"],f9=["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"],EC=["points","pathLength"],ly={svg:c9,polygon:EC,polyline:EC},SO=["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"],d9=function(e,t,n){return function(r){return e(t,n,r),null}},p9=function(e,t,n){if(!_O(e)||"object"!==Zw(e))return null;var r=null;return Object.keys(e).forEach((function(o){var a=e[o];SO.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=d9(a,t,n))})),r},h9=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},v9=function(e,t,n,r){var o,a=null!==(o=null==ly?void 0:ly[r])&&void 0!==o?o:[];return!wv(e)&&(r&&a.includes(t)||f9.includes(t))||SO.includes(t)},CO=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(Xi(e)&&(r=e.props),!_O(r))return null;var o={};return Object.keys(r).forEach((function(e){var a;v9(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])})),o},m9=["children","width","height","viewBox","className","style","title","desc"];function Jw(){return Jw=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},Jw.apply(this,arguments)}function g9(e,t){if(null==e)return{};var n,r,o=y9(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 y9(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 b9(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=g9(e,m9),c=o||{width:n,height:r,x:0,y:0},d=Za("recharts-surface",a);return ye.createElement("svg",Jw({},CO(s,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),ye.createElement("title",null,l),ye.createElement("desc",null,u),t)}var uy,PC,cy,RC,fy,TC,dy,OC,py,AC,hy,NC,vy,DC,my,IC,mv=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 w9(){if(PC)return uy;return PC=1,uy=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 x9(){if(RC)return cy;RC=1;var e=w9();return cy=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function EO(){if(TC)return fy;TC=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return fy=function(t){return e.test(t)}}function _9(){if(OC)return dy;return OC=1,dy=function(e){return e.split("")}}function $9(){if(AC)return py;AC=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 py=function(e){return e.match(d)||[]}}function S9(){if(NC)return hy;NC=1;var e=_9(),t=EO(),n=$9();return hy=function(r){return t(r)?n(r):e(r)}}function C9(){if(DC)return vy;DC=1;var e=x9(),t=EO(),n=S9(),r=n_();return vy=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 E9(){if(IC)return my;IC=1;var e=C9()("toUpperCase");return my=e}var P9=E9();const PO=Oo(P9);function nv(e){return function(){return e}}const RO=Math.cos,_v=Math.sin,Ko=Math.sqrt,$v=Math.PI,im=2*$v,ex=Math.PI,tx=2*ex,nl=1e-6,R9=tx-nl;function TO(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function T9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return TO;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 O9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?TO:T9(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>nl)if(Math.abs(c*l-u*s)>nl&&o){let f=n-a,p=r-i,h=l*l+u*u,m=f*f+p*p,v=Math.sqrt(h),g=Math.sqrt(d),y=o*Math.tan((ex-Math.acos((h+d-m)/(2*v*g)))/2),b=y/g,w=y/v;Math.abs(b-1)>nl&&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)>nl||Math.abs(this._y1-s)>nl)&&this._append`L${u},${s}`,n&&(d<0&&(d=d%tx+tx),d>R9?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>nl&&this._append`A${n},${n},0,${+(d>=ex)},${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 A9(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 O9(t)}const o_={draw(e,t){const n=Ko(t/$v);e.moveTo(n,0),e.arc(0,0,n,0,im)}},N9={draw(e,t){const n=Ko(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()}},OO=Ko(1/3),D9=2*OO,I9={draw(e,t){const n=Ko(t/D9),r=n*OO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},k9={draw(e,t){const n=Ko(t),r=-n/2;e.rect(r,r,n,n)}},M9=.8908130915292852,AO=_v($v/10)/_v(7*$v/10),L9=_v(im/10)*AO,j9=-RO(im/10)*AO,F9={draw(e,t){const n=Ko(t*M9),r=L9*n,o=j9*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=im*t/5,i=RO(a),l=_v(a);e.lineTo(l*n,-i*n),e.lineTo(i*r-l*o,l*r+i*o)}e.closePath()}},gy=Ko(3),B9={draw(e,t){const n=-Ko(t/(3*gy));e.moveTo(0,2*n),e.lineTo(-gy*n,-n),e.lineTo(gy*n,-n),e.closePath()}},Co=-.5,Eo=Ko(3)/2,nx=1/Ko(12),q9=3*(nx/2+1),z9={draw(e,t){const n=Ko(t/q9),r=n/2,o=n*nx,a=r,i=n*nx+n,l=-a,u=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(l,u),e.lineTo(Co*r-Eo*o,Eo*r+Co*o),e.lineTo(Co*a-Eo*i,Eo*a+Co*i),e.lineTo(Co*l-Eo*u,Eo*l+Co*u),e.lineTo(Co*r+Eo*o,Co*o-Eo*r),e.lineTo(Co*a+Eo*i,Co*i-Eo*a),e.lineTo(Co*l+Eo*u,Co*u-Eo*l),e.closePath()}};function W9(e,t){let n=null,r=A9(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:nv(e||o_),t="function"==typeof t?t:nv(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:nv(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:nv(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function Cd(e){return(Cd="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 U9=["type","size","sizeType"];function rx(){return rx=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},rx.apply(this,arguments)}function kC(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 MC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kC(Object(n),!0).forEach((function(t){H9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H9(e,t,n){return(t=V9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V9(e){var t=G9(e,"string");return"symbol"==Cd(t)?t:t+""}function G9(e,t){if("object"!=Cd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Cd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function K9(e,t){if(null==e)return{};var n,r,o=Y9(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 Y9(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 NO={symbolCircle:o_,symbolCross:N9,symbolDiamond:I9,symbolSquare:k9,symbolStar:F9,symbolTriangle:B9,symbolWye:z9},X9=Math.PI/180,Q9=function(e){var t="symbol".concat(PO(e));return NO[t]||o_},Z9=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*X9;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}},J9=function(e,t){NO["symbol".concat(PO(e))]=t},DO=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=MC(MC({},K9(e,U9)),{},{type:r,size:a,sizeType:l}),s=u.className,c=u.cx,d=u.cy,f=CO(u,!0);return c===+c&&d===+d&&a===+a?ye.createElement("path",rx({},f,{className:Za("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=Q9(r),W9().type(t).size(Z9(a,l,r))())})):null};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)}function ox(){return ox=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},ox.apply(this,arguments)}function LC(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 e4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LC(Object(n),!0).forEach((function(t){Ed(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function t4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n4(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,kO(r.key),r)}}function r4(e,t,n){return n4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o4(e,t,n){return t=Sv(t),i4(e,IO()?Reflect.construct(t,n||[],Sv(e).constructor):t.apply(e,n))}function i4(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 a4(e)}function a4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(IO=function(){return!!e})()}function Sv(e){return(Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s4(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&&ix(e,t)}function ix(e,t){return(ix=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ed(e,t,n){return(t=kO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kO(e){var t=l4(e,"string");return"symbol"==Gu(t)?t:t+""}function l4(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)}DO.registerSymbol=J9;var yy,jC,by,FC,wy,BC,xy,qC,_y,zC,$y,WC,Sy,UC,Cy,HC,Ey,VC,Py,GC,Ry,KC,Ty,YC,Oy,XC,Ay,QC,Ny,ZC,Dy,JC,Iy,eE,ky,tE,My,nE,Ly,rE,jy,oE,Fy,iE,By,aE,qy,sE,Po=32,i_=function(){function e(){return t4(this,e),o4(this,e,arguments)}return s4(e,Wv),r4(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=Po/2,r=Po/6,o=Po/3,a=e.inactive?t:e.color;if("plainline"===e.type)return ye.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:Po,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return ye.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(Po,"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 ye.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(Po/8,"h").concat(Po,"v").concat(3*Po/4,"h").concat(-Po,"z"),className:"recharts-legend-icon"});if(ye.isValidElement(e.legendIcon)){var i=e4({},e);return delete i.legendIcon,ye.cloneElement(e.legendIcon,i)}return ye.createElement(DO,{fill:a,cx:n,cy:n,size:Po,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:Po,height:Po},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=Za(Ed(Ed({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=wv(t.value)?null:t.value;mv(!wv(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 ye.createElement("li",ox({className:c,style:u,key:"legend-item-".concat(n)},p9(e.props,t,n)),ye.createElement(b9,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),ye.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 ye.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function u4(){if(jC)return yy;jC=1;var e=rm();return yy=function(){this.__data__=new e,this.size=0}}function c4(){if(FC)return by;return FC=1,by=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function f4(){if(BC)return wy;return BC=1,wy=function(e){return this.__data__.get(e)}}function d4(){if(qC)return xy;return qC=1,xy=function(e){return this.__data__.has(e)}}function p4(){if(zC)return _y;zC=1;var e=rm(),t=Jx(),n=e_();return _y=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 a_(){if(WC)return $y;WC=1;var e=rm(),t=u4(),n=c4(),r=f4(),o=d4(),a=p4();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,$y=i}function h4(){if(UC)return Sy;UC=1;return Sy=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function v4(){if(HC)return Cy;return HC=1,Cy=function(e){return this.__data__.has(e)}}function MO(){if(VC)return Ey;VC=1;var e=e_(),t=h4(),n=v4();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,Ey=r}function m4(){if(GC)return Py;return GC=1,Py=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 LO(){if(KC)return Ry;return KC=1,Ry=function(e,t){return e.has(t)}}function jO(){if(YC)return Ty;YC=1;var e=MO(),t=m4(),n=LO();return Ty=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 h=-1,m=!0,v=2&a?new e:void 0;for(u.set(r,o),u.set(o,r);++h<c;){var g=r[h],y=o[h];if(i)var b=s?i(y,g,h,o,r,u):i(g,y,h,r,o,u);if(void 0!==b){if(b)continue;m=!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)}))){m=!1;break}}else if(g!==y&&!l(g,y,a,i,u)){m=!1;break}}return u.delete(r),u.delete(o),m}}function FO(){if(XC)return Oy;XC=1;var e=Er().Uint8Array;return Oy=e}function g4(){if(QC)return Ay;return QC=1,Ay=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function s_(){if(ZC)return Ny;return ZC=1,Ny=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function y4(){if(JC)return Dy;JC=1;var e=ac(),t=FO(),n=tm(),r=jO(),o=g4(),a=s_(),i=e?e.prototype:void 0,l=i?i.valueOf:void 0;return Dy=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 h=1&s;if(p||(p=a),e.size!=i.size&&!h)return!1;var m=f.get(e);if(m)return m==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 l_(){if(eE)return Iy;return eE=1,Iy=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function BO(){if(tE)return ky;tE=1;var e=l_(),t=Cr();return ky=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function b4(){if(nE)return My;return nE=1,My=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 qO(){if(rE)return Ly;return rE=1,Ly=function(){return[]}}function u_(){if(oE)return jy;oE=1;var e=b4(),t=qO(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return jy=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function w4(){if(iE)return Fy;return iE=1,Fy=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function x4(){if(aE)return By;aE=1;var e=ta(),t=fo();return By=function(n){return t(n)&&"[object Arguments]"==e(n)}}function c_(){if(sE)return qy;sE=1;var e=x4(),t=fo(),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 qy=a}Ed(i_,"displayName","Legend"),Ed(i_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var zy,lE,uE,Wy,cE,Uy,fE,Hy,dE,Vy,pE,vd={exports:{}};function _4(){if(lE)return zy;return lE=1,zy=function(){return!1}}function f_(){return uE||(uE=1,e=vd,t=vd.exports,n=Er(),r=_4(),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),vd.exports;var e,t,n,r,o,a,i,l}function am(){if(cE)return Wy;cE=1;var e=/^(?:0|[1-9]\d*)$/;return Wy=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 d_(){if(fE)return Uy;fE=1;return Uy=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function $4(){if(dE)return Hy;dE=1;var e=ta(),t=d_(),n=fo(),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,Hy=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function sm(){if(pE)return Vy;return pE=1,Vy=function(e){return function(t){return e(t)}}}vd.exports;var hE,Gy,vE,Ky,mE,Yy,gE,Xy,yE,Qy,bE,Zy,wE,Jy,xE,eb,_E,tb,$E,nb,SE,rb,CE,ob,EE,ib,PE,ab,RE,sb,TE,lb,OE,ub,AE,cb,NE,fb,DE,db,IE,pb,kE,hb,ME,vb,LE,mb,jE,gb,FE,yb,BE,bb,qE,wb,zE,xb,WE,_b,UE,$b,HE,Sb,VE,Cb,GE,Eb,KE,Pb,YE,Rb,XE,Tb,QE,Ob,ZE,Ab,JE,Nb,eP,Db,tP,md={exports:{}};function p_(){return hE||(hE=1,e=md,t=md.exports,n=mO(),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),md.exports;var e,t,n,r,o,a,i}function zO(){if(vE)return Gy;vE=1;var e=$4(),t=sm(),n=p_(),r=n&&n.isTypedArray,o=r?t(r):e;return Gy=o}function WO(){if(mE)return Ky;mE=1;var e=w4(),t=c_(),n=Cr(),r=f_(),o=am(),a=zO(),i=Object.prototype.hasOwnProperty;return Ky=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,h=p?e(l.length,String):[],m=h.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,m)))&&h.push(v);return h}}function h_(){if(gE)return Yy;gE=1;var e=Object.prototype;return Yy=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function UO(){if(yE)return Xy;return yE=1,Xy=function(e,t){return function(n){return e(t(n))}}}function S4(){if(bE)return Qy;bE=1;var e=UO()(Object.keys,Object);return Qy=e}function HO(){if(wE)return Zy;wE=1;var e=h_(),t=S4(),n=Object.prototype.hasOwnProperty;return Zy=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 zd(){if(xE)return Jy;xE=1;var e=Jv(),t=d_();return Jy=function(n){return null!=n&&t(n.length)&&!e(n)}}function Wd(){if(_E)return eb;_E=1;var e=WO(),t=HO(),n=zd();return eb=function(r){return n(r)?e(r):t(r)}}function VO(){if($E)return tb;$E=1;var e=BO(),t=u_(),n=Wd();return tb=function(r){return e(r,n,t)}}function C4(){if(SE)return nb;SE=1;var e=VO(),t=Object.prototype.hasOwnProperty;return nb=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),h=l.get(r);if(p&&h)return p==r&&h==n;var m=!0;l.set(n,r),l.set(r,n);for(var 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)){m=!1;break}v||(v="constructor"==f)}if(m&&!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)&&(m=!1)}return l.delete(n),l.delete(r),m}}function E4(){if(CE)return rb;CE=1;var e=gl()(Er(),"DataView");return rb=e}function P4(){if(EE)return ob;EE=1;var e=gl()(Er(),"Promise");return ob=e}function GO(){if(PE)return ib;PE=1;var e=gl()(Er(),"Set");return ib=e}function KO(){if(RE)return ab;RE=1;var e=gl()(Er(),"WeakMap");return ab=e}function Ud(){if(TE)return sb;TE=1;var e=E4(),t=Jx(),n=P4(),r=GO(),o=KO(),a=ta(),i=gO(),l="[object Map]",u="[object Promise]",s="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),h=i(n),m=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 h:return u;case m:return s;case v:return c}return t}),sb=g}function R4(){if(OE)return lb;OE=1;var e=a_(),t=jO(),n=y4(),r=C4(),o=Ud(),a=Cr(),i=f_(),l=zO(),u="[object Arguments]",s="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return lb=function(f,p,h,m,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,k=(x=x==u?c:x)==c,P=w==x;if(P&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(P&&!_)return g||(g=new e),y||l(f)?t(f,p,h,m,v,g):n(f,p,w,h,m,v,g);if(!(1&h)){var S=_&&d.call(f,"__wrapped__"),C=k&&d.call(p,"__wrapped__");if(S||C){var E=S?f.value():f,N=C?p.value():p;return g||(g=new e),v(E,N,h,m,g)}}return!!P&&(g||(g=new e),r(f,p,h,m,v,g))}}function YO(){if(AE)return ub;AE=1;var e=R4(),t=fo();return ub=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))},ub}function T4(){if(NE)return cb;NE=1;var e=a_(),t=YO();return cb=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 h=a(d,f,c,n,r,p);if(!(void 0===h?t(f,d,3,a,p):h))return!1}}return!0}}function XO(){if(DE)return fb;DE=1;var e=No();return fb=function(t){return t==t&&!e(t)}}function O4(){if(IE)return db;IE=1;var e=XO(),t=Wd();return db=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 QO(){if(kE)return pb;return kE=1,pb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function A4(){if(ME)return hb;ME=1;var e=T4(),t=O4(),n=QO();return hb=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 N4(){if(LE)return vb;return LE=1,vb=function(e,t){return null!=e&&t in Object(e)}}function D4(){if(jE)return mb;jE=1;var e=bO(),t=c_(),n=Cr(),r=am(),o=d_(),a=qd();return mb=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 I4(){if(FE)return gb;FE=1;var e=N4(),t=D4();return gb=function(n,r){return null!=n&&t(n,r,e)}}function k4(){if(BE)return yb;BE=1;var e=YO(),t=wO(),n=I4(),r=Zx(),o=XO(),a=QO(),i=qd();return yb=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 Hd(){if(qE)return bb;return qE=1,bb=function(e){return e}}function M4(){if(zE)return wb;return zE=1,wb=function(e){return function(t){return null==t?void 0:t[e]}}}function L4(){if(WE)return xb;WE=1;var e=r_();return xb=function(t){return function(n){return e(n,t)}}}function j4(){if(UE)return _b;UE=1;var e=M4(),t=L4(),n=Zx(),r=qd();return _b=function(o){return n(o)?e(r(o)):t(o)}}function v_(){if(HE)return $b;HE=1;var e=A4(),t=k4(),n=Hd(),r=Cr(),o=j4();return $b=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 F4(){if(VE)return Sb;return VE=1,Sb=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 B4(){if(GE)return Cb;return GE=1,Cb=function(e){return e!=e}}function q4(){if(KE)return Eb;return KE=1,Eb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function z4(){if(YE)return Pb;YE=1;var e=F4(),t=B4(),n=q4();return Pb=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function ZO(){if(XE)return Rb;XE=1;var e=z4();return Rb=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function W4(){if(QE)return Tb;return QE=1,Tb=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 JO(){if(ZE)return Ob;return ZE=1,Ob=function(){}}function U4(){if(JE)return Ab;JE=1;var e=GO(),t=JO(),n=s_(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Ab=r}function H4(){if(eP)return Nb;eP=1;var e=MO(),t=ZO(),n=W4(),r=LO(),o=U4(),a=s_();return Nb=function(i,l,u){var s=-1,c=t,d=i.length,f=!0,p=[],h=p;if(u)f=!1,c=n;else if(d>=200){var m=l?null:o(i);if(m)return a(m);f=!1,c=r,h=new e}else h=l?[]:p;e:for(;++s<d;){var v=i[s],g=l?l(v):v;if(v=u||0!==v?v:0,f&&g==g){for(var y=h.length;y--;)if(h[y]===g)continue e;l&&h.push(g),p.push(v)}else c(h,g,u)||(h!==p&&h.push(g),p.push(v))}return p}}function V4(){if(tP)return Db;tP=1;var e=v_(),t=H4();return Db=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}md.exports;var G4=V4();const nP=Oo(G4);function eA(e,t,n){return!0===t?nP(e,n):wv(t)?nP(e,t):e}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)}var K4=["ref"];function rP(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 Vi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rP(Object(n),!0).forEach((function(t){lm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oP(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,nA(r.key),r)}}function X4(e,t,n){return oP(e.prototype,t),oP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q4(e,t,n){return t=Cv(t),Z4(e,tA()?Reflect.construct(t,n,Cv(e).constructor):t.apply(e,n))}function Z4(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 J4(e)}function J4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tA=function(){return!!e})()}function Cv(e){return(Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eL(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&&ax(e,t)}function ax(e,t){return(ax=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lm(e,t,n){return(t=nA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nA(e){var t=tL(e,"string");return"symbol"==Ku(t)?t:t+""}function tL(e,t){if("object"!=Ku(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function nL(e,t){if(null==e)return{};var n,r,o=rL(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 rL(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 oL(e){return e.value}function iL(e,t){if(ye.isValidElement(e))return ye.cloneElement(e,t);if("function"==typeof e)return ye.createElement(e,t);t.ref;var n=nL(t,K4);return ye.createElement(i_,n)}var Ib,aP,kb,sP,Mb,lP,Lb,uP,jb,cP,Fb,fP,Bb,dP,qb,pP,zb,hP,Wb,vP,Ub,mP,Hb,gP,Vb,yP,Gb,bP,Kb,wP,Yb,xP,Xb,_P,Qb,$P,Zb,SP,Jb,CP,e1,EP,t1,PP,iP=1,m_=function(){function e(){var t;Y4(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return lm(t=Q4(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return eL(e,Wv),X4(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)>iP||Math.abs(t.height-this.lastBoundingBox.height)>iP)&&(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?Vi({},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 Vi(Vi({},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=Vi(Vi({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return ye.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(t){e.wrapperNode=t}},iL(n,Vi(Vi({},this.props),{},{payload:eA(l,i,oL)})))}}],[{key:"getWithHeight",value:function(e,t){var n=Vi(Vi({},this.defaultProps),e.props).layout;return"vertical"===n&&Wo(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function aL(){if(aP)return Ib;aP=1;var e=ac(),t=c_(),n=Cr(),r=e?e.isConcatSpreadable:void 0;return Ib=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function rA(){if(sP)return kb;sP=1;var e=l_(),t=aL();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 sL(){if(lP)return Mb;return lP=1,Mb=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 lL(){if(uP)return Lb;uP=1;var e=sL()();return Lb=e}function uL(){if(cP)return jb;cP=1;var e=lL(),t=Wd();return jb=function(n,r){return n&&e(n,r,t)}}function cL(){if(fP)return Fb;fP=1;var e=zd();return Fb=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 fL(){if(dP)return Bb;dP=1;var e=uL(),t=cL()(e);return Bb=t}function dL(){if(pP)return qb;pP=1;var e=fL(),t=zd();return qb=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 pL(){if(hP)return zb;return hP=1,zb=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function hL(){if(vP)return Wb;vP=1;var e=sc();return Wb=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 vL(){if(mP)return Ub;mP=1;var e=hL();return Ub=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 mL(){if(gP)return Hb;gP=1;var e=t_(),t=r_(),n=v_(),r=dL(),o=pL(),a=sm(),i=vL(),l=Hd(),u=Cr();return Hb=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 g_(){if(yP)return Vb;return yP=1,Vb=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 oA(){if(bP)return Gb;bP=1;var e=g_(),t=Math.max;return Gb=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)}},Gb}function gL(){if(wP)return Kb;return wP=1,Kb=function(e){return function(){return e}}}function iA(){if(xP)return Yb;xP=1;var e=gl(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Yb=t}function yL(){if(_P)return Xb;_P=1;var e=gL(),t=iA(),n=Hd();return Xb=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function aA(){if($P)return Qb;$P=1;var e=Date.now;return Qb=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)}},Qb}function y_(){if(SP)return Zb;SP=1;var e=yL(),t=aA()(e);return Zb=t}function bL(){if(CP)return Jb;CP=1;var e=Hd(),t=oA(),n=y_();return Jb=function(r,o){return n(t(r,o,e),r+"")}}function wL(){if(EP)return e1;EP=1;var e=tm(),t=zd(),n=am(),r=No();return e1=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 xL(){if(PP)return t1;PP=1;var e=rA(),t=mL(),n=bL(),r=wL(),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 t1=o}lm(m_,"displayName","Legend"),lm(m_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var _L=xL();const $L=Oo(_L);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 SL(e,t){return RL(e)||PL(e,t)||EL(e,t)||CL()}function CL(){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 EL(e,t){if(e){if("string"==typeof e)return RP(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 RP(e,t)}}function RP(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 PL(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 RL(e){if(Array.isArray(e))return e}function TP(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 n1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TP(Object(n),!0).forEach((function(t){TL(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TL(e,t,n){return(t=OL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OL(e){var t=AL(e,"string");return"symbol"==Pd(t)?t:t+""}function AL(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 NL(e){return Array.isArray(e)&&xv(e[0])&&xv(e[1])?e.join(" ~ "):e}var DL=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,h=e.label,m=e.labelFormatter,v=e.accessibilityLayer,g=void 0!==v&&v,y=n1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=n1({margin:0},u),w=!Z5(h),x=w?h:"",_=Za("recharts-default-tooltip",f),k=Za("recharts-tooltip-label",p);w&&m&&null!=s&&(x=m(h,s));var P=g?{role:"status","aria-live":"assertive"}:{};return ye.createElement("div",sx({className:_,style:y},P),ye.createElement("p",{className:k,style:b},ye.isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(d?$L(s,d):s).map((function(e,t){if("none"===e.type)return null;var r=n1({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||c||NL,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=SL(f,2);u=p[0],d=p[1]}else u=f}return ye.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},xv(d)?ye.createElement("span",{className:"recharts-tooltip-item-name"},d):null,xv(d)?ye.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,ye.createElement("span",{className:"recharts-tooltip-item-value"},u),ye.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return ye.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Rd(e){return(Rd="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 rv(e,t,n){return(t=IL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IL(e){var t=kL(e,"string");return"symbol"==Rd(t)?t:t+""}function kL(e,t){if("object"!=Rd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var cd="recharts-tooltip-wrapper",ML={visibility:"hidden"};function LL(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Za(cd,rv(rv(rv(rv({},"".concat(cd,"-right"),Wo(n)&&t&&Wo(t.x)&&n>=t.x),"".concat(cd,"-left"),Wo(n)&&t&&Wo(t.x)&&n<t.x),"".concat(cd,"-bottom"),Wo(r)&&t&&Wo(t.y)&&r>=t.y),"".concat(cd,"-top"),Wo(r)&&t&&Wo(t.y)&&r<t.y))}function OP(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&&Wo(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 jL(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 FL(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=jL({translateX:n=OP({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=OP({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=ML,{cssProperties:t,cssClasses:LL({translateX:n,translateY:r,coordinate:a})}}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 AP(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 NP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AP(Object(n),!0).forEach((function(t){ux(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qL(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,lA(r.key),r)}}function zL(e,t,n){return qL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WL(e,t,n){return t=Ev(t),UL(e,sA()?Reflect.construct(t,n,Ev(e).constructor):t.apply(e,n))}function UL(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 HL(e)}function HL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(sA=function(){return!!e})()}function Ev(e){return(Ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function VL(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&&lx(e,t)}function lx(e,t){return(lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ux(e,t,n){return(t=lA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lA(e){var t=GL(e,"string");return"symbol"==Yu(t)?t:t+""}function GL(e,t){if("object"!=Yu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Yu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var DP=1,KL=function(){function e(){var t;BL(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return ux(t=WL(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),ux(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 VL(e,Wv),zL(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>DP||Math.abs(e.height-this.state.lastBoundingBox.height)>DP)&&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,h=t.viewBox,m=t.wrapperStyle,v=FL({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:h}),g=v.cssClasses,y=v.cssProperties,b=NP(NP({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},m);return ye.createElement("div",{tabIndex:-1,className:g,style:b,ref:function(t){e.wrapperNode=t}},i)}}])}(),YL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gv={isSsr:YL(),get:function(e){return gv[e]},set:function(e,t){if("string"==typeof e)gv[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){gv[t]=e[t]}))}}};function Xu(e){return(Xu="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 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 kP(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){b_(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 XL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QL(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,cA(r.key),r)}}function ZL(e,t,n){return QL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JL(e,t,n){return t=Pv(t),ej(e,uA()?Reflect.construct(t,n||[],Pv(e).constructor):t.apply(e,n))}function ej(e,t){if(t&&("object"===Xu(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 uA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(uA=function(){return!!e})()}function Pv(e){return(Pv=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&&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 b_(e,t,n){return(t=cA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cA(e){var t=rj(e,"string");return"symbol"==Xu(t)?t:t+""}function rj(e,t){if("object"!=Xu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function oj(e){return e.dataKey}function ij(e,t){return ye.isValidElement(e)?ye.cloneElement(e,t):"function"==typeof e?ye.createElement(e,t):ye.createElement(DL,t)}var r1,MP,o1,LP,i1,jP,a1,FP,s1,BP,l1,qP,w_=function(){function e(){return XL(this,e),JL(this,e,arguments)}return nj(e,Wv),ZL(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,h=t.reverseDirection,m=t.useTranslate3d,v=t.viewBox,g=t.wrapperStyle,y=d??[];u&&y.length&&(y=eA(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,oj));var b=y.length>0;return ye.createElement(KL,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:s,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:h,useTranslate3d:m,viewBox:v,wrapperStyle:g},ij(i,kP(kP({},this.props),{},{payload:y})))}}])}();function aj(){if(MP)return r1;MP=1;var e=Er();return r1=function(){return e.Date.now()}}function sj(){if(LP)return o1;LP=1;var e=/\s/;return o1=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function lj(){if(jP)return i1;jP=1;var e=sj(),t=/^\s+/;return i1=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function fA(){if(FP)return a1;FP=1;var e=lj(),t=No(),n=sc(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return a1=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 dA(){if(BP)return s1;BP=1;var e=No(),t=aj(),n=fA(),r=Math.max,o=Math.min;return s1=function(a,i,l){var u,s,c,d,f,p,h=0,m=!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,h=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||v&&e-h>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return v?o(t,c-(e-h)):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 h=e,f=setTimeout(w,i),m?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)&&(m=!!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),h=0,u=p=s=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},s1}function uj(){if(qP)return l1;qP=1;var e=dA(),t=No();return l1=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})}}b_(w_,"displayName","Tooltip"),b_(w_,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gv.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 cj=uj();const fj=Oo(cj);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 zP(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 ov(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zP(Object(n),!0).forEach((function(t){dj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dj(e,t,n){return(t=pj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pj(e){var t=hj(e,"string");return"symbol"==Td(t)?t:t+""}function hj(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)}function vj(e,t){return bj(e)||yj(e,t)||gj(e,t)||mj()}function mj(){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 gj(e,t){if(e){if("string"==typeof e)return WP(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 WP(e,t)}}function WP(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 yj(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 bj(e){if(Array.isArray(e))return e}var u1,UP,c1,HP,f1,VP,d1,GP,p1,KP,h1,YP,v1,XP,m1,QP,g1,ZP,y1,JP,b1,e2,w1,t2,x1,n2,wj=_e((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,p=e.children,h=e.debounce,m=void 0===h?0:h,v=e.id,g=e.className,y=e.onResize,b=e.style,w=void 0===b?{}:b,x=ke(null),_=ke();_.current=y,cM(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var k=vj(tt({containerWidth:o.width,containerHeight:o.height}),2),P=k[0],S=k[1],C=lt((function(e,t){S((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);We((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;C(r,o),null===(t=_.current)||void 0===t||t.call(_,r,o)};m>0&&(e=fj(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return C(r,o),t.observe(x.current),function(){t.disconnect()}}),[C,m]);var E=Ur((function(){var e=P.containerWidth,t=P.containerHeight;if(e<0||t<0)return null;mv(tv(i)||tv(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,u),mv(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=tv(i)?e:i,o=tv(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),mv(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(p)&&h9(p.type).endsWith("Chart");return ye.Children.map(p,(function(e){return ye.isValidElement(e)?ml(e,ov({width:r,height:o},a?{style:ov({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,P,i]);return ye.createElement("div",{id:v?"".concat(v):void 0,className:Za("recharts-responsive-container",g),style:ov(ov({},w),{},{width:i,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:x},E)}));function x_(){if(UP)return u1;UP=1;var e=UO()(Object.getPrototypeOf,Object);return u1=e}function xj(){if(HP)return c1;HP=1;var e=ta(),t=x_(),n=fo(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,l=a.call(Object);return c1=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 _j(){if(VP)return f1;VP=1;var e=fA(),t=1/0;return f1=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function pA(){if(GP)return d1;GP=1;var e=iA();return d1=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function hA(){if(KP)return p1;KP=1;var e=_j();return p1=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function __(){if(YP)return h1;return YP=1,h1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function vA(){if(XP)return v1;XP=1;var e=pA(),t=tm(),n=Object.prototype.hasOwnProperty;return v1=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 um(){if(QP)return m1;QP=1;var e=vA(),t=pA();return m1=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 mA(){if(ZP)return g1;ZP=1;var e=um(),t=Wd();return g1=function(n,r){return n&&e(r,t(r),n)}}function $j(){if(JP)return y1;return JP=1,y1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function Sj(){if(e2)return b1;e2=1;var e=No(),t=h_(),n=$j(),r=Object.prototype.hasOwnProperty;return b1=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 $_(){if(t2)return w1;t2=1;var e=WO(),t=Sj(),n=zd();return w1=function(r){return n(r)?e(r,!0):t(r)}}function Cj(){if(n2)return x1;n2=1;var e=um(),t=$_();return x1=function(n,r){return n&&e(r,t(r),n)}}var r2,_1,o2,$1,i2,S1,a2,C1,s2,E1,l2,P1,u2,R1,c2,T1,f2,O1,d2,A1,p2,N1,h2,D1,v2,I1,m2,k1,g2,M1,y2,L1,b2,j1,w2,F1,x2,B1,_2,q1,$2,z1,S2,gd={exports:{}};function Ej(){return r2||(r2=1,e=gd,t=gd.exports,n=Er(),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 cm(){if(o2)return _1;return o2=1,_1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function Pj(){if(i2)return $1;i2=1;var e=um(),t=u_();return $1=function(n,r){return e(n,t(n),r)}}function gA(){if(a2)return S1;a2=1;var e=l_(),t=x_(),n=u_(),r=qO(),o=Object.getOwnPropertySymbols;return S1=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function Rj(){if(s2)return C1;s2=1;var e=um(),t=gA();return C1=function(n,r){return e(n,t(n),r)}}function Tj(){if(l2)return E1;l2=1;var e=BO(),t=gA(),n=$_();return E1=function(r){return e(r,n,t)}}function Oj(){if(u2)return P1;u2=1;var e=Object.prototype.hasOwnProperty;return P1=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 S_(){if(c2)return R1;c2=1;var e=FO();return R1=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function Aj(){if(f2)return T1;f2=1;var e=S_();return T1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function Nj(){if(d2)return O1;d2=1;var e=/\w*$/;return O1=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function Dj(){if(p2)return A1;p2=1;var e=ac(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return A1=function(e){return n?Object(n.call(e)):{}}}function Ij(){if(h2)return N1;h2=1;var e=S_();return N1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function kj(){if(v2)return D1;v2=1;var e=S_(),t=Aj(),n=Nj(),r=Dj(),o=Ij();return D1=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 fm(){if(m2)return I1;m2=1;var e=No(),t=Object.create;return I1=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 Mj(){if(g2)return k1;g2=1;var e=fm(),t=x_(),n=h_();return k1=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function Lj(){if(y2)return M1;y2=1;var e=Ud(),t=fo();return M1=function(n){return t(n)&&"[object Map]"==e(n)}}function jj(){if(b2)return L1;b2=1;var e=Lj(),t=sm(),n=p_(),r=n&&n.isMap,o=r?t(r):e;return L1=o}function Fj(){if(w2)return j1;w2=1;var e=Ud(),t=fo();return j1=function(n){return t(n)&&"[object Set]"==e(n)}}function Bj(){if(x2)return F1;x2=1;var e=Fj(),t=sm(),n=p_(),r=n&&n.isSet,o=r?t(r):e;return F1=o}function yA(){if(_2)return B1;_2=1;var e=a_(),t=__(),n=vA(),r=mA(),o=Cj(),a=Ej(),i=cm(),l=Pj(),u=Rj(),s=VO(),c=Tj(),d=Ud(),f=Oj(),p=kj(),h=Mj(),m=Cr(),v=f_(),g=jj(),y=No(),b=Bj(),w=Wd(),x=$_(),_="[object Arguments]",k="[object Function]",P="[object Object]",S={};return S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[P]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[k]=S["[object WeakMap]"]=!1,B1=function C(E,N,O,T,R,j){var D,z=1&N,A=2&N,M=4&N;if(O&&(D=R?O(E,T,R,j):O(E)),void 0!==D)return D;if(!y(E))return E;var L=m(E);if(L){if(D=f(E),!z)return i(E,D)}else{var I=d(E),F=I==k||"[object GeneratorFunction]"==I;if(v(E))return a(E,z);if(I==P||I==_||F&&!R){if(D=A||F?{}:h(E),!z)return A?u(E,o(D,E)):l(E,r(D,E))}else{if(!S[I])return R?E:{};D=p(E,I,z)}}j||(j=new e);var W=j.get(E);if(W)return W;j.set(E,D),b(E)?E.forEach((function(e){D.add(C(e,N,O,e,E,j))})):g(E)&&E.forEach((function(e,t){D.set(t,C(e,N,O,t,E,j))}));var B=L?void 0:(M?A?c:s:A?x:w)(E);return t(B||E,(function(e,t){B&&(e=E[t=e]),n(D,t,C(e,N,O,t,E,j))})),D},B1}function qj(){if($2)return q1;$2=1;var e=rA();return q1=function(t){return(null==t?0:t.length)?e(t,1):[]}}function zj(){if(S2)return z1;S2=1;var e=qj(),t=oA(),n=y_();return z1=function(r){return n(t(r,void 0,e),r+"")}}gd.exports;const Wj={light:"",dark:".dark"},bA=P.createContext(null);function wA(){const e=P.useContext(bA);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Uj=P.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=P.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return k.jsx(bA.Provider,{value:{config:r},children:k.jsxs("div",{"data-chart":l,ref:a,className:se("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:[k.jsx(Hj,{id:l,config:r}),k.jsx(wj,{children:n})]})})}));Uj.displayName="Chart";const Hj=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?k.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Wj).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},OX=w_,Vj=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,hoveredItem:p,onItemHover:h},m)=>{const{config:v}=wA(),g=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=fx(v,n,r),s=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=v[i])?void 0:e.label)||i;return l?k.jsx("div",{className:se("font-medium",u),children:l(s,t)}):s?k.jsx("div",{className:se("font-medium",u),children:s}):null}),[i,l,t,o,u,v,f]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,b=t.length>10;return k.jsxs("div",{ref:m,className:se("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",b&&"min-w-[16rem]",n),children:[y?null:g,k.jsx("div",{className:se("grid gap-xxs",b&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=fx(v,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return k.jsx("div",{className:se("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",u?"":p?"opacity-40":""),onMouseEnter:()=>null==h?void 0:h(o),onMouseLeave:()=>null==h?void 0:h(null),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]):k.jsxs(k.Fragment,{children:[null!=i&&i.icon?k.jsx(i.icon,{}):!a&&k.jsx("div",{className:se("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),k.jsxs("div",{className:se("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[k.jsxs("div",{className:"grid gap-xxs",children:[y?g:null,k.jsx("span",{className:se("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==i?void 0:i.label)||e.name})]}),e.value&&k.jsx("span",{className:se("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));Vj.displayName="ChartTooltip";const AX=m_,Gj=P.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:l}=wA(),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?k.jsx("div",{ref:i,className:se("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,s=fx(l,e,i),c=!!o&&i===a;return k.jsxs("div",{ref:e=>{e?u.current[i]=e:delete u.current[i]},className:se("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":a?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=s&&s.icon&&!t?k.jsx(s.icon,{}):k.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),k.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 fx(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]}Gj.displayName="ChartLegend";const Kj=({children:e,className:t})=>k.jsx("div",{className:se("flex flex-wrap gap-1",t),children:e}),C2=({text:e,icon:t,disabled:n,avatarSrc:r,onClick:o,onRemove:a})=>k.jsxs("div",{onClick:n?void 0:o,className:se("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&&k.jsxs(sO,{className:se("size-6 text-[10px]"),children:[k.jsx(lO,{src:r,alt:e}),k.jsx(uO,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,k.jsx("span",{children:e}),a&&k.jsx("button",{onClick:e=>{e.stopPropagation(),null==a||a()},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},disabled:n,className:"pointer-events-auto cursor-pointer",children:k.jsx(Ix,{size:16})})]});function dm(e){const t=ke({value:e,previous:e});return Ur((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function pm(e){const[t,n]=tt(void 0);return fr((()=>{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 xA="Checkbox",[Yj,NX]=Sr(xA),[Xj,Qj]=Yj(xA),Zj=_e(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=tt(null),p=Rt(t,(e=>f(e))),h=ke(!1),m=!d||!!d.closest("form"),[v=!1,g]=Vo({prop:o,defaultProp:a,onChange:s}),y=ke(v);return We((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>g(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,g]),z(Xj,{scope:n,state:v,disabled:l},z(it.button,fe({type:"button",role:"checkbox","aria-checked":sl(v)?"mixed":v,"aria-required":i,"data-state":_A(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onKeyDown:ze(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:ze(e.onClick,(e=>{g((e=>!!sl(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&z(tF,{control:d,bubbles:!h.current,name:r,value:u,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),Jj="CheckboxIndicator",eF=_e(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Qj(Jj,n);return z(Ao,{present:r||sl(a.state)||!0===a.state},z(it.span,fe({"data-state":_A(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),tF=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=ke(null),i=dm(n),l=pm(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=sl(n),o.call(e,!sl(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),z("input",fe({type:"checkbox","aria-hidden":!0,defaultChecked:!sl(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sl(e){return"indeterminate"===e}function _A(e){return sl(e)?"indeterminate":e?"checked":"unchecked"}const $A=Zj,nF=eF,rF=Ji("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"}}),C_=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?k.jsx(jM,{...e}):k.jsx(Dx,{...e});return k.jsxs($A,{ref:a,className:se(e,rF({size:t,variant:n})),...o,children:[k.jsx("div",{className:se("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})}),k.jsx(nF,{className:"relative flex items-center justify-center text-current",children:k.jsx(s,{className:"size-xxxs",color:o.disabled?"var(--slate-300)":"white"})})]})}));C_.displayName=$A.displayName;var E2=1,oF=.9,iF=.8,aF=.17,W1=.1,U1=.999,sF=.9999,lF=.99,uF=/[\\\/_+.#"@\[\(\{&]/,cF=/[\\\/_+.#"@\[\(\{&]/g,fF=/[\s-]/,SA=/[\s-]/g;function dx(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?E2:lF;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),h=0;p>=0;)(u=dx(e,t,n,r,p+1,a+1,i))>h&&(p===o?u*=E2:uF.test(e.charAt(p-1))?(u*=iF,(c=e.slice(o,p-1).match(cF))&&o>0&&(u*=Math.pow(U1,c.length))):fF.test(e.charAt(p-1))?(u*=oF,(d=e.slice(o,p-1).match(SA))&&o>0&&(u*=Math.pow(U1,d.length))):(u*=aF,o>0&&(u*=Math.pow(U1,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=sF)),(u<W1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((s=dx(e,t,n,r,p+1,a+2,i))*W1>u&&(u=s*W1)),u>h&&(h=u),p=n.indexOf(f,p+1);return i[l]=h,h}function P2(e){return e.toLowerCase().replace(SA," ")}function dF(e,t,n){return dx(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,P2(e),P2(t),0,0,{})}var fd='[cmdk-group=""]',H1='[cmdk-group-items=""]',pF='[cmdk-group-heading=""]',E_='[cmdk-item=""]',R2=`${E_}:not([aria-disabled="true"])`,px="cmdk-item-select",ol="data-value",hF=(e,t,n)=>dF(e,t,n),CA=P.createContext(void 0),Vd=()=>P.useContext(CA),EA=P.createContext(void 0),P_=()=>P.useContext(EA),PA=P.createContext(void 0),RA=P.forwardRef(((e,t)=>{let n=Wu((()=>{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=Wu((()=>new Set)),o=Wu((()=>new Map)),a=Wu((()=>new Map)),i=Wu((()=>new Set)),l=TA(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:v=!0,...g}=e,y=P.useId(),b=P.useId(),w=P.useId(),x=P.useRef(null),_=CF();cl((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}}),[c]),cl((()=>{_(6,T)}),[]);let k=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)O(),E(),_(1,N);else if("value"===e&&(r||_(5,T),void 0!==(null==(o=l.current)?void 0:o.value))){let e=t??"";return void(null==(i=(a=l.current).onValueChange)||i.call(a,e))}k.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),S=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)),_(2,(()=>{E(),k.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),_(3,(()=>{O(),E(),n.current.value||N(),k.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();_(4,(()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&N(),k.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:m,listId:y,inputId:w,labelId:b,listInnerRef:x})),[]);function C(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:hF;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=x.current;j().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(H1);t?t.appendChild(e.parentElement===t?e:e.closest(`${H1} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${H1} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${fd}[${ol}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function N(){let e=j().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(ol);k.setState("value",t||void 0)}function O(){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 T(){var e,t,n;let r=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(fd))?void 0:t.querySelector(pF))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=x.current)?void 0:e.querySelector(`${E_}[aria-selected="true"]`)}function j(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(R2))}function D(e){let t=j()[e];t&&k.setState("value",t.getAttribute(ol))}function z(e){var t;let n=R(),r=j(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&k.setState("value",a.getAttribute(ol))}function A(e){let t,n=R(),r=null==n?void 0:n.closest(fd);for(;r&&!t;)r=e>0?$F(r,fd):SF(r,fd),t=null==r?void 0:r.querySelector(R2);t?k.setState("value",t.getAttribute(ol)):z(e)}let M=()=>D(j().length-1),L=e=>{e.preventDefault(),e.metaKey?M():e.altKey?A(1):z(1)},I=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?A(-1):z(-1)};return P.createElement(it.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":v&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":v&&e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),M();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=R();if(t){let e=new Event(px);t.dispatchEvent(e)}}}}},P.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:PF},u),hm(e,(e=>P.createElement(EA.Provider,{value:k},P.createElement(CA.Provider,{value:S},e)))))})),vF=P.forwardRef(((e,t)=>{var n,r;let o=P.useId(),a=P.useRef(null),i=P.useContext(PA),l=Vd(),u=TA(e),s=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;cl((()=>{if(!s)return l.item(o,null==i?void 0:i.id)}),[s]);let c=OA(o,a,[e.value,e.children,a],e.keywords),d=P_(),f=fl((e=>e.value&&e.value===c.current)),p=fl((e=>!(!s&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function h(){var e,t;m(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(P.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(px,h),()=>t.removeEventListener(px,h)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:v,value:g,onSelect:y,forceMount:b,keywords:w,...x}=e;return P.createElement(it.div,{ref:Od([a,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||l.disablePointerSelection?void 0:m,onClick:v?void 0:h},e.children)})),mF=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=Vd(),d=fl((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));cl((()=>c.group(i)),[]),OA(i,l,[e.value,e.heading,u]);let f=P.useMemo((()=>({id:i,forceMount:o})),[o]);return P.createElement(it.div,{ref:Od([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),hm(e,(e=>P.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},P.createElement(PA.Provider,{value:f},e)))))})),gF=P.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=P.useRef(null),a=fl((e=>!e.search));return n||a?P.createElement(it.div,{ref:Od([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),yF=P.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=P_(),i=fl((e=>e.search)),l=fl((e=>e.value)),u=Vd(),s=P.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${E_}[${ol}="${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(it.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)}})})),bF=P.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=P.useRef(null),i=P.useRef(null),l=Vd();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(it.div,{ref:Od([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},hm(e,(e=>P.createElement("div",{ref:Od([i,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),wF=P.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return P.createElement(Xv,{open:n,onOpenChange:r},P.createElement(Qv,{container:i},P.createElement(rc,{"cmdk-overlay":"",className:o}),P.createElement(oc,{"aria-label":e.label,"cmdk-dialog":"",className:a},P.createElement(RA,{ref:t,...l}))))})),xF=P.forwardRef(((e,t)=>fl((e=>0===e.filtered.count))?P.createElement(it.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),_F=P.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return P.createElement(it.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},hm(e,(e=>P.createElement("div",{"aria-hidden":!0},e))))})),Vr=Object.assign(RA,{List:bF,Item:vF,Input:yF,Group:mF,Separator:gF,Dialog:wF,Empty:xF,Loading:_F});function $F(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function SF(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function TA(e){let t=P.useRef(e);return cl((()=>{t.current=e})),t}var cl=typeof window>"u"?P.useEffect:P.useLayoutEffect;function Wu(e){let t=P.useRef();return void 0===t.current&&(t.current=e()),t}function Od(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function fl(e){let t=P_(),n=()=>e(t.snapshot());return P.useSyncExternalStore(t.subscribe,n,n)}function OA(e,t,n,r=[]){let o=P.useRef(),a=Vd();return cl((()=>{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(ol,l),o.current=l})),o}var CF=()=>{let[e,t]=P.useState(),n=Wu((()=>new Map));return cl((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function EF(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function hm({asChild:e,children:t},n){return e&&P.isValidElement(t)?P.cloneElement(EF(t),{ref:t.ref},n(t.props.children)):n(t)}var PF={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const RF=Xv,DX=Hx,TF=Qv,IX=ic,AA=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")))}}),[]),k.jsx(rc,{ref:n,"data-testid":"dialog_overlay",className:se("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));AA.displayName=rc.displayName;const OF=Ji("",{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"}}),AF=Ji("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),NA=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 h=k.jsxs(ic,{className:se(OF({closeVariant:o})),children:[k.jsx(Ix,{onClick:c,fill:"currentColor",className:se(AF({closeSize:a}))}),k.jsx("span",{className:"sr-only",children:"Close"})]});return k.jsxs(TF,{children:[k.jsx(AA,{className:l,onClick:c}),r&&"insideCard"!==o&&h,k.jsxs(oc,{ref:p,className:se("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&&k.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]}),k.jsx("div",{className:se("p-m",u),children:i}),r&&"insideCard"===o&&h,s&&k.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:s,className:"absolute left-m top-m",children:k.jsx(mT,{color:"var(--slate-400)",size:24})}),k.jsx(DA,{className:"empty:hidden",children:null==d?void 0:d()})]})]})}));NA.displayName=oc.displayName;const NF=({className:e,...t})=>k.jsx("div",{className:se("border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",e),...t});NF.displayName="DialogHeader";const DA=({className:e,...t})=>k.jsx("div",{className:se("flex border-t border-slate-200 p-m",e),...t});DA.displayName="DialogFooter";const DF=P.forwardRef((({className:e,...t},n)=>k.jsx(jd,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));DF.displayName=jd.displayName;const IF=P.forwardRef((({className:e,...t},n)=>k.jsx(Fd,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));IF.displayName=Fd.displayName;const IA=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr,{ref:n,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));IA.displayName=Vr.displayName;const kX=({children:e,...t})=>k.jsx(RF,{...t,children:k.jsx(NA,{className:"overflow-hidden p-0 shadow-lg",children:k.jsx(IA,{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})})}),kF=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:k.jsx(Vr.Input,{ref:n,className:se("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})})));kF.displayName=Vr.Input.displayName;const MF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.List,{ref:n,className:se("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));MF.displayName=Vr.List.displayName;const LF=P.forwardRef(((e,t)=>k.jsx(Vr.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));LF.displayName=Vr.Empty.displayName;const jF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Group,{ref:n,className:se("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})));jF.displayName=Vr.Group.displayName;const FF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Separator,{ref:n,className:se("-mx-1 h-px bg-border",e),...t})));FF.displayName=Vr.Separator.displayName;const BF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Item,{ref:n,className:se("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})));BF.displayName=Vr.Item.displayName;const qF=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function Ya(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 T2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function kA(...e){return t=>{let n=!1;const r=e.map((e=>{const r=T2(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():T2(e[t],null)}}}}function yl(...e){return P.useCallback(kA(...e),e)}function zF(e,t){const n=P.createContext(t),r=e=>{const{children:t,...r}=e,o=P.useMemo((()=>r),Object.values(r));return k.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 WF(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 k.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}\``)}]},UF(r,...t)]}function UF(...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}qF.displayName="CommandShortcut";var Rv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{},HF=P[" useId ".trim().toString()]||(()=>{}),VF=0;function V1(e){const[t,n]=P.useState(HF());return Rv((()=>{e||n((e=>e??String(VF++)))}),[e]),e||(t?`radix-${t}`:"")}function dl(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 GF({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=KF({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=dl(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 KF({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),a=dl(t);return P.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function MA(e){const t=YF(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,a=P.Children.toArray(r),i=a.find(QF);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 k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function YF(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=JF(n),o=ZF(r,n.props);return n.type!==P.Fragment&&(o.ref=t?kA(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 XF=Symbol("radix.slottable");function QF(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===XF}function ZF(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 JF(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 eB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],na=eB.reduce(((e,t)=>{const n=MA(`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),k.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function tB(e,t){e&&_i.flushSync((()=>e.dispatchEvent(t)))}function nB(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(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 O2,rB="DismissableLayer",hx="dismissableLayer.update",oB="dismissableLayer.pointerDownOutside",iB="dismissableLayer.focusOutside",LA=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jA=P.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,s=P.useContext(LA),[c,d]=P.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=P.useState({}),h=yl(t,(e=>d(e))),m=Array.from(s.layers),[v]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),y=c?m.indexOf(c):-1,b=s.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,x=lB((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));!w||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f),_=uB((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 nB((e=>{y===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&&(O2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),A2(),()=>{n&&1===s.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=O2)}}),[c,f,n,s]),P.useEffect((()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),A2())}),[c,s]),P.useEffect((()=>{const e=()=>p({});return document.addEventListener(hx,e),()=>document.removeEventListener(hx,e)}),[]),k.jsx(na.div,{...u,ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Ya(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ya(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ya(e.onPointerDownCapture,x.onPointerDownCapture)})}));jA.displayName=rB;var aB="DismissableLayerBranch",sB=P.forwardRef(((e,t)=>{const n=P.useContext(LA),r=P.useRef(null),o=yl(t,r);return P.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),k.jsx(na.div,{...e,ref:o})}));function lB(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e),r=P.useRef(!1),o=P.useRef((()=>{}));return P.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){FA(oB,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 uB(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e),r=P.useRef(!1);return P.useEffect((()=>{const e=e=>{e.target&&!r.current&&FA(iB,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 A2(){const e=new CustomEvent(hx);document.dispatchEvent(e)}function FA(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?tB(o,a):o.dispatchEvent(a)}sB.displayName=aB;var G1="focusScope.autoFocusOnMount",K1="focusScope.autoFocusOnUnmount",N2={bubbles:!1,cancelable:!0},cB="FocusScope",BA=P.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=P.useState(null),s=dl(o),c=dl(a),d=P.useRef(null),f=yl(t,(e=>u(e))),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ga(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ga(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ga(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,p.paused]),P.useEffect((()=>{if(l){I2.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(G1,N2);l.addEventListener(G1,s),l.dispatchEvent(t),t.defaultPrevented||(fB(mB(qA(l)),{select:!0}),document.activeElement===e&&Ga(l))}return()=>{l.removeEventListener(G1,s),setTimeout((()=>{const t=new CustomEvent(K1,N2);l.addEventListener(K1,c),l.dispatchEvent(t),t.defaultPrevented||Ga(e??document.body,{select:!0}),l.removeEventListener(K1,c),I2.remove(p)}),0)}}}),[l,s,c,p]);const h=P.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=dB(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ga(a,{select:!0})):(e.preventDefault(),n&&Ga(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return k.jsx(na.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})}));function fB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ga(r,{select:t}),document.activeElement!==n)return}function dB(e){const t=qA(e);return[D2(t,e),D2(t.reverse(),e)]}function qA(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 D2(e,t){for(const n of e)if(!pB(n,{upTo:t}))return n}function pB(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 hB(e){return e instanceof HTMLInputElement&&"select"in e}function Ga(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&hB(e)&&t&&e.select()}}BA.displayName=cB;var I2=vB();function vB(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=k2(e,t),e.unshift(t)},remove(t){var n;e=k2(e,t),null==(n=e[0])||n.resume()}}}function k2(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function mB(e){return e.filter((e=>"A"!==e.tagName))}var gB="Portal",zA=P.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=P.useState(!1);Rv((()=>i(!0)),[]);const l=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?Lx.createPortal(k.jsx(na.div,{...o,ref:t}),l):null}));function yB(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}zA.displayName=gB;var vm=e=>{const{present:t,children:n}=e,r=bB(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),a=yl(r.ref,wB(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:a}):null};function bB(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),i=e?"mounted":"unmounted",[l,u]=yB(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=iv(r.current);a.current="mounted"===l?e:"none"}),[l]),Rv((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=iv(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]),Rv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=iv(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=iv(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 iv(e){return(null==e?void 0:e.animationName)||"none"}function wB(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)}vm.displayName="Presence";var Y1=0;function xB(){P.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??M2()),document.body.insertAdjacentElement("beforeend",e[1]??M2()),Y1++,()=>{1===Y1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Y1--}}),[])}function M2(){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 WA=NT(),X1=function(){},mm=P.forwardRef((function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:X1,onWheelCapture:X1,onTouchMoveCapture:X1}),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,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,g=void 0===v?"div":v,y=e.gapMode,b=zx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=AT([n,t]),_=cr(cr({},b),o);return P.createElement(P.Fragment,null,c&&P.createElement(w,{sideCar:WA,removeScrollBar:s,shards:d,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?P.cloneElement(P.Children.only(l),cr(cr({},_),{ref:x})):P.createElement(g,cr({},_,{className:u,ref:x}),l))}));mm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},mm.classNames={fullWidth:bd,zeroRight:yd};var vx=!1;if(typeof window<"u")try{var av=Object.defineProperty({},"passive",{get:function(){return vx=!0,!0}});window.addEventListener("test",av,av),window.removeEventListener("test",av,av)}catch{vx=!1}var qu=!!vx&&{passive:!1},_B=function(e){return"TEXTAREA"===e.tagName},UA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!_B(e)&&"visible"===n[t])},$B=function(e){return UA(e,"overflowY")},SB=function(e){return UA(e,"overflowX")},L2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),HA(e,r)){var o=VA(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},CB=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},EB=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},HA=function(e,t){return"v"===e?$B(t):SB(t)},VA=function(e,t){return"v"===e?CB(t):EB(t)},PB=function(e,t){return"h"===e&&"rtl"===t?-1:1},RB=function(e,t,n,r,o){var a=PB(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=VA(e,l),h=p[0],m=p[1]-p[2]-a*h;(h||m)&&HA(e,l)&&(d+=m,f+=h),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},sv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},j2=function(e){return[e.deltaX,e.deltaY]},F2=function(e){return e&&"current"in e?e.current:e},TB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OB=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},AB=0,zu=[];function NB(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(AB++)[0],a=P.useState(Wx)[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=OT([e.lockRef.current],(e.shards||[]).map(F2),!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=sv(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=L2(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=L2(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 RB(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?j2(n):sv(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&TB(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(i.current.shards||[]).map(F2).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:DB(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=sv(e),r.current=void 0}),[]),d=P.useCallback((function(t){s(t.type,j2(t),t.target,l(t,e.lockRef.current))}),[]),f=P.useCallback((function(t){s(t.type,sv(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,qu),document.addEventListener("touchmove",u,qu),document.addEventListener("touchstart",c,qu),function(){zu=zu.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,qu),document.removeEventListener("touchmove",u,qu),document.removeEventListener("touchstart",c,qu)}}),[]);var p=e.removeScrollBar,h=e.inert;return P.createElement(P.Fragment,null,h?P.createElement(a,{styles:OB(o)}):null,p?P.createElement(MT,{gapMode:e.gapMode}):null)}function DB(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const IB=IT(WA,NB);var GA=P.forwardRef((function(e,t){return P.createElement(mm,cr({},e,{ref:t,sideCar:IB}))}));GA.classNames=mm.classNames;var R_="Dialog",[KA,MX]=WF(R_),[kB,Yo]=KA(R_),YA=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]=GF({prop:r,defaultProp:o,onChange:a});return k.jsx(kB,{scope:t,triggerRef:l,contentRef:u,contentId:V1(),titleId:V1(),descriptionId:V1(),open:s,onOpenChange:c,onOpenToggle:P.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};YA.displayName=R_;var XA="DialogTrigger",QA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(XA,n),a=yl(t,o.triggerRef);return k.jsx(na.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":A_(o.open),...r,ref:a,onClick:Ya(e.onClick,o.onOpenToggle)})}));QA.displayName=XA;var T_="DialogPortal",[MB,ZA]=KA(T_,{forceMount:void 0}),JA=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Yo(T_,t);return k.jsx(MB,{scope:t,forceMount:n,children:P.Children.map(r,(e=>k.jsx(vm,{present:n||a.open,children:k.jsx(zA,{asChild:!0,container:o,children:e})})))})};JA.displayName=T_;var Tv="DialogOverlay",eN=P.forwardRef(((e,t)=>{const n=ZA(Tv,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Yo(Tv,e.__scopeDialog);return a.modal?k.jsx(vm,{present:r||a.open,children:k.jsx(jB,{...o,ref:t})}):null}));eN.displayName=Tv;var LB=MA("DialogOverlay.RemoveScroll"),jB=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(Tv,n);return k.jsx(GA,{as:LB,allowPinchZoom:!0,shards:[o.contentRef],children:k.jsx(na.div,{"data-state":A_(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),pl="DialogContent",tN=P.forwardRef(((e,t)=>{const n=ZA(pl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Yo(pl,e.__scopeDialog);return k.jsx(vm,{present:r||a.open,children:a.modal?k.jsx(FB,{...o,ref:t}):k.jsx(BB,{...o,ref:t})})}));tN.displayName=pl;var FB=P.forwardRef(((e,t)=>{const n=Yo(pl,e.__scopeDialog),r=P.useRef(null),o=yl(t,n.contentRef,r);return P.useEffect((()=>{const e=r.current;if(e)return Yv(e)}),[]),k.jsx(nN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ya(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:Ya(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ya(e.onFocusOutside,(e=>e.preventDefault()))})})),BB=P.forwardRef(((e,t)=>{const n=Yo(pl,e.__scopeDialog),r=P.useRef(!1),o=P.useRef(!1);return k.jsx(nN,{...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()}})})),nN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Yo(pl,n),u=P.useRef(null),s=yl(t,u);return xB(),k.jsxs(k.Fragment,{children:[k.jsx(BA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:k.jsx(jA,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":A_(l.open),...i,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(qB,{titleId:l.titleId}),k.jsx(WB,{contentRef:u,descriptionId:l.descriptionId})]})]})})),O_="DialogTitle",rN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(O_,n);return k.jsx(na.h2,{id:o.titleId,...r,ref:t})}));rN.displayName=O_;var oN="DialogDescription",iN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(oN,n);return k.jsx(na.p,{id:o.descriptionId,...r,ref:t})}));iN.displayName=oN;var aN="DialogClose",sN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(aN,n);return k.jsx(na.button,{type:"button",...r,ref:t,onClick:Ya(e.onClick,(()=>o.onOpenChange(!1)))})}));function A_(e){return e?"open":"closed"}sN.displayName=aN;var lN="DialogTitleWarning",[LX,uN]=zF(lN,{contentName:pl,titleName:O_,docsSlug:"dialog"}),qB=({titleId:e})=>{const t=uN(lN),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},zB="DialogDescriptionWarning",WB=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uN(zB).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},UB=YA,HB=QA,VB=JA,GB=eN,KB=tN,YB=rN,XB=iN,QB=sN;function ZB(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 cN=ye.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}),lc=()=>{const e=ye.useContext(cN);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};ZB("[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 JB=24,eq=typeof window<"u"?tc:We;function B2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function tq(){return N_(/^Mac/)}function nq(){return N_(/^iPhone/)}function q2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function rq(){return N_(/^iPad/)||tq()&&navigator.maxTouchPoints>1}function fN(){return nq()||rq()}function N_(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const Q1=typeof document<"u"&&window.visualViewport;function z2(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function dN(e){for(z2(e)&&(e=e.parentElement);e&&!z2(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const oq=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Z1,lv=0;function iq(e={}){let{isDisabled:t}=e;eq((()=>{if(!t)return lv++,1===lv&&fN()&&(Z1=aq()),()=>{lv--,0===lv&&(null==Z1||Z1())}}),[t])}function aq(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=B2(sq(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=B2(dd(document,"touchstart",(n=>{e=dN(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;mx(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;mx(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",Q1&&(Q1.height<window.innerHeight?requestAnimationFrame((()=>{W2(t)})):Q1.addEventListener("resize",(()=>W2(t)),{once:!0}))})))}),!0),dd(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function sq(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 W2(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=dN(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 mx(e){return e instanceof HTMLInputElement&&!oq.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function lq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function uq(...e){return t=>e.forEach((e=>lq(e,t)))}function pN(...e){return P.useCallback(uq(...e),e)}const hN=new WeakMap;function Rn(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&&hN.set(e,r)}function cq(e,t){if(!(e&&e instanceof HTMLElement))return;let n=hN.get(e);n&&(e.style[t]=n[t])}const Tn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function uv(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(", ")[Tn(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Tn(t)?5:4]):null)}function fq(e){return 8*(Math.log(e+1)-2)}function J1(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function dq(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const nn={DURATION:.5,EASE:[.32,.72,0,1]},vN=.4,pq=.25,hq=100,mN=8,tl=16,gx=26,ew="vaul-dragging";function gN(e){const t=ye.useRef(e);return ye.useEffect((()=>{t.current=e})),ye.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function vq({defaultProp:e,onChange:t}){const n=ye.useState(e),[r]=n,o=ye.useRef(r),a=gN(t);return ye.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function yN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=vq({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=gN(n);return[i,ye.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function mq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:l="bottom",container:u,snapToSequentialPoint:s}){const[c,d]=yN({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=ye.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ye.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=ye.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),m=ye.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=ye.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)),Tn(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=ye.useMemo((()=>null!==m?null==g?void 0:g[m]:null),[g,m]),b=ye.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(u),Rn(r.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==a&&u<a?Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"0"}):Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,a,o,d]);return ye.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:h,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof m||!g||void 0===a)return null;const r=m===a-1;if(m>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?m+1:m-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:m,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===m,d=e>0;if(m===a-1&&Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.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=Tn(l)?window.innerHeight:window.innerWidth;if(r>vN&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&h)return void b(g[n.length-1]);if(c&&e<0&&i&&t(),null===m)return;b(g[m+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<g[g.length-1]||("top"===l||"left"===l)&&t>g[g.length-1]||Rn(r.current,{transform:Tn(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const gq=()=>()=>{};function yq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=lc(),a=ye.useRef(null),i=Ur((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}ye.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;dq(r&&!o?J1(document.body,{background:"black"}):gq,J1(t,{transformOrigin:Tn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`}));const n=J1(t,{borderRadius:"8px",overflow:"hidden",...Tn(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*nn.DURATION)}}}),[t,n,i])}let pd=null;function bq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,l]=ye.useState((()=>typeof window<"u"?window.location.href:"")),u=ye.useRef(0),s=ye.useCallback((()=>{if(q2()&&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=ye.useCallback((()=>{if(q2()&&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 ye.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),ye.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 bN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=pq,scrollLockTimeout:s=hq,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:v=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:P=!1,repositionInputs:S=!0,onAnimationEnd:C,container:E,autoFocus:N=!1}){var O,T;const[R=!1,j]=yN({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*nn.DURATION),e&&!v&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[D,z]=ye.useState(!1),[A,M]=ye.useState(!1),[L,I]=ye.useState(!1),F=ye.useRef(null),W=ye.useRef(null),B=ye.useRef(null),$=ye.useRef(null),U=ye.useRef(null),H=ye.useRef(!1),V=ye.useRef(null),K=ye.useRef(0),q=ye.useRef(!1),Y=ye.useRef(0),G=ye.useRef(null),X=ye.useRef((null==(O=G.current)?void 0:O.getBoundingClientRect().height)||0),Q=ye.useRef((null==(T=G.current)?void 0:T.getBoundingClientRect().width)||0),Z=ye.useRef(0),J=ye.useCallback((e=>{a&&e===oe.length-1&&(W.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ae,shouldFade:ie,getPercentageDragged:le}=mq({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:G,fadeFromIndex:f,overlayRef:F,onSnapPointChange:J,direction:w,container:E,snapToSequentialPoint:k});iq({isDisabled:!R||A||!v||L||!D||!S||!_});const{restorePositionSetting:ue}=bq({isOpen:R,modal:v,nested:y,hasBeenOpened:D,preventScrollRestoration:P,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=G.current?uv(G.current,w):null,l=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(W.current&&l.getTime()-W.current.getTime()<500)return!1;if(null!==i&&("bottom"===w?i>0:i<0))return!0;if(a&&a.length>0)return!1;if(l.getTime()-(null==(r=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 de(e){!A||!G.current||(G.current.classList.remove(ew),H.current=!1,M(!1),$.current=new Date),null==g||g(),e||j(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*nn.DURATION)}function fe(){if(!G.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=uv(G.current,w);Rn(G.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),Rn(F.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&R&&Rn(e,{borderRadius:"8px",overflow:"hidden",...Tn(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:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`},!0)}return ye.useEffect((()=>{var e;function t(){if(!G.current||!S)return;if(mx(document.activeElement)||q.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=G.current.getBoundingClientRect().height||0,i=o>.8*n;Z.current||(Z.current=o);const l=G.current.getBoundingClientRect().top;if(Math.abs(Y.current-r)>60&&(q.current=!q.current),a&&a.length>0&&oe&&te){r+=oe[te]||0}if(Y.current=r,o>t||q.current){const e=G.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?l:26)),G.current.style.height=m?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else G.current.style.height=`${Z.current}px`;a&&a.length>0&&!q.current?G.current.style.bottom="0px":G.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,a,oe]),ye.useEffect((()=>(R&&(Rn(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{cq(document.documentElement,"scrollBehavior")})),[R]),ye.createElement(UB,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?z(!0):de(!0),j(e))},open:R},ye.createElement(cN.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:G,overlayRef:F,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||G.current&&!G.current.contains(e.target)||(X.current=(null==(t=G.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=G.current)?void 0:n.getBoundingClientRect().width)||0,M(!0),B.current=new Date,fN()&&window.addEventListener("touchend",(()=>H.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=Tn(w)?e.pageY:e.pageX)},onRelease:function(e){if(!A||!G.current)return;G.current.classList.remove(ew),H.current=!1,M(!1),$.current=new Date;const t=uv(G.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===B.current)return;const n=$.current.getTime()-B.current.getTime(),r=K.current-(Tn(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(I(!0),setTimeout((()=>{I(!1)}),200)),a)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:i,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(i>vN)return de(),void(null==o||o(e,!1));var l;const s=Math.min(null!=(l=G.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=G.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:s)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(G.current&&A){const t="bottom"===w||"right"===w?1:-1,n=(K.current-(Tn(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?X.current:Q.current);const p=le(u,o);if(null!==p&&(d=p),l&&d>=1||!H.current&&!ce(e.target,o))return;if(G.current.classList.add(ew),H.current=!0,Rn(G.current,{transition:"none"}),Rn(F.current,{transition:"none"}),a&&ae({draggedDistance:n}),o&&!a){const e=fq(n),r=Math.min(-1*e,0)*t;return void Rn(G.current,{transform:Tn(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-d;if((ie||f&&te===f-1)&&(null==r||r(e,d),Rn(F.current,{opacity:`${h}`,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);Rn(s,{borderRadius:`${t}px`,transform:Tn(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=u*t;Rn(G.current,{transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:R,isDragging:A,shouldFade:ie,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Rn(G.current,{transform:Tn(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),Rn(G.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&G.current&&(V.current=setTimeout((()=>{const e=uv(G.current,w);Rn(G.current,{transition:"none",transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Tn(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Rn(G.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:oe,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:b,container:E,autoFocus:N}},n))}const wN=ye.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:l}=lc(),u=pN(t,n),s=r&&r.length>0;return l?ye.createElement(GB,{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)}));wN.displayName="Drawer.Overlay";const xN=ye.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:h,container:m,handleOnly:v,autoFocus:g}=lc(),[y,b]=ye.useState(!1),w=pN(o,a),x=ye.useRef(null),_=ye.useRef(null),k=ye.useRef(!1),P=h&&h.length>0;yq();function S(e){x.current=null,k.current=!1,l(e)}return ye.useEffect((()=>{P&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),ye.createElement(KB,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&P?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{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(k.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 k.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,k.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),S(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),S(_.current)}})}));xN.displayName="Drawer.Content";const wq=250,xq=120,_N=ye.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}=lc(),h=ye.useRef(null),m=ye.useRef(!1);function v(){window.clearTimeout(h.current),m.current=!1}return ye.createElement("div",{onClick:function(){m.current?v():window.setTimeout((()=>{!function(){if(a||e||m.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)}()}),xq)},onPointerCancel:v,onPointerDown:e=>{c&&f(e),h.current=window.setTimeout((()=>{m.current=!0}),wq)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ye.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function _q({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=lc();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return ye.createElement(bN,{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 $q(e){const t=lc(),{container:n=t.container,...r}=e;return ye.createElement(VB,{container:n,...r})}_N.displayName="Drawer.Handle";const Xo={Root:bN,NestedRoot:_q,Content:xN,Overlay:wN,Trigger:HB,Portal:$q,Handle:_N,Close:QB,Title:YB,Description:XB},Sq=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>k.jsx(Xo.Root,{direction:t,shouldScaleBackground:e,...n});Sq.displayName="Drawer";const jX=Xo.Trigger,Cq=Xo.Portal,FX=Xo.Close,$N=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Overlay,{ref:n,className:se("fixed inset-0 z-50 bg-black/5",e),...t})));$N.displayName=Xo.Overlay.displayName;const Eq=P.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>k.jsxs(Cq,{children:[k.jsx($N,{}),k.jsxs(Xo.Content,{ref:o,className:se("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&&k.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));Eq.displayName="DrawerContent";const Pq=({className:e,...t})=>k.jsx("div",{className:se("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Pq.displayName="DrawerHeader";const Rq=({className:e,...t})=>k.jsx("div",{className:se("mt-auto flex flex-col gap-2 p-4",e),...t});Rq.displayName="DrawerFooter";const Tq=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Title,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));Tq.displayName=Xo.Title.displayName;const Oq=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Description,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));function D_(e){const t=e+"CollectionProvider",[n,r]=Sr(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=ye.useRef(null),a=ye.useRef(new Map).current;return ye.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:ye.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Rt(t,a(i,n).collectionRef);return ye.createElement(ll,{ref:o},r)})),ItemSlot:ye.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=ye.useRef(null),s=Rt(t,i),c=a(l,n);return ye.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),ye.createElement(ll,{[u]:"",ref:s},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return ye.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]}Oq.displayName=Xo.Description.displayName;const Aq=Qa(void 0);function Gd(e){const t=ec(Aq);return e||t||"ltr"}const Nq=["top","right","bottom","left"],Ja=Math.min,ao=Math.max,Ov=Math.round,cv=Math.floor,es=e=>({x:e,y:e}),Dq={left:"right",right:"left",bottom:"top",top:"bottom"},Iq={start:"end",end:"start"};function yx(e,t,n){return ao(e,Ja(t,n))}function Qi(e,t){return"function"==typeof e?e(t):e}function Zi(e){return e.split("-")[0]}function uc(e){return e.split("-")[1]}function I_(e){return"x"===e?"y":"x"}function k_(e){return"y"===e?"height":"width"}function ts(e){return["top","bottom"].includes(Zi(e))?"y":"x"}function M_(e){return I_(ts(e))}function kq(e,t,n){void 0===n&&(n=!1);const r=uc(e),o=M_(e),a=k_(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Av(i)),[i,Av(i)]}function Mq(e){const t=Av(e);return[bx(e),t,bx(t)]}function bx(e){return e.replace(/start|end/g,(e=>Iq[e]))}function Lq(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 jq(e,t,n,r){const o=uc(e);let a=Lq(Zi(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(bx)))),a}function Av(e){return e.replace(/left|right|bottom|top/g,(e=>Dq[e]))}function Fq(e){return{top:0,right:0,bottom:0,left:0,...e}}function SN(e){return"number"!=typeof e?Fq(e):{top:e,right:e,bottom:e,left:e}}function Nv(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 U2(e,t,n){let{reference:r,floating:o}=e;const a=ts(t),i=M_(t),l=k_(i),u=Zi(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(uc(t)){case"start":p[i]-=f*(n&&s?-1:1);break;case"end":p[i]+=f*(n&&s?-1:1)}return p}const Bq=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}=U2(s,r,u),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:a,fn:m}=l[n],{x:v,y:g,data:y,reset:b}=await m({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&&h<=50&&(h++,"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}=U2(s,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Ad(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}=Qi(t,e),h=SN(p),m=l[f?"floating"===d?"reference":"floating":d],v=Nv(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary: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=Nv(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-w.top+h.top)/b.y,bottom:(w.bottom-v.bottom+h.bottom)/b.y,left:(v.left-w.left+h.left)/b.x,right:(w.right-v.right+h.right)/b.x}}const qq=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}=Qi(e,t)||{};if(null==s)return{};const d=SN(c),f={x:n,y:r},p=M_(o),h=k_(p),m=await i.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let k=_?_[b]:0;(!k||!await(null==i.isElement?void 0:i.isElement(_)))&&(k=l.floating[b]||a.floating[h]);const P=w/2-x/2,S=k/2-m[h]/2-1,C=Ja(d[g],S),E=Ja(d[y],S),N=C,O=k-m[h]-E,T=k/2-m[h]/2+P,R=yx(N,T,O),j=!u.arrow&&null!=uc(o)&&T!==R&&a.reference[h]/2-(T<N?C:E)-m[h]/2<0,D=j?T<N?T-N:T-O:0;return{[p]:f[p]+D,data:{[p]:R,centerOffset:T-R-D,...j&&{alignmentOffset:D}},reset:j}}}),zq=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:h="none",flipAlignment:m=!0,...v}=Qi(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=Zi(o),y=ts(l),b=Zi(l)===l,w=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=f||(b||!m?[Av(l)]:Mq(l)),_="none"!==h;!f&&_&&x.push(...jq(l,m,h,w));const k=[l,...x],P=await Ad(t,v),S=[];let C=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&S.push(P[g]),d){const e=kq(o,i,w);S.push(P[e[0]],P[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,N;const e=((null==(E=a.flip)?void 0:E.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(N=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=C.filter((e=>{if(_){const t=ts(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:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function H2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function V2(e){return Nq.some((t=>e[t]>=0))}const Wq=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Qi(e,t);switch(r){case"referenceHidden":{const e=H2(await Ad(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:V2(e)}}}case"escaped":{const e=H2(await Ad(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:V2(e)}}}default:return{}}}}};async function Uq(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Zi(n),l=uc(n),u="y"===ts(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d=Qi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}const Hq=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 Uq(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}}}}},Vq=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}=Qi(e,t),s={x:n,y:r},c=await Ad(t,u),d=ts(Zi(o)),f=I_(d);let p=s[f],h=s[d];if(a){const e="y"===f?"bottom":"right";p=yx(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";h=yx(h+c["y"===d?"top":"left"],h,h-c[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}},Gq=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}=Qi(e,t),c={x:n,y:r},d=ts(o),f=I_(d);let p=c[f],h=c[d];const m=Qi(l,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};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(Zi(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);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Kq=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}=Qi(e,t),c=await Ad(t,s),d=Zi(o),f=uc(o),p="y"===ts(o),{width:h,height:m}=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=m-c.top-c.bottom,b=h-c.left-c.right,w=Ja(m-c[v],y),x=Ja(h-c[g],b),_=!t.middlewareData.shift;let k=w,P=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(P=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=y),_&&!f){const e=ao(c.left,0),t=ao(c.right,0),n=ao(c.top,0),r=ao(c.bottom,0);p?P=h-2*(0!==e||0!==t?e+t:ao(c.left,c.right)):k=m-2*(0!==n||0!==r?n+r:ao(c.top,c.bottom))}await u({...t,availableWidth:P,availableHeight:k});const S=await i.getDimensions(l.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}};function gm(){return typeof window<"u"}function ns(e){return CN(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ra(e){var t;return null==(t=(CN(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function CN(e){return!!gm()&&(e instanceof Node||e instanceof uo(e).Node)}function bi(e){return!!gm()&&(e instanceof Element||e instanceof uo(e).Element)}function wi(e){return!!gm()&&(e instanceof HTMLElement||e instanceof uo(e).HTMLElement)}function G2(e){return!(!gm()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot)}function Kd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=To(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Yq(e){return["table","td","th"].includes(ns(e))}function Xq(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function L_(e){const t=j_(),n=bi(e)?To(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 EN(e){let t=Qu(e);for(;wi(t)&&!ym(t);){if(L_(t))return t;if(Xq(t))return null;t=Qu(t)}return null}function j_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ym(e){return["html","body","#document"].includes(ns(e))}function To(e){return uo(e).getComputedStyle(e)}function bm(e){return bi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qu(e){if("html"===ns(e))return e;const t=e.assignedSlot||e.parentNode||G2(e)&&e.host||ra(e);return G2(t)?t.host:t}function PN(e){const t=Qu(e);return ym(t)?e.ownerDocument?e.ownerDocument.body:e.body:wi(t)&&Kd(t)?t:PN(t)}function Nd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=PN(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=uo(o);if(a){const e=Qq(i);return t.concat(i,i.visualViewport||[],Kd(o)?o:[],e&&n?Nd(e):[])}return t.concat(o,Nd(o,[],n))}function Qq(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RN(e){const t=To(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Ov(n)!==a||Ov(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function F_(e){return bi(e)?e:e.contextElement}function Hu(e){const t=F_(e);if(!wi(t))return es(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=RN(t);let i=(a?Ov(n.width):n.width)/r,l=(a?Ov(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Zq=es(0);function TN(e){const t=uo(e);return j_()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Zq}function Jq(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==uo(e))&&t}function hl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=F_(e);let i=es(1);t&&(r?bi(r)&&(i=Hu(r)):i=Hu(e));const l=Jq(a,n,r)?TN(a):es(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=uo(a),t=r&&bi(r)?uo(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Hu(n),t=n.getBoundingClientRect(),r=To(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=uo(n).frameElement}}return Nv({width:c,height:d,x:u,y:s})}const ez=[":popover-open",":modal"];function ON(e){let t=!1,n=0,r=0;if(ez.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=EN(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function tz(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=ra(r),[i]=t?ON(t.floating):[!1];if(r===a||i)return n;let l={scrollLeft:0,scrollTop:0},u=es(1);const s=es(0),c=wi(r);if((c||!c&&"fixed"!==o)&&(("body"!==ns(r)||Kd(a))&&(l=bm(r)),wi(r))){const e=hl(r);u=Hu(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 nz(e){return Array.from(e.getClientRects())}function AN(e){return hl(ra(e)).left+bm(e).scrollLeft}function rz(e){const t=ra(e),n=bm(e),r=e.ownerDocument.body,o=ao(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ao(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+AN(e);const l=-n.scrollTop;return"rtl"===To(r).direction&&(i+=ao(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}function oz(e,t){const n=uo(e),r=ra(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=j_();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}function iz(e,t){const n=hl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wi(e)?Hu(e):es(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function K2(e,t,n){let r;if("viewport"===t)r=oz(e,n);else if("document"===t)r=rz(ra(e));else if(bi(t))r=iz(t,n);else{const n=TN(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Nv(r)}function NN(e,t){const n=Qu(e);return!(n===t||!bi(n)||ym(n))&&("fixed"===To(n).position||NN(n,t))}function az(e,t){const n=t.get(e);if(n)return n;let r=Nd(e,[],!1).filter((e=>bi(e)&&"body"!==ns(e))),o=null;const a="fixed"===To(e).position;let i=a?Qu(e):e;for(;bi(i)&&!ym(i);){const t=To(i),n=L_(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Kd(i)&&!n&&NN(e,i))?r=r.filter((e=>e!==i)):o=t,i=Qu(i)}return t.set(e,r),r}function sz(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?az(t,this._c):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=K2(t,n,o);return e.top=ao(r.top,e.top),e.right=Ja(r.right,e.right),e.bottom=Ja(r.bottom,e.bottom),e.left=ao(r.left,e.left),e}),K2(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lz(e){const{width:t,height:n}=RN(e);return{width:t,height:n}}function uz(e,t,n,r){const o=wi(t),a=ra(t),i="fixed"===n,l=hl(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const s=es(0);if(o||!o&&!i)if(("body"!==ns(t)||Kd(a))&&(u=bm(t)),o){const e=hl(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=AN(a));let c=l.left+u.scrollLeft-s.x,d=l.top+u.scrollTop-s.y;const[f,p,h]=ON(r);return f&&(c+=p,d+=h,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function Y2(e,t){return wi(e)&&"fixed"!==To(e).position?t?t(e):e.offsetParent:null}function DN(e,t){const n=uo(e);if(!wi(e))return n;let r=Y2(e,t);for(;r&&Yq(r)&&"static"===To(r).position;)r=Y2(r,t);return r&&("html"===ns(r)||"body"===ns(r)&&"static"===To(r).position&&!L_(r))?n:r||EN(e)||n}const cz=async function(e){const t=this.getOffsetParent||DN,n=this.getDimensions;return{reference:uz(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function fz(e){return"rtl"===To(e).direction}const dz={convertOffsetParentRelativeRectToViewportRelativeRect:tz,getDocumentElement:ra,getClippingRect:sz,getOffsetParent:DN,getElementRects:cz,getClientRects:nz,getDimensions:lz,getScale:Hu,isElement:bi,isRTL:fz};function pz(e,t){let n,r=null;const o=ra(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:-cv(c)+"px "+-cv(o.clientWidth-(s+d))+"px "+-cv(o.clientHeight-(c+f))+"px "+-cv(s)+"px",threshold:ao(0,Ja(1,u))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==u){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),a}function hz(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=F_(e),c=o||a?[...s?Nd(s):[],...Nd(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=s&&l?pz(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 h,m=u?hl(e):null;return u&&function t(){const r=hl(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const vz=Vq,mz=zq,gz=Kq,yz=Wq,X2=qq,bz=Gq,wz=(e,t,n)=>{const r=new Map,o={platform:dz,...n},a={...o.platform,_c:r};return Bq(e,t,{...o,platform:a})};var yv=typeof document<"u"?tc:We;function Dv(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(!Dv(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||Dv(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function IN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Q2(e,t){const n=IN(e);return Math.round(t*n)/n}function tw(e){const t=P.useRef(e);return yv((()=>{t.current=e})),t}function xz(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,p]=P.useState(r);Dv(f,r)||p(r);const[h,m]=P.useState(null),[v,g]=P.useState(null),y=P.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),b=P.useCallback((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=a||h,x=i||v,_=P.useRef(null),k=P.useRef(null),S=P.useRef(c),C=null!=u,E=tw(u),N=tw(o),O=tw(s),T=P.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};N.current&&(e.platform=N.current),wz(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!Dv(S.current,t)&&(S.current=t,_i.flushSync((()=>{d(t)})))}))}),[f,t,n,N,O]);yv((()=>{!1===s&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const R=P.useRef(!1);yv((()=>(R.current=!0,()=>{R.current=!1})),[]),yv((()=>{if(w&&(_.current=w),x&&(k.current=x),w&&x){if(E.current)return E.current(w,x,T);T()}}),[w,x,T,E,C]);const j=P.useMemo((()=>({reference:_,floating:k,setReference:y,setFloating:b})),[y,b]),D=P.useMemo((()=>({reference:w,floating:x})),[w,x]),z=P.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=Q2(D.floating,c.x),r=Q2(D.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...IN(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:T,refs:j,elements:D,floatingStyles:z})),[c,T,j,D,z])}const _z=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?X2({element:n.current,padding:r}).fn(t):{}:n?X2({element:n,padding:r}).fn(t):{}}}),$z=(e,t)=>({...Hq(e),options:[e,t]}),Sz=(e,t)=>({...vz(e),options:[e,t]}),Cz=(e,t)=>({...bz(e),options:[e,t]}),Ez=(e,t)=>({...mz(e),options:[e,t]}),Pz=(e,t)=>({...gz(e),options:[e,t]}),Rz=(e,t)=>({...yz(e),options:[e,t]}),Tz=(e,t)=>({..._z(e),options:[e,t]}),kN="Popper",[MN,cc]=Sr(kN),[Oz,LN]=MN(kN),Az=e=>{const{__scopePopper:t,children:n}=e,[r,o]=tt(null);return z(Oz,{scope:t,anchor:r,onAnchorChange:o},n)},Nz="PopperAnchor",Dz=_e(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=LN(Nz,n),i=ke(null),l=Rt(t,i);return We((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:z(it.div,fe({},o,{ref:l}))})),jN="PopperContent",[Iz,BX]=MN(jN),kz=_e(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...k}=e,P=LN(jN,c),[S,C]=tt(null),E=Rt(t,(e=>C(e))),[N,O]=tt(null),T=pm(N),R=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,j=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,D=d+("center"!==p?"-"+p:""),A="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},M=Array.isArray(g)?g:[g],L=M.length>0,I={padding:A,boundary:M.filter(Mz),altBoundary:L},{refs:F,floatingStyles:W,placement:B,isPositioned:$,middlewareData:U}=xz({strategy:"fixed",placement:D,whileElementsMounted:(...e)=>hz(...e,{animationFrame:"always"===x}),elements:{reference:P.anchor},middleware:[$z({mainAxis:f+j,alignmentAxis:h}),v&&Sz({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?Cz():void 0,...I}),v&&Ez({...I}),Pz({...I,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`)}}),N&&Tz({element:N,padding:m}),Lz({arrowWidth:R,arrowHeight:j}),w&&Rz({strategy:"referenceHidden",...I})]}),[H,V]=FN(B),K=Hr(_);fr((()=>{$&&(null==K||K())}),[$,K]);const q=null===(o=U.arrow)||void 0===o?void 0:o.x,Y=null===(a=U.arrow)||void 0===a?void 0:a.y,G=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[X,Q]=tt();return fr((()=>{S&&Q(window.getComputedStyle(S).zIndex)}),[S]),z("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:$?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--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},z(Iz,{scope:c,placedSide:H,onArrowChange:O,arrowX:q,arrowY:Y,shouldHideArrow:G},z(it.div,fe({"data-side":H,"data-align":V},k,{ref:E,style:{...k.style,animation:$?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}}))))}));function Mz(e){return null!==e}const Lz=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,h]=FN(l),m={start:"0%",center:"50%",end:"100%"}[h],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?m:`${v}px`,b=-f+"px"):"top"===p?(y=c?m:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function FN(e){const[t,n="center"]=e.split("-");return[t,n]}const wm=Az,B_=Dz,q_=kz,nw="rovingFocusGroup.onEntryFocus",jz={bubbles:!1,cancelable:!0},z_="RovingFocusGroup",[wx,BN,Fz]=D_(z_),[Bz,fc]=Sr(z_,[Fz]),[qz,zz]=Bz(z_),Wz=_e(((e,t)=>z(wx.Provider,{scope:e.__scopeRovingFocusGroup},z(wx.Slot,{scope:e.__scopeRovingFocusGroup},z(Uz,fe({},e,{ref:t})))))),Uz=_e(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,...c}=e,d=ke(null),f=Rt(t,d),p=Gd(a),[h=null,m]=Vo({prop:i,defaultProp:l,onChange:u}),[v,g]=tt(!1),y=Hr(s),b=BN(n),w=ke(!1),[x,_]=tt(0);return We((()=>{const e=d.current;if(e)return e.addEventListener(nw,y),()=>e.removeEventListener(nw,y)}),[y]),z(qz,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:h,onItemFocus:lt((e=>m(e)),[m]),onItemShiftTab:lt((()=>g(!0)),[]),onFocusableItemAdd:lt((()=>_((e=>e+1))),[]),onFocusableItemRemove:lt((()=>_((e=>e-1))),[])},z(it.div,fe({tabIndex:v||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:ze(e.onMouseDown,(()=>{w.current=!0})),onFocus:ze(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(nw,jz);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));qN([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:ze(e.onBlur,(()=>g(!1)))})))})),Hz="RovingFocusGroupItem",Vz=_e(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,l=lo(),u=a||l,s=zz(Hz,n),c=s.currentTabStopId===u,d=BN(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=s;return We((()=>{if(r)return f(),()=>p()}),[r,f,p]),z(wx.ItemSlot,{scope:n,id:u,focusable:r,active:o},z(it.span,fe({tabIndex:c?0:-1,"data-orientation":s.orientation},i,{ref:t,onMouseDown:ze(e.onMouseDown,(e=>{r?s.onItemFocus(u):e.preventDefault()})),onFocus:ze(e.onFocus,(()=>s.onItemFocus(u))),onKeyDown:ze(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void s.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=Yz(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?Xz(n,r+1):n.slice(r+1)}setTimeout((()=>qN(n)))}}))})))})),Gz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kz(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function Yz(e,t,n){const r=Kz(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return Gz[r]}function qN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xz(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const W_=Wz,U_=Vz,xx=["Enter"," "],Qz=["ArrowDown","PageUp","Home"],zN=["ArrowUp","PageDown","End"],Zz=[...Qz,...zN],Jz={ltr:[...xx,"ArrowRight"],rtl:[...xx,"ArrowLeft"]},eW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xm="Menu",[Dd,tW,nW]=D_(xm),[bl,WN]=Sr(xm,[nW,cc,fc]),_m=cc(),UN=fc(),[HN,is]=bl(xm),[rW,Yd]=bl(xm),oW=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=_m(t),[u,s]=tt(null),c=ke(!1),d=Hr(a),f=Gd(o);return We((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),z(wm,l,z(HN,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s},z(rW,{scope:t,onClose:lt((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:i},r)))},VN=_e(((e,t)=>{const{__scopeMenu:n,...r}=e,o=_m(n);return z(B_,fe({},o,r,{ref:t}))})),GN="MenuPortal",[iW,KN]=bl(GN,{forceMount:void 0}),aW=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=is(GN,t);return z(iW,{scope:t,forceMount:n},z(Ao,{present:n||a.open},z(Bx,{asChild:!0,container:o},r)))},Ho="MenuContent",[sW,H_]=bl(Ho),lW=_e(((e,t)=>{const n=KN(Ho,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=is(Ho,e.__scopeMenu),i=Yd(Ho,e.__scopeMenu);return z(Dd.Provider,{scope:e.__scopeMenu},z(Ao,{present:r||a.open},z(Dd.Slot,{scope:e.__scopeMenu},i.modal?z(uW,fe({},o,{ref:t})):z(cW,fe({},o,{ref:t})))))})),uW=_e(((e,t)=>{const n=is(Ho,e.__scopeMenu),r=ke(null),o=Rt(t,r);return We((()=>{const e=r.current;if(e)return Yv(e)}),[]),z(V_,fe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ze(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),cW=_e(((e,t)=>{const n=is(Ho,e.__scopeMenu);return z(V_,fe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),V_=_e(((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:p,disableOutsideScroll:h,...m}=e,v=is(Ho,n),g=Yd(Ho,n),y=_m(n),b=UN(n),w=tW(n),[x,_]=tt(null),k=ke(null),P=Rt(t,k,v.onContentChange),S=ke(0),C=ke(""),E=ke(0),N=ke(null),O=ke("right"),T=ke(0),R=h?Kv:vl,j=h?{as:ll,allowPinchZoom:!0}:void 0;We((()=>()=>window.clearTimeout(S.current)),[]),qx();const D=lt((e=>{var t,n;return O.current===(null===(t=N.current)||void 0===t?void 0:t.side)&&AW(e,null===(n=N.current)||void 0===n?void 0:n.area)}),[]);return z(sW,{scope:n,searchRef:C,onItemEnter:lt((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:lt((e=>{var t;D(e)||(null===(t=k.current)||void 0===t||t.focus(),_(null))}),[D]),onTriggerLeave:lt((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:E,onPointerGraceIntentChange:lt((e=>{N.current=e}),[])},z(R,j,z(Fx,{asChild:!0,trapped:o,onMountAutoFocus:ze(a,(e=>{var t;e.preventDefault(),null===(t=k.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},z(Vv,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},z(W_,fe({asChild:!0},b,{dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:_,onEntryFocus:ze(u,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),z(q_,fe({role:"menu","aria-orientation":"vertical","data-state":t3(v.open),"data-radix-menu-content":"",dir:g.dir},y,m,{ref:P,style:{outline:"none",...m.style},onKeyDown:ze(m.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=C.current+e,o=w().filter((e=>!e.disabled)),a=document.activeElement,i=null===(t=o.find((e=>e.ref.current===a)))||void 0===t?void 0:t.textValue,l=TW(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){C.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=k.current;if(e.target!==o||!Zz.includes(e.key))return;e.preventDefault();const a=w().filter((e=>!e.disabled)).map((e=>e.ref.current));zN.includes(e.key)&&a.reverse(),PW(a)})),onBlur:ze(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),C.current="")})),onPointerMove:ze(e.onPointerMove,Id((e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";O.current=t,T.current=e.clientX}})))})))))))})),YN=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({role:"group"},r,{ref:t}))})),fW=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({},r,{ref:t}))})),_x="MenuItem",Z2="menu.itemSelect",G_=_e(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=ke(null),i=Yd(_x,e.__scopeMenu),l=H_(_x,e.__scopeMenu),u=Rt(t,a),s=ke(!1);return z(XN,fe({},o,{ref:u,disabled:n,onClick:ze(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(Z2,{bubbles:!0,cancelable:!0});e.addEventListener(Z2,(e=>null==r?void 0:r(e)),{once:!0}),PT(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:ze(e.onPointerUp,(e=>{var t;s.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:ze(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||xx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),XN=_e(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=H_(_x,n),l=UN(n),u=ke(null),s=Rt(t,u),[c,d]=tt(!1),[f,p]=tt("");return We((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),z(Dd.ItemSlot,{scope:n,disabled:r,textValue:o??f},z(U_,fe({asChild:!0},l,{focusable:!r}),z(it.div,fe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:s,onPointerMove:ze(e.onPointerMove,Id((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:ze(e.onPointerLeave,Id((e=>i.onItemLeave(e)))),onFocus:ze(e.onFocus,(()=>d(!0))),onBlur:ze(e.onBlur,(()=>d(!1)))}))))})),dW=_e(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return z(ZN,{scope:e.__scopeMenu,checked:n},z(G_,fe({role:"menuitemcheckbox","aria-checked":Iv(n)?"mixed":n},o,{ref:t,"data-state":K_(n),onSelect:ze(o.onSelect,(()=>null==r?void 0:r(!!Iv(n)||!n)),{checkForDefaultPrevented:!1})})))})),pW="MenuRadioGroup",[hW,vW]=bl(pW,{value:void 0,onValueChange:()=>{}}),mW=_e(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Hr(r);return z(hW,{scope:e.__scopeMenu,value:n,onValueChange:a},z(YN,fe({},o,{ref:t})))})),gW="MenuRadioItem",yW=_e(((e,t)=>{const{value:n,...r}=e,o=vW(gW,e.__scopeMenu),a=n===o.value;return z(ZN,{scope:e.__scopeMenu,checked:a},z(G_,fe({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":K_(a),onSelect:ze(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),QN="MenuItemIndicator",[ZN,bW]=bl(QN,{checked:!1}),wW=_e(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=bW(QN,n);return z(Ao,{present:r||Iv(a.checked)||!0===a.checked},z(it.span,fe({},o,{ref:t,"data-state":K_(a.checked)})))})),xW=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),JN="MenuSub",[_W,e3]=bl(JN),$W=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=is(JN,t),i=_m(t),[l,u]=tt(null),[s,c]=tt(null),d=Hr(o);return We((()=>(!1===a.open&&d(!1),()=>d(!1))),[a.open,d]),z(wm,i,z(HN,{scope:t,open:r,onOpenChange:d,content:s,onContentChange:c},z(_W,{scope:t,contentId:lo(),triggerId:lo(),trigger:l,onTriggerChange:u},n)))},fv="MenuSubTrigger",SW=_e(((e,t)=>{const n=is(fv,e.__scopeMenu),r=Yd(fv,e.__scopeMenu),o=e3(fv,e.__scopeMenu),a=H_(fv,e.__scopeMenu),i=ke(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,s={__scopeMenu:e.__scopeMenu},c=lt((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return We((()=>c),[c]),We((()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}}),[l,u]),z(VN,fe({asChild:!0},s),z(XN,fe({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":t3(n.open)},e,{ref:Hv(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:ze(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:ze(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:ze(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!Jz[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),CW="MenuSubContent",EW=_e(((e,t)=>{const n=KN(Ho,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=is(Ho,e.__scopeMenu),i=Yd(Ho,e.__scopeMenu),l=e3(CW,e.__scopeMenu),u=ke(null),s=Rt(t,u);return z(Dd.Provider,{scope:e.__scopeMenu},z(Ao,{present:r||a.open},z(Dd.Slot,{scope:e.__scopeMenu},z(V_,fe({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:ze(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:ze(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:ze(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=eW[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function t3(e){return e?"open":"closed"}function Iv(e){return"indeterminate"===e}function K_(e){return Iv(e)?"indeterminate":e?"checked":"unchecked"}function PW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function RW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function TW(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=RW(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 OW(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 AW(e,t){if(!t)return!1;return OW({x:e.clientX,y:e.clientY},t)}function Id(e){return t=>"mouse"===t.pointerType?e(t):void 0}const NW=oW,DW=VN,IW=aW,kW=lW,MW=YN,LW=fW,jW=G_,FW=dW,BW=mW,qW=yW,zW=wW,WW=xW,UW=$W,HW=SW,VW=EW,n3="DropdownMenu",[GW,qX]=Sr(n3,[WN]),Pr=WN(),[KW,r3]=GW(n3),YW=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=Pr(t),s=ke(null),[c=!1,d]=Vo({prop:o,defaultProp:a,onChange:i});return z(KW,{scope:t,triggerId:lo(),triggerRef:s,contentId:lo(),open:c,onOpenChange:d,onOpenToggle:lt((()=>d((e=>!e))),[d]),modal:l},z(NW,fe({},u,{open:c,onOpenChange:d,dir:r,modal:l}),n))},XW="DropdownMenuTrigger",QW=_e(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=r3(XW,n),i=Pr(n);return z(DW,fe({asChild:!0},i),z(it.button,fe({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:Hv(t,a.triggerRef),onPointerDown:ze(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:ze(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),ZW=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Pr(t);return z(IW,fe({},r,n))},JW="DropdownMenuContent",eU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=r3(JW,n),a=Pr(n),i=ke(!1);return z(kW,fe({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:ze(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:ze(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)"}}))})),tU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(MW,fe({},o,r,{ref:t}))})),nU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(LW,fe({},o,r,{ref:t}))})),rU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(jW,fe({},o,r,{ref:t}))})),oU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(FW,fe({},o,r,{ref:t}))})),iU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(BW,fe({},o,r,{ref:t}))})),aU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(qW,fe({},o,r,{ref:t}))})),sU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(zW,fe({},o,r,{ref:t}))})),lU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(WW,fe({},o,r,{ref:t}))})),uU=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Pr(t),[l=!1,u]=Vo({prop:r,defaultProp:a,onChange:o});return z(UW,fe({},i,{open:l,onOpenChange:u}),n)},cU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(HW,fe({},o,r,{ref:t}))})),fU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(VW,fe({},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)"}}))})),dU=YW,pU=QW,o3=ZW,i3=eU,hU=tU,a3=nU,s3=rU,l3=oU,vU=iU,u3=aU,mU=sU,Y_=lU,gU=uU,c3=cU,f3=fU,zX=dU,WX=pU,UX=hU,HX=o3,VX=gU,GX=vU,yU=P.forwardRef((({className:e,inset:t,children:n,...r},o)=>k.jsxs(c3,{ref:o,className:se("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,k.jsx(gT,{className:"ml-auto h-4 w-4"})]})));yU.displayName=c3.displayName;const bU=P.forwardRef((({className:e,...t},n)=>k.jsx(f3,{ref:n,className:se("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})));bU.displayName=f3.displayName;const wU=P.forwardRef((({className:e,sideOffset:t=4,...n},r)=>k.jsx(o3,{children:k.jsx(i3,{ref:r,sideOffset:t,className:se("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]: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})})));wU.displayName=i3.displayName;const xU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(s3,{ref:r,className:se("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})));xU.displayName=s3.displayName;const _U=P.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=k.jsx(C_,{size:"default",variant:"default",checked:n});return k.jsxs(l3,{ref:a,className:se("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,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));_U.displayName=l3.displayName;const $U=P.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=k.jsx("div",{className:"flex h-xxs items-center justify-center",children:k.jsx(mU,{children:k.jsx(Dx,{size:20})})});return k.jsxs(u3,{ref:o,className:se("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,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));$U.displayName=u3.displayName;const SU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(a3,{ref:r,className:se("text-sm font-semibold",t&&"pl-xl",e),...n})));SU.displayName=a3.displayName;const CU=P.forwardRef((({className:e,...t},n)=>k.jsx(Y_,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t})));CU.displayName=Y_.displayName;const EU=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest opacity-60",e),...t});EU.displayName="DropdownMenuShortcut";const PU=_e(((e,t)=>z(it.label,fe({},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()}})))),d3=PU,RU=Ji("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),p3=P.forwardRef((({className:e,...t},n)=>k.jsx(d3,{ref:n,className:se(RU(),e),...t})));function J2(e,[t,n]){return Math.min(n,Math.max(t,e))}p3.displayName=d3.displayName;const h3=_e(((e,t)=>z(it.span,fe({},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}})))),TU=h3,OU=[" ","Enter","ArrowUp","ArrowDown"],AU=[" ","Enter"],$m="Select",[Sm,Cm,NU]=D_($m),[dc,KX]=Sr($m,[NU,cc]),X_=cc(),[DU,wl]=dc($m),[IU,kU]=dc($m),MU=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:p}=e,h=X_(t),[m,v]=tt(null),[g,y]=tt(null),[b,w]=tt(!1),x=Gd(s),[_=!1,k]=Vo({prop:r,defaultProp:o,onChange:a}),[P,S]=Vo({prop:i,defaultProp:l,onChange:u}),C=ke(null),E=!m||!!m.closest("form"),[N,O]=tt(new Set),T=Array.from(N).map((e=>e.props.value)).join(";");return z(wm,h,z(DU,{required:p,scope:t,trigger:m,onTriggerChange:v,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:lo(),value:P,onValueChange:S,open:_,onOpenChange:k,dir:x,triggerPointerDownPosRef:C,disabled:f},z(Sm.Provider,{scope:t},z(IU,{scope:e.__scopeSelect,onNativeOptionAdd:lt((e=>{O((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:lt((e=>{O((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),E?z(b3,{key:T,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:P,onChange:e=>S(e.target.value),disabled:f},void 0===P?z("option",{value:""}):null,Array.from(N)):null))},LU="SelectTrigger",jU=_e(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=X_(n),i=wl(LU,n),l=i.disabled||r,u=Rt(t,i.onTriggerChange),s=Cm(n),[c,d,f]=w3((e=>{const t=s().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=x3(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{l||(i.onOpenChange(!0),f())};return z(B_,fe({asChild:!0},a),z(it.button,fe({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":y3(i.value)?"":void 0},o,{ref:u,onClick:ze(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:ze(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:ze(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&OU.includes(e.key)&&(p(),e.preventDefault())}))})))})),FU="SelectValue",BU=_e(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,u=wl(FU,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==a,d=Rt(t,u.onValueNodeChange);return fr((()=>{s(c)}),[s,c]),z(it.span,fe({},l,{ref:d,style:{pointerEvents:"none"}}),y3(u.value)?z(vl,null,i):a)})),qU=_e(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return z(it.span,fe({"aria-hidden":!0},o,{ref:t}),r||"▼")})),zU=e=>z(Bx,fe({asChild:!0},e)),Zu="SelectContent",WU=_e(((e,t)=>{const n=wl(Zu,e.__scopeSelect),[r,o]=tt();if(fr((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?_i.createPortal(z(v3,{scope:e.__scopeSelect},z(Sm.Slot,{scope:e.__scopeSelect},z("div",null,e.children))),t):null}return z(UU,fe({},e,{ref:t}))})),Gi=10,[v3,xl]=dc(Zu),UU=_e(((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:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...g}=e,y=wl(Zu,n),[b,w]=tt(null),[x,_]=tt(null),k=Rt(t,(e=>w(e))),[P,S]=tt(null),[C,E]=tt(null),N=Cm(n),[O,T]=tt(!1),R=ke(!1);We((()=>{if(b)return Yv(b)}),[b]),qx();const j=lt((e=>{const[t,...n]=N().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[N,x]),D=lt((()=>j([P,b])),[j,P,b]);We((()=>{O&&D()}),[O,D]);const{onOpenChange:A,triggerPointerDownPosRef:M}=y;We((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=M.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=M.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,A,M]),We((()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[A]);const[L,I]=w3((e=>{const t=N().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=x3(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),F=lt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(R.current=!0))}),[y.value]),W=lt((()=>null==b?void 0:b.focus()),[b]),B=lt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&E(e)}),[y.value]),$="popper"===r?eR:HU,U=$===eR?{side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v}:{};return z(v3,{scope:n,content:b,viewport:x,onViewportChange:_,itemRefCallback:F,selectedItem:P,onItemLeave:W,itemTextRefCallback:B,focusSelectedItem:D,selectedItemText:C,position:r,isPositioned:O,searchRef:L},z(Kv,{as:ll,allowPinchZoom:!0},z(Fx,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ze(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},z(Vv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},z($,fe({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},g,U,{onPlaced:()=>T(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ze(g.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>j(t))),e.preventDefault()}}))}))))))})),HU=_e(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=wl(Zu,n),i=xl(Zu,n),[l,u]=tt(null),[s,c]=tt(null),d=Rt(t,(e=>c(e))),f=Cm(n),p=ke(!1),h=ke(!0),{viewport:m,selectedItem:v,selectedItemText:g,focusSelectedItem:y}=i,b=lt((()=>{if(a.trigger&&a.valueNode&&l&&s&&m&&v&&g){const e=a.trigger.getBoundingClientRect(),t=s.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=g.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-Gi,d=J2(a,[Gi,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-Gi,d=J2(a,[Gi,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const i=f(),u=window.innerHeight-2*Gi,c=m.scrollHeight,d=window.getComputedStyle(s),h=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*v.offsetHeight,w),_=window.getComputedStyle(m),k=parseInt(_.paddingTop,10),P=parseInt(_.paddingBottom,10),S=e.top+e.height/2-Gi,C=u-S,E=v.offsetHeight/2,N=h+y+(v.offsetTop+E),O=w-N;if(N<=S){const e=v===i[i.length-1].ref.current;l.style.bottom="0px";const t=s.clientHeight-m.offsetTop-m.offsetHeight,n=N+Math.max(C,E+(e?P:0)+t+b);l.style.height=n+"px"}else{const e=v===i[0].ref.current;l.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?k:0)+E)+O;l.style.height=t+"px",m.scrollTop=N-S+m.offsetTop}l.style.margin=`${Gi}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,a.trigger,a.valueNode,l,s,m,v,g,a.dir,r]);fr((()=>b()),[b]);const[w,x]=tt();fr((()=>{s&&x(window.getComputedStyle(s).zIndex)}),[s]);const _=lt((e=>{e&&!0===h.current&&(b(),null==y||y(),h.current=!1)}),[b,y]);return z(VU,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_},z("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},z(it.div,fe({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),eR=_e(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Gi,...a}=e,i=X_(n);return z(q_,fe({},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)"}}))})),[VU,Q_]=dc(Zu,{}),tR="SelectViewport",GU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=xl(tR,n),a=Q_(tR,n),i=Rt(t,o.onViewportChange),l=ke(0);return z(vl,null,z("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}"}}),z(Sm.Slot,{scope:n},z(it.div,fe({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:ze(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*Gi,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}))}))))})),KU="SelectGroup",[YU,XU]=dc(KU),QU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=lo();return z(YU,{scope:n,id:o},z(it.div,fe({role:"group","aria-labelledby":o},r,{ref:t})))})),ZU="SelectLabel",JU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=XU(ZU,n);return z(it.div,fe({id:o.id},r,{ref:t}))})),$x="SelectItem",[eH,m3]=dc($x),tH=_e(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=wl($x,n),u=xl($x,n),s=l.value===r,[c,d]=tt(a??""),[f,p]=tt(!1),h=Rt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),m=lo(),v=()=>{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 z(eH,{scope:n,value:r,disabled:o,textId:m,isSelected:s,onItemTextChange:lt((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},z(Sm.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},z(it.div,fe({role:"option","aria-labelledby":m,"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:ze(i.onFocus,(()=>p(!0))),onBlur:ze(i.onBlur,(()=>p(!1))),onPointerUp:ze(i.onPointerUp,v),onPointerMove:ze(i.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:ze(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:ze(i.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(AU.includes(e.key)&&v()," "===e.key&&e.preventDefault())}))}))))})),dv="SelectItemText",nH=_e(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=wl(dv,n),l=xl(dv,n),u=m3(dv,n),s=kU(dv,n),[c,d]=tt(null),f=Rt(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)})),p=null==c?void 0:c.textContent,h=Ur((()=>z("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=s;return fr((()=>(m(h),()=>v(h))),[m,v,h]),z(vl,null,z(it.span,fe({id:u.textId},a,{ref:f})),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?_i.createPortal(a.children,i.valueNode):null)})),rH="SelectItemIndicator",oH=_e(((e,t)=>{const{__scopeSelect:n,...r}=e;return m3(rH,n).isSelected?z(it.span,fe({"aria-hidden":!0},r,{ref:t})):null})),nR="SelectScrollUpButton",iH=_e(((e,t)=>{const n=xl(nR,e.__scopeSelect),r=Q_(nR,e.__scopeSelect),[o,a]=tt(!1),i=Rt(t,r.onScrollButtonChange);return fr((()=>{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?z(g3,fe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),rR="SelectScrollDownButton",aH=_e(((e,t)=>{const n=xl(rR,e.__scopeSelect),r=Q_(rR,e.__scopeSelect),[o,a]=tt(!1),i=Rt(t,r.onScrollButtonChange);return fr((()=>{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?z(g3,fe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),g3=_e(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=xl("SelectScrollButton",n),i=ke(null),l=Cm(n),u=lt((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return We((()=>()=>u()),[u]),fr((()=>{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]),z(it.div,fe({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:ze(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:ze(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:ze(o.onPointerLeave,(()=>{u()}))}))})),sH=_e(((e,t)=>{const{__scopeSelect:n,...r}=e;return z(it.div,fe({"aria-hidden":!0},r,{ref:t}))}));function y3(e){return""===e||void 0===e}const b3=_e(((e,t)=>{const{value:n,...r}=e,o=ke(null),a=Rt(t,o),i=dm(n);return We((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),z(h3,{asChild:!0},z("select",fe({},r,{ref:a,defaultValue:n})))}));function w3(e){const t=Hr(e),n=ke(""),r=ke(0),o=lt((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=lt((()=>{n.current="",window.clearTimeout(r.current)}),[]);return We((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function x3(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=lH(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 lH(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}b3.displayName="BubbleSelect";const _3=MU,$3=jU,S3=BU,uH=qU,cH=zU,C3=WU,fH=GU,E3=QU,P3=JU,R3=tH,dH=nH,pH=oH,T3=iH,O3=aH,A3=sH,hH=_3,N3=P.forwardRef((({...e},t)=>k.jsx(hH,{ref:t,...e})));N3.displayName=_3.displayName;const D3=P.forwardRef(((e,t)=>k.jsx(E3,{ref:t,...e})));D3.displayName=E3.displayName;const I3=P.forwardRef(((e,t)=>k.jsx(S3,{ref:t,...e})));I3.displayName=S3.displayName;const Z_=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>k.jsxs("div",{className:"w-full",children:[k.jsxs($3,{ref:i,className:se("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-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...a,children:[k.jsxs("div",{className:"flex flex-1 items-center gap-xxs",children:[o&&k.jsx("span",{className:se("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),k.jsx(uH,{asChild:!0,children:k.jsx(vT,{size:20})})]}),n||r?r?k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[k.jsx(bT,{size:16}),r]}):k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[k.jsx(kM,{size:16}),n]}):null]})));Z_.displayName="SelectTriggerWrapper";const k3=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>k.jsx(Z_,{ref:i,className:se("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));k3.displayName=$3.displayName;const M3=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 k.jsx(cH,{children:k.jsx(C3,{ref:o,className:se("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:k.jsx(fH,{className:se("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})})})}));M3.displayName=C3.displayName;const L3=P.forwardRef((({className:e,...t},n)=>k.jsx(P3,{ref:n,className:se("text-sm font-medium text-slate-900",e),...t})));L3.displayName=P3.displayName;const j3=P.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=k.jsx(pH,{children:k.jsx(Dx,{size:20})});return k.jsxs(R3,{ref:a,className:se("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,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:k.jsx(dH,{children:r})}),t&&"right"===n&&i]})}));j3.displayName=R3.displayName;const F3=P.forwardRef((({className:e,...t},n)=>k.jsx(A3,{ref:n,className:se("-mx-1 my-1 h-px bg-slate-200",e),...t})));F3.displayName=A3.displayName;const vH=(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}},mH=P.forwardRef((({className:e,selectedValues:t=[],placeholder:n,onRemoveValue:r,icon:o,caption:a,error:i,...l},u)=>{const{containerRef:s,visibleCount:c}=vH(t,r),d=t.length-c;return k.jsx(Z_,{ref:u,className:e,caption:a,error:i,icon:o,...l,children:k.jsx("div",{ref:s,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===t.length?k.jsx("span",{children:n||"Select options..."}):k.jsxs(Kj,{children:[t.slice(0,c).map((e=>{const t="string"==typeof e?e:e.value;return k.jsx(C2,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==r?void 0:r(t)},t)})),d>0&&k.jsx(C2,{text:`+${d}`})]})})})}));mH.displayName="SelectMultiTrigger";const gH=P.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:a,children:i,...l},u)=>{const s=n?k.jsx(yT,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):k.jsx(C_,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return k.jsxs("div",{ref:u,className:se("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",{"pointer-events-none":n},a),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...l,children:["left"===r&&s,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:i}),"right"===r&&s]})}));gH.displayName="SelectCheckboxItem";const yH=P.forwardRef((({className:e,...t},n)=>k.jsx(T3,{ref:n,className:se("flex cursor-default items-center justify-center py-xxs",e),...t,children:k.jsx(AM,{size:16})})));yH.displayName=T3.displayName;const bH=P.forwardRef((({className:e,...t},n)=>k.jsx(O3,{ref:n,className:se("flex cursor-default items-center justify-center p-xxs",e),...t,children:k.jsx(vT,{size:16})})));bH.displayName=O3.displayName;const wH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));wH.displayName="SelectActions";const xH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));xH.displayName="SelectFooter";const YX=fM,B3=P.createContext({}),XX=({...e})=>k.jsx(B3.Provider,{value:{name:e.name},children:k.jsx(dM,{...e})}),as=()=>{const e=P.useContext(B3),t=P.useContext(q3),n=pM();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}},q3=P.createContext({}),_H=P.forwardRef((({className:e,...t},n)=>{const r=P.useId();return k.jsx(q3.Provider,{value:{id:r},children:k.jsx("div",{ref:n,className:se("mt-[8px]",e),...t})})}));_H.displayName="FormItem";const $H=P.forwardRef((({className:e,isRequired:t,...n},r)=>{var o;const{formItemId:a}=as();return k.jsx(p3,{ref:r,className:se("mb-2 text-sm font-medium",e),htmlFor:a,...n,children:t?`*${null==(o=n.children)?void 0:o.toString()}`:n.children})}));$H.displayName="FormLabel";const SH=P.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=as();return k.jsx(os,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));SH.displayName="FormControl";const CH=P.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=as();return k.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})}));CH.displayName="FormDescription";const EH=P.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=as(),i=o?String(null==o?void 0:o.message):t;return i?k.jsxs("p",{ref:r,id:a,className:se("flex items-center gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[k.jsx(bT,{size:16,className:"text-red-dark"})," ",i]}):null}));EH.displayName="FormMessage";const PH=P.forwardRef((({...e},t)=>{const{name:n}=as();return k.jsx(N3,{ref:t,name:n,...e})}));PH.displayName="FormSelect";const RH=P.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=as();return k.jsx(k3,{ref:r,id:o,className:e,...n,children:t})}));RH.displayName="FormSelectTrigger";const TH=P.forwardRef(((e,t)=>k.jsx(M3,{ref:t,...e})));TH.displayName="FormSelectContent";const OH=P.forwardRef(((e,t)=>k.jsx(j3,{ref:t,...e})));OH.displayName="FormSelectItem";const AH=P.forwardRef(((e,t)=>k.jsx(D3,{ref:t,...e})));AH.displayName="FormSelectGroup";const NH=P.forwardRef(((e,t)=>k.jsx(L3,{ref:t,...e})));NH.displayName="FormSelectLabel";const DH=P.forwardRef(((e,t)=>k.jsx(F3,{ref:t,...e})));DH.displayName="FormSelectSeparator";const IH=P.forwardRef(((e,t)=>k.jsx(I3,{ref:t,...e})));function Ro(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 z3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>Qa(e)));return function(n){const r=(null==n?void 0:n[e])||t;return Ur((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=Qa(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,l=(null==n?void 0:n[e][a])||o,u=Ur((()=>i),Object.values(i));return z(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=ec(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},kH(r,...t)]}function kH(...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 Ur((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function pc(e){const t=ke(e);return We((()=>{t.current=e})),Ur((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function MH({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=LH({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=pc(n);return[i,lt((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function LH({defaultProp:e,onChange:t}){const n=tt(e),[r]=n,o=ke(r),a=pc(t);return We((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function jH(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function FH(...e){return t=>e.forEach((e=>jH(e,t)))}function BH(...e){return lt(FH(...e),e)}function _l(e){return e.split("-")[0]}function Xd(e){return e.split("-")[1]}function hc(e){return["top","bottom"].includes(_l(e))?"x":"y"}function J_(e){return"y"===e?"height":"width"}function oR(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=J_(l),s=r[u]/2-o[u]/2,c="x"===l;let d;switch(_l(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(Xd(t)){case"start":d[l]-=s*(n&&c?-1:1);break;case"end":d[l]+=s*(n&&c?-1:1)}return d}IH.displayName="FormSelectValue";const qH=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}=oR(u,r,l),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:h,fn:m}=a[n],{x:v,y:g,data:y,reset:b}=await m({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,[h]:{...f[h],...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}=oR(u,d,l))),n=-1)}return{x:s,y:c,placement:d,strategy:o,middlewareData:f}};function W3(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 kv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function kd(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,h=W3(p),m=l[f?"floating"===d?"reference":"floating":d],v=kv(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g=kv(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+h.top,bottom:g.bottom-v.bottom+h.bottom,left:v.left-g.left+h.left,right:g.right-v.right+h.right}}const zH=Math.min,rl=Math.max;function Sx(e,t,n){return rl(e,zH(t,n))}const iR=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=W3(r),c={x:o,y:a},d=hc(i),f=Xd(i),p=J_(d),h=await u.getDimensions(n),m="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[m],k=w-h[p]-s[v],P=w/2-h[p]/2+x,S=Sx(_,P,k),C=("start"===f?s[m]:s[v])>0&&P!==S&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(C?P<_?_-P:k-P:0),data:{[d]:S,centerOffset:P-S}}}}),WH={left:"right",right:"left",bottom:"top",top:"bottom"};function Mv(e){return e.replace(/left|right|bottom|top/g,(e=>WH[e]))}function UH(e,t,n){void 0===n&&(n=!1);const r=Xd(e),o=hc(e),a=J_(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Mv(i)),{main:i,cross:Mv(i)}}const HH={start:"end",end:"start"};function aR(e){return e.replace(/start|end/g,(e=>HH[e]))}const U3=["top","right","bottom","left"];U3.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const VH=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,...h}=e,m=_l(r),v=[i,...d||(m!==i&&p?function(e){const t=Mv(e);return[aR(e),t,aR(t)]}(i):[Mv(i)])],g=await kd(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(g[m]),c){const{main:e,cross:t}=UH(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 sR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lR(e){return U3.some((t=>e[t]>=0))}const GH=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=sR(await kd(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:lR(t)}}}case"escaped":{const t=sR(await kd(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:lR(t)}}}default:return{}}}}},KH=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=_l(n),l=Xd(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:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),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 H3(e){return"x"===e?"y":"x"}const YH=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 kd(t,u),d=hc(_l(o)),f=H3(d);let p=s[d],h=s[f];if(a){const e="y"===d?"bottom":"right";p=Sx(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";h=Sx(h+c["y"===f?"top":"left"],h,h-c[e])}const m=l.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},XH=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=H3(d);let p=c[d],h=c[f];const m="function"==typeof l?l({...a,placement:o}):l,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};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(_l(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);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},QH=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 kd(t,l),s=_l(n),c=Xd(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=rl(u.left,0),h=rl(u.right,0),m=rl(u.top,0),v=rl(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==v?m+v:rl(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:rl(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 V3(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function oa(e){if(null==e)return window;if(!V3(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qd(e){return oa(e).getComputedStyle(e)}function Ki(e){return V3(e)?"":e?(e.nodeName||"").toLowerCase():""}function G3(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function xi(e){return e instanceof oa(e).HTMLElement}function rs(e){return e instanceof oa(e).Element}function e$(e){return!(typeof ShadowRoot>"u")&&(e instanceof oa(e).ShadowRoot||e instanceof ShadowRoot)}function Em(e){const{overflow:t,overflowX:n,overflowY:r}=Qd(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function ZH(e){return["table","td","th"].includes(Ki(e))}function uR(e){const t=/firefox/i.test(G3()),n=Qd(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 K3(){return!/^((?!chrome|android).)*safari/i.test(G3())}const cR=Math.min,xd=Math.max,Lv=Math.round;function Yi(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&&xi(e)&&(u=e.offsetWidth>0&&Lv(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Lv(l.height)/e.offsetHeight||1);const c=rs(e)?oa(e):window,d=!K3()&&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,h=l.width/u,m=l.height/s;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function Xa(e){return(t=e,(t instanceof oa(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Pm(e){return rs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y3(e){return Yi(Xa(e)).left+Pm(e).scrollLeft}function JH(e,t,n){const r=xi(t),o=Xa(t),a=Yi(e,r&&function(e){const t=Yi(e);return Lv(t.width)!==e.offsetWidth||Lv(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"!==Ki(t)||Em(o))&&(i=Pm(t)),xi(t)){const e=Yi(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Y3(o));return{x:a.left+i.scrollLeft-l.x,y:a.top+i.scrollTop-l.y,width:a.width,height:a.height}}function X3(e){return"html"===Ki(e)?e:e.assignedSlot||e.parentNode||(e$(e)?e.host:null)||Xa(e)}function fR(e){return xi(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Cx(e){const t=oa(e);let n=fR(e);for(;n&&ZH(n)&&"static"===getComputedStyle(n).position;)n=fR(n);return n&&("html"===Ki(n)||"body"===Ki(n)&&"static"===getComputedStyle(n).position&&!uR(n))?t:n||function(e){let t=X3(e);for(e$(t)&&(t=t.host);xi(t)&&!["html","body"].includes(Ki(t));){if(uR(t))return t;t=t.parentNode}return null}(e)||t}function dR(e){if(xi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Yi(e);return{width:t.width,height:t.height}}function Q3(e){const t=X3(e);return["html","body","#document"].includes(Ki(t))?e.ownerDocument.body:xi(t)&&Em(t)?t:Q3(t)}function jv(e,t){var n;void 0===t&&(t=[]);const r=Q3(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=oa(r),i=o?[a].concat(a.visualViewport||[],Em(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(jv(i))}function pR(e,t,n){return"viewport"===t?kv(function(e,t){const n=oa(e),r=Xa(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=K3();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}(e,n)):rs(t)?function(e,t){const n=Yi(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):kv(function(e){var t;const n=Xa(e),r=Pm(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+Y3(e);const u=-r.scrollTop;return"rtl"===Qd(o||n).direction&&(l+=xd(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:u}}(Xa(e)))}function eV(e){const t=jv(e),n=["absolute","fixed"].includes(Qd(e).position)&&xi(e)?Cx(e):e;return rs(n)?t.filter((e=>rs(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&e$(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Ki(e))):[]}const tV={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?eV(t):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=pR(t,n,o);return e.top=xd(r.top,e.top),e.right=cR(r.right,e.right),e.bottom=cR(r.bottom,e.bottom),e.left=xd(r.left,e.left),e}),pR(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=xi(n),a=Xa(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ki(n)||Em(a))&&(i=Pm(n)),xi(n))){const e=Yi(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:rs,getDimensions:dR,getOffsetParent:Cx,getDocumentElement:Xa,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:JH(t,Cx(n),r),floating:{...dR(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Qd(e).direction};function nV(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?[...rs(e)?jv(e):[],...jv(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})),rs(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Yi(e):null;return l&&function t(){const r=Yi(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 rV=(e,t,n)=>qH(e,t,{platform:tV,...n});var Ex=typeof document<"u"?tc:We;function Px(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(!Px(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||Px(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function oV(e){const t=P.useRef(e);return Ex((()=>{t.current=e})),t}function iV(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=oV(o),u=P.useRef(null),[s,c]=P.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=P.useState(t);Px(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=P.useCallback((()=>{!a.current||!i.current||rV(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&_i.flushSync((()=>{c(e)}))}))}),[d,n,r]);Ex((()=>{h.current&&p()}),[p]);const h=P.useRef(!1);Ex((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=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,p);u.current=e}else p()}),[p,l]),v=P.useCallback((e=>{a.current=e,m()}),[m]),g=P.useCallback((e=>{i.current=e,m()}),[m]),y=P.useMemo((()=>({reference:a,floating:i})),[]);return P.useMemo((()=>({...s,update:p,refs:y,reference:v,floating:g})),[s,p,y,v,g])}const aV=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?iR({element:t.current,padding:n}).fn(e):{}:t?iR({element:t,padding:n}).fn(e):{}}};function sV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function lV(...e){return t=>e.forEach((e=>sV(e,t)))}const Z3=_e(((e,t)=>{const{children:n,...r}=e,o=so.toArray(n),a=o.find(cV);if(a){const e=a.props.children,n=o.map((t=>t===a?so.count(e)>1?so.only(null):Xi(e)?e.props.children:null:t));return z(Rx,fe({},r,{ref:t}),Xi(e)?ml(e,void 0,n):null)}return z(Rx,fe({},r,{ref:t}),n)}));Z3.displayName="Slot";const Rx=_e(((e,t)=>{const{children:n,...r}=e;return Xi(n)?ml(n,{...fV(r,n.props),ref:lV(t,n.ref)}):so.count(n)>1?so.only(null):null}));Rx.displayName="SlotClone";const uV=({children:e})=>z(vl,null,e);function cV(e){return Xi(e)&&e.type===uV}function fV(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 dV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ju=dV.reduce(((e,t)=>{const n=_e(((e,n)=>{const{asChild:r,...o}=e,a=r?Z3:t;return We((()=>{window[Symbol.for("radix-ui")]=!0}),[]),z(a,fe({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function pV(e,t){e&&_i.flushSync((()=>e.dispatchEvent(t)))}function hV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function vV(...e){return t=>e.forEach((e=>hV(e,t)))}function J3(...e){return lt(vV(...e),e)}const al=null!=globalThis&&globalThis.document?tc:()=>{};function mV(e){const[t,n]=tt(void 0);return al((()=>{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 eD="Popper",[t$,tD]=z3(eD),[gV,nD]=t$(eD),yV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=tt(null);return z(gV,{scope:t,anchor:r,onAnchorChange:o},n)},bV="PopperAnchor",wV=_e(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=nD(bV,n),i=ke(null),l=J3(t,i);return We((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:z(Ju.div,fe({},o,{ref:l}))})),Fv="PopperContent",[xV,QX]=t$(Fv),[_V,$V]=t$(Fv,{hasParent:!1,positionUpdateFns:new Set}),SV=_e(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,..._}=e,k=nD(Fv,c),[P,S]=tt(null),C=J3(t,(e=>S(e))),[E,N]=tt(null),O=mV(E),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,R=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,j=d+("center"!==p?"-"+p:""),D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},A=Array.isArray(v)?v:[v],M=A.length>0,L={padding:D,boundary:A.filter(EV),altBoundary:M},{reference:I,floating:F,strategy:W,x:B,y:$,placement:U,middlewareData:H,update:V}=iV({strategy:"fixed",placement:j,whileElementsMounted:nV,middleware:[PV(),KH({mainAxis:f+R,alignmentAxis:h}),w?YH({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?XH():void 0,...L}):void 0,E?aV({element:E,padding:m}):void 0,w?VH({...L}):void 0,QH({...L,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),RV({arrowWidth:T,arrowHeight:R}),b?GH({strategy:"referenceHidden"}):void 0].filter(CV)});al((()=>{I(k.anchor)}),[I,k.anchor]);const K=null!==B&&null!==$,[q,Y]=rD(U),G=pc(x);al((()=>{K&&(null==G||G())}),[K,G]);const X=null===(o=H.arrow)||void 0===o?void 0:o.x,Q=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]=tt();al((()=>{P&&ee(window.getComputedStyle(P).zIndex)}),[P]);const{hasParent:te,positionUpdateFns:ne}=$V(Fv,c),re=!te;tc((()=>{if(!re)return ne.add(V),()=>{ne.delete(V)}}),[re,ne,V]),al((()=>{re&&K&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,K,ne]);const oe={"data-side":q,"data-align":Y,..._,ref:C,style:{..._.style,animation:K?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return z("div",{ref:F,"data-radix-popper-content-wrapper":"",style:{position:W,left:0,top:0,transform:K?`translate3d(${Math.round(B)}px, ${Math.round($)}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},z(xV,{scope:c,placedSide:q,onArrowChange:N,arrowX:X,arrowY:Q,shouldHideArrow:Z},re?z(_V,{scope:c,hasParent:!0,positionUpdateFns:ne},z(Ju.div,oe)):z(Ju.div,oe)))}));function CV(e){return void 0!==e}function EV(e){return null!==e}const PV=()=>({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`),{}}}),RV=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,h]=rD(l),m={start:"0%",center:"50%",end:"100%"}[h],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?m:`${v}px`,b=-f+"px"):"top"===p?(y=c?m:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function rD(e){const[t,n="center"]=e.split("-");return[t,n]}const TV=yV,OV=wV,AV=SV,NV=_e(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?Lx.createPortal(z(Ju.div,fe({},o,{ref:t})),r):null}));function DV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function IV(...e){return t=>e.forEach((e=>DV(e,t)))}function kV(...e){return lt(IV(...e),e)}function MV(e,t){return cT(((e,n)=>t[e][n]??e),e)}const n$=e=>{const{present:t,children:n}=e,r=LV(t),o="function"==typeof n?n({present:r.isPresent}):so.only(n),a=kV(r.ref,o.ref);return"function"==typeof n||r.isPresent?ml(o,{ref:a}):null};function LV(e){const[t,n]=tt(),r=ke({}),o=ke(e),a=ke("none"),i=e?"mounted":"unmounted",[l,u]=MV(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return We((()=>{const e=pv(r.current);a.current="mounted"===l?e:"none"}),[l]),al((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=pv(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]),al((()=>{if(t){const e=e=>{const n=pv(r.current).includes(e.animationName);e.target===t&&n&&_i.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=pv(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:lt((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function pv(e){return(null==e?void 0:e.animationName)||"none"}function jV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function FV(...e){return t=>e.forEach((e=>jV(e,t)))}function BV(...e){return lt(FV(...e),e)}function qV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e);We((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}n$.displayName="Presence";const Tx="dismissableLayer.update",zV="dismissableLayer.pointerDownOutside",WV="dismissableLayer.focusOutside";let hR;const UV=Qa({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),HV=_e(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...s}=e,c=ec(UV),[d,f]=tt(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=tt({}),m=BV(t,(e=>f(e))),v=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=VV((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p),k=GV((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())}),p);return qV((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),We((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(hR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),vR(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=hR)}}),[d,p,r,c]),We((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),vR())}),[d,c]),We((()=>{const e=()=>h({});return document.addEventListener(Tx,e),()=>document.removeEventListener(Tx,e)}),[]),z(Ju.div,fe({},s,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Ro(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ro(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ro(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function VV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=ke(!1),o=ke((()=>{}));return We((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){oD(zV,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 GV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=ke(!1);return We((()=>{const e=e=>{e.target&&!r.current&&oD(WV,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 vR(){const e=new CustomEvent(Tx);document.dispatchEvent(e)}function oD(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?pV(o,a):o.dispatchEvent(a)}let rw;const iD="HoverCard",[aD,ZX]=z3(iD,[tD]),r$=tD(),[KV,Rm]=aD(iD),YV=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,u=r$(t),s=ke(0),c=ke(0),d=ke(!1),f=ke(!1),[p=!1,h]=MH({prop:r,defaultProp:o,onChange:a}),m=lt((()=>{clearTimeout(c.current),s.current=window.setTimeout((()=>h(!0)),i)}),[i,h]),v=lt((()=>{clearTimeout(s.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>h(!1)),l))}),[l,h]),g=lt((()=>h(!1)),[h]);return We((()=>()=>{clearTimeout(s.current),clearTimeout(c.current)}),[]),z(KV,{scope:t,open:p,onOpenChange:h,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},z(TV,u,n))},XV="HoverCardTrigger",QV=_e(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Rm(XV,n),a=r$(n);return z(OV,fe({asChild:!0},a),z(Ju.a,fe({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:Ro(e.onPointerEnter,Bv(o.onOpen)),onPointerLeave:Ro(e.onPointerLeave,Bv(o.onClose)),onFocus:Ro(e.onFocus,o.onOpen),onBlur:Ro(e.onBlur,o.onClose),onTouchStart:Ro(e.onTouchStart,(e=>e.preventDefault()))})))})),sD="HoverCardPortal",[ZV,JV]=aD(sD,{forceMount:void 0}),eG=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Rm(sD,t);return z(ZV,{scope:t,forceMount:n},z(n$,{present:n||a.open},z(NV,{asChild:!0,container:o},r)))},Ox="HoverCardContent",tG=_e(((e,t)=>{const n=JV(Ox,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Rm(Ox,e.__scopeHoverCard);return z(n$,{present:r||a.open},z(nG,fe({"data-state":a.open?"open":"closed"},o,{onPointerEnter:Ro(e.onPointerEnter,Bv(a.onOpen)),onPointerLeave:Ro(e.onPointerLeave,Bv(a.onClose)),ref:t})))})),nG=_e(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...l}=e,u=Rm(Ox,n),s=r$(n),c=ke(null),d=BH(t,c),[f,p]=tt(!1);return We((()=>{if(f){const e=document.body;return rw=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=rw,e.style.webkitUserSelect=rw}}}),[f]),We((()=>{if(c.current){const e=()=>{p(!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]),We((()=>{c.current&&rG(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),z(HV,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Ro(a,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},z(AV,fe({},s,l,{onPointerDown:Ro(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!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 Bv(e){return t=>"touch"===t.pointerType?void 0:e()}function rG(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 oG=YV,iG=QV,aG=eG,lD=tG,JX=oG,eQ=iG,tQ=aG,sG=P.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>k.jsx(lD,{ref:o,align:t,sideOffset:n,className:se("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})));sG.displayName=lD.displayName;const uD=P.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=as();return k.jsx("input",{type:t,className:se("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})}));function lG(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 k.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}\``)}]},uG(r,...t)]}function uG(...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 mR(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function cG(...e){return t=>{let n=!1;const r=e.map((e=>{const r=mR(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():mR(e[t],null)}}}}function fG(e){const t=dG(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,a=P.Children.toArray(r),i=a.find(hG);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 k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function dG(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=mG(n),o=vG(r,n.props);return n.type!==P.Fragment&&(o.ref=t?cG(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}uD.displayName="Input";var pG=Symbol("radix.slottable");function hG(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===pG}function vG(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function mG(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 gG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cD=gG.reduce(((e,t)=>{const n=fG(`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),k.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),o$="Progress",i$=100,[yG,nQ]=lG(o$),[bG,wG]=yG(o$),fD=P.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=xG,...i}=e;(o||0===o)&&!gR(o)&&console.error(_G(`${o}`,"Progress"));const l=gR(o)?o:i$;null!==r&&!yR(r,l)&&console.error($G(`${r}`,"Progress"));const u=yR(r,l)?r:null,s=qv(u)?a(u,l):void 0;return k.jsx(bG,{scope:n,value:u,max:l,children:k.jsx(cD.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":qv(u)?u:void 0,"aria-valuetext":s,role:"progressbar","data-state":hD(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})}));fD.displayName=o$;var dD="ProgressIndicator",pD=P.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=wG(dD,n);return k.jsx(cD.div,{"data-state":hD(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function xG(e,t){return`${Math.round(e/t*100)}%`}function hD(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function qv(e){return"number"==typeof e}function gR(e){return qv(e)&&!isNaN(e)&&e>0}function yR(e,t){return qv(e)&&!isNaN(e)&&e<=t&&e>=0}function _G(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${i$}\`.`}function $G(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${i$} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}pD.displayName=dD;var vD=fD,SG=pD;const CG=P.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>k.jsx(vD,{ref:o,className:se("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:k.jsx(SG,{className:se("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));CG.displayName=vD.displayName;const mD="Radio",[EG,gD]=Sr(mD),[PG,RG]=EG(mD),TG=_e(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,...s}=e,[c,d]=tt(null),f=Rt(t,(e=>d(e))),p=ke(!1),h=!c||!!c.closest("form");return z(PG,{scope:n,checked:o,disabled:i},z(it.button,fe({type:"button",role:"radio","aria-checked":o,"data-state":yD(o),"data-disabled":i?"":void 0,disabled:i,value:l},s,{ref:f,onClick:ze(e.onClick,(e=>{o||null==u||u(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&z(NG,{control:c,bubbles:!p.current,name:r,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),OG="RadioIndicator",AG=_e(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=RG(OG,n);return z(Ao,{present:r||a.checked},z(it.span,fe({"data-state":yD(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),NG=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=ke(null),i=dm(n),l=pm(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),z("input",fe({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 yD(e){return e?"checked":"unchecked"}const DG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bD="RadioGroup",[IG,rQ]=Sr(bD,[fc,gD]),wD=fc(),xD=gD(),[kG,MG]=IG(bD),LG=_e(((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,p=wD(n),h=Gd(s),[m,v]=Vo({prop:a,defaultProp:o,onChange:d});return z(kG,{scope:n,name:r,required:i,disabled:l,value:m,onValueChange:v},z(W_,fe({asChild:!0},p,{orientation:u,dir:h,loop:c}),z(it.div,fe({role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h},f,{ref:t}))))})),jG="RadioGroupItem",FG=_e(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=MG(jG,n),i=a.disabled||r,l=wD(n),u=xD(n),s=ke(null),c=Rt(t,s),d=a.value===o.value,f=ke(!1);return We((()=>{const e=e=>{DG.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)}}),[]),z(U_,fe({asChild:!0},l,{focusable:!i,active:d}),z(TG,fe({disabled:i,required:a.required,checked:d},u,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:ze((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:ze(o.onFocus,(()=>{var e;f.current&&(null===(e=s.current)||void 0===e||e.click())}))})))})),BG=_e(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=xD(n);return z(AG,fe({},o,r,{ref:t}))})),_D=LG,$D=FG,qG=BG,zG=P.forwardRef((({className:e,...t},n)=>k.jsx(_D,{className:se("grid gap-2",e),...t,ref:n})));zG.displayName=_D.displayName;const WG=P.forwardRef((({className:e,...t},n)=>k.jsx($D,{ref:n,className:se("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:k.jsx(qG,{className:"flex items-center justify-center",children:k.jsx(DM,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));WG.displayName=$D.displayName;const UG=Xv,oQ=Hx,iQ=ic,HG=Qv,SD=P.forwardRef((({className:e,...t},n)=>k.jsx(rc,{className:se("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})));SD.displayName=rc.displayName;const VG=Ji("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"}}),CD=P.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>k.jsxs(HG,{children:[k.jsx(SD,{className:se("bg-slate-900/70",n)}),k.jsxs(oc,{ref:a,className:se(VG({side:e}),t),...o,children:[r,k.jsxs(ic,{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:[k.jsx(Ix,{className:"h-4 w-4"}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));CD.displayName=oc.displayName;const ED=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});ED.displayName="SheetHeader";const GG=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});GG.displayName="SheetFooter";const PD=P.forwardRef((({className:e,...t},n)=>k.jsx(jd,{ref:n,className:se("text-lg font-semibold text-foreground",e),...t})));PD.displayName=jd.displayName;const RD=P.forwardRef((({className:e,...t},n)=>k.jsx(Fd,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));RD.displayName=Fd.displayName;const[Tm,aQ]=Sr("Tooltip",[cc]),a$=cc(),KG="TooltipProvider",YG=700,Ax="tooltip.open",[XG,s$]=Tm(KG),TD=e=>{const{__scopeTooltip:t,delayDuration:n=YG,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,l]=tt(!0),u=ke(!1),s=ke(0);return We((()=>{const e=s.current;return()=>window.clearTimeout(e)}),[]),z(XG,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:lt((()=>{window.clearTimeout(s.current),l(!1)}),[]),onClose:lt((()=>{window.clearTimeout(s.current),s.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:lt((e=>{u.current=e}),[]),disableHoverableContent:o},a)},l$="Tooltip",[QG,Om]=Tm(l$),OD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=s$(l$,e.__scopeTooltip),s=a$(t),[c,d]=tt(null),f=lo(),p=ke(0),h=i??u.disableHoverableContent,m=l??u.delayDuration,v=ke(!1),[g=!1,y]=Vo({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ax))):u.onClose(),null==a||a(e)}}),b=Ur((()=>g?v.current?"delayed-open":"instant-open":"closed"),[g]),w=lt((()=>{window.clearTimeout(p.current),v.current=!1,y(!0)}),[y]),x=lt((()=>{window.clearTimeout(p.current),y(!1)}),[y]),_=lt((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{v.current=!0,y(!0)}),m)}),[m,y]);return We((()=>()=>window.clearTimeout(p.current)),[]),z(wm,s,z(QG,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:lt((()=>{u.isOpenDelayed?_():w()}),[u.isOpenDelayed,_,w]),onTriggerLeave:lt((()=>{h?x():window.clearTimeout(p.current)}),[x,h]),onOpen:w,onClose:x,disableHoverableContent:h},n))},bR="TooltipTrigger",AD=_e(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Om(bR,n),a=s$(bR,n),i=a$(n),l=Rt(t,ke(null),o.onTriggerChange),u=ke(!1),s=ke(!1),c=lt((()=>u.current=!1),[]);return We((()=>()=>document.removeEventListener("pointerup",c)),[c]),z(B_,fe({asChild:!0},i),z(it.button,fe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:ze(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!s.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)})),onPointerLeave:ze(e.onPointerLeave,(()=>{o.onTriggerLeave(),s.current=!1})),onPointerDown:ze(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:ze(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:ze(e.onBlur,o.onClose),onClick:ze(e.onClick,o.onClose)})))})),ZG="TooltipPortal",[sQ,JG]=Tm(ZG,{forceMount:void 0}),Md="TooltipContent",ND=_e(((e,t)=>{const n=JG(Md,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Om(Md,e.__scopeTooltip);return z(Ao,{present:r||i.open},i.disableHoverableContent?z(DD,fe({side:o},a,{ref:t})):z(eK,fe({side:o},a,{ref:t})))})),eK=_e(((e,t)=>{const n=Om(Md,e.__scopeTooltip),r=s$(Md,e.__scopeTooltip),o=ke(null),a=Rt(t,o),[i,l]=tt(null),{trigger:u,onClose:s}=n,c=o.current,{onPointerInTransitChange:d}=r,f=lt((()=>{l(null),d(!1)}),[d]),p=lt(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=aK([...rK(r,nK(r,n.getBoundingClientRect())),...oK(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return We((()=>()=>f()),[f]),We((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),We((()=>{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=!iK(n,i);r?f():o&&(f(),s())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,i,s,f]),z(DD,fe({},e,{ref:a}))})),[tK,lQ]=Tm(l$,{isInside:!1}),DD=_e(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=Om(Md,n),s=a$(n),{onClose:c}=u;return We((()=>(document.addEventListener(Ax,c),()=>document.removeEventListener(Ax,c))),[c]),We((()=>{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]),z(Vv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},z(q_,fe({"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)"}}),z(jx,null,r),z(tK,{scope:n,isInside:!0},z(TU,{id:u.contentId,role:"tooltip"},o||r))))}));function nK(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 rK(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 oK(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 iK(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 aK(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)),sK(t)}function sK(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 lK=TD,uK=OD,cK=AD,ID=ND,kD=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},fK=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)},dK=e=>fK(e)&&"type"in e&&"string"==typeof e.type,Ct=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>dK(t)&&t.type===e,t};Ct("remoteReady"),Ct("reselectUser"),Ct("requestLogin"),Ct("requestLogout"),Ct("setConfirmLeavePage"),Ct("requestChangePath"),Ct("wsSubscribe"),Ct("wsUnSubscribe"),Ct("hostStoreConnect"),Ct("remoteLogin"),Ct("remoteLogout"),Ct("wsOnMessage"),Ct("setRouterPath");const MD=Ct("setDeviceType");Ct("setUserError"),Ct("setUserIsError"),Ct("setUserPending"),Ct("setUserSuccess"),Ct("setUserData"),Ct("updateAccountData"),Ct("updateUser"),Ct("addNotification"),Ct("markNotification"),Ct("setNotificationsError"),Ct("setNotificationsList"),Ct("setNotificationsPending"),Ct("setNotificationsTotalCount"),Ct("setNotificationsUnreadCount"),Ct("resetNotificationsState"),Ct("undoNotification"),Ct("setInstanceInfo"),Ct("setInstanceInfoPending"),Ct("setInstanceInfoError"),Ct("setPlatformSettings"),Ct("setProfileSettings"),Ct("setGroupData"),Ct("setGroupLoading"),Ct("showGroupBasicInfo"),fT("requestMicroFrontendFetch"),fT("sendMicroFrontendFetchResponse");const pK={deviceType:kD()},Am=hM({name:"ui",initialState:pK,reducers:{},extraReducers:e=>{e.addCase(MD,((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 ow,wR,iw,xR,aw,_R,sw,$R,lw,SR,uw,CR,cw,ER,fw,PR,dw,RR,pw,TR,hw,OR,vw,AR,mw,NR,gw,DR,yw,IR,bw,kR,ww,MR,xw,LR,_w,jR,$w,FR,Sw,BR,Cw,qR,Ew,zR,Pw,WR,Rw,UR,Tw,HR,Ow,VR,Aw,GR,Nw,KR,Dw,YR,Iw,XR,kw,QR,Mw,ZR,Lw,JR,jw,eT,Fw,tT,Bw,nT,qw,rT,zw,oT,Ww,iT,Uw,aT;function LD(){if(wR)return ow;wR=1;var e=KO(),t=e&&new e;return ow=t}function jD(){if(xR)return iw;xR=1;var e=Hd(),t=LD();return iw=t?function(e,n){return t.set(e,n),e}:e}function Nm(){if(_R)return aw;_R=1;var e=fm(),t=No();return aw=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}},aw}function hK(){if($R)return sw;$R=1;var e=Nm(),t=Er();return sw=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)}},sw}function FD(){if(SR)return lw;SR=1;var e=Math.max;return lw=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 BD(){if(CR)return uw;CR=1;var e=Math.max;return uw=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 h=a;++s<c;)f[h+s]=n[s];for(;++l<u;)(p||a<i)&&(f[h+r[l]]=t[a++]);return f}}function vK(){if(ER)return cw;return ER=1,cw=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function u$(){if(PR)return fw;return PR=1,fw=function(){}}function c$(){if(RR)return dw;RR=1;var e=fm(),t=u$();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,dw=n}function qD(){if(TR)return pw;TR=1;var e=LD(),t=JO();return pw=e?function(t){return e.get(t)}:t}function mK(){if(OR)return hw;OR=1;return hw={}}function gK(){if(AR)return vw;AR=1;var e=mK(),t=Object.prototype.hasOwnProperty;return vw=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 zD(){if(NR)return mw;NR=1;var e=fm(),t=u$();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,mw=n}function yK(){if(DR)return gw;DR=1;var e=c$(),t=zD(),n=cm();return gw=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 bK(){if(IR)return yw;IR=1;var e=c$(),t=zD(),n=u$(),r=Cr(),o=fo(),a=yK(),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,yw=l}function wK(){if(kR)return bw;kR=1;var e=c$(),t=qD(),n=gK(),r=bK();return bw=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 WD(){if(MR)return ww;MR=1;var e=jD(),t=aA()(e);return ww=t}function xK(){if(LR)return xw;LR=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return xw=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function _K(){if(jR)return _w;jR=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return _w=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 $K(){if(FR)return $w;FR=1;var e=__(),t=ZO(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return $w=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function UD(){if(BR)return Sw;BR=1;var e=xK(),t=_K(),n=y_(),r=$K();return Sw=function(o,a,i){var l=a+"";return n(o,t(l,r(e(l),i)))}}function HD(){if(qR)return Cw;qR=1;var e=wK(),t=WD(),n=UD();return Cw=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 h=[r,o,l,p?u:void 0,p?s:void 0,p?void 0:u,p?void 0:s,c,d,f],m=a.apply(void 0,h);return e(r)&&t(m,h),m.placeholder=i,n(m,r,o)}}function VD(){if(zR)return Ew;return zR=1,Ew=function(e){return e.placeholder}}function SK(){if(WR)return Pw;WR=1;var e=cm(),t=am(),n=Math.min;return Pw=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 f$(){if(UR)return Rw;UR=1;var e="__lodash_placeholder__";return Rw=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 GD(){if(HR)return Tw;HR=1;var e=FD(),t=BD(),n=vK(),r=Nm(),o=HD(),a=VD(),i=SK(),l=f$(),u=Er();return Tw=function s(c,d,f,p,h,m,v,g,y,b){var w=128&d,x=1&d,_=2&d,k=24&d,P=512&d,S=_?void 0:r(c);return function C(){for(var E=arguments.length,N=Array(E),O=E;O--;)N[O]=arguments[O];if(k)var T=a(C),R=n(N,T);if(p&&(N=e(N,p,h,k)),m&&(N=t(N,m,v,k)),E-=R,k&&E<b){var j=l(N,T);return o(c,d,s,C.placeholder,f,N,j,g,y,b-E)}var D=x?f:this,z=_?D[c]:c;return E=N.length,g?N=i(N,g):P&&E>1&&N.reverse(),w&&y<E&&(N.length=y),this&&this!==u&&this instanceof C&&(z=S||r(z)),z.apply(D,N)}},Tw}function CK(){if(VR)return Ow;VR=1;var e=g_(),t=Nm(),n=GD(),r=HD(),o=VD(),a=f$(),i=Er();return Ow=function(l,u,s){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,h=o(t);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:a(f,h);return(d-=m.length)<s?r(l,u,n,t.placeholder,void 0,f,m,void 0,void 0,s-d):e(this&&this!==i&&this instanceof t?c:l,this,f)}},Ow}function EK(){if(GR)return Aw;GR=1;var e=g_(),t=Nm(),n=Er();return Aw=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)}},Aw}function PK(){if(KR)return Nw;KR=1;var e=FD(),t=BD(),n=f$(),r="__lodash_placeholder__",o=128,a=Math.min;return Nw=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 h=i[3];i[3]=h?e(h,p,l[4]):p,i[4]=h?n(i[3],r):l[4]}return(p=l[5])&&(h=i[5],i[5]=h?t(h,p,l[6]):p,i[6]=h?n(i[5],r):l[6]),(p=l[7])&&(i[7]=p),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 d$(){if(YR)return Dw;YR=1;var e=jD(),t=hK(),n=CK(),r=GD(),o=EK(),a=qD(),i=PK(),l=WD(),u=UD(),s=hA(),c=Math.max;return Dw=function(d,f,p,h,m,v,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=h?h.length:0;if(w||(f&=-97,h=m=void 0),g=void 0===g?g:c(s(g),0),y=void 0===y?y:s(y),w-=m?m.length:0,64&f){var x=h,_=m;h=m=void 0}var k=b?void 0:a(d),P=[d,f,p,h,m,x,_,v,g,y];if(k&&i(P,k),d=P[0],f=P[1],p=P[2],h=P[3],m=P[4],!(y=P[9]=void 0===P[9]?b?0:d.length:c(P[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)S=8==f||16==f?n(d,f,y):32!=f&&33!=f||m.length?r.apply(void 0,P):o(d,f,p,h);else var S=t(d,f,p);return u((k?e:l)(S,P),d,f)}}function RK(){if(XR)return Iw;XR=1;var e=d$();return Iw=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 TK(){if(QR)return kw;QR=1;var e=yA();return kw=function(t){return e(t,4)}}function OK(){if(ZR)return Mw;ZR=1;var e=d$();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={},Mw=t}function AK(){if(JR)return Lw;JR=1;var e=ta(),t=fo(),n=xj();return Lw=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 NK(){if(eT)return jw;eT=1;var e=Ud(),t=fo();return jw=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function DK(){if(tT)return Fw;tT=1;var e=yA(),t=v_();return Fw=function(n){return t("function"==typeof n?n:e(n,1))}}function IK(){if(nT)return Bw;nT=1;var e=d$(),t=zj(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return Bw=n}function kK(){if(rT)return qw;rT=1;var e=t_(),t=cm(),n=Cr(),r=sc(),o=yO(),a=qd(),i=n_();return qw=function(l){return n(l)?e(l,a):r(l)?[l]:t(o(i(l)))}}function MK(){return oT||(oT=1,zw={ary:RK(),assign:mA(),clone:TK(),curry:OK(),forEach:__(),isArray:Cr(),isError:AK(),isFunction:Jv(),isWeakMap:NK(),iteratee:DK(),keys:HO(),rearg:IK(),toInteger:hA(),toPath:kK()}),zw}function LK(){if(iT)return Ww;iT=1;var e=pT(),t=MK();return Ww=function(n,r,o){return e(t,n,r,o)}}function jK(){if(aT)return Uw;aT=1;var e=LK()("debounce",dA());return e.placeholder=dT(),Uw=e}var FK=jK();const BK=Oo(FK);function sT(e,t,n=window){const r=ke(t);We((()=>{r.current=t}),[t]),We((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const qK=e=>{const t=BK(150)(e);sT("resize",t),sT("orientationchange",t)},uQ=()=>{const e=vM();qK((()=>{const t=kD();e(MD(t))}))},cQ=()=>Uv(Am.selectors.selectDeviceType),zK=()=>Uv(Am.selectors.selectIsMobile),fQ=()=>Uv(Am.selectors.selectIsTablet),dQ=()=>Uv(Am.selectors.selectIsDesktop);function lT({className:e,...t}){return k.jsx("div",{className:se("animate-pulse rounded-md bg-muted",e),...t})}const WK="sidebar_state",UK=604800,HK="12rem",VK="18rem",GK="2rem",KK="b",KD=P.createContext(null);function Dm(){const e=P.useContext(KD);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const YK=P.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},l)=>{const u=zK(),[s,c]=P.useState(!1),[d,f]=P.useState(e),p=t??d,h=P.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${WK}=${t}; path=/; max-age=${UK}`}),[n,p]),m=P.useCallback((()=>u?c((e=>!e)):h((e=>!e))),[u,h,c]);P.useEffect((()=>{const e=e=>{e.key===KK&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[m]);const v=p?"expanded":"collapsed",g=P.useMemo((()=>({state:v,open:p,setOpen:h,isMobile:u,openMobile:s,setOpenMobile:c,toggleSidebar:m})),[v,p,h,u,s,c,m]);return k.jsx(KD.Provider,{value:g,children:k.jsx(TD,{delayDuration:0,children:k.jsx("div",{style:{"--sidebar-width":HK,"--sidebar-width-icon":GK,...o},className:se("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:a})})})}));YK.displayName="SidebarProvider";const XK=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}=Dm();return"none"===n?k.jsx("div",{className:se("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):l?k.jsx(UG,{open:s,onOpenChange:c,children:k.jsxs(CD,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":VK},side:e,children:[k.jsxs(ED,{className:"sr-only",children:[k.jsx(PD,{children:"Sidebar"}),k.jsx(RD,{children:"Displays the mobile sidebar."})]}),k.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):k.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:[k.jsx("div",{className:se("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]")}),k.jsx("div",{className:se("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:k.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})})]})}));XK.displayName="Sidebar";const QK=P.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=Dm();return k.jsx(Ld,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:se("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?k.jsx(zM,{size:16}):k.jsx(BM,{size:16})})}));QK.displayName="SidebarTrigger";const ZK=P.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Dm();return k.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:se("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})}));ZK.displayName="SidebarRail";const JK=P.forwardRef((({className:e,...t},n)=>k.jsx("main",{ref:n,className:se("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})));JK.displayName="SidebarInset";const eY=P.forwardRef((({className:e,...t},n)=>k.jsx(uD,{ref:n,"data-sidebar":"input",className:se("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));eY.displayName="SidebarInput";const tY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"header",className:se("flex flex-col gap-2 p-2",e),...t})));tY.displayName="SidebarHeader";const nY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"footer",className:se("flex flex-col gap-2 p-2",e),...t})));nY.displayName="SidebarFooter";const rY=P.forwardRef((({className:e,...t},n)=>k.jsx(Y_,{ref:n,"data-sidebar":"separator",className:se("mx-2 w-auto bg-sidebar-border",e),...t})));rY.displayName="SidebarSeparator";const oY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"content",className:se("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));oY.displayName="SidebarContent";const iY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group",className:se("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));iY.displayName="SidebarGroup";const aY=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?os:"div";return k.jsx(o,{ref:r,"data-sidebar":"group-label",className:se("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})}));aY.displayName="SidebarGroupLabel";const sY=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?os:"button";return k.jsx(o,{ref:r,"data-sidebar":"group-action",className:se("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})}));sY.displayName="SidebarGroupAction";const lY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group-content",className:se("w-full text-sm",e),...t})));lY.displayName="SidebarGroupContent";const uY=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu",className:se("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));uY.displayName="SidebarMenu";const cY=P.forwardRef((({className:e,...t},n)=>k.jsx("li",{ref:n,"data-sidebar":"menu-item",className:se("group/menu-item relative",e),...t})));cY.displayName="SidebarMenuItem";const fY=Ji("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"}}),dY=P.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},l)=>{const u=e?os:"button",{isMobile:s,state:c}=Dm(),d=k.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:se(fY({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),k.jsxs(OD,{children:[k.jsx(AD,{asChild:!0,children:d}),k.jsx(ND,{side:"right",align:"center",hidden:"collapsed"!==c||s,...o})]})):d}));dY.displayName="SidebarMenuButton";const pY=P.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?os:"button";return k.jsx(a,{ref:o,"data-sidebar":"menu-action",className:se("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})}));pY.displayName="SidebarMenuAction";const hY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:se("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})));hY.displayName="SidebarMenuBadge";const vY=P.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=P.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return k.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:se("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&k.jsx(lT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),k.jsx(lT,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));vY.displayName="SidebarMenuSkeleton";const mY=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:se("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));mY.displayName="SidebarMenuSub";const gY=P.forwardRef((({...e},t)=>k.jsx("li",{ref:t,...e})));gY.displayName="SidebarMenuSubItem";const yY=P.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?os:"a";return k.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:se("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})}));yY.displayName="SidebarMenuSubButton";const YD="Switch",[bY,pQ]=Sr(YD),[wY,xY]=bY(YD),_Y=_e(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=tt(null),p=Rt(t,(e=>f(e))),h=ke(!1),m=!d||!!d.closest("form"),[v=!1,g]=Vo({prop:o,defaultProp:a,onChange:s});return z(wY,{scope:n,checked:v,disabled:l},z(it.button,fe({type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":XD(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onClick:ze(e.onClick,(e=>{g((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&z(CY,{control:d,bubbles:!h.current,name:r,value:u,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),$Y="SwitchThumb",SY=_e(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=xY($Y,n);return z(it.span,fe({"data-state":XD(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),CY=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=ke(null),i=dm(n),l=pm(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),z("input",fe({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 XD(e){return e?"checked":"unchecked"}const QD=_Y,EY=SY,PY=P.forwardRef((({className:e,...t},n)=>k.jsx(QD,{className:se("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:k.jsx(EY,{className:se("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})})})));PY.displayName=QD.displayName;const ZD="Tabs",[RY,hQ]=Sr(ZD,[fc]),JD=fc(),[TY,p$]=RY(ZD),OY=_e(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:u="automatic",...s}=e,c=Gd(l),[d,f]=Vo({prop:r,onChange:o,defaultProp:a});return z(TY,{scope:n,baseId:lo(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:u},z(it.div,fe({dir:c,"data-orientation":i},s,{ref:t})))})),AY="TabsList",NY=_e(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=p$(AY,n),i=JD(n);return z(W_,fe({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),z(it.div,fe({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),DY="TabsTrigger",IY=_e(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=p$(DY,n),l=JD(n),u=eI(i.baseId,r),s=tI(i.baseId,r),c=r===i.value;return z(U_,fe({asChild:!0},l,{focusable:!o,active:c}),z(it.button,fe({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:ze(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:ze(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:ze(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),kY="TabsContent",MY=_e(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=p$(kY,n),u=eI(l.baseId,r),s=tI(l.baseId,r),c=r===l.value,d=ke(c);return We((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),z(Ao,{present:o||c},(({present:n})=>z(it.div,fe({"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 eI(e,t){return`${e}-trigger-${t}`}function tI(e,t){return`${e}-content-${t}`}const LY=OY,nI=NY,rI=IY,oI=MY,vQ=LY,jY=P.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>k.jsx(nI,{ref:r,"data-testid":"tabsList",className:t?se("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));jY.displayName=nI.displayName;const FY=P.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},o)=>k.jsx(rI,{ref:o,className:t?se("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:k.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));FY.displayName=rI.displayName;const BY=P.forwardRef((({className:e,...t},n)=>k.jsx(oI,{ref:n,className:se("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));BY.displayName=oI.displayName;const qY=P.forwardRef((({className:e,...t},n)=>k.jsx("table",{ref:n,className:se("w-full caption-bottom text-sm",e),...t})));qY.displayName="Table";const zY=P.forwardRef((({className:e,...t},n)=>k.jsx("thead",{ref:n,className:se("[&_tr]:border-b",e),...t})));zY.displayName="TableHeader";const WY=P.forwardRef((({className:e,...t},n)=>k.jsx("tbody",{ref:n,className:se("[&_tr:last-child]:border-0",e),...t})));WY.displayName="TableBody";const UY=P.forwardRef((({className:e,...t},n)=>k.jsx("tfoot",{ref:n,className:se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));UY.displayName="TableFooter";const HY=P.forwardRef((({className:e,...t},n)=>k.jsx("tr",{ref:n,className:se("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})));HY.displayName="TableRow";const VY=P.forwardRef((({className:e,...t},n)=>k.jsx("th",{ref:n,className:se("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})));VY.displayName="TableHead";const GY=P.forwardRef((({className:e,...t},n)=>k.jsx("td",{ref:n,className:se("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})));GY.displayName="TableCell";const KY=P.forwardRef((({className:e,...t},n)=>k.jsx("caption",{ref:n,className:se("mt-s text-sm text-muted-foreground",e),...t})));KY.displayName="TableCaption";const YY=(e,t)=>se("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),XY=P.forwardRef((({className:e,...t},n)=>{const{error:r}=as();return k.jsx("textarea",{className:YY(!!r,e),ref:n,...t})}));XY.displayName="Textarea";const mQ=lK,QY=uK,ZY=cK,JY=Ji("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"}}}),iI=P.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...o},a)=>k.jsx(ID,{ref:a,sideOffset:t,className:se(JY({size:n,theme:r,className:e})),...o})));iI.displayName=ID.displayName;const gQ=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>k.jsxs(QY,{children:[k.jsx(ZY,{className:n,...r,children:e}),t&&k.jsx(iI,{...o,children:t})]}),yQ=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>k.jsx("div",{className:"hidden",children:k.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()}})}),bQ=({as:e="div",children:t,className:n,...r})=>z(e,{className:se(n),...r},t);function eX(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 tX(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 k.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}\``)}]},nX(r,...t)]}function nX(...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 aI(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 rX({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=oX({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=aI(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 oX({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),a=aI(t);return P.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}var zv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{};function uT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function sI(...e){return t=>{let n=!1;const r=e.map((e=>{const r=uT(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():uT(e[t],null)}}}}function lI(...e){return P.useCallback(sI(...e),e)}var uI=P.forwardRef(((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),a=o.find(aX);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 k.jsx(Nx,{...r,ref:t,children:P.isValidElement(e)?P.cloneElement(e,void 0,n):null})}return k.jsx(Nx,{...r,ref:t,children:n})}));uI.displayName="Slot";var Nx=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=lX(n),o=sX(r,n.props);return n.type!==P.Fragment&&(o.ref=t?sI(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));Nx.displayName="SlotClone";var iX=({children:e})=>k.jsx(k.Fragment,{children:e});function aX(e){return P.isValidElement(e)&&e.type===iX}function sX(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 lX(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 uX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],h$=uX.reduce(((e,t)=>{const n=P.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?uI:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function cX(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}var cI=e=>{const{present:t,children:n}=e,r=fX(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),a=lI(r.ref,dX(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:a}):null};function fX(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),i=e?"mounted":"unmounted",[l,u]=cX(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=hv(r.current);a.current="mounted"===l?e:"none"}),[l]),zv((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=hv(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]),zv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=hv(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=hv(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 hv(e){return(null==e?void 0:e.animationName)||"none"}function dX(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)}cI.displayName="Presence";var pX=P.useId||(()=>{}),hX=0;function vX(e){const[t,n]=P.useState(pX());return zv((()=>{e||n((e=>e??String(hX++)))}),[e]),e||(t?`radix-${t}`:"")}var v$="Collapsible",[mX,wQ]=tX(v$),[gX,m$]=mX(v$),fI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u=!1,s]=rX({prop:r,defaultProp:o,onChange:i});return k.jsx(gX,{scope:n,disabled:a,contentId:vX(),open:u,onOpenToggle:P.useCallback((()=>s((e=>!e))),[s]),children:k.jsx(h$.div,{"data-state":y$(u),"data-disabled":a?"":void 0,...l,ref:t})})}));fI.displayName=v$;var dI="CollapsibleTrigger",pI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=m$(dI,n);return k.jsx(h$.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":y$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:eX(e.onClick,o.onOpenToggle)})}));pI.displayName=dI;var g$="CollapsibleContent",hI=P.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=m$(g$,e.__scopeCollapsible);return k.jsx(cI,{present:n||o.open,children:({present:e})=>k.jsx(yX,{...r,ref:t,present:e})})}));hI.displayName=g$;var yX=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=m$(g$,n),[l,u]=P.useState(r),s=P.useRef(null),c=lI(t,s),d=P.useRef(0),f=d.current,p=P.useRef(0),h=p.current,m=i.open||l,v=P.useRef(m),g=P.useRef(void 0);return P.useEffect((()=>{const e=requestAnimationFrame((()=>v.current=!1));return()=>cancelAnimationFrame(e)}),[]),zv((()=>{const e=s.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),u(r)}}),[i.open,r]),k.jsx(h$.div,{"data-state":y$(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&o})}));function y$(e){return e?"open":"closed"}var bX=fI;const xQ=bX,_Q=pI,$Q=hI;export{PX as AlertDialog,$8 as AlertDialogAction,S8 as AlertDialogCancel,y8 as AlertDialogContent,_8 as AlertDialogDescription,w8 as AlertDialogFooter,b8 as AlertDialogHeader,tO as AlertDialogOverlay,g8 as AlertDialogPortal,x8 as AlertDialogTitle,RX as AlertDialogTrigger,sO as Avatar,uO as AvatarFallback,lO as AvatarImage,Ld as Button,SX as ButtonLoader,D8 as Card,L8 as CardContent,M8 as CardDescription,j8 as CardFooter,I8 as CardHeader,k8 as CardTitle,b5 as Carousel,w5 as CarouselContent,x5 as CarouselItem,$5 as CarouselNext,_5 as CarouselPrevious,Uj as ChartContainer,AX as ChartLegend,Gj as ChartLegendContent,Hj as ChartStyle,OX as ChartTooltip,Vj as ChartTooltipContent,C_ as Checkbox,C2 as ChipsItem,Kj as ChipsWrapper,xQ as Collapsible,$Q as CollapsibleContent,_Q as CollapsibleTrigger,IA as Command,kX as CommandDialog,LF as CommandEmpty,jF as CommandGroup,kF as CommandInput,BF as CommandItem,MF as CommandList,FF as CommandSeparator,qF as CommandShortcut,RF as Dialog,IX as DialogClose,NA as DialogContent,IF as DialogDescription,DA as DialogFooter,NF as DialogHeader,AA as DialogOverlay,TF as DialogPortal,DF as DialogTitle,DX as DialogTrigger,Sq as Drawer,FX as DrawerClose,Eq as DrawerContent,Oq as DrawerDescription,Rq as DrawerFooter,Pq as DrawerHeader,$N as DrawerOverlay,Cq as DrawerPortal,Tq as DrawerTitle,jX as DrawerTrigger,zX as DropdownMenu,_U as DropdownMenuCheckboxItem,wU as DropdownMenuContent,UX as DropdownMenuGroup,xU as DropdownMenuItem,SU as DropdownMenuLabel,HX as DropdownMenuPortal,GX as DropdownMenuRadioGroup,$U as DropdownMenuRadioItem,CU as DropdownMenuSeparator,EU as DropdownMenuShortcut,VX as DropdownMenuSub,bU as DropdownMenuSubContent,yU as DropdownMenuSubTrigger,WX as DropdownMenuTrigger,YX as Form,SH as FormControl,CH as FormDescription,XX as FormField,_H as FormItem,$H as FormLabel,EH as FormMessage,PH as FormSelect,TH as FormSelectContent,AH as FormSelectGroup,OH as FormSelectItem,NH as FormSelectLabel,DH as FormSelectSeparator,RH as FormSelectTrigger,IH as FormSelectValue,JX as HoverCard,sG as HoverCardContent,tQ as HoverCardPortal,eQ as HoverCardTrigger,uD as Input,yQ as InputFile,p3 as Label,CG as Progress,zG as RadioGroup,WG as RadioGroupItem,N3 as Select,wH as SelectActions,gH as SelectCheckboxItem,M3 as SelectContent,xH as SelectFooter,D3 as SelectGroup,j3 as SelectItem,L3 as SelectLabel,mH as SelectMultiTrigger,bH as SelectScrollDownButton,yH as SelectScrollUpButton,F3 as SelectSeparator,k3 as SelectTrigger,I3 as SelectValue,UG as Sheet,iQ as SheetClose,CD as SheetContent,RD as SheetDescription,GG as SheetFooter,ED as SheetHeader,SD as SheetOverlay,HG as SheetPortal,PD as SheetTitle,oQ as SheetTrigger,XK as Sidebar,oY as SidebarContent,nY as SidebarFooter,iY as SidebarGroup,sY as SidebarGroupAction,lY as SidebarGroupContent,aY as SidebarGroupLabel,tY as SidebarHeader,eY as SidebarInput,JK as SidebarInset,uY as SidebarMenu,pY as SidebarMenuAction,hY as SidebarMenuBadge,dY as SidebarMenuButton,cY as SidebarMenuItem,vY as SidebarMenuSkeleton,mY as SidebarMenuSub,yY as SidebarMenuSubButton,gY as SidebarMenuSubItem,YK as SidebarProvider,ZK as SidebarRail,rY as SidebarSeparator,QK as SidebarTrigger,lT as Skeleton,PY as Switch,qY as Table,WY as TableBody,KY as TableCaption,GY as TableCell,UY as TableFooter,VY as TableHead,zY as TableHeader,HY as TableRow,vQ as Tabs,BY as TabsContent,jY as TabsList,FY as TabsTrigger,XY as Textarea,QY as Tooltip,iI as TooltipContent,mQ as TooltipProvider,ZY as TooltipTrigger,gQ as TooltipWrapper,Mx as buttonVariants,se as cn,YY as getTextareaClassName,bQ as styledElement,Am as uiSlice,Zv as useCarousel,cQ as useDeviceType,uQ as useDeviceTypeUpdater,as as useFormField,dQ as useIsDesktop,zK as useIsMobile,fQ as useIsTablet,Dm as useSidebar};
69
+ */function r9(){if(_C)return Nt;_C=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"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case a:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case l:case s:case p:case f:case i:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),Nt.ContextConsumer=l,Nt.ContextProvider=i,Nt.Element=t,Nt.ForwardRef=s,Nt.Fragment=r,Nt.Lazy=p,Nt.Memo=f,Nt.Portal=n,Nt.Profiler=a,Nt.StrictMode=o,Nt.Suspense=c,Nt.SuspenseList=d,Nt.isAsyncMode=function(){return!1},Nt.isConcurrentMode=function(){return!1},Nt.isContextConsumer=function(e){return m(e)===l},Nt.isContextProvider=function(e){return m(e)===i},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return m(e)===s},Nt.isFragment=function(e){return m(e)===r},Nt.isLazy=function(e){return m(e)===p},Nt.isMemo=function(e){return m(e)===f},Nt.isPortal=function(e){return m(e)===n},Nt.isProfiler=function(e){return m(e)===a},Nt.isStrictMode=function(e){return m(e)===o},Nt.isSuspense=function(e){return m(e)===c},Nt.isSuspenseList=function(e){return m(e)===d},Nt.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===a||t===o||t===c||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===i||t.$$typeof===l||t.$$typeof===s||t.$$typeof===e||void 0!==t.getModuleId)},Nt.typeOf=m,Nt}function o9(){return $C||($C=1,iy.exports=r9()),iy.exports}function $O(){if(SC)return ay;SC=1;var e=ta(),t=fo();return ay=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function i9(){if(CC)return sy;CC=1;var e=$O();return sy=function(t){return e(t)&&t!=+t}}o9();var a9=i9();const s9=Oo(a9);var l9=$O();const u9=Oo(l9);var tv=function(e){return xO(e)&&e.indexOf("%")===e.length-1},Wo=function(e){return u9(e)&&!s9(e)},xv=function(e){return Wo(e)||xO(e)};function Zw(e){return(Zw="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 c9=["viewBox","children"],f9=["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"],EC=["points","pathLength"],ly={svg:c9,polygon:EC,polyline:EC},SO=["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"],d9=function(e,t,n){return function(r){return e(t,n,r),null}},p9=function(e,t,n){if(!_O(e)||"object"!==Zw(e))return null;var r=null;return Object.keys(e).forEach((function(o){var a=e[o];SO.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=d9(a,t,n))})),r},h9=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},v9=function(e,t,n,r){var o,a=null!==(o=null==ly?void 0:ly[r])&&void 0!==o?o:[];return!wv(e)&&(r&&a.includes(t)||f9.includes(t))||SO.includes(t)},CO=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if(Xi(e)&&(r=e.props),!_O(r))return null;var o={};return Object.keys(r).forEach((function(e){var a;v9(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])})),o},m9=["children","width","height","viewBox","className","style","title","desc"];function Jw(){return Jw=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},Jw.apply(this,arguments)}function g9(e,t){if(null==e)return{};var n,r,o=y9(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 y9(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 b9(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=g9(e,m9),c=o||{width:n,height:r,x:0,y:0},d=Za("recharts-surface",a);return ye.createElement("svg",Jw({},CO(s,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),ye.createElement("title",null,l),ye.createElement("desc",null,u),t)}var uy,PC,cy,RC,fy,TC,dy,OC,py,AC,hy,NC,vy,DC,my,IC,mv=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 w9(){if(PC)return uy;return PC=1,uy=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 x9(){if(RC)return cy;RC=1;var e=w9();return cy=function(t,n,r){var o=t.length;return r=void 0===r?o:r,!n&&r>=o?t:e(t,n,r)}}function EO(){if(TC)return fy;TC=1;var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return fy=function(t){return e.test(t)}}function _9(){if(OC)return dy;return OC=1,dy=function(e){return e.split("")}}function $9(){if(AC)return py;AC=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 py=function(e){return e.match(d)||[]}}function S9(){if(NC)return hy;NC=1;var e=_9(),t=EO(),n=$9();return hy=function(r){return t(r)?n(r):e(r)}}function C9(){if(DC)return vy;DC=1;var e=x9(),t=EO(),n=S9(),r=n_();return vy=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 E9(){if(IC)return my;IC=1;var e=C9()("toUpperCase");return my=e}var P9=E9();const PO=Oo(P9);function nv(e){return function(){return e}}const RO=Math.cos,_v=Math.sin,Ko=Math.sqrt,$v=Math.PI,im=2*$v,ex=Math.PI,tx=2*ex,nl=1e-6,R9=tx-nl;function TO(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function T9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return TO;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 O9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?TO:T9(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>nl)if(Math.abs(c*l-u*s)>nl&&o){let f=n-a,p=r-i,h=l*l+u*u,m=f*f+p*p,v=Math.sqrt(h),g=Math.sqrt(d),y=o*Math.tan((ex-Math.acos((h+d-m)/(2*v*g)))/2),b=y/g,w=y/v;Math.abs(b-1)>nl&&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)>nl||Math.abs(this._y1-s)>nl)&&this._append`L${u},${s}`,n&&(d<0&&(d=d%tx+tx),d>R9?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>nl&&this._append`A${n},${n},0,${+(d>=ex)},${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 A9(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 O9(t)}const o_={draw(e,t){const n=Ko(t/$v);e.moveTo(n,0),e.arc(0,0,n,0,im)}},N9={draw(e,t){const n=Ko(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()}},OO=Ko(1/3),D9=2*OO,I9={draw(e,t){const n=Ko(t/D9),r=n*OO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},k9={draw(e,t){const n=Ko(t),r=-n/2;e.rect(r,r,n,n)}},M9=.8908130915292852,AO=_v($v/10)/_v(7*$v/10),L9=_v(im/10)*AO,j9=-RO(im/10)*AO,F9={draw(e,t){const n=Ko(t*M9),r=L9*n,o=j9*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=im*t/5,i=RO(a),l=_v(a);e.lineTo(l*n,-i*n),e.lineTo(i*r-l*o,l*r+i*o)}e.closePath()}},gy=Ko(3),B9={draw(e,t){const n=-Ko(t/(3*gy));e.moveTo(0,2*n),e.lineTo(-gy*n,-n),e.lineTo(gy*n,-n),e.closePath()}},Co=-.5,Eo=Ko(3)/2,nx=1/Ko(12),q9=3*(nx/2+1),z9={draw(e,t){const n=Ko(t/q9),r=n/2,o=n*nx,a=r,i=n*nx+n,l=-a,u=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(l,u),e.lineTo(Co*r-Eo*o,Eo*r+Co*o),e.lineTo(Co*a-Eo*i,Eo*a+Co*i),e.lineTo(Co*l-Eo*u,Eo*l+Co*u),e.lineTo(Co*r+Eo*o,Co*o-Eo*r),e.lineTo(Co*a+Eo*i,Co*i-Eo*a),e.lineTo(Co*l+Eo*u,Co*u-Eo*l),e.closePath()}};function W9(e,t){let n=null,r=A9(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:nv(e||o_),t="function"==typeof t?t:nv(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:nv(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:nv(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}function Cd(e){return(Cd="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 U9=["type","size","sizeType"];function rx(){return rx=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},rx.apply(this,arguments)}function kC(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 MC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kC(Object(n),!0).forEach((function(t){H9(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function H9(e,t,n){return(t=V9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V9(e){var t=G9(e,"string");return"symbol"==Cd(t)?t:t+""}function G9(e,t){if("object"!=Cd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Cd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function K9(e,t){if(null==e)return{};var n,r,o=Y9(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 Y9(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 NO={symbolCircle:o_,symbolCross:N9,symbolDiamond:I9,symbolSquare:k9,symbolStar:F9,symbolTriangle:B9,symbolWye:z9},X9=Math.PI/180,Q9=function(e){var t="symbol".concat(PO(e));return NO[t]||o_},Z9=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*X9;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}},J9=function(e,t){NO["symbol".concat(PO(e))]=t},DO=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=MC(MC({},K9(e,U9)),{},{type:r,size:a,sizeType:l}),s=u.className,c=u.cx,d=u.cy,f=CO(u,!0);return c===+c&&d===+d&&a===+a?ye.createElement("path",rx({},f,{className:Za("recharts-symbols",s),transform:"translate(".concat(c,", ").concat(d,")"),d:(t=Q9(r),W9().type(t).size(Z9(a,l,r))())})):null};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)}function ox(){return ox=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},ox.apply(this,arguments)}function LC(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 e4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LC(Object(n),!0).forEach((function(t){Ed(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function t4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n4(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,kO(r.key),r)}}function r4(e,t,n){return n4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o4(e,t,n){return t=Sv(t),i4(e,IO()?Reflect.construct(t,n||[],Sv(e).constructor):t.apply(e,n))}function i4(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 a4(e)}function a4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(IO=function(){return!!e})()}function Sv(e){return(Sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s4(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&&ix(e,t)}function ix(e,t){return(ix=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ed(e,t,n){return(t=kO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kO(e){var t=l4(e,"string");return"symbol"==Gu(t)?t:t+""}function l4(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)}DO.registerSymbol=J9;var yy,jC,by,FC,wy,BC,xy,qC,_y,zC,$y,WC,Sy,UC,Cy,HC,Ey,VC,Py,GC,Ry,KC,Ty,YC,Oy,XC,Ay,QC,Ny,ZC,Dy,JC,Iy,eE,ky,tE,My,nE,Ly,rE,jy,oE,Fy,iE,By,aE,qy,sE,Po=32,i_=function(){function e(){return t4(this,e),o4(this,e,arguments)}return s4(e,Wv),r4(e,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=Po/2,r=Po/6,o=Po/3,a=e.inactive?t:e.color;if("plainline"===e.type)return ye.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:Po,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return ye.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(Po,"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 ye.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(Po/8,"h").concat(Po,"v").concat(3*Po/4,"h").concat(-Po,"z"),className:"recharts-legend-icon"});if(ye.isValidElement(e.legendIcon)){var i=e4({},e);return delete i.legendIcon,ye.cloneElement(e.legendIcon,i)}return ye.createElement(DO,{fill:a,cx:n,cy:n,size:Po,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:Po,height:Po},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=Za(Ed(Ed({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=wv(t.value)?null:t.value;mv(!wv(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 ye.createElement("li",ox({className:c,style:u,key:"legend-item-".concat(n)},p9(e.props,t,n)),ye.createElement(b9,{width:r,height:r,viewBox:l,style:s},e.renderIcon(t)),ye.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 ye.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}();function u4(){if(jC)return yy;jC=1;var e=rm();return yy=function(){this.__data__=new e,this.size=0}}function c4(){if(FC)return by;return FC=1,by=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function f4(){if(BC)return wy;return BC=1,wy=function(e){return this.__data__.get(e)}}function d4(){if(qC)return xy;return qC=1,xy=function(e){return this.__data__.has(e)}}function p4(){if(zC)return _y;zC=1;var e=rm(),t=Jx(),n=e_();return _y=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 a_(){if(WC)return $y;WC=1;var e=rm(),t=u4(),n=c4(),r=f4(),o=d4(),a=p4();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,$y=i}function h4(){if(UC)return Sy;UC=1;return Sy=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function v4(){if(HC)return Cy;return HC=1,Cy=function(e){return this.__data__.has(e)}}function MO(){if(VC)return Ey;VC=1;var e=e_(),t=h4(),n=v4();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,Ey=r}function m4(){if(GC)return Py;return GC=1,Py=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 LO(){if(KC)return Ry;return KC=1,Ry=function(e,t){return e.has(t)}}function jO(){if(YC)return Ty;YC=1;var e=MO(),t=m4(),n=LO();return Ty=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 h=-1,m=!0,v=2&a?new e:void 0;for(u.set(r,o),u.set(o,r);++h<c;){var g=r[h],y=o[h];if(i)var b=s?i(y,g,h,o,r,u):i(g,y,h,r,o,u);if(void 0!==b){if(b)continue;m=!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)}))){m=!1;break}}else if(g!==y&&!l(g,y,a,i,u)){m=!1;break}}return u.delete(r),u.delete(o),m}}function FO(){if(XC)return Oy;XC=1;var e=Er().Uint8Array;return Oy=e}function g4(){if(QC)return Ay;return QC=1,Ay=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function s_(){if(ZC)return Ny;return ZC=1,Ny=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function y4(){if(JC)return Dy;JC=1;var e=ac(),t=FO(),n=tm(),r=jO(),o=g4(),a=s_(),i=e?e.prototype:void 0,l=i?i.valueOf:void 0;return Dy=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 h=1&s;if(p||(p=a),e.size!=i.size&&!h)return!1;var m=f.get(e);if(m)return m==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 l_(){if(eE)return Iy;return eE=1,Iy=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function BO(){if(tE)return ky;tE=1;var e=l_(),t=Cr();return ky=function(n,r,o){var a=r(n);return t(n)?a:e(a,o(n))}}function b4(){if(nE)return My;return nE=1,My=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 qO(){if(rE)return Ly;return rE=1,Ly=function(){return[]}}function u_(){if(oE)return jy;oE=1;var e=b4(),t=qO(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return jy=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function w4(){if(iE)return Fy;return iE=1,Fy=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function x4(){if(aE)return By;aE=1;var e=ta(),t=fo();return By=function(n){return t(n)&&"[object Arguments]"==e(n)}}function c_(){if(sE)return qy;sE=1;var e=x4(),t=fo(),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 qy=a}Ed(i_,"displayName","Legend"),Ed(i_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var zy,lE,uE,Wy,cE,Uy,fE,Hy,dE,Vy,pE,vd={exports:{}};function _4(){if(lE)return zy;return lE=1,zy=function(){return!1}}function f_(){return uE||(uE=1,e=vd,t=vd.exports,n=Er(),r=_4(),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),vd.exports;var e,t,n,r,o,a,i,l}function am(){if(cE)return Wy;cE=1;var e=/^(?:0|[1-9]\d*)$/;return Wy=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 d_(){if(fE)return Uy;fE=1;return Uy=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function $4(){if(dE)return Hy;dE=1;var e=ta(),t=d_(),n=fo(),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,Hy=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function sm(){if(pE)return Vy;return pE=1,Vy=function(e){return function(t){return e(t)}}}vd.exports;var hE,Gy,vE,Ky,mE,Yy,gE,Xy,yE,Qy,bE,Zy,wE,Jy,xE,eb,_E,tb,$E,nb,SE,rb,CE,ob,EE,ib,PE,ab,RE,sb,TE,lb,OE,ub,AE,cb,NE,fb,DE,db,IE,pb,kE,hb,ME,vb,LE,mb,jE,gb,FE,yb,BE,bb,qE,wb,zE,xb,WE,_b,UE,$b,HE,Sb,VE,Cb,GE,Eb,KE,Pb,YE,Rb,XE,Tb,QE,Ob,ZE,Ab,JE,Nb,eP,Db,tP,md={exports:{}};function p_(){return hE||(hE=1,e=md,t=md.exports,n=mO(),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),md.exports;var e,t,n,r,o,a,i}function zO(){if(vE)return Gy;vE=1;var e=$4(),t=sm(),n=p_(),r=n&&n.isTypedArray,o=r?t(r):e;return Gy=o}function WO(){if(mE)return Ky;mE=1;var e=w4(),t=c_(),n=Cr(),r=f_(),o=am(),a=zO(),i=Object.prototype.hasOwnProperty;return Ky=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,h=p?e(l.length,String):[],m=h.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,m)))&&h.push(v);return h}}function h_(){if(gE)return Yy;gE=1;var e=Object.prototype;return Yy=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function UO(){if(yE)return Xy;return yE=1,Xy=function(e,t){return function(n){return e(t(n))}}}function S4(){if(bE)return Qy;bE=1;var e=UO()(Object.keys,Object);return Qy=e}function HO(){if(wE)return Zy;wE=1;var e=h_(),t=S4(),n=Object.prototype.hasOwnProperty;return Zy=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 zd(){if(xE)return Jy;xE=1;var e=Jv(),t=d_();return Jy=function(n){return null!=n&&t(n.length)&&!e(n)}}function Wd(){if(_E)return eb;_E=1;var e=WO(),t=HO(),n=zd();return eb=function(r){return n(r)?e(r):t(r)}}function VO(){if($E)return tb;$E=1;var e=BO(),t=u_(),n=Wd();return tb=function(r){return e(r,n,t)}}function C4(){if(SE)return nb;SE=1;var e=VO(),t=Object.prototype.hasOwnProperty;return nb=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),h=l.get(r);if(p&&h)return p==r&&h==n;var m=!0;l.set(n,r),l.set(r,n);for(var 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)){m=!1;break}v||(v="constructor"==f)}if(m&&!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)&&(m=!1)}return l.delete(n),l.delete(r),m}}function E4(){if(CE)return rb;CE=1;var e=gl()(Er(),"DataView");return rb=e}function P4(){if(EE)return ob;EE=1;var e=gl()(Er(),"Promise");return ob=e}function GO(){if(PE)return ib;PE=1;var e=gl()(Er(),"Set");return ib=e}function KO(){if(RE)return ab;RE=1;var e=gl()(Er(),"WeakMap");return ab=e}function Ud(){if(TE)return sb;TE=1;var e=E4(),t=Jx(),n=P4(),r=GO(),o=KO(),a=ta(),i=gO(),l="[object Map]",u="[object Promise]",s="[object Set]",c="[object WeakMap]",d="[object DataView]",f=i(e),p=i(t),h=i(n),m=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 h:return u;case m:return s;case v:return c}return t}),sb=g}function R4(){if(OE)return lb;OE=1;var e=a_(),t=jO(),n=y4(),r=C4(),o=Ud(),a=Cr(),i=f_(),l=zO(),u="[object Arguments]",s="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return lb=function(f,p,h,m,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,k=(x=x==u?c:x)==c,P=w==x;if(P&&i(f)){if(!i(p))return!1;y=!0,_=!1}if(P&&!_)return g||(g=new e),y||l(f)?t(f,p,h,m,v,g):n(f,p,w,h,m,v,g);if(!(1&h)){var S=_&&d.call(f,"__wrapped__"),C=k&&d.call(p,"__wrapped__");if(S||C){var E=S?f.value():f,N=C?p.value():p;return g||(g=new e),v(E,N,h,m,g)}}return!!P&&(g||(g=new e),r(f,p,h,m,v,g))}}function YO(){if(AE)return ub;AE=1;var e=R4(),t=fo();return ub=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))},ub}function T4(){if(NE)return cb;NE=1;var e=a_(),t=YO();return cb=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 h=a(d,f,c,n,r,p);if(!(void 0===h?t(f,d,3,a,p):h))return!1}}return!0}}function XO(){if(DE)return fb;DE=1;var e=No();return fb=function(t){return t==t&&!e(t)}}function O4(){if(IE)return db;IE=1;var e=XO(),t=Wd();return db=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 QO(){if(kE)return pb;return kE=1,pb=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function A4(){if(ME)return hb;ME=1;var e=T4(),t=O4(),n=QO();return hb=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 N4(){if(LE)return vb;return LE=1,vb=function(e,t){return null!=e&&t in Object(e)}}function D4(){if(jE)return mb;jE=1;var e=bO(),t=c_(),n=Cr(),r=am(),o=d_(),a=qd();return mb=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 I4(){if(FE)return gb;FE=1;var e=N4(),t=D4();return gb=function(n,r){return null!=n&&t(n,r,e)}}function k4(){if(BE)return yb;BE=1;var e=YO(),t=wO(),n=I4(),r=Zx(),o=XO(),a=QO(),i=qd();return yb=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 Hd(){if(qE)return bb;return qE=1,bb=function(e){return e}}function M4(){if(zE)return wb;return zE=1,wb=function(e){return function(t){return null==t?void 0:t[e]}}}function L4(){if(WE)return xb;WE=1;var e=r_();return xb=function(t){return function(n){return e(n,t)}}}function j4(){if(UE)return _b;UE=1;var e=M4(),t=L4(),n=Zx(),r=qd();return _b=function(o){return n(o)?e(r(o)):t(o)}}function v_(){if(HE)return $b;HE=1;var e=A4(),t=k4(),n=Hd(),r=Cr(),o=j4();return $b=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 F4(){if(VE)return Sb;return VE=1,Sb=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 B4(){if(GE)return Cb;return GE=1,Cb=function(e){return e!=e}}function q4(){if(KE)return Eb;return KE=1,Eb=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function z4(){if(YE)return Pb;YE=1;var e=F4(),t=B4(),n=q4();return Pb=function(r,o,a){return o==o?n(r,o,a):e(r,t,a)}}function ZO(){if(XE)return Rb;XE=1;var e=z4();return Rb=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function W4(){if(QE)return Tb;return QE=1,Tb=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 JO(){if(ZE)return Ob;return ZE=1,Ob=function(){}}function U4(){if(JE)return Ab;JE=1;var e=GO(),t=JO(),n=s_(),r=e&&1/n(new e([,-0]))[1]==1/0?function(t){return new e(t)}:t;return Ab=r}function H4(){if(eP)return Nb;eP=1;var e=MO(),t=ZO(),n=W4(),r=LO(),o=U4(),a=s_();return Nb=function(i,l,u){var s=-1,c=t,d=i.length,f=!0,p=[],h=p;if(u)f=!1,c=n;else if(d>=200){var m=l?null:o(i);if(m)return a(m);f=!1,c=r,h=new e}else h=l?[]:p;e:for(;++s<d;){var v=i[s],g=l?l(v):v;if(v=u||0!==v?v:0,f&&g==g){for(var y=h.length;y--;)if(h[y]===g)continue e;l&&h.push(g),p.push(v)}else c(h,g,u)||(h!==p&&h.push(g),p.push(v))}return p}}function V4(){if(tP)return Db;tP=1;var e=v_(),t=H4();return Db=function(n,r){return n&&n.length?t(n,e(r,2)):[]}}md.exports;var G4=V4();const nP=Oo(G4);function eA(e,t,n){return!0===t?nP(e,n):wv(t)?nP(e,t):e}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)}var K4=["ref"];function rP(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 Vi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rP(Object(n),!0).forEach((function(t){lm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oP(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,nA(r.key),r)}}function X4(e,t,n){return oP(e.prototype,t),oP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q4(e,t,n){return t=Cv(t),Z4(e,tA()?Reflect.construct(t,n,Cv(e).constructor):t.apply(e,n))}function Z4(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 J4(e)}function J4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tA=function(){return!!e})()}function Cv(e){return(Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eL(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&&ax(e,t)}function ax(e,t){return(ax=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lm(e,t,n){return(t=nA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nA(e){var t=tL(e,"string");return"symbol"==Ku(t)?t:t+""}function tL(e,t){if("object"!=Ku(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function nL(e,t){if(null==e)return{};var n,r,o=rL(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 rL(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 oL(e){return e.value}function iL(e,t){if(ye.isValidElement(e))return ye.cloneElement(e,t);if("function"==typeof e)return ye.createElement(e,t);t.ref;var n=nL(t,K4);return ye.createElement(i_,n)}var Ib,aP,kb,sP,Mb,lP,Lb,uP,jb,cP,Fb,fP,Bb,dP,qb,pP,zb,hP,Wb,vP,Ub,mP,Hb,gP,Vb,yP,Gb,bP,Kb,wP,Yb,xP,Xb,_P,Qb,$P,Zb,SP,Jb,CP,e1,EP,t1,PP,iP=1,m_=function(){function e(){var t;Y4(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return lm(t=Q4(this,e,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),t}return eL(e,Wv),X4(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)>iP||Math.abs(t.height-this.lastBoundingBox.height)>iP)&&(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?Vi({},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 Vi(Vi({},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=Vi(Vi({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return ye.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(t){e.wrapperNode=t}},iL(n,Vi(Vi({},this.props),{},{payload:eA(l,i,oL)})))}}],[{key:"getWithHeight",value:function(e,t){var n=Vi(Vi({},this.defaultProps),e.props).layout;return"vertical"===n&&Wo(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}();function aL(){if(aP)return Ib;aP=1;var e=ac(),t=c_(),n=Cr(),r=e?e.isConcatSpreadable:void 0;return Ib=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function rA(){if(sP)return kb;sP=1;var e=l_(),t=aL();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 sL(){if(lP)return Mb;return lP=1,Mb=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 lL(){if(uP)return Lb;uP=1;var e=sL()();return Lb=e}function uL(){if(cP)return jb;cP=1;var e=lL(),t=Wd();return jb=function(n,r){return n&&e(n,r,t)}}function cL(){if(fP)return Fb;fP=1;var e=zd();return Fb=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 fL(){if(dP)return Bb;dP=1;var e=uL(),t=cL()(e);return Bb=t}function dL(){if(pP)return qb;pP=1;var e=fL(),t=zd();return qb=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 pL(){if(hP)return zb;return hP=1,zb=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}}function hL(){if(vP)return Wb;vP=1;var e=sc();return Wb=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 vL(){if(mP)return Ub;mP=1;var e=hL();return Ub=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 mL(){if(gP)return Hb;gP=1;var e=t_(),t=r_(),n=v_(),r=dL(),o=pL(),a=sm(),i=vL(),l=Hd(),u=Cr();return Hb=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 g_(){if(yP)return Vb;return yP=1,Vb=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 oA(){if(bP)return Gb;bP=1;var e=g_(),t=Math.max;return Gb=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)}},Gb}function gL(){if(wP)return Kb;return wP=1,Kb=function(e){return function(){return e}}}function iA(){if(xP)return Yb;xP=1;var e=gl(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Yb=t}function yL(){if(_P)return Xb;_P=1;var e=gL(),t=iA(),n=Hd();return Xb=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function aA(){if($P)return Qb;$P=1;var e=Date.now;return Qb=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)}},Qb}function y_(){if(SP)return Zb;SP=1;var e=yL(),t=aA()(e);return Zb=t}function bL(){if(CP)return Jb;CP=1;var e=Hd(),t=oA(),n=y_();return Jb=function(r,o){return n(t(r,o,e),r+"")}}function wL(){if(EP)return e1;EP=1;var e=tm(),t=zd(),n=am(),r=No();return e1=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 xL(){if(PP)return t1;PP=1;var e=rA(),t=mL(),n=bL(),r=wL(),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 t1=o}lm(m_,"displayName","Legend"),lm(m_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var _L=xL();const $L=Oo(_L);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 SL(e,t){return RL(e)||PL(e,t)||EL(e,t)||CL()}function CL(){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 EL(e,t){if(e){if("string"==typeof e)return RP(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 RP(e,t)}}function RP(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 PL(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 RL(e){if(Array.isArray(e))return e}function TP(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 n1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TP(Object(n),!0).forEach((function(t){TL(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TL(e,t,n){return(t=OL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OL(e){var t=AL(e,"string");return"symbol"==Pd(t)?t:t+""}function AL(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 NL(e){return Array.isArray(e)&&xv(e[0])&&xv(e[1])?e.join(" ~ "):e}var DL=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,h=e.label,m=e.labelFormatter,v=e.accessibilityLayer,g=void 0!==v&&v,y=n1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=n1({margin:0},u),w=!Z5(h),x=w?h:"",_=Za("recharts-default-tooltip",f),k=Za("recharts-tooltip-label",p);w&&m&&null!=s&&(x=m(h,s));var P=g?{role:"status","aria-live":"assertive"}:{};return ye.createElement("div",sx({className:_,style:y},P),ye.createElement("p",{className:k,style:b},ye.isValidElement(x)?x:"".concat(x)),function(){if(s&&s.length){var e=(d?$L(s,d):s).map((function(e,t){if("none"===e.type)return null;var r=n1({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||c||NL,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=SL(f,2);u=p[0],d=p[1]}else u=f}return ye.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},xv(d)?ye.createElement("span",{className:"recharts-tooltip-item-name"},d):null,xv(d)?ye.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,ye.createElement("span",{className:"recharts-tooltip-item-value"},u),ye.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return ye.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Rd(e){return(Rd="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 rv(e,t,n){return(t=IL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IL(e){var t=kL(e,"string");return"symbol"==Rd(t)?t:t+""}function kL(e,t){if("object"!=Rd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var cd="recharts-tooltip-wrapper",ML={visibility:"hidden"};function LL(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Za(cd,rv(rv(rv(rv({},"".concat(cd,"-right"),Wo(n)&&t&&Wo(t.x)&&n>=t.x),"".concat(cd,"-left"),Wo(n)&&t&&Wo(t.x)&&n<t.x),"".concat(cd,"-bottom"),Wo(r)&&t&&Wo(t.y)&&r>=t.y),"".concat(cd,"-top"),Wo(r)&&t&&Wo(t.y)&&r<t.y))}function OP(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&&Wo(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 jL(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 FL(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=jL({translateX:n=OP({allowEscapeViewBox:o,coordinate:a,key:"x",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=OP({allowEscapeViewBox:o,coordinate:a,key:"y",offsetTopLeft:i,position:l,reverseDirection:u,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:c}):t=ML,{cssProperties:t,cssClasses:LL({translateX:n,translateY:r,coordinate:a})}}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 AP(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 NP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AP(Object(n),!0).forEach((function(t){ux(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qL(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,lA(r.key),r)}}function zL(e,t,n){return qL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WL(e,t,n){return t=Ev(t),UL(e,sA()?Reflect.construct(t,n,Ev(e).constructor):t.apply(e,n))}function UL(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 HL(e)}function HL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(sA=function(){return!!e})()}function Ev(e){return(Ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function VL(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&&lx(e,t)}function lx(e,t){return(lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ux(e,t,n){return(t=lA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lA(e){var t=GL(e,"string");return"symbol"==Yu(t)?t:t+""}function GL(e,t){if("object"!=Yu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Yu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var DP=1,KL=function(){function e(){var t;BL(this,e);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return ux(t=WL(this,e,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),ux(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 VL(e,Wv),zL(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>DP||Math.abs(e.height-this.state.lastBoundingBox.height)>DP)&&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,h=t.viewBox,m=t.wrapperStyle,v=FL({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:c,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:h}),g=v.cssClasses,y=v.cssProperties,b=NP(NP({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},m);return ye.createElement("div",{tabIndex:-1,className:g,style:b,ref:function(t){e.wrapperNode=t}},i)}}])}(),YL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gv={isSsr:YL(),get:function(e){return gv[e]},set:function(e,t){if("string"==typeof e)gv[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){gv[t]=e[t]}))}}};function Xu(e){return(Xu="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 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 kP(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){b_(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 XL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QL(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,cA(r.key),r)}}function ZL(e,t,n){return QL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JL(e,t,n){return t=Pv(t),ej(e,uA()?Reflect.construct(t,n||[],Pv(e).constructor):t.apply(e,n))}function ej(e,t){if(t&&("object"===Xu(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 uA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(uA=function(){return!!e})()}function Pv(e){return(Pv=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&&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 b_(e,t,n){return(t=cA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cA(e){var t=rj(e,"string");return"symbol"==Xu(t)?t:t+""}function rj(e,t){if("object"!=Xu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function oj(e){return e.dataKey}function ij(e,t){return ye.isValidElement(e)?ye.cloneElement(e,t):"function"==typeof e?ye.createElement(e,t):ye.createElement(DL,t)}var r1,MP,o1,LP,i1,jP,a1,FP,s1,BP,l1,qP,w_=function(){function e(){return XL(this,e),JL(this,e,arguments)}return nj(e,Wv),ZL(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,h=t.reverseDirection,m=t.useTranslate3d,v=t.viewBox,g=t.wrapperStyle,y=d??[];u&&y.length&&(y=eA(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),f,oj));var b=y.length>0;return ye.createElement(KL,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:s,active:n,coordinate:l,hasPayload:b,offset:c,position:p,reverseDirection:h,useTranslate3d:m,viewBox:v,wrapperStyle:g},ij(i,kP(kP({},this.props),{},{payload:y})))}}])}();function aj(){if(MP)return r1;MP=1;var e=Er();return r1=function(){return e.Date.now()}}function sj(){if(LP)return o1;LP=1;var e=/\s/;return o1=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function lj(){if(jP)return i1;jP=1;var e=sj(),t=/^\s+/;return i1=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function fA(){if(FP)return a1;FP=1;var e=lj(),t=No(),n=sc(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;return a1=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 dA(){if(BP)return s1;BP=1;var e=No(),t=aj(),n=fA(),r=Math.max,o=Math.min;return s1=function(a,i,l){var u,s,c,d,f,p,h=0,m=!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,h=e,d=a.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||v&&e-h>=c}function w(){var e=t();if(b(e))return x(e);f=setTimeout(w,function(e){var t=i-(e-p);return v?o(t,c-(e-h)):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 h=e,f=setTimeout(w,i),m?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)&&(m=!!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),h=0,u=p=s=f=void 0},_.flush=function(){return void 0===f?d:x(t())},_},s1}function uj(){if(qP)return l1;qP=1;var e=dA(),t=No();return l1=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})}}b_(w_,"displayName","Tooltip"),b_(w_,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gv.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 cj=uj();const fj=Oo(cj);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 zP(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 ov(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zP(Object(n),!0).forEach((function(t){dj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dj(e,t,n){return(t=pj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pj(e){var t=hj(e,"string");return"symbol"==Td(t)?t:t+""}function hj(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)}function vj(e,t){return bj(e)||yj(e,t)||gj(e,t)||mj()}function mj(){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 gj(e,t){if(e){if("string"==typeof e)return WP(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 WP(e,t)}}function WP(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 yj(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 bj(e){if(Array.isArray(e))return e}var u1,UP,c1,HP,f1,VP,d1,GP,p1,KP,h1,YP,v1,XP,m1,QP,g1,ZP,y1,JP,b1,e2,w1,t2,x1,n2,wj=_e((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,p=e.children,h=e.debounce,m=void 0===h?0:h,v=e.id,g=e.className,y=e.onResize,b=e.style,w=void 0===b?{}:b,x=ke(null),_=ke();_.current=y,cM(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var k=vj(tt({containerWidth:o.width,containerHeight:o.height}),2),P=k[0],S=k[1],C=lt((function(e,t){S((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);We((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;C(r,o),null===(t=_.current)||void 0===t||t.call(_,r,o)};m>0&&(e=fj(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return C(r,o),t.observe(x.current),function(){t.disconnect()}}),[C,m]);var E=Ur((function(){var e=P.containerWidth,t=P.containerHeight;if(e<0||t<0)return null;mv(tv(i)||tv(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,u),mv(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=tv(i)?e:i,o=tv(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),mv(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(p)&&h9(p.type).endsWith("Chart");return ye.Children.map(p,(function(e){return ye.isValidElement(e)?ml(e,ov({width:r,height:o},a?{style:ov({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,P,i]);return ye.createElement("div",{id:v?"".concat(v):void 0,className:Za("recharts-responsive-container",g),style:ov(ov({},w),{},{width:i,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:x},E)}));function x_(){if(UP)return u1;UP=1;var e=UO()(Object.getPrototypeOf,Object);return u1=e}function xj(){if(HP)return c1;HP=1;var e=ta(),t=x_(),n=fo(),r=Function.prototype,o=Object.prototype,a=r.toString,i=o.hasOwnProperty,l=a.call(Object);return c1=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 _j(){if(VP)return f1;VP=1;var e=fA(),t=1/0;return f1=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function pA(){if(GP)return d1;GP=1;var e=iA();return d1=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function hA(){if(KP)return p1;KP=1;var e=_j();return p1=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function __(){if(YP)return h1;return YP=1,h1=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function vA(){if(XP)return v1;XP=1;var e=pA(),t=tm(),n=Object.prototype.hasOwnProperty;return v1=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 um(){if(QP)return m1;QP=1;var e=vA(),t=pA();return m1=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 mA(){if(ZP)return g1;ZP=1;var e=um(),t=Wd();return g1=function(n,r){return n&&e(r,t(r),n)}}function $j(){if(JP)return y1;return JP=1,y1=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function Sj(){if(e2)return b1;e2=1;var e=No(),t=h_(),n=$j(),r=Object.prototype.hasOwnProperty;return b1=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 $_(){if(t2)return w1;t2=1;var e=WO(),t=Sj(),n=zd();return w1=function(r){return n(r)?e(r,!0):t(r)}}function Cj(){if(n2)return x1;n2=1;var e=um(),t=$_();return x1=function(n,r){return n&&e(r,t(r),n)}}var r2,_1,o2,$1,i2,S1,a2,C1,s2,E1,l2,P1,u2,R1,c2,T1,f2,O1,d2,A1,p2,N1,h2,D1,v2,I1,m2,k1,g2,M1,y2,L1,b2,j1,w2,F1,x2,B1,_2,q1,$2,z1,S2,gd={exports:{}};function Ej(){return r2||(r2=1,e=gd,t=gd.exports,n=Er(),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 cm(){if(o2)return _1;return o2=1,_1=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function Pj(){if(i2)return $1;i2=1;var e=um(),t=u_();return $1=function(n,r){return e(n,t(n),r)}}function gA(){if(a2)return S1;a2=1;var e=l_(),t=x_(),n=u_(),r=qO(),o=Object.getOwnPropertySymbols;return S1=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function Rj(){if(s2)return C1;s2=1;var e=um(),t=gA();return C1=function(n,r){return e(n,t(n),r)}}function Tj(){if(l2)return E1;l2=1;var e=BO(),t=gA(),n=$_();return E1=function(r){return e(r,n,t)}}function Oj(){if(u2)return P1;u2=1;var e=Object.prototype.hasOwnProperty;return P1=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 S_(){if(c2)return R1;c2=1;var e=FO();return R1=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function Aj(){if(f2)return T1;f2=1;var e=S_();return T1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function Nj(){if(d2)return O1;d2=1;var e=/\w*$/;return O1=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function Dj(){if(p2)return A1;p2=1;var e=ac(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return A1=function(e){return n?Object(n.call(e)):{}}}function Ij(){if(h2)return N1;h2=1;var e=S_();return N1=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function kj(){if(v2)return D1;v2=1;var e=S_(),t=Aj(),n=Nj(),r=Dj(),o=Ij();return D1=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 fm(){if(m2)return I1;m2=1;var e=No(),t=Object.create;return I1=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 Mj(){if(g2)return k1;g2=1;var e=fm(),t=x_(),n=h_();return k1=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function Lj(){if(y2)return M1;y2=1;var e=Ud(),t=fo();return M1=function(n){return t(n)&&"[object Map]"==e(n)}}function jj(){if(b2)return L1;b2=1;var e=Lj(),t=sm(),n=p_(),r=n&&n.isMap,o=r?t(r):e;return L1=o}function Fj(){if(w2)return j1;w2=1;var e=Ud(),t=fo();return j1=function(n){return t(n)&&"[object Set]"==e(n)}}function Bj(){if(x2)return F1;x2=1;var e=Fj(),t=sm(),n=p_(),r=n&&n.isSet,o=r?t(r):e;return F1=o}function yA(){if(_2)return B1;_2=1;var e=a_(),t=__(),n=vA(),r=mA(),o=Cj(),a=Ej(),i=cm(),l=Pj(),u=Rj(),s=VO(),c=Tj(),d=Ud(),f=Oj(),p=kj(),h=Mj(),m=Cr(),v=f_(),g=jj(),y=No(),b=Bj(),w=Wd(),x=$_(),_="[object Arguments]",k="[object Function]",P="[object Object]",S={};return S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[P]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[k]=S["[object WeakMap]"]=!1,B1=function C(E,N,O,T,R,j){var D,z=1&N,A=2&N,M=4&N;if(O&&(D=R?O(E,T,R,j):O(E)),void 0!==D)return D;if(!y(E))return E;var L=m(E);if(L){if(D=f(E),!z)return i(E,D)}else{var I=d(E),F=I==k||"[object GeneratorFunction]"==I;if(v(E))return a(E,z);if(I==P||I==_||F&&!R){if(D=A||F?{}:h(E),!z)return A?u(E,o(D,E)):l(E,r(D,E))}else{if(!S[I])return R?E:{};D=p(E,I,z)}}j||(j=new e);var W=j.get(E);if(W)return W;j.set(E,D),b(E)?E.forEach((function(e){D.add(C(e,N,O,e,E,j))})):g(E)&&E.forEach((function(e,t){D.set(t,C(e,N,O,t,E,j))}));var B=L?void 0:(M?A?c:s:A?x:w)(E);return t(B||E,(function(e,t){B&&(e=E[t=e]),n(D,t,C(e,N,O,t,E,j))})),D},B1}function qj(){if($2)return q1;$2=1;var e=rA();return q1=function(t){return(null==t?0:t.length)?e(t,1):[]}}function zj(){if(S2)return z1;S2=1;var e=qj(),t=oA(),n=y_();return z1=function(r){return n(t(r,void 0,e),r+"")}}gd.exports;const Wj={light:"",dark:".dark"},bA=P.createContext(null);function wA(){const e=P.useContext(bA);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const Uj=P.forwardRef((({id:e,className:t,children:n,config:r,...o},a)=>{const i=P.useId(),l=`chart-${e||i.replace(/:/g,"")}`;return k.jsx(bA.Provider,{value:{config:r},children:k.jsxs("div",{"data-chart":l,ref:a,className:se("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:[k.jsx(Hj,{id:l,config:r}),k.jsx(wj,{children:n})]})})}));Uj.displayName="Chart";const Hj=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?k.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Wj).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},OX=w_,Vj=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,hoveredItem:p,onItemHover:h},m)=>{const{config:v}=wA(),g=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=fx(v,n,r),s=f||"string"!=typeof i?null==a?void 0:a.label:(null==(e=v[i])?void 0:e.label)||i;return l?k.jsx("div",{className:se("font-medium",u),children:l(s,t)}):s?k.jsx("div",{className:se("font-medium",u),children:s}):null}),[i,l,t,o,u,v,f]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,b=t.length>10;return k.jsxs("div",{ref:m,className:se("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",b&&"min-w-[16rem]",n),children:[y?null:g,k.jsx("div",{className:se("grid gap-xxs",b&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,i=fx(v,e,o),l=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return k.jsx("div",{className:se("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",u?"":p?"opacity-40":""),onMouseEnter:()=>null==h?void 0:h(o),onMouseLeave:()=>null==h?void 0:h(null),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]):k.jsxs(k.Fragment,{children:[null!=i&&i.icon?k.jsx(i.icon,{}):!a&&k.jsx("div",{className:se("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":l,"--color-border":l}}),k.jsxs("div",{className:se("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[k.jsxs("div",{className:"grid gap-xxs",children:[y?g:null,k.jsx("span",{className:se("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==i?void 0:i.label)||e.name})]}),e.value&&k.jsx("span",{className:se("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));Vj.displayName="ChartTooltip";const AX=m_,Gj=P.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:a},i)=>{const{config:l}=wA(),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?k.jsx("div",{ref:i,className:se("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,s=fx(l,e,i),c=!!o&&i===a;return k.jsxs("div",{ref:e=>{e?u.current[i]=e:delete u.current[i]},className:se("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":a?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=s&&s.icon&&!t?k.jsx(s.icon,{}):k.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),k.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 fx(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]}Gj.displayName="ChartLegend";const Kj=({children:e,className:t})=>k.jsx("div",{className:se("flex flex-wrap gap-1",t),children:e}),C2=({text:e,icon:t,disabled:n,avatarSrc:r,onClick:o,onRemove:a})=>k.jsxs("div",{onClick:n?void 0:o,className:se("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&&k.jsxs(sO,{className:se("size-6 text-[10px]"),children:[k.jsx(lO,{src:r,alt:e}),k.jsx(uO,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,k.jsx("span",{children:e}),a&&k.jsx("button",{onClick:e=>{e.stopPropagation(),null==a||a()},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},disabled:n,className:"pointer-events-auto cursor-pointer",children:k.jsx(Ix,{size:16})})]});function dm(e){const t=ke({value:e,previous:e});return Ur((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function pm(e){const[t,n]=tt(void 0);return fr((()=>{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 xA="Checkbox",[Yj,NX]=Sr(xA),[Xj,Qj]=Yj(xA),Zj=_e(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=tt(null),p=Rt(t,(e=>f(e))),h=ke(!1),m=!d||!!d.closest("form"),[v=!1,g]=Vo({prop:o,defaultProp:a,onChange:s}),y=ke(v);return We((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>g(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,g]),z(Xj,{scope:n,state:v,disabled:l},z(it.button,fe({type:"button",role:"checkbox","aria-checked":sl(v)?"mixed":v,"aria-required":i,"data-state":_A(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onKeyDown:ze(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:ze(e.onClick,(e=>{g((e=>!!sl(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&z(tF,{control:d,bubbles:!h.current,name:r,value:u,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),Jj="CheckboxIndicator",eF=_e(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Qj(Jj,n);return z(Ao,{present:r||sl(a.state)||!0===a.state},z(it.span,fe({"data-state":_A(a.state),"data-disabled":a.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),tF=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=ke(null),i=dm(n),l=pm(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=sl(n),o.call(e,!sl(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),z("input",fe({type:"checkbox","aria-hidden":!0,defaultChecked:!sl(n)&&n},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sl(e){return"indeterminate"===e}function _A(e){return sl(e)?"indeterminate":e?"checked":"unchecked"}const $A=Zj,nF=eF,rF=Ji("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"}}),C_=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?k.jsx(jM,{...e}):k.jsx(Dx,{...e});return k.jsxs($A,{ref:a,className:se(e,rF({size:t,variant:n})),...o,children:[k.jsx("div",{className:se("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})}),k.jsx(nF,{className:"relative flex items-center justify-center text-current",children:k.jsx(s,{className:"size-xxxs",color:o.disabled?"var(--slate-300)":"white"})})]})}));C_.displayName=$A.displayName;var E2=1,oF=.9,iF=.8,aF=.17,W1=.1,U1=.999,sF=.9999,lF=.99,uF=/[\\\/_+.#"@\[\(\{&]/,cF=/[\\\/_+.#"@\[\(\{&]/g,fF=/[\s-]/,SA=/[\s-]/g;function dx(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?E2:lF;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),h=0;p>=0;)(u=dx(e,t,n,r,p+1,a+1,i))>h&&(p===o?u*=E2:uF.test(e.charAt(p-1))?(u*=iF,(c=e.slice(o,p-1).match(cF))&&o>0&&(u*=Math.pow(U1,c.length))):fF.test(e.charAt(p-1))?(u*=oF,(d=e.slice(o,p-1).match(SA))&&o>0&&(u*=Math.pow(U1,d.length))):(u*=aF,o>0&&(u*=Math.pow(U1,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=sF)),(u<W1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&((s=dx(e,t,n,r,p+1,a+2,i))*W1>u&&(u=s*W1)),u>h&&(h=u),p=n.indexOf(f,p+1);return i[l]=h,h}function P2(e){return e.toLowerCase().replace(SA," ")}function dF(e,t,n){return dx(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,P2(e),P2(t),0,0,{})}var fd='[cmdk-group=""]',H1='[cmdk-group-items=""]',pF='[cmdk-group-heading=""]',E_='[cmdk-item=""]',R2=`${E_}:not([aria-disabled="true"])`,px="cmdk-item-select",ol="data-value",hF=(e,t,n)=>dF(e,t,n),CA=P.createContext(void 0),Vd=()=>P.useContext(CA),EA=P.createContext(void 0),P_=()=>P.useContext(EA),PA=P.createContext(void 0),RA=P.forwardRef(((e,t)=>{let n=Wu((()=>{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=Wu((()=>new Set)),o=Wu((()=>new Map)),a=Wu((()=>new Map)),i=Wu((()=>new Set)),l=TA(e),{label:u,children:s,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:v=!0,...g}=e,y=P.useId(),b=P.useId(),w=P.useId(),x=P.useRef(null),_=CF();cl((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,k.emit()}}),[c]),cl((()=>{_(6,T)}),[]);let k=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)O(),E(),_(1,N);else if("value"===e&&(r||_(5,T),void 0!==(null==(o=l.current)?void 0:o.value))){let e=t??"";return void(null==(i=(a=l.current).onValueChange)||i.call(a,e))}k.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),S=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)),_(2,(()=>{E(),k.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),_(3,(()=>{O(),E(),n.current.value||N(),k.emit()})),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();_(4,(()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&N(),k.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:m,listId:y,inputId:w,labelId:b,listInnerRef:x})),[]);function C(e,t){var r,o;let a=null!=(o=null==(r=l.current)?void 0:r.filter)?o:hF;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),a=0;r.forEach((t=>{let n=e.get(t);a=Math.max(n,a)})),t.push([n,a])}));let r=x.current;j().sort(((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)})).forEach((e=>{let t=e.closest(H1);t?t.appendChild(e.parentElement===t?e:e.closest(`${H1} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${H1} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${fd}[${ol}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function N(){let e=j().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(ol);k.setState("value",t||void 0)}function O(){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 T(){var e,t,n;let r=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(fd))?void 0:t.querySelector(pF))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=x.current)?void 0:e.querySelector(`${E_}[aria-selected="true"]`)}function j(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(R2))}function D(e){let t=j()[e];t&&k.setState("value",t.getAttribute(ol))}function z(e){var t;let n=R(),r=j(),o=r.findIndex((e=>e===n)),a=r[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&k.setState("value",a.getAttribute(ol))}function A(e){let t,n=R(),r=null==n?void 0:n.closest(fd);for(;r&&!t;)r=e>0?$F(r,fd):SF(r,fd),t=null==r?void 0:r.querySelector(R2);t?k.setState("value",t.getAttribute(ol)):z(e)}let M=()=>D(j().length-1),L=e=>{e.preventDefault(),e.metaKey?M():e.altKey?A(1):z(1)},I=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?A(-1):z(-1)};return P.createElement(it.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":v&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":v&&e.ctrlKey&&I(e);break;case"ArrowUp":I(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),M();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=R();if(t){let e=new Event(px);t.dispatchEvent(e)}}}}},P.createElement("label",{"cmdk-label":"",htmlFor:S.inputId,id:S.labelId,style:PF},u),hm(e,(e=>P.createElement(EA.Provider,{value:k},P.createElement(CA.Provider,{value:S},e)))))})),vF=P.forwardRef(((e,t)=>{var n,r;let o=P.useId(),a=P.useRef(null),i=P.useContext(PA),l=Vd(),u=TA(e),s=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;cl((()=>{if(!s)return l.item(o,null==i?void 0:i.id)}),[s]);let c=OA(o,a,[e.value,e.children,a],e.keywords),d=P_(),f=fl((e=>e.value&&e.value===c.current)),p=fl((e=>!(!s&&!1!==l.filter())||(!e.search||e.filtered.items.get(o)>0)));function h(){var e,t;m(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(P.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(px,h),()=>t.removeEventListener(px,h)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:v,value:g,onSelect:y,forceMount:b,keywords:w,...x}=e;return P.createElement(it.div,{ref:Od([a,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||l.disablePointerSelection?void 0:m,onClick:v?void 0:h},e.children)})),mF=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=Vd(),d=fl((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i))));cl((()=>c.group(i)),[]),OA(i,l,[e.value,e.heading,u]);let f=P.useMemo((()=>({id:i,forceMount:o})),[o]);return P.createElement(it.div,{ref:Od([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),hm(e,(e=>P.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},P.createElement(PA.Provider,{value:f},e)))))})),gF=P.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=P.useRef(null),a=fl((e=>!e.search));return n||a?P.createElement(it.div,{ref:Od([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),yF=P.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=P_(),i=fl((e=>e.search)),l=fl((e=>e.value)),u=Vd(),s=P.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${E_}[${ol}="${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(it.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)}})})),bF=P.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=P.useRef(null),i=P.useRef(null),l=Vd();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(it.div,{ref:Od([a,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},hm(e,(e=>P.createElement("div",{ref:Od([i,l.listInnerRef]),"cmdk-list-sizer":""},e))))})),wF=P.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...l}=e;return P.createElement(Xv,{open:n,onOpenChange:r},P.createElement(Qv,{container:i},P.createElement(rc,{"cmdk-overlay":"",className:o}),P.createElement(oc,{"aria-label":e.label,"cmdk-dialog":"",className:a},P.createElement(RA,{ref:t,...l}))))})),xF=P.forwardRef(((e,t)=>fl((e=>0===e.filtered.count))?P.createElement(it.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),_F=P.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return P.createElement(it.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},hm(e,(e=>P.createElement("div",{"aria-hidden":!0},e))))})),Vr=Object.assign(RA,{List:bF,Item:vF,Input:yF,Group:mF,Separator:gF,Dialog:wF,Empty:xF,Loading:_F});function $F(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function SF(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function TA(e){let t=P.useRef(e);return cl((()=>{t.current=e})),t}var cl=typeof window>"u"?P.useEffect:P.useLayoutEffect;function Wu(e){let t=P.useRef();return void 0===t.current&&(t.current=e()),t}function Od(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function fl(e){let t=P_(),n=()=>e(t.snapshot());return P.useSyncExternalStore(t.subscribe,n,n)}function OA(e,t,n,r=[]){let o=P.useRef(),a=Vd();return cl((()=>{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(ol,l),o.current=l})),o}var CF=()=>{let[e,t]=P.useState(),n=Wu((()=>new Map));return cl((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function EF(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function hm({asChild:e,children:t},n){return e&&P.isValidElement(t)?P.cloneElement(EF(t),{ref:t.ref},n(t.props.children)):n(t)}var PF={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const RF=Xv,DX=Hx,TF=Qv,IX=ic,AA=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")))}}),[]),k.jsx(rc,{ref:n,"data-testid":"dialog_overlay",className:se("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));AA.displayName=rc.displayName;const OF=Ji("",{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"}}),AF=Ji("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),NA=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 h=k.jsxs(ic,{className:se(OF({closeVariant:o})),children:[k.jsx(Ix,{onClick:c,fill:"currentColor",className:se(AF({closeSize:a}))}),k.jsx("span",{className:"sr-only",children:"Close"})]});return k.jsxs(TF,{children:[k.jsx(AA,{className:l,onClick:c}),r&&"insideCard"!==o&&h,k.jsxs(oc,{ref:p,className:se("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&&k.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]}),k.jsx("div",{className:se("p-m",u),children:i}),r&&"insideCard"===o&&h,s&&k.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:s,className:"absolute left-m top-m",children:k.jsx(mT,{color:"var(--slate-400)",size:24})}),k.jsx(DA,{className:"empty:hidden",children:null==d?void 0:d()})]})]})}));NA.displayName=oc.displayName;const NF=({className:e,...t})=>k.jsx("div",{className:se("border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",e),...t});NF.displayName="DialogHeader";const DA=({className:e,...t})=>k.jsx("div",{className:se("flex border-t border-slate-200 p-m",e),...t});DA.displayName="DialogFooter";const DF=P.forwardRef((({className:e,...t},n)=>k.jsx(jd,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));DF.displayName=jd.displayName;const IF=P.forwardRef((({className:e,...t},n)=>k.jsx(Fd,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));IF.displayName=Fd.displayName;const IA=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr,{ref:n,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));IA.displayName=Vr.displayName;const kX=({children:e,...t})=>k.jsx(RF,{...t,children:k.jsx(NA,{className:"overflow-hidden p-0 shadow-lg",children:k.jsx(IA,{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})})}),kF=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:k.jsx(Vr.Input,{ref:n,className:se("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})})));kF.displayName=Vr.Input.displayName;const MF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.List,{ref:n,className:se("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));MF.displayName=Vr.List.displayName;const LF=P.forwardRef(((e,t)=>k.jsx(Vr.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));LF.displayName=Vr.Empty.displayName;const jF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Group,{ref:n,className:se("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})));jF.displayName=Vr.Group.displayName;const FF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Separator,{ref:n,className:se("-mx-1 h-px bg-border",e),...t})));FF.displayName=Vr.Separator.displayName;const BF=P.forwardRef((({className:e,...t},n)=>k.jsx(Vr.Item,{ref:n,className:se("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})));BF.displayName=Vr.Item.displayName;const qF=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});function Ya(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 T2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function kA(...e){return t=>{let n=!1;const r=e.map((e=>{const r=T2(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():T2(e[t],null)}}}}function yl(...e){return P.useCallback(kA(...e),e)}function zF(e,t){const n=P.createContext(t),r=e=>{const{children:t,...r}=e,o=P.useMemo((()=>r),Object.values(r));return k.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 WF(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 k.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}\``)}]},UF(r,...t)]}function UF(...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}qF.displayName="CommandShortcut";var Rv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{},HF=P[" useId ".trim().toString()]||(()=>{}),VF=0;function V1(e){const[t,n]=P.useState(HF());return Rv((()=>{e||n((e=>e??String(VF++)))}),[e]),e||(t?`radix-${t}`:"")}function dl(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 GF({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=KF({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=dl(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 KF({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),a=dl(t);return P.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function MA(e){const t=YF(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,a=P.Children.toArray(r),i=a.find(QF);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 k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function YF(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=JF(n),o=ZF(r,n.props);return n.type!==P.Fragment&&(o.ref=t?kA(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 XF=Symbol("radix.slottable");function QF(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===XF}function ZF(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 JF(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 eB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],na=eB.reduce(((e,t)=>{const n=MA(`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),k.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function tB(e,t){e&&_i.flushSync((()=>e.dispatchEvent(t)))}function nB(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(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 O2,rB="DismissableLayer",hx="dismissableLayer.update",oB="dismissableLayer.pointerDownOutside",iB="dismissableLayer.focusOutside",LA=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jA=P.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...u}=e,s=P.useContext(LA),[c,d]=P.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=P.useState({}),h=yl(t,(e=>d(e))),m=Array.from(s.layers),[v]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),y=c?m.indexOf(c):-1,b=s.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,x=lB((e=>{const t=e.target,n=[...s.branches].some((e=>e.contains(t)));!w||n||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==l||l())}),f),_=uB((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 nB((e=>{y===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&&(O2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(c)),s.layers.add(c),A2(),()=>{n&&1===s.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=O2)}}),[c,f,n,s]),P.useEffect((()=>()=>{c&&(s.layers.delete(c),s.layersWithOutsidePointerEventsDisabled.delete(c),A2())}),[c,s]),P.useEffect((()=>{const e=()=>p({});return document.addEventListener(hx,e),()=>document.removeEventListener(hx,e)}),[]),k.jsx(na.div,{...u,ref:h,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Ya(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ya(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ya(e.onPointerDownCapture,x.onPointerDownCapture)})}));jA.displayName=rB;var aB="DismissableLayerBranch",sB=P.forwardRef(((e,t)=>{const n=P.useContext(LA),r=P.useRef(null),o=yl(t,r);return P.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),k.jsx(na.div,{...e,ref:o})}));function lB(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e),r=P.useRef(!1),o=P.useRef((()=>{}));return P.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){FA(oB,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 uB(e,t=(null==globalThis?void 0:globalThis.document)){const n=dl(e),r=P.useRef(!1);return P.useEffect((()=>{const e=e=>{e.target&&!r.current&&FA(iB,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 A2(){const e=new CustomEvent(hx);document.dispatchEvent(e)}function FA(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?tB(o,a):o.dispatchEvent(a)}sB.displayName=aB;var G1="focusScope.autoFocusOnMount",K1="focusScope.autoFocusOnUnmount",N2={bubbles:!1,cancelable:!0},cB="FocusScope",BA=P.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,u]=P.useState(null),s=dl(o),c=dl(a),d=P.useRef(null),f=yl(t,(e=>u(e))),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect((()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:Ga(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Ga(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ga(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,l,p.paused]),P.useEffect((()=>{if(l){I2.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new CustomEvent(G1,N2);l.addEventListener(G1,s),l.dispatchEvent(t),t.defaultPrevented||(fB(mB(qA(l)),{select:!0}),document.activeElement===e&&Ga(l))}return()=>{l.removeEventListener(G1,s),setTimeout((()=>{const t=new CustomEvent(K1,N2);l.addEventListener(K1,c),l.dispatchEvent(t),t.defaultPrevented||Ga(e??document.body,{select:!0}),l.removeEventListener(K1,c),I2.remove(p)}),0)}}}),[l,s,c,p]);const h=P.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=dB(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Ga(a,{select:!0})):(e.preventDefault(),n&&Ga(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return k.jsx(na.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})}));function fB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ga(r,{select:t}),document.activeElement!==n)return}function dB(e){const t=qA(e);return[D2(t,e),D2(t.reverse(),e)]}function qA(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 D2(e,t){for(const n of e)if(!pB(n,{upTo:t}))return n}function pB(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 hB(e){return e instanceof HTMLInputElement&&"select"in e}function Ga(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&hB(e)&&t&&e.select()}}BA.displayName=cB;var I2=vB();function vB(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=k2(e,t),e.unshift(t)},remove(t){var n;e=k2(e,t),null==(n=e[0])||n.resume()}}}function k2(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function mB(e){return e.filter((e=>"A"!==e.tagName))}var gB="Portal",zA=P.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[a,i]=P.useState(!1);Rv((()=>i(!0)),[]);const l=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?Lx.createPortal(k.jsx(na.div,{...o,ref:t}),l):null}));function yB(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}zA.displayName=gB;var vm=e=>{const{present:t,children:n}=e,r=bB(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),a=yl(r.ref,wB(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:a}):null};function bB(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),i=e?"mounted":"unmounted",[l,u]=yB(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=iv(r.current);a.current="mounted"===l?e:"none"}),[l]),Rv((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=iv(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]),Rv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=iv(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=iv(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 iv(e){return(null==e?void 0:e.animationName)||"none"}function wB(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)}vm.displayName="Presence";var Y1=0;function xB(){P.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??M2()),document.body.insertAdjacentElement("beforeend",e[1]??M2()),Y1++,()=>{1===Y1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Y1--}}),[])}function M2(){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 WA=NT(),X1=function(){},mm=P.forwardRef((function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:X1,onWheelCapture:X1,onTouchMoveCapture:X1}),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,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,g=void 0===v?"div":v,y=e.gapMode,b=zx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,x=AT([n,t]),_=cr(cr({},b),o);return P.createElement(P.Fragment,null,c&&P.createElement(w,{sideCar:WA,removeScrollBar:s,shards:d,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:y}),i?P.cloneElement(P.Children.only(l),cr(cr({},_),{ref:x})):P.createElement(g,cr({},_,{className:u,ref:x}),l))}));mm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},mm.classNames={fullWidth:bd,zeroRight:yd};var vx=!1;if(typeof window<"u")try{var av=Object.defineProperty({},"passive",{get:function(){return vx=!0,!0}});window.addEventListener("test",av,av),window.removeEventListener("test",av,av)}catch{vx=!1}var qu=!!vx&&{passive:!1},_B=function(e){return"TEXTAREA"===e.tagName},UA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!_B(e)&&"visible"===n[t])},$B=function(e){return UA(e,"overflowY")},SB=function(e){return UA(e,"overflowX")},L2=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),HA(e,r)){var o=VA(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},CB=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},EB=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},HA=function(e,t){return"v"===e?$B(t):SB(t)},VA=function(e,t){return"v"===e?CB(t):EB(t)},PB=function(e,t){return"h"===e&&"rtl"===t?-1:1},RB=function(e,t,n,r,o){var a=PB(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=VA(e,l),h=p[0],m=p[1]-p[2]-a*h;(h||m)&&HA(e,l)&&(d+=m,f+=h),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},sv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},j2=function(e){return[e.deltaX,e.deltaY]},F2=function(e){return e&&"current"in e?e.current:e},TB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OB=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},AB=0,zu=[];function NB(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),o=P.useState(AB++)[0],a=P.useState(Wx)[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=OT([e.lockRef.current],(e.shards||[]).map(F2),!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=sv(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=L2(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=L2(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 RB(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?j2(n):sv(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&TB(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(i.current.shards||[]).map(F2).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:DB(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=sv(e),r.current=void 0}),[]),d=P.useCallback((function(t){s(t.type,j2(t),t.target,l(t,e.lockRef.current))}),[]),f=P.useCallback((function(t){s(t.type,sv(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,qu),document.addEventListener("touchmove",u,qu),document.addEventListener("touchstart",c,qu),function(){zu=zu.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,qu),document.removeEventListener("touchmove",u,qu),document.removeEventListener("touchstart",c,qu)}}),[]);var p=e.removeScrollBar,h=e.inert;return P.createElement(P.Fragment,null,h?P.createElement(a,{styles:OB(o)}):null,p?P.createElement(MT,{gapMode:e.gapMode}):null)}function DB(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const IB=IT(WA,NB);var GA=P.forwardRef((function(e,t){return P.createElement(mm,cr({},e,{ref:t,sideCar:IB}))}));GA.classNames=mm.classNames;var R_="Dialog",[KA,MX]=WF(R_),[kB,Yo]=KA(R_),YA=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]=GF({prop:r,defaultProp:o,onChange:a});return k.jsx(kB,{scope:t,triggerRef:l,contentRef:u,contentId:V1(),titleId:V1(),descriptionId:V1(),open:s,onOpenChange:c,onOpenToggle:P.useCallback((()=>c((e=>!e))),[c]),modal:i,children:n})};YA.displayName=R_;var XA="DialogTrigger",QA=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(XA,n),a=yl(t,o.triggerRef);return k.jsx(na.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":A_(o.open),...r,ref:a,onClick:Ya(e.onClick,o.onOpenToggle)})}));QA.displayName=XA;var T_="DialogPortal",[MB,ZA]=KA(T_,{forceMount:void 0}),JA=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Yo(T_,t);return k.jsx(MB,{scope:t,forceMount:n,children:P.Children.map(r,(e=>k.jsx(vm,{present:n||a.open,children:k.jsx(zA,{asChild:!0,container:o,children:e})})))})};JA.displayName=T_;var Tv="DialogOverlay",eN=P.forwardRef(((e,t)=>{const n=ZA(Tv,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Yo(Tv,e.__scopeDialog);return a.modal?k.jsx(vm,{present:r||a.open,children:k.jsx(jB,{...o,ref:t})}):null}));eN.displayName=Tv;var LB=MA("DialogOverlay.RemoveScroll"),jB=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(Tv,n);return k.jsx(GA,{as:LB,allowPinchZoom:!0,shards:[o.contentRef],children:k.jsx(na.div,{"data-state":A_(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),pl="DialogContent",tN=P.forwardRef(((e,t)=>{const n=ZA(pl,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Yo(pl,e.__scopeDialog);return k.jsx(vm,{present:r||a.open,children:a.modal?k.jsx(FB,{...o,ref:t}):k.jsx(BB,{...o,ref:t})})}));tN.displayName=pl;var FB=P.forwardRef(((e,t)=>{const n=Yo(pl,e.__scopeDialog),r=P.useRef(null),o=yl(t,n.contentRef,r);return P.useEffect((()=>{const e=r.current;if(e)return Yv(e)}),[]),k.jsx(nN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ya(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:Ya(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ya(e.onFocusOutside,(e=>e.preventDefault()))})})),BB=P.forwardRef(((e,t)=>{const n=Yo(pl,e.__scopeDialog),r=P.useRef(!1),o=P.useRef(!1);return k.jsx(nN,{...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()}})})),nN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=Yo(pl,n),u=P.useRef(null),s=yl(t,u);return xB(),k.jsxs(k.Fragment,{children:[k.jsx(BA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:k.jsx(jA,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":A_(l.open),...i,ref:s,onDismiss:()=>l.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(qB,{titleId:l.titleId}),k.jsx(WB,{contentRef:u,descriptionId:l.descriptionId})]})]})})),O_="DialogTitle",rN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(O_,n);return k.jsx(na.h2,{id:o.titleId,...r,ref:t})}));rN.displayName=O_;var oN="DialogDescription",iN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(oN,n);return k.jsx(na.p,{id:o.descriptionId,...r,ref:t})}));iN.displayName=oN;var aN="DialogClose",sN=P.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Yo(aN,n);return k.jsx(na.button,{type:"button",...r,ref:t,onClick:Ya(e.onClick,(()=>o.onOpenChange(!1)))})}));function A_(e){return e?"open":"closed"}sN.displayName=aN;var lN="DialogTitleWarning",[LX,uN]=zF(lN,{contentName:pl,titleName:O_,docsSlug:"dialog"}),qB=({titleId:e})=>{const t=uN(lN),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},zB="DialogDescriptionWarning",WB=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uN(zB).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},UB=YA,HB=QA,VB=JA,GB=eN,KB=tN,YB=rN,XB=iN,QB=sN;function ZB(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 cN=ye.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}),lc=()=>{const e=ye.useContext(cN);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};ZB("[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 JB=24,eq=typeof window<"u"?tc:We;function B2(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function tq(){return N_(/^Mac/)}function nq(){return N_(/^iPhone/)}function q2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function rq(){return N_(/^iPad/)||tq()&&navigator.maxTouchPoints>1}function fN(){return nq()||rq()}function N_(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const Q1=typeof document<"u"&&window.visualViewport;function z2(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function dN(e){for(z2(e)&&(e=e.parentElement);e&&!z2(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const oq=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Z1,lv=0;function iq(e={}){let{isDisabled:t}=e;eq((()=>{if(!t)return lv++,1===lv&&fN()&&(Z1=aq()),()=>{lv--,0===lv&&(null==Z1||Z1())}}),[t])}function aq(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=B2(sq(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let a=B2(dd(document,"touchstart",(n=>{e=dN(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;mx(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;mx(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",Q1&&(Q1.height<window.innerHeight?requestAnimationFrame((()=>{W2(t)})):Q1.addEventListener("resize",(()=>W2(t)),{once:!0}))})))}),!0),dd(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),a(),window.scrollTo(n,r)}}function sq(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 W2(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=dN(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 mx(e){return e instanceof HTMLInputElement&&!oq.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function lq(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function uq(...e){return t=>e.forEach((e=>lq(e,t)))}function pN(...e){return P.useCallback(uq(...e),e)}const hN=new WeakMap;function Rn(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&&hN.set(e,r)}function cq(e,t){if(!(e&&e instanceof HTMLElement))return;let n=hN.get(e);n&&(e.style[t]=n[t])}const Tn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function uv(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(", ")[Tn(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Tn(t)?5:4]):null)}function fq(e){return 8*(Math.log(e+1)-2)}function J1(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function dq(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const nn={DURATION:.5,EASE:[.32,.72,0,1]},vN=.4,pq=.25,hq=100,mN=8,tl=16,gx=26,ew="vaul-dragging";function gN(e){const t=ye.useRef(e);return ye.useEffect((()=>{t.current=e})),ye.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function vq({defaultProp:e,onChange:t}){const n=ye.useState(e),[r]=n,o=ye.useRef(r),a=gN(t);return ye.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function yN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=vq({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=gN(n);return[i,ye.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function mq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:l="bottom",container:u,snapToSequentialPoint:s}){const[c,d]=yN({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=ye.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ye.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=ye.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),m=ye.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=ye.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)),Tn(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=ye.useMemo((()=>null!==m?null==g?void 0:g[m]:null),[g,m]),b=ye.useCallback((e=>{var t;const u=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(u),Rn(r.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(l)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&u!==g.length-1&&u!==a&&u<a?Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"0"}):Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,g,a,o,d]);return ye.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:h,activeSnapPoint:c,shouldFade:v,getPercentageDragged:function(e,t){if(!n||"number"!=typeof m||!g||void 0===a)return null;const r=m===a-1;if(m>=a&&t)return 0;if(r&&!t)return 1;if(!v&&!r)return null;const o=r?m+1:m-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:m,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===m,d=e>0;if(m===a-1&&Rn(o.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.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=Tn(l)?window.innerHeight:window.innerWidth;if(r>vN&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&h)return void b(g[n.length-1]);if(c&&e<0&&i&&t(),null===m)return;b(g[m+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===y)return;const t="bottom"===l||"right"===l?y-e:y+e;("bottom"===l||"right"===l)&&t<g[g.length-1]||("top"===l||"left"===l)&&t>g[g.length-1]||Rn(r.current,{transform:Tn(l)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const gq=()=>()=>{};function yq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=lc(),a=ye.useRef(null),i=Ur((()=>document.body.style.backgroundColor),[]);function l(){return(window.innerWidth-26)/window.innerWidth}ye.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;dq(r&&!o?J1(document.body,{background:"black"}):gq,J1(t,{transformOrigin:Tn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`}));const n=J1(t,{borderRadius:"8px",overflow:"hidden",...Tn(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*nn.DURATION)}}}),[t,n,i])}let pd=null;function bq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,l]=ye.useState((()=>typeof window<"u"?window.location.href:"")),u=ye.useRef(0),s=ye.useCallback((()=>{if(q2()&&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=ye.useCallback((()=>{if(q2()&&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 ye.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),ye.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 bN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:l=!0,closeThreshold:u=pq,scrollLockTimeout:s=hq,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:v=!0,onClose:g,nested:y,noBodyStyles:b,direction:w="bottom",defaultOpen:x=!1,disablePreventScroll:_=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:P=!1,repositionInputs:S=!0,onAnimationEnd:C,container:E,autoFocus:N=!1}){var O,T;const[R=!1,j]=yN({defaultProp:x,prop:e,onChange:e=>{null==t||t(e),!e&&!y&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*nn.DURATION),e&&!v&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[D,z]=ye.useState(!1),[A,M]=ye.useState(!1),[L,I]=ye.useState(!1),F=ye.useRef(null),W=ye.useRef(null),B=ye.useRef(null),$=ye.useRef(null),U=ye.useRef(null),H=ye.useRef(!1),V=ye.useRef(null),K=ye.useRef(0),q=ye.useRef(!1),Y=ye.useRef(0),G=ye.useRef(null),X=ye.useRef((null==(O=G.current)?void 0:O.getBoundingClientRect().height)||0),Q=ye.useRef((null==(T=G.current)?void 0:T.getBoundingClientRect().width)||0),Z=ye.useRef(0),J=ye.useCallback((e=>{a&&e===oe.length-1&&(W.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ae,shouldFade:ie,getPercentageDragged:le}=mq({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:G,fadeFromIndex:f,overlayRef:F,onSnapPointChange:J,direction:w,container:E,snapToSequentialPoint:k});iq({isDisabled:!R||A||!v||L||!D||!S||!_});const{restorePositionSetting:ue}=bq({isOpen:R,modal:v,nested:y,hasBeenOpened:D,preventScrollRestoration:P,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=G.current?uv(G.current,w):null,l=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(W.current&&l.getTime()-W.current.getTime()<500)return!1;if(null!==i&&("bottom"===w?i>0:i<0))return!0;if(a&&a.length>0)return!1;if(l.getTime()-(null==(r=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 de(e){!A||!G.current||(G.current.classList.remove(ew),H.current=!1,M(!1),$.current=new Date),null==g||g(),e||j(!1),setTimeout((()=>{a&&ne(a[0])}),1e3*nn.DURATION)}function fe(){if(!G.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=uv(G.current,w);Rn(G.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`}),Rn(F.current,{transition:`opacity ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&R&&Rn(e,{borderRadius:"8px",overflow:"hidden",...Tn(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:`${nn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${nn.EASE.join(",")})`},!0)}return ye.useEffect((()=>{var e;function t(){if(!G.current||!S)return;if(mx(document.activeElement)||q.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=G.current.getBoundingClientRect().height||0,i=o>.8*n;Z.current||(Z.current=o);const l=G.current.getBoundingClientRect().top;if(Math.abs(Y.current-r)>60&&(q.current=!q.current),a&&a.length>0&&oe&&te){r+=oe[te]||0}if(Y.current=r,o>t||q.current){const e=G.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?l:26)),G.current.style.height=m?e-Math.max(r,0)+"px":`${Math.max(n,t-l)}px`}else G.current.style.height=`${Z.current}px`;a&&a.length>0&&!q.current?G.current.style.bottom="0px":G.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,a,oe]),ye.useEffect((()=>(R&&(Rn(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{cq(document.documentElement,"scrollBehavior")})),[R]),ye.createElement(UB,{defaultOpen:x,onOpenChange:e=>{!c&&!e||(e?z(!0):de(!0),j(e))},open:R},ye.createElement(cN.Provider,{value:{activeSnapPoint:ee,snapPoints:a,setActiveSnapPoint:ne,drawerRef:G,overlayRef:F,onOpenChange:t,onPress:function(e){var t,n;!c&&!a||G.current&&!G.current.contains(e.target)||(X.current=(null==(t=G.current)?void 0:t.getBoundingClientRect().height)||0,Q.current=(null==(n=G.current)?void 0:n.getBoundingClientRect().width)||0,M(!0),B.current=new Date,fN()&&window.addEventListener("touchend",(()=>H.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),K.current=Tn(w)?e.pageY:e.pageX)},onRelease:function(e){if(!A||!G.current)return;G.current.classList.remove(ew),H.current=!1,M(!1),$.current=new Date;const t=uv(G.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===B.current)return;const n=$.current.getTime()-B.current.getTime(),r=K.current-(Tn(w)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(I(!0),setTimeout((()=>{I(!1)}),200)),a)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:i,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(i>vN)return de(),void(null==o||o(e,!1));var l;const s=Math.min(null!=(l=G.current.getBoundingClientRect().height)?l:0,window.innerHeight);var d;const f=Math.min(null!=(d=G.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:s)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(G.current&&A){const t="bottom"===w||"right"===w?1:-1,n=(K.current-(Tn(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?X.current:Q.current);const p=le(u,o);if(null!==p&&(d=p),l&&d>=1||!H.current&&!ce(e.target,o))return;if(G.current.classList.add(ew),H.current=!0,Rn(G.current,{transition:"none"}),Rn(F.current,{transition:"none"}),a&&ae({draggedDistance:n}),o&&!a){const e=fq(n),r=Math.min(-1*e,0)*t;return void Rn(G.current,{transform:Tn(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-d;if((ie||f&&te===f-1)&&(null==r||r(e,d),Rn(F.current,{opacity:`${h}`,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);Rn(s,{borderRadius:`${t}px`,transform:Tn(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!a){const e=u*t;Rn(G.current,{transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:R,isDragging:A,shouldFade:ie,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Rn(G.current,{transform:Tn(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),Rn(G.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&G.current&&(V.current=setTimeout((()=>{const e=uv(G.current,w);Rn(G.current,{transition:"none",transform:Tn(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Tn(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Rn(G.current,{transition:`transform ${nn.DURATION}s cubic-bezier(${nn.EASE.join(",")})`,transform:Tn(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:q,modal:v,snapPointsOffset:oe,direction:w,shouldScaleBackground:i,setBackgroundColorOnScale:l,noBodyStyles:b,container:E,autoFocus:N}},n))}const wN=ye.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:l}=lc(),u=pN(t,n),s=r&&r.length>0;return l?ye.createElement(GB,{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)}));wN.displayName="Drawer.Overlay";const xN=ye.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:h,container:m,handleOnly:v,autoFocus:g}=lc(),[y,b]=ye.useState(!1),w=pN(o,a),x=ye.useRef(null),_=ye.useRef(null),k=ye.useRef(!1),P=h&&h.length>0;yq();function S(e){x.current=null,k.current=!1,l(e)}return ye.useEffect((()=>{P&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),ye.createElement(KB,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":f&&P?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{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(k.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 k.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,k.current=!1,l(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),S(_.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),S(_.current)}})}));xN.displayName="Drawer.Content";const wq=250,xq=120,_N=ye.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}=lc(),h=ye.useRef(null),m=ye.useRef(!1);function v(){window.clearTimeout(h.current),m.current=!1}return ye.createElement("div",{onClick:function(){m.current?v():window.setTimeout((()=>{!function(){if(a||e||m.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)}()}),xq)},onPointerCancel:v,onPointerDown:e=>{c&&f(e),h.current=window.setTimeout((()=>{m.current=!0}),wq)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ye.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function _q({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:a}=lc();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return ye.createElement(bN,{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 $q(e){const t=lc(),{container:n=t.container,...r}=e;return ye.createElement(VB,{container:n,...r})}_N.displayName="Drawer.Handle";const Xo={Root:bN,NestedRoot:_q,Content:xN,Overlay:wN,Trigger:HB,Portal:$q,Handle:_N,Close:QB,Title:YB,Description:XB},Sq=({shouldScaleBackground:e=!0,direction:t="bottom",...n})=>k.jsx(Xo.Root,{direction:t,shouldScaleBackground:e,...n});Sq.displayName="Drawer";const jX=Xo.Trigger,Cq=Xo.Portal,FX=Xo.Close,$N=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Overlay,{ref:n,className:se("fixed inset-0 z-50 bg-black/5",e),...t})));$N.displayName=Xo.Overlay.displayName;const Eq=P.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>k.jsxs(Cq,{children:[k.jsx($N,{}),k.jsxs(Xo.Content,{ref:o,className:se("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&&k.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));Eq.displayName="DrawerContent";const Pq=({className:e,...t})=>k.jsx("div",{className:se("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Pq.displayName="DrawerHeader";const Rq=({className:e,...t})=>k.jsx("div",{className:se("mt-auto flex flex-col gap-2 p-4",e),...t});Rq.displayName="DrawerFooter";const Tq=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Title,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t})));Tq.displayName=Xo.Title.displayName;const Oq=P.forwardRef((({className:e,...t},n)=>k.jsx(Xo.Description,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));function D_(e){const t=e+"CollectionProvider",[n,r]=Sr(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=ye.useRef(null),a=ye.useRef(new Map).current;return ye.createElement(o,{scope:t,itemMap:a,collectionRef:r},n)},Slot:ye.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Rt(t,a(i,n).collectionRef);return ye.createElement(ll,{ref:o},r)})),ItemSlot:ye.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,i=ye.useRef(null),s=Rt(t,i),c=a(l,n);return ye.useEffect((()=>(c.itemMap.set(i,{ref:i,...o}),()=>{c.itemMap.delete(i)}))),ye.createElement(ll,{[u]:"",ref:s},r)}))},function(t){const n=a(e+"CollectionConsumer",t);return ye.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]}Oq.displayName=Xo.Description.displayName;const Aq=Qa(void 0);function Gd(e){const t=ec(Aq);return e||t||"ltr"}const Nq=["top","right","bottom","left"],Ja=Math.min,ao=Math.max,Ov=Math.round,cv=Math.floor,es=e=>({x:e,y:e}),Dq={left:"right",right:"left",bottom:"top",top:"bottom"},Iq={start:"end",end:"start"};function yx(e,t,n){return ao(e,Ja(t,n))}function Qi(e,t){return"function"==typeof e?e(t):e}function Zi(e){return e.split("-")[0]}function uc(e){return e.split("-")[1]}function I_(e){return"x"===e?"y":"x"}function k_(e){return"y"===e?"height":"width"}function ts(e){return["top","bottom"].includes(Zi(e))?"y":"x"}function M_(e){return I_(ts(e))}function kq(e,t,n){void 0===n&&(n=!1);const r=uc(e),o=M_(e),a=k_(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Av(i)),[i,Av(i)]}function Mq(e){const t=Av(e);return[bx(e),t,bx(t)]}function bx(e){return e.replace(/start|end/g,(e=>Iq[e]))}function Lq(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 jq(e,t,n,r){const o=uc(e);let a=Lq(Zi(e),"start"===n,r);return o&&(a=a.map((e=>e+"-"+o)),t&&(a=a.concat(a.map(bx)))),a}function Av(e){return e.replace(/left|right|bottom|top/g,(e=>Dq[e]))}function Fq(e){return{top:0,right:0,bottom:0,left:0,...e}}function SN(e){return"number"!=typeof e?Fq(e):{top:e,right:e,bottom:e,left:e}}function Nv(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 U2(e,t,n){let{reference:r,floating:o}=e;const a=ts(t),i=M_(t),l=k_(i),u=Zi(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(uc(t)){case"start":p[i]-=f*(n&&s?-1:1);break;case"end":p[i]+=f*(n&&s?-1:1)}return p}const Bq=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}=U2(s,r,u),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:a,fn:m}=l[n],{x:v,y:g,data:y,reset:b}=await m({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&&h<=50&&(h++,"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}=U2(s,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Ad(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}=Qi(t,e),h=SN(p),m=l[f?"floating"===d?"reference":"floating":d],v=Nv(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary: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=Nv(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-w.top+h.top)/b.y,bottom:(w.bottom-v.bottom+h.bottom)/b.y,left:(v.left-w.left+h.left)/b.x,right:(w.right-v.right+h.right)/b.x}}const qq=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}=Qi(e,t)||{};if(null==s)return{};const d=SN(c),f={x:n,y:r},p=M_(o),h=k_(p),m=await i.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],x=f[p]-a.reference[p],_=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s));let k=_?_[b]:0;(!k||!await(null==i.isElement?void 0:i.isElement(_)))&&(k=l.floating[b]||a.floating[h]);const P=w/2-x/2,S=k/2-m[h]/2-1,C=Ja(d[g],S),E=Ja(d[y],S),N=C,O=k-m[h]-E,T=k/2-m[h]/2+P,R=yx(N,T,O),j=!u.arrow&&null!=uc(o)&&T!==R&&a.reference[h]/2-(T<N?C:E)-m[h]/2<0,D=j?T<N?T-N:T-O:0;return{[p]:f[p]+D,data:{[p]:R,centerOffset:T-R-D,...j&&{alignmentOffset:D}},reset:j}}}),zq=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:h="none",flipAlignment:m=!0,...v}=Qi(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=Zi(o),y=ts(l),b=Zi(l)===l,w=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=f||(b||!m?[Av(l)]:Mq(l)),_="none"!==h;!f&&_&&x.push(...jq(l,m,h,w));const k=[l,...x],P=await Ad(t,v),S=[];let C=(null==(r=a.flip)?void 0:r.overflows)||[];if(c&&S.push(P[g]),d){const e=kq(o,i,w);S.push(P[e[0]],P[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every((e=>e<=0))){var E,N;const e=((null==(E=a.flip)?void 0:E.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(N=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=C.filter((e=>{if(_){const t=ts(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:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function H2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function V2(e){return Nq.some((t=>e[t]>=0))}const Wq=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Qi(e,t);switch(r){case"referenceHidden":{const e=H2(await Ad(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:V2(e)}}}case"escaped":{const e=H2(await Ad(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:V2(e)}}}default:return{}}}}};async function Uq(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Zi(n),l=uc(n),u="y"===ts(n),s=["left","top"].includes(i)?-1:1,c=a&&u?-1:1,d=Qi(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}const Hq=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 Uq(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}}}}},Vq=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}=Qi(e,t),s={x:n,y:r},c=await Ad(t,u),d=ts(Zi(o)),f=I_(d);let p=s[f],h=s[d];if(a){const e="y"===f?"bottom":"right";p=yx(p+c["y"===f?"top":"left"],p,p-c[e])}if(i){const e="y"===d?"bottom":"right";h=yx(h+c["y"===d?"top":"left"],h,h-c[e])}const m=l.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:a,[d]:i}}}}}},Gq=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}=Qi(e,t),c={x:n,y:r},d=ts(o),f=I_(d);let p=c[f],h=c[d];const m=Qi(l,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};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(Zi(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);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Kq=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}=Qi(e,t),c=await Ad(t,s),d=Zi(o),f=uc(o),p="y"===ts(o),{width:h,height:m}=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=m-c.top-c.bottom,b=h-c.left-c.right,w=Ja(m-c[v],y),x=Ja(h-c[g],b),_=!t.middlewareData.shift;let k=w,P=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(P=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=y),_&&!f){const e=ao(c.left,0),t=ao(c.right,0),n=ao(c.top,0),r=ao(c.bottom,0);p?P=h-2*(0!==e||0!==t?e+t:ao(c.left,c.right)):k=m-2*(0!==n||0!==r?n+r:ao(c.top,c.bottom))}await u({...t,availableWidth:P,availableHeight:k});const S=await i.getDimensions(l.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}};function gm(){return typeof window<"u"}function ns(e){return CN(e)?(e.nodeName||"").toLowerCase():"#document"}function uo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ra(e){var t;return null==(t=(CN(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function CN(e){return!!gm()&&(e instanceof Node||e instanceof uo(e).Node)}function bi(e){return!!gm()&&(e instanceof Element||e instanceof uo(e).Element)}function wi(e){return!!gm()&&(e instanceof HTMLElement||e instanceof uo(e).HTMLElement)}function G2(e){return!(!gm()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof uo(e).ShadowRoot)}function Kd(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=To(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Yq(e){return["table","td","th"].includes(ns(e))}function Xq(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function L_(e){const t=j_(),n=bi(e)?To(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 EN(e){let t=Qu(e);for(;wi(t)&&!ym(t);){if(L_(t))return t;if(Xq(t))return null;t=Qu(t)}return null}function j_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ym(e){return["html","body","#document"].includes(ns(e))}function To(e){return uo(e).getComputedStyle(e)}function bm(e){return bi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qu(e){if("html"===ns(e))return e;const t=e.assignedSlot||e.parentNode||G2(e)&&e.host||ra(e);return G2(t)?t.host:t}function PN(e){const t=Qu(e);return ym(t)?e.ownerDocument?e.ownerDocument.body:e.body:wi(t)&&Kd(t)?t:PN(t)}function Nd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=PN(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=uo(o);if(a){const e=Qq(i);return t.concat(i,i.visualViewport||[],Kd(o)?o:[],e&&n?Nd(e):[])}return t.concat(o,Nd(o,[],n))}function Qq(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RN(e){const t=To(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wi(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Ov(n)!==a||Ov(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function F_(e){return bi(e)?e:e.contextElement}function Hu(e){const t=F_(e);if(!wi(t))return es(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=RN(t);let i=(a?Ov(n.width):n.width)/r,l=(a?Ov(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Zq=es(0);function TN(e){const t=uo(e);return j_()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Zq}function Jq(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==uo(e))&&t}function hl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=F_(e);let i=es(1);t&&(r?bi(r)&&(i=Hu(r)):i=Hu(e));const l=Jq(a,n,r)?TN(a):es(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=uo(a),t=r&&bi(r)?uo(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Hu(n),t=n.getBoundingClientRect(),r=To(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=uo(n).frameElement}}return Nv({width:c,height:d,x:u,y:s})}const ez=[":popover-open",":modal"];function ON(e){let t=!1,n=0,r=0;if(ez.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=EN(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function tz(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=ra(r),[i]=t?ON(t.floating):[!1];if(r===a||i)return n;let l={scrollLeft:0,scrollTop:0},u=es(1);const s=es(0),c=wi(r);if((c||!c&&"fixed"!==o)&&(("body"!==ns(r)||Kd(a))&&(l=bm(r)),wi(r))){const e=hl(r);u=Hu(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 nz(e){return Array.from(e.getClientRects())}function AN(e){return hl(ra(e)).left+bm(e).scrollLeft}function rz(e){const t=ra(e),n=bm(e),r=e.ownerDocument.body,o=ao(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ao(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+AN(e);const l=-n.scrollTop;return"rtl"===To(r).direction&&(i+=ao(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}function oz(e,t){const n=uo(e),r=ra(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=j_();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}function iz(e,t){const n=hl(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wi(e)?Hu(e):es(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function K2(e,t,n){let r;if("viewport"===t)r=oz(e,n);else if("document"===t)r=rz(ra(e));else if(bi(t))r=iz(t,n);else{const n=TN(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Nv(r)}function NN(e,t){const n=Qu(e);return!(n===t||!bi(n)||ym(n))&&("fixed"===To(n).position||NN(n,t))}function az(e,t){const n=t.get(e);if(n)return n;let r=Nd(e,[],!1).filter((e=>bi(e)&&"body"!==ns(e))),o=null;const a="fixed"===To(e).position;let i=a?Qu(e):e;for(;bi(i)&&!ym(i);){const t=To(i),n=L_(i);!n&&"fixed"===t.position&&(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Kd(i)&&!n&&NN(e,i))?r=r.filter((e=>e!==i)):o=t,i=Qu(i)}return t.set(e,r),r}function sz(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?az(t,this._c):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=K2(t,n,o);return e.top=ao(r.top,e.top),e.right=Ja(r.right,e.right),e.bottom=Ja(r.bottom,e.bottom),e.left=ao(r.left,e.left),e}),K2(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lz(e){const{width:t,height:n}=RN(e);return{width:t,height:n}}function uz(e,t,n,r){const o=wi(t),a=ra(t),i="fixed"===n,l=hl(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const s=es(0);if(o||!o&&!i)if(("body"!==ns(t)||Kd(a))&&(u=bm(t)),o){const e=hl(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=AN(a));let c=l.left+u.scrollLeft-s.x,d=l.top+u.scrollTop-s.y;const[f,p,h]=ON(r);return f&&(c+=p,d+=h,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:l.width,height:l.height}}function Y2(e,t){return wi(e)&&"fixed"!==To(e).position?t?t(e):e.offsetParent:null}function DN(e,t){const n=uo(e);if(!wi(e))return n;let r=Y2(e,t);for(;r&&Yq(r)&&"static"===To(r).position;)r=Y2(r,t);return r&&("html"===ns(r)||"body"===ns(r)&&"static"===To(r).position&&!L_(r))?n:r||EN(e)||n}const cz=async function(e){const t=this.getOffsetParent||DN,n=this.getDimensions;return{reference:uz(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function fz(e){return"rtl"===To(e).direction}const dz={convertOffsetParentRelativeRectToViewportRelativeRect:tz,getDocumentElement:ra,getClippingRect:sz,getOffsetParent:DN,getElementRects:cz,getClientRects:nz,getDimensions:lz,getScale:Hu,isElement:bi,isRTL:fz};function pz(e,t){let n,r=null;const o=ra(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:-cv(c)+"px "+-cv(o.clientWidth-(s+d))+"px "+-cv(o.clientHeight-(c+f))+"px "+-cv(s)+"px",threshold:ao(0,Ja(1,u))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==u){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),a}function hz(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=F_(e),c=o||a?[...s?Nd(s):[],...Nd(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=s&&l?pz(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 h,m=u?hl(e):null;return u&&function t(){const r=hl(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const vz=Vq,mz=zq,gz=Kq,yz=Wq,X2=qq,bz=Gq,wz=(e,t,n)=>{const r=new Map,o={platform:dz,...n},a={...o.platform,_c:r};return Bq(e,t,{...o,platform:a})};var yv=typeof document<"u"?tc:We;function Dv(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(!Dv(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||Dv(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function IN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Q2(e,t){const n=IN(e);return Math.round(t*n)/n}function tw(e){const t=P.useRef(e);return yv((()=>{t.current=e})),t}function xz(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,p]=P.useState(r);Dv(f,r)||p(r);const[h,m]=P.useState(null),[v,g]=P.useState(null),y=P.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),b=P.useCallback((e=>{e!==k.current&&(k.current=e,g(e))}),[]),w=a||h,x=i||v,_=P.useRef(null),k=P.useRef(null),S=P.useRef(c),C=null!=u,E=tw(u),N=tw(o),O=tw(s),T=P.useCallback((()=>{if(!_.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};N.current&&(e.platform=N.current),wz(_.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};R.current&&!Dv(S.current,t)&&(S.current=t,_i.flushSync((()=>{d(t)})))}))}),[f,t,n,N,O]);yv((()=>{!1===s&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[s]);const R=P.useRef(!1);yv((()=>(R.current=!0,()=>{R.current=!1})),[]),yv((()=>{if(w&&(_.current=w),x&&(k.current=x),w&&x){if(E.current)return E.current(w,x,T);T()}}),[w,x,T,E,C]);const j=P.useMemo((()=>({reference:_,floating:k,setReference:y,setFloating:b})),[y,b]),D=P.useMemo((()=>({reference:w,floating:x})),[w,x]),z=P.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=Q2(D.floating,c.x),r=Q2(D.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...IN(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:T,refs:j,elements:D,floatingStyles:z})),[c,T,j,D,z])}const _z=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?X2({element:n.current,padding:r}).fn(t):{}:n?X2({element:n,padding:r}).fn(t):{}}}),$z=(e,t)=>({...Hq(e),options:[e,t]}),Sz=(e,t)=>({...vz(e),options:[e,t]}),Cz=(e,t)=>({...bz(e),options:[e,t]}),Ez=(e,t)=>({...mz(e),options:[e,t]}),Pz=(e,t)=>({...gz(e),options:[e,t]}),Rz=(e,t)=>({...yz(e),options:[e,t]}),Tz=(e,t)=>({..._z(e),options:[e,t]}),kN="Popper",[MN,cc]=Sr(kN),[Oz,LN]=MN(kN),Az=e=>{const{__scopePopper:t,children:n}=e,[r,o]=tt(null);return z(Oz,{scope:t,anchor:r,onAnchorChange:o},n)},Nz="PopperAnchor",Dz=_e(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=LN(Nz,n),i=ke(null),l=Rt(t,i);return We((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:z(it.div,fe({},o,{ref:l}))})),jN="PopperContent",[Iz,BX]=MN(jN),kz=_e(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:g=[],collisionPadding:y=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...k}=e,P=LN(jN,c),[S,C]=tt(null),E=Rt(t,(e=>C(e))),[N,O]=tt(null),T=pm(N),R=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,j=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,D=d+("center"!==p?"-"+p:""),A="number"==typeof y?y:{top:0,right:0,bottom:0,left:0,...y},M=Array.isArray(g)?g:[g],L=M.length>0,I={padding:A,boundary:M.filter(Mz),altBoundary:L},{refs:F,floatingStyles:W,placement:B,isPositioned:$,middlewareData:U}=xz({strategy:"fixed",placement:D,whileElementsMounted:(...e)=>hz(...e,{animationFrame:"always"===x}),elements:{reference:P.anchor},middleware:[$z({mainAxis:f+j,alignmentAxis:h}),v&&Sz({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?Cz():void 0,...I}),v&&Ez({...I}),Pz({...I,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`)}}),N&&Tz({element:N,padding:m}),Lz({arrowWidth:R,arrowHeight:j}),w&&Rz({strategy:"referenceHidden",...I})]}),[H,V]=FN(B),K=Hr(_);fr((()=>{$&&(null==K||K())}),[$,K]);const q=null===(o=U.arrow)||void 0===o?void 0:o.x,Y=null===(a=U.arrow)||void 0===a?void 0:a.y,G=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[X,Q]=tt();return fr((()=>{S&&Q(window.getComputedStyle(S).zIndex)}),[S]),z("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:$?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--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},z(Iz,{scope:c,placedSide:H,onArrowChange:O,arrowX:q,arrowY:Y,shouldHideArrow:G},z(it.div,fe({"data-side":H,"data-align":V},k,{ref:E,style:{...k.style,animation:$?void 0:"none",opacity:null!==(s=U.hide)&&void 0!==s&&s.referenceHidden?0:void 0}}))))}));function Mz(e){return null!==e}const Lz=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,h]=FN(l),m={start:"0%",center:"50%",end:"100%"}[h],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?m:`${v}px`,b=-f+"px"):"top"===p?(y=c?m:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function FN(e){const[t,n="center"]=e.split("-");return[t,n]}const wm=Az,B_=Dz,q_=kz,nw="rovingFocusGroup.onEntryFocus",jz={bubbles:!1,cancelable:!0},z_="RovingFocusGroup",[wx,BN,Fz]=D_(z_),[Bz,fc]=Sr(z_,[Fz]),[qz,zz]=Bz(z_),Wz=_e(((e,t)=>z(wx.Provider,{scope:e.__scopeRovingFocusGroup},z(wx.Slot,{scope:e.__scopeRovingFocusGroup},z(Uz,fe({},e,{ref:t})))))),Uz=_e(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:s,...c}=e,d=ke(null),f=Rt(t,d),p=Gd(a),[h=null,m]=Vo({prop:i,defaultProp:l,onChange:u}),[v,g]=tt(!1),y=Hr(s),b=BN(n),w=ke(!1),[x,_]=tt(0);return We((()=>{const e=d.current;if(e)return e.addEventListener(nw,y),()=>e.removeEventListener(nw,y)}),[y]),z(qz,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:h,onItemFocus:lt((e=>m(e)),[m]),onItemShiftTab:lt((()=>g(!0)),[]),onFocusableItemAdd:lt((()=>_((e=>e+1))),[]),onFocusableItemRemove:lt((()=>_((e=>e-1))),[])},z(it.div,fe({tabIndex:v||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:ze(e.onMouseDown,(()=>{w.current=!0})),onFocus:ze(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(nw,jz);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=b().filter((e=>e.focusable));qN([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:ze(e.onBlur,(()=>g(!1)))})))})),Hz="RovingFocusGroupItem",Vz=_e(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,l=lo(),u=a||l,s=zz(Hz,n),c=s.currentTabStopId===u,d=BN(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=s;return We((()=>{if(r)return f(),()=>p()}),[r,f,p]),z(wx.ItemSlot,{scope:n,id:u,focusable:r,active:o},z(it.span,fe({tabIndex:c?0:-1,"data-orientation":s.orientation},i,{ref:t,onMouseDown:ze(e.onMouseDown,(e=>{r?s.onItemFocus(u):e.preventDefault()})),onFocus:ze(e.onFocus,(()=>s.onItemFocus(u))),onKeyDown:ze(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void s.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=Yz(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?Xz(n,r+1):n.slice(r+1)}setTimeout((()=>qN(n)))}}))})))})),Gz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kz(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function Yz(e,t,n){const r=Kz(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return Gz[r]}function qN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xz(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const W_=Wz,U_=Vz,xx=["Enter"," "],Qz=["ArrowDown","PageUp","Home"],zN=["ArrowUp","PageDown","End"],Zz=[...Qz,...zN],Jz={ltr:[...xx,"ArrowRight"],rtl:[...xx,"ArrowLeft"]},eW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xm="Menu",[Dd,tW,nW]=D_(xm),[bl,WN]=Sr(xm,[nW,cc,fc]),_m=cc(),UN=fc(),[HN,is]=bl(xm),[rW,Yd]=bl(xm),oW=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=_m(t),[u,s]=tt(null),c=ke(!1),d=Hr(a),f=Gd(o);return We((()=>{const e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),z(wm,l,z(HN,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:s},z(rW,{scope:t,onClose:lt((()=>d(!1)),[d]),isUsingKeyboardRef:c,dir:f,modal:i},r)))},VN=_e(((e,t)=>{const{__scopeMenu:n,...r}=e,o=_m(n);return z(B_,fe({},o,r,{ref:t}))})),GN="MenuPortal",[iW,KN]=bl(GN,{forceMount:void 0}),aW=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=is(GN,t);return z(iW,{scope:t,forceMount:n},z(Ao,{present:n||a.open},z(Bx,{asChild:!0,container:o},r)))},Ho="MenuContent",[sW,H_]=bl(Ho),lW=_e(((e,t)=>{const n=KN(Ho,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=is(Ho,e.__scopeMenu),i=Yd(Ho,e.__scopeMenu);return z(Dd.Provider,{scope:e.__scopeMenu},z(Ao,{present:r||a.open},z(Dd.Slot,{scope:e.__scopeMenu},i.modal?z(uW,fe({},o,{ref:t})):z(cW,fe({},o,{ref:t})))))})),uW=_e(((e,t)=>{const n=is(Ho,e.__scopeMenu),r=ke(null),o=Rt(t,r);return We((()=>{const e=r.current;if(e)return Yv(e)}),[]),z(V_,fe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ze(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),cW=_e(((e,t)=>{const n=is(Ho,e.__scopeMenu);return z(V_,fe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),V_=_e(((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:p,disableOutsideScroll:h,...m}=e,v=is(Ho,n),g=Yd(Ho,n),y=_m(n),b=UN(n),w=tW(n),[x,_]=tt(null),k=ke(null),P=Rt(t,k,v.onContentChange),S=ke(0),C=ke(""),E=ke(0),N=ke(null),O=ke("right"),T=ke(0),R=h?Kv:vl,j=h?{as:ll,allowPinchZoom:!0}:void 0;We((()=>()=>window.clearTimeout(S.current)),[]),qx();const D=lt((e=>{var t,n;return O.current===(null===(t=N.current)||void 0===t?void 0:t.side)&&AW(e,null===(n=N.current)||void 0===n?void 0:n.area)}),[]);return z(sW,{scope:n,searchRef:C,onItemEnter:lt((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:lt((e=>{var t;D(e)||(null===(t=k.current)||void 0===t||t.focus(),_(null))}),[D]),onTriggerLeave:lt((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:E,onPointerGraceIntentChange:lt((e=>{N.current=e}),[])},z(R,j,z(Fx,{asChild:!0,trapped:o,onMountAutoFocus:ze(a,(e=>{var t;e.preventDefault(),null===(t=k.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},z(Vv,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},z(W_,fe({asChild:!0},b,{dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:_,onEntryFocus:ze(u,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),z(q_,fe({role:"menu","aria-orientation":"vertical","data-state":t3(v.open),"data-radix-menu-content":"",dir:g.dir},y,m,{ref:P,style:{outline:"none",...m.style},onKeyDown:ze(m.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=C.current+e,o=w().filter((e=>!e.disabled)),a=document.activeElement,i=null===(t=o.find((e=>e.ref.current===a)))||void 0===t?void 0:t.textValue,l=TW(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){C.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=k.current;if(e.target!==o||!Zz.includes(e.key))return;e.preventDefault();const a=w().filter((e=>!e.disabled)).map((e=>e.ref.current));zN.includes(e.key)&&a.reverse(),PW(a)})),onBlur:ze(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),C.current="")})),onPointerMove:ze(e.onPointerMove,Id((e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";O.current=t,T.current=e.clientX}})))})))))))})),YN=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({role:"group"},r,{ref:t}))})),fW=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({},r,{ref:t}))})),_x="MenuItem",Z2="menu.itemSelect",G_=_e(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=ke(null),i=Yd(_x,e.__scopeMenu),l=H_(_x,e.__scopeMenu),u=Rt(t,a),s=ke(!1);return z(XN,fe({},o,{ref:u,disabled:n,onClick:ze(e.onClick,(()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(Z2,{bubbles:!0,cancelable:!0});e.addEventListener(Z2,(e=>null==r?void 0:r(e)),{once:!0}),PT(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:ze(e.onPointerUp,(e=>{var t;s.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:ze(e.onKeyDown,(e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||xx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),XN=_e(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=H_(_x,n),l=UN(n),u=ke(null),s=Rt(t,u),[c,d]=tt(!1),[f,p]=tt("");return We((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),z(Dd.ItemSlot,{scope:n,disabled:r,textValue:o??f},z(U_,fe({asChild:!0},l,{focusable:!r}),z(it.div,fe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:s,onPointerMove:ze(e.onPointerMove,Id((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:ze(e.onPointerLeave,Id((e=>i.onItemLeave(e)))),onFocus:ze(e.onFocus,(()=>d(!0))),onBlur:ze(e.onBlur,(()=>d(!1)))}))))})),dW=_e(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return z(ZN,{scope:e.__scopeMenu,checked:n},z(G_,fe({role:"menuitemcheckbox","aria-checked":Iv(n)?"mixed":n},o,{ref:t,"data-state":K_(n),onSelect:ze(o.onSelect,(()=>null==r?void 0:r(!!Iv(n)||!n)),{checkForDefaultPrevented:!1})})))})),pW="MenuRadioGroup",[hW,vW]=bl(pW,{value:void 0,onValueChange:()=>{}}),mW=_e(((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Hr(r);return z(hW,{scope:e.__scopeMenu,value:n,onValueChange:a},z(YN,fe({},o,{ref:t})))})),gW="MenuRadioItem",yW=_e(((e,t)=>{const{value:n,...r}=e,o=vW(gW,e.__scopeMenu),a=n===o.value;return z(ZN,{scope:e.__scopeMenu,checked:a},z(G_,fe({role:"menuitemradio","aria-checked":a},r,{ref:t,"data-state":K_(a),onSelect:ze(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),QN="MenuItemIndicator",[ZN,bW]=bl(QN,{checked:!1}),wW=_e(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=bW(QN,n);return z(Ao,{present:r||Iv(a.checked)||!0===a.checked},z(it.span,fe({},o,{ref:t,"data-state":K_(a.checked)})))})),xW=_e(((e,t)=>{const{__scopeMenu:n,...r}=e;return z(it.div,fe({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),JN="MenuSub",[_W,e3]=bl(JN),$W=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=is(JN,t),i=_m(t),[l,u]=tt(null),[s,c]=tt(null),d=Hr(o);return We((()=>(!1===a.open&&d(!1),()=>d(!1))),[a.open,d]),z(wm,i,z(HN,{scope:t,open:r,onOpenChange:d,content:s,onContentChange:c},z(_W,{scope:t,contentId:lo(),triggerId:lo(),trigger:l,onTriggerChange:u},n)))},fv="MenuSubTrigger",SW=_e(((e,t)=>{const n=is(fv,e.__scopeMenu),r=Yd(fv,e.__scopeMenu),o=e3(fv,e.__scopeMenu),a=H_(fv,e.__scopeMenu),i=ke(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,s={__scopeMenu:e.__scopeMenu},c=lt((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return We((()=>c),[c]),We((()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}}),[l,u]),z(VN,fe({asChild:!0},s),z(XN,fe({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":t3(n.open)},e,{ref:Hv(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:ze(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:ze(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:ze(e.onKeyDown,(t=>{const o=""!==a.searchRef.current;var i;e.disabled||o&&" "===t.key||!Jz[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),CW="MenuSubContent",EW=_e(((e,t)=>{const n=KN(Ho,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=is(Ho,e.__scopeMenu),i=Yd(Ho,e.__scopeMenu),l=e3(CW,e.__scopeMenu),u=ke(null),s=Rt(t,u);return z(Dd.Provider,{scope:e.__scopeMenu},z(Ao,{present:r||a.open},z(Dd.Slot,{scope:e.__scopeMenu},z(V_,fe({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:ze(e.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:ze(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:ze(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=eW[i.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function t3(e){return e?"open":"closed"}function Iv(e){return"indeterminate"===e}function K_(e){return Iv(e)?"indeterminate":e?"checked":"unchecked"}function PW(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function RW(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function TW(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=RW(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 OW(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 AW(e,t){if(!t)return!1;return OW({x:e.clientX,y:e.clientY},t)}function Id(e){return t=>"mouse"===t.pointerType?e(t):void 0}const NW=oW,DW=VN,IW=aW,kW=lW,MW=YN,LW=fW,jW=G_,FW=dW,BW=mW,qW=yW,zW=wW,WW=xW,UW=$W,HW=SW,VW=EW,n3="DropdownMenu",[GW,qX]=Sr(n3,[WN]),Pr=WN(),[KW,r3]=GW(n3),YW=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=Pr(t),s=ke(null),[c=!1,d]=Vo({prop:o,defaultProp:a,onChange:i});return z(KW,{scope:t,triggerId:lo(),triggerRef:s,contentId:lo(),open:c,onOpenChange:d,onOpenToggle:lt((()=>d((e=>!e))),[d]),modal:l},z(NW,fe({},u,{open:c,onOpenChange:d,dir:r,modal:l}),n))},XW="DropdownMenuTrigger",QW=_e(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=r3(XW,n),i=Pr(n);return z(DW,fe({asChild:!0},i),z(it.button,fe({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:Hv(t,a.triggerRef),onPointerDown:ze(e.onPointerDown,(e=>{!r&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())})),onKeyDown:ze(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),ZW=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Pr(t);return z(IW,fe({},r,n))},JW="DropdownMenuContent",eU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=r3(JW,n),a=Pr(n),i=ke(!1);return z(kW,fe({id:o.contentId,"aria-labelledby":o.triggerId},a,r,{ref:t,onCloseAutoFocus:ze(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:ze(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)"}}))})),tU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(MW,fe({},o,r,{ref:t}))})),nU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(LW,fe({},o,r,{ref:t}))})),rU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(jW,fe({},o,r,{ref:t}))})),oU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(FW,fe({},o,r,{ref:t}))})),iU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(BW,fe({},o,r,{ref:t}))})),aU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(qW,fe({},o,r,{ref:t}))})),sU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(zW,fe({},o,r,{ref:t}))})),lU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(WW,fe({},o,r,{ref:t}))})),uU=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Pr(t),[l=!1,u]=Vo({prop:r,defaultProp:a,onChange:o});return z(UW,fe({},i,{open:l,onOpenChange:u}),n)},cU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(HW,fe({},o,r,{ref:t}))})),fU=_e(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Pr(n);return z(VW,fe({},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)"}}))})),dU=YW,pU=QW,o3=ZW,i3=eU,hU=tU,a3=nU,s3=rU,l3=oU,vU=iU,u3=aU,mU=sU,Y_=lU,gU=uU,c3=cU,f3=fU,zX=dU,WX=pU,UX=hU,HX=o3,VX=gU,GX=vU,yU=P.forwardRef((({className:e,inset:t,children:n,...r},o)=>k.jsxs(c3,{ref:o,className:se("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,k.jsx(gT,{className:"ml-auto h-4 w-4"})]})));yU.displayName=c3.displayName;const bU=P.forwardRef((({className:e,...t},n)=>k.jsx(f3,{ref:n,className:se("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})));bU.displayName=f3.displayName;const wU=P.forwardRef((({className:e,sideOffset:t=4,...n},r)=>k.jsx(o3,{children:k.jsx(i3,{ref:r,sideOffset:t,className:se("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]: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})})));wU.displayName=i3.displayName;const xU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(s3,{ref:r,className:se("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})));xU.displayName=s3.displayName;const _U=P.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},a)=>{const i=k.jsx(C_,{size:"default",variant:"default",checked:n});return k.jsxs(l3,{ref:a,className:se("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,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&i]})}));_U.displayName=l3.displayName;const $U=P.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const a=k.jsx("div",{className:"flex h-xxs items-center justify-center",children:k.jsx(mU,{children:k.jsx(Dx,{size:20})})});return k.jsxs(u3,{ref:o,className:se("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,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&a]})}));$U.displayName=u3.displayName;const SU=P.forwardRef((({className:e,inset:t,...n},r)=>k.jsx(a3,{ref:r,className:se("text-sm font-semibold",t&&"pl-xl",e),...n})));SU.displayName=a3.displayName;const CU=P.forwardRef((({className:e,...t},n)=>k.jsx(Y_,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t})));CU.displayName=Y_.displayName;const EU=({className:e,...t})=>k.jsx("span",{className:se("ml-auto text-xs tracking-widest opacity-60",e),...t});EU.displayName="DropdownMenuShortcut";const PU=_e(((e,t)=>z(it.label,fe({},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()}})))),d3=PU,RU=Ji("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),p3=P.forwardRef((({className:e,...t},n)=>k.jsx(d3,{ref:n,className:se(RU(),e),...t})));function J2(e,[t,n]){return Math.min(n,Math.max(t,e))}p3.displayName=d3.displayName;const h3=_e(((e,t)=>z(it.span,fe({},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}})))),TU=h3,OU=[" ","Enter","ArrowUp","ArrowDown"],AU=[" ","Enter"],$m="Select",[Sm,Cm,NU]=D_($m),[dc,KX]=Sr($m,[NU,cc]),X_=cc(),[DU,wl]=dc($m),[IU,kU]=dc($m),MU=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:p}=e,h=X_(t),[m,v]=tt(null),[g,y]=tt(null),[b,w]=tt(!1),x=Gd(s),[_=!1,k]=Vo({prop:r,defaultProp:o,onChange:a}),[P,S]=Vo({prop:i,defaultProp:l,onChange:u}),C=ke(null),E=!m||!!m.closest("form"),[N,O]=tt(new Set),T=Array.from(N).map((e=>e.props.value)).join(";");return z(wm,h,z(DU,{required:p,scope:t,trigger:m,onTriggerChange:v,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:lo(),value:P,onValueChange:S,open:_,onOpenChange:k,dir:x,triggerPointerDownPosRef:C,disabled:f},z(Sm.Provider,{scope:t},z(IU,{scope:e.__scopeSelect,onNativeOptionAdd:lt((e=>{O((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:lt((e=>{O((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),E?z(b3,{key:T,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:P,onChange:e=>S(e.target.value),disabled:f},void 0===P?z("option",{value:""}):null,Array.from(N)):null))},LU="SelectTrigger",jU=_e(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=X_(n),i=wl(LU,n),l=i.disabled||r,u=Rt(t,i.onTriggerChange),s=Cm(n),[c,d,f]=w3((e=>{const t=s().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=x3(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{l||(i.onOpenChange(!0),f())};return z(B_,fe({asChild:!0},a),z(it.button,fe({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":y3(i.value)?"":void 0},o,{ref:u,onClick:ze(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:ze(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:ze(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&OU.includes(e.key)&&(p(),e.preventDefault())}))})))})),FU="SelectValue",BU=_e(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,u=wl(FU,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==a,d=Rt(t,u.onValueNodeChange);return fr((()=>{s(c)}),[s,c]),z(it.span,fe({},l,{ref:d,style:{pointerEvents:"none"}}),y3(u.value)?z(vl,null,i):a)})),qU=_e(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return z(it.span,fe({"aria-hidden":!0},o,{ref:t}),r||"▼")})),zU=e=>z(Bx,fe({asChild:!0},e)),Zu="SelectContent",WU=_e(((e,t)=>{const n=wl(Zu,e.__scopeSelect),[r,o]=tt();if(fr((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?_i.createPortal(z(v3,{scope:e.__scopeSelect},z(Sm.Slot,{scope:e.__scopeSelect},z("div",null,e.children))),t):null}return z(UU,fe({},e,{ref:t}))})),Gi=10,[v3,xl]=dc(Zu),UU=_e(((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:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...g}=e,y=wl(Zu,n),[b,w]=tt(null),[x,_]=tt(null),k=Rt(t,(e=>w(e))),[P,S]=tt(null),[C,E]=tt(null),N=Cm(n),[O,T]=tt(!1),R=ke(!1);We((()=>{if(b)return Yv(b)}),[b]),qx();const j=lt((e=>{const[t,...n]=N().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[N,x]),D=lt((()=>j([P,b])),[j,P,b]);We((()=>{O&&D()}),[O,D]);const{onOpenChange:A,triggerPointerDownPosRef:M}=y;We((()=>{if(b){let e={x:0,y:0};const t=t=>{var n,r,o,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=M.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(a=M.current)||void 0===a?void 0:a.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,A,M]),We((()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[A]);const[L,I]=w3((e=>{const t=N().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=x3(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),F=lt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(R.current=!0))}),[y.value]),W=lt((()=>null==b?void 0:b.focus()),[b]),B=lt(((e,t,n)=>{const r=!R.current&&!n;(void 0!==y.value&&y.value===t||r)&&E(e)}),[y.value]),$="popper"===r?eR:HU,U=$===eR?{side:l,sideOffset:u,align:s,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v}:{};return z(v3,{scope:n,content:b,viewport:x,onViewportChange:_,itemRefCallback:F,selectedItem:P,onItemLeave:W,itemTextRefCallback:B,focusSelectedItem:D,selectedItemText:C,position:r,isPositioned:O,searchRef:L},z(Kv,{as:ll,allowPinchZoom:!0},z(Fx,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ze(o,(e=>{var t;null===(t=y.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},z(Vv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},z($,fe({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},g,U,{onPlaced:()=>T(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ze(g.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&I(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>j(t))),e.preventDefault()}}))}))))))})),HU=_e(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=wl(Zu,n),i=xl(Zu,n),[l,u]=tt(null),[s,c]=tt(null),d=Rt(t,(e=>c(e))),f=Cm(n),p=ke(!1),h=ke(!0),{viewport:m,selectedItem:v,selectedItemText:g,focusSelectedItem:y}=i,b=lt((()=>{if(a.trigger&&a.valueNode&&l&&s&&m&&v&&g){const e=a.trigger.getBoundingClientRect(),t=s.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=g.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-Gi,d=J2(a,[Gi,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-Gi,d=J2(a,[Gi,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const i=f(),u=window.innerHeight-2*Gi,c=m.scrollHeight,d=window.getComputedStyle(s),h=parseInt(d.borderTopWidth,10),y=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+y+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*v.offsetHeight,w),_=window.getComputedStyle(m),k=parseInt(_.paddingTop,10),P=parseInt(_.paddingBottom,10),S=e.top+e.height/2-Gi,C=u-S,E=v.offsetHeight/2,N=h+y+(v.offsetTop+E),O=w-N;if(N<=S){const e=v===i[i.length-1].ref.current;l.style.bottom="0px";const t=s.clientHeight-m.offsetTop-m.offsetHeight,n=N+Math.max(C,E+(e?P:0)+t+b);l.style.height=n+"px"}else{const e=v===i[0].ref.current;l.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?k:0)+E)+O;l.style.height=t+"px",m.scrollTop=N-S+m.offsetTop}l.style.margin=`${Gi}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,a.trigger,a.valueNode,l,s,m,v,g,a.dir,r]);fr((()=>b()),[b]);const[w,x]=tt();fr((()=>{s&&x(window.getComputedStyle(s).zIndex)}),[s]);const _=lt((e=>{e&&!0===h.current&&(b(),null==y||y(),h.current=!1)}),[b,y]);return z(VU,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:_},z("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},z(it.div,fe({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),eR=_e(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Gi,...a}=e,i=X_(n);return z(q_,fe({},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)"}}))})),[VU,Q_]=dc(Zu,{}),tR="SelectViewport",GU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=xl(tR,n),a=Q_(tR,n),i=Rt(t,o.onViewportChange),l=ke(0);return z(vl,null,z("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}"}}),z(Sm.Slot,{scope:n},z(it.div,fe({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:ze(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*Gi,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}))}))))})),KU="SelectGroup",[YU,XU]=dc(KU),QU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=lo();return z(YU,{scope:n,id:o},z(it.div,fe({role:"group","aria-labelledby":o},r,{ref:t})))})),ZU="SelectLabel",JU=_e(((e,t)=>{const{__scopeSelect:n,...r}=e,o=XU(ZU,n);return z(it.div,fe({id:o.id},r,{ref:t}))})),$x="SelectItem",[eH,m3]=dc($x),tH=_e(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=wl($x,n),u=xl($x,n),s=l.value===r,[c,d]=tt(a??""),[f,p]=tt(!1),h=Rt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),m=lo(),v=()=>{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 z(eH,{scope:n,value:r,disabled:o,textId:m,isSelected:s,onItemTextChange:lt((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},z(Sm.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},z(it.div,fe({role:"option","aria-labelledby":m,"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:ze(i.onFocus,(()=>p(!0))),onBlur:ze(i.onBlur,(()=>p(!1))),onPointerUp:ze(i.onPointerUp,v),onPointerMove:ze(i.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:ze(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:ze(i.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(AU.includes(e.key)&&v()," "===e.key&&e.preventDefault())}))}))))})),dv="SelectItemText",nH=_e(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=wl(dv,n),l=xl(dv,n),u=m3(dv,n),s=kU(dv,n),[c,d]=tt(null),f=Rt(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)})),p=null==c?void 0:c.textContent,h=Ur((()=>z("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=s;return fr((()=>(m(h),()=>v(h))),[m,v,h]),z(vl,null,z(it.span,fe({id:u.textId},a,{ref:f})),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?_i.createPortal(a.children,i.valueNode):null)})),rH="SelectItemIndicator",oH=_e(((e,t)=>{const{__scopeSelect:n,...r}=e;return m3(rH,n).isSelected?z(it.span,fe({"aria-hidden":!0},r,{ref:t})):null})),nR="SelectScrollUpButton",iH=_e(((e,t)=>{const n=xl(nR,e.__scopeSelect),r=Q_(nR,e.__scopeSelect),[o,a]=tt(!1),i=Rt(t,r.onScrollButtonChange);return fr((()=>{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?z(g3,fe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),rR="SelectScrollDownButton",aH=_e(((e,t)=>{const n=xl(rR,e.__scopeSelect),r=Q_(rR,e.__scopeSelect),[o,a]=tt(!1),i=Rt(t,r.onScrollButtonChange);return fr((()=>{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?z(g3,fe({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),g3=_e(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=xl("SelectScrollButton",n),i=ke(null),l=Cm(n),u=lt((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return We((()=>()=>u()),[u]),fr((()=>{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]),z(it.div,fe({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:ze(o.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:ze(o.onPointerMove,(()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:ze(o.onPointerLeave,(()=>{u()}))}))})),sH=_e(((e,t)=>{const{__scopeSelect:n,...r}=e;return z(it.div,fe({"aria-hidden":!0},r,{ref:t}))}));function y3(e){return""===e||void 0===e}const b3=_e(((e,t)=>{const{value:n,...r}=e,o=ke(null),a=Rt(t,o),i=dm(n);return We((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),z(h3,{asChild:!0},z("select",fe({},r,{ref:a,defaultValue:n})))}));function w3(e){const t=Hr(e),n=ke(""),r=ke(0),o=lt((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=lt((()=>{n.current="",window.clearTimeout(r.current)}),[]);return We((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function x3(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=lH(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 lH(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}b3.displayName="BubbleSelect";const _3=MU,$3=jU,S3=BU,uH=qU,cH=zU,C3=WU,fH=GU,E3=QU,P3=JU,R3=tH,dH=nH,pH=oH,T3=iH,O3=aH,A3=sH,hH=_3,N3=P.forwardRef((({...e},t)=>k.jsx(hH,{ref:t,...e})));N3.displayName=_3.displayName;const D3=P.forwardRef(((e,t)=>k.jsx(E3,{ref:t,...e})));D3.displayName=E3.displayName;const I3=P.forwardRef(((e,t)=>k.jsx(S3,{ref:t,...e})));I3.displayName=S3.displayName;const Z_=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>k.jsxs("div",{className:"w-full",children:[k.jsxs($3,{ref:i,className:se("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-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...a,children:[k.jsxs("div",{className:"flex flex-1 items-center gap-xxs",children:[o&&k.jsx("span",{className:se("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),k.jsx(uH,{asChild:!0,children:k.jsx(vT,{size:20})})]}),n||r?r?k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[k.jsx(bT,{size:16}),r]}):k.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[k.jsx(kM,{size:16}),n]}):null]})));Z_.displayName="SelectTriggerWrapper";const k3=P.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...a},i)=>k.jsx(Z_,{ref:i,className:se("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...a,children:t})));k3.displayName=$3.displayName;const M3=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 k.jsx(cH,{children:k.jsx(C3,{ref:o,className:se("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:k.jsx(fH,{className:se("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})})})}));M3.displayName=C3.displayName;const L3=P.forwardRef((({className:e,...t},n)=>k.jsx(P3,{ref:n,className:se("text-sm font-medium text-slate-900",e),...t})));L3.displayName=P3.displayName;const j3=P.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},a)=>{const i=k.jsx(pH,{children:k.jsx(Dx,{size:20})});return k.jsxs(R3,{ref:a,className:se("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,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:k.jsx(dH,{children:r})}),t&&"right"===n&&i]})}));j3.displayName=R3.displayName;const F3=P.forwardRef((({className:e,...t},n)=>k.jsx(A3,{ref:n,className:se("-mx-1 my-1 h-px bg-slate-200",e),...t})));F3.displayName=A3.displayName;const vH=(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}},mH=P.forwardRef((({className:e,selectedValues:t=[],placeholder:n,onRemoveValue:r,icon:o,caption:a,error:i,...l},u)=>{const{containerRef:s,visibleCount:c}=vH(t,r),d=t.length-c;return k.jsx(Z_,{ref:u,className:e,caption:a,error:i,icon:o,...l,children:k.jsx("div",{ref:s,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===t.length?k.jsx("span",{children:n||"Select options..."}):k.jsxs(Kj,{children:[t.slice(0,c).map((e=>{const t="string"==typeof e?e:e.value;return k.jsx(C2,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==r?void 0:r(t)},t)})),d>0&&k.jsx(C2,{text:`+${d}`})]})})})}));mH.displayName="SelectMultiTrigger";const gH=P.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:a,children:i,...l},u)=>{const s=n?k.jsx(yT,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):k.jsx(C_,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return k.jsxs("div",{ref:u,className:se("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",{"pointer-events-none":n},a),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...l,children:["left"===r&&s,k.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:i}),"right"===r&&s]})}));gH.displayName="SelectCheckboxItem";const yH=P.forwardRef((({className:e,...t},n)=>k.jsx(T3,{ref:n,className:se("flex cursor-default items-center justify-center py-xxs",e),...t,children:k.jsx(AM,{size:16})})));yH.displayName=T3.displayName;const bH=P.forwardRef((({className:e,...t},n)=>k.jsx(O3,{ref:n,className:se("flex cursor-default items-center justify-center p-xxs",e),...t,children:k.jsx(vT,{size:16})})));bH.displayName=O3.displayName;const wH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));wH.displayName="SelectActions";const xH=P.forwardRef((({className:e,children:t,...n},r)=>k.jsx("div",{ref:r,className:se("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));xH.displayName="SelectFooter";const YX=fM,B3=P.createContext({}),XX=({...e})=>k.jsx(B3.Provider,{value:{name:e.name},children:k.jsx(dM,{...e})}),as=()=>{const e=P.useContext(B3),t=P.useContext(q3),n=pM();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}},q3=P.createContext({}),_H=P.forwardRef((({className:e,...t},n)=>{const r=P.useId();return k.jsx(q3.Provider,{value:{id:r},children:k.jsx("div",{ref:n,className:se("mt-[8px]",e),...t})})}));_H.displayName="FormItem";const $H=P.forwardRef((({className:e,isRequired:t,...n},r)=>{var o;const{formItemId:a}=as();return k.jsx(p3,{ref:r,className:se("mb-2 text-sm font-medium",e),htmlFor:a,...n,children:t?`*${null==(o=n.children)?void 0:o.toString()}`:n.children})}));$H.displayName="FormLabel";const SH=P.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=as();return k.jsx(os,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})}));SH.displayName="FormControl";const CH=P.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=as();return k.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})}));CH.displayName="FormDescription";const EH=P.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=as(),i=o?String(null==o?void 0:o.message):t;return i?k.jsxs("p",{ref:r,id:a,className:se("flex items-center gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[k.jsx(bT,{size:16,className:"text-red-dark"})," ",i]}):null}));EH.displayName="FormMessage";const PH=P.forwardRef((({...e},t)=>{const{name:n}=as();return k.jsx(N3,{ref:t,name:n,...e})}));PH.displayName="FormSelect";const RH=P.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=as();return k.jsx(k3,{ref:r,id:o,className:e,...n,children:t})}));RH.displayName="FormSelectTrigger";const TH=P.forwardRef(((e,t)=>k.jsx(M3,{ref:t,...e})));TH.displayName="FormSelectContent";const OH=P.forwardRef(((e,t)=>k.jsx(j3,{ref:t,...e})));OH.displayName="FormSelectItem";const AH=P.forwardRef(((e,t)=>k.jsx(D3,{ref:t,...e})));AH.displayName="FormSelectGroup";const NH=P.forwardRef(((e,t)=>k.jsx(L3,{ref:t,...e})));NH.displayName="FormSelectLabel";const DH=P.forwardRef(((e,t)=>k.jsx(F3,{ref:t,...e})));DH.displayName="FormSelectSeparator";const IH=P.forwardRef(((e,t)=>k.jsx(I3,{ref:t,...e})));function Ro(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 z3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>Qa(e)));return function(n){const r=(null==n?void 0:n[e])||t;return Ur((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=Qa(r),a=n.length;function i(t){const{scope:n,children:r,...i}=t,l=(null==n?void 0:n[e][a])||o,u=Ur((()=>i),Object.values(i));return z(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=ec(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},kH(r,...t)]}function kH(...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 Ur((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function pc(e){const t=ke(e);return We((()=>{t.current=e})),Ur((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function MH({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=LH({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=pc(n);return[i,lt((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function LH({defaultProp:e,onChange:t}){const n=tt(e),[r]=n,o=ke(r),a=pc(t);return We((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}function jH(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function FH(...e){return t=>e.forEach((e=>jH(e,t)))}function BH(...e){return lt(FH(...e),e)}function _l(e){return e.split("-")[0]}function Xd(e){return e.split("-")[1]}function hc(e){return["top","bottom"].includes(_l(e))?"x":"y"}function J_(e){return"y"===e?"height":"width"}function oR(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=J_(l),s=r[u]/2-o[u]/2,c="x"===l;let d;switch(_l(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(Xd(t)){case"start":d[l]-=s*(n&&c?-1:1);break;case"end":d[l]+=s*(n&&c?-1:1)}return d}IH.displayName="FormSelectValue";const qH=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}=oR(u,r,l),d=r,f={},p=0;for(let n=0;n<a.length;n++){const{name:h,fn:m}=a[n],{x:v,y:g,data:y,reset:b}=await m({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,[h]:{...f[h],...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}=oR(u,d,l))),n=-1)}return{x:s,y:c,placement:d,strategy:o,middlewareData:f}};function W3(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 kv(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function kd(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,h=W3(p),m=l[f?"floating"===d?"reference":"floating":d],v=kv(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:c,strategy:u})),g=kv(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+h.top,bottom:g.bottom-v.bottom+h.bottom,left:v.left-g.left+h.left,right:g.right-v.right+h.right}}const zH=Math.min,rl=Math.max;function Sx(e,t,n){return rl(e,zH(t,n))}const iR=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=W3(r),c={x:o,y:a},d=hc(i),f=Xd(i),p=J_(d),h=await u.getDimensions(n),m="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[m],k=w-h[p]-s[v],P=w/2-h[p]/2+x,S=Sx(_,P,k),C=("start"===f?s[m]:s[v])>0&&P!==S&&l.reference[p]<=l.floating[p];return{[d]:c[d]-(C?P<_?_-P:k-P:0),data:{[d]:S,centerOffset:P-S}}}}),WH={left:"right",right:"left",bottom:"top",top:"bottom"};function Mv(e){return e.replace(/left|right|bottom|top/g,(e=>WH[e]))}function UH(e,t,n){void 0===n&&(n=!1);const r=Xd(e),o=hc(e),a=J_(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Mv(i)),{main:i,cross:Mv(i)}}const HH={start:"end",end:"start"};function aR(e){return e.replace(/start|end/g,(e=>HH[e]))}const U3=["top","right","bottom","left"];U3.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const VH=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,...h}=e,m=_l(r),v=[i,...d||(m!==i&&p?function(e){const t=Mv(e);return[aR(e),t,aR(t)]}(i):[Mv(i)])],g=await kd(t,h),y=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&y.push(g[m]),c){const{main:e,cross:t}=UH(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 sR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lR(e){return U3.some((t=>e[t]>=0))}const GH=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=sR(await kd(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:lR(t)}}}case"escaped":{const t=sR(await kd(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:lR(t)}}}default:return{}}}}},KH=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=_l(n),l=Xd(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:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),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 H3(e){return"x"===e?"y":"x"}const YH=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 kd(t,u),d=hc(_l(o)),f=H3(d);let p=s[d],h=s[f];if(a){const e="y"===d?"bottom":"right";p=Sx(p+c["y"===d?"top":"left"],p,p-c[e])}if(i){const e="y"===f?"bottom":"right";h=Sx(h+c["y"===f?"top":"left"],h,h-c[e])}const m=l.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},XH=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=H3(d);let p=c[d],h=c[f];const m="function"==typeof l?l({...a,placement:o}):l,v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};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(_l(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);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},QH=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 kd(t,l),s=_l(n),c=Xd(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=rl(u.left,0),h=rl(u.right,0),m=rl(u.top,0),v=rl(u.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==v?m+v:rl(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:rl(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 V3(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function oa(e){if(null==e)return window;if(!V3(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qd(e){return oa(e).getComputedStyle(e)}function Ki(e){return V3(e)?"":e?(e.nodeName||"").toLowerCase():""}function G3(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function xi(e){return e instanceof oa(e).HTMLElement}function rs(e){return e instanceof oa(e).Element}function e$(e){return!(typeof ShadowRoot>"u")&&(e instanceof oa(e).ShadowRoot||e instanceof ShadowRoot)}function Em(e){const{overflow:t,overflowX:n,overflowY:r}=Qd(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function ZH(e){return["table","td","th"].includes(Ki(e))}function uR(e){const t=/firefox/i.test(G3()),n=Qd(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 K3(){return!/^((?!chrome|android).)*safari/i.test(G3())}const cR=Math.min,xd=Math.max,Lv=Math.round;function Yi(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&&xi(e)&&(u=e.offsetWidth>0&&Lv(l.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Lv(l.height)/e.offsetHeight||1);const c=rs(e)?oa(e):window,d=!K3()&&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,h=l.width/u,m=l.height/s;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}function Xa(e){return(t=e,(t instanceof oa(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Pm(e){return rs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Y3(e){return Yi(Xa(e)).left+Pm(e).scrollLeft}function JH(e,t,n){const r=xi(t),o=Xa(t),a=Yi(e,r&&function(e){const t=Yi(e);return Lv(t.width)!==e.offsetWidth||Lv(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"!==Ki(t)||Em(o))&&(i=Pm(t)),xi(t)){const e=Yi(t,!0);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Y3(o));return{x:a.left+i.scrollLeft-l.x,y:a.top+i.scrollTop-l.y,width:a.width,height:a.height}}function X3(e){return"html"===Ki(e)?e:e.assignedSlot||e.parentNode||(e$(e)?e.host:null)||Xa(e)}function fR(e){return xi(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function Cx(e){const t=oa(e);let n=fR(e);for(;n&&ZH(n)&&"static"===getComputedStyle(n).position;)n=fR(n);return n&&("html"===Ki(n)||"body"===Ki(n)&&"static"===getComputedStyle(n).position&&!uR(n))?t:n||function(e){let t=X3(e);for(e$(t)&&(t=t.host);xi(t)&&!["html","body"].includes(Ki(t));){if(uR(t))return t;t=t.parentNode}return null}(e)||t}function dR(e){if(xi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Yi(e);return{width:t.width,height:t.height}}function Q3(e){const t=X3(e);return["html","body","#document"].includes(Ki(t))?e.ownerDocument.body:xi(t)&&Em(t)?t:Q3(t)}function jv(e,t){var n;void 0===t&&(t=[]);const r=Q3(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=oa(r),i=o?[a].concat(a.visualViewport||[],Em(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(jv(i))}function pR(e,t,n){return"viewport"===t?kv(function(e,t){const n=oa(e),r=Xa(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=K3();(e||!e&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l,y:u}}(e,n)):rs(t)?function(e,t){const n=Yi(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):kv(function(e){var t;const n=Xa(e),r=Pm(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+Y3(e);const u=-r.scrollTop;return"rtl"===Qd(o||n).direction&&(l+=xd(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:u}}(Xa(e)))}function eV(e){const t=jv(e),n=["absolute","fixed"].includes(Qd(e).position)&&xi(e)?Cx(e):e;return rs(n)?t.filter((e=>rs(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&e$(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Ki(e))):[]}const tV={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?eV(t):[].concat(n),r],i=a[0],l=a.reduce(((e,n)=>{const r=pR(t,n,o);return e.top=xd(r.top,e.top),e.right=cR(r.right,e.right),e.bottom=cR(r.bottom,e.bottom),e.left=xd(r.left,e.left),e}),pR(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=xi(n),a=Xa(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ki(n)||Em(a))&&(i=Pm(n)),xi(n))){const e=Yi(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:rs,getDimensions:dR,getOffsetParent:Cx,getDocumentElement:Xa,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:JH(t,Cx(n),r),floating:{...dR(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Qd(e).direction};function nV(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?[...rs(e)?jv(e):[],...jv(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})),rs(e)&&!l&&f.observe(e),f.observe(t)}let p=l?Yi(e):null;return l&&function t(){const r=Yi(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 rV=(e,t,n)=>qH(e,t,{platform:tV,...n});var Ex=typeof document<"u"?tc:We;function Px(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(!Px(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||Px(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function oV(e){const t=P.useRef(e);return Ex((()=>{t.current=e})),t}function iV(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=oV(o),u=P.useRef(null),[s,c]=P.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=P.useState(t);Px(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=P.useCallback((()=>{!a.current||!i.current||rV(a.current,i.current,{middleware:d,placement:n,strategy:r}).then((e=>{h.current&&_i.flushSync((()=>{c(e)}))}))}),[d,n,r]);Ex((()=>{h.current&&p()}),[p]);const h=P.useRef(!1);Ex((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=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,p);u.current=e}else p()}),[p,l]),v=P.useCallback((e=>{a.current=e,m()}),[m]),g=P.useCallback((e=>{i.current=e,m()}),[m]),y=P.useMemo((()=>({reference:a,floating:i})),[]);return P.useMemo((()=>({...s,update:p,refs:y,reference:v,floating:g})),[s,p,y,v,g])}const aV=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?iR({element:t.current,padding:n}).fn(e):{}:t?iR({element:t,padding:n}).fn(e):{}}};function sV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function lV(...e){return t=>e.forEach((e=>sV(e,t)))}const Z3=_e(((e,t)=>{const{children:n,...r}=e,o=so.toArray(n),a=o.find(cV);if(a){const e=a.props.children,n=o.map((t=>t===a?so.count(e)>1?so.only(null):Xi(e)?e.props.children:null:t));return z(Rx,fe({},r,{ref:t}),Xi(e)?ml(e,void 0,n):null)}return z(Rx,fe({},r,{ref:t}),n)}));Z3.displayName="Slot";const Rx=_e(((e,t)=>{const{children:n,...r}=e;return Xi(n)?ml(n,{...fV(r,n.props),ref:lV(t,n.ref)}):so.count(n)>1?so.only(null):null}));Rx.displayName="SlotClone";const uV=({children:e})=>z(vl,null,e);function cV(e){return Xi(e)&&e.type===uV}function fV(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 dV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ju=dV.reduce(((e,t)=>{const n=_e(((e,n)=>{const{asChild:r,...o}=e,a=r?Z3:t;return We((()=>{window[Symbol.for("radix-ui")]=!0}),[]),z(a,fe({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function pV(e,t){e&&_i.flushSync((()=>e.dispatchEvent(t)))}function hV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function vV(...e){return t=>e.forEach((e=>hV(e,t)))}function J3(...e){return lt(vV(...e),e)}const al=null!=globalThis&&globalThis.document?tc:()=>{};function mV(e){const[t,n]=tt(void 0);return al((()=>{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 eD="Popper",[t$,tD]=z3(eD),[gV,nD]=t$(eD),yV=e=>{const{__scopePopper:t,children:n}=e,[r,o]=tt(null);return z(gV,{scope:t,anchor:r,onAnchorChange:o},n)},bV="PopperAnchor",wV=_e(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=nD(bV,n),i=ke(null),l=J3(t,i);return We((()=>{a.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:z(Ju.div,fe({},o,{ref:l}))})),Fv="PopperContent",[xV,QX]=t$(Fv),[_V,$V]=t$(Fv,{hasParent:!1,positionUpdateFns:new Set}),SV=_e(((e,t)=>{var n,r,o,a,i,l,u,s;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,avoidCollisions:w=!0,onPlaced:x,..._}=e,k=nD(Fv,c),[P,S]=tt(null),C=J3(t,(e=>S(e))),[E,N]=tt(null),O=mV(E),T=null!==(n=null==O?void 0:O.width)&&void 0!==n?n:0,R=null!==(r=null==O?void 0:O.height)&&void 0!==r?r:0,j=d+("center"!==p?"-"+p:""),D="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},A=Array.isArray(v)?v:[v],M=A.length>0,L={padding:D,boundary:A.filter(EV),altBoundary:M},{reference:I,floating:F,strategy:W,x:B,y:$,placement:U,middlewareData:H,update:V}=iV({strategy:"fixed",placement:j,whileElementsMounted:nV,middleware:[PV(),KH({mainAxis:f+R,alignmentAxis:h}),w?YH({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?XH():void 0,...L}):void 0,E?aV({element:E,padding:m}):void 0,w?VH({...L}):void 0,QH({...L,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),RV({arrowWidth:T,arrowHeight:R}),b?GH({strategy:"referenceHidden"}):void 0].filter(CV)});al((()=>{I(k.anchor)}),[I,k.anchor]);const K=null!==B&&null!==$,[q,Y]=rD(U),G=pc(x);al((()=>{K&&(null==G||G())}),[K,G]);const X=null===(o=H.arrow)||void 0===o?void 0:o.x,Q=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]=tt();al((()=>{P&&ee(window.getComputedStyle(P).zIndex)}),[P]);const{hasParent:te,positionUpdateFns:ne}=$V(Fv,c),re=!te;tc((()=>{if(!re)return ne.add(V),()=>{ne.delete(V)}}),[re,ne,V]),al((()=>{re&&K&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,K,ne]);const oe={"data-side":q,"data-align":Y,..._,ref:C,style:{..._.style,animation:K?void 0:"none",opacity:null!==(l=H.hide)&&void 0!==l&&l.referenceHidden?0:void 0}};return z("div",{ref:F,"data-radix-popper-content-wrapper":"",style:{position:W,left:0,top:0,transform:K?`translate3d(${Math.round(B)}px, ${Math.round($)}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},z(xV,{scope:c,placedSide:q,onArrowChange:N,arrowX:X,arrowY:Q,shouldHideArrow:Z},re?z(_V,{scope:c,hasParent:!0,positionUpdateFns:ne},z(Ju.div,oe)):z(Ju.div,oe)))}));function CV(e){return void 0!==e}function EV(e){return null!==e}const PV=()=>({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`),{}}}),RV=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,h]=rD(l),m={start:"0%",center:"50%",end:"100%"}[h],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?m:`${v}px`,b=-f+"px"):"top"===p?(y=c?m:`${v}px`,b=`${u.floating.height+f}px`):"right"===p?(y=-f+"px",b=c?m:`${g}px`):"left"===p&&(y=`${u.floating.width+f}px`,b=c?m:`${g}px`),{data:{x:y,y:b}}}});function rD(e){const[t,n="center"]=e.split("-");return[t,n]}const TV=yV,OV=wV,AV=SV,NV=_e(((e,t)=>{var n;const{container:r=(null==globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body),...o}=e;return r?Lx.createPortal(z(Ju.div,fe({},o,{ref:t})),r):null}));function DV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function IV(...e){return t=>e.forEach((e=>DV(e,t)))}function kV(...e){return lt(IV(...e),e)}function MV(e,t){return cT(((e,n)=>t[e][n]??e),e)}const n$=e=>{const{present:t,children:n}=e,r=LV(t),o="function"==typeof n?n({present:r.isPresent}):so.only(n),a=kV(r.ref,o.ref);return"function"==typeof n||r.isPresent?ml(o,{ref:a}):null};function LV(e){const[t,n]=tt(),r=ke({}),o=ke(e),a=ke("none"),i=e?"mounted":"unmounted",[l,u]=MV(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return We((()=>{const e=pv(r.current);a.current="mounted"===l?e:"none"}),[l]),al((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=pv(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]),al((()=>{if(t){const e=e=>{const n=pv(r.current).includes(e.animationName);e.target===t&&n&&_i.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(a.current=pv(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:lt((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function pv(e){return(null==e?void 0:e.animationName)||"none"}function jV(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function FV(...e){return t=>e.forEach((e=>jV(e,t)))}function BV(...e){return lt(FV(...e),e)}function qV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e);We((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}n$.displayName="Presence";const Tx="dismissableLayer.update",zV="dismissableLayer.pointerDownOutside",WV="dismissableLayer.focusOutside";let hR;const UV=Qa({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),HV=_e(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...s}=e,c=ec(UV),[d,f]=tt(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=tt({}),m=BV(t,(e=>f(e))),v=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),b=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,x=b>=y,_=VV((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==a||a(e),null==l||l(e),e.defaultPrevented||null==u||u())}),p),k=GV((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())}),p);return qV((e=>{b===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),We((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(hR=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),vR(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=hR)}}),[d,p,r,c]),We((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),vR())}),[d,c]),We((()=>{const e=()=>h({});return document.addEventListener(Tx,e),()=>document.removeEventListener(Tx,e)}),[]),z(Ju.div,fe({},s,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...e.style},onFocusCapture:Ro(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ro(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ro(e.onPointerDownCapture,_.onPointerDownCapture)}))}));function VV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=ke(!1),o=ke((()=>{}));return We((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){oD(zV,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 GV(e,t=(null==globalThis?void 0:globalThis.document)){const n=pc(e),r=ke(!1);return We((()=>{const e=e=>{e.target&&!r.current&&oD(WV,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 vR(){const e=new CustomEvent(Tx);document.dispatchEvent(e)}function oD(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?pV(o,a):o.dispatchEvent(a)}let rw;const iD="HoverCard",[aD,ZX]=z3(iD,[tD]),r$=tD(),[KV,Rm]=aD(iD),YV=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,u=r$(t),s=ke(0),c=ke(0),d=ke(!1),f=ke(!1),[p=!1,h]=MH({prop:r,defaultProp:o,onChange:a}),m=lt((()=>{clearTimeout(c.current),s.current=window.setTimeout((()=>h(!0)),i)}),[i,h]),v=lt((()=>{clearTimeout(s.current),!d.current&&!f.current&&(c.current=window.setTimeout((()=>h(!1)),l))}),[l,h]),g=lt((()=>h(!1)),[h]);return We((()=>()=>{clearTimeout(s.current),clearTimeout(c.current)}),[]),z(KV,{scope:t,open:p,onOpenChange:h,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f},z(TV,u,n))},XV="HoverCardTrigger",QV=_e(((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Rm(XV,n),a=r$(n);return z(OV,fe({asChild:!0},a),z(Ju.a,fe({"data-state":o.open?"open":"closed"},r,{ref:t,onPointerEnter:Ro(e.onPointerEnter,Bv(o.onOpen)),onPointerLeave:Ro(e.onPointerLeave,Bv(o.onClose)),onFocus:Ro(e.onFocus,o.onOpen),onBlur:Ro(e.onBlur,o.onClose),onTouchStart:Ro(e.onTouchStart,(e=>e.preventDefault()))})))})),sD="HoverCardPortal",[ZV,JV]=aD(sD,{forceMount:void 0}),eG=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Rm(sD,t);return z(ZV,{scope:t,forceMount:n},z(n$,{present:n||a.open},z(NV,{asChild:!0,container:o},r)))},Ox="HoverCardContent",tG=_e(((e,t)=>{const n=JV(Ox,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Rm(Ox,e.__scopeHoverCard);return z(n$,{present:r||a.open},z(nG,fe({"data-state":a.open?"open":"closed"},o,{onPointerEnter:Ro(e.onPointerEnter,Bv(a.onOpen)),onPointerLeave:Ro(e.onPointerLeave,Bv(a.onClose)),ref:t})))})),nG=_e(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...l}=e,u=Rm(Ox,n),s=r$(n),c=ke(null),d=BH(t,c),[f,p]=tt(!1);return We((()=>{if(f){const e=document.body;return rw=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=rw,e.style.webkitUserSelect=rw}}}),[f]),We((()=>{if(c.current){const e=()=>{p(!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]),We((()=>{c.current&&rG(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),z(HV,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Ro(a,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},z(AV,fe({},s,l,{onPointerDown:Ro(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!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 Bv(e){return t=>"touch"===t.pointerType?void 0:e()}function rG(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 oG=YV,iG=QV,aG=eG,lD=tG,JX=oG,eQ=iG,tQ=aG,sG=P.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>k.jsx(lD,{ref:o,align:t,sideOffset:n,className:se("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})));sG.displayName=lD.displayName;const uD=P.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=as();return k.jsx("input",{type:t,className:se("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})}));function lG(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 k.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}\``)}]},uG(r,...t)]}function uG(...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 mR(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function cG(...e){return t=>{let n=!1;const r=e.map((e=>{const r=mR(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():mR(e[t],null)}}}}function fG(e){const t=dG(e),n=P.forwardRef(((e,n)=>{const{children:r,...o}=e,a=P.Children.toArray(r),i=a.find(hG);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 k.jsx(t,{...o,ref:n,children:P.isValidElement(e)?P.cloneElement(e,void 0,r):null})}return k.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function dG(e){const t=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=mG(n),o=vG(r,n.props);return n.type!==P.Fragment&&(o.ref=t?cG(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}uD.displayName="Input";var pG=Symbol("radix.slottable");function hG(e){return P.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===pG}function vG(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function mG(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 gG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cD=gG.reduce(((e,t)=>{const n=fG(`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),k.jsx(i,{...a,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),o$="Progress",i$=100,[yG,nQ]=lG(o$),[bG,wG]=yG(o$),fD=P.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=xG,...i}=e;(o||0===o)&&!gR(o)&&console.error(_G(`${o}`,"Progress"));const l=gR(o)?o:i$;null!==r&&!yR(r,l)&&console.error($G(`${r}`,"Progress"));const u=yR(r,l)?r:null,s=qv(u)?a(u,l):void 0;return k.jsx(bG,{scope:n,value:u,max:l,children:k.jsx(cD.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":qv(u)?u:void 0,"aria-valuetext":s,role:"progressbar","data-state":hD(u,l),"data-value":u??void 0,"data-max":l,...i,ref:t})})}));fD.displayName=o$;var dD="ProgressIndicator",pD=P.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=wG(dD,n);return k.jsx(cD.div,{"data-state":hD(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function xG(e,t){return`${Math.round(e/t*100)}%`}function hD(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function qv(e){return"number"==typeof e}function gR(e){return qv(e)&&!isNaN(e)&&e>0}function yR(e,t){return qv(e)&&!isNaN(e)&&e<=t&&e>=0}function _G(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${i$}\`.`}function $G(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${i$} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}pD.displayName=dD;var vD=fD,SG=pD;const CG=P.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>k.jsx(vD,{ref:o,className:se("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:k.jsx(SG,{className:se("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));CG.displayName=vD.displayName;const mD="Radio",[EG,gD]=Sr(mD),[PG,RG]=EG(mD),TG=_e(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:u,...s}=e,[c,d]=tt(null),f=Rt(t,(e=>d(e))),p=ke(!1),h=!c||!!c.closest("form");return z(PG,{scope:n,checked:o,disabled:i},z(it.button,fe({type:"button",role:"radio","aria-checked":o,"data-state":yD(o),"data-disabled":i?"":void 0,disabled:i,value:l},s,{ref:f,onClick:ze(e.onClick,(e=>{o||null==u||u(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&z(NG,{control:c,bubbles:!p.current,name:r,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))})),OG="RadioIndicator",AG=_e(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=RG(OG,n);return z(Ao,{present:r||a.checked},z(it.span,fe({"data-state":yD(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))})),NG=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=ke(null),i=dm(n),l=pm(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),z("input",fe({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 yD(e){return e?"checked":"unchecked"}const DG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],bD="RadioGroup",[IG,rQ]=Sr(bD,[fc,gD]),wD=fc(),xD=gD(),[kG,MG]=IG(bD),LG=_e(((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,p=wD(n),h=Gd(s),[m,v]=Vo({prop:a,defaultProp:o,onChange:d});return z(kG,{scope:n,name:r,required:i,disabled:l,value:m,onValueChange:v},z(W_,fe({asChild:!0},p,{orientation:u,dir:h,loop:c}),z(it.div,fe({role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":l?"":void 0,dir:h},f,{ref:t}))))})),jG="RadioGroupItem",FG=_e(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=MG(jG,n),i=a.disabled||r,l=wD(n),u=xD(n),s=ke(null),c=Rt(t,s),d=a.value===o.value,f=ke(!1);return We((()=>{const e=e=>{DG.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)}}),[]),z(U_,fe({asChild:!0},l,{focusable:!i,active:d}),z(TG,fe({disabled:i,required:a.required,checked:d},u,o,{name:a.name,ref:c,onCheck:()=>a.onValueChange(o.value),onKeyDown:ze((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:ze(o.onFocus,(()=>{var e;f.current&&(null===(e=s.current)||void 0===e||e.click())}))})))})),BG=_e(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=xD(n);return z(AG,fe({},o,r,{ref:t}))})),_D=LG,$D=FG,qG=BG,zG=P.forwardRef((({className:e,...t},n)=>k.jsx(_D,{className:se("grid gap-2",e),...t,ref:n})));zG.displayName=_D.displayName;const WG=P.forwardRef((({className:e,...t},n)=>k.jsx($D,{ref:n,className:se("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:k.jsx(qG,{className:"flex items-center justify-center",children:k.jsx(DM,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));WG.displayName=$D.displayName;const UG=Xv,oQ=Hx,iQ=ic,HG=Qv,SD=P.forwardRef((({className:e,...t},n)=>k.jsx(rc,{className:se("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})));SD.displayName=rc.displayName;const VG=Ji("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"}}),CD=P.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},a)=>k.jsxs(HG,{children:[k.jsx(SD,{className:se("bg-slate-900/70",n)}),k.jsxs(oc,{ref:a,className:se(VG({side:e}),t),...o,children:[r,k.jsxs(ic,{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:[k.jsx(Ix,{className:"h-4 w-4"}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));CD.displayName=oc.displayName;const ED=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});ED.displayName="SheetHeader";const GG=({className:e,...t})=>k.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});GG.displayName="SheetFooter";const PD=P.forwardRef((({className:e,...t},n)=>k.jsx(jd,{ref:n,className:se("text-lg font-semibold text-foreground",e),...t})));PD.displayName=jd.displayName;const RD=P.forwardRef((({className:e,...t},n)=>k.jsx(Fd,{ref:n,className:se("text-sm text-muted-foreground",e),...t})));RD.displayName=Fd.displayName;const[Tm,aQ]=Sr("Tooltip",[cc]),a$=cc(),KG="TooltipProvider",YG=700,Ax="tooltip.open",[XG,s$]=Tm(KG),TD=e=>{const{__scopeTooltip:t,delayDuration:n=YG,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,l]=tt(!0),u=ke(!1),s=ke(0);return We((()=>{const e=s.current;return()=>window.clearTimeout(e)}),[]),z(XG,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:lt((()=>{window.clearTimeout(s.current),l(!1)}),[]),onClose:lt((()=>{window.clearTimeout(s.current),s.current=window.setTimeout((()=>l(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:lt((e=>{u.current=e}),[]),disableHoverableContent:o},a)},l$="Tooltip",[QG,Om]=Tm(l$),OD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,u=s$(l$,e.__scopeTooltip),s=a$(t),[c,d]=tt(null),f=lo(),p=ke(0),h=i??u.disableHoverableContent,m=l??u.delayDuration,v=ke(!1),[g=!1,y]=Vo({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ax))):u.onClose(),null==a||a(e)}}),b=Ur((()=>g?v.current?"delayed-open":"instant-open":"closed"),[g]),w=lt((()=>{window.clearTimeout(p.current),v.current=!1,y(!0)}),[y]),x=lt((()=>{window.clearTimeout(p.current),y(!1)}),[y]),_=lt((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{v.current=!0,y(!0)}),m)}),[m,y]);return We((()=>()=>window.clearTimeout(p.current)),[]),z(wm,s,z(QG,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:c,onTriggerChange:d,onTriggerEnter:lt((()=>{u.isOpenDelayed?_():w()}),[u.isOpenDelayed,_,w]),onTriggerLeave:lt((()=>{h?x():window.clearTimeout(p.current)}),[x,h]),onOpen:w,onClose:x,disableHoverableContent:h},n))},bR="TooltipTrigger",AD=_e(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Om(bR,n),a=s$(bR,n),i=a$(n),l=Rt(t,ke(null),o.onTriggerChange),u=ke(!1),s=ke(!1),c=lt((()=>u.current=!1),[]);return We((()=>()=>document.removeEventListener("pointerup",c)),[c]),z(B_,fe({asChild:!0},i),z(it.button,fe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:l,onPointerMove:ze(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!s.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),s.current=!0)})),onPointerLeave:ze(e.onPointerLeave,(()=>{o.onTriggerLeave(),s.current=!1})),onPointerDown:ze(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:ze(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:ze(e.onBlur,o.onClose),onClick:ze(e.onClick,o.onClose)})))})),ZG="TooltipPortal",[sQ,JG]=Tm(ZG,{forceMount:void 0}),Md="TooltipContent",ND=_e(((e,t)=>{const n=JG(Md,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Om(Md,e.__scopeTooltip);return z(Ao,{present:r||i.open},i.disableHoverableContent?z(DD,fe({side:o},a,{ref:t})):z(eK,fe({side:o},a,{ref:t})))})),eK=_e(((e,t)=>{const n=Om(Md,e.__scopeTooltip),r=s$(Md,e.__scopeTooltip),o=ke(null),a=Rt(t,o),[i,l]=tt(null),{trigger:u,onClose:s}=n,c=o.current,{onPointerInTransitChange:d}=r,f=lt((()=>{l(null),d(!1)}),[d]),p=lt(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=aK([...rK(r,nK(r,n.getBoundingClientRect())),...oK(t.getBoundingClientRect())]);l(o),d(!0)}),[d]);return We((()=>()=>f()),[f]),We((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),We((()=>{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=!iK(n,i);r?f():o&&(f(),s())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,i,s,f]),z(DD,fe({},e,{ref:a}))})),[tK,lQ]=Tm(l$,{isInside:!1}),DD=_e(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,u=Om(Md,n),s=a$(n),{onClose:c}=u;return We((()=>(document.addEventListener(Ax,c),()=>document.removeEventListener(Ax,c))),[c]),We((()=>{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]),z(Vv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:c},z(q_,fe({"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)"}}),z(jx,null,r),z(tK,{scope:n,isInside:!0},z(TU,{id:u.contentId,role:"tooltip"},o||r))))}));function nK(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 rK(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 oK(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 iK(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 aK(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)),sK(t)}function sK(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 lK=TD,uK=OD,cK=AD,ID=ND,kD=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},fK=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)},dK=e=>fK(e)&&"type"in e&&"string"==typeof e.type,Ct=e=>{const t=t=>({type:e,payload:t});return t.toString=()=>`${e}`,t.type=e,t.match=t=>dK(t)&&t.type===e,t};Ct("remoteReady"),Ct("reselectUser"),Ct("requestLogin"),Ct("requestLogout"),Ct("setConfirmLeavePage"),Ct("requestChangePath"),Ct("wsSubscribe"),Ct("wsUnSubscribe"),Ct("hostStoreConnect"),Ct("remoteLogin"),Ct("remoteLogout"),Ct("wsOnMessage"),Ct("setRouterPath");const MD=Ct("setDeviceType");Ct("setUserError"),Ct("setUserIsError"),Ct("setUserPending"),Ct("setUserSuccess"),Ct("setUserData"),Ct("updateAccountData"),Ct("updateUser"),Ct("addNotification"),Ct("markNotification"),Ct("setNotificationsError"),Ct("setNotificationsList"),Ct("setNotificationsPending"),Ct("setNotificationsTotalCount"),Ct("setNotificationsUnreadCount"),Ct("resetNotificationsState"),Ct("undoNotification"),Ct("setInstanceInfo"),Ct("setInstanceInfoPending"),Ct("setInstanceInfoError"),Ct("setPlatformSettings"),Ct("setProfileSettings"),Ct("setGroupData"),Ct("setGroupLoading"),Ct("showGroupBasicInfo"),fT("requestMicroFrontendFetch"),fT("sendMicroFrontendFetchResponse");const pK={deviceType:kD()},Am=hM({name:"ui",initialState:pK,reducers:{},extraReducers:e=>{e.addCase(MD,((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 ow,wR,iw,xR,aw,_R,sw,$R,lw,SR,uw,CR,cw,ER,fw,PR,dw,RR,pw,TR,hw,OR,vw,AR,mw,NR,gw,DR,yw,IR,bw,kR,ww,MR,xw,LR,_w,jR,$w,FR,Sw,BR,Cw,qR,Ew,zR,Pw,WR,Rw,UR,Tw,HR,Ow,VR,Aw,GR,Nw,KR,Dw,YR,Iw,XR,kw,QR,Mw,ZR,Lw,JR,jw,eT,Fw,tT,Bw,nT,qw,rT,zw,oT,Ww,iT,Uw,aT;function LD(){if(wR)return ow;wR=1;var e=KO(),t=e&&new e;return ow=t}function jD(){if(xR)return iw;xR=1;var e=Hd(),t=LD();return iw=t?function(e,n){return t.set(e,n),e}:e}function Nm(){if(_R)return aw;_R=1;var e=fm(),t=No();return aw=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}},aw}function hK(){if($R)return sw;$R=1;var e=Nm(),t=Er();return sw=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)}},sw}function FD(){if(SR)return lw;SR=1;var e=Math.max;return lw=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 BD(){if(CR)return uw;CR=1;var e=Math.max;return uw=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 h=a;++s<c;)f[h+s]=n[s];for(;++l<u;)(p||a<i)&&(f[h+r[l]]=t[a++]);return f}}function vK(){if(ER)return cw;return ER=1,cw=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function u$(){if(PR)return fw;return PR=1,fw=function(){}}function c$(){if(RR)return dw;RR=1;var e=fm(),t=u$();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,dw=n}function qD(){if(TR)return pw;TR=1;var e=LD(),t=JO();return pw=e?function(t){return e.get(t)}:t}function mK(){if(OR)return hw;OR=1;return hw={}}function gK(){if(AR)return vw;AR=1;var e=mK(),t=Object.prototype.hasOwnProperty;return vw=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 zD(){if(NR)return mw;NR=1;var e=fm(),t=u$();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,mw=n}function yK(){if(DR)return gw;DR=1;var e=c$(),t=zD(),n=cm();return gw=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 bK(){if(IR)return yw;IR=1;var e=c$(),t=zD(),n=u$(),r=Cr(),o=fo(),a=yK(),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,yw=l}function wK(){if(kR)return bw;kR=1;var e=c$(),t=qD(),n=gK(),r=bK();return bw=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 WD(){if(MR)return ww;MR=1;var e=jD(),t=aA()(e);return ww=t}function xK(){if(LR)return xw;LR=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return xw=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function _K(){if(jR)return _w;jR=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return _w=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 $K(){if(FR)return $w;FR=1;var e=__(),t=ZO(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return $w=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function UD(){if(BR)return Sw;BR=1;var e=xK(),t=_K(),n=y_(),r=$K();return Sw=function(o,a,i){var l=a+"";return n(o,t(l,r(e(l),i)))}}function HD(){if(qR)return Cw;qR=1;var e=wK(),t=WD(),n=UD();return Cw=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 h=[r,o,l,p?u:void 0,p?s:void 0,p?void 0:u,p?void 0:s,c,d,f],m=a.apply(void 0,h);return e(r)&&t(m,h),m.placeholder=i,n(m,r,o)}}function VD(){if(zR)return Ew;return zR=1,Ew=function(e){return e.placeholder}}function SK(){if(WR)return Pw;WR=1;var e=cm(),t=am(),n=Math.min;return Pw=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 f$(){if(UR)return Rw;UR=1;var e="__lodash_placeholder__";return Rw=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 GD(){if(HR)return Tw;HR=1;var e=FD(),t=BD(),n=vK(),r=Nm(),o=HD(),a=VD(),i=SK(),l=f$(),u=Er();return Tw=function s(c,d,f,p,h,m,v,g,y,b){var w=128&d,x=1&d,_=2&d,k=24&d,P=512&d,S=_?void 0:r(c);return function C(){for(var E=arguments.length,N=Array(E),O=E;O--;)N[O]=arguments[O];if(k)var T=a(C),R=n(N,T);if(p&&(N=e(N,p,h,k)),m&&(N=t(N,m,v,k)),E-=R,k&&E<b){var j=l(N,T);return o(c,d,s,C.placeholder,f,N,j,g,y,b-E)}var D=x?f:this,z=_?D[c]:c;return E=N.length,g?N=i(N,g):P&&E>1&&N.reverse(),w&&y<E&&(N.length=y),this&&this!==u&&this instanceof C&&(z=S||r(z)),z.apply(D,N)}},Tw}function CK(){if(VR)return Ow;VR=1;var e=g_(),t=Nm(),n=GD(),r=HD(),o=VD(),a=f$(),i=Er();return Ow=function(l,u,s){var c=t(l);return function t(){for(var d=arguments.length,f=Array(d),p=d,h=o(t);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:a(f,h);return(d-=m.length)<s?r(l,u,n,t.placeholder,void 0,f,m,void 0,void 0,s-d):e(this&&this!==i&&this instanceof t?c:l,this,f)}},Ow}function EK(){if(GR)return Aw;GR=1;var e=g_(),t=Nm(),n=Er();return Aw=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)}},Aw}function PK(){if(KR)return Nw;KR=1;var e=FD(),t=BD(),n=f$(),r="__lodash_placeholder__",o=128,a=Math.min;return Nw=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 h=i[3];i[3]=h?e(h,p,l[4]):p,i[4]=h?n(i[3],r):l[4]}return(p=l[5])&&(h=i[5],i[5]=h?t(h,p,l[6]):p,i[6]=h?n(i[5],r):l[6]),(p=l[7])&&(i[7]=p),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 d$(){if(YR)return Dw;YR=1;var e=jD(),t=hK(),n=CK(),r=GD(),o=EK(),a=qD(),i=PK(),l=WD(),u=UD(),s=hA(),c=Math.max;return Dw=function(d,f,p,h,m,v,g,y){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=h?h.length:0;if(w||(f&=-97,h=m=void 0),g=void 0===g?g:c(s(g),0),y=void 0===y?y:s(y),w-=m?m.length:0,64&f){var x=h,_=m;h=m=void 0}var k=b?void 0:a(d),P=[d,f,p,h,m,x,_,v,g,y];if(k&&i(P,k),d=P[0],f=P[1],p=P[2],h=P[3],m=P[4],!(y=P[9]=void 0===P[9]?b?0:d.length:c(P[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)S=8==f||16==f?n(d,f,y):32!=f&&33!=f||m.length?r.apply(void 0,P):o(d,f,p,h);else var S=t(d,f,p);return u((k?e:l)(S,P),d,f)}}function RK(){if(XR)return Iw;XR=1;var e=d$();return Iw=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 TK(){if(QR)return kw;QR=1;var e=yA();return kw=function(t){return e(t,4)}}function OK(){if(ZR)return Mw;ZR=1;var e=d$();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={},Mw=t}function AK(){if(JR)return Lw;JR=1;var e=ta(),t=fo(),n=xj();return Lw=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 NK(){if(eT)return jw;eT=1;var e=Ud(),t=fo();return jw=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function DK(){if(tT)return Fw;tT=1;var e=yA(),t=v_();return Fw=function(n){return t("function"==typeof n?n:e(n,1))}}function IK(){if(nT)return Bw;nT=1;var e=d$(),t=zj(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return Bw=n}function kK(){if(rT)return qw;rT=1;var e=t_(),t=cm(),n=Cr(),r=sc(),o=yO(),a=qd(),i=n_();return qw=function(l){return n(l)?e(l,a):r(l)?[l]:t(o(i(l)))}}function MK(){return oT||(oT=1,zw={ary:RK(),assign:mA(),clone:TK(),curry:OK(),forEach:__(),isArray:Cr(),isError:AK(),isFunction:Jv(),isWeakMap:NK(),iteratee:DK(),keys:HO(),rearg:IK(),toInteger:hA(),toPath:kK()}),zw}function LK(){if(iT)return Ww;iT=1;var e=pT(),t=MK();return Ww=function(n,r,o){return e(t,n,r,o)}}function jK(){if(aT)return Uw;aT=1;var e=LK()("debounce",dA());return e.placeholder=dT(),Uw=e}var FK=jK();const BK=Oo(FK);function sT(e,t,n=window){const r=ke(t);We((()=>{r.current=t}),[t]),We((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}const qK=e=>{const t=BK(150)(e);sT("resize",t),sT("orientationchange",t)},uQ=()=>{const e=vM();qK((()=>{const t=kD();e(MD(t))}))},cQ=()=>Uv(Am.selectors.selectDeviceType),zK=()=>Uv(Am.selectors.selectIsMobile),fQ=()=>Uv(Am.selectors.selectIsTablet),dQ=()=>Uv(Am.selectors.selectIsDesktop);function lT({className:e,...t}){return k.jsx("div",{className:se("animate-pulse rounded-md bg-muted",e),...t})}const WK="sidebar_state",UK=604800,HK="12rem",VK="18rem",GK="2rem",KK="b",KD=P.createContext(null);function Dm(){const e=P.useContext(KD);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const YK=P.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...i},l)=>{const u=zK(),[s,c]=P.useState(!1),[d,f]=P.useState(e),p=t??d,h=P.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${WK}=${t}; path=/; max-age=${UK}`}),[n,p]),m=P.useCallback((()=>u?c((e=>!e)):h((e=>!e))),[u,h,c]);P.useEffect((()=>{const e=e=>{e.key===KK&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[m]);const v=p?"expanded":"collapsed",g=P.useMemo((()=>({state:v,open:p,setOpen:h,isMobile:u,openMobile:s,setOpenMobile:c,toggleSidebar:m})),[v,p,h,u,s,c,m]);return k.jsx(KD.Provider,{value:g,children:k.jsx(TD,{delayDuration:0,children:k.jsx("div",{style:{"--sidebar-width":HK,"--sidebar-width-icon":GK,...o},className:se("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...i,children:a})})})}));YK.displayName="SidebarProvider";const XK=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}=Dm();return"none"===n?k.jsx("div",{className:se("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...a,children:o}):l?k.jsx(UG,{open:s,onOpenChange:c,children:k.jsxs(CD,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":VK},side:e,children:[k.jsxs(ED,{className:"sr-only",children:[k.jsx(PD,{children:"Sidebar"}),k.jsx(RD,{children:"Displays the mobile sidebar."})]}),k.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):k.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:[k.jsx("div",{className:se("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]")}),k.jsx("div",{className:se("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:k.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})})]})}));XK.displayName="Sidebar";const QK=P.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:a}=Dm();return k.jsx(Ld,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:se("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),o()},...n,children:a?k.jsx(zM,{size:16}):k.jsx(BM,{size:16})})}));QK.displayName="SidebarTrigger";const ZK=P.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Dm();return k.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:se("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})}));ZK.displayName="SidebarRail";const JK=P.forwardRef((({className:e,...t},n)=>k.jsx("main",{ref:n,className:se("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})));JK.displayName="SidebarInset";const eY=P.forwardRef((({className:e,...t},n)=>k.jsx(uD,{ref:n,"data-sidebar":"input",className:se("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));eY.displayName="SidebarInput";const tY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"header",className:se("flex flex-col gap-2 p-2",e),...t})));tY.displayName="SidebarHeader";const nY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"footer",className:se("flex flex-col gap-2 p-2",e),...t})));nY.displayName="SidebarFooter";const rY=P.forwardRef((({className:e,...t},n)=>k.jsx(Y_,{ref:n,"data-sidebar":"separator",className:se("mx-2 w-auto bg-sidebar-border",e),...t})));rY.displayName="SidebarSeparator";const oY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"content",className:se("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));oY.displayName="SidebarContent";const iY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group",className:se("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));iY.displayName="SidebarGroup";const aY=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?os:"div";return k.jsx(o,{ref:r,"data-sidebar":"group-label",className:se("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})}));aY.displayName="SidebarGroupLabel";const sY=P.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?os:"button";return k.jsx(o,{ref:r,"data-sidebar":"group-action",className:se("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})}));sY.displayName="SidebarGroupAction";const lY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"group-content",className:se("w-full text-sm",e),...t})));lY.displayName="SidebarGroupContent";const uY=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu",className:se("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));uY.displayName="SidebarMenu";const cY=P.forwardRef((({className:e,...t},n)=>k.jsx("li",{ref:n,"data-sidebar":"menu-item",className:se("group/menu-item relative",e),...t})));cY.displayName="SidebarMenuItem";const fY=Ji("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"}}),dY=P.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...i},l)=>{const u=e?os:"button",{isMobile:s,state:c}=Dm(),d=k.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:se(fY({variant:n,size:r}),a),...i});return o?("string"==typeof o&&(o={children:o}),k.jsxs(OD,{children:[k.jsx(AD,{asChild:!0,children:d}),k.jsx(ND,{side:"right",align:"center",hidden:"collapsed"!==c||s,...o})]})):d}));dY.displayName="SidebarMenuButton";const pY=P.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?os:"button";return k.jsx(a,{ref:o,"data-sidebar":"menu-action",className:se("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})}));pY.displayName="SidebarMenuAction";const hY=P.forwardRef((({className:e,...t},n)=>k.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:se("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})));hY.displayName="SidebarMenuBadge";const vY=P.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=P.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return k.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:se("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&k.jsx(lT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),k.jsx(lT,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));vY.displayName="SidebarMenuSkeleton";const mY=P.forwardRef((({className:e,...t},n)=>k.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:se("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));mY.displayName="SidebarMenuSub";const gY=P.forwardRef((({...e},t)=>k.jsx("li",{ref:t,...e})));gY.displayName="SidebarMenuSubItem";const yY=P.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const i=e?os:"a";return k.jsx(i,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:se("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})}));yY.displayName="SidebarMenuSubButton";const YD="Switch",[bY,pQ]=Sr(YD),[wY,xY]=bY(YD),_Y=_e(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:u="on",onCheckedChange:s,...c}=e,[d,f]=tt(null),p=Rt(t,(e=>f(e))),h=ke(!1),m=!d||!!d.closest("form"),[v=!1,g]=Vo({prop:o,defaultProp:a,onChange:s});return z(wY,{scope:n,checked:v,disabled:l},z(it.button,fe({type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":XD(v),"data-disabled":l?"":void 0,disabled:l,value:u},c,{ref:p,onClick:ze(e.onClick,(e=>{g((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&z(CY,{control:d,bubbles:!h.current,name:r,value:u,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),$Y="SwitchThumb",SY=_e(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=xY($Y,n);return z(it.span,fe({"data-state":XD(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),CY=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=ke(null),i=dm(n),l=pm(t);return We((()=>{const e=a.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),z("input",fe({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 XD(e){return e?"checked":"unchecked"}const QD=_Y,EY=SY,PY=P.forwardRef((({className:e,...t},n)=>k.jsx(QD,{className:se("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:k.jsx(EY,{className:se("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})})})));PY.displayName=QD.displayName;const ZD="Tabs",[RY,hQ]=Sr(ZD,[fc]),JD=fc(),[TY,p$]=RY(ZD),OY=_e(((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:u="automatic",...s}=e,c=Gd(l),[d,f]=Vo({prop:r,onChange:o,defaultProp:a});return z(TY,{scope:n,baseId:lo(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:u},z(it.div,fe({dir:c,"data-orientation":i},s,{ref:t})))})),AY="TabsList",NY=_e(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=p$(AY,n),i=JD(n);return z(W_,fe({asChild:!0},i,{orientation:a.orientation,dir:a.dir,loop:r}),z(it.div,fe({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))})),DY="TabsTrigger",IY=_e(((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=p$(DY,n),l=JD(n),u=eI(i.baseId,r),s=tI(i.baseId,r),c=r===i.value;return z(U_,fe({asChild:!0},l,{focusable:!o,active:c}),z(it.button,fe({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:ze(e.onMouseDown,(e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:ze(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:ze(e.onFocus,(()=>{const e="manual"!==i.activationMode;!c&&!o&&e&&i.onValueChange(r)}))})))})),kY="TabsContent",MY=_e(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=p$(kY,n),u=eI(l.baseId,r),s=tI(l.baseId,r),c=r===l.value,d=ke(c);return We((()=>{const e=requestAnimationFrame((()=>d.current=!1));return()=>cancelAnimationFrame(e)}),[]),z(Ao,{present:o||c},(({present:n})=>z(it.div,fe({"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 eI(e,t){return`${e}-trigger-${t}`}function tI(e,t){return`${e}-content-${t}`}const LY=OY,nI=NY,rI=IY,oI=MY,vQ=LY,jY=P.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>k.jsx(nI,{ref:r,"data-testid":"tabsList",className:t?se("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));jY.displayName=nI.displayName;const FY=P.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},o)=>k.jsx(rI,{ref:o,className:t?se("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-blue_100","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:k.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));FY.displayName=rI.displayName;const BY=P.forwardRef((({className:e,...t},n)=>k.jsx(oI,{ref:n,className:se("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));BY.displayName=oI.displayName;const qY=P.forwardRef((({className:e,...t},n)=>k.jsx("table",{ref:n,className:se("w-full caption-bottom text-sm",e),...t})));qY.displayName="Table";const zY=P.forwardRef((({className:e,...t},n)=>k.jsx("thead",{ref:n,className:se("[&_tr]:border-b",e),...t})));zY.displayName="TableHeader";const WY=P.forwardRef((({className:e,...t},n)=>k.jsx("tbody",{ref:n,className:se("[&_tr:last-child]:border-0",e),...t})));WY.displayName="TableBody";const UY=P.forwardRef((({className:e,...t},n)=>k.jsx("tfoot",{ref:n,className:se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));UY.displayName="TableFooter";const HY=P.forwardRef((({className:e,...t},n)=>k.jsx("tr",{ref:n,className:se("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})));HY.displayName="TableRow";const VY=P.forwardRef((({className:e,...t},n)=>k.jsx("th",{ref:n,className:se("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})));VY.displayName="TableHead";const GY=P.forwardRef((({className:e,...t},n)=>k.jsx("td",{ref:n,className:se("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})));GY.displayName="TableCell";const KY=P.forwardRef((({className:e,...t},n)=>k.jsx("caption",{ref:n,className:se("mt-s text-sm text-muted-foreground",e),...t})));KY.displayName="TableCaption";const YY=(e,t)=>se("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),XY=P.forwardRef((({className:e,...t},n)=>{const{error:r}=as();return k.jsx("textarea",{className:YY(!!r,e),ref:n,...t})}));XY.displayName="Textarea";const mQ=lK,QY=uK,ZY=cK,JY=Ji("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"}}}),iI=P.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...o},a)=>k.jsx(ID,{ref:a,sideOffset:t,className:se(JY({size:n,theme:r,className:e})),...o})));iI.displayName=ID.displayName;const gQ=({children:e,tooltipText:t,triggerClassname:n,triggerProps:r,...o})=>k.jsxs(QY,{children:[k.jsx(ZY,{className:n,...r,children:e}),t&&k.jsx(iI,{...o,children:t})]}),yQ=({accept:e="*",multiple:t,handleUpload:n,disabled:r})=>k.jsx("div",{className:"hidden",children:k.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()}})}),bQ=({as:e="div",children:t,className:n,...r})=>z(e,{className:se(n),...r},t);function eX(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 tX(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 k.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}\``)}]},nX(r,...t)]}function nX(...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 aI(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 rX({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=oX({defaultProp:t,onChange:n}),a=void 0!==e,i=a?e:r,l=aI(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 oX({defaultProp:e,onChange:t}){const n=P.useState(e),[r]=n,o=P.useRef(r),a=aI(t);return P.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}var zv=null!=globalThis&&globalThis.document?P.useLayoutEffect:()=>{};function uT(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function sI(...e){return t=>{let n=!1;const r=e.map((e=>{const r=uT(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():uT(e[t],null)}}}}function lI(...e){return P.useCallback(sI(...e),e)}var uI=P.forwardRef(((e,t)=>{const{children:n,...r}=e,o=P.Children.toArray(n),a=o.find(aX);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 k.jsx(Nx,{...r,ref:t,children:P.isValidElement(e)?P.cloneElement(e,void 0,n):null})}return k.jsx(Nx,{...r,ref:t,children:n})}));uI.displayName="Slot";var Nx=P.forwardRef(((e,t)=>{const{children:n,...r}=e;if(P.isValidElement(n)){const e=lX(n),o=sX(r,n.props);return n.type!==P.Fragment&&(o.ref=t?sI(t,e):e),P.cloneElement(n,o)}return P.Children.count(n)>1?P.Children.only(null):null}));Nx.displayName="SlotClone";var iX=({children:e})=>k.jsx(k.Fragment,{children:e});function aX(e){return P.isValidElement(e)&&e.type===iX}function sX(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 lX(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 uX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],h$=uX.reduce(((e,t)=>{const n=P.forwardRef(((e,n)=>{const{asChild:r,...o}=e,a=r?uI:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(a,{...o,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function cX(e,t){return P.useReducer(((e,n)=>t[e][n]??e),e)}var cI=e=>{const{present:t,children:n}=e,r=fX(t),o="function"==typeof n?n({present:r.isPresent}):P.Children.only(n),a=lI(r.ref,dX(o));return"function"==typeof n||r.isPresent?P.cloneElement(o,{ref:a}):null};function fX(e){const[t,n]=P.useState(),r=P.useRef({}),o=P.useRef(e),a=P.useRef("none"),i=e?"mounted":"unmounted",[l,u]=cX(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect((()=>{const e=hv(r.current);a.current="mounted"===l?e:"none"}),[l]),zv((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=hv(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]),zv((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=hv(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=hv(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 hv(e){return(null==e?void 0:e.animationName)||"none"}function dX(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)}cI.displayName="Presence";var pX=P.useId||(()=>{}),hX=0;function vX(e){const[t,n]=P.useState(pX());return zv((()=>{e||n((e=>e??String(hX++)))}),[e]),e||(t?`radix-${t}`:"")}var v$="Collapsible",[mX,wQ]=tX(v$),[gX,m$]=mX(v$),fI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[u=!1,s]=rX({prop:r,defaultProp:o,onChange:i});return k.jsx(gX,{scope:n,disabled:a,contentId:vX(),open:u,onOpenToggle:P.useCallback((()=>s((e=>!e))),[s]),children:k.jsx(h$.div,{"data-state":y$(u),"data-disabled":a?"":void 0,...l,ref:t})})}));fI.displayName=v$;var dI="CollapsibleTrigger",pI=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=m$(dI,n);return k.jsx(h$.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":y$(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:eX(e.onClick,o.onOpenToggle)})}));pI.displayName=dI;var g$="CollapsibleContent",hI=P.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=m$(g$,e.__scopeCollapsible);return k.jsx(cI,{present:n||o.open,children:({present:e})=>k.jsx(yX,{...r,ref:t,present:e})})}));hI.displayName=g$;var yX=P.forwardRef(((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=m$(g$,n),[l,u]=P.useState(r),s=P.useRef(null),c=lI(t,s),d=P.useRef(0),f=d.current,p=P.useRef(0),h=p.current,m=i.open||l,v=P.useRef(m),g=P.useRef(void 0);return P.useEffect((()=>{const e=requestAnimationFrame((()=>v.current=!1));return()=>cancelAnimationFrame(e)}),[]),zv((()=>{const e=s.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,v.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),u(r)}}),[i.open,r]),k.jsx(h$.div,{"data-state":y$(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&o})}));function y$(e){return e?"open":"closed"}var bX=fI;const xQ=bX,_Q=pI,$Q=hI;export{PX as AlertDialog,$8 as AlertDialogAction,S8 as AlertDialogCancel,y8 as AlertDialogContent,_8 as AlertDialogDescription,w8 as AlertDialogFooter,b8 as AlertDialogHeader,tO as AlertDialogOverlay,g8 as AlertDialogPortal,x8 as AlertDialogTitle,RX as AlertDialogTrigger,sO as Avatar,uO as AvatarFallback,lO as AvatarImage,Ld as Button,SX as ButtonLoader,D8 as Card,L8 as CardContent,M8 as CardDescription,j8 as CardFooter,I8 as CardHeader,k8 as CardTitle,b5 as Carousel,w5 as CarouselContent,x5 as CarouselItem,$5 as CarouselNext,_5 as CarouselPrevious,Uj as ChartContainer,AX as ChartLegend,Gj as ChartLegendContent,Hj as ChartStyle,OX as ChartTooltip,Vj as ChartTooltipContent,C_ as Checkbox,C2 as ChipsItem,Kj as ChipsWrapper,xQ as Collapsible,$Q as CollapsibleContent,_Q as CollapsibleTrigger,IA as Command,kX as CommandDialog,LF as CommandEmpty,jF as CommandGroup,kF as CommandInput,BF as CommandItem,MF as CommandList,FF as CommandSeparator,qF as CommandShortcut,RF as Dialog,IX as DialogClose,NA as DialogContent,IF as DialogDescription,DA as DialogFooter,NF as DialogHeader,AA as DialogOverlay,TF as DialogPortal,DF as DialogTitle,DX as DialogTrigger,Sq as Drawer,FX as DrawerClose,Eq as DrawerContent,Oq as DrawerDescription,Rq as DrawerFooter,Pq as DrawerHeader,$N as DrawerOverlay,Cq as DrawerPortal,Tq as DrawerTitle,jX as DrawerTrigger,zX as DropdownMenu,_U as DropdownMenuCheckboxItem,wU as DropdownMenuContent,UX as DropdownMenuGroup,xU as DropdownMenuItem,SU as DropdownMenuLabel,HX as DropdownMenuPortal,GX as DropdownMenuRadioGroup,$U as DropdownMenuRadioItem,CU as DropdownMenuSeparator,EU as DropdownMenuShortcut,VX as DropdownMenuSub,bU as DropdownMenuSubContent,yU as DropdownMenuSubTrigger,WX as DropdownMenuTrigger,YX as Form,SH as FormControl,CH as FormDescription,XX as FormField,_H as FormItem,$H as FormLabel,EH as FormMessage,PH as FormSelect,TH as FormSelectContent,AH as FormSelectGroup,OH as FormSelectItem,NH as FormSelectLabel,DH as FormSelectSeparator,RH as FormSelectTrigger,IH as FormSelectValue,JX as HoverCard,sG as HoverCardContent,tQ as HoverCardPortal,eQ as HoverCardTrigger,uD as Input,yQ as InputFile,p3 as Label,CG as Progress,zG as RadioGroup,WG as RadioGroupItem,N3 as Select,wH as SelectActions,gH as SelectCheckboxItem,M3 as SelectContent,xH as SelectFooter,D3 as SelectGroup,j3 as SelectItem,L3 as SelectLabel,mH as SelectMultiTrigger,bH as SelectScrollDownButton,yH as SelectScrollUpButton,F3 as SelectSeparator,k3 as SelectTrigger,I3 as SelectValue,UG as Sheet,iQ as SheetClose,CD as SheetContent,RD as SheetDescription,GG as SheetFooter,ED as SheetHeader,SD as SheetOverlay,HG as SheetPortal,PD as SheetTitle,oQ as SheetTrigger,XK as Sidebar,oY as SidebarContent,nY as SidebarFooter,iY as SidebarGroup,sY as SidebarGroupAction,lY as SidebarGroupContent,aY as SidebarGroupLabel,tY as SidebarHeader,eY as SidebarInput,JK as SidebarInset,uY as SidebarMenu,pY as SidebarMenuAction,hY as SidebarMenuBadge,dY as SidebarMenuButton,cY as SidebarMenuItem,vY as SidebarMenuSkeleton,mY as SidebarMenuSub,yY as SidebarMenuSubButton,gY as SidebarMenuSubItem,YK as SidebarProvider,ZK as SidebarRail,rY as SidebarSeparator,QK as SidebarTrigger,lT as Skeleton,PY as Switch,qY as Table,WY as TableBody,KY as TableCaption,GY as TableCell,UY as TableFooter,VY as TableHead,zY as TableHeader,HY as TableRow,vQ as Tabs,BY as TabsContent,jY as TabsList,FY as TabsTrigger,XY as Textarea,QY as Tooltip,iI as TooltipContent,mQ as TooltipProvider,ZY as TooltipTrigger,gQ as TooltipWrapper,Mx as buttonVariants,se as cn,YY as getTextareaClassName,bQ as styledElement,Am as uiSlice,Zv as useCarousel,cQ as useDeviceType,uQ as useDeviceTypeUpdater,as as useFormField,dQ as useIsDesktop,zK as useIsMobile,fQ as useIsTablet,Dm as useSidebar};