randmarcomps 1.505.0 → 1.506.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/dist/randmarcomps.js +5 -4
- package/dist/randmarcomps.umd.cjs +1 -1
- package/dist/style.css +12 -2
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ For Tailwind CSS v4, you need to add the following directives to your CSS file t
|
|
|
25
25
|
@import "tailwindcss";
|
|
26
26
|
@plugin "tailwindcss-animate";
|
|
27
27
|
@custom-variant dark (&:is(.dark *));
|
|
28
|
-
@import "
|
|
28
|
+
@import "randmarcomps/style.css";
|
|
29
29
|
@source "../node_modules/randmarcomps/dist";
|
|
30
30
|
|
|
31
31
|
/* Rest of your CSS */
|
|
@@ -45,15 +45,19 @@ npm install react-router-dom@^7.3.0
|
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
|
48
|
-
### 1. Import the CSS
|
|
48
|
+
### 1. Import the CSS (recommended)
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Import `randmarcomps` styles from the same Tailwind-processed CSS entry file where you import Tailwind (so Tailwind v4 directives like `@theme` are processed):
|
|
51
51
|
|
|
52
|
-
```
|
|
53
|
-
|
|
52
|
+
```css
|
|
53
|
+
/* In your main CSS file (e.g., src/index.css) */
|
|
54
|
+
@import "tailwindcss";
|
|
55
|
+
@import "randmarcomps/style.css";
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
Avoid `../node_modules/randmarcomps/dist/...` paths; they bypass package exports and are more fragile across different package managers/layouts.
|
|
59
|
+
|
|
60
|
+
Note: some CSS minifiers/transformers may de-duplicate `backdrop-filter` declarations; `randmarcomps` defines overlay blur effects using `@supports` blocks to keep the correct behavior in production builds.
|
|
57
61
|
|
|
58
62
|
### 2. Import Components
|
|
59
63
|
|
package/dist/randmarcomps.js
CHANGED
|
@@ -9304,7 +9304,7 @@ function handleCrossReference(t, e, n) {
|
|
|
9304
9304
|
});
|
|
9305
9305
|
} else isDraftable(n) && t.callbacks_.push(function() {
|
|
9306
9306
|
const d = latest(t);
|
|
9307
|
-
get$3(d, e, t.type_) === n && o.drafts_.length > 1 && (t.assigned_.get(e) ?? !1) === !0 && t.copy_ && handleValue(
|
|
9307
|
+
t.type_ === 3 ? d.has(n) && handleValue(n, o.handledSet_, o) : get$3(d, e, t.type_) === n && o.drafts_.length > 1 && (t.assigned_.get(e) ?? !1) === !0 && t.copy_ && handleValue(
|
|
9308
9308
|
get$3(t.copy_, e, t.type_),
|
|
9309
9309
|
o.handledSet_,
|
|
9310
9310
|
o
|
|
@@ -9423,12 +9423,13 @@ var objectTraps = {
|
|
|
9423
9423
|
die(12);
|
|
9424
9424
|
}
|
|
9425
9425
|
}, arrayTraps = {};
|
|
9426
|
-
|
|
9426
|
+
for (let t in objectTraps) {
|
|
9427
|
+
let e = objectTraps[t];
|
|
9427
9428
|
arrayTraps[t] = function() {
|
|
9428
9429
|
const n = arguments;
|
|
9429
9430
|
return n[0] = n[0][0], e.apply(this, n);
|
|
9430
9431
|
};
|
|
9431
|
-
}
|
|
9432
|
+
}
|
|
9432
9433
|
arrayTraps.deleteProperty = function(t, e) {
|
|
9433
9434
|
return process.env.NODE_ENV !== "production" && isNaN(parseInt(e)) && die(13), arrayTraps.set.call(this, t, e, void 0);
|
|
9434
9435
|
};
|
|
@@ -9609,7 +9610,7 @@ function enablePatches() {
|
|
|
9609
9610
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
|
9610
9611
|
);
|
|
9611
9612
|
function e(A, M = []) {
|
|
9612
|
-
if (
|
|
9613
|
+
if (A.key_ !== void 0) {
|
|
9613
9614
|
const I = A.parent_.copy_ ?? A.parent_.base_, V = getProxyDraft(get$3(I, A.key_)), q = get$3(I, A.key_);
|
|
9614
9615
|
if (q === void 0 || q !== A.draft_ && q !== A.base_ && q !== A.copy_ || V != null && V.base_ !== A.base_)
|
|
9615
9616
|
return null;
|
|
@@ -516,7 +516,7 @@
|
|
|
516
516
|
|
|
517
517
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
518
518
|
|
|
519
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return React__namespace.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning$1=({contentRef:t,descriptionId:e})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var d;const l=(d=t.current)==null?void 0:d.getAttribute("aria-describedby");e&&l&&(document.getElementById(e)||console.warn(o))},[o,t,e]),null},Root$a=Dialog$1,Trigger$6=DialogTrigger$1,Portal$4=DialogPortal$1,Overlay=DialogOverlay$1,Content$3=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:t=!1,...e})=>jsxRuntime.jsx(Root$a,{modal:t,...e});Dialog.displayName=Root$a.displayName;const DialogTrigger=Trigger$6,DialogPortal=Portal$4,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(Overlay,{ref:n,className:cn("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",t),...e}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:t,children:e,animateExit:n=!0,overlayClassName:o,showOverlay:l,...d},f)=>jsxRuntime.jsxs(DialogPortal,{forceMount:d.forceMount,children:[o&&l?jsxRuntime.jsx("div",{"aria-hidden":"true",className:cn("fixed inset-0 z-[10000] pointer-events-none",o)}):null,jsxRuntime.jsx(DialogOverlay,{className:o}),jsxRuntime.jsxs(Content$3,{ref:f,className:cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n&&"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",o&&l&&"z-[10001]",t),...d,children:[e,jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(X$1,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$3.displayName;const DialogHeader=({className:t,...e})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:t,...e})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",t),...e}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",t),...e}));DialogDescription.displayName=Description$1.displayName;const sides=["top","right","bottom","left"],min$4=Math.min,max$4=Math.max,round$1=Math.round,floor=Math.floor,createCoords=t=>({x:t,y:t}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(t,e,n){return max$4(t,min$4(e,n))}function evaluate(t,e){return typeof t=="function"?t(e):t}function getSide$1(t){return t.split("-")[0]}function getAlignment(t){return t.split("-")[1]}function getOppositeAxis(t){return t==="x"?"y":"x"}function getAxisLength(t){return t==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(t){return yAxisSides.has(getSide$1(t))?"y":"x"}function getAlignmentAxis(t){return getOppositeAxis(getSideAxis(t))}function getAlignmentSides(t,e,n){n===void 0&&(n=!1);const o=getAlignment(t),l=getAlignmentAxis(t),d=getAxisLength(l);let f=l==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[d]>e.floating[d]&&(f=getOppositePlacement(f)),[f,getOppositePlacement(f)]}function getExpandedPlacements(t){const e=getOppositePlacement(t);return[getOppositeAlignmentPlacement(t),e,getOppositeAlignmentPlacement(e)]}function getOppositeAlignmentPlacement(t){return t.replace(/start|end/g,e=>oppositeAlignmentMap[e])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(t,e,n){switch(t){case"top":case"bottom":return n?e?rlPlacement:lrPlacement:e?lrPlacement:rlPlacement;case"left":case"right":return e?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(t,e,n,o){const l=getAlignment(t);let d=getSideList(getSide$1(t),n==="start",o);return l&&(d=d.map(f=>f+"-"+l),e&&(d=d.concat(d.map(getOppositeAlignmentPlacement)))),d}function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,e=>oppositeSideMap[e])}function expandPaddingObject(t){return{top:0,right:0,bottom:0,left:0,...t}}function getPaddingObject(t){return typeof t!="number"?expandPaddingObject(t):{top:t,right:t,bottom:t,left:t}}function rectToClientRect(t){const{x:e,y:n,width:o,height:l}=t;return{width:o,height:l,top:n,left:e,right:e+o,bottom:n+l,x:e,y:n}}function computeCoordsFromPlacement(t,e,n){let{reference:o,floating:l}=t;const d=getSideAxis(e),f=getAlignmentAxis(e),g=getAxisLength(f),b=getSide$1(e),_=d==="y",S=o.x+o.width/2-l.width/2,R=o.y+o.height/2-l.height/2,C=o[g]/2-l[g]/2;let E;switch(b){case"top":E={x:S,y:o.y-l.height};break;case"bottom":E={x:S,y:o.y+o.height};break;case"right":E={x:o.x+o.width,y:R};break;case"left":E={x:o.x-l.width,y:R};break;default:E={x:o.x,y:o.y}}switch(getAlignment(e)){case"start":E[f]-=C*(n&&_?-1:1);break;case"end":E[f]+=C*(n&&_?-1:1);break}return E}const computePosition$1=async(t,e,n)=>{const{placement:o="bottom",strategy:l="absolute",middleware:d=[],platform:f}=n,g=d.filter(Boolean),b=await(f.isRTL==null?void 0:f.isRTL(e));let _=await f.getElementRects({reference:t,floating:e,strategy:l}),{x:S,y:R}=computeCoordsFromPlacement(_,o,b),C=o,E={},A=0;for(let M=0;M<g.length;M++){const{name:I,fn:j}=g[M],{x:q,y:Q,data:te,reset:F}=await j({x:S,y:R,initialPlacement:o,placement:C,strategy:l,middlewareData:E,rects:_,platform:f,elements:{reference:t,floating:e}});S=q??S,R=Q??R,E={...E,[I]:{...E[I],...te}},F&&A<=50&&(A++,typeof F=="object"&&(F.placement&&(C=F.placement),F.rects&&(_=F.rects===!0?await f.getElementRects({reference:t,floating:e,strategy:l}):F.rects),{x:S,y:R}=computeCoordsFromPlacement(_,C,b)),M=-1)}return{x:S,y:R,placement:C,strategy:l,middlewareData:E}};async function detectOverflow(t,e){var n;e===void 0&&(e={});const{x:o,y:l,platform:d,rects:f,elements:g,strategy:b}=t,{boundary:_="clippingAncestors",rootBoundary:S="viewport",elementContext:R="floating",altBoundary:C=!1,padding:E=0}=evaluate(e,t),A=getPaddingObject(E),I=g[C?R==="floating"?"reference":"floating":R],j=rectToClientRect(await d.getClippingRect({element:(n=await(d.isElement==null?void 0:d.isElement(I)))==null||n?I:I.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(g.floating)),boundary:_,rootBoundary:S,strategy:b})),q=R==="floating"?{x:o,y:l,width:f.floating.width,height:f.floating.height}:f.reference,Q=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g.floating)),te=await(d.isElement==null?void 0:d.isElement(Q))?await(d.getScale==null?void 0:d.getScale(Q))||{x:1,y:1}:{x:1,y:1},F=rectToClientRect(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:q,offsetParent:Q,strategy:b}):q);return{top:(j.top-F.top+A.top)/te.y,bottom:(F.bottom-j.bottom+A.bottom)/te.y,left:(j.left-F.left+A.left)/te.x,right:(F.right-j.right+A.right)/te.x}}const arrow$4=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:l,rects:d,platform:f,elements:g,middlewareData:b}=e,{element:_,padding:S=0}=evaluate(t,e)||{};if(_==null)return{};const R=getPaddingObject(S),C={x:n,y:o},E=getAlignmentAxis(l),A=getAxisLength(E),M=await f.getDimensions(_),I=E==="y",j=I?"top":"left",q=I?"bottom":"right",Q=I?"clientHeight":"clientWidth",te=d.reference[A]+d.reference[E]-C[E]-d.floating[A],F=C[E]-d.reference[E],V=await(f.getOffsetParent==null?void 0:f.getOffsetParent(_));let ne=V?V[Q]:0;(!ne||!await(f.isElement==null?void 0:f.isElement(V)))&&(ne=g.floating[Q]||d.floating[A]);const ae=te/2-F/2,se=ne/2-M[A]/2-1,$e=min$4(R[j],se),Ne=min$4(R[q],se),oe=$e,Oe=ne-M[A]-Ne,Ae=ne/2-M[A]/2+ae,je=clamp$1(oe,Ae,Oe),Be=!b.arrow&&getAlignment(l)!=null&&Ae!==je&&d.reference[A]/2-(Ae<oe?$e:Ne)-M[A]/2<0,qe=Be?Ae<oe?Ae-oe:Ae-Oe:0;return{[E]:C[E]+qe,data:{[E]:je,centerOffset:Ae-je-qe,...Be&&{alignmentOffset:qe}},reset:Be}}}),flip$2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:l,middlewareData:d,rects:f,initialPlacement:g,platform:b,elements:_}=e,{mainAxis:S=!0,crossAxis:R=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:M=!0,...I}=evaluate(t,e);if((n=d.arrow)!=null&&n.alignmentOffset)return{};const j=getSide$1(l),q=getSideAxis(g),Q=getSide$1(g)===g,te=await(b.isRTL==null?void 0:b.isRTL(_.floating)),F=C||(Q||!M?[getOppositePlacement(g)]:getExpandedPlacements(g)),V=A!=="none";!C&&V&&F.push(...getOppositeAxisPlacements(g,M,A,te));const ne=[g,...F],ae=await detectOverflow(e,I),se=[];let $e=((o=d.flip)==null?void 0:o.overflows)||[];if(S&&se.push(ae[j]),R){const Ae=getAlignmentSides(l,f,te);se.push(ae[Ae[0]],ae[Ae[1]])}if($e=[...$e,{placement:l,overflows:se}],!se.every(Ae=>Ae<=0)){var Ne,oe;const Ae=(((Ne=d.flip)==null?void 0:Ne.index)||0)+1,je=ne[Ae];if(je&&(!(R==="alignment"?q!==getSideAxis(je):!1)||$e.every(Ve=>getSideAxis(Ve.placement)===q?Ve.overflows[0]>0:!0)))return{data:{index:Ae,overflows:$e},reset:{placement:je}};let Be=(oe=$e.filter(qe=>qe.overflows[0]<=0).sort((qe,Ve)=>qe.overflows[1]-Ve.overflows[1])[0])==null?void 0:oe.placement;if(!Be)switch(E){case"bestFit":{var Oe;const qe=(Oe=$e.filter(Ve=>{if(V){const Le=getSideAxis(Ve.placement);return Le===q||Le==="y"}return!0}).map(Ve=>[Ve.placement,Ve.overflows.filter(Le=>Le>0).reduce((Le,Ue)=>Le+Ue,0)]).sort((Ve,Le)=>Ve[1]-Le[1])[0])==null?void 0:Oe[0];qe&&(Be=qe);break}case"initialPlacement":Be=g;break}if(l!==Be)return{reset:{placement:Be}}}return{}}}};function getSideOffsets(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function isAnySideFullyClipped(t){return sides.some(e=>t[e]>=0)}const hide$2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...l}=evaluate(t,e);switch(o){case"referenceHidden":{const d=await detectOverflow(e,{...l,elementContext:"reference"}),f=getSideOffsets(d,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:isAnySideFullyClipped(f)}}}case"escaped":{const d=await detectOverflow(e,{...l,altBoundary:!0}),f=getSideOffsets(d,n.floating);return{data:{escapedOffsets:f,escaped:isAnySideFullyClipped(f)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(t,e){const{placement:n,platform:o,elements:l}=t,d=await(o.isRTL==null?void 0:o.isRTL(l.floating)),f=getSide$1(n),g=getAlignment(n),b=getSideAxis(n)==="y",_=originSides.has(f)?-1:1,S=d&&b?-1:1,R=evaluate(e,t);let{mainAxis:C,crossAxis:E,alignmentAxis:A}=typeof R=="number"?{mainAxis:R,crossAxis:0,alignmentAxis:null}:{mainAxis:R.mainAxis||0,crossAxis:R.crossAxis||0,alignmentAxis:R.alignmentAxis};return g&&typeof A=="number"&&(E=g==="end"?A*-1:A),b?{x:E*S,y:C*_}:{x:C*_,y:E*S}}const offset$2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:l,y:d,placement:f,middlewareData:g}=e,b=await convertValueToCoords(e,t);return f===((n=g.offset)==null?void 0:n.placement)&&(o=g.arrow)!=null&&o.alignmentOffset?{}:{x:l+b.x,y:d+b.y,data:{...b,placement:f}}}}},shift$3=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:l}=e,{mainAxis:d=!0,crossAxis:f=!1,limiter:g={fn:I=>{let{x:j,y:q}=I;return{x:j,y:q}}},...b}=evaluate(t,e),_={x:n,y:o},S=await detectOverflow(e,b),R=getSideAxis(getSide$1(l)),C=getOppositeAxis(R);let E=_[C],A=_[R];if(d){const I=C==="y"?"top":"left",j=C==="y"?"bottom":"right",q=E+S[I],Q=E-S[j];E=clamp$1(q,E,Q)}if(f){const I=R==="y"?"top":"left",j=R==="y"?"bottom":"right",q=A+S[I],Q=A-S[j];A=clamp$1(q,A,Q)}const M=g.fn({...e,[C]:E,[R]:A});return{...M,data:{x:M.x-n,y:M.y-o,enabled:{[C]:d,[R]:f}}}}}},limitShift$2=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:l,rects:d,middlewareData:f}=e,{offset:g=0,mainAxis:b=!0,crossAxis:_=!0}=evaluate(t,e),S={x:n,y:o},R=getSideAxis(l),C=getOppositeAxis(R);let E=S[C],A=S[R];const M=evaluate(g,e),I=typeof M=="number"?{mainAxis:M,crossAxis:0}:{mainAxis:0,crossAxis:0,...M};if(b){const Q=C==="y"?"height":"width",te=d.reference[C]-d.floating[Q]+I.mainAxis,F=d.reference[C]+d.reference[Q]-I.mainAxis;E<te?E=te:E>F&&(E=F)}if(_){var j,q;const Q=C==="y"?"width":"height",te=originSides.has(getSide$1(l)),F=d.reference[R]-d.floating[Q]+(te&&((j=f.offset)==null?void 0:j[R])||0)+(te?0:I.crossAxis),V=d.reference[R]+d.reference[Q]+(te?0:((q=f.offset)==null?void 0:q[R])||0)-(te?I.crossAxis:0);A<F?A=F:A>V&&(A=V)}return{[C]:E,[R]:A}}}},size$2=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:l,rects:d,platform:f,elements:g}=e,{apply:b=()=>{},..._}=evaluate(t,e),S=await detectOverflow(e,_),R=getSide$1(l),C=getAlignment(l),E=getSideAxis(l)==="y",{width:A,height:M}=d.floating;let I,j;R==="top"||R==="bottom"?(I=R,j=C===(await(f.isRTL==null?void 0:f.isRTL(g.floating))?"start":"end")?"left":"right"):(j=R,I=C==="end"?"top":"bottom");const q=M-S.top-S.bottom,Q=A-S.left-S.right,te=min$4(M-S[I],q),F=min$4(A-S[j],Q),V=!e.middlewareData.shift;let ne=te,ae=F;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(ae=Q),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(ne=q),V&&!C){const $e=max$4(S.left,0),Ne=max$4(S.right,0),oe=max$4(S.top,0),Oe=max$4(S.bottom,0);E?ae=A-2*($e!==0||Ne!==0?$e+Ne:max$4(S.left,S.right)):ne=M-2*(oe!==0||Oe!==0?oe+Oe:max$4(S.top,S.bottom))}await b({...e,availableWidth:ae,availableHeight:ne});const se=await f.getDimensions(g.floating);return A!==se.width||M!==se.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(t){return isNode(t)?(t.nodeName||"").toLowerCase():"#document"}function getWindow(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function getDocumentElement(t){var e;return(e=(isNode(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function isNode(t){return hasWindow()?t instanceof Node||t instanceof getWindow(t).Node:!1}function isElement(t){return hasWindow()?t instanceof Element||t instanceof getWindow(t).Element:!1}function isHTMLElement$2(t){return hasWindow()?t instanceof HTMLElement||t instanceof getWindow(t).HTMLElement:!1}function isShadowRoot(t){return!hasWindow()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof getWindow(t).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(t){const{overflow:e,overflowX:n,overflowY:o,display:l}=getComputedStyle$1(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!invalidOverflowDisplayValues.has(l)}const tableElements=new Set(["table","td","th"]);function isTableElement(t){return tableElements.has(getNodeName(t))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(t){return topLayerSelectors.some(e=>{try{return t.matches(e)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(t){const e=isWebKit(),n=isElement(t)?getComputedStyle$1(t):t;return transformProperties.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||willChangeValues.some(o=>(n.willChange||"").includes(o))||containValues.some(o=>(n.contain||"").includes(o))}function getContainingBlock(t){let e=getParentNode(t);for(;isHTMLElement$2(e)&&!isLastTraversableNode(e);){if(isContainingBlock(e))return e;if(isTopLayer(e))return null;e=getParentNode(e)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(t){return lastTraversableNodeNames.has(getNodeName(t))}function getComputedStyle$1(t){return getWindow(t).getComputedStyle(t)}function getNodeScroll(t){return isElement(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function getParentNode(t){if(getNodeName(t)==="html")return t;const e=t.assignedSlot||t.parentNode||isShadowRoot(t)&&t.host||getDocumentElement(t);return isShadowRoot(e)?e.host:e}function getNearestOverflowAncestor(t){const e=getParentNode(t);return isLastTraversableNode(e)?t.ownerDocument?t.ownerDocument.body:t.body:isHTMLElement$2(e)&&isOverflowElement(e)?e:getNearestOverflowAncestor(e)}function getOverflowAncestors(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const l=getNearestOverflowAncestor(t),d=l===((o=t.ownerDocument)==null?void 0:o.body),f=getWindow(l);if(d){const g=getFrameElement(f);return e.concat(f,f.visualViewport||[],isOverflowElement(l)?l:[],g&&n?getOverflowAncestors(g):[])}return e.concat(l,getOverflowAncestors(l,[],n))}function getFrameElement(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function getCssDimensions(t){const e=getComputedStyle$1(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const l=isHTMLElement$2(t),d=l?t.offsetWidth:n,f=l?t.offsetHeight:o,g=round$1(n)!==d||round$1(o)!==f;return g&&(n=d,o=f),{width:n,height:o,$:g}}function unwrapElement(t){return isElement(t)?t:t.contextElement}function getScale(t){const e=unwrapElement(t);if(!isHTMLElement$2(e))return createCoords(1);const n=e.getBoundingClientRect(),{width:o,height:l,$:d}=getCssDimensions(e);let f=(d?round$1(n.width):n.width)/o,g=(d?round$1(n.height):n.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!g||!Number.isFinite(g))&&(g=1),{x:f,y:g}}const noOffsets=createCoords(0);function getVisualOffsets(t){const e=getWindow(t);return!isWebKit()||!e.visualViewport?noOffsets:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function shouldAddVisualOffsets(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==getWindow(t)?!1:e}function getBoundingClientRect(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const l=t.getBoundingClientRect(),d=unwrapElement(t);let f=createCoords(1);e&&(o?isElement(o)&&(f=getScale(o)):f=getScale(t));const g=shouldAddVisualOffsets(d,n,o)?getVisualOffsets(d):createCoords(0);let b=(l.left+g.x)/f.x,_=(l.top+g.y)/f.y,S=l.width/f.x,R=l.height/f.y;if(d){const C=getWindow(d),E=o&&isElement(o)?getWindow(o):o;let A=C,M=getFrameElement(A);for(;M&&o&&E!==A;){const I=getScale(M),j=M.getBoundingClientRect(),q=getComputedStyle$1(M),Q=j.left+(M.clientLeft+parseFloat(q.paddingLeft))*I.x,te=j.top+(M.clientTop+parseFloat(q.paddingTop))*I.y;b*=I.x,_*=I.y,S*=I.x,R*=I.y,b+=Q,_+=te,A=getWindow(M),M=getFrameElement(A)}}return rectToClientRect({width:S,height:R,x:b,y:_})}function getWindowScrollBarX(t,e){const n=getNodeScroll(t).scrollLeft;return e?e.left+n:getBoundingClientRect(getDocumentElement(t)).left+n}function getHTMLOffset(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-getWindowScrollBarX(t,n),l=n.top+e.scrollTop;return{x:o,y:l}}function convertOffsetParentRelativeRectToViewportRelativeRect(t){let{elements:e,rect:n,offsetParent:o,strategy:l}=t;const d=l==="fixed",f=getDocumentElement(o),g=e?isTopLayer(e.floating):!1;if(o===f||g&&d)return n;let b={scrollLeft:0,scrollTop:0},_=createCoords(1);const S=createCoords(0),R=isHTMLElement$2(o);if((R||!R&&!d)&&((getNodeName(o)!=="body"||isOverflowElement(f))&&(b=getNodeScroll(o)),isHTMLElement$2(o))){const E=getBoundingClientRect(o);_=getScale(o),S.x=E.x+o.clientLeft,S.y=E.y+o.clientTop}const C=f&&!R&&!d?getHTMLOffset(f,b):createCoords(0);return{width:n.width*_.x,height:n.height*_.y,x:n.x*_.x-b.scrollLeft*_.x+S.x+C.x,y:n.y*_.y-b.scrollTop*_.y+S.y+C.y}}function getClientRects(t){return Array.from(t.getClientRects())}function getDocumentRect(t){const e=getDocumentElement(t),n=getNodeScroll(t),o=t.ownerDocument.body,l=max$4(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),d=max$4(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let f=-n.scrollLeft+getWindowScrollBarX(t);const g=-n.scrollTop;return getComputedStyle$1(o).direction==="rtl"&&(f+=max$4(e.clientWidth,o.clientWidth)-l),{width:l,height:d,x:f,y:g}}const SCROLLBAR_MAX=25;function getViewportRect(t,e){const n=getWindow(t),o=getDocumentElement(t),l=n.visualViewport;let d=o.clientWidth,f=o.clientHeight,g=0,b=0;if(l){d=l.width,f=l.height;const S=isWebKit();(!S||S&&e==="fixed")&&(g=l.offsetLeft,b=l.offsetTop)}const _=getWindowScrollBarX(o);if(_<=0){const S=o.ownerDocument,R=S.body,C=getComputedStyle(R),E=S.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,A=Math.abs(o.clientWidth-R.clientWidth-E);A<=SCROLLBAR_MAX&&(d-=A)}else _<=SCROLLBAR_MAX&&(d+=_);return{width:d,height:f,x:g,y:b}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(t,e){const n=getBoundingClientRect(t,!0,e==="fixed"),o=n.top+t.clientTop,l=n.left+t.clientLeft,d=isHTMLElement$2(t)?getScale(t):createCoords(1),f=t.clientWidth*d.x,g=t.clientHeight*d.y,b=l*d.x,_=o*d.y;return{width:f,height:g,x:b,y:_}}function getClientRectFromClippingAncestor(t,e,n){let o;if(e==="viewport")o=getViewportRect(t,n);else if(e==="document")o=getDocumentRect(getDocumentElement(t));else if(isElement(e))o=getInnerBoundingClientRect(e,n);else{const l=getVisualOffsets(t);o={x:e.x-l.x,y:e.y-l.y,width:e.width,height:e.height}}return rectToClientRect(o)}function hasFixedPositionAncestor(t,e){const n=getParentNode(t);return n===e||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,e)}function getClippingElementAncestors(t,e){const n=e.get(t);if(n)return n;let o=getOverflowAncestors(t,[],!1).filter(g=>isElement(g)&&getNodeName(g)!=="body"),l=null;const d=getComputedStyle$1(t).position==="fixed";let f=d?getParentNode(t):t;for(;isElement(f)&&!isLastTraversableNode(f);){const g=getComputedStyle$1(f),b=isContainingBlock(f);!b&&g.position==="fixed"&&(l=null),(d?!b&&!l:!b&&g.position==="static"&&!!l&&absoluteOrFixed.has(l.position)||isOverflowElement(f)&&!b&&hasFixedPositionAncestor(t,f))?o=o.filter(S=>S!==f):l=g,f=getParentNode(f)}return e.set(t,o),o}function getClippingRect(t){let{element:e,boundary:n,rootBoundary:o,strategy:l}=t;const f=[...n==="clippingAncestors"?isTopLayer(e)?[]:getClippingElementAncestors(e,this._c):[].concat(n),o],g=f[0],b=f.reduce((_,S)=>{const R=getClientRectFromClippingAncestor(e,S,l);return _.top=max$4(R.top,_.top),_.right=min$4(R.right,_.right),_.bottom=min$4(R.bottom,_.bottom),_.left=max$4(R.left,_.left),_},getClientRectFromClippingAncestor(e,g,l));return{width:b.right-b.left,height:b.bottom-b.top,x:b.left,y:b.top}}function getDimensions(t){const{width:e,height:n}=getCssDimensions(t);return{width:e,height:n}}function getRectRelativeToOffsetParent(t,e,n){const o=isHTMLElement$2(e),l=getDocumentElement(e),d=n==="fixed",f=getBoundingClientRect(t,!0,d,e);let g={scrollLeft:0,scrollTop:0};const b=createCoords(0);function _(){b.x=getWindowScrollBarX(l)}if(o||!o&&!d)if((getNodeName(e)!=="body"||isOverflowElement(l))&&(g=getNodeScroll(e)),o){const E=getBoundingClientRect(e,!0,d,e);b.x=E.x+e.clientLeft,b.y=E.y+e.clientTop}else l&&_();d&&!o&&l&&_();const S=l&&!o&&!d?getHTMLOffset(l,g):createCoords(0),R=f.left+g.scrollLeft-b.x-S.x,C=f.top+g.scrollTop-b.y-S.y;return{x:R,y:C,width:f.width,height:f.height}}function isStaticPositioned(t){return getComputedStyle$1(t).position==="static"}function getTrueOffsetParent(t,e){if(!isHTMLElement$2(t)||getComputedStyle$1(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return getDocumentElement(t)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(t,e){const n=getWindow(t);if(isTopLayer(t))return n;if(!isHTMLElement$2(t)){let l=getParentNode(t);for(;l&&!isLastTraversableNode(l);){if(isElement(l)&&!isStaticPositioned(l))return l;l=getParentNode(l)}return n}let o=getTrueOffsetParent(t,e);for(;o&&isTableElement(o)&&isStaticPositioned(o);)o=getTrueOffsetParent(o,e);return o&&isLastTraversableNode(o)&&isStaticPositioned(o)&&!isContainingBlock(o)?n:o||getContainingBlock(t)||n}const getElementRects=async function(t){const e=this.getOffsetParent||getOffsetParent,n=this.getDimensions,o=await n(t.floating);return{reference:getRectRelativeToOffsetParent(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function isRTL(t){return getComputedStyle$1(t).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function observeMove(t,e){let n=null,o;const l=getDocumentElement(t);function d(){var g;clearTimeout(o),(g=n)==null||g.disconnect(),n=null}function f(g,b){g===void 0&&(g=!1),b===void 0&&(b=1),d();const _=t.getBoundingClientRect(),{left:S,top:R,width:C,height:E}=_;if(g||e(),!C||!E)return;const A=floor(R),M=floor(l.clientWidth-(S+C)),I=floor(l.clientHeight-(R+E)),j=floor(S),Q={rootMargin:-A+"px "+-M+"px "+-I+"px "+-j+"px",threshold:max$4(0,min$4(1,b))||1};let te=!0;function F(V){const ne=V[0].intersectionRatio;if(ne!==b){if(!te)return f();ne?f(!1,ne):o=setTimeout(()=>{f(!1,1e-7)},1e3)}ne===1&&!rectsAreEqual(_,t.getBoundingClientRect())&&f(),te=!1}try{n=new IntersectionObserver(F,{...Q,root:l.ownerDocument})}catch{n=new IntersectionObserver(F,Q)}n.observe(t)}return f(!0),d}function autoUpdate(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:d=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:b=!1}=o,_=unwrapElement(t),S=l||d?[..._?getOverflowAncestors(_):[],...getOverflowAncestors(e)]:[];S.forEach(j=>{l&&j.addEventListener("scroll",n,{passive:!0}),d&&j.addEventListener("resize",n)});const R=_&&g?observeMove(_,n):null;let C=-1,E=null;f&&(E=new ResizeObserver(j=>{let[q]=j;q&&q.target===_&&E&&(E.unobserve(e),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var Q;(Q=E)==null||Q.observe(e)})),n()}),_&&!b&&E.observe(_),E.observe(e));let A,M=b?getBoundingClientRect(t):null;b&&I();function I(){const j=getBoundingClientRect(t);M&&!rectsAreEqual(M,j)&&n(),M=j,A=requestAnimationFrame(I)}return n(),()=>{var j;S.forEach(q=>{l&&q.removeEventListener("scroll",n),d&&q.removeEventListener("resize",n)}),R==null||R(),(j=E)==null||j.disconnect(),E=null,b&&cancelAnimationFrame(A)}}const offset$1=offset$2,shift$2=shift$3,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$3=arrow$4,limitShift$1=limitShift$2,computePosition=(t,e,n)=>{const o=new Map,l={platform,...n},d={...l.platform,_c:o};return computePosition$1(t,e,{...l,platform:d})};var isClient=typeof document<"u",noop$3=function(){},index=isClient?React.useLayoutEffect:noop$3;function deepEqual$3(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,l;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!deepEqual$3(t[o],e[o]))return!1;return!0}if(l=Object.keys(t),n=l.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,l[o]))return!1;for(o=n;o--!==0;){const d=l[o];if(!(d==="_owner"&&t.$$typeof)&&!deepEqual$3(t[d],e[d]))return!1}return!0}return t!==t&&e!==e}function getDPR(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(t,e){const n=getDPR(t);return Math.round(e*n)/n}function useLatestRef(t){const e=React__namespace.useRef(t);return index(()=>{e.current=t}),e}function useFloating(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:l,elements:{reference:d,floating:f}={},transform:g=!0,whileElementsMounted:b,open:_}=t,[S,R]=React__namespace.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[C,E]=React__namespace.useState(o);deepEqual$3(C,o)||E(o);const[A,M]=React__namespace.useState(null),[I,j]=React__namespace.useState(null),q=React__namespace.useCallback(Ve=>{Ve!==V.current&&(V.current=Ve,M(Ve))},[]),Q=React__namespace.useCallback(Ve=>{Ve!==ne.current&&(ne.current=Ve,j(Ve))},[]),te=d||A,F=f||I,V=React__namespace.useRef(null),ne=React__namespace.useRef(null),ae=React__namespace.useRef(S),se=b!=null,$e=useLatestRef(b),Ne=useLatestRef(l),oe=useLatestRef(_),Oe=React__namespace.useCallback(()=>{if(!V.current||!ne.current)return;const Ve={placement:e,strategy:n,middleware:C};Ne.current&&(Ve.platform=Ne.current),computePosition(V.current,ne.current,Ve).then(Le=>{const Ue={...Le,isPositioned:oe.current!==!1};Ae.current&&!deepEqual$3(ae.current,Ue)&&(ae.current=Ue,ReactDOM__namespace.flushSync(()=>{R(Ue)}))})},[C,e,n,Ne,oe]);index(()=>{_===!1&&ae.current.isPositioned&&(ae.current.isPositioned=!1,R(Ve=>({...Ve,isPositioned:!1})))},[_]);const Ae=React__namespace.useRef(!1);index(()=>(Ae.current=!0,()=>{Ae.current=!1}),[]),index(()=>{if(te&&(V.current=te),F&&(ne.current=F),te&&F){if($e.current)return $e.current(te,F,Oe);Oe()}},[te,F,Oe,$e,se]);const je=React__namespace.useMemo(()=>({reference:V,floating:ne,setReference:q,setFloating:Q}),[q,Q]),Be=React__namespace.useMemo(()=>({reference:te,floating:F}),[te,F]),qe=React__namespace.useMemo(()=>{const Ve={position:n,left:0,top:0};if(!Be.floating)return Ve;const Le=roundByDPR(Be.floating,S.x),Ue=roundByDPR(Be.floating,S.y);return g?{...Ve,transform:"translate("+Le+"px, "+Ue+"px)",...getDPR(Be.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Le,top:Ue}},[n,g,Be.floating,S.x,S.y]);return React__namespace.useMemo(()=>({...S,update:Oe,refs:je,elements:Be,floatingStyles:qe}),[S,Oe,je,Be,qe])}const arrow$1=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:l}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?arrow$3({element:o.current,padding:l}).fn(n):{}:o?arrow$3({element:o,padding:l}).fn(n):{}}}},offset=(t,e)=>({...offset$1(t),options:[t,e]}),shift$1=(t,e)=>({...shift$2(t),options:[t,e]}),limitShift=(t,e)=>({...limitShift$1(t),options:[t,e]}),flip=(t,e)=>({...flip$1(t),options:[t,e]}),size=(t,e)=>({...size$1(t),options:[t,e]}),hide=(t,e)=>({...hide$1(t),options:[t,e]}),arrow$2=(t,e)=>({...arrow$1(t),options:[t,e]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((t,e)=>{const{children:n,width:o=10,height:l=5,...d}=t;return jsxRuntime.jsx(Primitive$4.svg,{...d,ref:e,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$9=Arrow$1,POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope$2(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=t=>{const{__scopePopper:e,children:n}=t,[o,l]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:e,anchor:o,onAnchorChange:l,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$2="PopperAnchor",PopperAnchor=React__namespace.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...l}=t,d=usePopperContext(ANCHOR_NAME$2,n),f=React__namespace.useRef(null),g=useComposedRefs(e,f),b=React__namespace.useRef(null);return React__namespace.useEffect(()=>{const _=b.current;b.current=(o==null?void 0:o.current)||f.current,_!==b.current&&d.onAnchorChange(b.current)}),o?null:jsxRuntime.jsx(Primitive$4.div,{...l,ref:g})});PopperAnchor.displayName=ANCHOR_NAME$2;var CONTENT_NAME$9="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$9),PopperContent=React__namespace.forwardRef((t,e)=>{var Qe,at,et,ot,ct,ze;const{__scopePopper:n,side:o="bottom",sideOffset:l=0,align:d="center",alignOffset:f=0,arrowPadding:g=0,avoidCollisions:b=!0,collisionBoundary:_=[],collisionPadding:S=0,sticky:R="partial",hideWhenDetached:C=!1,updatePositionStrategy:E="optimized",onPlaced:A,...M}=t,I=usePopperContext(CONTENT_NAME$9,n),[j,q]=React__namespace.useState(null),Q=useComposedRefs(e,$t=>q($t)),[te,F]=React__namespace.useState(null),V=useSize(te),ne=(V==null?void 0:V.width)??0,ae=(V==null?void 0:V.height)??0,se=o+(d!=="center"?"-"+d:""),$e=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},Ne=Array.isArray(_)?_:[_],oe=Ne.length>0,Oe={padding:$e,boundary:Ne.filter(isNotNull),altBoundary:oe},{refs:Ae,floatingStyles:je,placement:Be,isPositioned:qe,middlewareData:Ve}=useFloating({strategy:"fixed",placement:se,whileElementsMounted:(...$t)=>autoUpdate(...$t,{animationFrame:E==="always"}),elements:{reference:I.anchor},middleware:[offset({mainAxis:l+ae,alignmentAxis:f}),b&&shift$1({mainAxis:!0,crossAxis:!1,limiter:R==="partial"?limitShift():void 0,...Oe}),b&&flip({...Oe}),size({...Oe,apply:({elements:$t,rects:tt,availableWidth:yt,availableHeight:ft})=>{const{width:Ct,height:Mt}=tt.reference,It=$t.floating.style;It.setProperty("--radix-popper-available-width",`${yt}px`),It.setProperty("--radix-popper-available-height",`${ft}px`),It.setProperty("--radix-popper-anchor-width",`${Ct}px`),It.setProperty("--radix-popper-anchor-height",`${Mt}px`)}}),te&&arrow$2({element:te,padding:g}),transformOrigin({arrowWidth:ne,arrowHeight:ae}),C&&hide({strategy:"referenceHidden",...Oe})]}),[Le,Ue]=getSideAndAlignFromPlacement(Be),Ke=useCallbackRef$1(A);useLayoutEffect2(()=>{qe&&(Ke==null||Ke())},[qe,Ke]);const We=(Qe=Ve.arrow)==null?void 0:Qe.x,Xe=(at=Ve.arrow)==null?void 0:at.y,nt=((et=Ve.arrow)==null?void 0:et.centerOffset)!==0,[Ye,st]=React__namespace.useState();return useLayoutEffect2(()=>{j&&st(window.getComputedStyle(j).zIndex)},[j]),jsxRuntime.jsx("div",{ref:Ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...je,transform:qe?je.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ye,"--radix-popper-transform-origin":[(ot=Ve.transformOrigin)==null?void 0:ot.x,(ct=Ve.transformOrigin)==null?void 0:ct.y].join(" "),...((ze=Ve.hide)==null?void 0:ze.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:Le,onArrowChange:F,arrowX:We,arrowY:Xe,shouldHideArrow:nt,children:jsxRuntime.jsx(Primitive$4.div,{"data-side":Le,"data-align":Ue,...M,ref:Q,style:{...M.style,animation:qe?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$9;var ARROW_NAME$5="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(e,n){const{__scopePopper:o,...l}=e,d=useContentContext(ARROW_NAME$5,o),f=OPPOSITE_SIDE[d.placedSide];return jsxRuntime.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(Root$9,{...l,ref:n,style:{...l.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$5;function isNotNull(t){return t!==null}var transformOrigin=t=>({name:"transformOrigin",options:t,fn(e){var I,j,q;const{placement:n,rects:o,middlewareData:l}=e,f=((I=l.arrow)==null?void 0:I.centerOffset)!==0,g=f?0:t.arrowWidth,b=f?0:t.arrowHeight,[_,S]=getSideAndAlignFromPlacement(n),R={start:"0%",center:"50%",end:"100%"}[S],C=(((j=l.arrow)==null?void 0:j.x)??0)+g/2,E=(((q=l.arrow)==null?void 0:q.y)??0)+b/2;let A="",M="";return _==="bottom"?(A=f?R:`${C}px`,M=`${-b}px`):_==="top"?(A=f?R:`${C}px`,M=`${o.floating.height+b}px`):_==="right"?(A=`${-b}px`,M=f?R:`${E}px`):_==="left"&&(A=`${o.floating.width+b}px`,M=f?R:`${E}px`),{data:{x:A,y:M}}}});function getSideAndAlignFromPlacement(t){const[e,n="center"]=t.split("-");return[e,n]}var Root2$7=Popper,Anchor=PopperAnchor,Content$2=PopperContent,Arrow=PopperArrow;function createSlot$3(t){const e=createSlotClone$3(t),n=React__namespace.forwardRef((o,l)=>{const{children:d,...f}=o,g=React__namespace.Children.toArray(d),b=g.find(isSlottable$3);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(e,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(e,{...f,ref:l,children:d})});return n.displayName=`${t}.Slot`,n}function createSlotClone$3(t){const e=React__namespace.forwardRef((n,o)=>{const{children:l,...d}=n;if(React__namespace.isValidElement(l)){const f=getElementRef$3(l),g=mergeProps$3(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var SLOTTABLE_IDENTIFIER$5=Symbol("radix.slottable");function isSlottable$3(t){return React__namespace.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===SLOTTABLE_IDENTIFIER$5}function mergeProps$3(t,e){const n={...e};for(const o in e){const l=t[o],d=e[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...t,...n}}function getElementRef$3(t){var o,l;let e=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var SELECTION_KEYS$1=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS$1,"ArrowRight"],rtl:[...SELECTION_KEYS$1,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$2(MENU_NAME,[createCollectionScope$3,createPopperScope,createRovingFocusGroupScope]),usePopperScope$3=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=t=>{const{__scopeMenu:e,open:n=!1,children:o,dir:l,onOpenChange:d,modal:f=!0}=t,g=usePopperScope$3(e),[b,_]=React__namespace.useState(null),S=React__namespace.useRef(!1),R=useCallbackRef$1(d),C=useDirection(l);return React__namespace.useEffect(()=>{const E=()=>{S.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>S.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),jsxRuntime.jsx(Root2$7,{...g,children:jsxRuntime.jsx(MenuProvider,{scope:e,open:n,onOpenChange:R,content:b,onContentChange:_,children:jsxRuntime.jsx(MenuRootProvider,{scope:e,onClose:React__namespace.useCallback(()=>R(!1),[R]),isUsingKeyboardRef:S,dir:C,modal:f,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME$1="MenuAnchor",MenuAnchor=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t,l=usePopperScope$3(n);return jsxRuntime.jsx(Anchor,{...l,...o,ref:e})});MenuAnchor.displayName=ANCHOR_NAME$1;var PORTAL_NAME$5="MenuPortal",[PortalProvider$2,usePortalContext$2]=createMenuContext(PORTAL_NAME$5,{forceMount:void 0}),MenuPortal=t=>{const{__scopeMenu:e,forceMount:n,children:o,container:l}=t,d=useMenuContext(PORTAL_NAME$5,e);return jsxRuntime.jsx(PortalProvider$2,{scope:e,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||d.open,children:jsxRuntime.jsx(Portal$5,{asChild:!0,container:l,children:o})})})};MenuPortal.displayName=PORTAL_NAME$5;var CONTENT_NAME$8="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$8),MenuContent=React__namespace.forwardRef((t,e)=>{const n=usePortalContext$2(CONTENT_NAME$8,t.__scopeMenu),{forceMount:o=n.forceMount,...l}=t,d=useMenuContext(CONTENT_NAME$8,t.__scopeMenu),f=useMenuRootContext(CONTENT_NAME$8,t.__scopeMenu);return jsxRuntime.jsx(Collection$3.Provider,{scope:t.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||d.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:t.__scopeMenu,children:f.modal?jsxRuntime.jsx(MenuRootContentModal,{...l,ref:e}):jsxRuntime.jsx(MenuRootContentNonModal,{...l,ref:e})})})})}),MenuRootContentModal=React__namespace.forwardRef((t,e)=>{const n=useMenuContext(CONTENT_NAME$8,t.__scopeMenu),o=React__namespace.useRef(null),l=useComposedRefs(e,o);return React__namespace.useEffect(()=>{const d=o.current;if(d)return hideOthers(d)},[]),jsxRuntime.jsx(MenuContentImpl,{...t,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((t,e)=>{const n=useMenuContext(CONTENT_NAME$8,t.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot$3=createSlot$3("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:l,onOpenAutoFocus:d,onCloseAutoFocus:f,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:C,onDismiss:E,disableOutsideScroll:A,...M}=t,I=useMenuContext(CONTENT_NAME$8,n),j=useMenuRootContext(CONTENT_NAME$8,n),q=usePopperScope$3(n),Q=useRovingFocusGroupScope$1(n),te=useCollection$3(n),[F,V]=React__namespace.useState(null),ne=React__namespace.useRef(null),ae=useComposedRefs(e,ne,I.onContentChange),se=React__namespace.useRef(0),$e=React__namespace.useRef(""),Ne=React__namespace.useRef(0),oe=React__namespace.useRef(null),Oe=React__namespace.useRef("right"),Ae=React__namespace.useRef(0),je=A?ReactRemoveScroll:React__namespace.Fragment,Be=A?{as:Slot$3,allowPinchZoom:!0}:void 0,qe=Le=>{var Qe,at;const Ue=$e.current+Le,Ke=te().filter(et=>!et.disabled),We=document.activeElement,Xe=(Qe=Ke.find(et=>et.ref.current===We))==null?void 0:Qe.textValue,nt=Ke.map(et=>et.textValue),Ye=getNextMatch(nt,Ue,Xe),st=(at=Ke.find(et=>et.textValue===Ye))==null?void 0:at.ref.current;(function et(ot){$e.current=ot,window.clearTimeout(se.current),ot!==""&&(se.current=window.setTimeout(()=>et(""),1e3))})(Ue),st&&setTimeout(()=>st.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(se.current),[]),useFocusGuards();const Ve=React__namespace.useCallback(Le=>{var Ke,We;return Oe.current===((Ke=oe.current)==null?void 0:Ke.side)&&isPointerInGraceArea(Le,(We=oe.current)==null?void 0:We.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:$e,onItemEnter:React__namespace.useCallback(Le=>{Ve(Le)&&Le.preventDefault()},[Ve]),onItemLeave:React__namespace.useCallback(Le=>{var Ue;Ve(Le)||((Ue=ne.current)==null||Ue.focus(),V(null))},[Ve]),onTriggerLeave:React__namespace.useCallback(Le=>{Ve(Le)&&Le.preventDefault()},[Ve]),pointerGraceTimerRef:Ne,onPointerGraceIntentChange:React__namespace.useCallback(Le=>{oe.current=Le},[]),children:jsxRuntime.jsx(je,{...Be,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:composeEventHandlers(d,Le=>{var Ue;Le.preventDefault(),(Ue=ne.current)==null||Ue.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:C,onDismiss:E,children:jsxRuntime.jsx(Root$c,{asChild:!0,...Q,dir:j.dir,orientation:"vertical",loop:o,currentTabStopId:F,onCurrentTabStopIdChange:V,onEntryFocus:composeEventHandlers(b,Le=>{j.isUsingKeyboardRef.current||Le.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$2,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(I.open),"data-radix-menu-content":"",dir:j.dir,...q,...M,ref:ae,style:{outline:"none",...M.style},onKeyDown:composeEventHandlers(M.onKeyDown,Le=>{const Ke=Le.target.closest("[data-radix-menu-content]")===Le.currentTarget,We=Le.ctrlKey||Le.altKey||Le.metaKey,Xe=Le.key.length===1;Ke&&(Le.key==="Tab"&&Le.preventDefault(),!We&&Xe&&qe(Le.key));const nt=ne.current;if(Le.target!==nt||!FIRST_LAST_KEYS.includes(Le.key))return;Le.preventDefault();const st=te().filter(Qe=>!Qe.disabled).map(Qe=>Qe.ref.current);LAST_KEYS.includes(Le.key)&&st.reverse(),focusFirst$1(st)}),onBlur:composeEventHandlers(t.onBlur,Le=>{Le.currentTarget.contains(Le.target)||(window.clearTimeout(se.current),$e.current="")}),onPointerMove:composeEventHandlers(t.onPointerMove,whenMouse(Le=>{const Ue=Le.target,Ke=Ae.current!==Le.clientX;if(Le.currentTarget.contains(Ue)&&Ke){const We=Le.clientX>Ae.current?"right":"left";Oe.current=We,Ae.current=Le.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$8;var GROUP_NAME$2="MenuGroup",MenuGroup=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t;return jsxRuntime.jsx(Primitive$4.div,{role:"group",...o,ref:e})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t;return jsxRuntime.jsx(Primitive$4.div,{...o,ref:e})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$3="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:o,...l}=t,d=React__namespace.useRef(null),f=useMenuRootContext(ITEM_NAME$3,t.__scopeMenu),g=useMenuContentContext(ITEM_NAME$3,t.__scopeMenu),b=useComposedRefs(e,d),_=React__namespace.useRef(!1),S=()=>{const R=d.current;if(!n&&R){const C=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});R.addEventListener(ITEM_SELECT,E=>o==null?void 0:o(E),{once:!0}),dispatchDiscreteCustomEvent(R,C),C.defaultPrevented?_.current=!1:f.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...l,ref:b,disabled:n,onClick:composeEventHandlers(t.onClick,S),onPointerDown:R=>{var C;(C=t.onPointerDown)==null||C.call(t,R),_.current=!0},onPointerUp:composeEventHandlers(t.onPointerUp,R=>{var C;_.current||(C=R.currentTarget)==null||C.click()}),onKeyDown:composeEventHandlers(t.onKeyDown,R=>{const C=g.searchRef.current!=="";n||C&&R.key===" "||SELECTION_KEYS$1.includes(R.key)&&(R.currentTarget.click(),R.preventDefault())})})});MenuItem.displayName=ITEM_NAME$3;var MenuItemImpl=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:o=!1,textValue:l,...d}=t,f=useMenuContentContext(ITEM_NAME$3,n),g=useRovingFocusGroupScope$1(n),b=React__namespace.useRef(null),_=useComposedRefs(e,b),[S,R]=React__namespace.useState(!1),[C,E]=React__namespace.useState("");return React__namespace.useEffect(()=>{const A=b.current;A&&E((A.textContent??"").trim())},[d.children]),jsxRuntime.jsx(Collection$3.ItemSlot,{scope:n,disabled:o,textValue:l??C,children:jsxRuntime.jsx(Item$3,{asChild:!0,...g,focusable:!o,children:jsxRuntime.jsx(Primitive$4.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...d,ref:_,onPointerMove:composeEventHandlers(t.onPointerMove,whenMouse(A=>{o?f.onItemLeave(A):(f.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(t.onPointerLeave,whenMouse(A=>f.onItemLeave(A))),onFocus:composeEventHandlers(t.onFocus,()=>R(!0)),onBlur:composeEventHandlers(t.onBlur,()=>R(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:o,...l}=t;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:t.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate$1(n)?"mixed":n,...l,ref:e,"data-state":getCheckedState(n),onSelect:composeEventHandlers(l.onSelect,()=>o==null?void 0:o(isIndeterminate$1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=React__namespace.forwardRef((t,e)=>{const{value:n,onValueChange:o,...l}=t,d=useCallbackRef$1(o);return jsxRuntime.jsx(RadioGroupProvider,{scope:t.__scopeMenu,value:n,onValueChange:d,children:jsxRuntime.jsx(MenuGroup,{...l,ref:e})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((t,e)=>{const{value:n,...o}=t,l=useRadioGroupContext(RADIO_ITEM_NAME$1,t.__scopeMenu),d=n===l.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:t.__scopeMenu,checked:d,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":d,...o,ref:e,"data-state":getCheckedState(d),onSelect:composeEventHandlers(o.onSelect,()=>{var f;return(f=l.onValueChange)==null?void 0:f.call(l,n)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME$1="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME$1,{checked:!1}),MenuItemIndicator=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:o,...l}=t,d=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n);return jsxRuntime.jsx(Presence,{present:o||isIndeterminate$1(d.checked)||d.checked===!0,children:jsxRuntime.jsx(Primitive$4.span,{...l,ref:e,"data-state":getCheckedState(d.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t;return jsxRuntime.jsx(Primitive$4.div,{role:"separator","aria-orientation":"horizontal",...o,ref:e})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$4="MenuArrow",MenuArrow=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t,l=usePopperScope$3(n);return jsxRuntime.jsx(Arrow,{...l,...o,ref:e})});MenuArrow.displayName=ARROW_NAME$4;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=t=>{const{__scopeMenu:e,children:n,open:o=!1,onOpenChange:l}=t,d=useMenuContext(SUB_NAME,e),f=usePopperScope$3(e),[g,b]=React__namespace.useState(null),[_,S]=React__namespace.useState(null),R=useCallbackRef$1(l);return React__namespace.useEffect(()=>(d.open===!1&&R(!1),()=>R(!1)),[d.open,R]),jsxRuntime.jsx(Root2$7,{...f,children:jsxRuntime.jsx(MenuProvider,{scope:e,open:o,onOpenChange:R,content:_,onContentChange:S,children:jsxRuntime.jsx(MenuSubProvider,{scope:e,contentId:useId(),triggerId:useId(),trigger:g,onTriggerChange:b,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((t,e)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,t.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,t.__scopeMenu),l=useMenuSubContext(SUB_TRIGGER_NAME$1,t.__scopeMenu),d=useMenuContentContext(SUB_TRIGGER_NAME$1,t.__scopeMenu),f=React__namespace.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=d,_={__scopeMenu:t.__scopeMenu},S=React__namespace.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return React__namespace.useEffect(()=>S,[S]),React__namespace.useEffect(()=>{const R=g.current;return()=>{window.clearTimeout(R),b(null)}},[g,b]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,..._,children:jsxRuntime.jsx(MenuItemImpl,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":getOpenState(n.open),...t,ref:composeRefs(e,l.onTriggerChange),onClick:R=>{var C;(C=t.onClick)==null||C.call(t,R),!(t.disabled||R.defaultPrevented)&&(R.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(t.onPointerMove,whenMouse(R=>{d.onItemEnter(R),!R.defaultPrevented&&!t.disabled&&!n.open&&!f.current&&(d.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{n.onOpenChange(!0),S()},100))})),onPointerLeave:composeEventHandlers(t.onPointerLeave,whenMouse(R=>{var E,A;S();const C=(E=n.content)==null?void 0:E.getBoundingClientRect();if(C){const M=(A=n.content)==null?void 0:A.dataset.side,I=M==="right",j=I?-5:5,q=C[I?"left":"right"],Q=C[I?"right":"left"];d.onPointerGraceIntentChange({area:[{x:R.clientX+j,y:R.clientY},{x:q,y:C.top},{x:Q,y:C.top},{x:Q,y:C.bottom},{x:q,y:C.bottom}],side:M}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(R),R.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(t.onKeyDown,R=>{var E;const C=d.searchRef.current!=="";t.disabled||C&&R.key===" "||SUB_OPEN_KEYS[o.dir].includes(R.key)&&(n.onOpenChange(!0),(E=n.content)==null||E.focus(),R.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((t,e)=>{const n=usePortalContext$2(CONTENT_NAME$8,t.__scopeMenu),{forceMount:o=n.forceMount,...l}=t,d=useMenuContext(CONTENT_NAME$8,t.__scopeMenu),f=useMenuRootContext(CONTENT_NAME$8,t.__scopeMenu),g=useMenuSubContext(SUB_CONTENT_NAME$1,t.__scopeMenu),b=React__namespace.useRef(null),_=useComposedRefs(e,b);return jsxRuntime.jsx(Collection$3.Provider,{scope:t.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||d.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:t.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:g.contentId,"aria-labelledby":g.triggerId,...l,ref:_,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:S=>{var R;f.isUsingKeyboardRef.current&&((R=b.current)==null||R.focus()),S.preventDefault()},onCloseAutoFocus:S=>S.preventDefault(),onFocusOutside:composeEventHandlers(t.onFocusOutside,S=>{S.target!==g.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(t.onEscapeKeyDown,S=>{f.onClose(),S.preventDefault()}),onKeyDown:composeEventHandlers(t.onKeyDown,S=>{var E;const R=S.currentTarget.contains(S.target),C=SUB_CLOSE_KEYS[f.dir].includes(S.key);R&&C&&(d.onOpenChange(!1),(E=g.trigger)==null||E.focus(),S.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(t){return t?"open":"closed"}function isIndeterminate$1(t){return t==="indeterminate"}function getCheckedState(t){return isIndeterminate$1(t)?"indeterminate":t?"checked":"unchecked"}function focusFirst$1(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function wrapArray$1(t,e){return t.map((n,o)=>t[(e+o)%t.length])}function getNextMatch(t,e,n){const l=e.length>1&&Array.from(e).every(_=>_===e[0])?e[0]:e,d=n?t.indexOf(n):-1;let f=wrapArray$1(t,Math.max(d,0));l.length===1&&(f=f.filter(_=>_!==n));const b=f.find(_=>_.toLowerCase().startsWith(l.toLowerCase()));return b!==n?b:void 0}function isPointInPolygon$1(t,e){const{x:n,y:o}=t;let l=!1;for(let d=0,f=e.length-1;d<e.length;f=d++){const g=e[d],b=e[f],_=g.x,S=g.y,R=b.x,C=b.y;S>o!=C>o&&n<(R-_)*(o-S)/(C-S)+_&&(l=!l)}return l}function isPointerInGraceArea(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return isPointInPolygon$1(n,e)}function whenMouse(t){return e=>e.pointerType==="mouse"?t(e):void 0}var Root3$1=Menu,Anchor2$1=MenuAnchor,Portal$3=MenuPortal,Content2$6=MenuContent,Group$1=MenuGroup,Label$4=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator$1=MenuItemIndicator,Separator$3=MenuSeparator,Arrow2=MenuArrow,Sub=MenuSub,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext]=createContextScope$2(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=t=>{const{__scopeDropdownMenu:e,children:n,dir:o,open:l,defaultOpen:d,onOpenChange:f,modal:g=!0}=t,b=useMenuScope(e),_=React__namespace.useRef(null),[S,R]=useControllableState({prop:l,defaultProp:d??!1,onChange:f,caller:DROPDOWN_MENU_NAME});return jsxRuntime.jsx(DropdownMenuProvider,{scope:e,triggerId:useId(),triggerRef:_,contentId:useId(),open:S,onOpenChange:R,onOpenToggle:React__namespace.useCallback(()=>R(C=>!C),[R]),modal:g,children:jsxRuntime.jsx(Root3$1,{...b,open:S,onOpenChange:R,dir:o,modal:g,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$8="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...l}=t,d=useDropdownMenuContext(TRIGGER_NAME$8,n),f=useMenuScope(n);return jsxRuntime.jsx(Anchor2$1,{asChild:!0,...f,children:jsxRuntime.jsx(Primitive$4.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:composeRefs(e,d.triggerRef),onPointerDown:composeEventHandlers(t.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(d.onOpenToggle(),d.open||g.preventDefault())}),onKeyDown:composeEventHandlers(t.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&d.onOpenToggle(),g.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$8;var PORTAL_NAME$4="DropdownMenuPortal",DropdownMenuPortal$1=t=>{const{__scopeDropdownMenu:e,...n}=t,o=useMenuScope(e);return jsxRuntime.jsx(Portal$3,{...o,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$4;var CONTENT_NAME$7="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useDropdownMenuContext(CONTENT_NAME$7,n),d=useMenuScope(n),f=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$6,{id:l.contentId,"aria-labelledby":l.triggerId,...d,...o,ref:e,onCloseAutoFocus:composeEventHandlers(t.onCloseAutoFocus,g=>{var b;f.current||(b=l.triggerRef.current)==null||b.focus(),f.current=!1,g.preventDefault()}),onInteractOutside:composeEventHandlers(t.onInteractOutside,g=>{const b=g.detail.originalEvent,_=b.button===0&&b.ctrlKey===!0,S=b.button===2||_;(!l.modal||S)&&(f.current=!0)}),style:{...t.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)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$7;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Group$1,{...l,...o,ref:e})});DropdownMenuGroup$1.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Label$4,{...l,...o,ref:e})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$2="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...l,...o,ref:e})});DropdownMenuItem$1.displayName=ITEM_NAME$2;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...l,...o,ref:e})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...l,...o,ref:e})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...l,...o,ref:e})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME$2="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator$1,{...l,...o,ref:e})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME$2;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Separator$3,{...l,...o,ref:e})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$3="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...l,...o,ref:e})});DropdownMenuArrow.displayName=ARROW_NAME$3;var DropdownMenuSub$1=t=>{const{__scopeDropdownMenu:e,children:n,open:o,onOpenChange:l,defaultOpen:d}=t,f=useMenuScope(e),[g,b]=useControllableState({prop:o,defaultProp:d??!1,onChange:l,caller:"DropdownMenuSub"});return jsxRuntime.jsx(Sub,{...f,open:g,onOpenChange:b,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...l,...o,ref:e})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...l,...o,ref:e,style:{...t.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)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$6=DropdownMenu$1,Trigger$5=DropdownMenuTrigger$1,Portal2$1=DropdownMenuPortal$1,Content2$5=DropdownMenuContent$1,Group2=DropdownMenuGroup$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioGroup2=DropdownMenuRadioGroup$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,Sub2=DropdownMenuSub$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$6,DropdownMenuTrigger=Trigger$5,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2$1,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:t,inset:e,children:n,...o},l)=>jsxRuntime.jsxs(SubTrigger2,{ref:l,className:cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e&&"pl-8",t),...o,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(SubContent2,{ref:n,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",t),...e}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:t,sideOffset:e=4,...n},o)=>jsxRuntime.jsx(Portal2$1,{children:jsxRuntime.jsx(Content2$5,{ref:o,sideOffset:e,className:cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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 origin-[--radix-dropdown-menu-content-transform-origin]",t),...n})}));DropdownMenuContent.displayName=Content2$5.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:t,inset:e,...n},o)=>jsxRuntime.jsx(Item2,{ref:o,className:cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",e&&"pl-8",t),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:t,children:e,checked:n,...o},l)=>jsxRuntime.jsxs(CheckboxItem2,{ref:l,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...o,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Check,{className:"h-4 w-4"})})}),e]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:t,children:e,...n},o)=>jsxRuntime.jsxs(RadioItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),e]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:t,inset:e,...n},o)=>jsxRuntime.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",t),...e}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:t,...e})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",t),...e});DropdownMenuShortcut.displayName="DropdownMenuShortcut";var REACT_LAZY_TYPE=Symbol.for("react.lazy"),use=React__namespace[" use ".trim().toString()];function isPromiseLike(t){return typeof t=="object"&&t!==null&&"then"in t}function isLazyComponent(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===REACT_LAZY_TYPE&&"_payload"in t&&isPromiseLike(t._payload)}function createSlot$2(t){const e=createSlotClone$2(t),n=React__namespace.forwardRef((o,l)=>{let{children:d,...f}=o;isLazyComponent(d)&&typeof use=="function"&&(d=use(d._payload));const g=React__namespace.Children.toArray(d),b=g.find(isSlottable$2);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(e,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(e,{...f,ref:l,children:d})});return n.displayName=`${t}.Slot`,n}var Slot$2=createSlot$2("Slot");function createSlotClone$2(t){const e=React__namespace.forwardRef((n,o)=>{let{children:l,...d}=n;if(isLazyComponent(l)&&typeof use=="function"&&(l=use(l._payload)),React__namespace.isValidElement(l)){const f=getElementRef$2(l),g=mergeProps$2(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var SLOTTABLE_IDENTIFIER$4=Symbol("radix.slottable");function isSlottable$2(t){return React__namespace.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===SLOTTABLE_IDENTIFIER$4}function mergeProps$2(t,e){const n={...e};for(const o in e){const l=t[o],d=e[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...t,...n}}function getElementRef$2(t){var o,l;let e=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const falsyToString=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,cx=clsx,cva=(t,e)=>n=>{var o;if((e==null?void 0:e.variants)==null)return cx(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:d}=e,f=Object.keys(l).map(_=>{const S=n==null?void 0:n[_],R=d==null?void 0:d[_];if(S===null)return null;const C=falsyToString(S)||falsyToString(R);return l[_][C]}),g=n&&Object.entries(n).reduce((_,S)=>{let[R,C]=S;return C===void 0||(_[R]=C),_},{}),b=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((_,S)=>{let{class:R,className:C,...E}=S;return Object.entries(E).every(A=>{let[M,I]=A;return Array.isArray(I)?I.includes({...d,...g}[M]):{...d,...g}[M]===I})?[..._,R,C]:_},[]);return cx(t,f,b,n==null?void 0:n.class,n==null?void 0:n.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input text-foreground bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",purple:"bg-randmar-purple text-gray-100 shadow-sm hover:bg-randmar-purple/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button$1=React__namespace.forwardRef(({className:t,variant:e,size:n,asChild:o=!1,confirmationDialog:l,onClick:d,...f},g)=>{const b=o?Slot$2:"button";if(!l)return jsxRuntime.jsx(b,{className:cn(buttonVariants({variant:e,size:n,className:t})),ref:g,onClick:d,...f});d&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:_,content:S,onConfirm:R,confirmText:C="Confirm",cancelText:E="Cancel"}=l,A=()=>{R()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(b,{className:cn(buttonVariants({variant:e,size:n,className:t})),ref:g,...f})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:_}),jsxRuntime.jsx(DialogDescription,{children:S})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{variant:"outline",children:E})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{onClick:A,children:C})})]})]})]})});Button$1.displayName="Button";function formatProdErrorMessage$1(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$4(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function miniKindOf(t){if(t===void 0)return"undefined";if(t===null)return"null";const e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(isDate$1(t))return"date";if(isError(t))return"error";const n=ctorName(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(t){return typeof t.constructor=="function"?t.constructor.name:null}function isError(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function isDate$1(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function kindOf(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=miniKindOf(t)),e}function warning(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function getUnexpectedStateShapeWarningMessage(t,e,n,o){const l=Object.keys(e),d=n&&n.type===actionTypes_default.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(l.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject$4(t))return`The ${d} has unexpected type of "${kindOf(t)}". Expected argument to be an object with the following keys: "${l.join('", "')}"`;const f=Object.keys(t).filter(g=>!e.hasOwnProperty(g)&&!o[g]);if(f.forEach(g=>{o[g]=!0}),!(n&&n.type===actionTypes_default.REPLACE)&&f.length>0)return`Unexpected ${f.length>1?"keys":"key"} "${f.join('", "')}" found in ${d}. Expected to find one of the known reducer keys instead: "${l.join('", "')}". Unexpected keys will be ignored.`}function assertReducerShape(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function combineReducers(t){const e=Object.keys(t),n={};for(let f=0;f<e.length;f++){const g=e[f];process.env.NODE_ENV!=="production"&&typeof t[g]>"u"&&warning(`No reducer provided for key "${g}"`),typeof t[g]=="function"&&(n[g]=t[g])}const o=Object.keys(n);let l;process.env.NODE_ENV!=="production"&&(l={});let d;try{assertReducerShape(n)}catch(f){d=f}return function(g={},b){if(d)throw d;if(process.env.NODE_ENV!=="production"){const R=getUnexpectedStateShapeWarningMessage(g,n,b,l);R&&warning(R)}let _=!1;const S={};for(let R=0;R<o.length;R++){const C=o[R],E=n[C],A=g[C],M=E(A,b);if(typeof M>"u"){const I=b&&b.type;throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(14):`When called with an action of type ${I?`"${String(I)}"`:"(unknown type)"}, the slice reducer for key "${C}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}S[C]=M,_=_||M!==A}return _=_||o.length!==Object.keys(g).length,_?S:g}}function isAction(t){return isPlainObject$4(t)&&"type"in t&&typeof t.type=="string"}var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function die(t,...e){if(process.env.NODE_ENV!=="production"){const n=errors[t],o=isFunction$6(n)?n.apply(null,e):n;throw new Error(`[Immer] ${o}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var O=Object,getPrototypeOf$1=O.getPrototypeOf,CONSTRUCTOR="constructor",PROTOTYPE="prototype",CONFIGURABLE="configurable",ENUMERABLE="enumerable",WRITABLE="writable",VALUE="value",isDraft=t=>!!t&&!!t[DRAFT_STATE];function isDraftable(t){var e;return t?isPlainObject$3(t)||isArray$2(t)||!!t[DRAFTABLE]||!!((e=t[CONSTRUCTOR])!=null&&e[DRAFTABLE])||isMap(t)||isSet(t):!1}var objectCtorString=O[PROTOTYPE][CONSTRUCTOR].toString(),cachedCtorStrings=new WeakMap;function isPlainObject$3(t){if(!t||!isObjectish(t))return!1;const e=getPrototypeOf$1(t);if(e===null||e===O[PROTOTYPE])return!0;const n=O.hasOwnProperty.call(e,CONSTRUCTOR)&&e[CONSTRUCTOR];if(n===Object)return!0;if(!isFunction$6(n))return!1;let o=cachedCtorStrings.get(n);return o===void 0&&(o=Function.toString.call(n),cachedCtorStrings.set(n,o)),o===objectCtorString}function original(t){return isDraft(t)||die(15,t),t[DRAFT_STATE].base_}function each(t,e,n=!0){getArchtype(t)===0?(n?Reflect.ownKeys(t):O.keys(t)).forEach(l=>{e(l,t[l],t)}):t.forEach((o,l)=>e(l,o,t))}function getArchtype(t){const e=t[DRAFT_STATE];return e?e.type_:isArray$2(t)?1:isMap(t)?2:isSet(t)?3:0}var has$1=(t,e,n=getArchtype(t))=>n===2?t.has(e):O[PROTOTYPE].hasOwnProperty.call(t,e),get$3=(t,e,n=getArchtype(t))=>n===2?t.get(e):t[e],set$2=(t,e,n,o=getArchtype(t))=>{o===2?t.set(e,n):o===3?t.add(n):t[e]=n};function is$1(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var isArray$2=Array.isArray,isMap=t=>t instanceof Map,isSet=t=>t instanceof Set,isObjectish=t=>typeof t=="object",isFunction$6=t=>typeof t=="function",isBoolean$2=t=>typeof t=="boolean";function isArrayIndex(t){const e=+t;return Number.isInteger(e)&&String(e)===t}var getProxyDraft=t=>isObjectish(t)?t==null?void 0:t[DRAFT_STATE]:null,latest=t=>t.copy_||t.base_,getFinalValue=t=>t.modified_?t.copy_:t.base_;function shallowCopy(t,e){if(isMap(t))return new Map(t);if(isSet(t))return new Set(t);if(isArray$2(t))return Array[PROTOTYPE].slice.call(t);const n=isPlainObject$3(t);if(e===!0||e==="class_only"&&!n){const o=O.getOwnPropertyDescriptors(t);delete o[DRAFT_STATE];let l=Reflect.ownKeys(o);for(let d=0;d<l.length;d++){const f=l[d],g=o[f];g[WRITABLE]===!1&&(g[WRITABLE]=!0,g[CONFIGURABLE]=!0),(g.get||g.set)&&(o[f]={[CONFIGURABLE]:!0,[WRITABLE]:!0,[ENUMERABLE]:g[ENUMERABLE],[VALUE]:t[f]})}return O.create(getPrototypeOf$1(t),o)}else{const o=getPrototypeOf$1(t);if(o!==null&&n)return{...t};const l=O.create(o);return O.assign(l,t)}}function freeze$1(t,e=!1){return isFrozen$1(t)||isDraft(t)||!isDraftable(t)||(getArchtype(t)>1&&O.defineProperties(t,{set:dontMutateMethodOverride,add:dontMutateMethodOverride,clear:dontMutateMethodOverride,delete:dontMutateMethodOverride}),O.freeze(t),e&&each(t,(n,o)=>{freeze$1(o,!0)},!1)),t}function dontMutateFrozenCollections(){die(2)}var dontMutateMethodOverride={[VALUE]:dontMutateFrozenCollections};function isFrozen$1(t){return t===null||!isObjectish(t)?!0:O.isFrozen(t)}var PluginMapSet="MapSet",PluginPatches="Patches",PluginArrayMethods="ArrayMethods",plugins={};function getPlugin(t){const e=plugins[t];return e||die(0,t),e}var isPluginLoaded=t=>!!plugins[t];function loadPlugin(t,e){plugins[t]||(plugins[t]=e)}var currentScope,getCurrentScope=()=>currentScope,createScope=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:isPluginLoaded(PluginMapSet)?getPlugin(PluginMapSet):void 0,arrayMethodsPlugin_:isPluginLoaded(PluginArrayMethods)?getPlugin(PluginArrayMethods):void 0});function usePatchesInScope(t,e){e&&(t.patchPlugin_=getPlugin(PluginPatches),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function revokeScope(t){leaveScope(t),t.drafts_.forEach(revokeDraft),t.drafts_=null}function leaveScope(t){t===currentScope&&(currentScope=t.parent_)}var enterScope=t=>currentScope=createScope(currentScope,t);function revokeDraft(t){const e=t[DRAFT_STATE];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function processResult(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];if(t!==void 0&&t!==n){n[DRAFT_STATE].modified_&&(revokeScope(e),die(4)),isDraftable(t)&&(t=finalize(e,t));const{patchPlugin_:l}=e;l&&l.generateReplacementPatches_(n[DRAFT_STATE].base_,t,e)}else t=finalize(e,n);return maybeFreeze(e,t,!0),revokeScope(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==NOTHING?t:void 0}function finalize(t,e){if(isFrozen$1(e))return e;const n=e[DRAFT_STATE];if(!n)return handleValue(e,t.handledSet_,t);if(!isSameScope(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(t);generatePatchesAndFinalize(n,t)}return n.copy_}function maybeFreeze(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&freeze$1(e,n)}function markStateFinalized(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var isSameScope=(t,e)=>t.scope_===e,EMPTY_LOCATIONS_RESULT=[];function updateDraftInParent(t,e,n,o){const l=latest(t),d=t.type_;if(o!==void 0&&get$3(l,o,d)===e){set$2(l,o,n,d);return}if(!t.draftLocations_){const g=t.draftLocations_=new Map;each(l,(b,_)=>{if(isDraft(_)){const S=g.get(_)||[];S.push(b),g.set(_,S)}})}const f=t.draftLocations_.get(e)??EMPTY_LOCATIONS_RESULT;for(const g of f)set$2(l,g,n,d)}function registerChildFinalizationCallback(t,e,n){t.callbacks_.push(function(l){var g;const d=e;if(!d||!isSameScope(d,l))return;(g=l.mapSetPlugin_)==null||g.fixSetContents(d);const f=getFinalValue(d);updateDraftInParent(t,d.draft_??d,f,n),generatePatchesAndFinalize(d,l)})}function generatePatchesAndFinalize(t,e){var o;if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(((o=t.assigned_)==null?void 0:o.size)??0)>0)){const{patchPlugin_:l}=e;if(l){const d=l.getPath(t);d&&l.generatePatches_(t,d,e)}markStateFinalized(t)}}function handleCrossReference(t,e,n){const{scope_:o}=t;if(isDraft(n)){const l=n[DRAFT_STATE];isSameScope(l,o)&&l.callbacks_.push(function(){prepareCopy(t);const f=getFinalValue(l);updateDraftInParent(t,n,f,e)})}else isDraftable(n)&&t.callbacks_.push(function(){const d=latest(t);get$3(d,e,t.type_)===n&&o.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&handleValue(get$3(t.copy_,e,t.type_),o.handledSet_,o)})}function handleValue(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||isDraft(t)||e.has(t)||!isDraftable(t)||isFrozen$1(t)||(e.add(t),each(t,(o,l)=>{if(isDraft(l)){const d=l[DRAFT_STATE];if(isSameScope(d,n)){const f=getFinalValue(d);set$2(t,o,f,t.type_),markStateFinalized(d)}}else isDraftable(l)&&handleValue(l,e,n)})),t}function createProxyProxy(t,e){const n=isArray$2(t),o={type_:n?1:0,scope_:e?e.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let l=o,d=objectTraps;n&&(l=[o],d=arrayTraps);const{revoke:f,proxy:g}=Proxy.revocable(l,d);return o.draft_=g,o.revoke_=f,[g,o]}var objectTraps={get(t,e){if(e===DRAFT_STATE)return t;let n=t.scope_.arrayMethodsPlugin_;const o=t.type_===1&&typeof e=="string";if(o&&n!=null&&n.isArrayOperationMethod(e))return n.createMethodInterceptor(t,e);const l=latest(t);if(!has$1(l,e,t.type_))return readPropFromProto(t,l,e);const d=l[e];if(t.finalized_||!isDraftable(d)||o&&t.operationMethod&&(n!=null&&n.isMutatingArrayMethod(t.operationMethod))&&isArrayIndex(e))return d;if(d===peek(t.base_,e)){prepareCopy(t);const f=t.type_===1?+e:e,g=createProxy(t.scope_,d,t,f);return t.copy_[f]=g}return d},has(t,e){return e in latest(t)},ownKeys(t){return Reflect.ownKeys(latest(t))},set(t,e,n){const o=getDescriptorFromProto(latest(t),e);if(o!=null&&o.set)return o.set.call(t.draft_,n),!0;if(!t.modified_){const l=peek(latest(t),e),d=l==null?void 0:l[DRAFT_STATE];if(d&&d.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(is$1(n,l)&&(n!==void 0||has$1(t.base_,e,t.type_)))return!0;prepareCopy(t),markChanged(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),handleCrossReference(t,e,n)),!0},deleteProperty(t,e){return prepareCopy(t),peek(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),markChanged(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=latest(t),o=Reflect.getOwnPropertyDescriptor(n,e);return o&&{[WRITABLE]:!0,[CONFIGURABLE]:t.type_!==1||e!=="length",[ENUMERABLE]:o[ENUMERABLE],[VALUE]:n[e]}},defineProperty(){die(11)},getPrototypeOf(t){return getPrototypeOf$1(t.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(t,e)=>{arrayTraps[t]=function(){const n=arguments;return n[0]=n[0][0],e.apply(this,n)}}),arrayTraps.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&die(13),arrayTraps.set.call(this,t,e,void 0)},arrayTraps.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&die(14),objectTraps.set.call(this,t[0],e,n,t[0])};function peek(t,e){const n=t[DRAFT_STATE];return(n?latest(n):t)[e]}function readPropFromProto(t,e,n){var l;const o=getDescriptorFromProto(e,n);return o?VALUE in o?o[VALUE]:(l=o.get)==null?void 0:l.call(t.draft_):void 0}function getDescriptorFromProto(t,e){if(!(e in t))return;let n=getPrototypeOf$1(t);for(;n;){const o=Object.getOwnPropertyDescriptor(n,e);if(o)return o;n=getPrototypeOf$1(n)}}function markChanged(t){t.modified_||(t.modified_=!0,t.parent_&&markChanged(t.parent_))}function prepareCopy(t){t.copy_||(t.assigned_=new Map,t.copy_=shallowCopy(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,n,o)=>{if(isFunction$6(e)&&!isFunction$6(n)){const d=n;n=e;const f=this;return function(b=d,..._){return f.produce(b,S=>n.call(this,S,..._))}}isFunction$6(n)||die(6),o!==void 0&&!isFunction$6(o)&&die(7);let l;if(isDraftable(e)){const d=enterScope(this),f=createProxy(d,e,void 0);let g=!0;try{l=n(f),g=!1}finally{g?revokeScope(d):leaveScope(d)}return usePatchesInScope(d,o),processResult(l,d)}else if(!e||!isObjectish(e)){if(l=n(e),l===void 0&&(l=e),l===NOTHING&&(l=void 0),this.autoFreeze_&&freeze$1(l,!0),o){const d=[],f=[];getPlugin(PluginPatches).generateReplacementPatches_(e,l,{patches_:d,inversePatches_:f}),o(d,f)}return l}else die(1,e)},this.produceWithPatches=(e,n)=>{if(isFunction$6(e))return(f,...g)=>this.produceWithPatches(f,b=>e(b,...g));let o,l;return[this.produce(e,n,(f,g)=>{o=f,l=g}),o,l]},isBoolean$2(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),isBoolean$2(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),isBoolean$2(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){isDraftable(t)||die(8),isDraft(t)&&(t=current(t));const e=enterScope(this),n=createProxy(e,t,void 0);return n[DRAFT_STATE].isManual_=!0,leaveScope(e),n}finishDraft(t,e){const n=t&&t[DRAFT_STATE];(!n||!n.isManual_)&&die(9);const{scope_:o}=n;return usePatchesInScope(o,e),processResult(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const l=e[n];if(l.path.length===0&&l.op==="replace"){t=l.value;break}}n>-1&&(e=e.slice(n+1));const o=getPlugin(PluginPatches).applyPatches_;return isDraft(t)?o(t,e):this.produce(t,l=>o(l,e))}};function createProxy(t,e,n,o){const[l,d]=isMap(e)?getPlugin(PluginMapSet).proxyMap_(e,n):isSet(e)?getPlugin(PluginMapSet).proxySet_(e,n):createProxyProxy(e,n);return((n==null?void 0:n.scope_)??getCurrentScope()).drafts_.push(l),d.callbacks_=(n==null?void 0:n.callbacks_)??[],d.key_=o,n&&o!==void 0?registerChildFinalizationCallback(n,d,o):d.callbacks_.push(function(b){var S;(S=b.mapSetPlugin_)==null||S.fixSetContents(d);const{patchPlugin_:_}=b;d.modified_&&_&&_.generatePatches_(d,[],b)}),l}function current(t){return isDraft(t)||die(10,t),currentImpl(t)}function currentImpl(t){if(!isDraftable(t)||isFrozen$1(t))return t;const e=t[DRAFT_STATE];let n,o=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=shallowCopy(t,e.scope_.immer_.useStrictShallowCopy_),o=e.scope_.immer_.shouldUseStrictIteration()}else n=shallowCopy(t,!0);return each(n,(l,d)=>{set$2(n,l,currentImpl(d))},o),e&&(e.finalized_=!1),n}function enablePatches(){process.env.NODE_ENV!=="production"&&errors.push('Sets cannot have "replace" patches.',function(A){return"Unsupported patch operation: "+A},function(A){return"Cannot apply patch, path doesn't resolve: "+A},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");function e(A,M=[]){if("key_"in A&&A.key_!==void 0){const I=A.parent_.copy_??A.parent_.base_,j=getProxyDraft(get$3(I,A.key_)),q=get$3(I,A.key_);if(q===void 0||q!==A.draft_&&q!==A.base_&&q!==A.copy_||j!=null&&j.base_!==A.base_)return null;const Q=A.parent_.type_===3;let te;if(Q){const F=A.parent_;te=Array.from(F.drafts_.keys()).indexOf(A.key_)}else te=A.key_;if(!(Q&&I.size>te||has$1(I,te)))return null;M.push(te)}if(A.parent_)return e(A.parent_,M);M.reverse();try{n(A.copy_,M)}catch{return null}return M}function n(A,M){let I=A;for(let j=0;j<M.length-1;j++){const q=M[j];if(I=get$3(I,q),!isObjectish(I)||I===null)throw new Error(`Cannot resolve path at '${M.join("/")}'`)}return I}const o="replace",l="add",d="remove";function f(A,M,I){if(A.scope_.processedForPatches_.has(A))return;A.scope_.processedForPatches_.add(A);const{patches_:j,inversePatches_:q}=I;switch(A.type_){case 0:case 2:return b(A,M,j,q);case 1:return g(A,M,j,q);case 3:return _(A,M,j,q)}}function g(A,M,I,j){let{base_:q,assigned_:Q}=A,te=A.copy_;te.length<q.length&&([q,te]=[te,q],[I,j]=[j,I]);const F=A.allIndicesReassigned_===!0;for(let V=0;V<q.length;V++){const ne=te[V],ae=q[V];if((F||(Q==null?void 0:Q.get(V.toString())))&&ne!==ae){const $e=ne==null?void 0:ne[DRAFT_STATE];if($e&&$e.modified_)continue;const Ne=M.concat([V]);I.push({op:o,path:Ne,value:E(ne)}),j.push({op:o,path:Ne,value:E(ae)})}}for(let V=q.length;V<te.length;V++){const ne=M.concat([V]);I.push({op:l,path:ne,value:E(te[V])})}for(let V=te.length-1;q.length<=V;--V){const ne=M.concat([V]);j.push({op:d,path:ne})}}function b(A,M,I,j){const{base_:q,copy_:Q,type_:te}=A;each(A.assigned_,(F,V)=>{const ne=get$3(q,F,te),ae=get$3(Q,F,te),se=V?has$1(q,F)?o:l:d;if(ne===ae&&se===o)return;const $e=M.concat(F);I.push(se===d?{op:se,path:$e}:{op:se,path:$e,value:E(ae)}),j.push(se===l?{op:d,path:$e}:se===d?{op:l,path:$e,value:E(ne)}:{op:o,path:$e,value:E(ne)})})}function _(A,M,I,j){let{base_:q,copy_:Q}=A,te=0;q.forEach(F=>{if(!Q.has(F)){const V=M.concat([te]);I.push({op:d,path:V,value:F}),j.unshift({op:l,path:V,value:F})}te++}),te=0,Q.forEach(F=>{if(!q.has(F)){const V=M.concat([te]);I.push({op:l,path:V,value:F}),j.unshift({op:d,path:V,value:F})}te++})}function S(A,M,I){const{patches_:j,inversePatches_:q}=I;j.push({op:o,path:[],value:M===NOTHING?void 0:M}),q.push({op:o,path:[],value:A})}function R(A,M){return M.forEach(I=>{const{path:j,op:q}=I;let Q=A;for(let ne=0;ne<j.length-1;ne++){const ae=getArchtype(Q);let se=j[ne];typeof se!="string"&&typeof se!="number"&&(se=""+se),(ae===0||ae===1)&&(se==="__proto__"||se===CONSTRUCTOR)&&die(19),isFunction$6(Q)&&se===PROTOTYPE&&die(19),Q=get$3(Q,se),isObjectish(Q)||die(18,j.join("/"))}const te=getArchtype(Q),F=C(I.value),V=j[j.length-1];switch(q){case o:switch(te){case 2:return Q.set(V,F);case 3:die(16);default:return Q[V]=F}case l:switch(te){case 1:return V==="-"?Q.push(F):Q.splice(V,0,F);case 2:return Q.set(V,F);case 3:return Q.add(F);default:return Q[V]=F}case d:switch(te){case 1:return Q.splice(V,1);case 2:return Q.delete(V);case 3:return Q.delete(I.value);default:return delete Q[V]}default:die(17,q)}}),A}function C(A){if(!isDraftable(A))return A;if(isArray$2(A))return A.map(C);if(isMap(A))return new Map(Array.from(A.entries()).map(([I,j])=>[I,C(j)]));if(isSet(A))return new Set(Array.from(A).map(C));const M=Object.create(getPrototypeOf$1(A));for(const I in A)M[I]=C(A[I]);return has$1(A,DRAFTABLE)&&(M[DRAFTABLE]=A[DRAFTABLE]),M}function E(A){return isDraft(A)?C(A):A}loadPlugin(PluginPatches,{applyPatches_:R,generatePatches_:f,generateReplacementPatches_:S,getPath:e})}var immer=new Immer2,produce=immer.produce,produceWithPatches=immer.produceWithPatches.bind(immer),applyPatches=immer.applyPatches.bind(immer),runIdentityFunctionCheck=(t,e,n)=>{if(e.length===1&&e[0]===n){let o=!1;try{const l={};t(l)===l&&(o=!0)}catch{}if(o){let l;try{throw new Error}catch(d){({stack:l}=d)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
519
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return React__namespace.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning$1=({contentRef:t,descriptionId:e})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var d;const l=(d=t.current)==null?void 0:d.getAttribute("aria-describedby");e&&l&&(document.getElementById(e)||console.warn(o))},[o,t,e]),null},Root$a=Dialog$1,Trigger$6=DialogTrigger$1,Portal$4=DialogPortal$1,Overlay=DialogOverlay$1,Content$3=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:t=!1,...e})=>jsxRuntime.jsx(Root$a,{modal:t,...e});Dialog.displayName=Root$a.displayName;const DialogTrigger=Trigger$6,DialogPortal=Portal$4,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(Overlay,{ref:n,className:cn("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",t),...e}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:t,children:e,animateExit:n=!0,overlayClassName:o,showOverlay:l,...d},f)=>jsxRuntime.jsxs(DialogPortal,{forceMount:d.forceMount,children:[o&&l?jsxRuntime.jsx("div",{"aria-hidden":"true",className:cn("fixed inset-0 z-[10000] pointer-events-none",o)}):null,jsxRuntime.jsx(DialogOverlay,{className:o}),jsxRuntime.jsxs(Content$3,{ref:f,className:cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n&&"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",o&&l&&"z-[10001]",t),...d,children:[e,jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(X$1,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$3.displayName;const DialogHeader=({className:t,...e})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:t,...e})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",t),...e}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",t),...e}));DialogDescription.displayName=Description$1.displayName;const sides=["top","right","bottom","left"],min$4=Math.min,max$4=Math.max,round$1=Math.round,floor=Math.floor,createCoords=t=>({x:t,y:t}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(t,e,n){return max$4(t,min$4(e,n))}function evaluate(t,e){return typeof t=="function"?t(e):t}function getSide$1(t){return t.split("-")[0]}function getAlignment(t){return t.split("-")[1]}function getOppositeAxis(t){return t==="x"?"y":"x"}function getAxisLength(t){return t==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(t){return yAxisSides.has(getSide$1(t))?"y":"x"}function getAlignmentAxis(t){return getOppositeAxis(getSideAxis(t))}function getAlignmentSides(t,e,n){n===void 0&&(n=!1);const o=getAlignment(t),l=getAlignmentAxis(t),d=getAxisLength(l);let f=l==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[d]>e.floating[d]&&(f=getOppositePlacement(f)),[f,getOppositePlacement(f)]}function getExpandedPlacements(t){const e=getOppositePlacement(t);return[getOppositeAlignmentPlacement(t),e,getOppositeAlignmentPlacement(e)]}function getOppositeAlignmentPlacement(t){return t.replace(/start|end/g,e=>oppositeAlignmentMap[e])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(t,e,n){switch(t){case"top":case"bottom":return n?e?rlPlacement:lrPlacement:e?lrPlacement:rlPlacement;case"left":case"right":return e?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(t,e,n,o){const l=getAlignment(t);let d=getSideList(getSide$1(t),n==="start",o);return l&&(d=d.map(f=>f+"-"+l),e&&(d=d.concat(d.map(getOppositeAlignmentPlacement)))),d}function getOppositePlacement(t){return t.replace(/left|right|bottom|top/g,e=>oppositeSideMap[e])}function expandPaddingObject(t){return{top:0,right:0,bottom:0,left:0,...t}}function getPaddingObject(t){return typeof t!="number"?expandPaddingObject(t):{top:t,right:t,bottom:t,left:t}}function rectToClientRect(t){const{x:e,y:n,width:o,height:l}=t;return{width:o,height:l,top:n,left:e,right:e+o,bottom:n+l,x:e,y:n}}function computeCoordsFromPlacement(t,e,n){let{reference:o,floating:l}=t;const d=getSideAxis(e),f=getAlignmentAxis(e),g=getAxisLength(f),b=getSide$1(e),_=d==="y",S=o.x+o.width/2-l.width/2,R=o.y+o.height/2-l.height/2,C=o[g]/2-l[g]/2;let E;switch(b){case"top":E={x:S,y:o.y-l.height};break;case"bottom":E={x:S,y:o.y+o.height};break;case"right":E={x:o.x+o.width,y:R};break;case"left":E={x:o.x-l.width,y:R};break;default:E={x:o.x,y:o.y}}switch(getAlignment(e)){case"start":E[f]-=C*(n&&_?-1:1);break;case"end":E[f]+=C*(n&&_?-1:1);break}return E}const computePosition$1=async(t,e,n)=>{const{placement:o="bottom",strategy:l="absolute",middleware:d=[],platform:f}=n,g=d.filter(Boolean),b=await(f.isRTL==null?void 0:f.isRTL(e));let _=await f.getElementRects({reference:t,floating:e,strategy:l}),{x:S,y:R}=computeCoordsFromPlacement(_,o,b),C=o,E={},A=0;for(let M=0;M<g.length;M++){const{name:I,fn:j}=g[M],{x:q,y:Q,data:te,reset:F}=await j({x:S,y:R,initialPlacement:o,placement:C,strategy:l,middlewareData:E,rects:_,platform:f,elements:{reference:t,floating:e}});S=q??S,R=Q??R,E={...E,[I]:{...E[I],...te}},F&&A<=50&&(A++,typeof F=="object"&&(F.placement&&(C=F.placement),F.rects&&(_=F.rects===!0?await f.getElementRects({reference:t,floating:e,strategy:l}):F.rects),{x:S,y:R}=computeCoordsFromPlacement(_,C,b)),M=-1)}return{x:S,y:R,placement:C,strategy:l,middlewareData:E}};async function detectOverflow(t,e){var n;e===void 0&&(e={});const{x:o,y:l,platform:d,rects:f,elements:g,strategy:b}=t,{boundary:_="clippingAncestors",rootBoundary:S="viewport",elementContext:R="floating",altBoundary:C=!1,padding:E=0}=evaluate(e,t),A=getPaddingObject(E),I=g[C?R==="floating"?"reference":"floating":R],j=rectToClientRect(await d.getClippingRect({element:(n=await(d.isElement==null?void 0:d.isElement(I)))==null||n?I:I.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(g.floating)),boundary:_,rootBoundary:S,strategy:b})),q=R==="floating"?{x:o,y:l,width:f.floating.width,height:f.floating.height}:f.reference,Q=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g.floating)),te=await(d.isElement==null?void 0:d.isElement(Q))?await(d.getScale==null?void 0:d.getScale(Q))||{x:1,y:1}:{x:1,y:1},F=rectToClientRect(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:q,offsetParent:Q,strategy:b}):q);return{top:(j.top-F.top+A.top)/te.y,bottom:(F.bottom-j.bottom+A.bottom)/te.y,left:(j.left-F.left+A.left)/te.x,right:(F.right-j.right+A.right)/te.x}}const arrow$4=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:l,rects:d,platform:f,elements:g,middlewareData:b}=e,{element:_,padding:S=0}=evaluate(t,e)||{};if(_==null)return{};const R=getPaddingObject(S),C={x:n,y:o},E=getAlignmentAxis(l),A=getAxisLength(E),M=await f.getDimensions(_),I=E==="y",j=I?"top":"left",q=I?"bottom":"right",Q=I?"clientHeight":"clientWidth",te=d.reference[A]+d.reference[E]-C[E]-d.floating[A],F=C[E]-d.reference[E],V=await(f.getOffsetParent==null?void 0:f.getOffsetParent(_));let ne=V?V[Q]:0;(!ne||!await(f.isElement==null?void 0:f.isElement(V)))&&(ne=g.floating[Q]||d.floating[A]);const ae=te/2-F/2,se=ne/2-M[A]/2-1,$e=min$4(R[j],se),Ne=min$4(R[q],se),oe=$e,Oe=ne-M[A]-Ne,Ae=ne/2-M[A]/2+ae,je=clamp$1(oe,Ae,Oe),Be=!b.arrow&&getAlignment(l)!=null&&Ae!==je&&d.reference[A]/2-(Ae<oe?$e:Ne)-M[A]/2<0,qe=Be?Ae<oe?Ae-oe:Ae-Oe:0;return{[E]:C[E]+qe,data:{[E]:je,centerOffset:Ae-je-qe,...Be&&{alignmentOffset:qe}},reset:Be}}}),flip$2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:l,middlewareData:d,rects:f,initialPlacement:g,platform:b,elements:_}=e,{mainAxis:S=!0,crossAxis:R=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:M=!0,...I}=evaluate(t,e);if((n=d.arrow)!=null&&n.alignmentOffset)return{};const j=getSide$1(l),q=getSideAxis(g),Q=getSide$1(g)===g,te=await(b.isRTL==null?void 0:b.isRTL(_.floating)),F=C||(Q||!M?[getOppositePlacement(g)]:getExpandedPlacements(g)),V=A!=="none";!C&&V&&F.push(...getOppositeAxisPlacements(g,M,A,te));const ne=[g,...F],ae=await detectOverflow(e,I),se=[];let $e=((o=d.flip)==null?void 0:o.overflows)||[];if(S&&se.push(ae[j]),R){const Ae=getAlignmentSides(l,f,te);se.push(ae[Ae[0]],ae[Ae[1]])}if($e=[...$e,{placement:l,overflows:se}],!se.every(Ae=>Ae<=0)){var Ne,oe;const Ae=(((Ne=d.flip)==null?void 0:Ne.index)||0)+1,je=ne[Ae];if(je&&(!(R==="alignment"?q!==getSideAxis(je):!1)||$e.every(Ve=>getSideAxis(Ve.placement)===q?Ve.overflows[0]>0:!0)))return{data:{index:Ae,overflows:$e},reset:{placement:je}};let Be=(oe=$e.filter(qe=>qe.overflows[0]<=0).sort((qe,Ve)=>qe.overflows[1]-Ve.overflows[1])[0])==null?void 0:oe.placement;if(!Be)switch(E){case"bestFit":{var Oe;const qe=(Oe=$e.filter(Ve=>{if(V){const Le=getSideAxis(Ve.placement);return Le===q||Le==="y"}return!0}).map(Ve=>[Ve.placement,Ve.overflows.filter(Le=>Le>0).reduce((Le,Ue)=>Le+Ue,0)]).sort((Ve,Le)=>Ve[1]-Le[1])[0])==null?void 0:Oe[0];qe&&(Be=qe);break}case"initialPlacement":Be=g;break}if(l!==Be)return{reset:{placement:Be}}}return{}}}};function getSideOffsets(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function isAnySideFullyClipped(t){return sides.some(e=>t[e]>=0)}const hide$2=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...l}=evaluate(t,e);switch(o){case"referenceHidden":{const d=await detectOverflow(e,{...l,elementContext:"reference"}),f=getSideOffsets(d,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:isAnySideFullyClipped(f)}}}case"escaped":{const d=await detectOverflow(e,{...l,altBoundary:!0}),f=getSideOffsets(d,n.floating);return{data:{escapedOffsets:f,escaped:isAnySideFullyClipped(f)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(t,e){const{placement:n,platform:o,elements:l}=t,d=await(o.isRTL==null?void 0:o.isRTL(l.floating)),f=getSide$1(n),g=getAlignment(n),b=getSideAxis(n)==="y",_=originSides.has(f)?-1:1,S=d&&b?-1:1,R=evaluate(e,t);let{mainAxis:C,crossAxis:E,alignmentAxis:A}=typeof R=="number"?{mainAxis:R,crossAxis:0,alignmentAxis:null}:{mainAxis:R.mainAxis||0,crossAxis:R.crossAxis||0,alignmentAxis:R.alignmentAxis};return g&&typeof A=="number"&&(E=g==="end"?A*-1:A),b?{x:E*S,y:C*_}:{x:C*_,y:E*S}}const offset$2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:l,y:d,placement:f,middlewareData:g}=e,b=await convertValueToCoords(e,t);return f===((n=g.offset)==null?void 0:n.placement)&&(o=g.arrow)!=null&&o.alignmentOffset?{}:{x:l+b.x,y:d+b.y,data:{...b,placement:f}}}}},shift$3=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:l}=e,{mainAxis:d=!0,crossAxis:f=!1,limiter:g={fn:I=>{let{x:j,y:q}=I;return{x:j,y:q}}},...b}=evaluate(t,e),_={x:n,y:o},S=await detectOverflow(e,b),R=getSideAxis(getSide$1(l)),C=getOppositeAxis(R);let E=_[C],A=_[R];if(d){const I=C==="y"?"top":"left",j=C==="y"?"bottom":"right",q=E+S[I],Q=E-S[j];E=clamp$1(q,E,Q)}if(f){const I=R==="y"?"top":"left",j=R==="y"?"bottom":"right",q=A+S[I],Q=A-S[j];A=clamp$1(q,A,Q)}const M=g.fn({...e,[C]:E,[R]:A});return{...M,data:{x:M.x-n,y:M.y-o,enabled:{[C]:d,[R]:f}}}}}},limitShift$2=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:l,rects:d,middlewareData:f}=e,{offset:g=0,mainAxis:b=!0,crossAxis:_=!0}=evaluate(t,e),S={x:n,y:o},R=getSideAxis(l),C=getOppositeAxis(R);let E=S[C],A=S[R];const M=evaluate(g,e),I=typeof M=="number"?{mainAxis:M,crossAxis:0}:{mainAxis:0,crossAxis:0,...M};if(b){const Q=C==="y"?"height":"width",te=d.reference[C]-d.floating[Q]+I.mainAxis,F=d.reference[C]+d.reference[Q]-I.mainAxis;E<te?E=te:E>F&&(E=F)}if(_){var j,q;const Q=C==="y"?"width":"height",te=originSides.has(getSide$1(l)),F=d.reference[R]-d.floating[Q]+(te&&((j=f.offset)==null?void 0:j[R])||0)+(te?0:I.crossAxis),V=d.reference[R]+d.reference[Q]+(te?0:((q=f.offset)==null?void 0:q[R])||0)-(te?I.crossAxis:0);A<F?A=F:A>V&&(A=V)}return{[C]:E,[R]:A}}}},size$2=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:l,rects:d,platform:f,elements:g}=e,{apply:b=()=>{},..._}=evaluate(t,e),S=await detectOverflow(e,_),R=getSide$1(l),C=getAlignment(l),E=getSideAxis(l)==="y",{width:A,height:M}=d.floating;let I,j;R==="top"||R==="bottom"?(I=R,j=C===(await(f.isRTL==null?void 0:f.isRTL(g.floating))?"start":"end")?"left":"right"):(j=R,I=C==="end"?"top":"bottom");const q=M-S.top-S.bottom,Q=A-S.left-S.right,te=min$4(M-S[I],q),F=min$4(A-S[j],Q),V=!e.middlewareData.shift;let ne=te,ae=F;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(ae=Q),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(ne=q),V&&!C){const $e=max$4(S.left,0),Ne=max$4(S.right,0),oe=max$4(S.top,0),Oe=max$4(S.bottom,0);E?ae=A-2*($e!==0||Ne!==0?$e+Ne:max$4(S.left,S.right)):ne=M-2*(oe!==0||Oe!==0?oe+Oe:max$4(S.top,S.bottom))}await b({...e,availableWidth:ae,availableHeight:ne});const se=await f.getDimensions(g.floating);return A!==se.width||M!==se.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(t){return isNode(t)?(t.nodeName||"").toLowerCase():"#document"}function getWindow(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function getDocumentElement(t){var e;return(e=(isNode(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function isNode(t){return hasWindow()?t instanceof Node||t instanceof getWindow(t).Node:!1}function isElement(t){return hasWindow()?t instanceof Element||t instanceof getWindow(t).Element:!1}function isHTMLElement$2(t){return hasWindow()?t instanceof HTMLElement||t instanceof getWindow(t).HTMLElement:!1}function isShadowRoot(t){return!hasWindow()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof getWindow(t).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(t){const{overflow:e,overflowX:n,overflowY:o,display:l}=getComputedStyle$1(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!invalidOverflowDisplayValues.has(l)}const tableElements=new Set(["table","td","th"]);function isTableElement(t){return tableElements.has(getNodeName(t))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(t){return topLayerSelectors.some(e=>{try{return t.matches(e)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(t){const e=isWebKit(),n=isElement(t)?getComputedStyle$1(t):t;return transformProperties.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||willChangeValues.some(o=>(n.willChange||"").includes(o))||containValues.some(o=>(n.contain||"").includes(o))}function getContainingBlock(t){let e=getParentNode(t);for(;isHTMLElement$2(e)&&!isLastTraversableNode(e);){if(isContainingBlock(e))return e;if(isTopLayer(e))return null;e=getParentNode(e)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(t){return lastTraversableNodeNames.has(getNodeName(t))}function getComputedStyle$1(t){return getWindow(t).getComputedStyle(t)}function getNodeScroll(t){return isElement(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function getParentNode(t){if(getNodeName(t)==="html")return t;const e=t.assignedSlot||t.parentNode||isShadowRoot(t)&&t.host||getDocumentElement(t);return isShadowRoot(e)?e.host:e}function getNearestOverflowAncestor(t){const e=getParentNode(t);return isLastTraversableNode(e)?t.ownerDocument?t.ownerDocument.body:t.body:isHTMLElement$2(e)&&isOverflowElement(e)?e:getNearestOverflowAncestor(e)}function getOverflowAncestors(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const l=getNearestOverflowAncestor(t),d=l===((o=t.ownerDocument)==null?void 0:o.body),f=getWindow(l);if(d){const g=getFrameElement(f);return e.concat(f,f.visualViewport||[],isOverflowElement(l)?l:[],g&&n?getOverflowAncestors(g):[])}return e.concat(l,getOverflowAncestors(l,[],n))}function getFrameElement(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function getCssDimensions(t){const e=getComputedStyle$1(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const l=isHTMLElement$2(t),d=l?t.offsetWidth:n,f=l?t.offsetHeight:o,g=round$1(n)!==d||round$1(o)!==f;return g&&(n=d,o=f),{width:n,height:o,$:g}}function unwrapElement(t){return isElement(t)?t:t.contextElement}function getScale(t){const e=unwrapElement(t);if(!isHTMLElement$2(e))return createCoords(1);const n=e.getBoundingClientRect(),{width:o,height:l,$:d}=getCssDimensions(e);let f=(d?round$1(n.width):n.width)/o,g=(d?round$1(n.height):n.height)/l;return(!f||!Number.isFinite(f))&&(f=1),(!g||!Number.isFinite(g))&&(g=1),{x:f,y:g}}const noOffsets=createCoords(0);function getVisualOffsets(t){const e=getWindow(t);return!isWebKit()||!e.visualViewport?noOffsets:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function shouldAddVisualOffsets(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==getWindow(t)?!1:e}function getBoundingClientRect(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const l=t.getBoundingClientRect(),d=unwrapElement(t);let f=createCoords(1);e&&(o?isElement(o)&&(f=getScale(o)):f=getScale(t));const g=shouldAddVisualOffsets(d,n,o)?getVisualOffsets(d):createCoords(0);let b=(l.left+g.x)/f.x,_=(l.top+g.y)/f.y,S=l.width/f.x,R=l.height/f.y;if(d){const C=getWindow(d),E=o&&isElement(o)?getWindow(o):o;let A=C,M=getFrameElement(A);for(;M&&o&&E!==A;){const I=getScale(M),j=M.getBoundingClientRect(),q=getComputedStyle$1(M),Q=j.left+(M.clientLeft+parseFloat(q.paddingLeft))*I.x,te=j.top+(M.clientTop+parseFloat(q.paddingTop))*I.y;b*=I.x,_*=I.y,S*=I.x,R*=I.y,b+=Q,_+=te,A=getWindow(M),M=getFrameElement(A)}}return rectToClientRect({width:S,height:R,x:b,y:_})}function getWindowScrollBarX(t,e){const n=getNodeScroll(t).scrollLeft;return e?e.left+n:getBoundingClientRect(getDocumentElement(t)).left+n}function getHTMLOffset(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-getWindowScrollBarX(t,n),l=n.top+e.scrollTop;return{x:o,y:l}}function convertOffsetParentRelativeRectToViewportRelativeRect(t){let{elements:e,rect:n,offsetParent:o,strategy:l}=t;const d=l==="fixed",f=getDocumentElement(o),g=e?isTopLayer(e.floating):!1;if(o===f||g&&d)return n;let b={scrollLeft:0,scrollTop:0},_=createCoords(1);const S=createCoords(0),R=isHTMLElement$2(o);if((R||!R&&!d)&&((getNodeName(o)!=="body"||isOverflowElement(f))&&(b=getNodeScroll(o)),isHTMLElement$2(o))){const E=getBoundingClientRect(o);_=getScale(o),S.x=E.x+o.clientLeft,S.y=E.y+o.clientTop}const C=f&&!R&&!d?getHTMLOffset(f,b):createCoords(0);return{width:n.width*_.x,height:n.height*_.y,x:n.x*_.x-b.scrollLeft*_.x+S.x+C.x,y:n.y*_.y-b.scrollTop*_.y+S.y+C.y}}function getClientRects(t){return Array.from(t.getClientRects())}function getDocumentRect(t){const e=getDocumentElement(t),n=getNodeScroll(t),o=t.ownerDocument.body,l=max$4(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),d=max$4(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let f=-n.scrollLeft+getWindowScrollBarX(t);const g=-n.scrollTop;return getComputedStyle$1(o).direction==="rtl"&&(f+=max$4(e.clientWidth,o.clientWidth)-l),{width:l,height:d,x:f,y:g}}const SCROLLBAR_MAX=25;function getViewportRect(t,e){const n=getWindow(t),o=getDocumentElement(t),l=n.visualViewport;let d=o.clientWidth,f=o.clientHeight,g=0,b=0;if(l){d=l.width,f=l.height;const S=isWebKit();(!S||S&&e==="fixed")&&(g=l.offsetLeft,b=l.offsetTop)}const _=getWindowScrollBarX(o);if(_<=0){const S=o.ownerDocument,R=S.body,C=getComputedStyle(R),E=S.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,A=Math.abs(o.clientWidth-R.clientWidth-E);A<=SCROLLBAR_MAX&&(d-=A)}else _<=SCROLLBAR_MAX&&(d+=_);return{width:d,height:f,x:g,y:b}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(t,e){const n=getBoundingClientRect(t,!0,e==="fixed"),o=n.top+t.clientTop,l=n.left+t.clientLeft,d=isHTMLElement$2(t)?getScale(t):createCoords(1),f=t.clientWidth*d.x,g=t.clientHeight*d.y,b=l*d.x,_=o*d.y;return{width:f,height:g,x:b,y:_}}function getClientRectFromClippingAncestor(t,e,n){let o;if(e==="viewport")o=getViewportRect(t,n);else if(e==="document")o=getDocumentRect(getDocumentElement(t));else if(isElement(e))o=getInnerBoundingClientRect(e,n);else{const l=getVisualOffsets(t);o={x:e.x-l.x,y:e.y-l.y,width:e.width,height:e.height}}return rectToClientRect(o)}function hasFixedPositionAncestor(t,e){const n=getParentNode(t);return n===e||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,e)}function getClippingElementAncestors(t,e){const n=e.get(t);if(n)return n;let o=getOverflowAncestors(t,[],!1).filter(g=>isElement(g)&&getNodeName(g)!=="body"),l=null;const d=getComputedStyle$1(t).position==="fixed";let f=d?getParentNode(t):t;for(;isElement(f)&&!isLastTraversableNode(f);){const g=getComputedStyle$1(f),b=isContainingBlock(f);!b&&g.position==="fixed"&&(l=null),(d?!b&&!l:!b&&g.position==="static"&&!!l&&absoluteOrFixed.has(l.position)||isOverflowElement(f)&&!b&&hasFixedPositionAncestor(t,f))?o=o.filter(S=>S!==f):l=g,f=getParentNode(f)}return e.set(t,o),o}function getClippingRect(t){let{element:e,boundary:n,rootBoundary:o,strategy:l}=t;const f=[...n==="clippingAncestors"?isTopLayer(e)?[]:getClippingElementAncestors(e,this._c):[].concat(n),o],g=f[0],b=f.reduce((_,S)=>{const R=getClientRectFromClippingAncestor(e,S,l);return _.top=max$4(R.top,_.top),_.right=min$4(R.right,_.right),_.bottom=min$4(R.bottom,_.bottom),_.left=max$4(R.left,_.left),_},getClientRectFromClippingAncestor(e,g,l));return{width:b.right-b.left,height:b.bottom-b.top,x:b.left,y:b.top}}function getDimensions(t){const{width:e,height:n}=getCssDimensions(t);return{width:e,height:n}}function getRectRelativeToOffsetParent(t,e,n){const o=isHTMLElement$2(e),l=getDocumentElement(e),d=n==="fixed",f=getBoundingClientRect(t,!0,d,e);let g={scrollLeft:0,scrollTop:0};const b=createCoords(0);function _(){b.x=getWindowScrollBarX(l)}if(o||!o&&!d)if((getNodeName(e)!=="body"||isOverflowElement(l))&&(g=getNodeScroll(e)),o){const E=getBoundingClientRect(e,!0,d,e);b.x=E.x+e.clientLeft,b.y=E.y+e.clientTop}else l&&_();d&&!o&&l&&_();const S=l&&!o&&!d?getHTMLOffset(l,g):createCoords(0),R=f.left+g.scrollLeft-b.x-S.x,C=f.top+g.scrollTop-b.y-S.y;return{x:R,y:C,width:f.width,height:f.height}}function isStaticPositioned(t){return getComputedStyle$1(t).position==="static"}function getTrueOffsetParent(t,e){if(!isHTMLElement$2(t)||getComputedStyle$1(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return getDocumentElement(t)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(t,e){const n=getWindow(t);if(isTopLayer(t))return n;if(!isHTMLElement$2(t)){let l=getParentNode(t);for(;l&&!isLastTraversableNode(l);){if(isElement(l)&&!isStaticPositioned(l))return l;l=getParentNode(l)}return n}let o=getTrueOffsetParent(t,e);for(;o&&isTableElement(o)&&isStaticPositioned(o);)o=getTrueOffsetParent(o,e);return o&&isLastTraversableNode(o)&&isStaticPositioned(o)&&!isContainingBlock(o)?n:o||getContainingBlock(t)||n}const getElementRects=async function(t){const e=this.getOffsetParent||getOffsetParent,n=this.getDimensions,o=await n(t.floating);return{reference:getRectRelativeToOffsetParent(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function isRTL(t){return getComputedStyle$1(t).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function observeMove(t,e){let n=null,o;const l=getDocumentElement(t);function d(){var g;clearTimeout(o),(g=n)==null||g.disconnect(),n=null}function f(g,b){g===void 0&&(g=!1),b===void 0&&(b=1),d();const _=t.getBoundingClientRect(),{left:S,top:R,width:C,height:E}=_;if(g||e(),!C||!E)return;const A=floor(R),M=floor(l.clientWidth-(S+C)),I=floor(l.clientHeight-(R+E)),j=floor(S),Q={rootMargin:-A+"px "+-M+"px "+-I+"px "+-j+"px",threshold:max$4(0,min$4(1,b))||1};let te=!0;function F(V){const ne=V[0].intersectionRatio;if(ne!==b){if(!te)return f();ne?f(!1,ne):o=setTimeout(()=>{f(!1,1e-7)},1e3)}ne===1&&!rectsAreEqual(_,t.getBoundingClientRect())&&f(),te=!1}try{n=new IntersectionObserver(F,{...Q,root:l.ownerDocument})}catch{n=new IntersectionObserver(F,Q)}n.observe(t)}return f(!0),d}function autoUpdate(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:d=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:b=!1}=o,_=unwrapElement(t),S=l||d?[..._?getOverflowAncestors(_):[],...getOverflowAncestors(e)]:[];S.forEach(j=>{l&&j.addEventListener("scroll",n,{passive:!0}),d&&j.addEventListener("resize",n)});const R=_&&g?observeMove(_,n):null;let C=-1,E=null;f&&(E=new ResizeObserver(j=>{let[q]=j;q&&q.target===_&&E&&(E.unobserve(e),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var Q;(Q=E)==null||Q.observe(e)})),n()}),_&&!b&&E.observe(_),E.observe(e));let A,M=b?getBoundingClientRect(t):null;b&&I();function I(){const j=getBoundingClientRect(t);M&&!rectsAreEqual(M,j)&&n(),M=j,A=requestAnimationFrame(I)}return n(),()=>{var j;S.forEach(q=>{l&&q.removeEventListener("scroll",n),d&&q.removeEventListener("resize",n)}),R==null||R(),(j=E)==null||j.disconnect(),E=null,b&&cancelAnimationFrame(A)}}const offset$1=offset$2,shift$2=shift$3,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$3=arrow$4,limitShift$1=limitShift$2,computePosition=(t,e,n)=>{const o=new Map,l={platform,...n},d={...l.platform,_c:o};return computePosition$1(t,e,{...l,platform:d})};var isClient=typeof document<"u",noop$3=function(){},index=isClient?React.useLayoutEffect:noop$3;function deepEqual$3(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,l;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!deepEqual$3(t[o],e[o]))return!1;return!0}if(l=Object.keys(t),n=l.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,l[o]))return!1;for(o=n;o--!==0;){const d=l[o];if(!(d==="_owner"&&t.$$typeof)&&!deepEqual$3(t[d],e[d]))return!1}return!0}return t!==t&&e!==e}function getDPR(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(t,e){const n=getDPR(t);return Math.round(e*n)/n}function useLatestRef(t){const e=React__namespace.useRef(t);return index(()=>{e.current=t}),e}function useFloating(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:l,elements:{reference:d,floating:f}={},transform:g=!0,whileElementsMounted:b,open:_}=t,[S,R]=React__namespace.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[C,E]=React__namespace.useState(o);deepEqual$3(C,o)||E(o);const[A,M]=React__namespace.useState(null),[I,j]=React__namespace.useState(null),q=React__namespace.useCallback(Ve=>{Ve!==V.current&&(V.current=Ve,M(Ve))},[]),Q=React__namespace.useCallback(Ve=>{Ve!==ne.current&&(ne.current=Ve,j(Ve))},[]),te=d||A,F=f||I,V=React__namespace.useRef(null),ne=React__namespace.useRef(null),ae=React__namespace.useRef(S),se=b!=null,$e=useLatestRef(b),Ne=useLatestRef(l),oe=useLatestRef(_),Oe=React__namespace.useCallback(()=>{if(!V.current||!ne.current)return;const Ve={placement:e,strategy:n,middleware:C};Ne.current&&(Ve.platform=Ne.current),computePosition(V.current,ne.current,Ve).then(Le=>{const Ue={...Le,isPositioned:oe.current!==!1};Ae.current&&!deepEqual$3(ae.current,Ue)&&(ae.current=Ue,ReactDOM__namespace.flushSync(()=>{R(Ue)}))})},[C,e,n,Ne,oe]);index(()=>{_===!1&&ae.current.isPositioned&&(ae.current.isPositioned=!1,R(Ve=>({...Ve,isPositioned:!1})))},[_]);const Ae=React__namespace.useRef(!1);index(()=>(Ae.current=!0,()=>{Ae.current=!1}),[]),index(()=>{if(te&&(V.current=te),F&&(ne.current=F),te&&F){if($e.current)return $e.current(te,F,Oe);Oe()}},[te,F,Oe,$e,se]);const je=React__namespace.useMemo(()=>({reference:V,floating:ne,setReference:q,setFloating:Q}),[q,Q]),Be=React__namespace.useMemo(()=>({reference:te,floating:F}),[te,F]),qe=React__namespace.useMemo(()=>{const Ve={position:n,left:0,top:0};if(!Be.floating)return Ve;const Le=roundByDPR(Be.floating,S.x),Ue=roundByDPR(Be.floating,S.y);return g?{...Ve,transform:"translate("+Le+"px, "+Ue+"px)",...getDPR(Be.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Le,top:Ue}},[n,g,Be.floating,S.x,S.y]);return React__namespace.useMemo(()=>({...S,update:Oe,refs:je,elements:Be,floatingStyles:qe}),[S,Oe,je,Be,qe])}const arrow$1=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:l}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?arrow$3({element:o.current,padding:l}).fn(n):{}:o?arrow$3({element:o,padding:l}).fn(n):{}}}},offset=(t,e)=>({...offset$1(t),options:[t,e]}),shift$1=(t,e)=>({...shift$2(t),options:[t,e]}),limitShift=(t,e)=>({...limitShift$1(t),options:[t,e]}),flip=(t,e)=>({...flip$1(t),options:[t,e]}),size=(t,e)=>({...size$1(t),options:[t,e]}),hide=(t,e)=>({...hide$1(t),options:[t,e]}),arrow$2=(t,e)=>({...arrow$1(t),options:[t,e]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((t,e)=>{const{children:n,width:o=10,height:l=5,...d}=t;return jsxRuntime.jsx(Primitive$4.svg,{...d,ref:e,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$9=Arrow$1,POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope$2(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=t=>{const{__scopePopper:e,children:n}=t,[o,l]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:e,anchor:o,onAnchorChange:l,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$2="PopperAnchor",PopperAnchor=React__namespace.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...l}=t,d=usePopperContext(ANCHOR_NAME$2,n),f=React__namespace.useRef(null),g=useComposedRefs(e,f),b=React__namespace.useRef(null);return React__namespace.useEffect(()=>{const _=b.current;b.current=(o==null?void 0:o.current)||f.current,_!==b.current&&d.onAnchorChange(b.current)}),o?null:jsxRuntime.jsx(Primitive$4.div,{...l,ref:g})});PopperAnchor.displayName=ANCHOR_NAME$2;var CONTENT_NAME$9="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$9),PopperContent=React__namespace.forwardRef((t,e)=>{var Qe,at,et,ot,ct,ze;const{__scopePopper:n,side:o="bottom",sideOffset:l=0,align:d="center",alignOffset:f=0,arrowPadding:g=0,avoidCollisions:b=!0,collisionBoundary:_=[],collisionPadding:S=0,sticky:R="partial",hideWhenDetached:C=!1,updatePositionStrategy:E="optimized",onPlaced:A,...M}=t,I=usePopperContext(CONTENT_NAME$9,n),[j,q]=React__namespace.useState(null),Q=useComposedRefs(e,$t=>q($t)),[te,F]=React__namespace.useState(null),V=useSize(te),ne=(V==null?void 0:V.width)??0,ae=(V==null?void 0:V.height)??0,se=o+(d!=="center"?"-"+d:""),$e=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},Ne=Array.isArray(_)?_:[_],oe=Ne.length>0,Oe={padding:$e,boundary:Ne.filter(isNotNull),altBoundary:oe},{refs:Ae,floatingStyles:je,placement:Be,isPositioned:qe,middlewareData:Ve}=useFloating({strategy:"fixed",placement:se,whileElementsMounted:(...$t)=>autoUpdate(...$t,{animationFrame:E==="always"}),elements:{reference:I.anchor},middleware:[offset({mainAxis:l+ae,alignmentAxis:f}),b&&shift$1({mainAxis:!0,crossAxis:!1,limiter:R==="partial"?limitShift():void 0,...Oe}),b&&flip({...Oe}),size({...Oe,apply:({elements:$t,rects:tt,availableWidth:yt,availableHeight:ft})=>{const{width:Ct,height:Mt}=tt.reference,It=$t.floating.style;It.setProperty("--radix-popper-available-width",`${yt}px`),It.setProperty("--radix-popper-available-height",`${ft}px`),It.setProperty("--radix-popper-anchor-width",`${Ct}px`),It.setProperty("--radix-popper-anchor-height",`${Mt}px`)}}),te&&arrow$2({element:te,padding:g}),transformOrigin({arrowWidth:ne,arrowHeight:ae}),C&&hide({strategy:"referenceHidden",...Oe})]}),[Le,Ue]=getSideAndAlignFromPlacement(Be),Ke=useCallbackRef$1(A);useLayoutEffect2(()=>{qe&&(Ke==null||Ke())},[qe,Ke]);const We=(Qe=Ve.arrow)==null?void 0:Qe.x,Xe=(at=Ve.arrow)==null?void 0:at.y,nt=((et=Ve.arrow)==null?void 0:et.centerOffset)!==0,[Ye,st]=React__namespace.useState();return useLayoutEffect2(()=>{j&&st(window.getComputedStyle(j).zIndex)},[j]),jsxRuntime.jsx("div",{ref:Ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...je,transform:qe?je.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ye,"--radix-popper-transform-origin":[(ot=Ve.transformOrigin)==null?void 0:ot.x,(ct=Ve.transformOrigin)==null?void 0:ct.y].join(" "),...((ze=Ve.hide)==null?void 0:ze.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:Le,onArrowChange:F,arrowX:We,arrowY:Xe,shouldHideArrow:nt,children:jsxRuntime.jsx(Primitive$4.div,{"data-side":Le,"data-align":Ue,...M,ref:Q,style:{...M.style,animation:qe?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$9;var ARROW_NAME$5="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(e,n){const{__scopePopper:o,...l}=e,d=useContentContext(ARROW_NAME$5,o),f=OPPOSITE_SIDE[d.placedSide];return jsxRuntime.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(Root$9,{...l,ref:n,style:{...l.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$5;function isNotNull(t){return t!==null}var transformOrigin=t=>({name:"transformOrigin",options:t,fn(e){var I,j,q;const{placement:n,rects:o,middlewareData:l}=e,f=((I=l.arrow)==null?void 0:I.centerOffset)!==0,g=f?0:t.arrowWidth,b=f?0:t.arrowHeight,[_,S]=getSideAndAlignFromPlacement(n),R={start:"0%",center:"50%",end:"100%"}[S],C=(((j=l.arrow)==null?void 0:j.x)??0)+g/2,E=(((q=l.arrow)==null?void 0:q.y)??0)+b/2;let A="",M="";return _==="bottom"?(A=f?R:`${C}px`,M=`${-b}px`):_==="top"?(A=f?R:`${C}px`,M=`${o.floating.height+b}px`):_==="right"?(A=`${-b}px`,M=f?R:`${E}px`):_==="left"&&(A=`${o.floating.width+b}px`,M=f?R:`${E}px`),{data:{x:A,y:M}}}});function getSideAndAlignFromPlacement(t){const[e,n="center"]=t.split("-");return[e,n]}var Root2$7=Popper,Anchor=PopperAnchor,Content$2=PopperContent,Arrow=PopperArrow;function createSlot$3(t){const e=createSlotClone$3(t),n=React__namespace.forwardRef((o,l)=>{const{children:d,...f}=o,g=React__namespace.Children.toArray(d),b=g.find(isSlottable$3);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(e,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(e,{...f,ref:l,children:d})});return n.displayName=`${t}.Slot`,n}function createSlotClone$3(t){const e=React__namespace.forwardRef((n,o)=>{const{children:l,...d}=n;if(React__namespace.isValidElement(l)){const f=getElementRef$3(l),g=mergeProps$3(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var SLOTTABLE_IDENTIFIER$5=Symbol("radix.slottable");function isSlottable$3(t){return React__namespace.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===SLOTTABLE_IDENTIFIER$5}function mergeProps$3(t,e){const n={...e};for(const o in e){const l=t[o],d=e[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...t,...n}}function getElementRef$3(t){var o,l;let e=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var SELECTION_KEYS$1=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS$1,"ArrowRight"],rtl:[...SELECTION_KEYS$1,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$2(MENU_NAME,[createCollectionScope$3,createPopperScope,createRovingFocusGroupScope]),usePopperScope$3=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=t=>{const{__scopeMenu:e,open:n=!1,children:o,dir:l,onOpenChange:d,modal:f=!0}=t,g=usePopperScope$3(e),[b,_]=React__namespace.useState(null),S=React__namespace.useRef(!1),R=useCallbackRef$1(d),C=useDirection(l);return React__namespace.useEffect(()=>{const E=()=>{S.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>S.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),jsxRuntime.jsx(Root2$7,{...g,children:jsxRuntime.jsx(MenuProvider,{scope:e,open:n,onOpenChange:R,content:b,onContentChange:_,children:jsxRuntime.jsx(MenuRootProvider,{scope:e,onClose:React__namespace.useCallback(()=>R(!1),[R]),isUsingKeyboardRef:S,dir:C,modal:f,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME$1="MenuAnchor",MenuAnchor=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t,l=usePopperScope$3(n);return jsxRuntime.jsx(Anchor,{...l,...o,ref:e})});MenuAnchor.displayName=ANCHOR_NAME$1;var PORTAL_NAME$5="MenuPortal",[PortalProvider$2,usePortalContext$2]=createMenuContext(PORTAL_NAME$5,{forceMount:void 0}),MenuPortal=t=>{const{__scopeMenu:e,forceMount:n,children:o,container:l}=t,d=useMenuContext(PORTAL_NAME$5,e);return jsxRuntime.jsx(PortalProvider$2,{scope:e,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||d.open,children:jsxRuntime.jsx(Portal$5,{asChild:!0,container:l,children:o})})})};MenuPortal.displayName=PORTAL_NAME$5;var CONTENT_NAME$8="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$8),MenuContent=React__namespace.forwardRef((t,e)=>{const n=usePortalContext$2(CONTENT_NAME$8,t.__scopeMenu),{forceMount:o=n.forceMount,...l}=t,d=useMenuContext(CONTENT_NAME$8,t.__scopeMenu),f=useMenuRootContext(CONTENT_NAME$8,t.__scopeMenu);return jsxRuntime.jsx(Collection$3.Provider,{scope:t.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||d.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:t.__scopeMenu,children:f.modal?jsxRuntime.jsx(MenuRootContentModal,{...l,ref:e}):jsxRuntime.jsx(MenuRootContentNonModal,{...l,ref:e})})})})}),MenuRootContentModal=React__namespace.forwardRef((t,e)=>{const n=useMenuContext(CONTENT_NAME$8,t.__scopeMenu),o=React__namespace.useRef(null),l=useComposedRefs(e,o);return React__namespace.useEffect(()=>{const d=o.current;if(d)return hideOthers(d)},[]),jsxRuntime.jsx(MenuContentImpl,{...t,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((t,e)=>{const n=useMenuContext(CONTENT_NAME$8,t.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot$3=createSlot$3("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:l,onOpenAutoFocus:d,onCloseAutoFocus:f,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:C,onDismiss:E,disableOutsideScroll:A,...M}=t,I=useMenuContext(CONTENT_NAME$8,n),j=useMenuRootContext(CONTENT_NAME$8,n),q=usePopperScope$3(n),Q=useRovingFocusGroupScope$1(n),te=useCollection$3(n),[F,V]=React__namespace.useState(null),ne=React__namespace.useRef(null),ae=useComposedRefs(e,ne,I.onContentChange),se=React__namespace.useRef(0),$e=React__namespace.useRef(""),Ne=React__namespace.useRef(0),oe=React__namespace.useRef(null),Oe=React__namespace.useRef("right"),Ae=React__namespace.useRef(0),je=A?ReactRemoveScroll:React__namespace.Fragment,Be=A?{as:Slot$3,allowPinchZoom:!0}:void 0,qe=Le=>{var Qe,at;const Ue=$e.current+Le,Ke=te().filter(et=>!et.disabled),We=document.activeElement,Xe=(Qe=Ke.find(et=>et.ref.current===We))==null?void 0:Qe.textValue,nt=Ke.map(et=>et.textValue),Ye=getNextMatch(nt,Ue,Xe),st=(at=Ke.find(et=>et.textValue===Ye))==null?void 0:at.ref.current;(function et(ot){$e.current=ot,window.clearTimeout(se.current),ot!==""&&(se.current=window.setTimeout(()=>et(""),1e3))})(Ue),st&&setTimeout(()=>st.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(se.current),[]),useFocusGuards();const Ve=React__namespace.useCallback(Le=>{var Ke,We;return Oe.current===((Ke=oe.current)==null?void 0:Ke.side)&&isPointerInGraceArea(Le,(We=oe.current)==null?void 0:We.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:$e,onItemEnter:React__namespace.useCallback(Le=>{Ve(Le)&&Le.preventDefault()},[Ve]),onItemLeave:React__namespace.useCallback(Le=>{var Ue;Ve(Le)||((Ue=ne.current)==null||Ue.focus(),V(null))},[Ve]),onTriggerLeave:React__namespace.useCallback(Le=>{Ve(Le)&&Le.preventDefault()},[Ve]),pointerGraceTimerRef:Ne,onPointerGraceIntentChange:React__namespace.useCallback(Le=>{oe.current=Le},[]),children:jsxRuntime.jsx(je,{...Be,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:composeEventHandlers(d,Le=>{var Ue;Le.preventDefault(),(Ue=ne.current)==null||Ue.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:_,onPointerDownOutside:S,onFocusOutside:R,onInteractOutside:C,onDismiss:E,children:jsxRuntime.jsx(Root$c,{asChild:!0,...Q,dir:j.dir,orientation:"vertical",loop:o,currentTabStopId:F,onCurrentTabStopIdChange:V,onEntryFocus:composeEventHandlers(b,Le=>{j.isUsingKeyboardRef.current||Le.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$2,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(I.open),"data-radix-menu-content":"",dir:j.dir,...q,...M,ref:ae,style:{outline:"none",...M.style},onKeyDown:composeEventHandlers(M.onKeyDown,Le=>{const Ke=Le.target.closest("[data-radix-menu-content]")===Le.currentTarget,We=Le.ctrlKey||Le.altKey||Le.metaKey,Xe=Le.key.length===1;Ke&&(Le.key==="Tab"&&Le.preventDefault(),!We&&Xe&&qe(Le.key));const nt=ne.current;if(Le.target!==nt||!FIRST_LAST_KEYS.includes(Le.key))return;Le.preventDefault();const st=te().filter(Qe=>!Qe.disabled).map(Qe=>Qe.ref.current);LAST_KEYS.includes(Le.key)&&st.reverse(),focusFirst$1(st)}),onBlur:composeEventHandlers(t.onBlur,Le=>{Le.currentTarget.contains(Le.target)||(window.clearTimeout(se.current),$e.current="")}),onPointerMove:composeEventHandlers(t.onPointerMove,whenMouse(Le=>{const Ue=Le.target,Ke=Ae.current!==Le.clientX;if(Le.currentTarget.contains(Ue)&&Ke){const We=Le.clientX>Ae.current?"right":"left";Oe.current=We,Ae.current=Le.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$8;var GROUP_NAME$2="MenuGroup",MenuGroup=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t;return jsxRuntime.jsx(Primitive$4.div,{role:"group",...o,ref:e})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t;return jsxRuntime.jsx(Primitive$4.div,{...o,ref:e})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$3="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:o,...l}=t,d=React__namespace.useRef(null),f=useMenuRootContext(ITEM_NAME$3,t.__scopeMenu),g=useMenuContentContext(ITEM_NAME$3,t.__scopeMenu),b=useComposedRefs(e,d),_=React__namespace.useRef(!1),S=()=>{const R=d.current;if(!n&&R){const C=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});R.addEventListener(ITEM_SELECT,E=>o==null?void 0:o(E),{once:!0}),dispatchDiscreteCustomEvent(R,C),C.defaultPrevented?_.current=!1:f.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...l,ref:b,disabled:n,onClick:composeEventHandlers(t.onClick,S),onPointerDown:R=>{var C;(C=t.onPointerDown)==null||C.call(t,R),_.current=!0},onPointerUp:composeEventHandlers(t.onPointerUp,R=>{var C;_.current||(C=R.currentTarget)==null||C.click()}),onKeyDown:composeEventHandlers(t.onKeyDown,R=>{const C=g.searchRef.current!=="";n||C&&R.key===" "||SELECTION_KEYS$1.includes(R.key)&&(R.currentTarget.click(),R.preventDefault())})})});MenuItem.displayName=ITEM_NAME$3;var MenuItemImpl=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:o=!1,textValue:l,...d}=t,f=useMenuContentContext(ITEM_NAME$3,n),g=useRovingFocusGroupScope$1(n),b=React__namespace.useRef(null),_=useComposedRefs(e,b),[S,R]=React__namespace.useState(!1),[C,E]=React__namespace.useState("");return React__namespace.useEffect(()=>{const A=b.current;A&&E((A.textContent??"").trim())},[d.children]),jsxRuntime.jsx(Collection$3.ItemSlot,{scope:n,disabled:o,textValue:l??C,children:jsxRuntime.jsx(Item$3,{asChild:!0,...g,focusable:!o,children:jsxRuntime.jsx(Primitive$4.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...d,ref:_,onPointerMove:composeEventHandlers(t.onPointerMove,whenMouse(A=>{o?f.onItemLeave(A):(f.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(t.onPointerLeave,whenMouse(A=>f.onItemLeave(A))),onFocus:composeEventHandlers(t.onFocus,()=>R(!0)),onBlur:composeEventHandlers(t.onBlur,()=>R(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:o,...l}=t;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:t.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate$1(n)?"mixed":n,...l,ref:e,"data-state":getCheckedState(n),onSelect:composeEventHandlers(l.onSelect,()=>o==null?void 0:o(isIndeterminate$1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=React__namespace.forwardRef((t,e)=>{const{value:n,onValueChange:o,...l}=t,d=useCallbackRef$1(o);return jsxRuntime.jsx(RadioGroupProvider,{scope:t.__scopeMenu,value:n,onValueChange:d,children:jsxRuntime.jsx(MenuGroup,{...l,ref:e})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((t,e)=>{const{value:n,...o}=t,l=useRadioGroupContext(RADIO_ITEM_NAME$1,t.__scopeMenu),d=n===l.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:t.__scopeMenu,checked:d,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":d,...o,ref:e,"data-state":getCheckedState(d),onSelect:composeEventHandlers(o.onSelect,()=>{var f;return(f=l.onValueChange)==null?void 0:f.call(l,n)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME$1="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME$1,{checked:!1}),MenuItemIndicator=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:o,...l}=t,d=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n);return jsxRuntime.jsx(Presence,{present:o||isIndeterminate$1(d.checked)||d.checked===!0,children:jsxRuntime.jsx(Primitive$4.span,{...l,ref:e,"data-state":getCheckedState(d.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t;return jsxRuntime.jsx(Primitive$4.div,{role:"separator","aria-orientation":"horizontal",...o,ref:e})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$4="MenuArrow",MenuArrow=React__namespace.forwardRef((t,e)=>{const{__scopeMenu:n,...o}=t,l=usePopperScope$3(n);return jsxRuntime.jsx(Arrow,{...l,...o,ref:e})});MenuArrow.displayName=ARROW_NAME$4;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=t=>{const{__scopeMenu:e,children:n,open:o=!1,onOpenChange:l}=t,d=useMenuContext(SUB_NAME,e),f=usePopperScope$3(e),[g,b]=React__namespace.useState(null),[_,S]=React__namespace.useState(null),R=useCallbackRef$1(l);return React__namespace.useEffect(()=>(d.open===!1&&R(!1),()=>R(!1)),[d.open,R]),jsxRuntime.jsx(Root2$7,{...f,children:jsxRuntime.jsx(MenuProvider,{scope:e,open:o,onOpenChange:R,content:_,onContentChange:S,children:jsxRuntime.jsx(MenuSubProvider,{scope:e,contentId:useId(),triggerId:useId(),trigger:g,onTriggerChange:b,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((t,e)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,t.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,t.__scopeMenu),l=useMenuSubContext(SUB_TRIGGER_NAME$1,t.__scopeMenu),d=useMenuContentContext(SUB_TRIGGER_NAME$1,t.__scopeMenu),f=React__namespace.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=d,_={__scopeMenu:t.__scopeMenu},S=React__namespace.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return React__namespace.useEffect(()=>S,[S]),React__namespace.useEffect(()=>{const R=g.current;return()=>{window.clearTimeout(R),b(null)}},[g,b]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,..._,children:jsxRuntime.jsx(MenuItemImpl,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":getOpenState(n.open),...t,ref:composeRefs(e,l.onTriggerChange),onClick:R=>{var C;(C=t.onClick)==null||C.call(t,R),!(t.disabled||R.defaultPrevented)&&(R.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(t.onPointerMove,whenMouse(R=>{d.onItemEnter(R),!R.defaultPrevented&&!t.disabled&&!n.open&&!f.current&&(d.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{n.onOpenChange(!0),S()},100))})),onPointerLeave:composeEventHandlers(t.onPointerLeave,whenMouse(R=>{var E,A;S();const C=(E=n.content)==null?void 0:E.getBoundingClientRect();if(C){const M=(A=n.content)==null?void 0:A.dataset.side,I=M==="right",j=I?-5:5,q=C[I?"left":"right"],Q=C[I?"right":"left"];d.onPointerGraceIntentChange({area:[{x:R.clientX+j,y:R.clientY},{x:q,y:C.top},{x:Q,y:C.top},{x:Q,y:C.bottom},{x:q,y:C.bottom}],side:M}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(R),R.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(t.onKeyDown,R=>{var E;const C=d.searchRef.current!=="";t.disabled||C&&R.key===" "||SUB_OPEN_KEYS[o.dir].includes(R.key)&&(n.onOpenChange(!0),(E=n.content)==null||E.focus(),R.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((t,e)=>{const n=usePortalContext$2(CONTENT_NAME$8,t.__scopeMenu),{forceMount:o=n.forceMount,...l}=t,d=useMenuContext(CONTENT_NAME$8,t.__scopeMenu),f=useMenuRootContext(CONTENT_NAME$8,t.__scopeMenu),g=useMenuSubContext(SUB_CONTENT_NAME$1,t.__scopeMenu),b=React__namespace.useRef(null),_=useComposedRefs(e,b);return jsxRuntime.jsx(Collection$3.Provider,{scope:t.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||d.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:t.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:g.contentId,"aria-labelledby":g.triggerId,...l,ref:_,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:S=>{var R;f.isUsingKeyboardRef.current&&((R=b.current)==null||R.focus()),S.preventDefault()},onCloseAutoFocus:S=>S.preventDefault(),onFocusOutside:composeEventHandlers(t.onFocusOutside,S=>{S.target!==g.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(t.onEscapeKeyDown,S=>{f.onClose(),S.preventDefault()}),onKeyDown:composeEventHandlers(t.onKeyDown,S=>{var E;const R=S.currentTarget.contains(S.target),C=SUB_CLOSE_KEYS[f.dir].includes(S.key);R&&C&&(d.onOpenChange(!1),(E=g.trigger)==null||E.focus(),S.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(t){return t?"open":"closed"}function isIndeterminate$1(t){return t==="indeterminate"}function getCheckedState(t){return isIndeterminate$1(t)?"indeterminate":t?"checked":"unchecked"}function focusFirst$1(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function wrapArray$1(t,e){return t.map((n,o)=>t[(e+o)%t.length])}function getNextMatch(t,e,n){const l=e.length>1&&Array.from(e).every(_=>_===e[0])?e[0]:e,d=n?t.indexOf(n):-1;let f=wrapArray$1(t,Math.max(d,0));l.length===1&&(f=f.filter(_=>_!==n));const b=f.find(_=>_.toLowerCase().startsWith(l.toLowerCase()));return b!==n?b:void 0}function isPointInPolygon$1(t,e){const{x:n,y:o}=t;let l=!1;for(let d=0,f=e.length-1;d<e.length;f=d++){const g=e[d],b=e[f],_=g.x,S=g.y,R=b.x,C=b.y;S>o!=C>o&&n<(R-_)*(o-S)/(C-S)+_&&(l=!l)}return l}function isPointerInGraceArea(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return isPointInPolygon$1(n,e)}function whenMouse(t){return e=>e.pointerType==="mouse"?t(e):void 0}var Root3$1=Menu,Anchor2$1=MenuAnchor,Portal$3=MenuPortal,Content2$6=MenuContent,Group$1=MenuGroup,Label$4=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator$1=MenuItemIndicator,Separator$3=MenuSeparator,Arrow2=MenuArrow,Sub=MenuSub,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext]=createContextScope$2(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=t=>{const{__scopeDropdownMenu:e,children:n,dir:o,open:l,defaultOpen:d,onOpenChange:f,modal:g=!0}=t,b=useMenuScope(e),_=React__namespace.useRef(null),[S,R]=useControllableState({prop:l,defaultProp:d??!1,onChange:f,caller:DROPDOWN_MENU_NAME});return jsxRuntime.jsx(DropdownMenuProvider,{scope:e,triggerId:useId(),triggerRef:_,contentId:useId(),open:S,onOpenChange:R,onOpenToggle:React__namespace.useCallback(()=>R(C=>!C),[R]),modal:g,children:jsxRuntime.jsx(Root3$1,{...b,open:S,onOpenChange:R,dir:o,modal:g,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$8="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...l}=t,d=useDropdownMenuContext(TRIGGER_NAME$8,n),f=useMenuScope(n);return jsxRuntime.jsx(Anchor2$1,{asChild:!0,...f,children:jsxRuntime.jsx(Primitive$4.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:composeRefs(e,d.triggerRef),onPointerDown:composeEventHandlers(t.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(d.onOpenToggle(),d.open||g.preventDefault())}),onKeyDown:composeEventHandlers(t.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&d.onOpenToggle(),g.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$8;var PORTAL_NAME$4="DropdownMenuPortal",DropdownMenuPortal$1=t=>{const{__scopeDropdownMenu:e,...n}=t,o=useMenuScope(e);return jsxRuntime.jsx(Portal$3,{...o,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$4;var CONTENT_NAME$7="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useDropdownMenuContext(CONTENT_NAME$7,n),d=useMenuScope(n),f=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$6,{id:l.contentId,"aria-labelledby":l.triggerId,...d,...o,ref:e,onCloseAutoFocus:composeEventHandlers(t.onCloseAutoFocus,g=>{var b;f.current||(b=l.triggerRef.current)==null||b.focus(),f.current=!1,g.preventDefault()}),onInteractOutside:composeEventHandlers(t.onInteractOutside,g=>{const b=g.detail.originalEvent,_=b.button===0&&b.ctrlKey===!0,S=b.button===2||_;(!l.modal||S)&&(f.current=!0)}),style:{...t.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)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$7;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Group$1,{...l,...o,ref:e})});DropdownMenuGroup$1.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Label$4,{...l,...o,ref:e})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$2="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...l,...o,ref:e})});DropdownMenuItem$1.displayName=ITEM_NAME$2;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...l,...o,ref:e})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...l,...o,ref:e})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...l,...o,ref:e})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME$2="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator$1,{...l,...o,ref:e})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME$2;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Separator$3,{...l,...o,ref:e})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$3="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...l,...o,ref:e})});DropdownMenuArrow.displayName=ARROW_NAME$3;var DropdownMenuSub$1=t=>{const{__scopeDropdownMenu:e,children:n,open:o,onOpenChange:l,defaultOpen:d}=t,f=useMenuScope(e),[g,b]=useControllableState({prop:o,defaultProp:d??!1,onChange:l,caller:"DropdownMenuSub"});return jsxRuntime.jsx(Sub,{...f,open:g,onOpenChange:b,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...l,...o,ref:e})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...o}=t,l=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...l,...o,ref:e,style:{...t.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)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$6=DropdownMenu$1,Trigger$5=DropdownMenuTrigger$1,Portal2$1=DropdownMenuPortal$1,Content2$5=DropdownMenuContent$1,Group2=DropdownMenuGroup$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioGroup2=DropdownMenuRadioGroup$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,Sub2=DropdownMenuSub$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$6,DropdownMenuTrigger=Trigger$5,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2$1,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:t,inset:e,children:n,...o},l)=>jsxRuntime.jsxs(SubTrigger2,{ref:l,className:cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e&&"pl-8",t),...o,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(SubContent2,{ref:n,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",t),...e}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:t,sideOffset:e=4,...n},o)=>jsxRuntime.jsx(Portal2$1,{children:jsxRuntime.jsx(Content2$5,{ref:o,sideOffset:e,className:cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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 origin-[--radix-dropdown-menu-content-transform-origin]",t),...n})}));DropdownMenuContent.displayName=Content2$5.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:t,inset:e,...n},o)=>jsxRuntime.jsx(Item2,{ref:o,className:cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",e&&"pl-8",t),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:t,children:e,checked:n,...o},l)=>jsxRuntime.jsxs(CheckboxItem2,{ref:l,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...o,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Check,{className:"h-4 w-4"})})}),e]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:t,children:e,...n},o)=>jsxRuntime.jsxs(RadioItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),e]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:t,inset:e,...n},o)=>jsxRuntime.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",t),...e}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:t,...e})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",t),...e});DropdownMenuShortcut.displayName="DropdownMenuShortcut";var REACT_LAZY_TYPE=Symbol.for("react.lazy"),use=React__namespace[" use ".trim().toString()];function isPromiseLike(t){return typeof t=="object"&&t!==null&&"then"in t}function isLazyComponent(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===REACT_LAZY_TYPE&&"_payload"in t&&isPromiseLike(t._payload)}function createSlot$2(t){const e=createSlotClone$2(t),n=React__namespace.forwardRef((o,l)=>{let{children:d,...f}=o;isLazyComponent(d)&&typeof use=="function"&&(d=use(d._payload));const g=React__namespace.Children.toArray(d),b=g.find(isSlottable$2);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(e,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(e,{...f,ref:l,children:d})});return n.displayName=`${t}.Slot`,n}var Slot$2=createSlot$2("Slot");function createSlotClone$2(t){const e=React__namespace.forwardRef((n,o)=>{let{children:l,...d}=n;if(isLazyComponent(l)&&typeof use=="function"&&(l=use(l._payload)),React__namespace.isValidElement(l)){const f=getElementRef$2(l),g=mergeProps$2(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var SLOTTABLE_IDENTIFIER$4=Symbol("radix.slottable");function isSlottable$2(t){return React__namespace.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===SLOTTABLE_IDENTIFIER$4}function mergeProps$2(t,e){const n={...e};for(const o in e){const l=t[o],d=e[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...t,...n}}function getElementRef$2(t){var o,l;let e=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}const falsyToString=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,cx=clsx,cva=(t,e)=>n=>{var o;if((e==null?void 0:e.variants)==null)return cx(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:d}=e,f=Object.keys(l).map(_=>{const S=n==null?void 0:n[_],R=d==null?void 0:d[_];if(S===null)return null;const C=falsyToString(S)||falsyToString(R);return l[_][C]}),g=n&&Object.entries(n).reduce((_,S)=>{let[R,C]=S;return C===void 0||(_[R]=C),_},{}),b=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((_,S)=>{let{class:R,className:C,...E}=S;return Object.entries(E).every(A=>{let[M,I]=A;return Array.isArray(I)?I.includes({...d,...g}[M]):{...d,...g}[M]===I})?[..._,R,C]:_},[]);return cx(t,f,b,n==null?void 0:n.class,n==null?void 0:n.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input text-foreground bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",purple:"bg-randmar-purple text-gray-100 shadow-sm hover:bg-randmar-purple/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button$1=React__namespace.forwardRef(({className:t,variant:e,size:n,asChild:o=!1,confirmationDialog:l,onClick:d,...f},g)=>{const b=o?Slot$2:"button";if(!l)return jsxRuntime.jsx(b,{className:cn(buttonVariants({variant:e,size:n,className:t})),ref:g,onClick:d,...f});d&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:_,content:S,onConfirm:R,confirmText:C="Confirm",cancelText:E="Cancel"}=l,A=()=>{R()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(b,{className:cn(buttonVariants({variant:e,size:n,className:t})),ref:g,...f})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:_}),jsxRuntime.jsx(DialogDescription,{children:S})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{variant:"outline",children:E})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{onClick:A,children:C})})]})]})]})});Button$1.displayName="Button";function formatProdErrorMessage$1(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$4(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function miniKindOf(t){if(t===void 0)return"undefined";if(t===null)return"null";const e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(isDate$1(t))return"date";if(isError(t))return"error";const n=ctorName(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(t){return typeof t.constructor=="function"?t.constructor.name:null}function isError(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function isDate$1(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function kindOf(t){let e=typeof t;return process.env.NODE_ENV!=="production"&&(e=miniKindOf(t)),e}function warning(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function getUnexpectedStateShapeWarningMessage(t,e,n,o){const l=Object.keys(e),d=n&&n.type===actionTypes_default.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(l.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject$4(t))return`The ${d} has unexpected type of "${kindOf(t)}". Expected argument to be an object with the following keys: "${l.join('", "')}"`;const f=Object.keys(t).filter(g=>!e.hasOwnProperty(g)&&!o[g]);if(f.forEach(g=>{o[g]=!0}),!(n&&n.type===actionTypes_default.REPLACE)&&f.length>0)return`Unexpected ${f.length>1?"keys":"key"} "${f.join('", "')}" found in ${d}. Expected to find one of the known reducer keys instead: "${l.join('", "')}". Unexpected keys will be ignored.`}function assertReducerShape(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(12):`The slice reducer for key "${e}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(13):`The slice reducer for key "${e}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function combineReducers(t){const e=Object.keys(t),n={};for(let f=0;f<e.length;f++){const g=e[f];process.env.NODE_ENV!=="production"&&typeof t[g]>"u"&&warning(`No reducer provided for key "${g}"`),typeof t[g]=="function"&&(n[g]=t[g])}const o=Object.keys(n);let l;process.env.NODE_ENV!=="production"&&(l={});let d;try{assertReducerShape(n)}catch(f){d=f}return function(g={},b){if(d)throw d;if(process.env.NODE_ENV!=="production"){const R=getUnexpectedStateShapeWarningMessage(g,n,b,l);R&&warning(R)}let _=!1;const S={};for(let R=0;R<o.length;R++){const C=o[R],E=n[C],A=g[C],M=E(A,b);if(typeof M>"u"){const I=b&&b.type;throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(14):`When called with an action of type ${I?`"${String(I)}"`:"(unknown type)"}, the slice reducer for key "${C}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}S[C]=M,_=_||M!==A}return _=_||o.length!==Object.keys(g).length,_?S:g}}function isAction(t){return isPlainObject$4(t)&&"type"in t&&typeof t.type=="string"}var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function die(t,...e){if(process.env.NODE_ENV!=="production"){const n=errors[t],o=isFunction$6(n)?n.apply(null,e):n;throw new Error(`[Immer] ${o}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var O=Object,getPrototypeOf$1=O.getPrototypeOf,CONSTRUCTOR="constructor",PROTOTYPE="prototype",CONFIGURABLE="configurable",ENUMERABLE="enumerable",WRITABLE="writable",VALUE="value",isDraft=t=>!!t&&!!t[DRAFT_STATE];function isDraftable(t){var e;return t?isPlainObject$3(t)||isArray$2(t)||!!t[DRAFTABLE]||!!((e=t[CONSTRUCTOR])!=null&&e[DRAFTABLE])||isMap(t)||isSet(t):!1}var objectCtorString=O[PROTOTYPE][CONSTRUCTOR].toString(),cachedCtorStrings=new WeakMap;function isPlainObject$3(t){if(!t||!isObjectish(t))return!1;const e=getPrototypeOf$1(t);if(e===null||e===O[PROTOTYPE])return!0;const n=O.hasOwnProperty.call(e,CONSTRUCTOR)&&e[CONSTRUCTOR];if(n===Object)return!0;if(!isFunction$6(n))return!1;let o=cachedCtorStrings.get(n);return o===void 0&&(o=Function.toString.call(n),cachedCtorStrings.set(n,o)),o===objectCtorString}function original(t){return isDraft(t)||die(15,t),t[DRAFT_STATE].base_}function each(t,e,n=!0){getArchtype(t)===0?(n?Reflect.ownKeys(t):O.keys(t)).forEach(l=>{e(l,t[l],t)}):t.forEach((o,l)=>e(l,o,t))}function getArchtype(t){const e=t[DRAFT_STATE];return e?e.type_:isArray$2(t)?1:isMap(t)?2:isSet(t)?3:0}var has$1=(t,e,n=getArchtype(t))=>n===2?t.has(e):O[PROTOTYPE].hasOwnProperty.call(t,e),get$3=(t,e,n=getArchtype(t))=>n===2?t.get(e):t[e],set$2=(t,e,n,o=getArchtype(t))=>{o===2?t.set(e,n):o===3?t.add(n):t[e]=n};function is$1(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var isArray$2=Array.isArray,isMap=t=>t instanceof Map,isSet=t=>t instanceof Set,isObjectish=t=>typeof t=="object",isFunction$6=t=>typeof t=="function",isBoolean$2=t=>typeof t=="boolean";function isArrayIndex(t){const e=+t;return Number.isInteger(e)&&String(e)===t}var getProxyDraft=t=>isObjectish(t)?t==null?void 0:t[DRAFT_STATE]:null,latest=t=>t.copy_||t.base_,getFinalValue=t=>t.modified_?t.copy_:t.base_;function shallowCopy(t,e){if(isMap(t))return new Map(t);if(isSet(t))return new Set(t);if(isArray$2(t))return Array[PROTOTYPE].slice.call(t);const n=isPlainObject$3(t);if(e===!0||e==="class_only"&&!n){const o=O.getOwnPropertyDescriptors(t);delete o[DRAFT_STATE];let l=Reflect.ownKeys(o);for(let d=0;d<l.length;d++){const f=l[d],g=o[f];g[WRITABLE]===!1&&(g[WRITABLE]=!0,g[CONFIGURABLE]=!0),(g.get||g.set)&&(o[f]={[CONFIGURABLE]:!0,[WRITABLE]:!0,[ENUMERABLE]:g[ENUMERABLE],[VALUE]:t[f]})}return O.create(getPrototypeOf$1(t),o)}else{const o=getPrototypeOf$1(t);if(o!==null&&n)return{...t};const l=O.create(o);return O.assign(l,t)}}function freeze$1(t,e=!1){return isFrozen$1(t)||isDraft(t)||!isDraftable(t)||(getArchtype(t)>1&&O.defineProperties(t,{set:dontMutateMethodOverride,add:dontMutateMethodOverride,clear:dontMutateMethodOverride,delete:dontMutateMethodOverride}),O.freeze(t),e&&each(t,(n,o)=>{freeze$1(o,!0)},!1)),t}function dontMutateFrozenCollections(){die(2)}var dontMutateMethodOverride={[VALUE]:dontMutateFrozenCollections};function isFrozen$1(t){return t===null||!isObjectish(t)?!0:O.isFrozen(t)}var PluginMapSet="MapSet",PluginPatches="Patches",PluginArrayMethods="ArrayMethods",plugins={};function getPlugin(t){const e=plugins[t];return e||die(0,t),e}var isPluginLoaded=t=>!!plugins[t];function loadPlugin(t,e){plugins[t]||(plugins[t]=e)}var currentScope,getCurrentScope=()=>currentScope,createScope=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:isPluginLoaded(PluginMapSet)?getPlugin(PluginMapSet):void 0,arrayMethodsPlugin_:isPluginLoaded(PluginArrayMethods)?getPlugin(PluginArrayMethods):void 0});function usePatchesInScope(t,e){e&&(t.patchPlugin_=getPlugin(PluginPatches),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function revokeScope(t){leaveScope(t),t.drafts_.forEach(revokeDraft),t.drafts_=null}function leaveScope(t){t===currentScope&&(currentScope=t.parent_)}var enterScope=t=>currentScope=createScope(currentScope,t);function revokeDraft(t){const e=t[DRAFT_STATE];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function processResult(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];if(t!==void 0&&t!==n){n[DRAFT_STATE].modified_&&(revokeScope(e),die(4)),isDraftable(t)&&(t=finalize(e,t));const{patchPlugin_:l}=e;l&&l.generateReplacementPatches_(n[DRAFT_STATE].base_,t,e)}else t=finalize(e,n);return maybeFreeze(e,t,!0),revokeScope(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==NOTHING?t:void 0}function finalize(t,e){if(isFrozen$1(e))return e;const n=e[DRAFT_STATE];if(!n)return handleValue(e,t.handledSet_,t);if(!isSameScope(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(t);generatePatchesAndFinalize(n,t)}return n.copy_}function maybeFreeze(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&freeze$1(e,n)}function markStateFinalized(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var isSameScope=(t,e)=>t.scope_===e,EMPTY_LOCATIONS_RESULT=[];function updateDraftInParent(t,e,n,o){const l=latest(t),d=t.type_;if(o!==void 0&&get$3(l,o,d)===e){set$2(l,o,n,d);return}if(!t.draftLocations_){const g=t.draftLocations_=new Map;each(l,(b,_)=>{if(isDraft(_)){const S=g.get(_)||[];S.push(b),g.set(_,S)}})}const f=t.draftLocations_.get(e)??EMPTY_LOCATIONS_RESULT;for(const g of f)set$2(l,g,n,d)}function registerChildFinalizationCallback(t,e,n){t.callbacks_.push(function(l){var g;const d=e;if(!d||!isSameScope(d,l))return;(g=l.mapSetPlugin_)==null||g.fixSetContents(d);const f=getFinalValue(d);updateDraftInParent(t,d.draft_??d,f,n),generatePatchesAndFinalize(d,l)})}function generatePatchesAndFinalize(t,e){var o;if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(((o=t.assigned_)==null?void 0:o.size)??0)>0)){const{patchPlugin_:l}=e;if(l){const d=l.getPath(t);d&&l.generatePatches_(t,d,e)}markStateFinalized(t)}}function handleCrossReference(t,e,n){const{scope_:o}=t;if(isDraft(n)){const l=n[DRAFT_STATE];isSameScope(l,o)&&l.callbacks_.push(function(){prepareCopy(t);const f=getFinalValue(l);updateDraftInParent(t,n,f,e)})}else isDraftable(n)&&t.callbacks_.push(function(){const d=latest(t);t.type_===3?d.has(n)&&handleValue(n,o.handledSet_,o):get$3(d,e,t.type_)===n&&o.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&handleValue(get$3(t.copy_,e,t.type_),o.handledSet_,o)})}function handleValue(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||isDraft(t)||e.has(t)||!isDraftable(t)||isFrozen$1(t)||(e.add(t),each(t,(o,l)=>{if(isDraft(l)){const d=l[DRAFT_STATE];if(isSameScope(d,n)){const f=getFinalValue(d);set$2(t,o,f,t.type_),markStateFinalized(d)}}else isDraftable(l)&&handleValue(l,e,n)})),t}function createProxyProxy(t,e){const n=isArray$2(t),o={type_:n?1:0,scope_:e?e.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let l=o,d=objectTraps;n&&(l=[o],d=arrayTraps);const{revoke:f,proxy:g}=Proxy.revocable(l,d);return o.draft_=g,o.revoke_=f,[g,o]}var objectTraps={get(t,e){if(e===DRAFT_STATE)return t;let n=t.scope_.arrayMethodsPlugin_;const o=t.type_===1&&typeof e=="string";if(o&&n!=null&&n.isArrayOperationMethod(e))return n.createMethodInterceptor(t,e);const l=latest(t);if(!has$1(l,e,t.type_))return readPropFromProto(t,l,e);const d=l[e];if(t.finalized_||!isDraftable(d)||o&&t.operationMethod&&(n!=null&&n.isMutatingArrayMethod(t.operationMethod))&&isArrayIndex(e))return d;if(d===peek(t.base_,e)){prepareCopy(t);const f=t.type_===1?+e:e,g=createProxy(t.scope_,d,t,f);return t.copy_[f]=g}return d},has(t,e){return e in latest(t)},ownKeys(t){return Reflect.ownKeys(latest(t))},set(t,e,n){const o=getDescriptorFromProto(latest(t),e);if(o!=null&&o.set)return o.set.call(t.draft_,n),!0;if(!t.modified_){const l=peek(latest(t),e),d=l==null?void 0:l[DRAFT_STATE];if(d&&d.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(is$1(n,l)&&(n!==void 0||has$1(t.base_,e,t.type_)))return!0;prepareCopy(t),markChanged(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),handleCrossReference(t,e,n)),!0},deleteProperty(t,e){return prepareCopy(t),peek(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),markChanged(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=latest(t),o=Reflect.getOwnPropertyDescriptor(n,e);return o&&{[WRITABLE]:!0,[CONFIGURABLE]:t.type_!==1||e!=="length",[ENUMERABLE]:o[ENUMERABLE],[VALUE]:n[e]}},defineProperty(){die(11)},getPrototypeOf(t){return getPrototypeOf$1(t.base_)},setPrototypeOf(){die(12)}},arrayTraps={};for(let t in objectTraps){let e=objectTraps[t];arrayTraps[t]=function(){const n=arguments;return n[0]=n[0][0],e.apply(this,n)}}arrayTraps.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&die(13),arrayTraps.set.call(this,t,e,void 0)},arrayTraps.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&die(14),objectTraps.set.call(this,t[0],e,n,t[0])};function peek(t,e){const n=t[DRAFT_STATE];return(n?latest(n):t)[e]}function readPropFromProto(t,e,n){var l;const o=getDescriptorFromProto(e,n);return o?VALUE in o?o[VALUE]:(l=o.get)==null?void 0:l.call(t.draft_):void 0}function getDescriptorFromProto(t,e){if(!(e in t))return;let n=getPrototypeOf$1(t);for(;n;){const o=Object.getOwnPropertyDescriptor(n,e);if(o)return o;n=getPrototypeOf$1(n)}}function markChanged(t){t.modified_||(t.modified_=!0,t.parent_&&markChanged(t.parent_))}function prepareCopy(t){t.copy_||(t.assigned_=new Map,t.copy_=shallowCopy(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,n,o)=>{if(isFunction$6(e)&&!isFunction$6(n)){const d=n;n=e;const f=this;return function(b=d,..._){return f.produce(b,S=>n.call(this,S,..._))}}isFunction$6(n)||die(6),o!==void 0&&!isFunction$6(o)&&die(7);let l;if(isDraftable(e)){const d=enterScope(this),f=createProxy(d,e,void 0);let g=!0;try{l=n(f),g=!1}finally{g?revokeScope(d):leaveScope(d)}return usePatchesInScope(d,o),processResult(l,d)}else if(!e||!isObjectish(e)){if(l=n(e),l===void 0&&(l=e),l===NOTHING&&(l=void 0),this.autoFreeze_&&freeze$1(l,!0),o){const d=[],f=[];getPlugin(PluginPatches).generateReplacementPatches_(e,l,{patches_:d,inversePatches_:f}),o(d,f)}return l}else die(1,e)},this.produceWithPatches=(e,n)=>{if(isFunction$6(e))return(f,...g)=>this.produceWithPatches(f,b=>e(b,...g));let o,l;return[this.produce(e,n,(f,g)=>{o=f,l=g}),o,l]},isBoolean$2(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),isBoolean$2(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),isBoolean$2(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){isDraftable(t)||die(8),isDraft(t)&&(t=current(t));const e=enterScope(this),n=createProxy(e,t,void 0);return n[DRAFT_STATE].isManual_=!0,leaveScope(e),n}finishDraft(t,e){const n=t&&t[DRAFT_STATE];(!n||!n.isManual_)&&die(9);const{scope_:o}=n;return usePatchesInScope(o,e),processResult(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const l=e[n];if(l.path.length===0&&l.op==="replace"){t=l.value;break}}n>-1&&(e=e.slice(n+1));const o=getPlugin(PluginPatches).applyPatches_;return isDraft(t)?o(t,e):this.produce(t,l=>o(l,e))}};function createProxy(t,e,n,o){const[l,d]=isMap(e)?getPlugin(PluginMapSet).proxyMap_(e,n):isSet(e)?getPlugin(PluginMapSet).proxySet_(e,n):createProxyProxy(e,n);return((n==null?void 0:n.scope_)??getCurrentScope()).drafts_.push(l),d.callbacks_=(n==null?void 0:n.callbacks_)??[],d.key_=o,n&&o!==void 0?registerChildFinalizationCallback(n,d,o):d.callbacks_.push(function(b){var S;(S=b.mapSetPlugin_)==null||S.fixSetContents(d);const{patchPlugin_:_}=b;d.modified_&&_&&_.generatePatches_(d,[],b)}),l}function current(t){return isDraft(t)||die(10,t),currentImpl(t)}function currentImpl(t){if(!isDraftable(t)||isFrozen$1(t))return t;const e=t[DRAFT_STATE];let n,o=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=shallowCopy(t,e.scope_.immer_.useStrictShallowCopy_),o=e.scope_.immer_.shouldUseStrictIteration()}else n=shallowCopy(t,!0);return each(n,(l,d)=>{set$2(n,l,currentImpl(d))},o),e&&(e.finalized_=!1),n}function enablePatches(){process.env.NODE_ENV!=="production"&&errors.push('Sets cannot have "replace" patches.',function(A){return"Unsupported patch operation: "+A},function(A){return"Cannot apply patch, path doesn't resolve: "+A},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");function e(A,M=[]){if(A.key_!==void 0){const I=A.parent_.copy_??A.parent_.base_,j=getProxyDraft(get$3(I,A.key_)),q=get$3(I,A.key_);if(q===void 0||q!==A.draft_&&q!==A.base_&&q!==A.copy_||j!=null&&j.base_!==A.base_)return null;const Q=A.parent_.type_===3;let te;if(Q){const F=A.parent_;te=Array.from(F.drafts_.keys()).indexOf(A.key_)}else te=A.key_;if(!(Q&&I.size>te||has$1(I,te)))return null;M.push(te)}if(A.parent_)return e(A.parent_,M);M.reverse();try{n(A.copy_,M)}catch{return null}return M}function n(A,M){let I=A;for(let j=0;j<M.length-1;j++){const q=M[j];if(I=get$3(I,q),!isObjectish(I)||I===null)throw new Error(`Cannot resolve path at '${M.join("/")}'`)}return I}const o="replace",l="add",d="remove";function f(A,M,I){if(A.scope_.processedForPatches_.has(A))return;A.scope_.processedForPatches_.add(A);const{patches_:j,inversePatches_:q}=I;switch(A.type_){case 0:case 2:return b(A,M,j,q);case 1:return g(A,M,j,q);case 3:return _(A,M,j,q)}}function g(A,M,I,j){let{base_:q,assigned_:Q}=A,te=A.copy_;te.length<q.length&&([q,te]=[te,q],[I,j]=[j,I]);const F=A.allIndicesReassigned_===!0;for(let V=0;V<q.length;V++){const ne=te[V],ae=q[V];if((F||(Q==null?void 0:Q.get(V.toString())))&&ne!==ae){const $e=ne==null?void 0:ne[DRAFT_STATE];if($e&&$e.modified_)continue;const Ne=M.concat([V]);I.push({op:o,path:Ne,value:E(ne)}),j.push({op:o,path:Ne,value:E(ae)})}}for(let V=q.length;V<te.length;V++){const ne=M.concat([V]);I.push({op:l,path:ne,value:E(te[V])})}for(let V=te.length-1;q.length<=V;--V){const ne=M.concat([V]);j.push({op:d,path:ne})}}function b(A,M,I,j){const{base_:q,copy_:Q,type_:te}=A;each(A.assigned_,(F,V)=>{const ne=get$3(q,F,te),ae=get$3(Q,F,te),se=V?has$1(q,F)?o:l:d;if(ne===ae&&se===o)return;const $e=M.concat(F);I.push(se===d?{op:se,path:$e}:{op:se,path:$e,value:E(ae)}),j.push(se===l?{op:d,path:$e}:se===d?{op:l,path:$e,value:E(ne)}:{op:o,path:$e,value:E(ne)})})}function _(A,M,I,j){let{base_:q,copy_:Q}=A,te=0;q.forEach(F=>{if(!Q.has(F)){const V=M.concat([te]);I.push({op:d,path:V,value:F}),j.unshift({op:l,path:V,value:F})}te++}),te=0,Q.forEach(F=>{if(!q.has(F)){const V=M.concat([te]);I.push({op:l,path:V,value:F}),j.unshift({op:d,path:V,value:F})}te++})}function S(A,M,I){const{patches_:j,inversePatches_:q}=I;j.push({op:o,path:[],value:M===NOTHING?void 0:M}),q.push({op:o,path:[],value:A})}function R(A,M){return M.forEach(I=>{const{path:j,op:q}=I;let Q=A;for(let ne=0;ne<j.length-1;ne++){const ae=getArchtype(Q);let se=j[ne];typeof se!="string"&&typeof se!="number"&&(se=""+se),(ae===0||ae===1)&&(se==="__proto__"||se===CONSTRUCTOR)&&die(19),isFunction$6(Q)&&se===PROTOTYPE&&die(19),Q=get$3(Q,se),isObjectish(Q)||die(18,j.join("/"))}const te=getArchtype(Q),F=C(I.value),V=j[j.length-1];switch(q){case o:switch(te){case 2:return Q.set(V,F);case 3:die(16);default:return Q[V]=F}case l:switch(te){case 1:return V==="-"?Q.push(F):Q.splice(V,0,F);case 2:return Q.set(V,F);case 3:return Q.add(F);default:return Q[V]=F}case d:switch(te){case 1:return Q.splice(V,1);case 2:return Q.delete(V);case 3:return Q.delete(I.value);default:return delete Q[V]}default:die(17,q)}}),A}function C(A){if(!isDraftable(A))return A;if(isArray$2(A))return A.map(C);if(isMap(A))return new Map(Array.from(A.entries()).map(([I,j])=>[I,C(j)]));if(isSet(A))return new Set(Array.from(A).map(C));const M=Object.create(getPrototypeOf$1(A));for(const I in A)M[I]=C(A[I]);return has$1(A,DRAFTABLE)&&(M[DRAFTABLE]=A[DRAFTABLE]),M}function E(A){return isDraft(A)?C(A):A}loadPlugin(PluginPatches,{applyPatches_:R,generatePatches_:f,generateReplacementPatches_:S,getPath:e})}var immer=new Immer2,produce=immer.produce,produceWithPatches=immer.produceWithPatches.bind(immer),applyPatches=immer.applyPatches.bind(immer),runIdentityFunctionCheck=(t,e,n)=>{if(e.length===1&&e[0]===n){let o=!1;try{const l={};t(l)===l&&(o=!0)}catch{}if(o){let l;try{throw new Error}catch(d){({stack:l}=d)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
520
520
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
521
521
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
522
522
|
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:l})}}},runInputStabilityCheck=(t,e,n)=>{const{memoize:o,memoizeOptions:l}=e,{inputSelectorResults:d,inputSelectorResultsCopy:f}=t,g=o(()=>({}),...l);if(!(g.apply(null,d)===g.apply(null,f))){let _;try{throw new Error}catch(S){({stack:_}=S)}console.warn(`An input selector returned a different result when passed same arguments.
|
package/dist/style.css
CHANGED
|
@@ -149,11 +149,21 @@ body {
|
|
|
149
149
|
radial-gradient(940px circle at 32% 82%, hsl(from var(--primary) calc(h - 16) s l / 0.32), transparent 65%),
|
|
150
150
|
radial-gradient(760px circle at 84% 78%, hsl(from var(--primary) h calc(s + 6) calc(l + 12) / 0.26), transparent 60%),
|
|
151
151
|
linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.58));
|
|
152
|
-
backdrop-filter: blur(34px) saturate(190%);
|
|
153
|
-
-webkit-backdrop-filter: blur(34px) saturate(190%);
|
|
154
152
|
box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.55);
|
|
155
153
|
}
|
|
156
154
|
|
|
155
|
+
@supports (backdrop-filter: blur(0)) {
|
|
156
|
+
.randmar-assistant-overlay {
|
|
157
|
+
backdrop-filter: blur(34px) saturate(190%);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@supports (-webkit-backdrop-filter: blur(0)) {
|
|
162
|
+
.randmar-assistant-overlay {
|
|
163
|
+
-webkit-backdrop-filter: blur(34px) saturate(190%);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
157
167
|
.randmar-assistant-overlay::before {
|
|
158
168
|
content: "";
|
|
159
169
|
position: absolute;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "randmarcomps",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.506.0",
|
|
5
5
|
"description": "The UI library enabling speed and consistency in Randmar frontends.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
"types": "./dist/randmarcomps.d.ts",
|
|
16
16
|
"import": "./dist/randmarcomps.js",
|
|
17
17
|
"require": "./dist/randmarcomps.umd.cjs"
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"./style.css": "./dist/style.css",
|
|
20
|
+
"./randmarcomps.css": "./dist/randmarcomps.css"
|
|
19
21
|
},
|
|
20
22
|
"repository": {
|
|
21
23
|
"type": "git",
|