randmarcomps 1.154.0 → 1.155.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.
@@ -50,10 +50,10 @@ export declare interface AiGeneratedContentProps {
50
50
 
51
51
  declare interface ApiKeyContextType {
52
52
  apiKey: string | null;
53
- setApiKey: (key: string) => void;
54
53
  }
55
54
 
56
- export declare const ApiKeyProvider: ({ children }: {
55
+ export declare const ApiKeyProvider: ({ apiKey, children, }: {
56
+ apiKey?: string | null;
57
57
  children: ReactNode;
58
58
  }) => JSX.Element;
59
59
 
@@ -9476,10 +9476,10 @@ function Toaster() {
9476
9476
  /* @__PURE__ */ jsx(ToastViewport, {})
9477
9477
  ] });
9478
9478
  }
9479
- const ApiKeyContext = createContext(void 0), ApiKeyProvider = ({ children: e }) => {
9480
- const [t, n] = useState(null);
9481
- return /* @__PURE__ */ jsx(ApiKeyContext.Provider, { value: { apiKey: t, setApiKey: n }, children: e });
9482
- }, useApiKey = () => {
9479
+ const ApiKeyContext = createContext(void 0), ApiKeyProvider = ({
9480
+ apiKey: e = null,
9481
+ children: t
9482
+ }) => /* @__PURE__ */ jsx(ApiKeyContext.Provider, { value: { apiKey: e }, children: t }), useApiKey = () => {
9483
9483
  const e = useContext(ApiKeyContext);
9484
9484
  if (!e)
9485
9485
  throw new Error("useApiKey must be used within an ApiKeyProvider");
@@ -296,7 +296,7 @@
296
296
 
297
297
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
298
298
 
299
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return React__namespace.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var u;const l=(u=e.current)==null?void 0:u.getAttribute("aria-describedby");t&&l&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Root$8=Dialog$1,Trigger$4=DialogTrigger$1,Portal$3=DialogPortal$1,Overlay=DialogOverlay$1,Content$2=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:e=!1,...t})=>jsxRuntime.jsx(Root$8,{modal:e,...t});Dialog.displayName=Root$8.displayName;const DialogTrigger=Trigger$4,DialogPortal=Portal$3,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:e,...t},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",e),...t}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:e,children:t,animateExit:n=!0,...o},l)=>jsxRuntime.jsxs(DialogPortal,{forceMount:o.forceMount,children:[jsxRuntime.jsx(DialogOverlay,{}),jsxRuntime.jsxs(Content$2,{ref:l,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%]",e),...o,children:[t,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,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$2.displayName;const DialogHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",e),...t}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));DialogDescription.displayName=Description$1.displayName;function createCollection(e){const t=e+"CollectionProvider",[n,o]=createContextScope(t),[l,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),p=C=>{const{scope:R,children:I}=C,N=React.useRef(null),O=React.useRef(new Map).current;return jsxRuntime.jsx(l,{scope:R,itemMap:O,collectionRef:N,children:I})};p.displayName=t;const d=e+"CollectionSlot",f=createSlot(d),m=React.forwardRef((C,R)=>{const{scope:I,children:N}=C,O=u(d,I),V=useComposedRefs(R,O.collectionRef);return jsxRuntime.jsx(f,{ref:V,children:N})});m.displayName=d;const g=e+"CollectionItemSlot",b="data-radix-collection-item",_=createSlot(g),S=React.forwardRef((C,R)=>{const{scope:I,children:N,...O}=C,V=React.useRef(null),M=useComposedRefs(R,V),A=u(g,I);return React.useEffect(()=>(A.itemMap.set(V,{ref:V,...O}),()=>void A.itemMap.delete(V))),jsxRuntime.jsx(_,{[b]:"",ref:M,children:N})});S.displayName=g;function E(C){const R=u(e+"CollectionConsumer",C);return React.useCallback(()=>{const N=R.collectionRef.current;if(!N)return[];const O=Array.from(N.querySelectorAll(`[${b}]`));return Array.from(R.itemMap.values()).sort((A,j)=>O.indexOf(A.ref.current)-O.indexOf(j.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:p,Slot:m,ItemSlot:S},E,o]}var DirectionContext=React__namespace.createContext(void 0);function useDirection(e){const t=React__namespace.useContext(DirectionContext);return e||t||"ltr"}const sides=["top","right","bottom","left"],min$2=Math.min,max$2=Math.max,round$1=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(e,t,n){return max$2(e,min$2(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const o=getAlignment(e),l=getAlignmentAxis(e),u=getAxisLength(l);let p=l==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(p=getOppositePlacement(p)),[p,getOppositePlacement(p)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}function getSideList(e,t,n){const o=["left","right"],l=["right","left"],u=["top","bottom"],p=["bottom","top"];switch(e){case"top":case"bottom":return n?t?l:o:t?o:l;case"left":case"right":return t?u:p;default:return[]}}function getOppositeAxisPlacements(e,t,n,o){const l=getAlignment(e);let u=getSideList(getSide(e),n==="start",o);return l&&(u=u.map(p=>p+"-"+l),t&&(u=u.concat(u.map(getOppositeAlignmentPlacement)))),u}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:o,height:l}=e;return{width:o,height:l,top:n,left:t,right:t+o,bottom:n+l,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:o,floating:l}=e;const u=getSideAxis(t),p=getAlignmentAxis(t),d=getAxisLength(p),f=getSide(t),m=u==="y",g=o.x+o.width/2-l.width/2,b=o.y+o.height/2-l.height/2,_=o[d]/2-l[d]/2;let S;switch(f){case"top":S={x:g,y:o.y-l.height};break;case"bottom":S={x:g,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:b};break;case"left":S={x:o.x-l.width,y:b};break;default:S={x:o.x,y:o.y}}switch(getAlignment(t)){case"start":S[p]-=_*(n&&m?-1:1);break;case"end":S[p]+=_*(n&&m?-1:1);break}return S}const computePosition$1=async(e,t,n)=>{const{placement:o="bottom",strategy:l="absolute",middleware:u=[],platform:p}=n,d=u.filter(Boolean),f=await(p.isRTL==null?void 0:p.isRTL(t));let m=await p.getElementRects({reference:e,floating:t,strategy:l}),{x:g,y:b}=computeCoordsFromPlacement(m,o,f),_=o,S={},E=0;for(let C=0;C<d.length;C++){const{name:R,fn:I}=d[C],{x:N,y:O,data:V,reset:M}=await I({x:g,y:b,initialPlacement:o,placement:_,strategy:l,middlewareData:S,rects:m,platform:p,elements:{reference:e,floating:t}});g=N??g,b=O??b,S={...S,[R]:{...S[R],...V}},M&&E<=50&&(E++,typeof M=="object"&&(M.placement&&(_=M.placement),M.rects&&(m=M.rects===!0?await p.getElementRects({reference:e,floating:t,strategy:l}):M.rects),{x:g,y:b}=computeCoordsFromPlacement(m,_,f)),C=-1)}return{x:g,y:b,placement:_,strategy:l,middlewareData:S}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:o,y:l,platform:u,rects:p,elements:d,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:_=!1,padding:S=0}=evaluate(t,e),E=getPaddingObject(S),R=d[_?b==="floating"?"reference":"floating":b],I=rectToClientRect(await u.getClippingRect({element:(n=await(u.isElement==null?void 0:u.isElement(R)))==null||n?R:R.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:m,rootBoundary:g,strategy:f})),N=b==="floating"?{x:o,y:l,width:p.floating.width,height:p.floating.height}:p.reference,O=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),V=await(u.isElement==null?void 0:u.isElement(O))?await(u.getScale==null?void 0:u.getScale(O))||{x:1,y:1}:{x:1,y:1},M=rectToClientRect(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:O,strategy:f}):N);return{top:(I.top-M.top+E.top)/V.y,bottom:(M.bottom-I.bottom+E.bottom)/V.y,left:(I.left-M.left+E.left)/V.x,right:(M.right-I.right+E.right)/V.x}}const arrow$3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:l,rects:u,platform:p,elements:d,middlewareData:f}=t,{element:m,padding:g=0}=evaluate(e,t)||{};if(m==null)return{};const b=getPaddingObject(g),_={x:n,y:o},S=getAlignmentAxis(l),E=getAxisLength(S),C=await p.getDimensions(m),R=S==="y",I=R?"top":"left",N=R?"bottom":"right",O=R?"clientHeight":"clientWidth",V=u.reference[E]+u.reference[S]-_[S]-u.floating[E],M=_[S]-u.reference[S],A=await(p.getOffsetParent==null?void 0:p.getOffsetParent(m));let j=A?A[O]:0;(!j||!await(p.isElement==null?void 0:p.isElement(A)))&&(j=d.floating[O]||u.floating[E]);const B=V/2-M/2,L=j/2-C[E]/2-1,q=min$2(b[I],L),F=min$2(b[N],L),H=q,U=j-C[E]-F,G=j/2-C[E]/2+B,J=clamp$1(H,G,U),Z=!f.arrow&&getAlignment(l)!=null&&G!==J&&u.reference[E]/2-(G<H?q:F)-C[E]/2<0,ae=Z?G<H?G-H:G-U:0;return{[S]:_[S]+ae,data:{[S]:J,centerOffset:G-J-ae,...Z&&{alignmentOffset:ae}},reset:Z}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:l,middlewareData:u,rects:p,initialPlacement:d,platform:f,elements:m}=t,{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:_,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:C=!0,...R}=evaluate(e,t);if((n=u.arrow)!=null&&n.alignmentOffset)return{};const I=getSide(l),N=getSideAxis(d),O=getSide(d)===d,V=await(f.isRTL==null?void 0:f.isRTL(m.floating)),M=_||(O||!C?[getOppositePlacement(d)]:getExpandedPlacements(d)),A=E!=="none";!_&&A&&M.push(...getOppositeAxisPlacements(d,C,E,V));const j=[d,...M],B=await detectOverflow(t,R),L=[];let q=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&L.push(B[I]),b){const G=getAlignmentSides(l,p,V);L.push(B[G[0]],B[G[1]])}if(q=[...q,{placement:l,overflows:L}],!L.every(G=>G<=0)){var F,H;const G=(((F=u.flip)==null?void 0:F.index)||0)+1,J=j[G];if(J)return{data:{index:G,overflows:q},reset:{placement:J}};let Z=(H=q.filter(ae=>ae.overflows[0]<=0).sort((ae,W)=>ae.overflows[1]-W.overflows[1])[0])==null?void 0:H.placement;if(!Z)switch(S){case"bestFit":{var U;const ae=(U=q.filter(W=>{if(A){const Q=getSideAxis(W.placement);return Q===N||Q==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(Q=>Q>0).reduce((Q,ee)=>Q+ee,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:U[0];ae&&(Z=ae);break}case"initialPlacement":Z=d;break}if(l!==Z)return{reset:{placement:Z}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...l}=evaluate(e,t);switch(o){case"referenceHidden":{const u=await detectOverflow(t,{...l,elementContext:"reference"}),p=getSideOffsets(u,n.reference);return{data:{referenceHiddenOffsets:p,referenceHidden:isAnySideFullyClipped(p)}}}case"escaped":{const u=await detectOverflow(t,{...l,altBoundary:!0}),p=getSideOffsets(u,n.floating);return{data:{escapedOffsets:p,escaped:isAnySideFullyClipped(p)}}}default:return{}}}}};async function convertValueToCoords(e,t){const{placement:n,platform:o,elements:l}=e,u=await(o.isRTL==null?void 0:o.isRTL(l.floating)),p=getSide(n),d=getAlignment(n),f=getSideAxis(n)==="y",m=["left","top"].includes(p)?-1:1,g=u&&f?-1:1,b=evaluate(t,e);let{mainAxis:_,crossAxis:S,alignmentAxis:E}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof E=="number"&&(S=d==="end"?E*-1:E),f?{x:S*g,y:_*m}:{x:_*m,y:S*g}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:l,y:u,placement:p,middlewareData:d}=t,f=await convertValueToCoords(t,e);return p===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:l+f.x,y:u+f.y,data:{...f,placement:p}}}}},shift$2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:l}=t,{mainAxis:u=!0,crossAxis:p=!1,limiter:d={fn:R=>{let{x:I,y:N}=R;return{x:I,y:N}}},...f}=evaluate(e,t),m={x:n,y:o},g=await detectOverflow(t,f),b=getSideAxis(getSide(l)),_=getOppositeAxis(b);let S=m[_],E=m[b];if(u){const R=_==="y"?"top":"left",I=_==="y"?"bottom":"right",N=S+g[R],O=S-g[I];S=clamp$1(N,S,O)}if(p){const R=b==="y"?"top":"left",I=b==="y"?"bottom":"right",N=E+g[R],O=E-g[I];E=clamp$1(N,E,O)}const C=d.fn({...t,[_]:S,[b]:E});return{...C,data:{x:C.x-n,y:C.y-o,enabled:{[_]:u,[b]:p}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:l,rects:u,middlewareData:p}=t,{offset:d=0,mainAxis:f=!0,crossAxis:m=!0}=evaluate(e,t),g={x:n,y:o},b=getSideAxis(l),_=getOppositeAxis(b);let S=g[_],E=g[b];const C=evaluate(d,t),R=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(f){const O=_==="y"?"height":"width",V=u.reference[_]-u.floating[O]+R.mainAxis,M=u.reference[_]+u.reference[O]-R.mainAxis;S<V?S=V:S>M&&(S=M)}if(m){var I,N;const O=_==="y"?"width":"height",V=["top","left"].includes(getSide(l)),M=u.reference[b]-u.floating[O]+(V&&((I=p.offset)==null?void 0:I[b])||0)+(V?0:R.crossAxis),A=u.reference[b]+u.reference[O]+(V?0:((N=p.offset)==null?void 0:N[b])||0)-(V?R.crossAxis:0);E<M?E=M:E>A&&(E=A)}return{[_]:S,[b]:E}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:l,rects:u,platform:p,elements:d}=t,{apply:f=()=>{},...m}=evaluate(e,t),g=await detectOverflow(t,m),b=getSide(l),_=getAlignment(l),S=getSideAxis(l)==="y",{width:E,height:C}=u.floating;let R,I;b==="top"||b==="bottom"?(R=b,I=_===(await(p.isRTL==null?void 0:p.isRTL(d.floating))?"start":"end")?"left":"right"):(I=b,R=_==="end"?"top":"bottom");const N=C-g.top-g.bottom,O=E-g.left-g.right,V=min$2(C-g[R],N),M=min$2(E-g[I],O),A=!t.middlewareData.shift;let j=V,B=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=O),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(j=N),A&&!_){const q=max$2(g.left,0),F=max$2(g.right,0),H=max$2(g.top,0),U=max$2(g.bottom,0);S?B=E-2*(q!==0||F!==0?q+F:max$2(g.left,g.right)):j=C-2*(H!==0||U!==0?H+U:max$2(g.top,g.bottom))}await f({...t,availableWidth:B,availableHeight:j});const L=await p.getDimensions(d.floating);return E!==L.width||C!==L.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement$1(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:o,display:l}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(l)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle$1(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement$1(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement$1(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=getNearestOverflowAncestor(e),u=l===((o=e.ownerDocument)==null?void 0:o.body),p=getWindow(l);if(u){const d=getFrameElement(p);return t.concat(p,p.visualViewport||[],isOverflowElement(l)?l:[],d&&n?getOverflowAncestors(d):[])}return t.concat(l,getOverflowAncestors(l,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const l=isHTMLElement$1(e),u=l?e.offsetWidth:n,p=l?e.offsetHeight:o,d=round$1(n)!==u||round$1(o)!==p;return d&&(n=u,o=p),{width:n,height:o,$:d}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement$1(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:o,height:l,$:u}=getCssDimensions(t);let p=(u?round$1(n.width):n.width)/o,d=(u?round$1(n.height):n.height)/l;return(!p||!Number.isFinite(p))&&(p=1),(!d||!Number.isFinite(d))&&(d=1),{x:p,y:d}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),u=unwrapElement(e);let p=createCoords(1);t&&(o?isElement(o)&&(p=getScale(o)):p=getScale(e));const d=shouldAddVisualOffsets(u,n,o)?getVisualOffsets(u):createCoords(0);let f=(l.left+d.x)/p.x,m=(l.top+d.y)/p.y,g=l.width/p.x,b=l.height/p.y;if(u){const _=getWindow(u),S=o&&isElement(o)?getWindow(o):o;let E=_,C=getFrameElement(E);for(;C&&o&&S!==E;){const R=getScale(C),I=C.getBoundingClientRect(),N=getComputedStyle$1(C),O=I.left+(C.clientLeft+parseFloat(N.paddingLeft))*R.x,V=I.top+(C.clientTop+parseFloat(N.paddingTop))*R.y;f*=R.x,m*=R.y,g*=R.x,b*=R.y,f+=O,m+=V,E=getWindow(C),C=getFrameElement(E)}}return rectToClientRect({width:g,height:b,x:f,y:m})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=o.left+t.scrollLeft-(n?0:getWindowScrollBarX(e,o)),u=o.top+t.scrollTop;return{x:l,y:u}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:o,strategy:l}=e;const u=l==="fixed",p=getDocumentElement(o),d=t?isTopLayer(t.floating):!1;if(o===p||d&&u)return n;let f={scrollLeft:0,scrollTop:0},m=createCoords(1);const g=createCoords(0),b=isHTMLElement$1(o);if((b||!b&&!u)&&((getNodeName(o)!=="body"||isOverflowElement(p))&&(f=getNodeScroll(o)),isHTMLElement$1(o))){const S=getBoundingClientRect(o);m=getScale(o),g.x=S.x+o.clientLeft,g.y=S.y+o.clientTop}const _=p&&!b&&!u?getHTMLOffset(p,f,!0):createCoords(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+g.x+_.x,y:n.y*m.y-f.scrollTop*m.y+g.y+_.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),o=e.ownerDocument.body,l=max$2(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),u=max$2(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let p=-n.scrollLeft+getWindowScrollBarX(e);const d=-n.scrollTop;return getComputedStyle$1(o).direction==="rtl"&&(p+=max$2(t.clientWidth,o.clientWidth)-l),{width:l,height:u,x:p,y:d}}function getViewportRect(e,t){const n=getWindow(e),o=getDocumentElement(e),l=n.visualViewport;let u=o.clientWidth,p=o.clientHeight,d=0,f=0;if(l){u=l.width,p=l.height;const m=isWebKit();(!m||m&&t==="fixed")&&(d=l.offsetLeft,f=l.offsetTop)}return{width:u,height:p,x:d,y:f}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),o=n.top+e.clientTop,l=n.left+e.clientLeft,u=isHTMLElement$1(e)?getScale(e):createCoords(1),p=e.clientWidth*u.x,d=e.clientHeight*u.y,f=l*u.x,m=o*u.y;return{width:p,height:d,x:f,y:m}}function getClientRectFromClippingAncestor(e,t,n){let o;if(t==="viewport")o=getViewportRect(e,n);else if(t==="document")o=getDocumentRect(getDocumentElement(e));else if(isElement(t))o=getInnerBoundingClientRect(t,n);else{const l=getVisualOffsets(e);o={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return rectToClientRect(o)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let o=getOverflowAncestors(e,[],!1).filter(d=>isElement(d)&&getNodeName(d)!=="body"),l=null;const u=getComputedStyle$1(e).position==="fixed";let p=u?getParentNode(e):e;for(;isElement(p)&&!isLastTraversableNode(p);){const d=getComputedStyle$1(p),f=isContainingBlock(p);!f&&d.position==="fixed"&&(l=null),(u?!f&&!l:!f&&d.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||isOverflowElement(p)&&!f&&hasFixedPositionAncestor(e,p))?o=o.filter(g=>g!==p):l=d,p=getParentNode(p)}return t.set(e,o),o}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:o,strategy:l}=e;const p=[...n==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),o],d=p[0],f=p.reduce((m,g)=>{const b=getClientRectFromClippingAncestor(t,g,l);return m.top=max$2(b.top,m.top),m.right=min$2(b.right,m.right),m.bottom=min$2(b.bottom,m.bottom),m.left=max$2(b.left,m.left),m},getClientRectFromClippingAncestor(t,d,l));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const o=isHTMLElement$1(t),l=getDocumentElement(t),u=n==="fixed",p=getBoundingClientRect(e,!0,u,t);let d={scrollLeft:0,scrollTop:0};const f=createCoords(0);if(o||!o&&!u)if((getNodeName(t)!=="body"||isOverflowElement(l))&&(d=getNodeScroll(t)),o){const _=getBoundingClientRect(t,!0,u,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else l&&(f.x=getWindowScrollBarX(l));const m=l&&!o&&!u?getHTMLOffset(l,d):createCoords(0),g=p.left+d.scrollLeft-f.x-m.x,b=p.top+d.scrollTop-f.y-m.y;return{x:g,y:b,width:p.width,height:p.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement$1(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement$1(e)){let l=getParentNode(e);for(;l&&!isLastTraversableNode(l);){if(isElement(l)&&!isStaticPositioned(l))return l;l=getParentNode(l)}return n}let o=getTrueOffsetParent(e,t);for(;o&&isTableElement(o)&&isStaticPositioned(o);)o=getTrueOffsetParent(o,t);return o&&isLastTraversableNode(o)&&isStaticPositioned(o)&&!isContainingBlock(o)?n:o||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,o=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,o;const l=getDocumentElement(e);function u(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function p(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),u();const m=e.getBoundingClientRect(),{left:g,top:b,width:_,height:S}=m;if(d||t(),!_||!S)return;const E=floor(b),C=floor(l.clientWidth-(g+_)),R=floor(l.clientHeight-(b+S)),I=floor(g),O={rootMargin:-E+"px "+-C+"px "+-R+"px "+-I+"px",threshold:max$2(0,min$2(1,f))||1};let V=!0;function M(A){const j=A[0].intersectionRatio;if(j!==f){if(!V)return p();j?p(!1,j):o=setTimeout(()=>{p(!1,1e-7)},1e3)}j===1&&!rectsAreEqual(m,e.getBoundingClientRect())&&p(),V=!1}try{n=new IntersectionObserver(M,{...O,root:l.ownerDocument})}catch{n=new IntersectionObserver(M,O)}n.observe(e)}return p(!0),u}function autoUpdate(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,m=unwrapElement(e),g=l||u?[...m?getOverflowAncestors(m):[],...getOverflowAncestors(t)]:[];g.forEach(I=>{l&&I.addEventListener("scroll",n,{passive:!0}),u&&I.addEventListener("resize",n)});const b=m&&d?observeMove(m,n):null;let _=-1,S=null;p&&(S=new ResizeObserver(I=>{let[N]=I;N&&N.target===m&&S&&(S.unobserve(t),cancelAnimationFrame(_),_=requestAnimationFrame(()=>{var O;(O=S)==null||O.observe(t)})),n()}),m&&!f&&S.observe(m),S.observe(t));let E,C=f?getBoundingClientRect(e):null;f&&R();function R(){const I=getBoundingClientRect(e);C&&!rectsAreEqual(C,I)&&n(),C=I,E=requestAnimationFrame(R)}return n(),()=>{var I;g.forEach(N=>{l&&N.removeEventListener("scroll",n),u&&N.removeEventListener("resize",n)}),b==null||b(),(I=S)==null||I.disconnect(),S=null,f&&cancelAnimationFrame(E)}}const offset$1=offset$2,shift$1=shift$2,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$2=arrow$3,limitShift$1=limitShift$2,computePosition=(e,t,n)=>{const o=new Map,l={platform,...n},u={...l.platform,_c:o};return computePosition$1(e,t,{...l,platform:u})};var index=typeof document<"u"?React.useLayoutEffect:React.useEffect;function deepEqual$1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,l;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!deepEqual$1(e[o],t[o]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,l[o]))return!1;for(o=n;o--!==0;){const u=l[o];if(!(u==="_owner"&&e.$$typeof)&&!deepEqual$1(e[u],t[u]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React__namespace.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:l,elements:{reference:u,floating:p}={},transform:d=!0,whileElementsMounted:f,open:m}=e,[g,b]=React__namespace.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[_,S]=React__namespace.useState(o);deepEqual$1(_,o)||S(o);const[E,C]=React__namespace.useState(null),[R,I]=React__namespace.useState(null),N=React__namespace.useCallback(W=>{W!==A.current&&(A.current=W,C(W))},[]),O=React__namespace.useCallback(W=>{W!==j.current&&(j.current=W,I(W))},[]),V=u||E,M=p||R,A=React__namespace.useRef(null),j=React__namespace.useRef(null),B=React__namespace.useRef(g),L=f!=null,q=useLatestRef(f),F=useLatestRef(l),H=useLatestRef(m),U=React__namespace.useCallback(()=>{if(!A.current||!j.current)return;const W={placement:t,strategy:n,middleware:_};F.current&&(W.platform=F.current),computePosition(A.current,j.current,W).then(Q=>{const ee={...Q,isPositioned:H.current!==!1};G.current&&!deepEqual$1(B.current,ee)&&(B.current=ee,ReactDOM__namespace.flushSync(()=>{b(ee)}))})},[_,t,n,F,H]);index(()=>{m===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,b(W=>({...W,isPositioned:!1})))},[m]);const G=React__namespace.useRef(!1);index(()=>(G.current=!0,()=>{G.current=!1}),[]),index(()=>{if(V&&(A.current=V),M&&(j.current=M),V&&M){if(q.current)return q.current(V,M,U);U()}},[V,M,U,q,L]);const J=React__namespace.useMemo(()=>({reference:A,floating:j,setReference:N,setFloating:O}),[N,O]),Z=React__namespace.useMemo(()=>({reference:V,floating:M}),[V,M]),ae=React__namespace.useMemo(()=>{const W={position:n,left:0,top:0};if(!Z.floating)return W;const Q=roundByDPR(Z.floating,g.x),ee=roundByDPR(Z.floating,g.y);return d?{...W,transform:"translate("+Q+"px, "+ee+"px)",...getDPR(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:ee}},[n,d,Z.floating,g.x,g.y]);return React__namespace.useMemo(()=>({...g,update:U,refs:J,elements:Z,floatingStyles:ae}),[g,U,J,Z,ae])}const arrow$1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:l}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?arrow$2({element:o.current,padding:l}).fn(n):{}:o?arrow$2({element:o,padding:l}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift=(e,t)=>({...shift$1(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),arrow=(e,t)=>({...arrow$1(e),options:[e,t]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((e,t)=>{const{children:n,width:o=10,height:l=5,...u}=e;return jsxRuntime.jsx(Primitive.svg,{...u,ref:t,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$7=Arrow$1;function useSize(e){const[t,n]=React__namespace.useState(void 0);return useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let p,d;if("borderBoxSize"in u){const f=u.borderBoxSize,m=Array.isArray(f)?f[0]:f;p=m.inlineSize,d=m.blockSize}else p=e.offsetWidth,d=e.offsetHeight;n({width:p,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=e=>{const{__scopePopper:t,children:n}=e,[o,l]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:t,anchor:o,onAnchorChange:l,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$1="PopperAnchor",PopperAnchor=React__namespace.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...l}=e,u=usePopperContext(ANCHOR_NAME$1,n),p=React__namespace.useRef(null),d=useComposedRefs(t,p);return React__namespace.useEffect(()=>{u.onAnchorChange((o==null?void 0:o.current)||p.current)}),o?null:jsxRuntime.jsx(Primitive.div,{...l,ref:d})});PopperAnchor.displayName=ANCHOR_NAME$1;var CONTENT_NAME$5="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$5),PopperContent=React__namespace.forwardRef((e,t)=>{var he,ye,de,le,se,te;const{__scopePopper:n,side:o="bottom",sideOffset:l=0,align:u="center",alignOffset:p=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:b="partial",hideWhenDetached:_=!1,updatePositionStrategy:S="optimized",onPlaced:E,...C}=e,R=usePopperContext(CONTENT_NAME$5,n),[I,N]=React__namespace.useState(null),O=useComposedRefs(t,xe=>N(xe)),[V,M]=React__namespace.useState(null),A=useSize(V),j=(A==null?void 0:A.width)??0,B=(A==null?void 0:A.height)??0,L=o+(u!=="center"?"-"+u:""),q=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},F=Array.isArray(m)?m:[m],H=F.length>0,U={padding:q,boundary:F.filter(isNotNull),altBoundary:H},{refs:G,floatingStyles:J,placement:Z,isPositioned:ae,middlewareData:W}=useFloating({strategy:"fixed",placement:L,whileElementsMounted:(...xe)=>autoUpdate(...xe,{animationFrame:S==="always"}),elements:{reference:R.anchor},middleware:[offset({mainAxis:l+B,alignmentAxis:p}),f&&shift({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?limitShift():void 0,...U}),f&&flip({...U}),size({...U,apply:({elements:xe,rects:oe,availableWidth:be,availableHeight:_e})=>{const{width:Ce,height:Te}=oe.reference,Ee=xe.floating.style;Ee.setProperty("--radix-popper-available-width",`${be}px`),Ee.setProperty("--radix-popper-available-height",`${_e}px`),Ee.setProperty("--radix-popper-anchor-width",`${Ce}px`),Ee.setProperty("--radix-popper-anchor-height",`${Te}px`)}}),V&&arrow({element:V,padding:d}),transformOrigin({arrowWidth:j,arrowHeight:B}),_&&hide({strategy:"referenceHidden",...U})]}),[Q,ee]=getSideAndAlignFromPlacement(Z),ie=useCallbackRef$1(E);useLayoutEffect2(()=>{ae&&(ie==null||ie())},[ae,ie]);const ce=(he=W.arrow)==null?void 0:he.x,ue=(ye=W.arrow)==null?void 0:ye.y,fe=((de=W.arrow)==null?void 0:de.centerOffset)!==0,[pe,ve]=React__namespace.useState();return useLayoutEffect2(()=>{I&&ve(window.getComputedStyle(I).zIndex)},[I]),jsxRuntime.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:ae?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(le=W.transformOrigin)==null?void 0:le.x,(se=W.transformOrigin)==null?void 0:se.y].join(" "),...((te=W.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:Q,onArrowChange:M,arrowX:ce,arrowY:ue,shouldHideArrow:fe,children:jsxRuntime.jsx(Primitive.div,{"data-side":Q,"data-align":ee,...C,ref:O,style:{...C.style,animation:ae?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$5;var ARROW_NAME$4="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(t,n){const{__scopePopper:o,...l}=t,u=useContentContext(ARROW_NAME$4,o),p=OPPOSITE_SIDE[u.placedSide];return jsxRuntime.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(Root$7,{...l,ref:n,style:{...l.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$4;function isNotNull(e){return e!==null}var transformOrigin=e=>({name:"transformOrigin",options:e,fn(t){var R,I,N;const{placement:n,rects:o,middlewareData:l}=t,p=((R=l.arrow)==null?void 0:R.centerOffset)!==0,d=p?0:e.arrowWidth,f=p?0:e.arrowHeight,[m,g]=getSideAndAlignFromPlacement(n),b={start:"0%",center:"50%",end:"100%"}[g],_=(((I=l.arrow)==null?void 0:I.x)??0)+d/2,S=(((N=l.arrow)==null?void 0:N.y)??0)+f/2;let E="",C="";return m==="bottom"?(E=p?b:`${_}px`,C=`${-f}px`):m==="top"?(E=p?b:`${_}px`,C=`${o.floating.height+f}px`):m==="right"?(E=`${-f}px`,C=p?b:`${S}px`):m==="left"&&(E=`${o.floating.width+f}px`,C=p?b:`${S}px`),{data:{x:E,y:C}}}});function getSideAndAlignFromPlacement(e){const[t,n="center"]=e.split("-");return[t,n]}var Root2$4=Popper,Anchor=PopperAnchor,Content$1=PopperContent,Arrow=PopperArrow,ENTRY_FOCUS="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS={bubbles:!1,cancelable:!0},GROUP_NAME$3="RovingFocusGroup",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(GROUP_NAME$3),[createRovingFocusGroupContext,createRovingFocusGroupScope]=createContextScope(GROUP_NAME$3,[createCollectionScope$3]),[RovingFocusProvider,useRovingFocusContext]=createRovingFocusGroupContext(GROUP_NAME$3),RovingFocusGroup=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(RovingFocusGroupImpl,{...e,ref:t})})}));RovingFocusGroup.displayName=GROUP_NAME$3;var RovingFocusGroupImpl=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:l=!1,dir:u,currentTabStopId:p,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...b}=e,_=React__namespace.useRef(null),S=useComposedRefs(t,_),E=useDirection(u),[C,R]=useControllableState({prop:p,defaultProp:d??null,onChange:f,caller:GROUP_NAME$3}),[I,N]=React__namespace.useState(!1),O=useCallbackRef$1(m),V=useCollection$3(n),M=React__namespace.useRef(!1),[A,j]=React__namespace.useState(0);return React__namespace.useEffect(()=>{const B=_.current;if(B)return B.addEventListener(ENTRY_FOCUS,O),()=>B.removeEventListener(ENTRY_FOCUS,O)},[O]),jsxRuntime.jsx(RovingFocusProvider,{scope:n,orientation:o,dir:E,loop:l,currentTabStopId:C,onItemFocus:React__namespace.useCallback(B=>R(B),[R]),onItemShiftTab:React__namespace.useCallback(()=>N(!0),[]),onFocusableItemAdd:React__namespace.useCallback(()=>j(B=>B+1),[]),onFocusableItemRemove:React__namespace.useCallback(()=>j(B=>B-1),[]),children:jsxRuntime.jsx(Primitive.div,{tabIndex:I||A===0?-1:0,"data-orientation":o,...b,ref:S,style:{outline:"none",...e.style},onMouseDown:composeEventHandlers(e.onMouseDown,()=>{M.current=!0}),onFocus:composeEventHandlers(e.onFocus,B=>{const L=!M.current;if(B.target===B.currentTarget&&L&&!I){const q=new CustomEvent(ENTRY_FOCUS,EVENT_OPTIONS);if(B.currentTarget.dispatchEvent(q),!q.defaultPrevented){const F=V().filter(Z=>Z.focusable),H=F.find(Z=>Z.active),U=F.find(Z=>Z.id===C),J=[H,U,...F].filter(Boolean).map(Z=>Z.ref.current);focusFirst$2(J,g)}}M.current=!1}),onBlur:composeEventHandlers(e.onBlur,()=>N(!1))})})}),ITEM_NAME$3="RovingFocusGroupItem",RovingFocusGroupItem=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:l=!1,tabStopId:u,children:p,...d}=e,f=useId(),m=u||f,g=useRovingFocusContext(ITEM_NAME$3,n),b=g.currentTabStopId===m,_=useCollection$3(n),{onFocusableItemAdd:S,onFocusableItemRemove:E}=g;return React__namespace.useEffect(()=>{if(o)return S(),()=>E()},[o,S,E]),jsxRuntime.jsx(Collection$3.ItemSlot,{scope:n,id:m,focusable:o,active:l,children:jsxRuntime.jsx(Primitive.span,{tabIndex:b?0:-1,"data-orientation":g.orientation,...d,ref:t,onMouseDown:composeEventHandlers(e.onMouseDown,C=>{o?g.onItemFocus(m):C.preventDefault()}),onFocus:composeEventHandlers(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:composeEventHandlers(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){g.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const R=getFocusIntent(C,g.orientation,g.dir);if(R!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let N=_().filter(O=>O.focusable).map(O=>O.ref.current);if(R==="last")N.reverse();else if(R==="prev"||R==="next"){R==="prev"&&N.reverse();const O=N.indexOf(C.currentTarget);N=g.loop?wrapArray$2(N,O+1):N.slice(O+1)}setTimeout(()=>focusFirst$2(N))}}),children:typeof p=="function"?p({isCurrentTabStop:b}):p})})});RovingFocusGroupItem.displayName=ITEM_NAME$3;var MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function getFocusIntent(e,t,n){const o=getDirectionAwareKey(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return MAP_KEY_TO_FOCUS_INTENT[o]}function focusFirst$2(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function wrapArray$2(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Root$6=RovingFocusGroup,Item$1=RovingFocusGroupItem,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$2,useCollection$2,createCollectionScope$2]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope(MENU_NAME,[createCollectionScope$2,createPopperScope,createRovingFocusGroupScope]),usePopperScope$2=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:l,onOpenChange:u,modal:p=!0}=e,d=usePopperScope$2(t),[f,m]=React__namespace.useState(null),g=React__namespace.useRef(!1),b=useCallbackRef$1(u),_=useDirection(l);return React__namespace.useEffect(()=>{const S=()=>{g.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>g.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),jsxRuntime.jsx(Root2$4,{...d,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:n,onOpenChange:b,content:f,onContentChange:m,children:jsxRuntime.jsx(MenuRootProvider,{scope:t,onClose:React__namespace.useCallback(()=>b(!1),[b]),isUsingKeyboardRef:g,dir:_,modal:p,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME="MenuAnchor",MenuAnchor=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,l=usePopperScope$2(n);return jsxRuntime.jsx(Anchor,{...l,...o,ref:t})});MenuAnchor.displayName=ANCHOR_NAME;var PORTAL_NAME$3="MenuPortal",[PortalProvider$1,usePortalContext$1]=createMenuContext(PORTAL_NAME$3,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:l}=e,u=useMenuContext(PORTAL_NAME$3,t);return jsxRuntime.jsx(PortalProvider$1,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||u.open,children:jsxRuntime.jsx(Portal$4,{asChild:!0,container:l,children:o})})})};MenuPortal.displayName=PORTAL_NAME$3;var CONTENT_NAME$4="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$4),MenuContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$4,e.__scopeMenu),{forceMount:o=n.forceMount,...l}=e,u=useMenuContext(CONTENT_NAME$4,e.__scopeMenu),p=useMenuRootContext(CONTENT_NAME$4,e.__scopeMenu);return jsxRuntime.jsx(Collection$2.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||u.open,children:jsxRuntime.jsx(Collection$2.Slot,{scope:e.__scopeMenu,children:p.modal?jsxRuntime.jsx(MenuRootContentModal,{...l,ref:t}):jsxRuntime.jsx(MenuRootContentNonModal,{...l,ref:t})})})})}),MenuRootContentModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$4,e.__scopeMenu),o=React__namespace.useRef(null),l=useComposedRefs(t,o);return React__namespace.useEffect(()=>{const u=o.current;if(u)return hideOthers(u)},[]),jsxRuntime.jsx(MenuContentImpl,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$4,e.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot$1=createSlot("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:p,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:b,onInteractOutside:_,onDismiss:S,disableOutsideScroll:E,...C}=e,R=useMenuContext(CONTENT_NAME$4,n),I=useMenuRootContext(CONTENT_NAME$4,n),N=usePopperScope$2(n),O=useRovingFocusGroupScope$1(n),V=useCollection$2(n),[M,A]=React__namespace.useState(null),j=React__namespace.useRef(null),B=useComposedRefs(t,j,R.onContentChange),L=React__namespace.useRef(0),q=React__namespace.useRef(""),F=React__namespace.useRef(0),H=React__namespace.useRef(null),U=React__namespace.useRef("right"),G=React__namespace.useRef(0),J=E?ReactRemoveScroll:React__namespace.Fragment,Z=E?{as:Slot$1,allowPinchZoom:!0}:void 0,ae=Q=>{var he,ye;const ee=q.current+Q,ie=V().filter(de=>!de.disabled),ce=document.activeElement,ue=(he=ie.find(de=>de.ref.current===ce))==null?void 0:he.textValue,fe=ie.map(de=>de.textValue),pe=getNextMatch(fe,ee,ue),ve=(ye=ie.find(de=>de.textValue===pe))==null?void 0:ye.ref.current;(function de(le){q.current=le,window.clearTimeout(L.current),le!==""&&(L.current=window.setTimeout(()=>de(""),1e3))})(ee),ve&&setTimeout(()=>ve.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(L.current),[]),useFocusGuards();const W=React__namespace.useCallback(Q=>{var ie,ce;return U.current===((ie=H.current)==null?void 0:ie.side)&&isPointerInGraceArea(Q,(ce=H.current)==null?void 0:ce.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:q,onItemEnter:React__namespace.useCallback(Q=>{W(Q)&&Q.preventDefault()},[W]),onItemLeave:React__namespace.useCallback(Q=>{var ee;W(Q)||((ee=j.current)==null||ee.focus(),A(null))},[W]),onTriggerLeave:React__namespace.useCallback(Q=>{W(Q)&&Q.preventDefault()},[W]),pointerGraceTimerRef:F,onPointerGraceIntentChange:React__namespace.useCallback(Q=>{H.current=Q},[]),children:jsxRuntime.jsx(J,{...Z,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:composeEventHandlers(u,Q=>{var ee;Q.preventDefault(),(ee=j.current)==null||ee.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:b,onInteractOutside:_,onDismiss:S,children:jsxRuntime.jsx(Root$6,{asChild:!0,...O,dir:I.dir,orientation:"vertical",loop:o,currentTabStopId:M,onCurrentTabStopIdChange:A,onEntryFocus:composeEventHandlers(f,Q=>{I.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$1,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(R.open),"data-radix-menu-content":"",dir:I.dir,...N,...C,ref:B,style:{outline:"none",...C.style},onKeyDown:composeEventHandlers(C.onKeyDown,Q=>{const ie=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,ce=Q.ctrlKey||Q.altKey||Q.metaKey,ue=Q.key.length===1;ie&&(Q.key==="Tab"&&Q.preventDefault(),!ce&&ue&&ae(Q.key));const fe=j.current;if(Q.target!==fe||!FIRST_LAST_KEYS.includes(Q.key))return;Q.preventDefault();const ve=V().filter(he=>!he.disabled).map(he=>he.ref.current);LAST_KEYS.includes(Q.key)&&ve.reverse(),focusFirst$1(ve)}),onBlur:composeEventHandlers(e.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(L.current),q.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(Q=>{const ee=Q.target,ie=G.current!==Q.clientX;if(Q.currentTarget.contains(ee)&&ie){const ce=Q.clientX>G.current?"right":"left";U.current=ce,G.current=Q.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$4;var GROUP_NAME$2="MenuGroup",MenuGroup=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{role:"group",...o,ref:t})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{...o,ref:t})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$2="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...l}=e,u=React__namespace.useRef(null),p=useMenuRootContext(ITEM_NAME$2,e.__scopeMenu),d=useMenuContentContext(ITEM_NAME$2,e.__scopeMenu),f=useComposedRefs(t,u),m=React__namespace.useRef(!1),g=()=>{const b=u.current;if(!n&&b){const _=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});b.addEventListener(ITEM_SELECT,S=>o==null?void 0:o(S),{once:!0}),dispatchDiscreteCustomEvent(b,_),_.defaultPrevented?m.current=!1:p.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...l,ref:f,disabled:n,onClick:composeEventHandlers(e.onClick,g),onPointerDown:b=>{var _;(_=e.onPointerDown)==null||_.call(e,b),m.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,b=>{var _;m.current||(_=b.currentTarget)==null||_.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,b=>{const _=d.searchRef.current!=="";n||_&&b.key===" "||SELECTION_KEYS$1.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})});MenuItem.displayName=ITEM_NAME$2;var MenuItemImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:l,...u}=e,p=useMenuContentContext(ITEM_NAME$2,n),d=useRovingFocusGroupScope$1(n),f=React__namespace.useRef(null),m=useComposedRefs(t,f),[g,b]=React__namespace.useState(!1),[_,S]=React__namespace.useState("");return React__namespace.useEffect(()=>{const E=f.current;E&&S((E.textContent??"").trim())},[u.children]),jsxRuntime.jsx(Collection$2.ItemSlot,{scope:n,disabled:o,textValue:l??_,children:jsxRuntime.jsx(Item$1,{asChild:!0,...d,focusable:!o,children:jsxRuntime.jsx(Primitive.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...u,ref:m,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(E=>{o?p.onItemLeave(E):(p.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(E=>p.onItemLeave(E))),onFocus:composeEventHandlers(e.onFocus,()=>b(!0)),onBlur:composeEventHandlers(e.onBlur,()=>b(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...l}=e;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate(n)?"mixed":n,...l,ref:t,"data-state":getCheckedState(n),onSelect:composeEventHandlers(l.onSelect,()=>o==null?void 0:o(isIndeterminate(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((e,t)=>{const{value:n,onValueChange:o,...l}=e,u=useCallbackRef$1(o);return jsxRuntime.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:n,onValueChange:u,children:jsxRuntime.jsx(MenuGroup,{...l,ref:t})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((e,t)=>{const{value:n,...o}=e,l=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),u=n===l.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:u,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":u,...o,ref:t,"data-state":getCheckedState(u),onSelect:composeEventHandlers(o.onSelect,()=>{var p;return(p=l.onValueChange)==null?void 0:p.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((e,t)=>{const{__scopeMenu:n,forceMount:o,...l}=e,u=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n);return jsxRuntime.jsx(Presence,{present:o||isIndeterminate(u.checked)||u.checked===!0,children:jsxRuntime.jsx(Primitive.span,{...l,ref:t,"data-state":getCheckedState(u.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$3="MenuArrow",MenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,l=usePopperScope$2(n);return jsxRuntime.jsx(Arrow,{...l,...o,ref:t})});MenuArrow.displayName=ARROW_NAME$3;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:l}=e,u=useMenuContext(SUB_NAME,t),p=usePopperScope$2(t),[d,f]=React__namespace.useState(null),[m,g]=React__namespace.useState(null),b=useCallbackRef$1(l);return React__namespace.useEffect(()=>(u.open===!1&&b(!1),()=>b(!1)),[u.open,b]),jsxRuntime.jsx(Root2$4,{...p,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:o,onOpenChange:b,content:m,onContentChange:g,children:jsxRuntime.jsx(MenuSubProvider,{scope:t,contentId:useId(),triggerId:useId(),trigger:d,onTriggerChange:f,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),l=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),u=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),p=React__namespace.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=u,m={__scopeMenu:e.__scopeMenu},g=React__namespace.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null},[]);return React__namespace.useEffect(()=>g,[g]),React__namespace.useEffect(()=>{const b=d.current;return()=>{window.clearTimeout(b),f(null)}},[d,f]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,...m,children:jsxRuntime.jsx(MenuItemImpl,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":getOpenState(n.open),...e,ref:composeRefs(t,l.onTriggerChange),onClick:b=>{var _;(_=e.onClick)==null||_.call(e,b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(b=>{u.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!n.open&&!p.current&&(u.onPointerGraceIntentChange(null),p.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(b=>{var S,E;g();const _=(S=n.content)==null?void 0:S.getBoundingClientRect();if(_){const C=(E=n.content)==null?void 0:E.dataset.side,R=C==="right",I=R?-5:5,N=_[R?"left":"right"],O=_[R?"right":"left"];u.onPointerGraceIntentChange({area:[{x:b.clientX+I,y:b.clientY},{x:N,y:_.top},{x:O,y:_.top},{x:O,y:_.bottom},{x:N,y:_.bottom}],side:C}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(b),b.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,b=>{var S;const _=u.searchRef.current!=="";e.disabled||_&&b.key===" "||SUB_OPEN_KEYS[o.dir].includes(b.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),b.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$4,e.__scopeMenu),{forceMount:o=n.forceMount,...l}=e,u=useMenuContext(CONTENT_NAME$4,e.__scopeMenu),p=useMenuRootContext(CONTENT_NAME$4,e.__scopeMenu),d=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),f=React__namespace.useRef(null),m=useComposedRefs(t,f);return jsxRuntime.jsx(Collection$2.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||u.open,children:jsxRuntime.jsx(Collection$2.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:d.contentId,"aria-labelledby":d.triggerId,...l,ref:m,align:"start",side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var b;p.isUsingKeyboardRef.current&&((b=f.current)==null||b.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,g=>{g.target!==d.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,g=>{p.onClose(),g.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{var S;const b=g.currentTarget.contains(g.target),_=SUB_CLOSE_KEYS[p.dir].includes(g.key);b&&_&&(u.onOpenChange(!1),(S=d.trigger)==null||S.focus(),g.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst$1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wrapArray$1(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function getNextMatch(e,t,n){const l=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,u=n?e.indexOf(n):-1;let p=wrapArray$1(e,Math.max(u,0));l.length===1&&(p=p.filter(m=>m!==n));const f=p.find(m=>m.toLowerCase().startsWith(l.toLowerCase()));return f!==n?f:void 0}function isPointInPolygon$1(e,t){const{x:n,y:o}=e;let l=!1;for(let u=0,p=t.length-1;u<t.length;p=u++){const d=t[u],f=t[p],m=d.x,g=d.y,b=f.x,_=f.y;g>o!=_>o&&n<(b-m)*(o-g)/(_-g)+m&&(l=!l)}return l}function isPointerInGraceArea(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return isPointInPolygon$1(n,t)}function whenMouse(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Root3$1=Menu,Anchor2=MenuAnchor,Portal$2=MenuPortal,Content2$3=MenuContent,Group=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,createDropdownMenuScope]=createContextScope(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:l,defaultOpen:u,onOpenChange:p,modal:d=!0}=e,f=useMenuScope(t),m=React__namespace.useRef(null),[g,b]=useControllableState({prop:l,defaultProp:u??!1,onChange:p,caller:DROPDOWN_MENU_NAME});return jsxRuntime.jsx(DropdownMenuProvider,{scope:t,triggerId:useId(),triggerRef:m,contentId:useId(),open:g,onOpenChange:b,onOpenToggle:React__namespace.useCallback(()=>b(_=>!_),[b]),modal:d,children:jsxRuntime.jsx(Root3$1,{...f,open:g,onOpenChange:b,dir:o,modal:d,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$3="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...l}=e,u=useDropdownMenuContext(TRIGGER_NAME$3,n),p=useMenuScope(n);return jsxRuntime.jsx(Anchor2,{asChild:!0,...p,children:jsxRuntime.jsx(Primitive.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:composeRefs(t,u.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(u.onOpenToggle(),u.open||d.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&u.onOpenToggle(),d.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$3;var PORTAL_NAME$2="DropdownMenuPortal",DropdownMenuPortal$1=e=>{const{__scopeDropdownMenu:t,...n}=e,o=useMenuScope(t);return jsxRuntime.jsx(Portal$2,{...o,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$2;var CONTENT_NAME$3="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useDropdownMenuContext(CONTENT_NAME$3,n),u=useMenuScope(n),p=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$3,{id:l.contentId,"aria-labelledby":l.triggerId,...u,...o,ref:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,d=>{var f;p.current||(f=l.triggerRef.current)==null||f.focus(),p.current=!1,d.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0,g=f.button===2||m;(!l.modal||g)&&(p.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$3;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Group,{...l,...o,ref:t})});DropdownMenuGroup$1.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Label$4,{...l,...o,ref:t})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$1="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...l,...o,ref:t})});DropdownMenuItem$1.displayName=ITEM_NAME$1;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...l,...o,ref:t})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...l,...o,ref:t})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...l,...o,ref:t})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator$1,{...l,...o,ref:t})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Separator$3,{...l,...o,ref:t})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$2="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...l,...o,ref:t})});DropdownMenuArrow.displayName=ARROW_NAME$2;var DropdownMenuSub$1=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:l,defaultOpen:u}=e,p=useMenuScope(t),[d,f]=useControllableState({prop:o,defaultProp:u??!1,onChange:l,caller:"DropdownMenuSub"});return jsxRuntime.jsx(Sub,{...p,open:d,onOpenChange:f,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...l,...o,ref:t})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...l,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$3=DropdownMenu$1,Trigger$3=DropdownMenuTrigger$1,Portal2=DropdownMenuPortal$1,Content2$2=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$3,DropdownMenuTrigger=Trigger$3,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:e,inset:t,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",t&&"pl-8",e),...o,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:e,...t},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]",e),...t}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},o)=>jsxRuntime.jsx(Portal2,{children:jsxRuntime.jsx(Content2$2,{ref:o,sideOffset:t,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]",e),...n})}));DropdownMenuContent.displayName=Content2$2.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:e,inset:t,...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",t&&"pl-8",e),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:e,children:t,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",e),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"})})}),t]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:e,children:t,...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",e),...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"})})}),t]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:e,inset:t,...n},o)=>jsxRuntime.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",e),...t}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:e,...t})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",e),...t});DropdownMenuShortcut.displayName="DropdownMenuShortcut";function ProductInventoryGrid({inventory:e,showBinLocation:t}){const n=(I,N,O=!1,V=!0)=>jsxRuntime.jsxs("div",{className:`p-3 text-sm ${V&&N>0?"border-t":""} ${O?"border-r":""}`,children:[jsxRuntime.jsxs("div",{className:"flex justify-between font-medium",children:[jsxRuntime.jsx("span",{children:I.Name}),jsxRuntime.jsx("span",{children:I.AvailableQuantity})]}),jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Expecting"}),jsxRuntime.jsx("span",{children:I.PurchaseOrderQuantity||"-"})]}),t&&jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Bin Location"}),jsxRuntime.jsx("span",{children:I.BinLocation||"-"})]})]},`warehouse-${I.WarehouseId}`),o=["MTL","TOR"],l=["VAN","EDM"],u=[...e].sort((I,N)=>(I.Name||"").localeCompare(N.Name||"")),p=u.filter(I=>I.Country==="US"),d=u.filter(I=>I.Country==="CA"),f=u.filter(I=>l.includes(I.WarehouseId||"")),m=u.filter(I=>o.includes(I.WarehouseId||"")),g=d.filter(I=>!o.includes(I.WarehouseId||"")&&!l.includes(I.WarehouseId||"")),b=I=>I.reduce((N,O)=>N+(O.AvailableQuantity||0),0),_=b(d),S=b(m),E=b(f),C=b(p),R=_+C;return jsxRuntime.jsxs("div",{className:"border rounded-md overflow-hidden",children:[d.length>0&&p.length>0&&jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Total"}),jsxRuntime.jsx("span",{children:R})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),d.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Canada"}),jsxRuntime.jsx("span",{children:_})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2",children:[jsxRuntime.jsxs("div",{className:"border-r",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"West"}),jsxRuntime.jsx("span",{children:E})]}),f.map((I,N)=>n(I,N))]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"East"}),jsxRuntime.jsx("span",{children:S})]}),m.map((I,N)=>n(I,N))]})]}),g.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:jsxRuntime.jsx("span",{children:"Other"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:g.map((I,N)=>n(I,N,N%2===0,!0))})]})]}),p.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"United States"}),jsxRuntime.jsx("span",{children:C})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:p.map((I,N)=>n(I,N,N%2===0,!0))})]}),e.length===0&&jsxRuntime.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:u}=t,p=Object.keys(l).map(m=>{const g=n==null?void 0:n[m],b=u==null?void 0:u[m];if(g===null)return null;const _=falsyToString(g)||falsyToString(b);return l[m][_]}),d=n&&Object.entries(n).reduce((m,g)=>{let[b,_]=g;return _===void 0||(m[b]=_),m},{}),f=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:b,className:_,...S}=g;return Object.entries(S).every(E=>{let[C,R]=E;return Array.isArray(R)?R.includes({...u,...d}[C]):{...u,...d}[C]===R})?[...m,b,_]:m},[]);return cx(e,p,f,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=React__namespace.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,confirmationDialog:l,onClick:u,...p},d)=>{const f=o?Slot$3:"button";if(!l)return jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:d,onClick:u,...p});u&&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:m,content:g,onConfirm:b,confirmText:_="Confirm",cancelText:S="Cancel"}=l,E=()=>{b()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:d,...p})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:m}),jsxRuntime.jsx(DialogDescription,{children:g})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"outline",children:S})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button,{onClick:E,children:_})})]})]})]})});Button.displayName="Button";var VISUALLY_HIDDEN_STYLES=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NAME$2="VisuallyHidden",VisuallyHidden=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive.span,{...e,ref:t,style:{...VISUALLY_HIDDEN_STYLES,...e.style}}));VisuallyHidden.displayName=NAME$2;var Root$5=VisuallyHidden,[createTooltipContext,createTooltipScope]=createContextScope("Tooltip",[createPopperScope]),usePopperScope$1=createPopperScope(),PROVIDER_NAME$1="TooltipProvider",DEFAULT_DELAY_DURATION=700,TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME$1),TooltipProvider$1=e=>{const{__scopeTooltip:t,delayDuration:n=DEFAULT_DELAY_DURATION,skipDelayDuration:o=300,disableHoverableContent:l=!1,children:u}=e,p=React__namespace.useRef(!0),d=React__namespace.useRef(!1),f=React__namespace.useRef(0);return React__namespace.useEffect(()=>{const m=f.current;return()=>window.clearTimeout(m)},[]),jsxRuntime.jsx(TooltipProviderContextProvider,{scope:t,isOpenDelayedRef:p,delayDuration:n,onOpen:React__namespace.useCallback(()=>{window.clearTimeout(f.current),p.current=!1},[]),onClose:React__namespace.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>p.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:React__namespace.useCallback(m=>{d.current=m},[]),disableHoverableContent:l,children:u})};TooltipProvider$1.displayName=PROVIDER_NAME$1;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),Tooltip$2=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:l,onOpenChange:u,disableHoverableContent:p,delayDuration:d}=e,f=useTooltipProviderContext(TOOLTIP_NAME,e.__scopeTooltip),m=usePopperScope$1(t),[g,b]=React__namespace.useState(null),_=useId(),S=React__namespace.useRef(0),E=p??f.disableHoverableContent,C=d??f.delayDuration,R=React__namespace.useRef(!1),[I,N]=useControllableState({prop:o,defaultProp:l??!1,onChange:j=>{j?(f.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):f.onClose(),u==null||u(j)},caller:TOOLTIP_NAME}),O=React__namespace.useMemo(()=>I?R.current?"delayed-open":"instant-open":"closed",[I]),V=React__namespace.useCallback(()=>{window.clearTimeout(S.current),S.current=0,R.current=!1,N(!0)},[N]),M=React__namespace.useCallback(()=>{window.clearTimeout(S.current),S.current=0,N(!1)},[N]),A=React__namespace.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{R.current=!0,N(!0),S.current=0},C)},[C,N]);return React__namespace.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),jsxRuntime.jsx(Root2$4,{...m,children:jsxRuntime.jsx(TooltipContextProvider,{scope:t,contentId:_,open:I,stateAttribute:O,trigger:g,onTriggerChange:b,onTriggerEnter:React__namespace.useCallback(()=>{f.isOpenDelayedRef.current?A():V()},[f.isOpenDelayedRef,A,V]),onTriggerLeave:React__namespace.useCallback(()=>{E?M():(window.clearTimeout(S.current),S.current=0)},[M,E]),onOpen:V,onClose:M,disableHoverableContent:E,children:n})})};Tooltip$2.displayName=TOOLTIP_NAME;var TRIGGER_NAME$2="TooltipTrigger",TooltipTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,l=useTooltipContext(TRIGGER_NAME$2,n),u=useTooltipProviderContext(TRIGGER_NAME$2,n),p=usePopperScope$1(n),d=React__namespace.useRef(null),f=useComposedRefs(t,d,l.onTriggerChange),m=React__namespace.useRef(!1),g=React__namespace.useRef(!1),b=React__namespace.useCallback(()=>m.current=!1,[]);return React__namespace.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),jsxRuntime.jsx(Anchor,{asChild:!0,...p,children:jsxRuntime.jsx(Primitive.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:f,onPointerMove:composeEventHandlers(e.onPointerMove,_=>{_.pointerType!=="touch"&&!g.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),g.current=!0)}),onPointerLeave:composeEventHandlers(e.onPointerLeave,()=>{l.onTriggerLeave(),g.current=!1}),onPointerDown:composeEventHandlers(e.onPointerDown,()=>{l.open&&l.onClose(),m.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:composeEventHandlers(e.onFocus,()=>{m.current||l.onOpen()}),onBlur:composeEventHandlers(e.onBlur,l.onClose),onClick:composeEventHandlers(e.onClick,l.onClose)})})});TooltipTrigger$1.displayName=TRIGGER_NAME$2;var PORTAL_NAME$1="TooltipPortal",[PortalProvider,usePortalContext]=createTooltipContext(PORTAL_NAME$1,{forceMount:void 0}),TooltipPortal=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:l}=e,u=useTooltipContext(PORTAL_NAME$1,t);return jsxRuntime.jsx(PortalProvider,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||u.open,children:jsxRuntime.jsx(Portal$4,{asChild:!0,container:l,children:o})})})};TooltipPortal.displayName=PORTAL_NAME$1;var CONTENT_NAME$2="TooltipContent",TooltipContent$1=React__namespace.forwardRef((e,t)=>{const n=usePortalContext(CONTENT_NAME$2,e.__scopeTooltip),{forceMount:o=n.forceMount,side:l="top",...u}=e,p=useTooltipContext(CONTENT_NAME$2,e.__scopeTooltip);return jsxRuntime.jsx(Presence,{present:o||p.open,children:p.disableHoverableContent?jsxRuntime.jsx(TooltipContentImpl,{side:l,...u,ref:t}):jsxRuntime.jsx(TooltipContentHoverable,{side:l,...u,ref:t})})}),TooltipContentHoverable=React__namespace.forwardRef((e,t)=>{const n=useTooltipContext(CONTENT_NAME$2,e.__scopeTooltip),o=useTooltipProviderContext(CONTENT_NAME$2,e.__scopeTooltip),l=React__namespace.useRef(null),u=useComposedRefs(t,l),[p,d]=React__namespace.useState(null),{trigger:f,onClose:m}=n,g=l.current,{onPointerInTransitChange:b}=o,_=React__namespace.useCallback(()=>{d(null),b(!1)},[b]),S=React__namespace.useCallback((E,C)=>{const R=E.currentTarget,I={x:E.clientX,y:E.clientY},N=getExitSideFromRect(I,R.getBoundingClientRect()),O=getPaddedExitPoints(I,N),V=getPointsFromRect(C.getBoundingClientRect()),M=getHull([...O,...V]);d(M),b(!0)},[b]);return React__namespace.useEffect(()=>()=>_(),[_]),React__namespace.useEffect(()=>{if(f&&g){const E=R=>S(R,g),C=R=>S(R,f);return f.addEventListener("pointerleave",E),g.addEventListener("pointerleave",C),()=>{f.removeEventListener("pointerleave",E),g.removeEventListener("pointerleave",C)}}},[f,g,S,_]),React__namespace.useEffect(()=>{if(p){const E=C=>{const R=C.target,I={x:C.clientX,y:C.clientY},N=(f==null?void 0:f.contains(R))||(g==null?void 0:g.contains(R)),O=!isPointInPolygon(I,p);N?_():O&&(_(),m())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[f,g,p,m,_]),jsxRuntime.jsx(TooltipContentImpl,{...e,ref:u})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),Slottable=createSlottable("TooltipContent"),TooltipContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":l,onEscapeKeyDown:u,onPointerDownOutside:p,...d}=e,f=useTooltipContext(CONTENT_NAME$2,n),m=usePopperScope$1(n),{onClose:g}=f;return React__namespace.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,g),()=>document.removeEventListener(TOOLTIP_OPEN,g)),[g]),React__namespace.useEffect(()=>{if(f.trigger){const b=_=>{const S=_.target;S!=null&&S.contains(f.trigger)&&g()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[f.trigger,g]),jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:b=>b.preventDefault(),onDismiss:g,children:jsxRuntime.jsxs(Content$1,{"data-state":f.stateAttribute,...m,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[jsxRuntime.jsx(Slottable,{children:o}),jsxRuntime.jsx(VisuallyHiddenContentContextProvider,{scope:n,isInside:!0,children:jsxRuntime.jsx(Root$5,{id:f.contentId,role:"tooltip",children:l||o})})]})})});TooltipContent$1.displayName=CONTENT_NAME$2;var ARROW_NAME$1="TooltipArrow",TooltipArrow=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,l=usePopperScope$1(n);return useVisuallyHiddenContentContext(ARROW_NAME$1,n).isInside?null:jsxRuntime.jsx(Arrow,{...l,...o,ref:t})});TooltipArrow.displayName=ARROW_NAME$1;function getExitSideFromRect(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),l=Math.abs(t.right-e.x),u=Math.abs(t.left-e.x);switch(Math.min(n,o,l,u)){case u:return"left";case l:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function getPointsFromRect(e){const{top:t,right:n,bottom:o,left:l}=e;return[{x:l,y:t},{x:n,y:t},{x:n,y:o},{x:l,y:o}]}function isPointInPolygon(e,t){const{x:n,y:o}=e;let l=!1;for(let u=0,p=t.length-1;u<t.length;p=u++){const d=t[u],f=t[p],m=d.x,g=d.y,b=f.x,_=f.y;g>o!=_>o&&n<(b-m)*(o-g)/(_-g)+m&&(l=!l)}return l}function getHull(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),getHullPresorted(t)}function getHullPresorted(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const l=e[o];for(;t.length>=2;){const u=t[t.length-1],p=t[t.length-2];if((u.x-p.x)*(l.y-p.y)>=(u.y-p.y)*(l.x-p.x))t.pop();else break}t.push(l)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const l=e[o];for(;n.length>=2;){const u=n[n.length-1],p=n[n.length-2];if((u.x-p.x)*(l.y-p.y)>=(u.y-p.y)*(l.x-p.x))n.pop();else break}n.push(l)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Provider$1=TooltipProvider$1,Root3=Tooltip$2,Trigger$2=TooltipTrigger$1,Portal$1=TooltipPortal,Content2$1=TooltipContent$1;const TooltipProvider=Provider$1,Tooltip$1=Root3,TooltipTrigger=Trigger$2,TooltipContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},o)=>jsxRuntime.jsx(Portal$1,{children:jsxRuntime.jsx(Content2$1,{ref:o,sideOffset:t,className:cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));TooltipContent.displayName=Content2$1.displayName;const Input=React__namespace.forwardRef(({className:e,type:t,mask:n,onChange:o,placeholder:l,...u},p)=>{const[d,f]=React__namespace.useState(!1),m=React__namespace.useRef(null),b=l||(n==="phone"?"(999) 999-9999":n==="postal-code-ca"?"A9A 9A9":n==="zip-code-us"?"99999":""),_=()=>n==="phone"?"Only enter numbers. Formatting will be added automatically.":n==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":n==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",S=()=>{f(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{f(!1)},3e3)};React__namespace.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const E=C=>{if(n){const R=C.target.value;let I=R;if(R.length>0){const N=R[R.length-1];/[^a-zA-Z0-9]/.test(N)&&(console.log("Non-alphanumeric detected:",N),S())}if(n==="phone"){const N=R.replace(/\D/g,"");N.length<=3?I=N:N.length<=6?I=`(${N.slice(0,3)}) ${N.slice(3)}`:I=`(${N.slice(0,3)}) ${N.slice(3,6)}-${N.slice(6,10)}`}else if(n==="postal-code-ca"){const N=R.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let O="";for(let V=0;V<Math.min(N.length,6);V++){const M=N[V];V===0||V===2||V===4?/[A-Z]/.test(M)&&(O+=M):(V===1||V===3||V===5)&&/[0-9]/.test(M)&&(O+=M)}O.length<=3?I=O:I=`${O.slice(0,3)} ${O.slice(3,6)}`}else if(n==="zip-code-us"){const N=R.replace(/\D/g,"");N.length<=5?I=N:I=`${N.slice(0,5)}-${N.slice(5,9)}`}C.target.value=I}o==null||o(C)};return jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{open:d&&!!n,children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx("input",{type:t,className:cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:E,placeholder:b,ref:p,...u})}),jsxRuntime.jsx(TooltipContent,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:_()})]})})});Input.displayName="Input";var NAME$1="Separator",DEFAULT_ORIENTATION="horizontal",ORIENTATIONS=["horizontal","vertical"],Separator$2=React__namespace.forwardRef((e,t)=>{const{decorative:n,orientation:o=DEFAULT_ORIENTATION,...l}=e,u=isValidOrientation(o)?o:DEFAULT_ORIENTATION,d=n?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return jsxRuntime.jsx(Primitive.div,{"data-orientation":u,...d,...l,ref:t})});Separator$2.displayName=NAME$1;function isValidOrientation(e){return ORIENTATIONS.includes(e)}var Root$4=Separator$2;const Separator$1=React__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...o},l)=>jsxRuntime.jsx(Root$4,{ref:l,decorative:n,orientation:t,className:cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Separator$1.displayName=Root$4.displayName;const Sheet=Root$8,SheetTrigger=Trigger$4,SheetClose=Close$1,SheetPortal=Portal$3,SheetOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{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",e),...t,ref:n}));SheetOverlay.displayName=Overlay.displayName;const sheetVariants=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),SheetContent=React__namespace.forwardRef(({side:e="right",className:t,children:n,...o},l)=>jsxRuntime.jsxs(SheetPortal,{children:[jsxRuntime.jsx(SheetOverlay,{}),jsxRuntime.jsxs(Content$2,{ref:l,className:cn(sheetVariants({side:e}),t),...o,children:[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-secondary",children:[jsxRuntime.jsx(X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));SheetContent.displayName=Content$2.displayName;const SheetHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});SheetHeader.displayName="SheetHeader";const SheetFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});SheetFooter.displayName="SheetFooter";const SheetTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold text-foreground",e),...t}));SheetTitle.displayName=Title$1.displayName;const SheetDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));SheetDescription.displayName=Description$1.displayName;function AvatarFooter({onClick:e,publicName:t,applicationName:n,partnerId:o}){const l=`https://api.randmar.io/v4/Partner/${o}/Account/Logo?height=72&width=72`,[u,p]=React.useState(!1),d=()=>{p(!0)};return jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:u?jsxRuntime.jsx(Button,{asChild:!0,size:"icon",onClick:e,children:jsxRuntime.jsx(TriangleAlert,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):jsxRuntime.jsx(Button,{asChild:!0,size:"icon",onClick:e,children:jsxRuntime.jsx("img",{src:l,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:d})})}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),jsxRuntime.jsx("span",{className:"text-xs text-neutral-400",children:n})]})]})}var NAME="Label",Label$3=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive.label,{...e,ref:t,onMouseDown:n=>{var l;n.target.closest("button, input, select, textarea")||((l=e.onMouseDown)==null||l.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Label$3.displayName=NAME;var Root$3=Label$3;function Label$2({className:e,...t}){return jsxRuntime.jsx(Root$3,{"data-slot":"label",className:cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const MOBILE_BREAKPOINT=1024;function useIsMobile(){const[e,t]=React__namespace.useState(void 0);return React__namespace.useEffect(()=>{const n=window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT-1}px)`),o=()=>{t(window.innerWidth<MOBILE_BREAKPOINT)};return n.addEventListener("change",o),t(window.innerWidth<MOBILE_BREAKPOINT),()=>n.removeEventListener("change",o)},[]),!!e}function Skeleton({className:e,...t}){return jsxRuntime.jsx("div",{className:cn("animate-pulse rounded-md bg-primary/20",e),...t})}const SIDEBAR_COOKIE_NAME="sidebar:state",SIDEBAR_COOKIE_MAX_AGE=60*60*24*7,SIDEBAR_WIDTH="16rem",SIDEBAR_WIDTH_MOBILE="18rem",SIDEBAR_WIDTH_ICON="3rem",SIDEBAR_KEYBOARD_SHORTCUT="b",SidebarContext=React__namespace.createContext(null);function useSidebar(){const e=React__namespace.useContext(SidebarContext);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const SidebarProvider=React__namespace.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:o,style:l,children:u,...p},d)=>{const f=useIsMobile(),[m,g]=React__namespace.useState(!1),[b,_]=React__namespace.useState(e),S=t??b,E=React__namespace.useCallback(N=>{const O=typeof N=="function"?N(S):N;n?n(O):_(O),document.cookie=`${SIDEBAR_COOKIE_NAME}=${O}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`},[n,S]),C=React__namespace.useCallback(()=>f?g(N=>!N):E(N=>!N),[f,E,g]);React__namespace.useEffect(()=>{const N=O=>{O.key===SIDEBAR_KEYBOARD_SHORTCUT&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),C())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[C]);const R=S?"expanded":"collapsed",I=React__namespace.useMemo(()=>({state:R,open:S,setOpen:E,isMobile:f,openMobile:m,setOpenMobile:g,toggleSidebar:C}),[R,S,E,f,m,g,C]);return jsxRuntime.jsx(SidebarContext.Provider,{value:I,children:jsxRuntime.jsx(TooltipProvider,{delayDuration:0,children:jsxRuntime.jsx("div",{style:{"--sidebar-width":SIDEBAR_WIDTH,"--sidebar-width-icon":SIDEBAR_WIDTH_ICON,...l},className:cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",o),ref:d,...p,children:u})})})});SidebarProvider.displayName="SidebarProvider";const Sidebar=React__namespace.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:o,children:l,...u},p)=>{const{isMobile:d,state:f,openMobile:m,setOpenMobile:g}=useSidebar();return n==="none"?jsxRuntime.jsx("div",{className:cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",o),ref:p,...u,children:l}):d?jsxRuntime.jsx(Sheet,{open:m,onOpenChange:g,...u,children:jsxRuntime.jsx(SheetContent,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":SIDEBAR_WIDTH_MOBILE},side:e,children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:l})})}):jsxRuntime.jsxs("div",{ref:p,className:"group peer hidden md:block text-sidebar-foreground","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[jsxRuntime.jsx("div",{className:cn("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),jsxRuntime.jsx("div",{className:cn("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...u,children:jsxRuntime.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:l})})]})});Sidebar.displayName="Sidebar";const SidebarTrigger=React__namespace.forwardRef(({className:e,onClick:t,...n},o)=>{const{toggleSidebar:l}=useSidebar();return jsxRuntime.jsxs(Button,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:cn("h-7 w-7 text-sidebar-foreground",e),onClick:u=>{t==null||t(u),l()},...n,children:[jsxRuntime.jsx(PanelLeft,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});SidebarTrigger.displayName="SidebarTrigger";const SidebarRail=React__namespace.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:o}=useSidebar();return jsxRuntime.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:cn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});SidebarRail.displayName="SidebarRail";const SidebarInset=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("main",{ref:n,className:cn("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));SidebarInset.displayName="SidebarInset";const SidebarInput=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Input,{ref:n,"data-sidebar":"input",className:cn("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));SidebarInput.displayName="SidebarInput";const SidebarHeader=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"header",className:cn("flex flex-col gap-2 p-2",e),...t}));SidebarHeader.displayName="SidebarHeader";const SidebarFooter=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"footer",className:cn("flex flex-col gap-2 p-2",e),...t}));SidebarFooter.displayName="SidebarFooter";const SidebarSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator$1,{ref:n,"data-sidebar":"separator",className:cn("mx-2 w-auto bg-sidebar-border",e),...t}));SidebarSeparator.displayName="SidebarSeparator";const SidebarContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"content",className:cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));SidebarContent.displayName="SidebarContent";const SidebarGroup=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"group",className:cn("relative flex w-full min-w-0 flex-col p-2",e),...t}));SidebarGroup.displayName="SidebarGroup";const SidebarGroupLabel=React__namespace.forwardRef(({className:e,asChild:t=!1,...n},o)=>{const l=t?Slot$3:"div";return jsxRuntime.jsx(l,{ref:o,"data-sidebar":"group-label",className:cn("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});SidebarGroupLabel.displayName="SidebarGroupLabel";const SidebarGroupAction=React__namespace.forwardRef(({className:e,asChild:t=!1,...n},o)=>{const l=t?Slot$3:"button";return jsxRuntime.jsx(l,{ref:o,"data-sidebar":"group-action",className:cn("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})});SidebarGroupAction.displayName="SidebarGroupAction";const SidebarGroupContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"group-content",className:cn("w-full text-sm",e),...t}));SidebarGroupContent.displayName="SidebarGroupContent";const SidebarMenu=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-sidebar":"menu",className:cn("flex w-full min-w-0 flex-col gap-1",e),...t}));SidebarMenu.displayName="SidebarMenu";const SidebarMenuItem=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,"data-sidebar":"menu-item",className:cn("group/menu-item relative",e),...t}));SidebarMenuItem.displayName="SidebarMenuItem";const sidebarMenuButtonVariants=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),SidebarMenuButton=React__namespace.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:o="default",tooltip:l,className:u,...p},d)=>{const f=e?Slot$3:"button",{isMobile:m,state:g}=useSidebar(),b=jsxRuntime.jsx(f,{ref:d,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:cn(sidebarMenuButtonVariants({variant:n,size:o}),u),...p});return l?(typeof l=="string"&&(l={children:l}),jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:b}),jsxRuntime.jsx(TooltipContent,{side:"right",align:"center",hidden:g!=="collapsed"||m,...l})]})):b});SidebarMenuButton.displayName="SidebarMenuButton";const SidebarMenuAction=React__namespace.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...o},l)=>{const u=t?Slot$3:"button";return jsxRuntime.jsx(u,{ref:l,"data-sidebar":"menu-action",className:cn("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o})});SidebarMenuAction.displayName="SidebarMenuAction";const SidebarMenuBadge=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:cn("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));SidebarMenuBadge.displayName="SidebarMenuBadge";const SidebarMenuSkeleton=React__namespace.forwardRef(({className:e,showIcon:t=!1,...n},o)=>{const l=React__namespace.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxRuntime.jsxs("div",{ref:o,"data-sidebar":"menu-skeleton",className:cn("rounded-md h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&jsxRuntime.jsx(Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),jsxRuntime.jsx(Skeleton,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":l}})]})});SidebarMenuSkeleton.displayName="SidebarMenuSkeleton";const SidebarMenuSub=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));SidebarMenuSub.displayName="SidebarMenuSub";const SidebarMenuSubItem=React__namespace.forwardRef(({...e},t)=>jsxRuntime.jsx("li",{ref:t,...e}));SidebarMenuSubItem.displayName="SidebarMenuSubItem";const SidebarMenuSubButton=React__namespace.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:o,...l},u)=>{const p=e?Slot$3:"a";return jsxRuntime.jsx(p,{ref:u,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...l})});SidebarMenuSubButton.displayName="SidebarMenuSubButton";var PROVIDER_NAME="ToastProvider",[Collection$1,useCollection$1,createCollectionScope$1]=createCollection("Toast"),[createToastContext,createToastScope]=createContextScope("Toast",[createCollectionScope$1]),[ToastProviderProvider,useToastProviderContext]=createToastContext(PROVIDER_NAME),ToastProvider$1=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:l="right",swipeThreshold:u=50,children:p}=e,[d,f]=React__namespace.useState(null),[m,g]=React__namespace.useState(0),b=React__namespace.useRef(!1),_=React__namespace.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`),jsxRuntime.jsx(Collection$1.Provider,{scope:t,children:jsxRuntime.jsx(ToastProviderProvider,{scope:t,label:n,duration:o,swipeDirection:l,swipeThreshold:u,toastCount:m,viewport:d,onViewportChange:f,onToastAdd:React__namespace.useCallback(()=>g(S=>S+1),[]),onToastRemove:React__namespace.useCallback(()=>g(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:b,isClosePausedRef:_,children:p})})};ToastProvider$1.displayName=PROVIDER_NAME;var VIEWPORT_NAME$2="ToastViewport",VIEWPORT_DEFAULT_HOTKEY=["F8"],VIEWPORT_PAUSE="toast.viewportPause",VIEWPORT_RESUME="toast.viewportResume",ToastViewport$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=VIEWPORT_DEFAULT_HOTKEY,label:l="Notifications ({hotkey})",...u}=e,p=useToastProviderContext(VIEWPORT_NAME$2,n),d=useCollection$1(n),f=React__namespace.useRef(null),m=React__namespace.useRef(null),g=React__namespace.useRef(null),b=React__namespace.useRef(null),_=useComposedRefs(t,b,p.onViewportChange),S=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=p.toastCount>0;React__namespace.useEffect(()=>{const R=I=>{var O;o.length!==0&&o.every(V=>I[V]||I.code===V)&&((O=b.current)==null||O.focus())};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[o]),React__namespace.useEffect(()=>{const R=f.current,I=b.current;if(E&&R&&I){const N=()=>{if(!p.isClosePausedRef.current){const A=new CustomEvent(VIEWPORT_PAUSE);I.dispatchEvent(A),p.isClosePausedRef.current=!0}},O=()=>{if(p.isClosePausedRef.current){const A=new CustomEvent(VIEWPORT_RESUME);I.dispatchEvent(A),p.isClosePausedRef.current=!1}},V=A=>{!R.contains(A.relatedTarget)&&O()},M=()=>{R.contains(document.activeElement)||O()};return R.addEventListener("focusin",N),R.addEventListener("focusout",V),R.addEventListener("pointermove",N),R.addEventListener("pointerleave",M),window.addEventListener("blur",N),window.addEventListener("focus",O),()=>{R.removeEventListener("focusin",N),R.removeEventListener("focusout",V),R.removeEventListener("pointermove",N),R.removeEventListener("pointerleave",M),window.removeEventListener("blur",N),window.removeEventListener("focus",O)}}},[E,p.isClosePausedRef]);const C=React__namespace.useCallback(({tabbingDirection:R})=>{const N=d().map(O=>{const V=O.ref.current,M=[V,...getTabbableCandidates(V)];return R==="forwards"?M:M.reverse()});return(R==="forwards"?N.reverse():N).flat()},[d]);return React__namespace.useEffect(()=>{const R=b.current;if(R){const I=N=>{var M,A,j;const O=N.altKey||N.ctrlKey||N.metaKey;if(N.key==="Tab"&&!O){const B=document.activeElement,L=N.shiftKey;if(N.target===R&&L){(M=m.current)==null||M.focus();return}const H=C({tabbingDirection:L?"backwards":"forwards"}),U=H.findIndex(G=>G===B);focusFirst(H.slice(U+1))?N.preventDefault():L?(A=m.current)==null||A.focus():(j=g.current)==null||j.focus()}};return R.addEventListener("keydown",I),()=>R.removeEventListener("keydown",I)}},[d,C]),jsxRuntime.jsxs(Branch,{ref:f,role:"region","aria-label":l.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&jsxRuntime.jsx(FocusProxy,{ref:m,onFocusFromOutsideViewport:()=>{const R=C({tabbingDirection:"forwards"});focusFirst(R)}}),jsxRuntime.jsx(Collection$1.Slot,{scope:n,children:jsxRuntime.jsx(Primitive.ol,{tabIndex:-1,...u,ref:_})}),E&&jsxRuntime.jsx(FocusProxy,{ref:g,onFocusFromOutsideViewport:()=>{const R=C({tabbingDirection:"backwards"});focusFirst(R)}})]})});ToastViewport$1.displayName=VIEWPORT_NAME$2;var FOCUS_PROXY_NAME="ToastFocusProxy",FocusProxy=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...l}=e,u=useToastProviderContext(FOCUS_PROXY_NAME,n);return jsxRuntime.jsx(VisuallyHidden,{"aria-hidden":!0,tabIndex:0,...l,ref:t,style:{position:"fixed"},onFocus:p=>{var m;const d=p.relatedTarget;!((m=u.viewport)!=null&&m.contains(d))&&o()}})});FocusProxy.displayName=FOCUS_PROXY_NAME;var TOAST_NAME="Toast",TOAST_SWIPE_START="toast.swipeStart",TOAST_SWIPE_MOVE="toast.swipeMove",TOAST_SWIPE_CANCEL="toast.swipeCancel",TOAST_SWIPE_END="toast.swipeEnd",Toast$1=React__namespace.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:l,onOpenChange:u,...p}=e,[d,f]=useControllableState({prop:o,defaultProp:l??!0,onChange:u,caller:TOAST_NAME});return jsxRuntime.jsx(Presence,{present:n||d,children:jsxRuntime.jsx(ToastImpl,{open:d,...p,ref:t,onClose:()=>f(!1),onPause:useCallbackRef$1(e.onPause),onResume:useCallbackRef$1(e.onResume),onSwipeStart:composeEventHandlers(e.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:composeEventHandlers(e.onSwipeMove,m=>{const{x:g,y:b}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${b}px`)}),onSwipeCancel:composeEventHandlers(e.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:composeEventHandlers(e.onSwipeEnd,m=>{const{x:g,y:b}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${b}px`),f(!1)})})})});Toast$1.displayName=TOAST_NAME;var[ToastInteractiveProvider,useToastInteractiveContext]=createToastContext(TOAST_NAME,{onClose(){}}),ToastImpl=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:l,open:u,onClose:p,onEscapeKeyDown:d,onPause:f,onResume:m,onSwipeStart:g,onSwipeMove:b,onSwipeCancel:_,onSwipeEnd:S,...E}=e,C=useToastProviderContext(TOAST_NAME,n),[R,I]=React__namespace.useState(null),N=useComposedRefs(t,G=>I(G)),O=React__namespace.useRef(null),V=React__namespace.useRef(null),M=l||C.duration,A=React__namespace.useRef(0),j=React__namespace.useRef(M),B=React__namespace.useRef(0),{onToastAdd:L,onToastRemove:q}=C,F=useCallbackRef$1(()=>{var J;(R==null?void 0:R.contains(document.activeElement))&&((J=C.viewport)==null||J.focus()),p()}),H=React__namespace.useCallback(G=>{!G||G===1/0||(window.clearTimeout(B.current),A.current=new Date().getTime(),B.current=window.setTimeout(F,G))},[F]);React__namespace.useEffect(()=>{const G=C.viewport;if(G){const J=()=>{H(j.current),m==null||m()},Z=()=>{const ae=new Date().getTime()-A.current;j.current=j.current-ae,window.clearTimeout(B.current),f==null||f()};return G.addEventListener(VIEWPORT_PAUSE,Z),G.addEventListener(VIEWPORT_RESUME,J),()=>{G.removeEventListener(VIEWPORT_PAUSE,Z),G.removeEventListener(VIEWPORT_RESUME,J)}}},[C.viewport,M,f,m,H]),React__namespace.useEffect(()=>{u&&!C.isClosePausedRef.current&&H(M)},[u,M,C.isClosePausedRef,H]),React__namespace.useEffect(()=>(L(),()=>q()),[L,q]);const U=React__namespace.useMemo(()=>R?getAnnounceTextContent(R):null,[R]);return C.viewport?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[U&&jsxRuntime.jsx(ToastAnnounce,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite","aria-atomic":!0,children:U}),jsxRuntime.jsx(ToastInteractiveProvider,{scope:n,onClose:F,children:ReactDOM__namespace.createPortal(jsxRuntime.jsx(Collection$1.ItemSlot,{scope:n,children:jsxRuntime.jsx(Root$9,{asChild:!0,onEscapeKeyDown:composeEventHandlers(d,()=>{C.isFocusedToastEscapeKeyDownRef.current||F(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:jsxRuntime.jsx(Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":C.swipeDirection,...E,ref:N,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:composeEventHandlers(e.onKeyDown,G=>{G.key==="Escape"&&(d==null||d(G.nativeEvent),G.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:composeEventHandlers(e.onPointerDown,G=>{G.button===0&&(O.current={x:G.clientX,y:G.clientY})}),onPointerMove:composeEventHandlers(e.onPointerMove,G=>{if(!O.current)return;const J=G.clientX-O.current.x,Z=G.clientY-O.current.y,ae=!!V.current,W=["left","right"].includes(C.swipeDirection),Q=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,ee=W?Q(0,J):0,ie=W?0:Q(0,Z),ce=G.pointerType==="touch"?10:2,ue={x:ee,y:ie},fe={originalEvent:G,delta:ue};ae?(V.current=ue,handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE,b,fe,{discrete:!1})):isDeltaInDirection(ue,C.swipeDirection,ce)?(V.current=ue,handleAndDispatchCustomEvent(TOAST_SWIPE_START,g,fe,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(J)>ce||Math.abs(Z)>ce)&&(O.current=null)}),onPointerUp:composeEventHandlers(e.onPointerUp,G=>{const J=V.current,Z=G.target;if(Z.hasPointerCapture(G.pointerId)&&Z.releasePointerCapture(G.pointerId),V.current=null,O.current=null,J){const ae=G.currentTarget,W={originalEvent:G,delta:J};isDeltaInDirection(J,C.swipeDirection,C.swipeThreshold)?handleAndDispatchCustomEvent(TOAST_SWIPE_END,S,W,{discrete:!0}):handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL,_,W,{discrete:!0}),ae.addEventListener("click",Q=>Q.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),ToastAnnounce=e=>{const{__scopeToast:t,children:n,...o}=e,l=useToastProviderContext(TOAST_NAME,t),[u,p]=React__namespace.useState(!1),[d,f]=React__namespace.useState(!1);return useNextFrame(()=>p(!0)),React__namespace.useEffect(()=>{const m=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(m)},[]),d?null:jsxRuntime.jsx(Portal$4,{asChild:!0,children:jsxRuntime.jsx(VisuallyHidden,{...o,children:u&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l.label," ",n]})})})},TITLE_NAME="ToastTitle",ToastTitle$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{...o,ref:t})});ToastTitle$1.displayName=TITLE_NAME;var DESCRIPTION_NAME="ToastDescription",ToastDescription$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{...o,ref:t})});ToastDescription$1.displayName=DESCRIPTION_NAME;var ACTION_NAME="ToastAction",ToastAction$1=React__namespace.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?jsxRuntime.jsx(ToastAnnounceExclude,{altText:n,asChild:!0,children:jsxRuntime.jsx(ToastClose$1,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`),null)});ToastAction$1.displayName=ACTION_NAME;var CLOSE_NAME="ToastClose",ToastClose$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,l=useToastInteractiveContext(CLOSE_NAME,n);return jsxRuntime.jsx(ToastAnnounceExclude,{asChild:!0,children:jsxRuntime.jsx(Primitive.button,{type:"button",...o,ref:t,onClick:composeEventHandlers(e.onClick,l.onClose)})})});ToastClose$1.displayName=CLOSE_NAME;var ToastAnnounceExclude=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...l}=e;return jsxRuntime.jsx(Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...l,ref:t})});function getAnnounceTextContent(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),isHTMLElement(o)){const l=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!l)if(u){const p=o.dataset.radixToastAnnounceAlt;p&&t.push(p)}else t.push(...getAnnounceTextContent(o))}}),t}function handleAndDispatchCustomEvent(e,t,n,{discrete:o}){const l=n.originalEvent.currentTarget,u=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&l.addEventListener(e,t,{once:!0}),o?dispatchDiscreteCustomEvent(l,u):l.dispatchEvent(u)}var isDeltaInDirection=(e,t,n=0)=>{const o=Math.abs(e.x),l=Math.abs(e.y),u=o>l;return t==="left"||t==="right"?u&&o>n:!u&&l>n};function useNextFrame(e=()=>{}){const t=useCallbackRef$1(e);useLayoutEffect2(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function isHTMLElement(e){return e.nodeType===e.ELEMENT_NODE}function getTabbableCandidates(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function focusFirst(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Provider=ToastProvider$1,Viewport$2=ToastViewport$1,Root2$2=Toast$1,Title=ToastTitle$1,Description=ToastDescription$1,Action=ToastAction$1,Close=ToastClose$1;const ToastProvider=Provider,ToastViewport=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Viewport$2,{ref:n,className:cn("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));ToastViewport.displayName=Viewport$2.displayName;const toastVariants=cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),Toast=React__namespace.forwardRef(({className:e,variant:t,...n},o)=>jsxRuntime.jsx(Root2$2,{ref:o,className:cn(toastVariants({variant:t}),e),...n}));Toast.displayName=Root2$2.displayName;const ToastAction=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Action,{ref:n,className:cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));ToastAction.displayName=Action.displayName;const ToastClose=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Close,{ref:n,className:cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:jsxRuntime.jsx(X,{className:"h-4 w-4"})}));ToastClose.displayName=Close.displayName;const ToastTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title,{ref:n,className:cn("text-sm font-semibold [&+div]:text-xs",e),...t}));ToastTitle.displayName=Title.displayName;const ToastDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description,{ref:n,className:cn("text-sm opacity-90",e),...t}));ToastDescription.displayName=Description.displayName;const TOAST_LIMIT=1,TOAST_REMOVE_DELAY=1e6;let count=0;function genId(){return count=(count+1)%Number.MAX_SAFE_INTEGER,count.toString()}const toastTimeouts=new Map,addToRemoveQueue=e=>{if(toastTimeouts.has(e))return;const t=setTimeout(()=>{toastTimeouts.delete(e),dispatch({type:"REMOVE_TOAST",toastId:e})},TOAST_REMOVE_DELAY);toastTimeouts.set(e,t)},reducer=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,TOAST_LIMIT)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?addToRemoveQueue(n):e.toasts.forEach(o=>addToRemoveQueue(o.id)),{...e,toasts:e.toasts.map(o=>o.id===n||n===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(n=>n.id!==t.toastId):[]}}},listeners=[];let memoryState={toasts:[]};function dispatch(e){memoryState=reducer(memoryState,e),listeners.forEach(t=>t(memoryState))}function toast({...e}){const t=genId(),n=l=>dispatch({type:"UPDATE_TOAST",toast:{...l,id:t}}),o=()=>dispatch({type:"DISMISS_TOAST",toastId:t});return dispatch({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||o()}}}),{id:t,dismiss:o,update:n}}function useToast(){const[e,t]=React__namespace.useState(memoryState);return React__namespace.useEffect(()=>(listeners.push(t),()=>{const n=listeners.indexOf(t);n>-1&&listeners.splice(n,1)}),[]),{...e,toast,dismiss:n=>dispatch({type:"DISMISS_TOAST",toastId:n})}}function Toaster(){const{toasts:e}=useToast();return jsxRuntime.jsxs(ToastProvider,{children:[e.map(function({id:t,title:n,description:o,action:l,...u}){return jsxRuntime.jsxs(Toast,{...u,children:[jsxRuntime.jsxs("div",{className:"grid gap-1",children:[n&&jsxRuntime.jsx(ToastTitle,{children:n}),o&&jsxRuntime.jsx(ToastDescription,{children:o})]}),l,jsxRuntime.jsx(ToastClose,{})]},t)}),jsxRuntime.jsx(ToastViewport,{})]})}const ApiKeyContext=React.createContext(void 0),ApiKeyProvider=({children:e})=>{const[t,n]=React.useState(null);return jsxRuntime.jsx(ApiKeyContext.Provider,{value:{apiKey:t,setApiKey:n},children:e})},useApiKey=()=>{const e=React.useContext(ApiKeyContext);if(!e)throw new Error("useApiKey must be used within an ApiKeyProvider");return e};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray_1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e,isArray_1}var _freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return _root=n,_root}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,n=t.hasOwnProperty,o=t.toString,l=e?e.toStringTag:void 0;function u(p){var d=n.call(p,l),f=p[l];try{p[l]=void 0;var m=!0}catch{}var g=o.call(p);return m&&(d?p[l]=f:delete p[l]),g}return _getRawTag=u,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function n(o){return t.call(o)}return _objectToString=n,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),n=require_objectToString(),o="[object Null]",l="[object Undefined]",u=e?e.toStringTag:void 0;function p(d){return d==null?d===void 0?l:o:u&&u in Object(d)?t(d):n(d)}return _baseGetTag=p,_baseGetTag}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),n="[object Symbol]";function o(l){return typeof l=="symbol"||t(l)&&e(l)==n}return isSymbol_1=o,isSymbol_1}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;function l(u,p){if(e(u))return!1;var d=typeof u;return d=="number"||d=="symbol"||d=="boolean"||u==null||t(u)?!0:o.test(u)||!n.test(u)||p!=null&&u in Object(p)}return _isKey=l,_isKey}var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return isObject_1=e,isObject_1}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),n="[object AsyncFunction]",o="[object Function]",l="[object GeneratorFunction]",u="[object Proxy]";function p(d){if(!t(d))return!1;var f=e(d);return f==o||f==l||f==n||f==u}return isFunction_1=p,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var o=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function n(o){return!!t&&t in o}return _isMasked=n,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function n(o){if(o!=null){try{return t.call(o)}catch{}try{return o+""}catch{}}return""}return _toSource=n,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),n=requireIsObject(),o=require_toSource(),l=/[\\^$.*+?()[\]{}|]/g,u=/^\[object .+?Constructor\]$/,p=Function.prototype,d=Object.prototype,f=p.toString,m=d.hasOwnProperty,g=RegExp("^"+f.call(m).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function b(_){if(!n(_)||t(_))return!1;var S=e(_)?g:u;return S.test(o(_))}return _baseIsNative=b,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,n){return t==null?void 0:t[n]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function n(o,l){var u=t(o,l);return e(u)?u:void 0}return _getNative=n,_getNative}var _nativeCreate,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative(),t=e(Object,"create");return _nativeCreate=t,_nativeCreate}var _hashClear,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear=t,_hashClear}var _hashDelete,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;hasRequired_hashDelete=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return _hashDelete=e,_hashDelete}var _hashGet,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",n=Object.prototype,o=n.hasOwnProperty;function l(u){var p=this.__data__;if(e){var d=p[u];return d===t?void 0:d}return o.call(p,u)?p[u]:void 0}return _hashGet=l,_hashGet}var _hashHas,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,n=t.hasOwnProperty;function o(l){var u=this.__data__;return e?u[l]!==void 0:n.call(u,l)}return _hashHas=o,_hashHas}var _hashSet,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function n(o,l){var u=this.__data__;return this.size+=this.has(o)?0:1,u[o]=e&&l===void 0?t:l,this}return _hashSet=n,_hashSet}var _Hash,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),n=require_hashGet(),o=require_hashHas(),l=require_hashSet();function u(p){var d=-1,f=p==null?0:p.length;for(this.clear();++d<f;){var m=p[d];this.set(m[0],m[1])}}return u.prototype.clear=e,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=o,u.prototype.set=l,_Hash=u,_Hash}var _listCacheClear,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear=e,_listCacheClear}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,n){return t===n||t!==t&&n!==n}return eq_1=e,eq_1}var _assocIndexOf,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();function t(n,o){for(var l=n.length;l--;)if(e(n[l][0],o))return l;return-1}return _assocIndexOf=t,_assocIndexOf}var _listCacheDelete,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,n=t.splice;function o(l){var u=this.__data__,p=e(u,l);if(p<0)return!1;var d=u.length-1;return p==d?u.pop():n.call(u,p,1),--this.size,!0}return _listCacheDelete=o,_listCacheDelete}var _listCacheGet,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(n){var o=this.__data__,l=e(o,n);return l<0?void 0:o[l][1]}return _listCacheGet=t,_listCacheGet}var _listCacheHas,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(n){return e(this.__data__,n)>-1}return _listCacheHas=t,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(n,o){var l=this.__data__,u=e(l,n);return u<0?(++this.size,l.push([n,o])):l[u][1]=o,this}return _listCacheSet=t,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),n=require_listCacheGet(),o=require_listCacheHas(),l=require_listCacheSet();function u(p){var d=-1,f=p==null?0:p.length;for(this.clear();++d<f;){var m=p[d];this.set(m[0],m[1])}}return u.prototype.clear=e,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=o,u.prototype.set=l,_ListCache=u,_ListCache}var _Map,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative(),t=require_root(),n=e(t,"Map");return _Map=n,_Map}var _mapCacheClear,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),n=require_Map();function o(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return _mapCacheClear=o,_mapCacheClear}var _isKeyable,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;hasRequired_isKeyable=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return _isKeyable=e,_isKeyable}var _getMapData,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();function t(n,o){var l=n.__data__;return e(o)?l[typeof o=="string"?"string":"hash"]:l.map}return _getMapData=t,_getMapData}var _mapCacheDelete,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(n){var o=e(this,n).delete(n);return this.size-=o?1:0,o}return _mapCacheDelete=t,_mapCacheDelete}var _mapCacheGet,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(n){return e(this,n).get(n)}return _mapCacheGet=t,_mapCacheGet}var _mapCacheHas,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(n){return e(this,n).has(n)}return _mapCacheHas=t,_mapCacheHas}var _mapCacheSet,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(n,o){var l=e(this,n),u=l.size;return l.set(n,o),this.size+=l.size==u?0:1,this}return _mapCacheSet=t,_mapCacheSet}var _MapCache,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),n=require_mapCacheGet(),o=require_mapCacheHas(),l=require_mapCacheSet();function u(p){var d=-1,f=p==null?0:p.length;for(this.clear();++d<f;){var m=p[d];this.set(m[0],m[1])}}return u.prototype.clear=e,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=o,u.prototype.set=l,_MapCache=u,_MapCache}var memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function n(o,l){if(typeof o!="function"||l!=null&&typeof l!="function")throw new TypeError(t);var u=function(){var p=arguments,d=l?l.apply(this,p):p[0],f=u.cache;if(f.has(d))return f.get(d);var m=o.apply(this,p);return u.cache=f.set(d,m)||f,m};return u.cache=new(n.Cache||e),u}return n.Cache=e,memoize_1=n,memoize_1}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=requireMemoize(),t=500;function n(o){var l=e(o,function(p){return u.size===t&&u.clear(),p}),u=l.cache;return l}return _memoizeCapped=n,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,o=e(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(t,function(p,d,f,m){u.push(f?m.replace(n,"$1"):d||p)}),u});return _stringToPath=o,_stringToPath}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,n){for(var o=-1,l=t==null?0:t.length,u=Array(l);++o<l;)u[o]=n(t[o],o,t);return u}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),n=requireIsArray(),o=requireIsSymbol(),l=e?e.prototype:void 0,u=l?l.toString:void 0;function p(d){if(typeof d=="string")return d;if(n(d))return t(d,p)+"";if(o(d))return u?u.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}return _baseToString=p,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(n){return n==null?"":e(n)}return toString_1=t,toString_1}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),n=require_stringToPath(),o=requireToString();function l(u,p){return e(u)?u:t(u,p)?[u]:n(o(u))}return _castPath=l,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol();function t(n){if(typeof n=="string"||e(n))return n;var o=n+"";return o=="0"&&1/n==-1/0?"-0":o}return _toKey=t,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function n(o,l){l=e(l,o);for(var u=0,p=l.length;o!=null&&u<p;)o=o[t(l[u++])];return u&&u==p?o:void 0}return _baseGet=n,_baseGet}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet();function t(n,o,l){var u=n==null?void 0:e(n,o);return u===void 0?l:u}return get_1=t,get_1}var getExports=requireGet();const get$1=getDefaultExportFromCjs(getExports);var isNil_1,hasRequiredIsNil;function requireIsNil(){if(hasRequiredIsNil)return isNil_1;hasRequiredIsNil=1;function e(t){return t==null}return isNil_1=e,isNil_1}var isNilExports=requireIsNil();const isNil=getDefaultExportFromCjs(isNilExports);var isString_1,hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag(),t=requireIsArray(),n=requireIsObjectLike(),o="[object String]";function l(u){return typeof u=="string"||!t(u)&&n(u)&&e(u)==o}return isString_1=l,isString_1}var isStringExports=requireIsString();const isString=getDefaultExportFromCjs(isStringExports);var isFunctionExports=requireIsFunction();const isFunction$1=getDefaultExportFromCjs(isFunctionExports);var isObjectExports=requireIsObject();const isObject=getDefaultExportFromCjs(isObjectExports);var reactIs$1={exports:{}},reactIs_production_min$1={};/**
299
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return React__namespace.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var u;const l=(u=e.current)==null?void 0:u.getAttribute("aria-describedby");t&&l&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Root$8=Dialog$1,Trigger$4=DialogTrigger$1,Portal$3=DialogPortal$1,Overlay=DialogOverlay$1,Content$2=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:e=!1,...t})=>jsxRuntime.jsx(Root$8,{modal:e,...t});Dialog.displayName=Root$8.displayName;const DialogTrigger=Trigger$4,DialogPortal=Portal$3,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:e,...t},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",e),...t}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:e,children:t,animateExit:n=!0,...o},l)=>jsxRuntime.jsxs(DialogPortal,{forceMount:o.forceMount,children:[jsxRuntime.jsx(DialogOverlay,{}),jsxRuntime.jsxs(Content$2,{ref:l,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%]",e),...o,children:[t,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,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$2.displayName;const DialogHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",e),...t}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));DialogDescription.displayName=Description$1.displayName;function createCollection(e){const t=e+"CollectionProvider",[n,o]=createContextScope(t),[l,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),p=C=>{const{scope:R,children:I}=C,N=React.useRef(null),O=React.useRef(new Map).current;return jsxRuntime.jsx(l,{scope:R,itemMap:O,collectionRef:N,children:I})};p.displayName=t;const d=e+"CollectionSlot",f=createSlot(d),m=React.forwardRef((C,R)=>{const{scope:I,children:N}=C,O=u(d,I),V=useComposedRefs(R,O.collectionRef);return jsxRuntime.jsx(f,{ref:V,children:N})});m.displayName=d;const g=e+"CollectionItemSlot",b="data-radix-collection-item",_=createSlot(g),S=React.forwardRef((C,R)=>{const{scope:I,children:N,...O}=C,V=React.useRef(null),M=useComposedRefs(R,V),A=u(g,I);return React.useEffect(()=>(A.itemMap.set(V,{ref:V,...O}),()=>void A.itemMap.delete(V))),jsxRuntime.jsx(_,{[b]:"",ref:M,children:N})});S.displayName=g;function E(C){const R=u(e+"CollectionConsumer",C);return React.useCallback(()=>{const N=R.collectionRef.current;if(!N)return[];const O=Array.from(N.querySelectorAll(`[${b}]`));return Array.from(R.itemMap.values()).sort((A,j)=>O.indexOf(A.ref.current)-O.indexOf(j.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:p,Slot:m,ItemSlot:S},E,o]}var DirectionContext=React__namespace.createContext(void 0);function useDirection(e){const t=React__namespace.useContext(DirectionContext);return e||t||"ltr"}const sides=["top","right","bottom","left"],min$2=Math.min,max$2=Math.max,round$1=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(e,t,n){return max$2(e,min$2(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const o=getAlignment(e),l=getAlignmentAxis(e),u=getAxisLength(l);let p=l==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(p=getOppositePlacement(p)),[p,getOppositePlacement(p)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}function getSideList(e,t,n){const o=["left","right"],l=["right","left"],u=["top","bottom"],p=["bottom","top"];switch(e){case"top":case"bottom":return n?t?l:o:t?o:l;case"left":case"right":return t?u:p;default:return[]}}function getOppositeAxisPlacements(e,t,n,o){const l=getAlignment(e);let u=getSideList(getSide(e),n==="start",o);return l&&(u=u.map(p=>p+"-"+l),t&&(u=u.concat(u.map(getOppositeAlignmentPlacement)))),u}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:o,height:l}=e;return{width:o,height:l,top:n,left:t,right:t+o,bottom:n+l,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:o,floating:l}=e;const u=getSideAxis(t),p=getAlignmentAxis(t),d=getAxisLength(p),f=getSide(t),m=u==="y",g=o.x+o.width/2-l.width/2,b=o.y+o.height/2-l.height/2,_=o[d]/2-l[d]/2;let S;switch(f){case"top":S={x:g,y:o.y-l.height};break;case"bottom":S={x:g,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:b};break;case"left":S={x:o.x-l.width,y:b};break;default:S={x:o.x,y:o.y}}switch(getAlignment(t)){case"start":S[p]-=_*(n&&m?-1:1);break;case"end":S[p]+=_*(n&&m?-1:1);break}return S}const computePosition$1=async(e,t,n)=>{const{placement:o="bottom",strategy:l="absolute",middleware:u=[],platform:p}=n,d=u.filter(Boolean),f=await(p.isRTL==null?void 0:p.isRTL(t));let m=await p.getElementRects({reference:e,floating:t,strategy:l}),{x:g,y:b}=computeCoordsFromPlacement(m,o,f),_=o,S={},E=0;for(let C=0;C<d.length;C++){const{name:R,fn:I}=d[C],{x:N,y:O,data:V,reset:M}=await I({x:g,y:b,initialPlacement:o,placement:_,strategy:l,middlewareData:S,rects:m,platform:p,elements:{reference:e,floating:t}});g=N??g,b=O??b,S={...S,[R]:{...S[R],...V}},M&&E<=50&&(E++,typeof M=="object"&&(M.placement&&(_=M.placement),M.rects&&(m=M.rects===!0?await p.getElementRects({reference:e,floating:t,strategy:l}):M.rects),{x:g,y:b}=computeCoordsFromPlacement(m,_,f)),C=-1)}return{x:g,y:b,placement:_,strategy:l,middlewareData:S}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:o,y:l,platform:u,rects:p,elements:d,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:_=!1,padding:S=0}=evaluate(t,e),E=getPaddingObject(S),R=d[_?b==="floating"?"reference":"floating":b],I=rectToClientRect(await u.getClippingRect({element:(n=await(u.isElement==null?void 0:u.isElement(R)))==null||n?R:R.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:m,rootBoundary:g,strategy:f})),N=b==="floating"?{x:o,y:l,width:p.floating.width,height:p.floating.height}:p.reference,O=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),V=await(u.isElement==null?void 0:u.isElement(O))?await(u.getScale==null?void 0:u.getScale(O))||{x:1,y:1}:{x:1,y:1},M=rectToClientRect(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:O,strategy:f}):N);return{top:(I.top-M.top+E.top)/V.y,bottom:(M.bottom-I.bottom+E.bottom)/V.y,left:(I.left-M.left+E.left)/V.x,right:(M.right-I.right+E.right)/V.x}}const arrow$3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:l,rects:u,platform:p,elements:d,middlewareData:f}=t,{element:m,padding:g=0}=evaluate(e,t)||{};if(m==null)return{};const b=getPaddingObject(g),_={x:n,y:o},S=getAlignmentAxis(l),E=getAxisLength(S),C=await p.getDimensions(m),R=S==="y",I=R?"top":"left",N=R?"bottom":"right",O=R?"clientHeight":"clientWidth",V=u.reference[E]+u.reference[S]-_[S]-u.floating[E],M=_[S]-u.reference[S],A=await(p.getOffsetParent==null?void 0:p.getOffsetParent(m));let j=A?A[O]:0;(!j||!await(p.isElement==null?void 0:p.isElement(A)))&&(j=d.floating[O]||u.floating[E]);const B=V/2-M/2,L=j/2-C[E]/2-1,q=min$2(b[I],L),F=min$2(b[N],L),H=q,U=j-C[E]-F,G=j/2-C[E]/2+B,J=clamp$1(H,G,U),Z=!f.arrow&&getAlignment(l)!=null&&G!==J&&u.reference[E]/2-(G<H?q:F)-C[E]/2<0,ae=Z?G<H?G-H:G-U:0;return{[S]:_[S]+ae,data:{[S]:J,centerOffset:G-J-ae,...Z&&{alignmentOffset:ae}},reset:Z}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:l,middlewareData:u,rects:p,initialPlacement:d,platform:f,elements:m}=t,{mainAxis:g=!0,crossAxis:b=!0,fallbackPlacements:_,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:C=!0,...R}=evaluate(e,t);if((n=u.arrow)!=null&&n.alignmentOffset)return{};const I=getSide(l),N=getSideAxis(d),O=getSide(d)===d,V=await(f.isRTL==null?void 0:f.isRTL(m.floating)),M=_||(O||!C?[getOppositePlacement(d)]:getExpandedPlacements(d)),A=E!=="none";!_&&A&&M.push(...getOppositeAxisPlacements(d,C,E,V));const j=[d,...M],B=await detectOverflow(t,R),L=[];let q=((o=u.flip)==null?void 0:o.overflows)||[];if(g&&L.push(B[I]),b){const G=getAlignmentSides(l,p,V);L.push(B[G[0]],B[G[1]])}if(q=[...q,{placement:l,overflows:L}],!L.every(G=>G<=0)){var F,H;const G=(((F=u.flip)==null?void 0:F.index)||0)+1,J=j[G];if(J)return{data:{index:G,overflows:q},reset:{placement:J}};let Z=(H=q.filter(ae=>ae.overflows[0]<=0).sort((ae,W)=>ae.overflows[1]-W.overflows[1])[0])==null?void 0:H.placement;if(!Z)switch(S){case"bestFit":{var U;const ae=(U=q.filter(W=>{if(A){const Q=getSideAxis(W.placement);return Q===N||Q==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(Q=>Q>0).reduce((Q,ee)=>Q+ee,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:U[0];ae&&(Z=ae);break}case"initialPlacement":Z=d;break}if(l!==Z)return{reset:{placement:Z}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...l}=evaluate(e,t);switch(o){case"referenceHidden":{const u=await detectOverflow(t,{...l,elementContext:"reference"}),p=getSideOffsets(u,n.reference);return{data:{referenceHiddenOffsets:p,referenceHidden:isAnySideFullyClipped(p)}}}case"escaped":{const u=await detectOverflow(t,{...l,altBoundary:!0}),p=getSideOffsets(u,n.floating);return{data:{escapedOffsets:p,escaped:isAnySideFullyClipped(p)}}}default:return{}}}}};async function convertValueToCoords(e,t){const{placement:n,platform:o,elements:l}=e,u=await(o.isRTL==null?void 0:o.isRTL(l.floating)),p=getSide(n),d=getAlignment(n),f=getSideAxis(n)==="y",m=["left","top"].includes(p)?-1:1,g=u&&f?-1:1,b=evaluate(t,e);let{mainAxis:_,crossAxis:S,alignmentAxis:E}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof E=="number"&&(S=d==="end"?E*-1:E),f?{x:S*g,y:_*m}:{x:_*m,y:S*g}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:l,y:u,placement:p,middlewareData:d}=t,f=await convertValueToCoords(t,e);return p===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:l+f.x,y:u+f.y,data:{...f,placement:p}}}}},shift$2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:l}=t,{mainAxis:u=!0,crossAxis:p=!1,limiter:d={fn:R=>{let{x:I,y:N}=R;return{x:I,y:N}}},...f}=evaluate(e,t),m={x:n,y:o},g=await detectOverflow(t,f),b=getSideAxis(getSide(l)),_=getOppositeAxis(b);let S=m[_],E=m[b];if(u){const R=_==="y"?"top":"left",I=_==="y"?"bottom":"right",N=S+g[R],O=S-g[I];S=clamp$1(N,S,O)}if(p){const R=b==="y"?"top":"left",I=b==="y"?"bottom":"right",N=E+g[R],O=E-g[I];E=clamp$1(N,E,O)}const C=d.fn({...t,[_]:S,[b]:E});return{...C,data:{x:C.x-n,y:C.y-o,enabled:{[_]:u,[b]:p}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:l,rects:u,middlewareData:p}=t,{offset:d=0,mainAxis:f=!0,crossAxis:m=!0}=evaluate(e,t),g={x:n,y:o},b=getSideAxis(l),_=getOppositeAxis(b);let S=g[_],E=g[b];const C=evaluate(d,t),R=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(f){const O=_==="y"?"height":"width",V=u.reference[_]-u.floating[O]+R.mainAxis,M=u.reference[_]+u.reference[O]-R.mainAxis;S<V?S=V:S>M&&(S=M)}if(m){var I,N;const O=_==="y"?"width":"height",V=["top","left"].includes(getSide(l)),M=u.reference[b]-u.floating[O]+(V&&((I=p.offset)==null?void 0:I[b])||0)+(V?0:R.crossAxis),A=u.reference[b]+u.reference[O]+(V?0:((N=p.offset)==null?void 0:N[b])||0)-(V?R.crossAxis:0);E<M?E=M:E>A&&(E=A)}return{[_]:S,[b]:E}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:l,rects:u,platform:p,elements:d}=t,{apply:f=()=>{},...m}=evaluate(e,t),g=await detectOverflow(t,m),b=getSide(l),_=getAlignment(l),S=getSideAxis(l)==="y",{width:E,height:C}=u.floating;let R,I;b==="top"||b==="bottom"?(R=b,I=_===(await(p.isRTL==null?void 0:p.isRTL(d.floating))?"start":"end")?"left":"right"):(I=b,R=_==="end"?"top":"bottom");const N=C-g.top-g.bottom,O=E-g.left-g.right,V=min$2(C-g[R],N),M=min$2(E-g[I],O),A=!t.middlewareData.shift;let j=V,B=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=O),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(j=N),A&&!_){const q=max$2(g.left,0),F=max$2(g.right,0),H=max$2(g.top,0),U=max$2(g.bottom,0);S?B=E-2*(q!==0||F!==0?q+F:max$2(g.left,g.right)):j=C-2*(H!==0||U!==0?H+U:max$2(g.top,g.bottom))}await f({...t,availableWidth:B,availableHeight:j});const L=await p.getDimensions(d.floating);return E!==L.width||C!==L.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement$1(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:o,display:l}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(l)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle$1(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement$1(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement$1(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=getNearestOverflowAncestor(e),u=l===((o=e.ownerDocument)==null?void 0:o.body),p=getWindow(l);if(u){const d=getFrameElement(p);return t.concat(p,p.visualViewport||[],isOverflowElement(l)?l:[],d&&n?getOverflowAncestors(d):[])}return t.concat(l,getOverflowAncestors(l,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const l=isHTMLElement$1(e),u=l?e.offsetWidth:n,p=l?e.offsetHeight:o,d=round$1(n)!==u||round$1(o)!==p;return d&&(n=u,o=p),{width:n,height:o,$:d}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement$1(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:o,height:l,$:u}=getCssDimensions(t);let p=(u?round$1(n.width):n.width)/o,d=(u?round$1(n.height):n.height)/l;return(!p||!Number.isFinite(p))&&(p=1),(!d||!Number.isFinite(d))&&(d=1),{x:p,y:d}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),u=unwrapElement(e);let p=createCoords(1);t&&(o?isElement(o)&&(p=getScale(o)):p=getScale(e));const d=shouldAddVisualOffsets(u,n,o)?getVisualOffsets(u):createCoords(0);let f=(l.left+d.x)/p.x,m=(l.top+d.y)/p.y,g=l.width/p.x,b=l.height/p.y;if(u){const _=getWindow(u),S=o&&isElement(o)?getWindow(o):o;let E=_,C=getFrameElement(E);for(;C&&o&&S!==E;){const R=getScale(C),I=C.getBoundingClientRect(),N=getComputedStyle$1(C),O=I.left+(C.clientLeft+parseFloat(N.paddingLeft))*R.x,V=I.top+(C.clientTop+parseFloat(N.paddingTop))*R.y;f*=R.x,m*=R.y,g*=R.x,b*=R.y,f+=O,m+=V,E=getWindow(C),C=getFrameElement(E)}}return rectToClientRect({width:g,height:b,x:f,y:m})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=o.left+t.scrollLeft-(n?0:getWindowScrollBarX(e,o)),u=o.top+t.scrollTop;return{x:l,y:u}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:o,strategy:l}=e;const u=l==="fixed",p=getDocumentElement(o),d=t?isTopLayer(t.floating):!1;if(o===p||d&&u)return n;let f={scrollLeft:0,scrollTop:0},m=createCoords(1);const g=createCoords(0),b=isHTMLElement$1(o);if((b||!b&&!u)&&((getNodeName(o)!=="body"||isOverflowElement(p))&&(f=getNodeScroll(o)),isHTMLElement$1(o))){const S=getBoundingClientRect(o);m=getScale(o),g.x=S.x+o.clientLeft,g.y=S.y+o.clientTop}const _=p&&!b&&!u?getHTMLOffset(p,f,!0):createCoords(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+g.x+_.x,y:n.y*m.y-f.scrollTop*m.y+g.y+_.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),o=e.ownerDocument.body,l=max$2(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),u=max$2(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let p=-n.scrollLeft+getWindowScrollBarX(e);const d=-n.scrollTop;return getComputedStyle$1(o).direction==="rtl"&&(p+=max$2(t.clientWidth,o.clientWidth)-l),{width:l,height:u,x:p,y:d}}function getViewportRect(e,t){const n=getWindow(e),o=getDocumentElement(e),l=n.visualViewport;let u=o.clientWidth,p=o.clientHeight,d=0,f=0;if(l){u=l.width,p=l.height;const m=isWebKit();(!m||m&&t==="fixed")&&(d=l.offsetLeft,f=l.offsetTop)}return{width:u,height:p,x:d,y:f}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),o=n.top+e.clientTop,l=n.left+e.clientLeft,u=isHTMLElement$1(e)?getScale(e):createCoords(1),p=e.clientWidth*u.x,d=e.clientHeight*u.y,f=l*u.x,m=o*u.y;return{width:p,height:d,x:f,y:m}}function getClientRectFromClippingAncestor(e,t,n){let o;if(t==="viewport")o=getViewportRect(e,n);else if(t==="document")o=getDocumentRect(getDocumentElement(e));else if(isElement(t))o=getInnerBoundingClientRect(t,n);else{const l=getVisualOffsets(e);o={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return rectToClientRect(o)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let o=getOverflowAncestors(e,[],!1).filter(d=>isElement(d)&&getNodeName(d)!=="body"),l=null;const u=getComputedStyle$1(e).position==="fixed";let p=u?getParentNode(e):e;for(;isElement(p)&&!isLastTraversableNode(p);){const d=getComputedStyle$1(p),f=isContainingBlock(p);!f&&d.position==="fixed"&&(l=null),(u?!f&&!l:!f&&d.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||isOverflowElement(p)&&!f&&hasFixedPositionAncestor(e,p))?o=o.filter(g=>g!==p):l=d,p=getParentNode(p)}return t.set(e,o),o}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:o,strategy:l}=e;const p=[...n==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),o],d=p[0],f=p.reduce((m,g)=>{const b=getClientRectFromClippingAncestor(t,g,l);return m.top=max$2(b.top,m.top),m.right=min$2(b.right,m.right),m.bottom=min$2(b.bottom,m.bottom),m.left=max$2(b.left,m.left),m},getClientRectFromClippingAncestor(t,d,l));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const o=isHTMLElement$1(t),l=getDocumentElement(t),u=n==="fixed",p=getBoundingClientRect(e,!0,u,t);let d={scrollLeft:0,scrollTop:0};const f=createCoords(0);if(o||!o&&!u)if((getNodeName(t)!=="body"||isOverflowElement(l))&&(d=getNodeScroll(t)),o){const _=getBoundingClientRect(t,!0,u,t);f.x=_.x+t.clientLeft,f.y=_.y+t.clientTop}else l&&(f.x=getWindowScrollBarX(l));const m=l&&!o&&!u?getHTMLOffset(l,d):createCoords(0),g=p.left+d.scrollLeft-f.x-m.x,b=p.top+d.scrollTop-f.y-m.y;return{x:g,y:b,width:p.width,height:p.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement$1(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement$1(e)){let l=getParentNode(e);for(;l&&!isLastTraversableNode(l);){if(isElement(l)&&!isStaticPositioned(l))return l;l=getParentNode(l)}return n}let o=getTrueOffsetParent(e,t);for(;o&&isTableElement(o)&&isStaticPositioned(o);)o=getTrueOffsetParent(o,t);return o&&isLastTraversableNode(o)&&isStaticPositioned(o)&&!isContainingBlock(o)?n:o||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,o=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,o;const l=getDocumentElement(e);function u(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function p(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),u();const m=e.getBoundingClientRect(),{left:g,top:b,width:_,height:S}=m;if(d||t(),!_||!S)return;const E=floor(b),C=floor(l.clientWidth-(g+_)),R=floor(l.clientHeight-(b+S)),I=floor(g),O={rootMargin:-E+"px "+-C+"px "+-R+"px "+-I+"px",threshold:max$2(0,min$2(1,f))||1};let V=!0;function M(A){const j=A[0].intersectionRatio;if(j!==f){if(!V)return p();j?p(!1,j):o=setTimeout(()=>{p(!1,1e-7)},1e3)}j===1&&!rectsAreEqual(m,e.getBoundingClientRect())&&p(),V=!1}try{n=new IntersectionObserver(M,{...O,root:l.ownerDocument})}catch{n=new IntersectionObserver(M,O)}n.observe(e)}return p(!0),u}function autoUpdate(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,m=unwrapElement(e),g=l||u?[...m?getOverflowAncestors(m):[],...getOverflowAncestors(t)]:[];g.forEach(I=>{l&&I.addEventListener("scroll",n,{passive:!0}),u&&I.addEventListener("resize",n)});const b=m&&d?observeMove(m,n):null;let _=-1,S=null;p&&(S=new ResizeObserver(I=>{let[N]=I;N&&N.target===m&&S&&(S.unobserve(t),cancelAnimationFrame(_),_=requestAnimationFrame(()=>{var O;(O=S)==null||O.observe(t)})),n()}),m&&!f&&S.observe(m),S.observe(t));let E,C=f?getBoundingClientRect(e):null;f&&R();function R(){const I=getBoundingClientRect(e);C&&!rectsAreEqual(C,I)&&n(),C=I,E=requestAnimationFrame(R)}return n(),()=>{var I;g.forEach(N=>{l&&N.removeEventListener("scroll",n),u&&N.removeEventListener("resize",n)}),b==null||b(),(I=S)==null||I.disconnect(),S=null,f&&cancelAnimationFrame(E)}}const offset$1=offset$2,shift$1=shift$2,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$2=arrow$3,limitShift$1=limitShift$2,computePosition=(e,t,n)=>{const o=new Map,l={platform,...n},u={...l.platform,_c:o};return computePosition$1(e,t,{...l,platform:u})};var index=typeof document<"u"?React.useLayoutEffect:React.useEffect;function deepEqual$1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,l;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!deepEqual$1(e[o],t[o]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,l[o]))return!1;for(o=n;o--!==0;){const u=l[o];if(!(u==="_owner"&&e.$$typeof)&&!deepEqual$1(e[u],t[u]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React__namespace.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:l,elements:{reference:u,floating:p}={},transform:d=!0,whileElementsMounted:f,open:m}=e,[g,b]=React__namespace.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[_,S]=React__namespace.useState(o);deepEqual$1(_,o)||S(o);const[E,C]=React__namespace.useState(null),[R,I]=React__namespace.useState(null),N=React__namespace.useCallback(W=>{W!==A.current&&(A.current=W,C(W))},[]),O=React__namespace.useCallback(W=>{W!==j.current&&(j.current=W,I(W))},[]),V=u||E,M=p||R,A=React__namespace.useRef(null),j=React__namespace.useRef(null),B=React__namespace.useRef(g),L=f!=null,q=useLatestRef(f),F=useLatestRef(l),H=useLatestRef(m),U=React__namespace.useCallback(()=>{if(!A.current||!j.current)return;const W={placement:t,strategy:n,middleware:_};F.current&&(W.platform=F.current),computePosition(A.current,j.current,W).then(Q=>{const ee={...Q,isPositioned:H.current!==!1};G.current&&!deepEqual$1(B.current,ee)&&(B.current=ee,ReactDOM__namespace.flushSync(()=>{b(ee)}))})},[_,t,n,F,H]);index(()=>{m===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,b(W=>({...W,isPositioned:!1})))},[m]);const G=React__namespace.useRef(!1);index(()=>(G.current=!0,()=>{G.current=!1}),[]),index(()=>{if(V&&(A.current=V),M&&(j.current=M),V&&M){if(q.current)return q.current(V,M,U);U()}},[V,M,U,q,L]);const J=React__namespace.useMemo(()=>({reference:A,floating:j,setReference:N,setFloating:O}),[N,O]),Z=React__namespace.useMemo(()=>({reference:V,floating:M}),[V,M]),ae=React__namespace.useMemo(()=>{const W={position:n,left:0,top:0};if(!Z.floating)return W;const Q=roundByDPR(Z.floating,g.x),ee=roundByDPR(Z.floating,g.y);return d?{...W,transform:"translate("+Q+"px, "+ee+"px)",...getDPR(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:ee}},[n,d,Z.floating,g.x,g.y]);return React__namespace.useMemo(()=>({...g,update:U,refs:J,elements:Z,floatingStyles:ae}),[g,U,J,Z,ae])}const arrow$1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:l}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?arrow$2({element:o.current,padding:l}).fn(n):{}:o?arrow$2({element:o,padding:l}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift=(e,t)=>({...shift$1(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),arrow=(e,t)=>({...arrow$1(e),options:[e,t]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((e,t)=>{const{children:n,width:o=10,height:l=5,...u}=e;return jsxRuntime.jsx(Primitive.svg,{...u,ref:t,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$7=Arrow$1;function useSize(e){const[t,n]=React__namespace.useState(void 0);return useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let p,d;if("borderBoxSize"in u){const f=u.borderBoxSize,m=Array.isArray(f)?f[0]:f;p=m.inlineSize,d=m.blockSize}else p=e.offsetWidth,d=e.offsetHeight;n({width:p,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=e=>{const{__scopePopper:t,children:n}=e,[o,l]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:t,anchor:o,onAnchorChange:l,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$1="PopperAnchor",PopperAnchor=React__namespace.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...l}=e,u=usePopperContext(ANCHOR_NAME$1,n),p=React__namespace.useRef(null),d=useComposedRefs(t,p);return React__namespace.useEffect(()=>{u.onAnchorChange((o==null?void 0:o.current)||p.current)}),o?null:jsxRuntime.jsx(Primitive.div,{...l,ref:d})});PopperAnchor.displayName=ANCHOR_NAME$1;var CONTENT_NAME$5="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$5),PopperContent=React__namespace.forwardRef((e,t)=>{var he,ye,de,le,se,te;const{__scopePopper:n,side:o="bottom",sideOffset:l=0,align:u="center",alignOffset:p=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:b="partial",hideWhenDetached:_=!1,updatePositionStrategy:S="optimized",onPlaced:E,...C}=e,R=usePopperContext(CONTENT_NAME$5,n),[I,N]=React__namespace.useState(null),O=useComposedRefs(t,xe=>N(xe)),[V,M]=React__namespace.useState(null),A=useSize(V),j=(A==null?void 0:A.width)??0,B=(A==null?void 0:A.height)??0,L=o+(u!=="center"?"-"+u:""),q=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},F=Array.isArray(m)?m:[m],H=F.length>0,U={padding:q,boundary:F.filter(isNotNull),altBoundary:H},{refs:G,floatingStyles:J,placement:Z,isPositioned:ae,middlewareData:W}=useFloating({strategy:"fixed",placement:L,whileElementsMounted:(...xe)=>autoUpdate(...xe,{animationFrame:S==="always"}),elements:{reference:R.anchor},middleware:[offset({mainAxis:l+B,alignmentAxis:p}),f&&shift({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?limitShift():void 0,...U}),f&&flip({...U}),size({...U,apply:({elements:xe,rects:oe,availableWidth:be,availableHeight:_e})=>{const{width:Ce,height:Te}=oe.reference,Ee=xe.floating.style;Ee.setProperty("--radix-popper-available-width",`${be}px`),Ee.setProperty("--radix-popper-available-height",`${_e}px`),Ee.setProperty("--radix-popper-anchor-width",`${Ce}px`),Ee.setProperty("--radix-popper-anchor-height",`${Te}px`)}}),V&&arrow({element:V,padding:d}),transformOrigin({arrowWidth:j,arrowHeight:B}),_&&hide({strategy:"referenceHidden",...U})]}),[Q,ee]=getSideAndAlignFromPlacement(Z),ie=useCallbackRef$1(E);useLayoutEffect2(()=>{ae&&(ie==null||ie())},[ae,ie]);const ce=(he=W.arrow)==null?void 0:he.x,ue=(ye=W.arrow)==null?void 0:ye.y,fe=((de=W.arrow)==null?void 0:de.centerOffset)!==0,[pe,ve]=React__namespace.useState();return useLayoutEffect2(()=>{I&&ve(window.getComputedStyle(I).zIndex)},[I]),jsxRuntime.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:ae?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(le=W.transformOrigin)==null?void 0:le.x,(se=W.transformOrigin)==null?void 0:se.y].join(" "),...((te=W.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:Q,onArrowChange:M,arrowX:ce,arrowY:ue,shouldHideArrow:fe,children:jsxRuntime.jsx(Primitive.div,{"data-side":Q,"data-align":ee,...C,ref:O,style:{...C.style,animation:ae?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$5;var ARROW_NAME$4="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(t,n){const{__scopePopper:o,...l}=t,u=useContentContext(ARROW_NAME$4,o),p=OPPOSITE_SIDE[u.placedSide];return jsxRuntime.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:jsxRuntime.jsx(Root$7,{...l,ref:n,style:{...l.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$4;function isNotNull(e){return e!==null}var transformOrigin=e=>({name:"transformOrigin",options:e,fn(t){var R,I,N;const{placement:n,rects:o,middlewareData:l}=t,p=((R=l.arrow)==null?void 0:R.centerOffset)!==0,d=p?0:e.arrowWidth,f=p?0:e.arrowHeight,[m,g]=getSideAndAlignFromPlacement(n),b={start:"0%",center:"50%",end:"100%"}[g],_=(((I=l.arrow)==null?void 0:I.x)??0)+d/2,S=(((N=l.arrow)==null?void 0:N.y)??0)+f/2;let E="",C="";return m==="bottom"?(E=p?b:`${_}px`,C=`${-f}px`):m==="top"?(E=p?b:`${_}px`,C=`${o.floating.height+f}px`):m==="right"?(E=`${-f}px`,C=p?b:`${S}px`):m==="left"&&(E=`${o.floating.width+f}px`,C=p?b:`${S}px`),{data:{x:E,y:C}}}});function getSideAndAlignFromPlacement(e){const[t,n="center"]=e.split("-");return[t,n]}var Root2$4=Popper,Anchor=PopperAnchor,Content$1=PopperContent,Arrow=PopperArrow,ENTRY_FOCUS="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS={bubbles:!1,cancelable:!0},GROUP_NAME$3="RovingFocusGroup",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(GROUP_NAME$3),[createRovingFocusGroupContext,createRovingFocusGroupScope]=createContextScope(GROUP_NAME$3,[createCollectionScope$3]),[RovingFocusProvider,useRovingFocusContext]=createRovingFocusGroupContext(GROUP_NAME$3),RovingFocusGroup=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(RovingFocusGroupImpl,{...e,ref:t})})}));RovingFocusGroup.displayName=GROUP_NAME$3;var RovingFocusGroupImpl=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:l=!1,dir:u,currentTabStopId:p,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...b}=e,_=React__namespace.useRef(null),S=useComposedRefs(t,_),E=useDirection(u),[C,R]=useControllableState({prop:p,defaultProp:d??null,onChange:f,caller:GROUP_NAME$3}),[I,N]=React__namespace.useState(!1),O=useCallbackRef$1(m),V=useCollection$3(n),M=React__namespace.useRef(!1),[A,j]=React__namespace.useState(0);return React__namespace.useEffect(()=>{const B=_.current;if(B)return B.addEventListener(ENTRY_FOCUS,O),()=>B.removeEventListener(ENTRY_FOCUS,O)},[O]),jsxRuntime.jsx(RovingFocusProvider,{scope:n,orientation:o,dir:E,loop:l,currentTabStopId:C,onItemFocus:React__namespace.useCallback(B=>R(B),[R]),onItemShiftTab:React__namespace.useCallback(()=>N(!0),[]),onFocusableItemAdd:React__namespace.useCallback(()=>j(B=>B+1),[]),onFocusableItemRemove:React__namespace.useCallback(()=>j(B=>B-1),[]),children:jsxRuntime.jsx(Primitive.div,{tabIndex:I||A===0?-1:0,"data-orientation":o,...b,ref:S,style:{outline:"none",...e.style},onMouseDown:composeEventHandlers(e.onMouseDown,()=>{M.current=!0}),onFocus:composeEventHandlers(e.onFocus,B=>{const L=!M.current;if(B.target===B.currentTarget&&L&&!I){const q=new CustomEvent(ENTRY_FOCUS,EVENT_OPTIONS);if(B.currentTarget.dispatchEvent(q),!q.defaultPrevented){const F=V().filter(Z=>Z.focusable),H=F.find(Z=>Z.active),U=F.find(Z=>Z.id===C),J=[H,U,...F].filter(Boolean).map(Z=>Z.ref.current);focusFirst$2(J,g)}}M.current=!1}),onBlur:composeEventHandlers(e.onBlur,()=>N(!1))})})}),ITEM_NAME$3="RovingFocusGroupItem",RovingFocusGroupItem=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:l=!1,tabStopId:u,children:p,...d}=e,f=useId(),m=u||f,g=useRovingFocusContext(ITEM_NAME$3,n),b=g.currentTabStopId===m,_=useCollection$3(n),{onFocusableItemAdd:S,onFocusableItemRemove:E}=g;return React__namespace.useEffect(()=>{if(o)return S(),()=>E()},[o,S,E]),jsxRuntime.jsx(Collection$3.ItemSlot,{scope:n,id:m,focusable:o,active:l,children:jsxRuntime.jsx(Primitive.span,{tabIndex:b?0:-1,"data-orientation":g.orientation,...d,ref:t,onMouseDown:composeEventHandlers(e.onMouseDown,C=>{o?g.onItemFocus(m):C.preventDefault()}),onFocus:composeEventHandlers(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:composeEventHandlers(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){g.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const R=getFocusIntent(C,g.orientation,g.dir);if(R!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let N=_().filter(O=>O.focusable).map(O=>O.ref.current);if(R==="last")N.reverse();else if(R==="prev"||R==="next"){R==="prev"&&N.reverse();const O=N.indexOf(C.currentTarget);N=g.loop?wrapArray$2(N,O+1):N.slice(O+1)}setTimeout(()=>focusFirst$2(N))}}),children:typeof p=="function"?p({isCurrentTabStop:b}):p})})});RovingFocusGroupItem.displayName=ITEM_NAME$3;var MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function getFocusIntent(e,t,n){const o=getDirectionAwareKey(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return MAP_KEY_TO_FOCUS_INTENT[o]}function focusFirst$2(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function wrapArray$2(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Root$6=RovingFocusGroup,Item$1=RovingFocusGroupItem,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$2,useCollection$2,createCollectionScope$2]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope(MENU_NAME,[createCollectionScope$2,createPopperScope,createRovingFocusGroupScope]),usePopperScope$2=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:l,onOpenChange:u,modal:p=!0}=e,d=usePopperScope$2(t),[f,m]=React__namespace.useState(null),g=React__namespace.useRef(!1),b=useCallbackRef$1(u),_=useDirection(l);return React__namespace.useEffect(()=>{const S=()=>{g.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>g.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),jsxRuntime.jsx(Root2$4,{...d,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:n,onOpenChange:b,content:f,onContentChange:m,children:jsxRuntime.jsx(MenuRootProvider,{scope:t,onClose:React__namespace.useCallback(()=>b(!1),[b]),isUsingKeyboardRef:g,dir:_,modal:p,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME="MenuAnchor",MenuAnchor=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,l=usePopperScope$2(n);return jsxRuntime.jsx(Anchor,{...l,...o,ref:t})});MenuAnchor.displayName=ANCHOR_NAME;var PORTAL_NAME$3="MenuPortal",[PortalProvider$1,usePortalContext$1]=createMenuContext(PORTAL_NAME$3,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:l}=e,u=useMenuContext(PORTAL_NAME$3,t);return jsxRuntime.jsx(PortalProvider$1,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||u.open,children:jsxRuntime.jsx(Portal$4,{asChild:!0,container:l,children:o})})})};MenuPortal.displayName=PORTAL_NAME$3;var CONTENT_NAME$4="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$4),MenuContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$4,e.__scopeMenu),{forceMount:o=n.forceMount,...l}=e,u=useMenuContext(CONTENT_NAME$4,e.__scopeMenu),p=useMenuRootContext(CONTENT_NAME$4,e.__scopeMenu);return jsxRuntime.jsx(Collection$2.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||u.open,children:jsxRuntime.jsx(Collection$2.Slot,{scope:e.__scopeMenu,children:p.modal?jsxRuntime.jsx(MenuRootContentModal,{...l,ref:t}):jsxRuntime.jsx(MenuRootContentNonModal,{...l,ref:t})})})})}),MenuRootContentModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$4,e.__scopeMenu),o=React__namespace.useRef(null),l=useComposedRefs(t,o);return React__namespace.useEffect(()=>{const u=o.current;if(u)return hideOthers(u)},[]),jsxRuntime.jsx(MenuContentImpl,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$4,e.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot$1=createSlot("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:p,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:b,onInteractOutside:_,onDismiss:S,disableOutsideScroll:E,...C}=e,R=useMenuContext(CONTENT_NAME$4,n),I=useMenuRootContext(CONTENT_NAME$4,n),N=usePopperScope$2(n),O=useRovingFocusGroupScope$1(n),V=useCollection$2(n),[M,A]=React__namespace.useState(null),j=React__namespace.useRef(null),B=useComposedRefs(t,j,R.onContentChange),L=React__namespace.useRef(0),q=React__namespace.useRef(""),F=React__namespace.useRef(0),H=React__namespace.useRef(null),U=React__namespace.useRef("right"),G=React__namespace.useRef(0),J=E?ReactRemoveScroll:React__namespace.Fragment,Z=E?{as:Slot$1,allowPinchZoom:!0}:void 0,ae=Q=>{var he,ye;const ee=q.current+Q,ie=V().filter(de=>!de.disabled),ce=document.activeElement,ue=(he=ie.find(de=>de.ref.current===ce))==null?void 0:he.textValue,fe=ie.map(de=>de.textValue),pe=getNextMatch(fe,ee,ue),ve=(ye=ie.find(de=>de.textValue===pe))==null?void 0:ye.ref.current;(function de(le){q.current=le,window.clearTimeout(L.current),le!==""&&(L.current=window.setTimeout(()=>de(""),1e3))})(ee),ve&&setTimeout(()=>ve.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(L.current),[]),useFocusGuards();const W=React__namespace.useCallback(Q=>{var ie,ce;return U.current===((ie=H.current)==null?void 0:ie.side)&&isPointerInGraceArea(Q,(ce=H.current)==null?void 0:ce.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:q,onItemEnter:React__namespace.useCallback(Q=>{W(Q)&&Q.preventDefault()},[W]),onItemLeave:React__namespace.useCallback(Q=>{var ee;W(Q)||((ee=j.current)==null||ee.focus(),A(null))},[W]),onTriggerLeave:React__namespace.useCallback(Q=>{W(Q)&&Q.preventDefault()},[W]),pointerGraceTimerRef:F,onPointerGraceIntentChange:React__namespace.useCallback(Q=>{H.current=Q},[]),children:jsxRuntime.jsx(J,{...Z,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:composeEventHandlers(u,Q=>{var ee;Q.preventDefault(),(ee=j.current)==null||ee.focus({preventScroll:!0})}),onUnmountAutoFocus:p,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:b,onInteractOutside:_,onDismiss:S,children:jsxRuntime.jsx(Root$6,{asChild:!0,...O,dir:I.dir,orientation:"vertical",loop:o,currentTabStopId:M,onCurrentTabStopIdChange:A,onEntryFocus:composeEventHandlers(f,Q=>{I.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$1,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(R.open),"data-radix-menu-content":"",dir:I.dir,...N,...C,ref:B,style:{outline:"none",...C.style},onKeyDown:composeEventHandlers(C.onKeyDown,Q=>{const ie=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,ce=Q.ctrlKey||Q.altKey||Q.metaKey,ue=Q.key.length===1;ie&&(Q.key==="Tab"&&Q.preventDefault(),!ce&&ue&&ae(Q.key));const fe=j.current;if(Q.target!==fe||!FIRST_LAST_KEYS.includes(Q.key))return;Q.preventDefault();const ve=V().filter(he=>!he.disabled).map(he=>he.ref.current);LAST_KEYS.includes(Q.key)&&ve.reverse(),focusFirst$1(ve)}),onBlur:composeEventHandlers(e.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(L.current),q.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(Q=>{const ee=Q.target,ie=G.current!==Q.clientX;if(Q.currentTarget.contains(ee)&&ie){const ce=Q.clientX>G.current?"right":"left";U.current=ce,G.current=Q.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$4;var GROUP_NAME$2="MenuGroup",MenuGroup=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{role:"group",...o,ref:t})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{...o,ref:t})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$2="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...l}=e,u=React__namespace.useRef(null),p=useMenuRootContext(ITEM_NAME$2,e.__scopeMenu),d=useMenuContentContext(ITEM_NAME$2,e.__scopeMenu),f=useComposedRefs(t,u),m=React__namespace.useRef(!1),g=()=>{const b=u.current;if(!n&&b){const _=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});b.addEventListener(ITEM_SELECT,S=>o==null?void 0:o(S),{once:!0}),dispatchDiscreteCustomEvent(b,_),_.defaultPrevented?m.current=!1:p.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...l,ref:f,disabled:n,onClick:composeEventHandlers(e.onClick,g),onPointerDown:b=>{var _;(_=e.onPointerDown)==null||_.call(e,b),m.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,b=>{var _;m.current||(_=b.currentTarget)==null||_.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,b=>{const _=d.searchRef.current!=="";n||_&&b.key===" "||SELECTION_KEYS$1.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})});MenuItem.displayName=ITEM_NAME$2;var MenuItemImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:l,...u}=e,p=useMenuContentContext(ITEM_NAME$2,n),d=useRovingFocusGroupScope$1(n),f=React__namespace.useRef(null),m=useComposedRefs(t,f),[g,b]=React__namespace.useState(!1),[_,S]=React__namespace.useState("");return React__namespace.useEffect(()=>{const E=f.current;E&&S((E.textContent??"").trim())},[u.children]),jsxRuntime.jsx(Collection$2.ItemSlot,{scope:n,disabled:o,textValue:l??_,children:jsxRuntime.jsx(Item$1,{asChild:!0,...d,focusable:!o,children:jsxRuntime.jsx(Primitive.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...u,ref:m,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(E=>{o?p.onItemLeave(E):(p.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(E=>p.onItemLeave(E))),onFocus:composeEventHandlers(e.onFocus,()=>b(!0)),onBlur:composeEventHandlers(e.onBlur,()=>b(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...l}=e;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate(n)?"mixed":n,...l,ref:t,"data-state":getCheckedState(n),onSelect:composeEventHandlers(l.onSelect,()=>o==null?void 0:o(isIndeterminate(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((e,t)=>{const{value:n,onValueChange:o,...l}=e,u=useCallbackRef$1(o);return jsxRuntime.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:n,onValueChange:u,children:jsxRuntime.jsx(MenuGroup,{...l,ref:t})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((e,t)=>{const{value:n,...o}=e,l=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),u=n===l.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:u,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":u,...o,ref:t,"data-state":getCheckedState(u),onSelect:composeEventHandlers(o.onSelect,()=>{var p;return(p=l.onValueChange)==null?void 0:p.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((e,t)=>{const{__scopeMenu:n,forceMount:o,...l}=e,u=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n);return jsxRuntime.jsx(Presence,{present:o||isIndeterminate(u.checked)||u.checked===!0,children:jsxRuntime.jsx(Primitive.span,{...l,ref:t,"data-state":getCheckedState(u.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$3="MenuArrow",MenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,l=usePopperScope$2(n);return jsxRuntime.jsx(Arrow,{...l,...o,ref:t})});MenuArrow.displayName=ARROW_NAME$3;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:l}=e,u=useMenuContext(SUB_NAME,t),p=usePopperScope$2(t),[d,f]=React__namespace.useState(null),[m,g]=React__namespace.useState(null),b=useCallbackRef$1(l);return React__namespace.useEffect(()=>(u.open===!1&&b(!1),()=>b(!1)),[u.open,b]),jsxRuntime.jsx(Root2$4,{...p,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:o,onOpenChange:b,content:m,onContentChange:g,children:jsxRuntime.jsx(MenuSubProvider,{scope:t,contentId:useId(),triggerId:useId(),trigger:d,onTriggerChange:f,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),l=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),u=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),p=React__namespace.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=u,m={__scopeMenu:e.__scopeMenu},g=React__namespace.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=null},[]);return React__namespace.useEffect(()=>g,[g]),React__namespace.useEffect(()=>{const b=d.current;return()=>{window.clearTimeout(b),f(null)}},[d,f]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,...m,children:jsxRuntime.jsx(MenuItemImpl,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":getOpenState(n.open),...e,ref:composeRefs(t,l.onTriggerChange),onClick:b=>{var _;(_=e.onClick)==null||_.call(e,b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(b=>{u.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!n.open&&!p.current&&(u.onPointerGraceIntentChange(null),p.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(b=>{var S,E;g();const _=(S=n.content)==null?void 0:S.getBoundingClientRect();if(_){const C=(E=n.content)==null?void 0:E.dataset.side,R=C==="right",I=R?-5:5,N=_[R?"left":"right"],O=_[R?"right":"left"];u.onPointerGraceIntentChange({area:[{x:b.clientX+I,y:b.clientY},{x:N,y:_.top},{x:O,y:_.top},{x:O,y:_.bottom},{x:N,y:_.bottom}],side:C}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(b),b.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,b=>{var S;const _=u.searchRef.current!=="";e.disabled||_&&b.key===" "||SUB_OPEN_KEYS[o.dir].includes(b.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),b.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$1(CONTENT_NAME$4,e.__scopeMenu),{forceMount:o=n.forceMount,...l}=e,u=useMenuContext(CONTENT_NAME$4,e.__scopeMenu),p=useMenuRootContext(CONTENT_NAME$4,e.__scopeMenu),d=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),f=React__namespace.useRef(null),m=useComposedRefs(t,f);return jsxRuntime.jsx(Collection$2.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:o||u.open,children:jsxRuntime.jsx(Collection$2.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:d.contentId,"aria-labelledby":d.triggerId,...l,ref:m,align:"start",side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var b;p.isUsingKeyboardRef.current&&((b=f.current)==null||b.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,g=>{g.target!==d.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,g=>{p.onClose(),g.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,g=>{var S;const b=g.currentTarget.contains(g.target),_=SUB_CLOSE_KEYS[p.dir].includes(g.key);b&&_&&(u.onOpenChange(!1),(S=d.trigger)==null||S.focus(),g.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst$1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wrapArray$1(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function getNextMatch(e,t,n){const l=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,u=n?e.indexOf(n):-1;let p=wrapArray$1(e,Math.max(u,0));l.length===1&&(p=p.filter(m=>m!==n));const f=p.find(m=>m.toLowerCase().startsWith(l.toLowerCase()));return f!==n?f:void 0}function isPointInPolygon$1(e,t){const{x:n,y:o}=e;let l=!1;for(let u=0,p=t.length-1;u<t.length;p=u++){const d=t[u],f=t[p],m=d.x,g=d.y,b=f.x,_=f.y;g>o!=_>o&&n<(b-m)*(o-g)/(_-g)+m&&(l=!l)}return l}function isPointerInGraceArea(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return isPointInPolygon$1(n,t)}function whenMouse(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Root3$1=Menu,Anchor2=MenuAnchor,Portal$2=MenuPortal,Content2$3=MenuContent,Group=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,createDropdownMenuScope]=createContextScope(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:l,defaultOpen:u,onOpenChange:p,modal:d=!0}=e,f=useMenuScope(t),m=React__namespace.useRef(null),[g,b]=useControllableState({prop:l,defaultProp:u??!1,onChange:p,caller:DROPDOWN_MENU_NAME});return jsxRuntime.jsx(DropdownMenuProvider,{scope:t,triggerId:useId(),triggerRef:m,contentId:useId(),open:g,onOpenChange:b,onOpenToggle:React__namespace.useCallback(()=>b(_=>!_),[b]),modal:d,children:jsxRuntime.jsx(Root3$1,{...f,open:g,onOpenChange:b,dir:o,modal:d,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$3="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...l}=e,u=useDropdownMenuContext(TRIGGER_NAME$3,n),p=useMenuScope(n);return jsxRuntime.jsx(Anchor2,{asChild:!0,...p,children:jsxRuntime.jsx(Primitive.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:composeRefs(t,u.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,d=>{!o&&d.button===0&&d.ctrlKey===!1&&(u.onOpenToggle(),u.open||d.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,d=>{o||(["Enter"," "].includes(d.key)&&u.onOpenToggle(),d.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$3;var PORTAL_NAME$2="DropdownMenuPortal",DropdownMenuPortal$1=e=>{const{__scopeDropdownMenu:t,...n}=e,o=useMenuScope(t);return jsxRuntime.jsx(Portal$2,{...o,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$2;var CONTENT_NAME$3="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useDropdownMenuContext(CONTENT_NAME$3,n),u=useMenuScope(n),p=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$3,{id:l.contentId,"aria-labelledby":l.triggerId,...u,...o,ref:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,d=>{var f;p.current||(f=l.triggerRef.current)==null||f.focus(),p.current=!1,d.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0,g=f.button===2||m;(!l.modal||g)&&(p.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$3;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Group,{...l,...o,ref:t})});DropdownMenuGroup$1.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Label$4,{...l,...o,ref:t})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$1="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...l,...o,ref:t})});DropdownMenuItem$1.displayName=ITEM_NAME$1;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...l,...o,ref:t})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...l,...o,ref:t})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...l,...o,ref:t})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator$1,{...l,...o,ref:t})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Separator$3,{...l,...o,ref:t})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$2="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...l,...o,ref:t})});DropdownMenuArrow.displayName=ARROW_NAME$2;var DropdownMenuSub$1=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:l,defaultOpen:u}=e,p=useMenuScope(t),[d,f]=useControllableState({prop:o,defaultProp:u??!1,onChange:l,caller:"DropdownMenuSub"});return jsxRuntime.jsx(Sub,{...p,open:d,onOpenChange:f,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...l,...o,ref:t})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,l=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...l,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$3=DropdownMenu$1,Trigger$3=DropdownMenuTrigger$1,Portal2=DropdownMenuPortal$1,Content2$2=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$3,DropdownMenuTrigger=Trigger$3,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:e,inset:t,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",t&&"pl-8",e),...o,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:e,...t},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]",e),...t}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},o)=>jsxRuntime.jsx(Portal2,{children:jsxRuntime.jsx(Content2$2,{ref:o,sideOffset:t,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]",e),...n})}));DropdownMenuContent.displayName=Content2$2.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:e,inset:t,...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",t&&"pl-8",e),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:e,children:t,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",e),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"})})}),t]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:e,children:t,...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",e),...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"})})}),t]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:e,inset:t,...n},o)=>jsxRuntime.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",e),...t}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:e,...t})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",e),...t});DropdownMenuShortcut.displayName="DropdownMenuShortcut";function ProductInventoryGrid({inventory:e,showBinLocation:t}){const n=(I,N,O=!1,V=!0)=>jsxRuntime.jsxs("div",{className:`p-3 text-sm ${V&&N>0?"border-t":""} ${O?"border-r":""}`,children:[jsxRuntime.jsxs("div",{className:"flex justify-between font-medium",children:[jsxRuntime.jsx("span",{children:I.Name}),jsxRuntime.jsx("span",{children:I.AvailableQuantity})]}),jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Expecting"}),jsxRuntime.jsx("span",{children:I.PurchaseOrderQuantity||"-"})]}),t&&jsxRuntime.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[jsxRuntime.jsx("span",{children:"Bin Location"}),jsxRuntime.jsx("span",{children:I.BinLocation||"-"})]})]},`warehouse-${I.WarehouseId}`),o=["MTL","TOR"],l=["VAN","EDM"],u=[...e].sort((I,N)=>(I.Name||"").localeCompare(N.Name||"")),p=u.filter(I=>I.Country==="US"),d=u.filter(I=>I.Country==="CA"),f=u.filter(I=>l.includes(I.WarehouseId||"")),m=u.filter(I=>o.includes(I.WarehouseId||"")),g=d.filter(I=>!o.includes(I.WarehouseId||"")&&!l.includes(I.WarehouseId||"")),b=I=>I.reduce((N,O)=>N+(O.AvailableQuantity||0),0),_=b(d),S=b(m),E=b(f),C=b(p),R=_+C;return jsxRuntime.jsxs("div",{className:"border rounded-md overflow-hidden",children:[d.length>0&&p.length>0&&jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Total"}),jsxRuntime.jsx("span",{children:R})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),d.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"Canada"}),jsxRuntime.jsx("span",{children:_})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2",children:[jsxRuntime.jsxs("div",{className:"border-r",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"West"}),jsxRuntime.jsx("span",{children:E})]}),f.map((I,N)=>n(I,N))]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"East"}),jsxRuntime.jsx("span",{children:S})]}),m.map((I,N)=>n(I,N))]})]}),g.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:jsxRuntime.jsx("span",{children:"Other"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:g.map((I,N)=>n(I,N,N%2===0,!0))})]})]}),p.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[jsxRuntime.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[jsxRuntime.jsx("span",{children:"United States"}),jsxRuntime.jsx("span",{children:C})]}),jsxRuntime.jsx("div",{className:"p-3"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2",children:p.map((I,N)=>n(I,N,N%2===0,!0))})]}),e.length===0&&jsxRuntime.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:u}=t,p=Object.keys(l).map(m=>{const g=n==null?void 0:n[m],b=u==null?void 0:u[m];if(g===null)return null;const _=falsyToString(g)||falsyToString(b);return l[m][_]}),d=n&&Object.entries(n).reduce((m,g)=>{let[b,_]=g;return _===void 0||(m[b]=_),m},{}),f=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:b,className:_,...S}=g;return Object.entries(S).every(E=>{let[C,R]=E;return Array.isArray(R)?R.includes({...u,...d}[C]):{...u,...d}[C]===R})?[...m,b,_]:m},[]);return cx(e,p,f,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=React__namespace.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,confirmationDialog:l,onClick:u,...p},d)=>{const f=o?Slot$3:"button";if(!l)return jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:d,onClick:u,...p});u&&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:m,content:g,onConfirm:b,confirmText:_="Confirm",cancelText:S="Cancel"}=l,E=()=>{b()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:d,...p})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:m}),jsxRuntime.jsx(DialogDescription,{children:g})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button,{variant:"outline",children:S})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button,{onClick:E,children:_})})]})]})]})});Button.displayName="Button";var VISUALLY_HIDDEN_STYLES=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NAME$2="VisuallyHidden",VisuallyHidden=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive.span,{...e,ref:t,style:{...VISUALLY_HIDDEN_STYLES,...e.style}}));VisuallyHidden.displayName=NAME$2;var Root$5=VisuallyHidden,[createTooltipContext,createTooltipScope]=createContextScope("Tooltip",[createPopperScope]),usePopperScope$1=createPopperScope(),PROVIDER_NAME$1="TooltipProvider",DEFAULT_DELAY_DURATION=700,TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME$1),TooltipProvider$1=e=>{const{__scopeTooltip:t,delayDuration:n=DEFAULT_DELAY_DURATION,skipDelayDuration:o=300,disableHoverableContent:l=!1,children:u}=e,p=React__namespace.useRef(!0),d=React__namespace.useRef(!1),f=React__namespace.useRef(0);return React__namespace.useEffect(()=>{const m=f.current;return()=>window.clearTimeout(m)},[]),jsxRuntime.jsx(TooltipProviderContextProvider,{scope:t,isOpenDelayedRef:p,delayDuration:n,onOpen:React__namespace.useCallback(()=>{window.clearTimeout(f.current),p.current=!1},[]),onClose:React__namespace.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>p.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:React__namespace.useCallback(m=>{d.current=m},[]),disableHoverableContent:l,children:u})};TooltipProvider$1.displayName=PROVIDER_NAME$1;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),Tooltip$2=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:l,onOpenChange:u,disableHoverableContent:p,delayDuration:d}=e,f=useTooltipProviderContext(TOOLTIP_NAME,e.__scopeTooltip),m=usePopperScope$1(t),[g,b]=React__namespace.useState(null),_=useId(),S=React__namespace.useRef(0),E=p??f.disableHoverableContent,C=d??f.delayDuration,R=React__namespace.useRef(!1),[I,N]=useControllableState({prop:o,defaultProp:l??!1,onChange:j=>{j?(f.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):f.onClose(),u==null||u(j)},caller:TOOLTIP_NAME}),O=React__namespace.useMemo(()=>I?R.current?"delayed-open":"instant-open":"closed",[I]),V=React__namespace.useCallback(()=>{window.clearTimeout(S.current),S.current=0,R.current=!1,N(!0)},[N]),M=React__namespace.useCallback(()=>{window.clearTimeout(S.current),S.current=0,N(!1)},[N]),A=React__namespace.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{R.current=!0,N(!0),S.current=0},C)},[C,N]);return React__namespace.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),jsxRuntime.jsx(Root2$4,{...m,children:jsxRuntime.jsx(TooltipContextProvider,{scope:t,contentId:_,open:I,stateAttribute:O,trigger:g,onTriggerChange:b,onTriggerEnter:React__namespace.useCallback(()=>{f.isOpenDelayedRef.current?A():V()},[f.isOpenDelayedRef,A,V]),onTriggerLeave:React__namespace.useCallback(()=>{E?M():(window.clearTimeout(S.current),S.current=0)},[M,E]),onOpen:V,onClose:M,disableHoverableContent:E,children:n})})};Tooltip$2.displayName=TOOLTIP_NAME;var TRIGGER_NAME$2="TooltipTrigger",TooltipTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,l=useTooltipContext(TRIGGER_NAME$2,n),u=useTooltipProviderContext(TRIGGER_NAME$2,n),p=usePopperScope$1(n),d=React__namespace.useRef(null),f=useComposedRefs(t,d,l.onTriggerChange),m=React__namespace.useRef(!1),g=React__namespace.useRef(!1),b=React__namespace.useCallback(()=>m.current=!1,[]);return React__namespace.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),jsxRuntime.jsx(Anchor,{asChild:!0,...p,children:jsxRuntime.jsx(Primitive.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:f,onPointerMove:composeEventHandlers(e.onPointerMove,_=>{_.pointerType!=="touch"&&!g.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),g.current=!0)}),onPointerLeave:composeEventHandlers(e.onPointerLeave,()=>{l.onTriggerLeave(),g.current=!1}),onPointerDown:composeEventHandlers(e.onPointerDown,()=>{l.open&&l.onClose(),m.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:composeEventHandlers(e.onFocus,()=>{m.current||l.onOpen()}),onBlur:composeEventHandlers(e.onBlur,l.onClose),onClick:composeEventHandlers(e.onClick,l.onClose)})})});TooltipTrigger$1.displayName=TRIGGER_NAME$2;var PORTAL_NAME$1="TooltipPortal",[PortalProvider,usePortalContext]=createTooltipContext(PORTAL_NAME$1,{forceMount:void 0}),TooltipPortal=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:l}=e,u=useTooltipContext(PORTAL_NAME$1,t);return jsxRuntime.jsx(PortalProvider,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||u.open,children:jsxRuntime.jsx(Portal$4,{asChild:!0,container:l,children:o})})})};TooltipPortal.displayName=PORTAL_NAME$1;var CONTENT_NAME$2="TooltipContent",TooltipContent$1=React__namespace.forwardRef((e,t)=>{const n=usePortalContext(CONTENT_NAME$2,e.__scopeTooltip),{forceMount:o=n.forceMount,side:l="top",...u}=e,p=useTooltipContext(CONTENT_NAME$2,e.__scopeTooltip);return jsxRuntime.jsx(Presence,{present:o||p.open,children:p.disableHoverableContent?jsxRuntime.jsx(TooltipContentImpl,{side:l,...u,ref:t}):jsxRuntime.jsx(TooltipContentHoverable,{side:l,...u,ref:t})})}),TooltipContentHoverable=React__namespace.forwardRef((e,t)=>{const n=useTooltipContext(CONTENT_NAME$2,e.__scopeTooltip),o=useTooltipProviderContext(CONTENT_NAME$2,e.__scopeTooltip),l=React__namespace.useRef(null),u=useComposedRefs(t,l),[p,d]=React__namespace.useState(null),{trigger:f,onClose:m}=n,g=l.current,{onPointerInTransitChange:b}=o,_=React__namespace.useCallback(()=>{d(null),b(!1)},[b]),S=React__namespace.useCallback((E,C)=>{const R=E.currentTarget,I={x:E.clientX,y:E.clientY},N=getExitSideFromRect(I,R.getBoundingClientRect()),O=getPaddedExitPoints(I,N),V=getPointsFromRect(C.getBoundingClientRect()),M=getHull([...O,...V]);d(M),b(!0)},[b]);return React__namespace.useEffect(()=>()=>_(),[_]),React__namespace.useEffect(()=>{if(f&&g){const E=R=>S(R,g),C=R=>S(R,f);return f.addEventListener("pointerleave",E),g.addEventListener("pointerleave",C),()=>{f.removeEventListener("pointerleave",E),g.removeEventListener("pointerleave",C)}}},[f,g,S,_]),React__namespace.useEffect(()=>{if(p){const E=C=>{const R=C.target,I={x:C.clientX,y:C.clientY},N=(f==null?void 0:f.contains(R))||(g==null?void 0:g.contains(R)),O=!isPointInPolygon(I,p);N?_():O&&(_(),m())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[f,g,p,m,_]),jsxRuntime.jsx(TooltipContentImpl,{...e,ref:u})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),Slottable=createSlottable("TooltipContent"),TooltipContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":l,onEscapeKeyDown:u,onPointerDownOutside:p,...d}=e,f=useTooltipContext(CONTENT_NAME$2,n),m=usePopperScope$1(n),{onClose:g}=f;return React__namespace.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,g),()=>document.removeEventListener(TOOLTIP_OPEN,g)),[g]),React__namespace.useEffect(()=>{if(f.trigger){const b=_=>{const S=_.target;S!=null&&S.contains(f.trigger)&&g()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[f.trigger,g]),jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:b=>b.preventDefault(),onDismiss:g,children:jsxRuntime.jsxs(Content$1,{"data-state":f.stateAttribute,...m,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[jsxRuntime.jsx(Slottable,{children:o}),jsxRuntime.jsx(VisuallyHiddenContentContextProvider,{scope:n,isInside:!0,children:jsxRuntime.jsx(Root$5,{id:f.contentId,role:"tooltip",children:l||o})})]})})});TooltipContent$1.displayName=CONTENT_NAME$2;var ARROW_NAME$1="TooltipArrow",TooltipArrow=React__namespace.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,l=usePopperScope$1(n);return useVisuallyHiddenContentContext(ARROW_NAME$1,n).isInside?null:jsxRuntime.jsx(Arrow,{...l,...o,ref:t})});TooltipArrow.displayName=ARROW_NAME$1;function getExitSideFromRect(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),l=Math.abs(t.right-e.x),u=Math.abs(t.left-e.x);switch(Math.min(n,o,l,u)){case u:return"left";case l:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function getPointsFromRect(e){const{top:t,right:n,bottom:o,left:l}=e;return[{x:l,y:t},{x:n,y:t},{x:n,y:o},{x:l,y:o}]}function isPointInPolygon(e,t){const{x:n,y:o}=e;let l=!1;for(let u=0,p=t.length-1;u<t.length;p=u++){const d=t[u],f=t[p],m=d.x,g=d.y,b=f.x,_=f.y;g>o!=_>o&&n<(b-m)*(o-g)/(_-g)+m&&(l=!l)}return l}function getHull(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),getHullPresorted(t)}function getHullPresorted(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const l=e[o];for(;t.length>=2;){const u=t[t.length-1],p=t[t.length-2];if((u.x-p.x)*(l.y-p.y)>=(u.y-p.y)*(l.x-p.x))t.pop();else break}t.push(l)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const l=e[o];for(;n.length>=2;){const u=n[n.length-1],p=n[n.length-2];if((u.x-p.x)*(l.y-p.y)>=(u.y-p.y)*(l.x-p.x))n.pop();else break}n.push(l)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Provider$1=TooltipProvider$1,Root3=Tooltip$2,Trigger$2=TooltipTrigger$1,Portal$1=TooltipPortal,Content2$1=TooltipContent$1;const TooltipProvider=Provider$1,Tooltip$1=Root3,TooltipTrigger=Trigger$2,TooltipContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},o)=>jsxRuntime.jsx(Portal$1,{children:jsxRuntime.jsx(Content2$1,{ref:o,sideOffset:t,className:cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));TooltipContent.displayName=Content2$1.displayName;const Input=React__namespace.forwardRef(({className:e,type:t,mask:n,onChange:o,placeholder:l,...u},p)=>{const[d,f]=React__namespace.useState(!1),m=React__namespace.useRef(null),b=l||(n==="phone"?"(999) 999-9999":n==="postal-code-ca"?"A9A 9A9":n==="zip-code-us"?"99999":""),_=()=>n==="phone"?"Only enter numbers. Formatting will be added automatically.":n==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":n==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",S=()=>{f(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{f(!1)},3e3)};React__namespace.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const E=C=>{if(n){const R=C.target.value;let I=R;if(R.length>0){const N=R[R.length-1];/[^a-zA-Z0-9]/.test(N)&&(console.log("Non-alphanumeric detected:",N),S())}if(n==="phone"){const N=R.replace(/\D/g,"");N.length<=3?I=N:N.length<=6?I=`(${N.slice(0,3)}) ${N.slice(3)}`:I=`(${N.slice(0,3)}) ${N.slice(3,6)}-${N.slice(6,10)}`}else if(n==="postal-code-ca"){const N=R.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let O="";for(let V=0;V<Math.min(N.length,6);V++){const M=N[V];V===0||V===2||V===4?/[A-Z]/.test(M)&&(O+=M):(V===1||V===3||V===5)&&/[0-9]/.test(M)&&(O+=M)}O.length<=3?I=O:I=`${O.slice(0,3)} ${O.slice(3,6)}`}else if(n==="zip-code-us"){const N=R.replace(/\D/g,"");N.length<=5?I=N:I=`${N.slice(0,5)}-${N.slice(5,9)}`}C.target.value=I}o==null||o(C)};return jsxRuntime.jsx(TooltipProvider,{children:jsxRuntime.jsxs(Tooltip$1,{open:d&&!!n,children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntime.jsx("input",{type:t,className:cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:E,placeholder:b,ref:p,...u})}),jsxRuntime.jsx(TooltipContent,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:_()})]})})});Input.displayName="Input";var NAME$1="Separator",DEFAULT_ORIENTATION="horizontal",ORIENTATIONS=["horizontal","vertical"],Separator$2=React__namespace.forwardRef((e,t)=>{const{decorative:n,orientation:o=DEFAULT_ORIENTATION,...l}=e,u=isValidOrientation(o)?o:DEFAULT_ORIENTATION,d=n?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return jsxRuntime.jsx(Primitive.div,{"data-orientation":u,...d,...l,ref:t})});Separator$2.displayName=NAME$1;function isValidOrientation(e){return ORIENTATIONS.includes(e)}var Root$4=Separator$2;const Separator$1=React__namespace.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...o},l)=>jsxRuntime.jsx(Root$4,{ref:l,decorative:n,orientation:t,className:cn("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Separator$1.displayName=Root$4.displayName;const Sheet=Root$8,SheetTrigger=Trigger$4,SheetClose=Close$1,SheetPortal=Portal$3,SheetOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{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",e),...t,ref:n}));SheetOverlay.displayName=Overlay.displayName;const sheetVariants=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),SheetContent=React__namespace.forwardRef(({side:e="right",className:t,children:n,...o},l)=>jsxRuntime.jsxs(SheetPortal,{children:[jsxRuntime.jsx(SheetOverlay,{}),jsxRuntime.jsxs(Content$2,{ref:l,className:cn(sheetVariants({side:e}),t),...o,children:[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-secondary",children:[jsxRuntime.jsx(X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));SheetContent.displayName=Content$2.displayName;const SheetHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});SheetHeader.displayName="SheetHeader";const SheetFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});SheetFooter.displayName="SheetFooter";const SheetTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold text-foreground",e),...t}));SheetTitle.displayName=Title$1.displayName;const SheetDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));SheetDescription.displayName=Description$1.displayName;function AvatarFooter({onClick:e,publicName:t,applicationName:n,partnerId:o}){const l=`https://api.randmar.io/v4/Partner/${o}/Account/Logo?height=72&width=72`,[u,p]=React.useState(!1),d=()=>{p(!0)};return jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:u?jsxRuntime.jsx(Button,{asChild:!0,size:"icon",onClick:e,children:jsxRuntime.jsx(TriangleAlert,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):jsxRuntime.jsx(Button,{asChild:!0,size:"icon",onClick:e,children:jsxRuntime.jsx("img",{src:l,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:d})})}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),jsxRuntime.jsx("span",{className:"text-xs text-neutral-400",children:n})]})]})}var NAME="Label",Label$3=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Primitive.label,{...e,ref:t,onMouseDown:n=>{var l;n.target.closest("button, input, select, textarea")||((l=e.onMouseDown)==null||l.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Label$3.displayName=NAME;var Root$3=Label$3;function Label$2({className:e,...t}){return jsxRuntime.jsx(Root$3,{"data-slot":"label",className:cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const MOBILE_BREAKPOINT=1024;function useIsMobile(){const[e,t]=React__namespace.useState(void 0);return React__namespace.useEffect(()=>{const n=window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT-1}px)`),o=()=>{t(window.innerWidth<MOBILE_BREAKPOINT)};return n.addEventListener("change",o),t(window.innerWidth<MOBILE_BREAKPOINT),()=>n.removeEventListener("change",o)},[]),!!e}function Skeleton({className:e,...t}){return jsxRuntime.jsx("div",{className:cn("animate-pulse rounded-md bg-primary/20",e),...t})}const SIDEBAR_COOKIE_NAME="sidebar:state",SIDEBAR_COOKIE_MAX_AGE=60*60*24*7,SIDEBAR_WIDTH="16rem",SIDEBAR_WIDTH_MOBILE="18rem",SIDEBAR_WIDTH_ICON="3rem",SIDEBAR_KEYBOARD_SHORTCUT="b",SidebarContext=React__namespace.createContext(null);function useSidebar(){const e=React__namespace.useContext(SidebarContext);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const SidebarProvider=React__namespace.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:o,style:l,children:u,...p},d)=>{const f=useIsMobile(),[m,g]=React__namespace.useState(!1),[b,_]=React__namespace.useState(e),S=t??b,E=React__namespace.useCallback(N=>{const O=typeof N=="function"?N(S):N;n?n(O):_(O),document.cookie=`${SIDEBAR_COOKIE_NAME}=${O}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`},[n,S]),C=React__namespace.useCallback(()=>f?g(N=>!N):E(N=>!N),[f,E,g]);React__namespace.useEffect(()=>{const N=O=>{O.key===SIDEBAR_KEYBOARD_SHORTCUT&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),C())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[C]);const R=S?"expanded":"collapsed",I=React__namespace.useMemo(()=>({state:R,open:S,setOpen:E,isMobile:f,openMobile:m,setOpenMobile:g,toggleSidebar:C}),[R,S,E,f,m,g,C]);return jsxRuntime.jsx(SidebarContext.Provider,{value:I,children:jsxRuntime.jsx(TooltipProvider,{delayDuration:0,children:jsxRuntime.jsx("div",{style:{"--sidebar-width":SIDEBAR_WIDTH,"--sidebar-width-icon":SIDEBAR_WIDTH_ICON,...l},className:cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",o),ref:d,...p,children:u})})})});SidebarProvider.displayName="SidebarProvider";const Sidebar=React__namespace.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:o,children:l,...u},p)=>{const{isMobile:d,state:f,openMobile:m,setOpenMobile:g}=useSidebar();return n==="none"?jsxRuntime.jsx("div",{className:cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",o),ref:p,...u,children:l}):d?jsxRuntime.jsx(Sheet,{open:m,onOpenChange:g,...u,children:jsxRuntime.jsx(SheetContent,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":SIDEBAR_WIDTH_MOBILE},side:e,children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:l})})}):jsxRuntime.jsxs("div",{ref:p,className:"group peer hidden md:block text-sidebar-foreground","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[jsxRuntime.jsx("div",{className:cn("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),jsxRuntime.jsx("div",{className:cn("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...u,children:jsxRuntime.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:l})})]})});Sidebar.displayName="Sidebar";const SidebarTrigger=React__namespace.forwardRef(({className:e,onClick:t,...n},o)=>{const{toggleSidebar:l}=useSidebar();return jsxRuntime.jsxs(Button,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:cn("h-7 w-7 text-sidebar-foreground",e),onClick:u=>{t==null||t(u),l()},...n,children:[jsxRuntime.jsx(PanelLeft,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});SidebarTrigger.displayName="SidebarTrigger";const SidebarRail=React__namespace.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:o}=useSidebar();return jsxRuntime.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:cn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});SidebarRail.displayName="SidebarRail";const SidebarInset=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("main",{ref:n,className:cn("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));SidebarInset.displayName="SidebarInset";const SidebarInput=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Input,{ref:n,"data-sidebar":"input",className:cn("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));SidebarInput.displayName="SidebarInput";const SidebarHeader=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"header",className:cn("flex flex-col gap-2 p-2",e),...t}));SidebarHeader.displayName="SidebarHeader";const SidebarFooter=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"footer",className:cn("flex flex-col gap-2 p-2",e),...t}));SidebarFooter.displayName="SidebarFooter";const SidebarSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator$1,{ref:n,"data-sidebar":"separator",className:cn("mx-2 w-auto bg-sidebar-border",e),...t}));SidebarSeparator.displayName="SidebarSeparator";const SidebarContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"content",className:cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));SidebarContent.displayName="SidebarContent";const SidebarGroup=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"group",className:cn("relative flex w-full min-w-0 flex-col p-2",e),...t}));SidebarGroup.displayName="SidebarGroup";const SidebarGroupLabel=React__namespace.forwardRef(({className:e,asChild:t=!1,...n},o)=>{const l=t?Slot$3:"div";return jsxRuntime.jsx(l,{ref:o,"data-sidebar":"group-label",className:cn("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});SidebarGroupLabel.displayName="SidebarGroupLabel";const SidebarGroupAction=React__namespace.forwardRef(({className:e,asChild:t=!1,...n},o)=>{const l=t?Slot$3:"button";return jsxRuntime.jsx(l,{ref:o,"data-sidebar":"group-action",className:cn("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})});SidebarGroupAction.displayName="SidebarGroupAction";const SidebarGroupContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"group-content",className:cn("w-full text-sm",e),...t}));SidebarGroupContent.displayName="SidebarGroupContent";const SidebarMenu=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-sidebar":"menu",className:cn("flex w-full min-w-0 flex-col gap-1",e),...t}));SidebarMenu.displayName="SidebarMenu";const SidebarMenuItem=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("li",{ref:n,"data-sidebar":"menu-item",className:cn("group/menu-item relative",e),...t}));SidebarMenuItem.displayName="SidebarMenuItem";const sidebarMenuButtonVariants=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),SidebarMenuButton=React__namespace.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:o="default",tooltip:l,className:u,...p},d)=>{const f=e?Slot$3:"button",{isMobile:m,state:g}=useSidebar(),b=jsxRuntime.jsx(f,{ref:d,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:cn(sidebarMenuButtonVariants({variant:n,size:o}),u),...p});return l?(typeof l=="string"&&(l={children:l}),jsxRuntime.jsxs(Tooltip$1,{children:[jsxRuntime.jsx(TooltipTrigger,{asChild:!0,children:b}),jsxRuntime.jsx(TooltipContent,{side:"right",align:"center",hidden:g!=="collapsed"||m,...l})]})):b});SidebarMenuButton.displayName="SidebarMenuButton";const SidebarMenuAction=React__namespace.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...o},l)=>{const u=t?Slot$3:"button";return jsxRuntime.jsx(u,{ref:l,"data-sidebar":"menu-action",className:cn("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o})});SidebarMenuAction.displayName="SidebarMenuAction";const SidebarMenuBadge=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:cn("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));SidebarMenuBadge.displayName="SidebarMenuBadge";const SidebarMenuSkeleton=React__namespace.forwardRef(({className:e,showIcon:t=!1,...n},o)=>{const l=React__namespace.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxRuntime.jsxs("div",{ref:o,"data-sidebar":"menu-skeleton",className:cn("rounded-md h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&jsxRuntime.jsx(Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),jsxRuntime.jsx(Skeleton,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":l}})]})});SidebarMenuSkeleton.displayName="SidebarMenuSkeleton";const SidebarMenuSub=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));SidebarMenuSub.displayName="SidebarMenuSub";const SidebarMenuSubItem=React__namespace.forwardRef(({...e},t)=>jsxRuntime.jsx("li",{ref:t,...e}));SidebarMenuSubItem.displayName="SidebarMenuSubItem";const SidebarMenuSubButton=React__namespace.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:o,...l},u)=>{const p=e?Slot$3:"a";return jsxRuntime.jsx(p,{ref:u,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...l})});SidebarMenuSubButton.displayName="SidebarMenuSubButton";var PROVIDER_NAME="ToastProvider",[Collection$1,useCollection$1,createCollectionScope$1]=createCollection("Toast"),[createToastContext,createToastScope]=createContextScope("Toast",[createCollectionScope$1]),[ToastProviderProvider,useToastProviderContext]=createToastContext(PROVIDER_NAME),ToastProvider$1=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:l="right",swipeThreshold:u=50,children:p}=e,[d,f]=React__namespace.useState(null),[m,g]=React__namespace.useState(0),b=React__namespace.useRef(!1),_=React__namespace.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`),jsxRuntime.jsx(Collection$1.Provider,{scope:t,children:jsxRuntime.jsx(ToastProviderProvider,{scope:t,label:n,duration:o,swipeDirection:l,swipeThreshold:u,toastCount:m,viewport:d,onViewportChange:f,onToastAdd:React__namespace.useCallback(()=>g(S=>S+1),[]),onToastRemove:React__namespace.useCallback(()=>g(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:b,isClosePausedRef:_,children:p})})};ToastProvider$1.displayName=PROVIDER_NAME;var VIEWPORT_NAME$2="ToastViewport",VIEWPORT_DEFAULT_HOTKEY=["F8"],VIEWPORT_PAUSE="toast.viewportPause",VIEWPORT_RESUME="toast.viewportResume",ToastViewport$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=VIEWPORT_DEFAULT_HOTKEY,label:l="Notifications ({hotkey})",...u}=e,p=useToastProviderContext(VIEWPORT_NAME$2,n),d=useCollection$1(n),f=React__namespace.useRef(null),m=React__namespace.useRef(null),g=React__namespace.useRef(null),b=React__namespace.useRef(null),_=useComposedRefs(t,b,p.onViewportChange),S=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=p.toastCount>0;React__namespace.useEffect(()=>{const R=I=>{var O;o.length!==0&&o.every(V=>I[V]||I.code===V)&&((O=b.current)==null||O.focus())};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[o]),React__namespace.useEffect(()=>{const R=f.current,I=b.current;if(E&&R&&I){const N=()=>{if(!p.isClosePausedRef.current){const A=new CustomEvent(VIEWPORT_PAUSE);I.dispatchEvent(A),p.isClosePausedRef.current=!0}},O=()=>{if(p.isClosePausedRef.current){const A=new CustomEvent(VIEWPORT_RESUME);I.dispatchEvent(A),p.isClosePausedRef.current=!1}},V=A=>{!R.contains(A.relatedTarget)&&O()},M=()=>{R.contains(document.activeElement)||O()};return R.addEventListener("focusin",N),R.addEventListener("focusout",V),R.addEventListener("pointermove",N),R.addEventListener("pointerleave",M),window.addEventListener("blur",N),window.addEventListener("focus",O),()=>{R.removeEventListener("focusin",N),R.removeEventListener("focusout",V),R.removeEventListener("pointermove",N),R.removeEventListener("pointerleave",M),window.removeEventListener("blur",N),window.removeEventListener("focus",O)}}},[E,p.isClosePausedRef]);const C=React__namespace.useCallback(({tabbingDirection:R})=>{const N=d().map(O=>{const V=O.ref.current,M=[V,...getTabbableCandidates(V)];return R==="forwards"?M:M.reverse()});return(R==="forwards"?N.reverse():N).flat()},[d]);return React__namespace.useEffect(()=>{const R=b.current;if(R){const I=N=>{var M,A,j;const O=N.altKey||N.ctrlKey||N.metaKey;if(N.key==="Tab"&&!O){const B=document.activeElement,L=N.shiftKey;if(N.target===R&&L){(M=m.current)==null||M.focus();return}const H=C({tabbingDirection:L?"backwards":"forwards"}),U=H.findIndex(G=>G===B);focusFirst(H.slice(U+1))?N.preventDefault():L?(A=m.current)==null||A.focus():(j=g.current)==null||j.focus()}};return R.addEventListener("keydown",I),()=>R.removeEventListener("keydown",I)}},[d,C]),jsxRuntime.jsxs(Branch,{ref:f,role:"region","aria-label":l.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&jsxRuntime.jsx(FocusProxy,{ref:m,onFocusFromOutsideViewport:()=>{const R=C({tabbingDirection:"forwards"});focusFirst(R)}}),jsxRuntime.jsx(Collection$1.Slot,{scope:n,children:jsxRuntime.jsx(Primitive.ol,{tabIndex:-1,...u,ref:_})}),E&&jsxRuntime.jsx(FocusProxy,{ref:g,onFocusFromOutsideViewport:()=>{const R=C({tabbingDirection:"backwards"});focusFirst(R)}})]})});ToastViewport$1.displayName=VIEWPORT_NAME$2;var FOCUS_PROXY_NAME="ToastFocusProxy",FocusProxy=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...l}=e,u=useToastProviderContext(FOCUS_PROXY_NAME,n);return jsxRuntime.jsx(VisuallyHidden,{"aria-hidden":!0,tabIndex:0,...l,ref:t,style:{position:"fixed"},onFocus:p=>{var m;const d=p.relatedTarget;!((m=u.viewport)!=null&&m.contains(d))&&o()}})});FocusProxy.displayName=FOCUS_PROXY_NAME;var TOAST_NAME="Toast",TOAST_SWIPE_START="toast.swipeStart",TOAST_SWIPE_MOVE="toast.swipeMove",TOAST_SWIPE_CANCEL="toast.swipeCancel",TOAST_SWIPE_END="toast.swipeEnd",Toast$1=React__namespace.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:l,onOpenChange:u,...p}=e,[d,f]=useControllableState({prop:o,defaultProp:l??!0,onChange:u,caller:TOAST_NAME});return jsxRuntime.jsx(Presence,{present:n||d,children:jsxRuntime.jsx(ToastImpl,{open:d,...p,ref:t,onClose:()=>f(!1),onPause:useCallbackRef$1(e.onPause),onResume:useCallbackRef$1(e.onResume),onSwipeStart:composeEventHandlers(e.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:composeEventHandlers(e.onSwipeMove,m=>{const{x:g,y:b}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${b}px`)}),onSwipeCancel:composeEventHandlers(e.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:composeEventHandlers(e.onSwipeEnd,m=>{const{x:g,y:b}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${b}px`),f(!1)})})})});Toast$1.displayName=TOAST_NAME;var[ToastInteractiveProvider,useToastInteractiveContext]=createToastContext(TOAST_NAME,{onClose(){}}),ToastImpl=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:l,open:u,onClose:p,onEscapeKeyDown:d,onPause:f,onResume:m,onSwipeStart:g,onSwipeMove:b,onSwipeCancel:_,onSwipeEnd:S,...E}=e,C=useToastProviderContext(TOAST_NAME,n),[R,I]=React__namespace.useState(null),N=useComposedRefs(t,G=>I(G)),O=React__namespace.useRef(null),V=React__namespace.useRef(null),M=l||C.duration,A=React__namespace.useRef(0),j=React__namespace.useRef(M),B=React__namespace.useRef(0),{onToastAdd:L,onToastRemove:q}=C,F=useCallbackRef$1(()=>{var J;(R==null?void 0:R.contains(document.activeElement))&&((J=C.viewport)==null||J.focus()),p()}),H=React__namespace.useCallback(G=>{!G||G===1/0||(window.clearTimeout(B.current),A.current=new Date().getTime(),B.current=window.setTimeout(F,G))},[F]);React__namespace.useEffect(()=>{const G=C.viewport;if(G){const J=()=>{H(j.current),m==null||m()},Z=()=>{const ae=new Date().getTime()-A.current;j.current=j.current-ae,window.clearTimeout(B.current),f==null||f()};return G.addEventListener(VIEWPORT_PAUSE,Z),G.addEventListener(VIEWPORT_RESUME,J),()=>{G.removeEventListener(VIEWPORT_PAUSE,Z),G.removeEventListener(VIEWPORT_RESUME,J)}}},[C.viewport,M,f,m,H]),React__namespace.useEffect(()=>{u&&!C.isClosePausedRef.current&&H(M)},[u,M,C.isClosePausedRef,H]),React__namespace.useEffect(()=>(L(),()=>q()),[L,q]);const U=React__namespace.useMemo(()=>R?getAnnounceTextContent(R):null,[R]);return C.viewport?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[U&&jsxRuntime.jsx(ToastAnnounce,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite","aria-atomic":!0,children:U}),jsxRuntime.jsx(ToastInteractiveProvider,{scope:n,onClose:F,children:ReactDOM__namespace.createPortal(jsxRuntime.jsx(Collection$1.ItemSlot,{scope:n,children:jsxRuntime.jsx(Root$9,{asChild:!0,onEscapeKeyDown:composeEventHandlers(d,()=>{C.isFocusedToastEscapeKeyDownRef.current||F(),C.isFocusedToastEscapeKeyDownRef.current=!1}),children:jsxRuntime.jsx(Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":C.swipeDirection,...E,ref:N,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:composeEventHandlers(e.onKeyDown,G=>{G.key==="Escape"&&(d==null||d(G.nativeEvent),G.nativeEvent.defaultPrevented||(C.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:composeEventHandlers(e.onPointerDown,G=>{G.button===0&&(O.current={x:G.clientX,y:G.clientY})}),onPointerMove:composeEventHandlers(e.onPointerMove,G=>{if(!O.current)return;const J=G.clientX-O.current.x,Z=G.clientY-O.current.y,ae=!!V.current,W=["left","right"].includes(C.swipeDirection),Q=["left","up"].includes(C.swipeDirection)?Math.min:Math.max,ee=W?Q(0,J):0,ie=W?0:Q(0,Z),ce=G.pointerType==="touch"?10:2,ue={x:ee,y:ie},fe={originalEvent:G,delta:ue};ae?(V.current=ue,handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE,b,fe,{discrete:!1})):isDeltaInDirection(ue,C.swipeDirection,ce)?(V.current=ue,handleAndDispatchCustomEvent(TOAST_SWIPE_START,g,fe,{discrete:!1}),G.target.setPointerCapture(G.pointerId)):(Math.abs(J)>ce||Math.abs(Z)>ce)&&(O.current=null)}),onPointerUp:composeEventHandlers(e.onPointerUp,G=>{const J=V.current,Z=G.target;if(Z.hasPointerCapture(G.pointerId)&&Z.releasePointerCapture(G.pointerId),V.current=null,O.current=null,J){const ae=G.currentTarget,W={originalEvent:G,delta:J};isDeltaInDirection(J,C.swipeDirection,C.swipeThreshold)?handleAndDispatchCustomEvent(TOAST_SWIPE_END,S,W,{discrete:!0}):handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL,_,W,{discrete:!0}),ae.addEventListener("click",Q=>Q.preventDefault(),{once:!0})}})})})}),C.viewport)})]}):null}),ToastAnnounce=e=>{const{__scopeToast:t,children:n,...o}=e,l=useToastProviderContext(TOAST_NAME,t),[u,p]=React__namespace.useState(!1),[d,f]=React__namespace.useState(!1);return useNextFrame(()=>p(!0)),React__namespace.useEffect(()=>{const m=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(m)},[]),d?null:jsxRuntime.jsx(Portal$4,{asChild:!0,children:jsxRuntime.jsx(VisuallyHidden,{...o,children:u&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l.label," ",n]})})})},TITLE_NAME="ToastTitle",ToastTitle$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{...o,ref:t})});ToastTitle$1.displayName=TITLE_NAME;var DESCRIPTION_NAME="ToastDescription",ToastDescription$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return jsxRuntime.jsx(Primitive.div,{...o,ref:t})});ToastDescription$1.displayName=DESCRIPTION_NAME;var ACTION_NAME="ToastAction",ToastAction$1=React__namespace.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?jsxRuntime.jsx(ToastAnnounceExclude,{altText:n,asChild:!0,children:jsxRuntime.jsx(ToastClose$1,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.`),null)});ToastAction$1.displayName=ACTION_NAME;var CLOSE_NAME="ToastClose",ToastClose$1=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,l=useToastInteractiveContext(CLOSE_NAME,n);return jsxRuntime.jsx(ToastAnnounceExclude,{asChild:!0,children:jsxRuntime.jsx(Primitive.button,{type:"button",...o,ref:t,onClick:composeEventHandlers(e.onClick,l.onClose)})})});ToastClose$1.displayName=CLOSE_NAME;var ToastAnnounceExclude=React__namespace.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...l}=e;return jsxRuntime.jsx(Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...l,ref:t})});function getAnnounceTextContent(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),isHTMLElement(o)){const l=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!l)if(u){const p=o.dataset.radixToastAnnounceAlt;p&&t.push(p)}else t.push(...getAnnounceTextContent(o))}}),t}function handleAndDispatchCustomEvent(e,t,n,{discrete:o}){const l=n.originalEvent.currentTarget,u=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&l.addEventListener(e,t,{once:!0}),o?dispatchDiscreteCustomEvent(l,u):l.dispatchEvent(u)}var isDeltaInDirection=(e,t,n=0)=>{const o=Math.abs(e.x),l=Math.abs(e.y),u=o>l;return t==="left"||t==="right"?u&&o>n:!u&&l>n};function useNextFrame(e=()=>{}){const t=useCallbackRef$1(e);useLayoutEffect2(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function isHTMLElement(e){return e.nodeType===e.ELEMENT_NODE}function getTabbableCandidates(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function focusFirst(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Provider=ToastProvider$1,Viewport$2=ToastViewport$1,Root2$2=Toast$1,Title=ToastTitle$1,Description=ToastDescription$1,Action=ToastAction$1,Close=ToastClose$1;const ToastProvider=Provider,ToastViewport=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Viewport$2,{ref:n,className:cn("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));ToastViewport.displayName=Viewport$2.displayName;const toastVariants=cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),Toast=React__namespace.forwardRef(({className:e,variant:t,...n},o)=>jsxRuntime.jsx(Root2$2,{ref:o,className:cn(toastVariants({variant:t}),e),...n}));Toast.displayName=Root2$2.displayName;const ToastAction=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Action,{ref:n,className:cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));ToastAction.displayName=Action.displayName;const ToastClose=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Close,{ref:n,className:cn("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:jsxRuntime.jsx(X,{className:"h-4 w-4"})}));ToastClose.displayName=Close.displayName;const ToastTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title,{ref:n,className:cn("text-sm font-semibold [&+div]:text-xs",e),...t}));ToastTitle.displayName=Title.displayName;const ToastDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description,{ref:n,className:cn("text-sm opacity-90",e),...t}));ToastDescription.displayName=Description.displayName;const TOAST_LIMIT=1,TOAST_REMOVE_DELAY=1e6;let count=0;function genId(){return count=(count+1)%Number.MAX_SAFE_INTEGER,count.toString()}const toastTimeouts=new Map,addToRemoveQueue=e=>{if(toastTimeouts.has(e))return;const t=setTimeout(()=>{toastTimeouts.delete(e),dispatch({type:"REMOVE_TOAST",toastId:e})},TOAST_REMOVE_DELAY);toastTimeouts.set(e,t)},reducer=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,TOAST_LIMIT)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?addToRemoveQueue(n):e.toasts.forEach(o=>addToRemoveQueue(o.id)),{...e,toasts:e.toasts.map(o=>o.id===n||n===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(n=>n.id!==t.toastId):[]}}},listeners=[];let memoryState={toasts:[]};function dispatch(e){memoryState=reducer(memoryState,e),listeners.forEach(t=>t(memoryState))}function toast({...e}){const t=genId(),n=l=>dispatch({type:"UPDATE_TOAST",toast:{...l,id:t}}),o=()=>dispatch({type:"DISMISS_TOAST",toastId:t});return dispatch({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||o()}}}),{id:t,dismiss:o,update:n}}function useToast(){const[e,t]=React__namespace.useState(memoryState);return React__namespace.useEffect(()=>(listeners.push(t),()=>{const n=listeners.indexOf(t);n>-1&&listeners.splice(n,1)}),[]),{...e,toast,dismiss:n=>dispatch({type:"DISMISS_TOAST",toastId:n})}}function Toaster(){const{toasts:e}=useToast();return jsxRuntime.jsxs(ToastProvider,{children:[e.map(function({id:t,title:n,description:o,action:l,...u}){return jsxRuntime.jsxs(Toast,{...u,children:[jsxRuntime.jsxs("div",{className:"grid gap-1",children:[n&&jsxRuntime.jsx(ToastTitle,{children:n}),o&&jsxRuntime.jsx(ToastDescription,{children:o})]}),l,jsxRuntime.jsx(ToastClose,{})]},t)}),jsxRuntime.jsx(ToastViewport,{})]})}const ApiKeyContext=React.createContext(void 0),ApiKeyProvider=({apiKey:e=null,children:t})=>jsxRuntime.jsx(ApiKeyContext.Provider,{value:{apiKey:e},children:t}),useApiKey=()=>{const e=React.useContext(ApiKeyContext);if(!e)throw new Error("useApiKey must be used within an ApiKeyProvider");return e};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var isArray_1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e,isArray_1}var _freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return _root=n,_root}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,n=t.hasOwnProperty,o=t.toString,l=e?e.toStringTag:void 0;function u(p){var d=n.call(p,l),f=p[l];try{p[l]=void 0;var m=!0}catch{}var g=o.call(p);return m&&(d?p[l]=f:delete p[l]),g}return _getRawTag=u,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function n(o){return t.call(o)}return _objectToString=n,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),n=require_objectToString(),o="[object Null]",l="[object Undefined]",u=e?e.toStringTag:void 0;function p(d){return d==null?d===void 0?l:o:u&&u in Object(d)?t(d):n(d)}return _baseGetTag=p,_baseGetTag}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),n="[object Symbol]";function o(l){return typeof l=="symbol"||t(l)&&e(l)==n}return isSymbol_1=o,isSymbol_1}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;function l(u,p){if(e(u))return!1;var d=typeof u;return d=="number"||d=="symbol"||d=="boolean"||u==null||t(u)?!0:o.test(u)||!n.test(u)||p!=null&&u in Object(p)}return _isKey=l,_isKey}var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return isObject_1=e,isObject_1}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),n="[object AsyncFunction]",o="[object Function]",l="[object GeneratorFunction]",u="[object Proxy]";function p(d){if(!t(d))return!1;var f=e(d);return f==o||f==l||f==n||f==u}return isFunction_1=p,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var o=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function n(o){return!!t&&t in o}return _isMasked=n,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function n(o){if(o!=null){try{return t.call(o)}catch{}try{return o+""}catch{}}return""}return _toSource=n,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),n=requireIsObject(),o=require_toSource(),l=/[\\^$.*+?()[\]{}|]/g,u=/^\[object .+?Constructor\]$/,p=Function.prototype,d=Object.prototype,f=p.toString,m=d.hasOwnProperty,g=RegExp("^"+f.call(m).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function b(_){if(!n(_)||t(_))return!1;var S=e(_)?g:u;return S.test(o(_))}return _baseIsNative=b,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,n){return t==null?void 0:t[n]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function n(o,l){var u=t(o,l);return e(u)?u:void 0}return _getNative=n,_getNative}var _nativeCreate,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative(),t=e(Object,"create");return _nativeCreate=t,_nativeCreate}var _hashClear,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear=t,_hashClear}var _hashDelete,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;hasRequired_hashDelete=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return _hashDelete=e,_hashDelete}var _hashGet,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",n=Object.prototype,o=n.hasOwnProperty;function l(u){var p=this.__data__;if(e){var d=p[u];return d===t?void 0:d}return o.call(p,u)?p[u]:void 0}return _hashGet=l,_hashGet}var _hashHas,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,n=t.hasOwnProperty;function o(l){var u=this.__data__;return e?u[l]!==void 0:n.call(u,l)}return _hashHas=o,_hashHas}var _hashSet,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function n(o,l){var u=this.__data__;return this.size+=this.has(o)?0:1,u[o]=e&&l===void 0?t:l,this}return _hashSet=n,_hashSet}var _Hash,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),n=require_hashGet(),o=require_hashHas(),l=require_hashSet();function u(p){var d=-1,f=p==null?0:p.length;for(this.clear();++d<f;){var m=p[d];this.set(m[0],m[1])}}return u.prototype.clear=e,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=o,u.prototype.set=l,_Hash=u,_Hash}var _listCacheClear,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear=e,_listCacheClear}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,n){return t===n||t!==t&&n!==n}return eq_1=e,eq_1}var _assocIndexOf,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();function t(n,o){for(var l=n.length;l--;)if(e(n[l][0],o))return l;return-1}return _assocIndexOf=t,_assocIndexOf}var _listCacheDelete,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,n=t.splice;function o(l){var u=this.__data__,p=e(u,l);if(p<0)return!1;var d=u.length-1;return p==d?u.pop():n.call(u,p,1),--this.size,!0}return _listCacheDelete=o,_listCacheDelete}var _listCacheGet,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(n){var o=this.__data__,l=e(o,n);return l<0?void 0:o[l][1]}return _listCacheGet=t,_listCacheGet}var _listCacheHas,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(n){return e(this.__data__,n)>-1}return _listCacheHas=t,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(n,o){var l=this.__data__,u=e(l,n);return u<0?(++this.size,l.push([n,o])):l[u][1]=o,this}return _listCacheSet=t,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),n=require_listCacheGet(),o=require_listCacheHas(),l=require_listCacheSet();function u(p){var d=-1,f=p==null?0:p.length;for(this.clear();++d<f;){var m=p[d];this.set(m[0],m[1])}}return u.prototype.clear=e,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=o,u.prototype.set=l,_ListCache=u,_ListCache}var _Map,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative(),t=require_root(),n=e(t,"Map");return _Map=n,_Map}var _mapCacheClear,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),n=require_Map();function o(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return _mapCacheClear=o,_mapCacheClear}var _isKeyable,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;hasRequired_isKeyable=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return _isKeyable=e,_isKeyable}var _getMapData,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();function t(n,o){var l=n.__data__;return e(o)?l[typeof o=="string"?"string":"hash"]:l.map}return _getMapData=t,_getMapData}var _mapCacheDelete,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(n){var o=e(this,n).delete(n);return this.size-=o?1:0,o}return _mapCacheDelete=t,_mapCacheDelete}var _mapCacheGet,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(n){return e(this,n).get(n)}return _mapCacheGet=t,_mapCacheGet}var _mapCacheHas,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(n){return e(this,n).has(n)}return _mapCacheHas=t,_mapCacheHas}var _mapCacheSet,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(n,o){var l=e(this,n),u=l.size;return l.set(n,o),this.size+=l.size==u?0:1,this}return _mapCacheSet=t,_mapCacheSet}var _MapCache,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),n=require_mapCacheGet(),o=require_mapCacheHas(),l=require_mapCacheSet();function u(p){var d=-1,f=p==null?0:p.length;for(this.clear();++d<f;){var m=p[d];this.set(m[0],m[1])}}return u.prototype.clear=e,u.prototype.delete=t,u.prototype.get=n,u.prototype.has=o,u.prototype.set=l,_MapCache=u,_MapCache}var memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function n(o,l){if(typeof o!="function"||l!=null&&typeof l!="function")throw new TypeError(t);var u=function(){var p=arguments,d=l?l.apply(this,p):p[0],f=u.cache;if(f.has(d))return f.get(d);var m=o.apply(this,p);return u.cache=f.set(d,m)||f,m};return u.cache=new(n.Cache||e),u}return n.Cache=e,memoize_1=n,memoize_1}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=requireMemoize(),t=500;function n(o){var l=e(o,function(p){return u.size===t&&u.clear(),p}),u=l.cache;return l}return _memoizeCapped=n,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,o=e(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(t,function(p,d,f,m){u.push(f?m.replace(n,"$1"):d||p)}),u});return _stringToPath=o,_stringToPath}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,n){for(var o=-1,l=t==null?0:t.length,u=Array(l);++o<l;)u[o]=n(t[o],o,t);return u}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),n=requireIsArray(),o=requireIsSymbol(),l=e?e.prototype:void 0,u=l?l.toString:void 0;function p(d){if(typeof d=="string")return d;if(n(d))return t(d,p)+"";if(o(d))return u?u.call(d):"";var f=d+"";return f=="0"&&1/d==-1/0?"-0":f}return _baseToString=p,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(n){return n==null?"":e(n)}return toString_1=t,toString_1}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),n=require_stringToPath(),o=requireToString();function l(u,p){return e(u)?u:t(u,p)?[u]:n(o(u))}return _castPath=l,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol();function t(n){if(typeof n=="string"||e(n))return n;var o=n+"";return o=="0"&&1/n==-1/0?"-0":o}return _toKey=t,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function n(o,l){l=e(l,o);for(var u=0,p=l.length;o!=null&&u<p;)o=o[t(l[u++])];return u&&u==p?o:void 0}return _baseGet=n,_baseGet}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet();function t(n,o,l){var u=n==null?void 0:e(n,o);return u===void 0?l:u}return get_1=t,get_1}var getExports=requireGet();const get$1=getDefaultExportFromCjs(getExports);var isNil_1,hasRequiredIsNil;function requireIsNil(){if(hasRequiredIsNil)return isNil_1;hasRequiredIsNil=1;function e(t){return t==null}return isNil_1=e,isNil_1}var isNilExports=requireIsNil();const isNil=getDefaultExportFromCjs(isNilExports);var isString_1,hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag(),t=requireIsArray(),n=requireIsObjectLike(),o="[object String]";function l(u){return typeof u=="string"||!t(u)&&n(u)&&e(u)==o}return isString_1=l,isString_1}var isStringExports=requireIsString();const isString=getDefaultExportFromCjs(isStringExports);var isFunctionExports=requireIsFunction();const isFunction$1=getDefaultExportFromCjs(isFunctionExports);var isObjectExports=requireIsObject();const isObject=getDefaultExportFromCjs(isObjectExports);var reactIs$1={exports:{}},reactIs_production_min$1={};/**
300
300
  * @license React
301
301
  * react-is.production.min.js
302
302
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "randmarcomps",
3
3
  "private": false,
4
- "version": "1.154.0",
4
+ "version": "1.155.0",
5
5
  "description": "The UI library enabling speed and consistency in Randmar frontends.",
6
6
  "type": "module",
7
7
  "files": [