globalfy-design-system 0.54.0 → 0.55.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.
|
@@ -69,7 +69,7 @@ Check the top-level render call using <`+_+">.")}return k}}function xo(v,k){{if(
|
|
|
69
69
|
body {
|
|
70
70
|
`).concat(O5,": ").concat(i,`px;
|
|
71
71
|
}
|
|
72
|
-
`)},Z5=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,a=G.useMemo(function(){return q5(o)},[o]);return G.createElement(Q5,{styles:X5(a,!t,o,r?"":"!important")})};const xp=new WeakMap;function wa(e,t,r){return typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${xp.get(e)}-${r}-${t}`}function J5(e,t,r){var n;let{key:o,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:i,selectedKey:l}=t,c=o===l,u=a||t.isDisabled||t.disabledKeys.has(o),{itemProps:d,isPressed:h}=Zm({selectionManager:i,key:o,ref:r,isDisabled:u,shouldSelectOnPressUp:s,linkBehavior:"selection"}),p=wa(t,o,"tab"),m=wa(t,o,"tabpanel"),{tabIndex:b}=d,y=t.collection.getItem(o),C=Vr(y==null?void 0:y.props,{isLink:!!(!(y==null||(n=y.props)===null||n===void 0)&&n.href),labelable:!0});return delete C.id,{tabProps:se(C,d,{id:p,"aria-selected":c,"aria-disabled":u||void 0,"aria-controls":c?m:void 0,tabIndex:u?void 0:b,role:"tab"}),isSelected:c,isDisabled:u,isPressed:h}}function e4(e,t,r){let n=Mm(r)?void 0:0;var o;const a=wa(t,(o=e.id)!==null&&o!==void 0?o:t==null?void 0:t.selectedKey,"tabpanel"),s=us({...e,id:a,"aria-labelledby":wa(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:se(s,{tabIndex:n,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class t4{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}getKeyAbove(t){return this.getPreviousKey(t)}getKeyBelow(t){return this.getNextKey(t)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.disabledKeys.has(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.disabledKeys.has(t)&&(t=this.getPreviousKey(t)),t}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.disabledKeys.has(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.disabledKeys.has(t));return t}constructor(t,r,n,o=new Set){this.collection=t,this.flipDirection=r==="rtl"&&n==="horizontal",this.disabledKeys=o}}function r4(e,t,r){let{orientation:n="horizontal",keyboardActivation:o="automatic"}=e,{collection:a,selectionManager:s,disabledKeys:i}=t,{direction:l}=ms(),c=f.useMemo(()=>new t4(a,l,n,i),[a,i,n,l]),{collectionProps:u}=Xm({ref:r,selectionManager:s,keyboardDelegate:c,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),d=Fr();xp.set(t,d);let h=us({...e,id:d});return{tabListProps:{...se(u,h),role:"tablist","aria-orientation":n,tabIndex:void 0}}}var wp=vt((e,t)=>{var r,n,o;const{as:a,state:s,className:i,slots:l,classNames:c,...u}=e,d=a||"div",h=nt(t),{tabPanelProps:p}=e4(e,s,h),{focusProps:m,isFocused:b,isFocusVisible:y}=Mt(),C=s.selectedItem,x=(r=C==null?void 0:C.props)==null?void 0:r.children,P=he(c==null?void 0:c.panel,i,(n=C==null?void 0:C.props)==null?void 0:n.className);return x?j.jsx(d,{ref:h,"data-focus":b,"data-focus-visible":y,...se(p,m,u),className:(o=l.panel)==null?void 0:o.call(l,{class:P}),"data-slot":"panel",children:x}):null});wp.displayName="NextUI.TabPanel";var n4=wp,Cp=vt((e,t)=>{var r;const{className:n,as:o,item:a,state:s,classNames:i,isDisabled:l,listRef:c,slots:u,motionProps:d,disableAnimation:h,disableCursorAnimation:p,shouldSelectOnPressUp:m,onClick:b,...y}=e,{key:C}=a,x=nt(t),P=o||(e.href?"a":"button"),S=typeof P=="string",{tabProps:E,isSelected:N,isDisabled:L,isPressed:g}=J5({key:C,isDisabled:l,shouldSelectOnPressUp:m},s,x),A=l||L,{focusProps:I,isFocused:T,isFocusVisible:D}=Mt(),{hoverProps:w,isHovered:M}=mr({isDisabled:A}),O=he(i==null?void 0:i.tab,n),[,F]=D5({rerender:!0}),$=()=>{dr(b,E.onClick),!(!(x!=null&&x.current)||!(c!=null&&c.current))&&h5(x.current,{scrollMode:"if-needed",behavior:"smooth",block:"end",inline:"end",boundary:c==null?void 0:c.current})};return j.jsxs(P,{ref:x,"data-disabled":Q(L),"data-focus":Q(T),"data-focus-visible":Q(D),"data-hover":Q(M),"data-hover-unselected":Q((M||g)&&!N),"data-pressed":Q(g),"data-selected":Q(N),"data-slot":"tab",...se(E,A?{}:{...I,...w},En(y,{enabled:S,omitPropNames:new Set(["title"])})),className:(r=u.tab)==null?void 0:r.call(u,{class:O}),title:y==null?void 0:y.titleValue,type:P==="button"?"button":void 0,onClick:$,children:[N&&!h&&!p&&F?j.jsx(Bf.span,{className:u.cursor({class:i==null?void 0:i.cursor}),"data-slot":"cursor",layoutDependency:!1,layoutId:"cursor",transition:{type:"spring",bounce:.15,duration:.5},...d}):null,j.jsx("div",{className:u.tabContent({class:i==null?void 0:i.tabContent}),"data-slot":"tabContent",children:a.rendered})]})});Cp.displayName="NextUI.Tab";var o4=Cp;class Pp{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);return r?r.prevKey:null}getKeyAfter(t){let r=this.keyMap.get(t);return r?r.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){let r=this.keyMap.get(t);return(r==null?void 0:r.childNodes)||[]}constructor(t){this.keyMap=new Map,this.iterable=t;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let s of a.childNodes)r(s)};for(let a of t)r(a);let n,o=0;for(let[a,s]of this.keyMap)n?(n.nextKey=a,s.prevKey=n.key):(this.firstKey=a,s.prevKey=void 0),s.type==="item"&&(s.index=o++),n=s,n.nextKey=void 0;this.lastKey=n==null?void 0:n.key}}function a4(e){let{filter:t}=e,r=Oy(e),n=f.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=f.useCallback(c=>t?new Pp(t(c)):new Pp(c),[t]),a=f.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),s=$y(e,o,a),i=f.useMemo(()=>new Ny(s,r),[s,r]);const l=f.useRef(null);return f.useEffect(()=>{if(r.focusedKey!=null&&!s.getItem(r.focusedKey)){const c=l.current.getItem(r.focusedKey),u=[...l.current.getKeys()].map(b=>{const y=l.current.getItem(b);return y.type==="item"?y:null}).filter(b=>b!==null),d=[...s.getKeys()].map(b=>{const y=s.getItem(b);return y.type==="item"?y:null}).filter(b=>b!==null),h=u.length-d.length;let p=Math.min(h>1?Math.max(c.index-h+1,0):c.index,d.length-1),m;for(;p>=0;){if(!i.isDisabled(d[p].key)){m=d[p];break}p<d.length-1?p++:(p>c.index&&(p=c.index),p--)}r.setFocusedKey(m?m.key:null)}l.current=s},[s,i,r,r.focusedKey]),{collection:s,disabledKeys:n,selectionManager:i}}function s4(e){var t;let[r,n]=_r(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),o=f.useMemo(()=>r!=null?[r]:[],[r]),{collection:a,disabledKeys:s,selectionManager:i}=a4({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:c=>{var u;let d=(u=c.values().next().value)!==null&&u!==void 0?u:null;d===r&&e.onSelectionChange&&e.onSelectionChange(d),n(d)}}),l=r!=null?a.getItem(r):null;return{collection:a,disabledKeys:s,selectionManager:i,selectedKey:r,setSelectedKey:n,selectedItem:l}}function i4(e){var t;let r=s4({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:Mp(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:n,collection:o,selectedKey:a}=r,s=f.useRef(a);return f.useEffect(()=>{let i=a;(n.isEmpty||!o.getItem(i))&&(i=Mp(o,r.disabledKeys),i!=null&&n.setSelectedKeys([i])),(i!=null&&n.focusedKey==null||!n.isFocused&&i!==s.current)&&n.setFocusedKey(i),s.current=i}),{...r,isDisabled:e.isDisabled||!1}}function Mp(e,t){let r=null;if(e){for(r=e.getFirstKey();t.has(r)&&r!==e.getLastKey();)r=e.getKeyAfter(r);t.has(r)&&r===e.getLastKey()&&(r=e.getFirstKey())}return r}function l4(e){const[t,r]=Tn(e,Zc.variantKeys),{ref:n,as:o,className:a,classNames:s,children:i,disableCursorAnimation:l,shouldSelectOnPressUp:c=!0,motionProps:u,...d}=t,h=o||"div",p=typeof h=="string",m=nt(n),b=i4({children:i,...d}),{tabListProps:y}=r4(d,b,m),C=f.useMemo(()=>Zc({...r,className:a}),[...Object.values(r),a]),x=he(s==null?void 0:s.base,a),P=f.useMemo(()=>({state:b,slots:C,classNames:s,motionProps:u,listRef:m,shouldSelectOnPressUp:c,disableCursorAnimation:l,isDisabled:e==null?void 0:e.isDisabled,disableAnimation:e==null?void 0:e.disableAnimation}),[b,C,m,u,l,c,e==null?void 0:e.disableAnimation,e==null?void 0:e.isDisabled,s]),S=f.useCallback(N=>({"data-slot":"base",className:C.base({class:he(x,N==null?void 0:N.className)}),...se(En(d,{enabled:p}),N)}),[x,d,C]),E=f.useCallback(N=>({ref:m,"data-slot":"tabList",className:C.tabList({class:he(s==null?void 0:s.tabList,N==null?void 0:N.className)}),...se(y,N)}),[m,y,s,C]);return{Component:h,domRef:m,state:b,values:P,getBaseProps:S,getTabListProps:E}}function Tp(e,t){var r;const{Component:n,values:o,state:a,getBaseProps:s,getTabListProps:i}=l4({...e,ref:t}),l=f.useId(),c=!e.disableAnimation&&!e.disableCursorAnimation,u={state:a,listRef:o.listRef,slots:o.slots,classNames:o.classNames,isDisabled:o.isDisabled,motionProps:o.motionProps,disableAnimation:o.disableAnimation,shouldSelectOnPressUp:o.shouldSelectOnPressUp,disableCursorAnimation:o.disableCursorAnimation},d=[...a.collection].map(h=>j.jsx(o4,{item:h,...u,...h.props},h.key));return j.jsxs(j.Fragment,{children:[j.jsx("div",{...s(),children:j.jsx(n,{...i(),children:c?j.jsx(Py,{id:l,children:d}):d})}),j.jsx(n4,{classNames:o.classNames,slots:o.slots,state:o.state},(r=a.selectedItem)==null?void 0:r.key)]})}var c4=vt(Tp);Tp.displayName="NextUI.Tabs";var u4=Ty,d4=u4;const f4=({icons:e,className:t})=>{const r=we({base:"bg-primary-grey-700",variants:{withIcon:{false:"h-6 w-11 px-[2px] group-data-[selected=true]:bg-secondary-green-500",true:"h-[52px] w-[88px] bg-secondary-green-500 group-data-[selected=true]:bg-primary-green-500"}}}),n=we({variants:{withIcon:{false:"h-5 w-5 group-data-[selected=true]:ml-5",true:"h-11 w-11 group-data-[selected=true]:ml-9"}}});return j.jsx($5,{classNames:{wrapper:r({withIcon:!!e,className:t}),thumb:n({withIcon:!!e})},thumbIcon:({isSelected:o,className:a})=>e&&(o?j.jsx(Ue,{name:e.selectedIcon,className:Gt(a,"text-lg")}):j.jsx(Ue,{name:e.unselectedIcon,className:Gt(a,"text-lg")}))})},p4=e=>j.jsx(d5,{classNames:{wrapper:"w-4 h-4 rounded-sm before:rounded-sm before:border before:border-primary-grey-700 after:rounded-sm after:bg-secondary-green-500",icon:"w-[11px] h-2.5 [&>*]:stroke-[4px]"},...e}),Sp=({size:e="md",className:t,border:r=!1,image:n,label:o,...a})=>{const s=we({base:"bg-white font-satoshi font-bold capitalize text-white",variants:{size:{lg:"h-28 w-28 text-[48px]",md:"h-[72px] w-[72px] text-[32px]",sm:"h-12 w-12 text-[24px]",xs:"h-6 w-6 text-[12px]"},border:{true:"border-primary-grey-600"},isText:{true:"bg-complementary-violet-500 "}},compoundVariants:[{border:!0,size:"lg",class:"border-[4px]"},{border:!0,size:"md",class:"border-[3px]"},{border:!0,size:"sm",class:"border-2"},{border:!0,size:"xs",class:"border"}]}),i=we({base:"text-primary-grey-600",variants:{size:{xs:"text-[12px]",sm:"text-[24px]",md:"text-[32px]",lg:"text-[48px]"}}});return j.jsx(zy,{fallback:!o&&j.jsx(Ue,{name:"user",className:i({size:e})}),showFallback:!!o,src:n,name:o,className:s({size:e,border:r,isText:!!(o&&!n),className:t}),...a})},h4=({options:e,labelPosition:t="right"})=>j.jsx(P5,{children:e.map(r=>j.jsxs("div",{className:"flex items-center gap-2",children:[t==="left"&&j.jsx("label",{"data-testid":"label-position-left",children:r.label}),j.jsx(T5,{value:r.value,id:r.id,classNames:{wrapper:"border border-primary-grey-700 group-data-[selected=true]:border-secondary-green-500 group-data-[selected=true]:bg-secondary-green-500",control:"bg-white"}}),t==="right"&&r.label&&j.jsx("label",{"data-testid":"label-position-right",children:r.label})]},r.value))}),Bi=({children:e,size:t,variant:r="primary",disabled:n,full:o=!1,iconLeft:a,iconRight:s,className:i,hasLoading:l,isLoadingComplete:c,onClick:u,onLoadingAnimationComplete:d,...h})=>{const[p,m]=f.useState(!1);let b=null;const[y,C]=f.useState("w-0"),x=E=>{if(l){m(!0);let N=1;b=setInterval(()=>{C(`w-${N}/4`),N<3?N++:b&&clearInterval(b)},1e3)}u&&u(E)},P=we({base:`absolute left-0 top-0 h-full rounded-full bg-transparent duration-1000 ease-in ${y}`,variants:{isLoadingComplete:{true:"w-full duration-500",false:""},loadingVariant:{primaryDark:"bg-white",primaryLight:"bg-primary-green-500 ",primary:"bg-primary-green-500 ",negative:"bg-complementary-red-700",secondaryNegative:"bg-complementary-red-50",secondary:"bg-secondary-green-50",tertiary:"",tertiaryDark:"",tertiaryLight:"",direction:"",directionCircle:""}}}),S=we({base:"relative !overflow-hidden rounded-full border-transparent px-10 py-4 font-bold text-white !ring-0 !ring-transparent hover:text-white focus:outline focus:outline-2 focus:-outline-offset-4 focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-4 focus-visible:outline-white",variants:{size:{small:"h-9",medium:"h-12",large:"h-14"},variant:{primaryDark:"bg-white text-primary-green-500 hover:bg-secondary-green-500 focus:bg-secondary-green-500 focus:text-white focus:outline-primary-green-500",primaryLight:"bg-primary-green-500 hover:bg-white hover:text-secondary-green-500 focus:bg-white focus:text-secondary-green-500 focus:outline-secondary-green-500",primary:"bg-primary-green-500 hover:bg-secondary-green-500 focus:bg-secondary-green-500 focus:outline-white",negative:"bg-complementary-red-700 hover:border-transparent hover:bg-complementary-red-500 focus:bg-complementary-red-500 focus:outline-white",secondaryNegative:"border border-complementary-red-700 !bg-white font-medium text-complementary-red-700 hover:border-2 hover:border-complementary-red-500 hover:text-complementary-red-500 focus:border-[3px] focus:border-complementary-red-500 focus:text-complementary-red-500",secondary:"border border-primary-green-500 !bg-transparent font-medium text-primary-green-500 hover:border-2 hover:border-secondary-green-500 hover:text-secondary-green-500 focus:border-[3px] focus:border-secondary-green-500 focus:text-secondary-green-500",tertiary:"!bg-transparent px-4 font-medium text-primary-green-500 hover:text-secondary-green-500 focus:font-bold focus:text-secondary-green-500 focus:outline-none",tertiaryDark:"!bg-transparent px-4 font-medium text-secondary-green-500 focus:font-bold focus:text-secondary-green-500 focus:outline-none",tertiaryLight:"!bg-transparent px-4 font-medium text-primary-green-500 focus:font-bold focus:text-primary-green-500 focus:outline-none",direction:"h-10 bg-primary-green-500 p-2.5 font-medium hover:bg-secondary-green-500 focus:border-none focus:bg-secondary-green-500 focus:outline-none",directionCircle:"font:medium bg-primary-green-500 hover:bg-secondary-green-500 focus:border-none focus:bg-secondary-green-500 focus:outline-none"},full:{true:"w-full",false:""},disabled:{true:"pointer-events-none border-transparent bg-primary-grey-500 font-medium text-primary-grey-700",false:""},isLoading:{true:"",false:""},hasIcon:{true:"!px-6"}},compoundVariants:[{variant:"primaryDark",isLoading:!0,class:"!bg-secondary-green-500 !text-primary-green-500 focus:bg-secondary-green-500 focus:outline-secondary-green-500"},{variant:"primaryLight",isLoading:!0,class:"!bg-white text-secondary-green-500 focus:outline-white"},{variant:"primary",isLoading:!0,class:"!bg-secondary-green-500 focus:outline-secondary-green-500"},{variant:"negative",isLoading:!0,class:"!bg-complementary-red-500 focus:outline-complementary-red-500"},{variant:"secondaryNegative",isLoading:!0,class:"!border !border-complementary-red-700 !bg-white text-complementary-red-700 focus:outline-none"},{variant:"secondary",isLoading:!0,class:"!border !border-secondary-green-500 !bg-white text-secondary-green-500 focus:outline-none"},{variant:"tertiary",isLoading:!0,class:"!font-medium"},{variant:"tertiaryDark",isLoading:!0,class:"!font-medium"},{variant:"tertiaryLight",isLoading:!0,class:"!font-medium"},{variant:"secondaryNegative",disabled:!0,class:"border border-primary-grey-700 bg-transparent"},{variant:"secondary",disabled:!0,class:"border border-primary-grey-700 bg-transparent"},{variant:"tertiary",disabled:!0,class:"bg-transparent underline"},{variant:"directionCircle",hasIcon:!0,class:"!min-w-unit-10 !px-0"}]});return f.useEffect(()=>{setTimeout(()=>{d&&d()})},[c,d]),f.useEffect(()=>()=>{b&&clearInterval(b)},[b]),j.jsx(qy,{onClick:x,className:Gt(i,S({size:t,variant:r,disabled:n,full:o,isLoading:p,hasIcon:!!(a||s)})),...h,children:j.jsxs("div",{children:[j.jsx("div",{className:Gt(i,P({isLoadingComplete:c,loadingVariant:r}))}),j.jsxs("div",{className:"relative flex items-center gap-3 text-center",children:[a&&(typeof a=="string"?j.jsx(Ue,{"data-testid":"button-component-icon-left",name:a}):a),e,s&&(typeof s=="string"?j.jsx(Ue,{"data-testid":"button-component-icon-right",name:s}):s)]})]})})},m4=({children:e,className:t,avatar:r,size:n="sm",disabled:o=!1,iconLeft:a,iconRight:s})=>{const i=we({base:"flex h-6 cursor-pointer items-center justify-center gap-2 border border-primary-green-500 bg-white px-2 pt-[1px] font-satoshi text-[10px] font-medium leading-[15px] text-primary-green-500 hover:border-secondary-green-500 hover:text-secondary-green-500 active:border-[2px] active:px-[7px]",variants:{size:{sm:"",lg:"h-[54px] gap-3 px-4 text-base active:px-[15px]"},hasAvatar:{true:"!border-0 bg-primary-grey-600 pl-6"},disabled:{true:"cursor-default !border-1 !border-primary-grey-500 bg-primary-grey-500 !text-primary-grey-800"}},compoundVariants:[{size:"sm",hasAvatar:!0,class:"pl-6 active:pl-[24px] active:pr-[8px]"},{size:"lg",hasAvatar:!0,class:"pl-14 active:pl-[56px] active:pr-[16px]"},{size:"sm",disabled:!0,class:"active:px-[8px]"},{size:"lg",disabled:!0,class:"active:px-[16px]"}]}),l=we({base:"absolute left-0 top-0",variants:{size:{sm:"",lg:"h-[54px] w-[54px]"}}}),c=we({base:"text-xs",variants:{size:{sm:"",lg:"text-lg"}}});return j.jsxs(rp,{size:n,className:Gt(i({hasAvatar:!!r,size:n,disabled:o,className:t})),startContent:a&&(typeof a=="string"?j.jsx(Ue,{className:c({size:n}),name:a}):a),endContent:s&&(typeof s=="string"?j.jsx(Ue,{className:c({size:n}),name:s}):s),children:[r&&j.jsx(Sp,{className:l({size:n}),border:!1,size:"xs",image:r}),e]})},g4=({tabs:e,tabClass:t,size:r="md",onSelectionChange:n,...o})=>{const a=we({base:"bg-primary-grey-500 p-[1px]",variants:{size:{sm:"h-8",md:"h-9",lg:"h-12"}}}),s=we({base:"h-full font-medium text-primary-grey-800 data-[selected=true]:!font-bold data-[selected=true]:!text-primary-green-500 data-[hover='true']:opacity-100",variants:{size:{sm:"px-[40px]",md:"px-[80px]",lg:"px-[75px]"},tabClass:{}}}),i=we({base:"!text-white shadow-none"}),l=we({base:"!font-inherit flex items-center gap-2 font-satoshi !text-inherit",variants:{size:{sm:"text-[14px]",md:"text-[14px]",lg:"text-[20px]"}}});return j.jsx(c4,{onClick:c=>{const u=c.target,d=u.parentElement.getAttribute("data-selected");let h=u.getAttribute("data-key");h||(h=u.parentElement.getAttribute("data-key")),!d&&h&&n(h)},classNames:{tabList:a({size:r}),tab:s({size:r,className:t}),cursor:i(),tabContent:l({size:r})},radius:"full",size:r,...o,children:e.map(({key:c,title:u,component:d,icon:h})=>j.jsx(d4,{title:j.jsxs(j.Fragment,{children:[h&&(typeof h=="string"?j.jsx(Ue,{className:"text-[16px]",name:h}):h)," ",u]}),children:d},c))})},Ep=({message:e,actions:t,inlineActions:r=!0})=>{const n=we({base:"flex gap-3 rounded-lg bg-primary-black-400 p-4",variants:{inlineActions:{true:"flex flex-row",false:"flex flex-col items-end justify-end"},toastType:{alert:"rounded-2xl bg-primary-grey-600",snackbar:"bg-primary-black-400",banner:"rounded-2xl bg-complementary-red-500"}}});return j.jsxs("div",{className:n({inlineActions:r}),children:[j.jsx("div",{className:"flex flex-1 items-center gap-4",children:j.jsx("p",{className:"font-satoshi text-sm",children:e})}),j.jsx("div",{children:t&&j.jsx("div",{className:"flex",children:t.map(({label:o,onClick:a})=>j.jsx(Bi,{onClick:a,variant:"tertiaryDark",children:o},o))})})]})};function $p(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=$p(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function nr(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=$p(e))&&(n&&(n+=" "),n+=t);return n}const Un=e=>typeof e=="number"&&!isNaN(e),Tr=e=>typeof e=="string",Xe=e=>typeof e=="function",Ca=e=>Tr(e)||Xe(e)?e:null,Ri=e=>f.isValidElement(e)||Tr(e)||Xe(e)||Un(e);function v4(e,t,r){r===void 0&&(r=300);const{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function Pa(e){let{enter:t,exit:r,appendPosition:n=!1,collapse:o=!0,collapseDuration:a=300}=e;return function(s){let{children:i,position:l,preventExitTransition:c,done:u,nodeRef:d,isIn:h}=s;const p=n?`${t}--${l}`:t,m=n?`${r}--${l}`:r,b=f.useRef(0);return f.useLayoutEffect(()=>{const y=d.current,C=p.split(" "),x=P=>{P.target===d.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",x),y.removeEventListener("animationcancel",x),b.current===0&&P.type!=="animationcancel"&&y.classList.remove(...C))};y.classList.add(...C),y.addEventListener("animationend",x),y.addEventListener("animationcancel",x)},[]),f.useEffect(()=>{const y=d.current,C=()=>{y.removeEventListener("animationend",C),o?v4(y,u,a):u()};h||(c?C():(b.current=1,y.className+=` ${m}`,y.addEventListener("animationend",C)))},[h]),f.createElement(f.Fragment,null,i)}}function Dp(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const ft={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const r=this.list.get(e).filter(n=>n!==t);return this.list.set(e,r),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const r=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(r)})}},Ma=e=>{let{theme:t,type:r,...n}=e;return f.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...n})},Ki={info:function(e){return f.createElement(Ma,{...e},f.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return f.createElement(Ma,{...e},f.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return f.createElement(Ma,{...e},f.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return f.createElement(Ma,{...e},f.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return f.createElement("div",{className:"Toastify__spinner"})}};function b4(e){const[,t]=f.useReducer(p=>p+1,0),[r,n]=f.useState([]),o=f.useRef(null),a=f.useRef(new Map).current,s=p=>r.indexOf(p)!==-1,i=f.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:s,getToast:p=>a.get(p)}).current;function l(p){let{containerId:m}=p;const{limit:b}=i.props;!b||m&&i.containerId!==m||(i.count-=i.queue.length,i.queue=[])}function c(p){n(m=>p==null?[]:m.filter(b=>b!==p))}function u(){const{toastContent:p,toastProps:m,staleId:b}=i.queue.shift();h(p,m,b)}function d(p,m){let{delay:b,staleId:y,...C}=m;if(!Ri(p)||function(D){return!o.current||i.props.enableMultiContainer&&D.containerId!==i.props.containerId||a.has(D.toastId)&&D.updateId==null}(C))return;const{toastId:x,updateId:P,data:S}=C,{props:E}=i,N=()=>c(x),L=P==null;L&&i.count++;const g={...E,style:E.toastStyle,key:i.toastKey++,...Object.fromEntries(Object.entries(C).filter(D=>{let[w,M]=D;return M!=null})),toastId:x,updateId:P,data:S,closeToast:N,isIn:!1,className:Ca(C.className||E.toastClassName),bodyClassName:Ca(C.bodyClassName||E.bodyClassName),progressClassName:Ca(C.progressClassName||E.progressClassName),autoClose:!C.isLoading&&(A=C.autoClose,I=E.autoClose,A===!1||Un(A)&&A>0?A:I),deleteToast(){const D=Dp(a.get(x),"removed");a.delete(x),ft.emit(4,D);const w=i.queue.length;if(i.count=x==null?i.count-i.displayedToast:i.count-1,i.count<0&&(i.count=0),w>0){const M=x==null?i.props.limit:1;if(w===1||M===1)i.displayedToast++,u();else{const O=M>w?w:M;i.displayedToast=O;for(let F=0;F<O;F++)u()}}else t()}};var A,I;g.iconOut=function(D){let{theme:w,type:M,isLoading:O,icon:F}=D,$=null;const V={theme:w,type:M};return F===!1||(Xe(F)?$=F(V):f.isValidElement(F)?$=f.cloneElement(F,V):Tr(F)||Un(F)?$=F:O?$=Ki.spinner():(H=>H in Ki)(M)&&($=Ki[M](V))),$}(g),Xe(C.onOpen)&&(g.onOpen=C.onOpen),Xe(C.onClose)&&(g.onClose=C.onClose),g.closeButton=E.closeButton,C.closeButton===!1||Ri(C.closeButton)?g.closeButton=C.closeButton:C.closeButton===!0&&(g.closeButton=!Ri(E.closeButton)||E.closeButton);let T=p;f.isValidElement(p)&&!Tr(p.type)?T=f.cloneElement(p,{closeToast:N,toastProps:g,data:S}):Xe(p)&&(T=p({closeToast:N,toastProps:g,data:S})),E.limit&&E.limit>0&&i.count>E.limit&&L?i.queue.push({toastContent:T,toastProps:g,staleId:y}):Un(b)?setTimeout(()=>{h(T,g,y)},b):h(T,g,y)}function h(p,m,b){const{toastId:y}=m;b&&a.delete(b);const C={content:p,props:m};a.set(y,C),n(x=>[...x,y].filter(P=>P!==b)),ft.emit(4,Dp(C,C.props.updateId==null?"added":"updated"))}return f.useEffect(()=>(i.containerId=e.containerId,ft.cancelEmit(3).on(0,d).on(1,p=>o.current&&c(p)).on(5,l).emit(2,i),()=>{a.clear(),ft.emit(3,i)}),[]),f.useEffect(()=>{i.props=e,i.isToastActive=s,i.displayedToast=r.length}),{getToastToRender:function(p){const m=new Map,b=Array.from(a.values());return e.newestOnTop&&b.reverse(),b.forEach(y=>{const{position:C}=y.props;m.has(C)||m.set(C,[]),m.get(C).push(y)}),Array.from(m,y=>p(y[0],y[1]))},containerRef:o,isToastActive:s}}function Ip(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function kp(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function y4(e){const[t,r]=f.useState(!1),[n,o]=f.useState(!1),a=f.useRef(null),s=f.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,i=f.useRef(e),{autoClose:l,pauseOnHover:c,closeToast:u,onClick:d,closeOnClick:h}=e;function p(S){if(e.draggable){S.nativeEvent.type==="touchstart"&&S.nativeEvent.preventDefault(),s.didMove=!1,document.addEventListener("mousemove",C),document.addEventListener("mouseup",x),document.addEventListener("touchmove",C),document.addEventListener("touchend",x);const E=a.current;s.canCloseOnClick=!0,s.canDrag=!0,s.boundingRect=E.getBoundingClientRect(),E.style.transition="",s.x=Ip(S.nativeEvent),s.y=kp(S.nativeEvent),e.draggableDirection==="x"?(s.start=s.x,s.removalDistance=E.offsetWidth*(e.draggablePercent/100)):(s.start=s.y,s.removalDistance=E.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function m(S){if(s.boundingRect){const{top:E,bottom:N,left:L,right:g}=s.boundingRect;S.nativeEvent.type!=="touchend"&&e.pauseOnHover&&s.x>=L&&s.x<=g&&s.y>=E&&s.y<=N?y():b()}}function b(){r(!0)}function y(){r(!1)}function C(S){const E=a.current;s.canDrag&&E&&(s.didMove=!0,t&&y(),s.x=Ip(S),s.y=kp(S),s.delta=e.draggableDirection==="x"?s.x-s.start:s.y-s.start,s.start!==s.x&&(s.canCloseOnClick=!1),E.style.transform=`translate${e.draggableDirection}(${s.delta}px)`,E.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function x(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",x);const S=a.current;if(s.canDrag&&s.didMove&&S){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),void e.closeToast();S.style.transition="transform 0.2s, opacity 0.2s",S.style.transform=`translate${e.draggableDirection}(0)`,S.style.opacity="1"}}f.useEffect(()=>{i.current=e}),f.useEffect(()=>(a.current&&a.current.addEventListener("d",b,{once:!0}),Xe(e.onOpen)&&e.onOpen(f.isValidElement(e.children)&&e.children.props),()=>{const S=i.current;Xe(S.onClose)&&S.onClose(f.isValidElement(S.children)&&S.children.props)}),[]),f.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",b),window.addEventListener("blur",y)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",y))}),[e.pauseOnFocusLoss]);const P={onMouseDown:p,onTouchStart:p,onMouseUp:m,onTouchEnd:m};return l&&c&&(P.onMouseEnter=y,P.onMouseLeave=b),h&&(P.onClick=S=>{d&&d(S),s.canCloseOnClick&&u()}),{playToast:b,pauseToast:y,isRunning:t,preventExitTransition:n,toastRef:a,eventHandlers:P}}function Ap(e){let{closeToast:t,theme:r,ariaLabel:n="close"}=e;return f.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":n},f.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},f.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function x4(e){let{delay:t,isRunning:r,closeToast:n,type:o="default",hide:a,className:s,style:i,controlledProgress:l,progress:c,rtl:u,isIn:d,theme:h}=e;const p=a||l&&c===0,m={...i,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused",opacity:p?0:1};l&&(m.transform=`scaleX(${c})`);const b=nr("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),y=Xe(s)?s({rtl:u,type:o,defaultClassName:b}):nr(b,s);return f.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:y,style:m,[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{d&&n()}})}const w4=e=>{const{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o}=y4(e),{closeButton:a,children:s,autoClose:i,onClick:l,type:c,hideProgressBar:u,closeToast:d,transition:h,position:p,className:m,style:b,bodyClassName:y,bodyStyle:C,progressClassName:x,progressStyle:P,updateId:S,role:E,progress:N,rtl:L,toastId:g,deleteToast:A,isIn:I,isLoading:T,iconOut:D,closeOnClick:w,theme:M}=e,O=nr("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":L},{"Toastify__toast--close-on-click":w}),F=Xe(m)?m({rtl:L,position:p,type:c,defaultClassName:O}):nr(O,m),$=!!N||!i,V={closeToast:d,type:c,theme:M};let H=null;return a===!1||(H=Xe(a)?a(V):f.isValidElement(a)?f.cloneElement(a,V):Ap(V)),f.createElement(h,{isIn:I,done:A,position:p,preventExitTransition:r,nodeRef:n},f.createElement("div",{id:g,onClick:l,className:F,...o,style:b,ref:n},f.createElement("div",{...I&&{role:E},className:Xe(y)?y({type:c}):nr("Toastify__toast-body",y),style:C},D!=null&&f.createElement("div",{className:nr("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!T})},D),f.createElement("div",null,s)),H,f.createElement(x4,{...S&&!$?{key:`pb-${S}`}:{},rtl:L,theme:M,delay:i,isRunning:t,isIn:I,closeToast:d,hide:u,type:c,style:P,className:x,controlledProgress:$,progress:N||0})))},Ta=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},C4=Pa(Ta("bounce",!0));Pa(Ta("slide",!0)),Pa(Ta("zoom")),Pa(Ta("flip"));const Op=f.forwardRef((e,t)=>{const{getToastToRender:r,containerRef:n,isToastActive:o}=b4(e),{className:a,style:s,rtl:i,containerId:l}=e;function c(u){const d=nr("Toastify__toast-container",`Toastify__toast-container--${u}`,{"Toastify__toast-container--rtl":i});return Xe(a)?a({position:u,rtl:i,defaultClassName:d}):nr(d,Ca(a))}return f.useEffect(()=>{t&&(t.current=n.current)},[]),f.createElement("div",{ref:n,className:"Toastify",id:l},r((u,d)=>{const h=d.length?{...s}:{...s,pointerEvents:"none"};return f.createElement("div",{className:c(u),style:h,key:`container-${u}`},d.map((p,m)=>{let{content:b,props:y}=p;return f.createElement(w4,{...y,isIn:o(y.toastId),style:{...y.style,"--nth":m+1,"--len":d.length},key:`toast-${y.key}`},b)}))}))});Op.displayName="ToastContainer",Op.defaultProps={position:"top-right",transition:C4,autoClose:5e3,closeButton:Ap,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let Ui,Sr=new Map,Hn=[],P4=1;function Np(){return""+P4++}function M4(e){return e&&(Tr(e.toastId)||Un(e.toastId))?e.toastId:Np()}function Yn(e,t){return Sr.size>0?ft.emit(0,e,t):Hn.push({content:e,options:t}),t.toastId}function Sa(e,t){return{...t,type:t&&t.type||e,toastId:M4(t)}}function Ea(e){return(t,r)=>Yn(t,Sa(e,r))}function Ae(e,t){return Yn(e,Sa("default",t))}Ae.loading=(e,t)=>Yn(e,Sa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ae.promise=function(e,t,r){let n,{pending:o,error:a,success:s}=t;o&&(n=Tr(o)?Ae.loading(o,r):Ae.loading(o.render,{...r,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,d,h)=>{if(d==null)return void Ae.dismiss(n);const p={type:u,...i,...r,data:h},m=Tr(d)?{render:d}:d;return n?Ae.update(n,{...p,...m}):Ae(m.render,{...p,...m}),h},c=Xe(e)?e():e;return c.then(u=>l("success",s,u)).catch(u=>l("error",a,u)),c},Ae.success=Ea("success"),Ae.info=Ea("info"),Ae.error=Ea("error"),Ae.warning=Ea("warning"),Ae.warn=Ae.warning,Ae.dark=(e,t)=>Yn(e,Sa("default",{theme:"dark",...t})),Ae.dismiss=e=>{Sr.size>0?ft.emit(1,e):Hn=Hn.filter(t=>e!=null&&t.options.toastId!==e)},Ae.clearWaitingQueue=function(e){return e===void 0&&(e={}),ft.emit(5,e)},Ae.isActive=e=>{let t=!1;return Sr.forEach(r=>{r.isToastActive&&r.isToastActive(e)&&(t=!0)}),t},Ae.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const r=function(n,o){let{containerId:a}=o;const s=Sr.get(a||Ui);return s&&s.getToast(n)}(e,t);if(r){const{props:n,content:o}=r,a={delay:100,...n,...t,toastId:t.toastId||e,updateId:Np()};a.toastId!==e&&(a.staleId=e);const s=a.render||o;delete a.render,Yn(s,a)}},0)},Ae.done=e=>{Ae.update(e,{progress:1})},Ae.onChange=e=>(ft.on(4,e),()=>{ft.off(4,e)}),Ae.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Ae.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},ft.on(2,e=>{Ui=e.containerId||e,Sr.set(Ui,e),Hn.forEach(t=>{ft.emit(0,t.content,t.options)}),Hn=[]}).on(3,e=>{Sr.delete(e.containerId||e),Sr.size===0&&ft.off(0).off(1).off(5)});const Kx="",T4=()=>({snackbar:(t,r)=>{Ae(j.jsx(Ep,{message:t,actions:r==null?void 0:r.actions,inlineActions:r==null?void 0:r.inlineActions}))}});function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},me.apply(this,arguments)}function Le(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function S4(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Lp(...e){return t=>e.forEach(r=>S4(r,t))}function pt(...e){return f.useCallback(Lp(...e),e)}function tn(e,t=[]){let r=[];function n(a,s){const i=f.createContext(s),l=r.length;r=[...r,s];function c(d){const{scope:h,children:p,...m}=d,b=(h==null?void 0:h[e][l])||i,y=f.useMemo(()=>m,Object.values(m));return f.createElement(b.Provider,{value:y},p)}function u(d,h){const p=(h==null?void 0:h[e][l])||i,m=f.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,u]}const o=()=>{const a=r.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[n,E4(o,...t)]}function E4(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...i,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}const Gn=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find($4);if(a){const s=a.props.children,i=o.map(l=>l===a?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:l);return f.createElement(Hi,me({},n,{ref:t}),f.isValidElement(s)?f.cloneElement(s,void 0,i):null)}return f.createElement(Hi,me({},n,{ref:t}),r)});Gn.displayName="Slot";const Hi=f.forwardRef((e,t)=>{const{children:r,...n}=e;return f.isValidElement(r)?f.cloneElement(r,{...D4(n,r.props),ref:t?Lp(t,r.ref):r.ref}):f.Children.count(r)>1?f.Children.only(null):null});Hi.displayName="SlotClone";const jp=({children:e})=>f.createElement(f.Fragment,null,e);function $4(e){return f.isValidElement(e)&&e.type===jp}function D4(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{a(...i),o(...i)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}const Re=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?Gn:t;return f.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),f.createElement(i,me({},s,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function I4(e,t){e&&mn.flushSync(()=>e.dispatchEvent(t))}function Vt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function k4(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e);f.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Yi="dismissableLayer.update",A4="dismissableLayer.pointerDownOutside",O4="dismissableLayer.focusOutside";let _p;const N4=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fp=f.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=f.useContext(N4),[d,h]=f.useState(null),p=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=f.useState({}),b=pt(t,g=>h(g)),y=Array.from(u.layers),[C]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(C),P=d?y.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,E=P>=x,N=L4(g=>{const A=g.target,I=[...u.branches].some(T=>T.contains(A));!E||I||(a==null||a(g),i==null||i(g),g.defaultPrevented||l==null||l())},p),L=j4(g=>{const A=g.target;[...u.branches].some(T=>T.contains(A))||(s==null||s(g),i==null||i(g),g.defaultPrevented||l==null||l())},p);return k4(g=>{P===u.layers.size-1&&(o==null||o(g),!g.defaultPrevented&&l&&(g.preventDefault(),l()))},p),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_p=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Vp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=_p)}},[d,p,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Vp())},[d,u]),f.useEffect(()=>{const g=()=>m({});return document.addEventListener(Yi,g),()=>document.removeEventListener(Yi,g)},[]),f.createElement(Re.div,me({},c,{ref:b,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,L.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,N.onPointerDownCapture)}))});function L4(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){zp(A4,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function j4(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e),n=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!n.current&&zp(O4,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Vp(){const e=new CustomEvent(Yi);document.dispatchEvent(e)}function zp(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?I4(o,a):o.dispatchEvent(a)}const rn=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},_4=G["useId".toString()]||(()=>{});let F4=0;function $a(e){const[t,r]=G.useState(_4());return rn(()=>{e||r(n=>n??String(F4++))},[e]),e||(t?`radix-${t}`:"")}const V4=["top","right","bottom","left"],or=Math.min,at=Math.max,Da=Math.round,Ia=Math.floor,ar=e=>({x:e,y:e}),z4={left:"right",right:"left",bottom:"top",top:"bottom"},W4={start:"end",end:"start"};function Gi(e,t,r){return at(e,or(t,r))}function zt(e,t){return typeof e=="function"?e(t):e}function Wt(e){return e.split("-")[0]}function nn(e){return e.split("-")[1]}function qi(e){return e==="x"?"y":"x"}function Qi(e){return e==="y"?"height":"width"}function on(e){return["top","bottom"].includes(Wt(e))?"y":"x"}function Xi(e){return qi(on(e))}function B4(e,t,r){r===void 0&&(r=!1);const n=nn(e),o=Xi(e),a=Qi(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ka(s)),[s,ka(s)]}function R4(e){const t=ka(e);return[Zi(e),t,Zi(t)]}function Zi(e){return e.replace(/start|end/g,t=>W4[t])}function K4(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function U4(e,t,r,n){const o=nn(e);let a=K4(Wt(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Zi)))),a}function ka(e){return e.replace(/left|right|bottom|top/g,t=>z4[t])}function H4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wp(e){return typeof e!="number"?H4(e):{top:e,right:e,bottom:e,left:e}}function Aa(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Bp(e,t,r){let{reference:n,floating:o}=e;const a=on(t),s=Xi(t),i=Qi(s),l=Wt(t),c=a==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,h=n[i]/2-o[i]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(nn(t)){case"start":p[s]-=h*(r&&c?-1:1);break;case"end":p[s]+=h*(r&&c?-1:1);break}return p}const Y4=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Bp(c,n,l),h=n,p={},m=0;for(let b=0;b<i.length;b++){const{name:y,fn:C}=i[b],{x,y:P,data:S,reset:E}=await C({x:u,y:d,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});if(u=x??u,d=P??d,p={...p,[y]:{...p[y],...S}},E&&m<=50){m++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=Bp(c,h,l)),b=-1;continue}}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}};async function qn(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=zt(t,e),m=Wp(p),y=i[h?d==="floating"?"reference":"floating":d],C=Aa(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{...s.floating,x:n,y:o}:s.reference,P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(P))?await(a.getScale==null?void 0:a.getScale(P))||{x:1,y:1}:{x:1,y:1},E=Aa(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:x,offsetParent:P,strategy:l}):x);return{top:(C.top-E.top+m.top)/S.y,bottom:(E.bottom-C.bottom+m.bottom)/S.y,left:(C.left-E.left+m.left)/S.x,right:(E.right-C.right+m.right)/S.x}}const Rp=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:c,padding:u=0}=zt(e,t)||{};if(c==null)return{};const d=Wp(u),h={x:r,y:n},p=Xi(o),m=Qi(p),b=await s.getDimensions(c),y=p==="y",C=y?"top":"left",x=y?"bottom":"right",P=y?"clientHeight":"clientWidth",S=a.reference[m]+a.reference[p]-h[p]-a.floating[m],E=h[p]-a.reference[p],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let L=N?N[P]:0;(!L||!await(s.isElement==null?void 0:s.isElement(N)))&&(L=i.floating[P]||a.floating[m]);const g=S/2-E/2,A=L/2-b[m]/2-1,I=or(d[C],A),T=or(d[x],A),D=I,w=L-b[m]-T,M=L/2-b[m]/2+g,O=Gi(D,M,w),F=!l.arrow&&nn(o)!=null&&M!=O&&a.reference[m]/2-(M<D?I:T)-b[m]/2<0,$=F?M<D?M-D:M-w:0;return{[p]:h[p]+$,data:{[p]:O,centerOffset:M-O-$,...F&&{alignmentOffset:$}},reset:F}}}),G4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:b=!0,...y}=zt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const C=Wt(o),x=Wt(i)===i,P=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(x||!b?[ka(i)]:R4(i));!h&&m!=="none"&&S.push(...U4(i,b,m,P));const E=[i,...S],N=await qn(t,y),L=[];let g=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&L.push(N[C]),d){const D=B4(o,s,P);L.push(N[D[0]],N[D[1]])}if(g=[...g,{placement:o,overflows:L}],!L.every(D=>D<=0)){var A,I;const D=(((A=a.flip)==null?void 0:A.index)||0)+1,w=E[D];if(w)return{data:{index:D,overflows:g},reset:{placement:w}};let M=(I=g.filter(O=>O.overflows[0]<=0).sort((O,F)=>O.overflows[1]-F.overflows[1])[0])==null?void 0:I.placement;if(!M)switch(p){case"bestFit":{var T;const O=(T=g.map(F=>[F.placement,F.overflows.filter($=>$>0).reduce(($,V)=>$+V,0)]).sort((F,$)=>F[1]-$[1])[0])==null?void 0:T[0];O&&(M=O);break}case"initialPlacement":M=i;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function Kp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Up(e){return V4.some(t=>e[t]>=0)}const q4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=zt(e,t);switch(n){case"referenceHidden":{const a=await qn(t,{...o,elementContext:"reference"}),s=Kp(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Up(s)}}}case"escaped":{const a=await qn(t,{...o,altBoundary:!0}),s=Kp(a,r.floating);return{data:{escapedOffsets:s,escaped:Up(s)}}}default:return{}}}}};async function Q4(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Wt(r),i=nn(r),l=on(r)==="y",c=["left","top"].includes(s)?-1:1,u=a&&l?-1:1,d=zt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return i&&typeof m=="number"&&(p=i==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const X4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await Q4(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},Z4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:y=>{let{x:C,y:x}=y;return{x:C,y:x}}},...l}=zt(e,t),c={x:r,y:n},u=await qn(t,l),d=on(Wt(o)),h=qi(d);let p=c[h],m=c[d];if(a){const y=h==="y"?"top":"left",C=h==="y"?"bottom":"right",x=p+u[y],P=p-u[C];p=Gi(x,p,P)}if(s){const y=d==="y"?"top":"left",C=d==="y"?"bottom":"right",x=m+u[y],P=m-u[C];m=Gi(x,m,P)}const b=i.fn({...t,[h]:p,[d]:m});return{...b,data:{x:b.x-r,y:b.y-n}}}}},J4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=zt(e,t),u={x:r,y:n},d=on(o),h=qi(d);let p=u[h],m=u[d];const b=zt(i,t),y=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const P=h==="y"?"height":"width",S=a.reference[h]-a.floating[P]+y.mainAxis,E=a.reference[h]+a.reference[P]-y.mainAxis;p<S?p=S:p>E&&(p=E)}if(c){var C,x;const P=h==="y"?"width":"height",S=["top","left"].includes(Wt(o)),E=a.reference[d]-a.floating[P]+(S&&((C=s.offset)==null?void 0:C[d])||0)+(S?0:y.crossAxis),N=a.reference[d]+a.reference[P]+(S?0:((x=s.offset)==null?void 0:x[d])||0)-(S?y.crossAxis:0);m<E?m=E:m>N&&(m=N)}return{[h]:p,[d]:m}}}},e3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:s=()=>{},...i}=zt(e,t),l=await qn(t,i),c=Wt(r),u=nn(r),d=on(r)==="y",{width:h,height:p}=n.floating;let m,b;c==="top"||c==="bottom"?(m=c,b=u===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(b=c,m=u==="end"?"top":"bottom");const y=p-l[m],C=h-l[b],x=!t.middlewareData.shift;let P=y,S=C;if(d){const N=h-l.left-l.right;S=u||x?or(C,N):N}else{const N=p-l.top-l.bottom;P=u||x?or(y,N):N}if(x&&!u){const N=at(l.left,0),L=at(l.right,0),g=at(l.top,0),A=at(l.bottom,0);d?S=h-2*(N!==0||L!==0?N+L:at(l.left,l.right)):P=p-2*(g!==0||A!==0?g+A:at(l.top,l.bottom))}await s({...t,availableWidth:S,availableHeight:P});const E=await o.getDimensions(a.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function sr(e){return Hp(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bt(e){var t;return(t=(Hp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hp(e){return e instanceof Node||e instanceof st(e).Node}function Rt(e){return e instanceof Element||e instanceof st(e).Element}function Et(e){return e instanceof HTMLElement||e instanceof st(e).HTMLElement}function Yp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}function Qn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function t3(e){return["table","td","th"].includes(sr(e))}function Ji(e){const t=el(),r=ht(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function r3(e){let t=an(e);for(;Et(t)&&!Oa(t);){if(Ji(t))return t;t=an(t)}return null}function el(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Oa(e){return["html","body","#document"].includes(sr(e))}function ht(e){return st(e).getComputedStyle(e)}function Na(e){return Rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function an(e){if(sr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yp(e)&&e.host||Bt(e);return Yp(t)?t.host:t}function Gp(e){const t=an(e);return Oa(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Qn(t)?t:Gp(t)}function Xn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Gp(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=st(o);return a?t.concat(s,s.visualViewport||[],Qn(o)?o:[],s.frameElement&&r?Xn(s.frameElement):[]):t.concat(o,Xn(o,[],r))}function qp(e){const t=ht(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Et(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=Da(r)!==a||Da(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function tl(e){return Rt(e)?e:e.contextElement}function sn(e){const t=tl(e);if(!Et(t))return ar(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=qp(t);let s=(a?Da(r.width):r.width)/n,i=(a?Da(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const n3=ar(0);function Qp(e){const t=st(e);return!el()||!t.visualViewport?n3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o3(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==st(e)?!1:t}function Er(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=tl(e);let s=ar(1);t&&(n?Rt(n)&&(s=sn(n)):s=sn(e));const i=o3(a,r,n)?Qp(a):ar(0);let l=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(a){const h=st(a),p=n&&Rt(n)?st(n):n;let m=h.frameElement;for(;m&&n&&p!==h;){const b=sn(m),y=m.getBoundingClientRect(),C=ht(m),x=y.left+(m.clientLeft+parseFloat(C.paddingLeft))*b.x,P=y.top+(m.clientTop+parseFloat(C.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=x,c+=P,m=st(m).frameElement}}return Aa({width:u,height:d,x:l,y:c})}function a3(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Et(r),a=Bt(r);if(r===a)return t;let s={scrollLeft:0,scrollTop:0},i=ar(1);const l=ar(0);if((o||!o&&n!=="fixed")&&((sr(r)!=="body"||Qn(a))&&(s=Na(r)),Et(r))){const c=Er(r);i=sn(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:t.width*i.x,height:t.height*i.y,x:t.x*i.x-s.scrollLeft*i.x+l.x,y:t.y*i.y-s.scrollTop*i.y+l.y}}function s3(e){return Array.from(e.getClientRects())}function Xp(e){return Er(Bt(e)).left+Na(e).scrollLeft}function i3(e){const t=Bt(e),r=Na(e),n=e.ownerDocument.body,o=at(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=at(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Xp(e);const i=-r.scrollTop;return ht(n).direction==="rtl"&&(s+=at(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function l3(e,t){const r=st(e),n=Bt(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const c=el();(!c||c&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}function c3(e,t){const r=Er(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Et(e)?sn(e):ar(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:s,height:i,x:l,y:c}}function Zp(e,t,r){let n;if(t==="viewport")n=l3(e,r);else if(t==="document")n=i3(Bt(e));else if(Rt(t))n=c3(t,r);else{const o=Qp(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Aa(n)}function Jp(e,t){const r=an(e);return r===t||!Rt(r)||Oa(r)?!1:ht(r).position==="fixed"||Jp(r,t)}function u3(e,t){const r=t.get(e);if(r)return r;let n=Xn(e,[],!1).filter(i=>Rt(i)&&sr(i)!=="body"),o=null;const a=ht(e).position==="fixed";let s=a?an(e):e;for(;Rt(s)&&!Oa(s);){const i=ht(s),l=Ji(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Qn(s)&&!l&&Jp(e,s))?n=n.filter(u=>u!==s):o=i,s=an(s)}return t.set(e,n),n}function d3(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?u3(t,this._c):[].concat(r),n],i=s[0],l=s.reduce((c,u)=>{const d=Zp(t,u,o);return c.top=at(d.top,c.top),c.right=or(d.right,c.right),c.bottom=or(d.bottom,c.bottom),c.left=at(d.left,c.left),c},Zp(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function f3(e){return qp(e)}function p3(e,t,r){const n=Et(t),o=Bt(t),a=r==="fixed",s=Er(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ar(0);if(n||!n&&!a)if((sr(t)!=="body"||Qn(o))&&(i=Na(t)),n){const c=Er(t,!0,a,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Xp(o));return{x:s.left+i.scrollLeft-l.x,y:s.top+i.scrollTop-l.y,width:s.width,height:s.height}}function e0(e,t){return!Et(e)||ht(e).position==="fixed"?null:t?t(e):e.offsetParent}function t0(e,t){const r=st(e);if(!Et(e))return r;let n=e0(e,t);for(;n&&t3(n)&&ht(n).position==="static";)n=e0(n,t);return n&&(sr(n)==="html"||sr(n)==="body"&&ht(n).position==="static"&&!Ji(n))?r:n||r3(e)||r}const h3=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||t0,a=this.getDimensions;return{reference:p3(t,await o(r),n),floating:{x:0,y:0,...await a(r)}}};function m3(e){return ht(e).direction==="rtl"}const g3={convertOffsetParentRelativeRectToViewportRelativeRect:a3,getDocumentElement:Bt,getClippingRect:d3,getOffsetParent:t0,getElementRects:h3,getClientRects:s3,getDimensions:f3,getScale:sn,isElement:Rt,isRTL:m3};function v3(e,t){let r=null,n;const o=Bt(e);function a(){clearTimeout(n),r&&r.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(i||t(),!d||!h)return;const p=Ia(u),m=Ia(o.clientWidth-(c+d)),b=Ia(o.clientHeight-(u+h)),y=Ia(c),x={rootMargin:-p+"px "+-m+"px "+-b+"px "+-y+"px",threshold:at(0,or(1,l))||1};let P=!0;function S(E){const N=E[0].intersectionRatio;if(N!==l){if(!P)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},100)}P=!1}try{r=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(S,x)}r.observe(e)}return s(!0),a}function b3(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=tl(e),u=o||a?[...c?Xn(c):[],...Xn(t)]:[];u.forEach(C=>{o&&C.addEventListener("scroll",r,{passive:!0}),a&&C.addEventListener("resize",r)});const d=c&&i?v3(c,r):null;let h=-1,p=null;s&&(p=new ResizeObserver(C=>{let[x]=C;x&&x.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let m,b=l?Er(e):null;l&&y();function y(){const C=Er(e);b&&(C.x!==b.x||C.y!==b.y||C.width!==b.width||C.height!==b.height)&&r(),b=C,m=requestAnimationFrame(y)}return r(),()=>{u.forEach(C=>{o&&C.removeEventListener("scroll",r),a&&C.removeEventListener("resize",r)}),d&&d(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const y3=(e,t,r)=>{const n=new Map,o={platform:g3,...r},a={...o.platform,_c:n};return Y4(e,t,{...o,platform:a})},x3=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Rp({element:n.current,padding:o}).fn(r):{}:n?Rp({element:n,padding:o}).fn(r):{}}}};var La=typeof document<"u"?f.useLayoutEffect:f.useEffect;function ja(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ja(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ja(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function r0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function n0(e,t){const r=r0(e);return Math.round(t*r)/r}function o0(e){const t=G.useRef(e);return La(()=>{t.current=e}),t}function w3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:c}=e,[u,d]=G.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=G.useState(n);ja(h,n)||p(n);const[m,b]=G.useState(null),[y,C]=G.useState(null),x=G.useCallback(F=>{F!=N.current&&(N.current=F,b(F))},[b]),P=G.useCallback(F=>{F!==L.current&&(L.current=F,C(F))},[C]),S=a||m,E=s||y,N=G.useRef(null),L=G.useRef(null),g=G.useRef(u),A=o0(l),I=o0(o),T=G.useCallback(()=>{if(!N.current||!L.current)return;const F={placement:t,strategy:r,middleware:h};I.current&&(F.platform=I.current),y3(N.current,L.current,F).then($=>{const V={...$,isPositioned:!0};D.current&&!ja(g.current,V)&&(g.current=V,Ph.flushSync(()=>{d(V)}))})},[h,t,r,I]);La(()=>{c===!1&&g.current.isPositioned&&(g.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const D=G.useRef(!1);La(()=>(D.current=!0,()=>{D.current=!1}),[]),La(()=>{if(S&&(N.current=S),E&&(L.current=E),S&&E){if(A.current)return A.current(S,E,T);T()}},[S,E,T,A]);const w=G.useMemo(()=>({reference:N,floating:L,setReference:x,setFloating:P}),[x,P]),M=G.useMemo(()=>({reference:S,floating:E}),[S,E]),O=G.useMemo(()=>{const F={position:r,left:0,top:0};if(!M.floating)return F;const $=n0(M.floating,u.x),V=n0(M.floating,u.y);return i?{...F,transform:"translate("+$+"px, "+V+"px)",...r0(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:V}},[r,i,M.floating,u.x,u.y]);return G.useMemo(()=>({...u,update:T,refs:w,elements:M,floatingStyles:O}),[u,T,w,M,O])}const C3=f.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return f.createElement(Re.svg,me({},a,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:f.createElement("polygon",{points:"0,0 30,0 15,10"}))});function P3(e){const[t,r]=f.useState(void 0);return rn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,i=c.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}const a0="Popper",[s0,_a]=tn(a0),[M3,i0]=s0(a0),T3=e=>{const{__scopePopper:t,children:r}=e,[n,o]=f.useState(null);return f.createElement(M3,{scope:t,anchor:n,onAnchorChange:o},r)},S3="PopperAnchor",E3=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=i0(S3,r),s=f.useRef(null),i=pt(t,s);return f.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:f.createElement(Re.div,me({},o,{ref:i}))}),l0="PopperContent",[$3,D3]=s0(l0),I3=f.forwardRef((e,t)=>{var r,n,o,a,s,i,l,c;const{__scopePopper:u,side:d="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:b=0,avoidCollisions:y=!0,collisionBoundary:C=[],collisionPadding:x=0,sticky:P="partial",hideWhenDetached:S=!1,updatePositionStrategy:E="optimized",onPlaced:N,...L}=e,g=i0(l0,u),[A,I]=f.useState(null),T=pt(t,X=>I(X)),[D,w]=f.useState(null),M=P3(D),O=(r=M==null?void 0:M.width)!==null&&r!==void 0?r:0,F=(n=M==null?void 0:M.height)!==null&&n!==void 0?n:0,$=d+(p!=="center"?"-"+p:""),V=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},H=Array.isArray(C)?C:[C],K=H.length>0,R={padding:V,boundary:H.filter(N3),altBoundary:K},{refs:re,floatingStyles:U,placement:ie,isPositioned:ee,middlewareData:te}=w3({strategy:"fixed",placement:$,whileElementsMounted:(...X)=>b3(...X,{animationFrame:E==="always"}),elements:{reference:g.anchor},middleware:[X4({mainAxis:h+F,alignmentAxis:m}),y&&Z4({mainAxis:!0,crossAxis:!1,limiter:P==="partial"?J4():void 0,...R}),y&&G4({...R}),e3({...R,apply:({elements:X,rects:Oe,availableWidth:_e,availableHeight:Fe})=>{const{width:De,height:It}=Oe.reference,mt=X.floating.style;mt.setProperty("--radix-popper-available-width",`${_e}px`),mt.setProperty("--radix-popper-available-height",`${Fe}px`),mt.setProperty("--radix-popper-anchor-width",`${De}px`),mt.setProperty("--radix-popper-anchor-height",`${It}px`)}}),D&&x3({element:D,padding:b}),L3({arrowWidth:O,arrowHeight:F}),S&&q4({strategy:"referenceHidden",...R})]}),[ve,be]=c0(ie),fe=Vt(N);rn(()=>{ee&&(fe==null||fe())},[ee,fe]);const de=(o=te.arrow)===null||o===void 0?void 0:o.x,pe=(a=te.arrow)===null||a===void 0?void 0:a.y,Te=((s=te.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[Se,oe]=f.useState();return rn(()=>{A&&oe(window.getComputedStyle(A).zIndex)},[A]),f.createElement("div",{ref:re.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:ee?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(i=te.transformOrigin)===null||i===void 0?void 0:i.x,(l=te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},f.createElement($3,{scope:u,placedSide:ve,onArrowChange:w,arrowX:de,arrowY:pe,shouldHideArrow:Te},f.createElement(Re.div,me({"data-side":ve,"data-align":be},L,{ref:T,style:{...L.style,animation:ee?void 0:"none",opacity:(c=te.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))}),k3="PopperArrow",A3={top:"bottom",right:"left",bottom:"top",left:"right"},O3=f.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=D3(k3,n),s=A3[a.placedSide];return f.createElement("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0}},f.createElement(C3,me({},o,{ref:r,style:{...o.style,display:"block"}})))});function N3(e){return e!==null}const L3=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,a,s;const{placement:i,rects:l,middlewareData:c}=t,d=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[m,b]=c0(i),y={start:"0%",center:"50%",end:"100%"}[b],C=((n=(o=c.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+h/2,x=((a=(s=c.arrow)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)+p/2;let P="",S="";return m==="bottom"?(P=d?y:`${C}px`,S=`${-p}px`):m==="top"?(P=d?y:`${C}px`,S=`${l.floating.height+p}px`):m==="right"?(P=`${-p}px`,S=d?y:`${x}px`):m==="left"&&(P=`${l.floating.width+p}px`,S=d?y:`${x}px`),{data:{x:P,y:S}}}});function c0(e){const[t,r="center"]=e.split("-");return[t,r]}const u0=T3,d0=E3,f0=I3,j3=O3,p0=f.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?mn.createPortal(f.createElement(Re.div,me({},o,{ref:t})),n):null});function _3(e,t){return f.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const ln=e=>{const{present:t,children:r}=e,n=F3(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=pt(n.ref,o.ref);return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};ln.displayName="Presence";function F3(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=_3(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=Fa(n.current);a.current=i==="mounted"?c:"none"},[i]),rn(()=>{const c=n.current,u=o.current;if(u!==e){const h=a.current,p=Fa(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),rn(()=>{if(t){const c=d=>{const p=Fa(n.current).includes(d.animationName);d.target===t&&p&&mn.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(a.current=Fa(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Fa(e){return(e==null?void 0:e.animationName)||"none"}function Va({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=V3({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=Vt(r),l=f.useCallback(c=>{if(a){const d=typeof c=="function"?c(e):c;d!==e&&i(d)}else o(c)},[a,e,o,i]);return[s,l]}function V3({defaultProp:e,onChange:t}){const r=f.useState(e),[n]=r,o=f.useRef(n),a=Vt(t);return f.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}const z3=f.forwardRef((e,t)=>f.createElement(Re.span,me({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[za,Gx]=tn("Tooltip",[_a]),Wa=_a(),W3="TooltipProvider",B3=700,rl="tooltip.open",[R3,nl]=za(W3),K3=e=>{const{__scopeTooltip:t,delayDuration:r=B3,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=f.useState(!0),l=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),f.createElement(R3,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),i(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(u=>{l.current=u},[]),disableHoverableContent:o},a)},ol="Tooltip",[U3,Zn]=za(ol),H3=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=nl(ol,e.__scopeTooltip),c=Wa(t),[u,d]=f.useState(null),h=$a(),p=f.useRef(0),m=s??l.disableHoverableContent,b=i??l.delayDuration,y=f.useRef(!1),[C=!1,x]=Va({prop:n,defaultProp:o,onChange:L=>{L?(l.onOpen(),document.dispatchEvent(new CustomEvent(rl))):l.onClose(),a==null||a(L)}}),P=f.useMemo(()=>C?y.current?"delayed-open":"instant-open":"closed",[C]),S=f.useCallback(()=>{window.clearTimeout(p.current),y.current=!1,x(!0)},[x]),E=f.useCallback(()=>{window.clearTimeout(p.current),x(!1)},[x]),N=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,x(!0)},b)},[b,x]);return f.useEffect(()=>()=>window.clearTimeout(p.current),[]),f.createElement(u0,c,f.createElement(U3,{scope:t,contentId:h,open:C,stateAttribute:P,trigger:u,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayed?N():S()},[l.isOpenDelayed,N,S]),onTriggerLeave:f.useCallback(()=>{m?E():window.clearTimeout(p.current)},[E,m]),onOpen:S,onClose:E,disableHoverableContent:m},r))},h0="TooltipTrigger",Y3=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Zn(h0,r),a=nl(h0,r),s=Wa(r),i=f.useRef(null),l=pt(t,i,o.onTriggerChange),c=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>c.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),f.createElement(d0,me({asChild:!0},s),f.createElement(Re.button,me({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},n,{ref:l,onPointerMove:Le(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:Le(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:Le(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Le(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Le(e.onBlur,o.onClose),onClick:Le(e.onClick,o.onClose)})))}),m0="TooltipPortal",[G3,q3]=za(m0,{forceMount:void 0}),Q3=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Zn(m0,t);return f.createElement(G3,{scope:t,forceMount:r},f.createElement(ln,{present:r||a.open},f.createElement(p0,{asChild:!0,container:o},n)))},Jn="TooltipContent",X3=f.forwardRef((e,t)=>{const r=q3(Jn,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=Zn(Jn,e.__scopeTooltip);return f.createElement(ln,{present:n||s.open},s.disableHoverableContent?f.createElement(g0,me({side:o},a,{ref:t})):f.createElement(Z3,me({side:o},a,{ref:t})))}),Z3=f.forwardRef((e,t)=>{const r=Zn(Jn,e.__scopeTooltip),n=nl(Jn,e.__scopeTooltip),o=f.useRef(null),a=pt(t,o),[s,i]=f.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,h=f.useCallback(()=>{i(null),d(!1)},[d]),p=f.useCallback((m,b)=>{const y=m.currentTarget,C={x:m.clientX,y:m.clientY},x=n6(C,y.getBoundingClientRect()),P=o6(C,x),S=a6(b.getBoundingClientRect()),E=i6([...P,...S]);i(E),d(!0)},[d]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&u){const m=y=>p(y,u),b=y=>p(y,l);return l.addEventListener("pointerleave",m),u.addEventListener("pointerleave",b),()=>{l.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",b)}}},[l,u,p,h]),f.useEffect(()=>{if(s){const m=b=>{const y=b.target,C={x:b.clientX,y:b.clientY},x=(l==null?void 0:l.contains(y))||(u==null?void 0:u.contains(y)),P=!s6(C,s);x?h():P&&(h(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,u,s,c,h]),f.createElement(g0,me({},e,{ref:a}))}),[J3,e6]=za(ol,{isInside:!1}),g0=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Zn(Jn,r),c=Wa(r),{onClose:u}=l;return f.useEffect(()=>(document.addEventListener(rl,u),()=>document.removeEventListener(rl,u)),[u]),f.useEffect(()=>{if(l.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),f.createElement(Fp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u},f.createElement(f0,me({"data-state":l.stateAttribute},c,i,{ref:t,style:{...i.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)"}}),f.createElement(jp,null,n),f.createElement(J3,{scope:r,isInside:!0},f.createElement(z3,{id:l.contentId,role:"tooltip"},o||n))))}),t6="TooltipArrow",r6=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Wa(r);return e6(t6,r).isInside?null:f.createElement(j3,me({},o,n,{ref:t}))});function n6(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function o6(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function a6(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function s6(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,l=t[a].y,c=t[s].x,u=t[s].y;l>n!=u>n&&r<(c-i)*(n-l)/(u-l)+i&&(o=!o)}return o}function i6(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),l6(t)}function l6(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}const c6=K3,u6=H3,d6=Y3,f6=Q3,p6=X3,h6=r6,m6=({children:e,showArrow:t=!1,startOpen:r=!1,content:n,hasCloseButton:o=!1,action:a,size:s="sm"})=>{const[i,l]=f.useState(r),c=we({base:"rounded-lg bg-primary-black-400 px-4 pb-[13px] pt-[12px] font-satoshi text-sm font-medium text-white",variants:{size:{sm:"max-w-[215px]",lg:"max-w-[342px]"}}}),u=()=>{l(!1)},d=()=>{a&&a.onClick(),u()};return j.jsx(c6,{children:j.jsxs(u6,{delayDuration:0,defaultOpen:i,open:i,onOpenChange:h=>l(h),children:[j.jsx(d6,{asChild:!0,children:e}),j.jsx(f6,{children:j.jsxs(p6,{className:c({size:s}),sideOffset:5,children:[j.jsxs("div",{children:[j.jsxs("div",{className:"flex gap-4",children:[n,o&&j.jsx(Ue,{onClick:u,name:"close",className:"mt-1 cursor-pointer text-xs text-white"})]}),a&&j.jsx(Bi,{className:"-mb-1 mt-1 !h-6 !px-0",variant:"tertiaryDark",onClick:d,children:a.label})]}),t&&j.jsx(h6,{className:"TooltipArrow"})]})})]})})};function g6(e){const t=e+"CollectionProvider",[r,n]=tn(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:m,children:b}=p,y=f.useRef(null),C=f.useRef(new Map).current;return f.createElement(o,{scope:m,itemMap:C,collectionRef:y},b)},i=e+"CollectionSlot",l=f.forwardRef((p,m)=>{const{scope:b,children:y}=p,C=a(i,b),x=pt(m,C.collectionRef);return f.createElement(Gn,{ref:x},y)}),c=e+"CollectionItemSlot",u="data-radix-collection-item",d=f.forwardRef((p,m)=>{const{scope:b,children:y,...C}=p,x=f.useRef(null),P=pt(m,x),S=a(c,b);return f.useEffect(()=>(S.itemMap.set(x,{ref:x,...C}),()=>void S.itemMap.delete(x))),f.createElement(Gn,{[u]:"",ref:P},y)});function h(p){const m=a(e+"CollectionConsumer",p);return f.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const C=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((S,E)=>C.indexOf(S.ref.current)-C.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:s,Slot:l,ItemSlot:d},h,n]}const v6=f.createContext(void 0);function v0(e){const t=f.useContext(v6);return e||t||"ltr"}const al="rovingFocusGroup.onEntryFocus",b6={bubbles:!1,cancelable:!0},sl="RovingFocusGroup",[il,b0,y6]=g6(sl),[x6,y0]=tn(sl,[y6]),[w6,C6]=x6(sl),P6=f.forwardRef((e,t)=>f.createElement(il.Provider,{scope:e.__scopeRovingFocusGroup},f.createElement(il.Slot,{scope:e.__scopeRovingFocusGroup},f.createElement(M6,me({},e,{ref:t}))))),M6=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:c,...u}=e,d=f.useRef(null),h=pt(t,d),p=v0(a),[m=null,b]=Va({prop:s,defaultProp:i,onChange:l}),[y,C]=f.useState(!1),x=Vt(c),P=b0(r),S=f.useRef(!1),[E,N]=f.useState(0);return f.useEffect(()=>{const L=d.current;if(L)return L.addEventListener(al,x),()=>L.removeEventListener(al,x)},[x]),f.createElement(w6,{scope:r,orientation:n,dir:p,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(L=>b(L),[b]),onItemShiftTab:f.useCallback(()=>C(!0),[]),onFocusableItemAdd:f.useCallback(()=>N(L=>L+1),[]),onFocusableItemRemove:f.useCallback(()=>N(L=>L-1),[])},f.createElement(Re.div,me({tabIndex:y||E===0?-1:0,"data-orientation":n},u,{ref:h,style:{outline:"none",...e.style},onMouseDown:Le(e.onMouseDown,()=>{S.current=!0}),onFocus:Le(e.onFocus,L=>{const g=!S.current;if(L.target===L.currentTarget&&g&&!y){const A=new CustomEvent(al,b6);if(L.currentTarget.dispatchEvent(A),!A.defaultPrevented){const I=P().filter(O=>O.focusable),T=I.find(O=>O.active),D=I.find(O=>O.id===m),M=[T,D,...I].filter(Boolean).map(O=>O.ref.current);x0(M)}}S.current=!1}),onBlur:Le(e.onBlur,()=>C(!1))})))}),T6="RovingFocusGroupItem",S6=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,...s}=e,i=$a(),l=a||i,c=C6(T6,r),u=c.currentTabStopId===l,d=b0(r),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return f.useEffect(()=>{if(n)return h(),()=>p()},[n,h,p]),f.createElement(il.ItemSlot,{scope:r,id:l,focusable:n,active:o},f.createElement(Re.span,me({tabIndex:u?0:-1,"data-orientation":c.orientation},s,{ref:t,onMouseDown:Le(e.onMouseDown,m=>{n?c.onItemFocus(l):m.preventDefault()}),onFocus:Le(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Le(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const b=D6(m,c.orientation,c.dir);if(b!==void 0){m.preventDefault();let C=d().filter(x=>x.focusable).map(x=>x.ref.current);if(b==="last")C.reverse();else if(b==="prev"||b==="next"){b==="prev"&&C.reverse();const x=C.indexOf(m.currentTarget);C=c.loop?I6(C,x+1):C.slice(x+1)}setTimeout(()=>x0(C))}})})))}),E6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $6(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function D6(e,t,r){const n=$6(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return E6[n]}function x0(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function I6(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const k6=P6,A6=S6,w0="Tabs",[O6,qx]=tn(w0,[y0]),C0=y0(),[N6,ll]=O6(w0),L6=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...c}=e,u=v0(i),[d,h]=Va({prop:n,onChange:o,defaultProp:a});return f.createElement(N6,{scope:r,baseId:$a(),value:d,onValueChange:h,orientation:s,dir:u,activationMode:l},f.createElement(Re.div,me({dir:u,"data-orientation":s},c,{ref:t})))}),j6="TabsList",_6=f.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=ll(j6,r),s=C0(r);return f.createElement(k6,me({asChild:!0},s,{orientation:a.orientation,dir:a.dir,loop:n}),f.createElement(Re.div,me({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))}),F6="TabsTrigger",V6=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,s=ll(F6,r),i=C0(r),l=P0(s.baseId,n),c=M0(s.baseId,n),u=n===s.value;return f.createElement(A6,me({asChild:!0},i,{focusable:!o,active:u}),f.createElement(Re.button,me({type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l},a,{ref:t,onMouseDown:Le(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(n):d.preventDefault()}),onKeyDown:Le(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(n)}),onFocus:Le(e.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!o&&d&&s.onValueChange(n)})})))}),z6="TabsContent",W6=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...s}=e,i=ll(z6,r),l=P0(i.baseId,n),c=M0(i.baseId,n),u=n===i.value,d=f.useRef(u);return f.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),f.createElement(ln,{present:o||u},({present:h})=>f.createElement(Re.div,me({"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0},s,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),h&&a))});function P0(e,t){return`${e}-trigger-${t}`}function M0(e,t){return`${e}-content-${t}`}const B6=L6,R6=_6,K6=V6,U6=W6,H6=({tabs:e,defaultValue:t,variant:r="button",className:n,...o})=>{const a=we({base:"",variants:{variant:{underline:"",button:""}}}),s=we({base:"flex flex-row",variants:{variant:{underline:"",button:""}}}),i=we({base:"flex h-[82px] w-[197px] items-center justify-center gap-2 text-lg font-medium text-primary-grey-700 hover:text-primary-grey-800 data-[state=active]:font-bold data-[state=active]:text-secondary-green-500",variants:{variant:{underline:"border-b border-primary-grey-600 border-t-transparent hover:border-b-4 hover:border-t-3 hover:border-b-primary-grey-700 hover:font-bold data-[state=active]:border-b-4 data-[state=active]:border-t-3 data-[state=active]:border-b-secondary-green-500 data-[state=active]:text-secondary-green-500",button:"relative z-0 -mr-[1px] rounded-none border border-primary-grey-600 first:rounded-l-xl last:rounded-r-xl hover:z-10 hover:border-2 hover:border-primary-grey-800 data-[state=active]:z-20 data-[state=active]:border-2 data-[state=active]:border-secondary-green-500"}}});return j.jsxs(B6,{defaultValue:t??e[0].key,className:a({variant:r,className:n}),...o,children:[j.jsx(R6,{className:s({variant:r}),children:e.map(({icon:l,key:c,title:u})=>j.jsxs(K6,{value:c,className:i({variant:r}),children:[l&&(typeof l=="string"?j.jsx(Ue,{className:"-mt-[1px]",name:l}):l),u]},c))}),e.map(({content:l,key:c})=>j.jsx(U6,{value:c,children:l},c))]})},cl=f.forwardRef(({disabled:e,isDatePicker:t,isInvalid:r,isValid:n,className:o,icon:a,message:s,iconAction:i,...l},c)=>{const u=we({base:"[&_input]:data-[filled-within=true]:!bg-transparent [&_label]:data-[filled-within=true]:!left-[15px] [&_label]:data-[filled-within=true]:!top-[20px] [&_label]:data-[filled-within=true]:!ml-[1px] [&_label]:data-[filled-within=true]:!text-xs [&_label]:data-[filled-within=true]:!text-primary-grey-800",variants:{isInvalid:{true:"[&_label]:data-[filled-within=true]:!text-complementary-red-500"},isValid:{true:"[&_label]:data-[filled-within=true]:!text-secondary-green-500"},disabled:{true:"[&_label]:data-[filled-within=true]:!text-primary-grey-700"}}}),d=we({base:"left-[15px] top-6 font-satoshi font-satoshi text-base text-sm text-primary-grey-800",variants:{isInvalid:{true:"text-complementary-red-500"},isValid:{true:"text-secondary-green-500"},disabled:{true:"text-primary-grey-700"}}}),h=we({base:"text-left font-satoshi text-base",variants:{disabled:{true:"!text-primary-grey-700"},isDatePicker:{true:"!cursor-pointer"}}}),p=we({base:"h-12 rounded-lg border border-primary-grey-700 !bg-white px-[15px] text-black !ring-0 !ring-offset-0",variants:{isInvalid:{true:"border-complementary-red-500"},isValid:{true:"border-secondary-green-500"},disabled:{true:"!border-primary-grey-500 !bg-primary-grey-500"},isDatePicker:{true:"!cursor-pointer"}}}),m=we({base:"mt-[5px] pl-3 font-satoshi",variants:{isInvalid:{true:"text-complementary-red-500"},isValid:{true:"text-secondary-green-500"}}}),b=we({base:"text-primary-grey-800",variants:{iconAction:{true:"cursor-pointer"}}}),{Component:y,label:C,domRef:x,startContent:P,shouldLabelBeOutside:S,shouldLabelBeInside:E,getBaseProps:N,getLabelProps:L,getInputProps:g,getInnerWrapperProps:A,getInputWrapperProps:I,getDescriptionProps:T}=k5({...l,disabled:e,labelPlacement:"outside",ref:c,classNames:{input:h({disabled:e,isDatePicker:t}),inputWrapper:p({isInvalid:r,isValid:n,disabled:e,isDatePicker:t}),base:u({isInvalid:r,isValid:n,disabled:e,className:o}),label:d({isInvalid:r,isValid:n,disabled:e}),description:m({isInvalid:r,isValid:n})}}),D=j.jsx("label",{...L(),children:C}),w=f.useMemo(()=>P||a?j.jsxs("div",{...A(),children:[P,j.jsx("input",{...g()}),a&&(typeof a=="string"?j.jsx(Ue,{onClick:i,name:a,className:b({iconAction:!!i})}):a)]}):j.jsx("input",{...g()}),[P,i,b,a,g,A]);return j.jsxs(y,{...N(),children:[S?D:null,j.jsxs("div",{...I(),role:"button",onClick:()=>{var M;(M=x.current)==null||M.focus()},children:[E?D:null,w]}),s&&j.jsx("div",{...T(),children:s})]})}),Y6=f.forwardRef((e,t)=>{const[r,n]=f.useState(!1),o=()=>{n(a=>!a)};return j.jsx(cl,{ref:t,icon:r?"eye":"eye-off",type:r?"text":"password",iconAction:o,...e})});let ul=0;function G6(){f.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:T0()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:T0()),ul++,()=>{ul===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),ul--}},[])}function T0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const dl="focusScope.autoFocusOnMount",fl="focusScope.autoFocusOnUnmount",S0={bubbles:!1,cancelable:!0},q6=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),c=Vt(o),u=Vt(a),d=f.useRef(null),h=pt(t,b=>l(b)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let b=function(P){if(p.paused||!i)return;const S=P.target;i.contains(S)?d.current=S:ir(d.current,{select:!0})},y=function(P){if(p.paused||!i)return;const S=P.relatedTarget;S!==null&&(i.contains(S)||ir(d.current,{select:!0}))},C=function(P){if(document.activeElement===document.body)for(const E of P)E.removedNodes.length>0&&ir(i)};document.addEventListener("focusin",b),document.addEventListener("focusout",y);const x=new MutationObserver(C);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",y),x.disconnect()}}},[n,i,p.paused]),f.useEffect(()=>{if(i){D0.add(p);const b=document.activeElement;if(!i.contains(b)){const C=new CustomEvent(dl,S0);i.addEventListener(dl,c),i.dispatchEvent(C),C.defaultPrevented||(Q6(t7(E0(i)),{select:!0}),document.activeElement===b&&ir(i))}return()=>{i.removeEventListener(dl,c),setTimeout(()=>{const C=new CustomEvent(fl,S0);i.addEventListener(fl,u),i.dispatchEvent(C),C.defaultPrevented||ir(b??document.body,{select:!0}),i.removeEventListener(fl,u),D0.remove(p)},0)}}},[i,c,u,p]);const m=f.useCallback(b=>{if(!r&&!n||p.paused)return;const y=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,C=document.activeElement;if(y&&C){const x=b.currentTarget,[P,S]=X6(x);P&&S?!b.shiftKey&&C===S?(b.preventDefault(),r&&ir(P,{select:!0})):b.shiftKey&&C===P&&(b.preventDefault(),r&&ir(S,{select:!0})):C===x&&b.preventDefault()}},[r,n,p.paused]);return f.createElement(Re.div,me({tabIndex:-1},s,{ref:h,onKeyDown:m}))});function Q6(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ir(n,{select:t}),document.activeElement!==r)return}function X6(e){const t=E0(e),r=$0(t,e),n=$0(t.reverse(),e);return[r,n]}function E0(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function $0(e,t){for(const r of e)if(!Z6(r,{upTo:t}))return r}function Z6(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function J6(e){return e instanceof HTMLInputElement&&"select"in e}function ir(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&J6(e)&&t&&e.select()}}const D0=e7();function e7(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=I0(e,t),e.unshift(t)},remove(t){var r;e=I0(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function I0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function t7(e){return e.filter(t=>t.tagName!=="A")}var r7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cn=new WeakMap,Ba=new WeakMap,Ra={},pl=0,k0=function(e){return e&&(e.host||k0(e.parentNode))},n7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=k0(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},o7=function(e,t,r,n){var o=n7(t,Array.isArray(e)?e:[e]);Ra[r]||(Ra[r]=new WeakMap);var a=Ra[r],s=[],i=new Set,l=new Set(o),c=function(d){!d||i.has(d)||(i.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))u(h);else{var p=h.getAttribute(n),m=p!==null&&p!=="false",b=(cn.get(h)||0)+1,y=(a.get(h)||0)+1;cn.set(h,b),a.set(h,y),s.push(h),b===1&&m&&Ba.set(h,!0),y===1&&h.setAttribute(r,"true"),m||h.setAttribute(n,"true")}})};return u(t),i.clear(),pl++,function(){s.forEach(function(d){var h=cn.get(d)-1,p=a.get(d)-1;cn.set(d,h),a.set(d,p),h||(Ba.has(d)||d.removeAttribute(n),Ba.delete(d)),p||d.removeAttribute(r)}),pl--,pl||(cn=new WeakMap,cn=new WeakMap,Ba=new WeakMap,Ra={})}},a7=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||r7(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),o7(n,o,r,"aria-hidden")):function(){return null}},A0=V5(),hl=function(){},Ka=G.forwardRef(function(e,t){var r=G.useRef(null),n=G.useState({onScrollCapture:hl,onWheelCapture:hl,onTouchMoveCapture:hl}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,b=e.allowPinchZoom,y=e.as,C=y===void 0?"div":y,x=kc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=h,S=j5([r,t]),E=Pt(Pt({},x),o);return G.createElement(G.Fragment,null,u&&G.createElement(P,{sideCar:A0,removeScrollBar:c,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!b,lockRef:r}),s?G.cloneElement(G.Children.only(i),Pt(Pt({},E),{ref:S})):G.createElement(C,Pt({},E,{className:l,ref:S}),i))});Ka.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ka.classNames={fullWidth:xa,zeroRight:ya};var ml=!1;if(typeof window<"u")try{var Ua=Object.defineProperty({},"passive",{get:function(){return ml=!0,!0}});window.addEventListener("test",Ua,Ua),window.removeEventListener("test",Ua,Ua)}catch{ml=!1}var un=ml?{passive:!1}:!1,s7=function(e){return e.tagName==="TEXTAREA"},O0=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!s7(e)&&r[t]==="visible")},i7=function(e){return O0(e,"overflowY")},l7=function(e){return O0(e,"overflowX")},N0=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=L0(e,r);if(n){var o=j0(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},c7=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},u7=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},L0=function(e,t){return e==="v"?i7(t):l7(t)},j0=function(e,t){return e==="v"?c7(t):u7(t)},d7=function(e,t){return e==="h"&&t==="rtl"?-1:1},f7=function(e,t,r,n,o){var a=d7(e,window.getComputedStyle(t).direction),s=a*n,i=r.target,l=t.contains(i),c=!1,u=s>0,d=0,h=0;do{var p=j0(e,i),m=p[0],b=p[1],y=p[2],C=b-y-a*m;(m||C)&&L0(e,i)&&(d+=C,h+=m),i=i.parentNode}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(u&&(o&&d===0||!o&&s>d)||!u&&(o&&h===0||!o&&-s>h))&&(c=!0),c},Ha=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_0=function(e){return[e.deltaX,e.deltaY]},F0=function(e){return e&&"current"in e?e.current:e},p7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},h7=function(e){return`
|
|
72
|
+
`)},Z5=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,a=G.useMemo(function(){return q5(o)},[o]);return G.createElement(Q5,{styles:X5(a,!t,o,r?"":"!important")})};const xp=new WeakMap;function wa(e,t,r){return typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${xp.get(e)}-${r}-${t}`}function J5(e,t,r){var n;let{key:o,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:i,selectedKey:l}=t,c=o===l,u=a||t.isDisabled||t.disabledKeys.has(o),{itemProps:d,isPressed:h}=Zm({selectionManager:i,key:o,ref:r,isDisabled:u,shouldSelectOnPressUp:s,linkBehavior:"selection"}),p=wa(t,o,"tab"),m=wa(t,o,"tabpanel"),{tabIndex:b}=d,y=t.collection.getItem(o),C=Vr(y==null?void 0:y.props,{isLink:!!(!(y==null||(n=y.props)===null||n===void 0)&&n.href),labelable:!0});return delete C.id,{tabProps:se(C,d,{id:p,"aria-selected":c,"aria-disabled":u||void 0,"aria-controls":c?m:void 0,tabIndex:u?void 0:b,role:"tab"}),isSelected:c,isDisabled:u,isPressed:h}}function e4(e,t,r){let n=Mm(r)?void 0:0;var o;const a=wa(t,(o=e.id)!==null&&o!==void 0?o:t==null?void 0:t.selectedKey,"tabpanel"),s=us({...e,id:a,"aria-labelledby":wa(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:se(s,{tabIndex:n,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class t4{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}getKeyAbove(t){return this.getPreviousKey(t)}getKeyBelow(t){return this.getNextKey(t)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.disabledKeys.has(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.disabledKeys.has(t)&&(t=this.getPreviousKey(t)),t}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.disabledKeys.has(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.disabledKeys.has(t));return t}constructor(t,r,n,o=new Set){this.collection=t,this.flipDirection=r==="rtl"&&n==="horizontal",this.disabledKeys=o}}function r4(e,t,r){let{orientation:n="horizontal",keyboardActivation:o="automatic"}=e,{collection:a,selectionManager:s,disabledKeys:i}=t,{direction:l}=ms(),c=f.useMemo(()=>new t4(a,l,n,i),[a,i,n,l]),{collectionProps:u}=Xm({ref:r,selectionManager:s,keyboardDelegate:c,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),d=Fr();xp.set(t,d);let h=us({...e,id:d});return{tabListProps:{...se(u,h),role:"tablist","aria-orientation":n,tabIndex:void 0}}}var wp=vt((e,t)=>{var r,n,o;const{as:a,state:s,className:i,slots:l,classNames:c,...u}=e,d=a||"div",h=nt(t),{tabPanelProps:p}=e4(e,s,h),{focusProps:m,isFocused:b,isFocusVisible:y}=Mt(),C=s.selectedItem,x=(r=C==null?void 0:C.props)==null?void 0:r.children,P=he(c==null?void 0:c.panel,i,(n=C==null?void 0:C.props)==null?void 0:n.className);return x?j.jsx(d,{ref:h,"data-focus":b,"data-focus-visible":y,...se(p,m,u),className:(o=l.panel)==null?void 0:o.call(l,{class:P}),"data-slot":"panel",children:x}):null});wp.displayName="NextUI.TabPanel";var n4=wp,Cp=vt((e,t)=>{var r;const{className:n,as:o,item:a,state:s,classNames:i,isDisabled:l,listRef:c,slots:u,motionProps:d,disableAnimation:h,disableCursorAnimation:p,shouldSelectOnPressUp:m,onClick:b,...y}=e,{key:C}=a,x=nt(t),P=o||(e.href?"a":"button"),S=typeof P=="string",{tabProps:E,isSelected:N,isDisabled:L,isPressed:g}=J5({key:C,isDisabled:l,shouldSelectOnPressUp:m},s,x),A=l||L,{focusProps:I,isFocused:T,isFocusVisible:D}=Mt(),{hoverProps:w,isHovered:M}=mr({isDisabled:A}),O=he(i==null?void 0:i.tab,n),[,F]=D5({rerender:!0}),$=()=>{dr(b,E.onClick),!(!(x!=null&&x.current)||!(c!=null&&c.current))&&h5(x.current,{scrollMode:"if-needed",behavior:"smooth",block:"end",inline:"end",boundary:c==null?void 0:c.current})};return j.jsxs(P,{ref:x,"data-disabled":Q(L),"data-focus":Q(T),"data-focus-visible":Q(D),"data-hover":Q(M),"data-hover-unselected":Q((M||g)&&!N),"data-pressed":Q(g),"data-selected":Q(N),"data-slot":"tab",...se(E,A?{}:{...I,...w},En(y,{enabled:S,omitPropNames:new Set(["title"])})),className:(r=u.tab)==null?void 0:r.call(u,{class:O}),title:y==null?void 0:y.titleValue,type:P==="button"?"button":void 0,onClick:$,children:[N&&!h&&!p&&F?j.jsx(Bf.span,{className:u.cursor({class:i==null?void 0:i.cursor}),"data-slot":"cursor",layoutDependency:!1,layoutId:"cursor",transition:{type:"spring",bounce:.15,duration:.5},...d}):null,j.jsx("div",{className:u.tabContent({class:i==null?void 0:i.tabContent}),"data-slot":"tabContent",children:a.rendered})]})});Cp.displayName="NextUI.Tab";var o4=Cp;class Pp{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);return r?r.prevKey:null}getKeyAfter(t){let r=this.keyMap.get(t);return r?r.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){let r=this.keyMap.get(t);return(r==null?void 0:r.childNodes)||[]}constructor(t){this.keyMap=new Map,this.iterable=t;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let s of a.childNodes)r(s)};for(let a of t)r(a);let n,o=0;for(let[a,s]of this.keyMap)n?(n.nextKey=a,s.prevKey=n.key):(this.firstKey=a,s.prevKey=void 0),s.type==="item"&&(s.index=o++),n=s,n.nextKey=void 0;this.lastKey=n==null?void 0:n.key}}function a4(e){let{filter:t}=e,r=Oy(e),n=f.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=f.useCallback(c=>t?new Pp(t(c)):new Pp(c),[t]),a=f.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),s=$y(e,o,a),i=f.useMemo(()=>new Ny(s,r),[s,r]);const l=f.useRef(null);return f.useEffect(()=>{if(r.focusedKey!=null&&!s.getItem(r.focusedKey)){const c=l.current.getItem(r.focusedKey),u=[...l.current.getKeys()].map(b=>{const y=l.current.getItem(b);return y.type==="item"?y:null}).filter(b=>b!==null),d=[...s.getKeys()].map(b=>{const y=s.getItem(b);return y.type==="item"?y:null}).filter(b=>b!==null),h=u.length-d.length;let p=Math.min(h>1?Math.max(c.index-h+1,0):c.index,d.length-1),m;for(;p>=0;){if(!i.isDisabled(d[p].key)){m=d[p];break}p<d.length-1?p++:(p>c.index&&(p=c.index),p--)}r.setFocusedKey(m?m.key:null)}l.current=s},[s,i,r,r.focusedKey]),{collection:s,disabledKeys:n,selectionManager:i}}function s4(e){var t;let[r,n]=_r(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),o=f.useMemo(()=>r!=null?[r]:[],[r]),{collection:a,disabledKeys:s,selectionManager:i}=a4({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:c=>{var u;let d=(u=c.values().next().value)!==null&&u!==void 0?u:null;d===r&&e.onSelectionChange&&e.onSelectionChange(d),n(d)}}),l=r!=null?a.getItem(r):null;return{collection:a,disabledKeys:s,selectionManager:i,selectedKey:r,setSelectedKey:n,selectedItem:l}}function i4(e){var t;let r=s4({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:Mp(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:n,collection:o,selectedKey:a}=r,s=f.useRef(a);return f.useEffect(()=>{let i=a;(n.isEmpty||!o.getItem(i))&&(i=Mp(o,r.disabledKeys),i!=null&&n.setSelectedKeys([i])),(i!=null&&n.focusedKey==null||!n.isFocused&&i!==s.current)&&n.setFocusedKey(i),s.current=i}),{...r,isDisabled:e.isDisabled||!1}}function Mp(e,t){let r=null;if(e){for(r=e.getFirstKey();t.has(r)&&r!==e.getLastKey();)r=e.getKeyAfter(r);t.has(r)&&r===e.getLastKey()&&(r=e.getFirstKey())}return r}function l4(e){const[t,r]=Tn(e,Zc.variantKeys),{ref:n,as:o,className:a,classNames:s,children:i,disableCursorAnimation:l,shouldSelectOnPressUp:c=!0,motionProps:u,...d}=t,h=o||"div",p=typeof h=="string",m=nt(n),b=i4({children:i,...d}),{tabListProps:y}=r4(d,b,m),C=f.useMemo(()=>Zc({...r,className:a}),[...Object.values(r),a]),x=he(s==null?void 0:s.base,a),P=f.useMemo(()=>({state:b,slots:C,classNames:s,motionProps:u,listRef:m,shouldSelectOnPressUp:c,disableCursorAnimation:l,isDisabled:e==null?void 0:e.isDisabled,disableAnimation:e==null?void 0:e.disableAnimation}),[b,C,m,u,l,c,e==null?void 0:e.disableAnimation,e==null?void 0:e.isDisabled,s]),S=f.useCallback(N=>({"data-slot":"base",className:C.base({class:he(x,N==null?void 0:N.className)}),...se(En(d,{enabled:p}),N)}),[x,d,C]),E=f.useCallback(N=>({ref:m,"data-slot":"tabList",className:C.tabList({class:he(s==null?void 0:s.tabList,N==null?void 0:N.className)}),...se(y,N)}),[m,y,s,C]);return{Component:h,domRef:m,state:b,values:P,getBaseProps:S,getTabListProps:E}}function Tp(e,t){var r;const{Component:n,values:o,state:a,getBaseProps:s,getTabListProps:i}=l4({...e,ref:t}),l=f.useId(),c=!e.disableAnimation&&!e.disableCursorAnimation,u={state:a,listRef:o.listRef,slots:o.slots,classNames:o.classNames,isDisabled:o.isDisabled,motionProps:o.motionProps,disableAnimation:o.disableAnimation,shouldSelectOnPressUp:o.shouldSelectOnPressUp,disableCursorAnimation:o.disableCursorAnimation},d=[...a.collection].map(h=>j.jsx(o4,{item:h,...u,...h.props},h.key));return j.jsxs(j.Fragment,{children:[j.jsx("div",{...s(),children:j.jsx(n,{...i(),children:c?j.jsx(Py,{id:l,children:d}):d})}),j.jsx(n4,{classNames:o.classNames,slots:o.slots,state:o.state},(r=a.selectedItem)==null?void 0:r.key)]})}var c4=vt(Tp);Tp.displayName="NextUI.Tabs";var u4=Ty,d4=u4;const f4=({icons:e,className:t})=>{const r=we({base:"bg-primary-grey-700",variants:{withIcon:{false:"h-6 w-11 px-[2px] group-data-[selected=true]:bg-secondary-green-500",true:"h-[52px] w-[88px] bg-secondary-green-500 group-data-[selected=true]:bg-primary-green-500"}}}),n=we({variants:{withIcon:{false:"h-5 w-5 group-data-[selected=true]:ml-5",true:"h-11 w-11 group-data-[selected=true]:ml-9"}}});return j.jsx($5,{classNames:{wrapper:r({withIcon:!!e,className:t}),thumb:n({withIcon:!!e})},thumbIcon:({isSelected:o,className:a})=>e&&(o?j.jsx(Ue,{name:e.selectedIcon,className:Gt(a,"text-lg")}):j.jsx(Ue,{name:e.unselectedIcon,className:Gt(a,"text-lg")}))})},p4=e=>j.jsx(d5,{classNames:{wrapper:"w-4 h-4 rounded-sm before:rounded-sm before:border before:border-primary-grey-700 after:rounded-sm after:bg-secondary-green-500",icon:"w-[11px] h-2.5 [&>*]:stroke-[4px]"},...e}),Sp=({size:e="md",className:t,border:r=!1,image:n,label:o,...a})=>{const s=we({base:"bg-white font-satoshi font-bold capitalize text-white",variants:{size:{lg:"h-28 w-28 text-[48px]",md:"h-[72px] w-[72px] text-[32px]",sm:"h-12 w-12 text-[24px]",xs:"h-6 w-6 text-[12px]"},border:{true:"border-primary-grey-600"},isText:{true:"bg-complementary-violet-500 "}},compoundVariants:[{border:!0,size:"lg",class:"border-[4px]"},{border:!0,size:"md",class:"border-[3px]"},{border:!0,size:"sm",class:"border-2"},{border:!0,size:"xs",class:"border"}]}),i=we({base:"text-primary-grey-600",variants:{size:{xs:"text-[12px]",sm:"text-[24px]",md:"text-[32px]",lg:"text-[48px]"}}});return j.jsx(zy,{fallback:!o&&j.jsx(Ue,{name:"user",className:i({size:e})}),showFallback:!!o,src:n,name:o,className:s({size:e,border:r,isText:!!(o&&!n),className:t}),...a})},h4=({options:e,labelPosition:t="right"})=>j.jsx(P5,{children:e.map(r=>j.jsxs("div",{className:"flex items-center gap-2",children:[t==="left"&&j.jsx("label",{"data-testid":"label-position-left",children:r.label}),j.jsx(T5,{value:r.value,id:r.id,classNames:{wrapper:"border border-primary-grey-700 group-data-[selected=true]:border-secondary-green-500 group-data-[selected=true]:bg-secondary-green-500",control:"bg-white"}}),t==="right"&&r.label&&j.jsx("label",{"data-testid":"label-position-right",children:r.label})]},r.value))}),Bi=({children:e,size:t,variant:r="primary",disabled:n,full:o=!1,iconLeft:a,iconRight:s,className:i,hasLoading:l,isLoadingComplete:c,onClick:u,onLoadingAnimationComplete:d,...h})=>{const[p,m]=f.useState(!1);let b=null;const[y,C]=f.useState("w-0"),x=E=>{if(l){m(!0);let N=1;b=setInterval(()=>{C(`w-${N}/4`),N<3?N++:b&&clearInterval(b)},1e3)}u&&u(E)},P=we({base:`absolute left-0 top-0 h-full rounded-full bg-transparent duration-1000 ease-in ${y}`,variants:{isLoadingComplete:{true:"w-full duration-500",false:""},loadingVariant:{primaryDark:"bg-white",primaryLight:"bg-primary-green-500 ",primary:"bg-primary-green-500 ",negative:"bg-complementary-red-700",secondaryNegative:"bg-complementary-red-50",secondary:"bg-secondary-green-50",tertiary:"",tertiaryDark:"",tertiaryLight:"",direction:"",directionCircle:""}}}),S=we({base:"relative !overflow-hidden rounded-full border-transparent px-10 py-4 font-bold text-white !ring-0 !ring-transparent hover:text-white focus:outline focus:outline-2 focus:-outline-offset-4 focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-4 focus-visible:outline-white",variants:{size:{small:"h-9",medium:"h-12",large:"h-14"},variant:{primaryDark:"bg-white text-primary-green-500 hover:bg-secondary-green-500 focus:bg-secondary-green-500 focus:text-white focus:outline-primary-green-500",primaryLight:"bg-primary-green-500 hover:bg-white hover:text-secondary-green-500 focus:bg-white focus:text-secondary-green-500 focus:outline-secondary-green-500",primary:"bg-primary-green-500 hover:bg-secondary-green-500 focus:bg-secondary-green-500 focus:outline-white",negative:"bg-complementary-red-700 hover:border-transparent hover:bg-complementary-red-500 focus:bg-complementary-red-500 focus:outline-white",secondaryNegative:"border border-complementary-red-700 !bg-white font-medium text-complementary-red-700 hover:border-2 hover:border-complementary-red-500 hover:text-complementary-red-500 focus:border-[3px] focus:border-complementary-red-500 focus:text-complementary-red-500",secondary:"border border-primary-green-500 !bg-transparent font-medium text-primary-green-500 hover:border-2 hover:border-secondary-green-500 hover:text-secondary-green-500 focus:border-[3px] focus:border-secondary-green-500 focus:text-secondary-green-500",tertiary:"!bg-transparent px-4 font-medium text-primary-green-500 hover:text-secondary-green-500 focus:font-bold focus:text-secondary-green-500 focus:outline-none",tertiaryDark:"!bg-transparent px-4 font-medium text-secondary-green-500 focus:font-bold focus:text-secondary-green-500 focus:outline-none",tertiaryLight:"!bg-transparent px-4 font-medium text-primary-green-500 focus:font-bold focus:text-primary-green-500 focus:outline-none",direction:"h-10 bg-primary-green-500 p-2.5 font-medium hover:bg-secondary-green-500 focus:border-none focus:bg-secondary-green-500 focus:outline-none",directionCircle:"font:medium bg-primary-green-500 hover:bg-secondary-green-500 focus:border-none focus:bg-secondary-green-500 focus:outline-none"},full:{true:"w-full",false:""},disabled:{true:"pointer-events-none border-transparent bg-primary-grey-500 font-medium text-primary-grey-700",false:""},isLoading:{true:"",false:""},hasIcon:{true:"!px-6"}},compoundVariants:[{variant:"primaryDark",isLoading:!0,class:"!bg-secondary-green-500 !text-primary-green-500 focus:bg-secondary-green-500 focus:outline-secondary-green-500"},{variant:"primaryLight",isLoading:!0,class:"!bg-white text-secondary-green-500 focus:outline-white"},{variant:"primary",isLoading:!0,class:"!bg-secondary-green-500 focus:outline-secondary-green-500"},{variant:"negative",isLoading:!0,class:"!bg-complementary-red-500 focus:outline-complementary-red-500"},{variant:"secondaryNegative",isLoading:!0,class:"!border !border-complementary-red-700 !bg-white text-complementary-red-700 focus:outline-none"},{variant:"secondary",isLoading:!0,class:"!border !border-secondary-green-500 !bg-white text-secondary-green-500 focus:outline-none"},{variant:"tertiary",isLoading:!0,class:"!font-medium"},{variant:"tertiaryDark",isLoading:!0,class:"!font-medium"},{variant:"tertiaryLight",isLoading:!0,class:"!font-medium"},{variant:"secondaryNegative",disabled:!0,class:"border border-primary-grey-700 bg-transparent"},{variant:"secondary",disabled:!0,class:"border border-primary-grey-700 bg-transparent"},{variant:"tertiary",disabled:!0,class:"bg-transparent underline"},{variant:"directionCircle",hasIcon:!0,class:"!min-w-unit-10 !px-0"}]});return f.useEffect(()=>{setTimeout(()=>{d&&d()})},[c,d]),f.useEffect(()=>()=>{b&&clearInterval(b)},[b]),j.jsx(qy,{onClick:x,className:Gt(i,S({size:t,variant:r,disabled:n,full:o,isLoading:p,hasIcon:!!(a||s)})),...h,children:j.jsxs("div",{children:[j.jsx("div",{className:Gt(i,P({isLoadingComplete:c,loadingVariant:r}))}),j.jsxs("div",{className:"relative flex items-center gap-3 text-center",children:[a&&(typeof a=="string"?j.jsx(Ue,{"data-testid":"button-component-icon-left",name:a}):a),e&&j.jsx("span",{className:r.includes("tertiary")?"underline":"",children:e}),s&&(typeof s=="string"?j.jsx(Ue,{"data-testid":"button-component-icon-right",name:s}):s)]})]})})},m4=({children:e,className:t,avatar:r,size:n="sm",disabled:o=!1,iconLeft:a,iconRight:s})=>{const i=we({base:"flex h-6 cursor-pointer items-center justify-center gap-2 border border-primary-green-500 bg-white px-2 pt-[1px] font-satoshi text-[10px] font-medium leading-[15px] text-primary-green-500 hover:border-secondary-green-500 hover:text-secondary-green-500 active:border-[2px] active:px-[7px]",variants:{size:{sm:"",lg:"h-[54px] gap-3 px-4 text-base active:px-[15px]"},hasAvatar:{true:"!border-0 bg-primary-grey-600 pl-6"},disabled:{true:"cursor-default !border-1 !border-primary-grey-500 bg-primary-grey-500 !text-primary-grey-800"}},compoundVariants:[{size:"sm",hasAvatar:!0,class:"pl-6 active:pl-[24px] active:pr-[8px]"},{size:"lg",hasAvatar:!0,class:"pl-14 active:pl-[56px] active:pr-[16px]"},{size:"sm",disabled:!0,class:"active:px-[8px]"},{size:"lg",disabled:!0,class:"active:px-[16px]"}]}),l=we({base:"absolute left-0 top-0",variants:{size:{sm:"",lg:"h-[54px] w-[54px]"}}}),c=we({base:"text-xs",variants:{size:{sm:"",lg:"text-lg"}}});return j.jsxs(rp,{size:n,className:Gt(i({hasAvatar:!!r,size:n,disabled:o,className:t})),startContent:a&&(typeof a=="string"?j.jsx(Ue,{className:c({size:n}),name:a}):a),endContent:s&&(typeof s=="string"?j.jsx(Ue,{className:c({size:n}),name:s}):s),children:[r&&j.jsx(Sp,{className:l({size:n}),border:!1,size:"xs",image:r}),e]})},g4=({tabs:e,tabClass:t,size:r="md",onSelectionChange:n,...o})=>{const a=we({base:"bg-primary-grey-500 p-[1px]",variants:{size:{sm:"h-8",md:"h-9",lg:"h-12"}}}),s=we({base:"h-full font-medium text-primary-grey-800 data-[selected=true]:!font-bold data-[selected=true]:!text-primary-green-500 data-[hover='true']:opacity-100",variants:{size:{sm:"px-[40px]",md:"px-[80px]",lg:"px-[75px]"},tabClass:{}}}),i=we({base:"!text-white shadow-none"}),l=we({base:"!font-inherit flex items-center gap-2 font-satoshi !text-inherit",variants:{size:{sm:"text-[14px]",md:"text-[14px]",lg:"text-[20px]"}}});return j.jsx(c4,{onClick:c=>{const u=c.target,d=u.parentElement.getAttribute("data-selected");let h=u.getAttribute("data-key");h||(h=u.parentElement.getAttribute("data-key")),!d&&h&&n(h)},classNames:{tabList:a({size:r}),tab:s({size:r,className:t}),cursor:i(),tabContent:l({size:r})},radius:"full",size:r,...o,children:e.map(({key:c,title:u,component:d,icon:h})=>j.jsx(d4,{title:j.jsxs(j.Fragment,{children:[h&&(typeof h=="string"?j.jsx(Ue,{className:"text-[16px]",name:h}):h)," ",u]}),children:d},c))})},Ep=({message:e,actions:t,inlineActions:r=!0})=>{const n=we({base:"flex gap-3 rounded-lg bg-primary-black-400 p-4",variants:{inlineActions:{true:"flex flex-row",false:"flex flex-col items-end justify-end"},toastType:{alert:"rounded-2xl bg-primary-grey-600",snackbar:"bg-primary-black-400",banner:"rounded-2xl bg-complementary-red-500"}}});return j.jsxs("div",{className:n({inlineActions:r}),children:[j.jsx("div",{className:"flex flex-1 items-center gap-4",children:j.jsx("p",{className:"font-satoshi text-sm",children:e})}),j.jsx("div",{children:t&&j.jsx("div",{className:"flex",children:t.map(({label:o,onClick:a})=>j.jsx(Bi,{onClick:a,variant:"tertiaryDark",children:o},o))})})]})};function $p(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=$p(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function nr(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=$p(e))&&(n&&(n+=" "),n+=t);return n}const Un=e=>typeof e=="number"&&!isNaN(e),Tr=e=>typeof e=="string",Xe=e=>typeof e=="function",Ca=e=>Tr(e)||Xe(e)?e:null,Ri=e=>f.isValidElement(e)||Tr(e)||Xe(e)||Un(e);function v4(e,t,r){r===void 0&&(r=300);const{scrollHeight:n,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=n+"px",o.transition=`all ${r}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,r)})})}function Pa(e){let{enter:t,exit:r,appendPosition:n=!1,collapse:o=!0,collapseDuration:a=300}=e;return function(s){let{children:i,position:l,preventExitTransition:c,done:u,nodeRef:d,isIn:h}=s;const p=n?`${t}--${l}`:t,m=n?`${r}--${l}`:r,b=f.useRef(0);return f.useLayoutEffect(()=>{const y=d.current,C=p.split(" "),x=P=>{P.target===d.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",x),y.removeEventListener("animationcancel",x),b.current===0&&P.type!=="animationcancel"&&y.classList.remove(...C))};y.classList.add(...C),y.addEventListener("animationend",x),y.addEventListener("animationcancel",x)},[]),f.useEffect(()=>{const y=d.current,C=()=>{y.removeEventListener("animationend",C),o?v4(y,u,a):u()};h||(c?C():(b.current=1,y.className+=` ${m}`,y.addEventListener("animationend",C)))},[h]),f.createElement(f.Fragment,null,i)}}function Dp(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const ft={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const r=this.list.get(e).filter(n=>n!==t);return this.list.set(e,r),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const r=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(r)})}},Ma=e=>{let{theme:t,type:r,...n}=e;return f.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...n})},Ki={info:function(e){return f.createElement(Ma,{...e},f.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return f.createElement(Ma,{...e},f.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return f.createElement(Ma,{...e},f.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return f.createElement(Ma,{...e},f.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return f.createElement("div",{className:"Toastify__spinner"})}};function b4(e){const[,t]=f.useReducer(p=>p+1,0),[r,n]=f.useState([]),o=f.useRef(null),a=f.useRef(new Map).current,s=p=>r.indexOf(p)!==-1,i=f.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:s,getToast:p=>a.get(p)}).current;function l(p){let{containerId:m}=p;const{limit:b}=i.props;!b||m&&i.containerId!==m||(i.count-=i.queue.length,i.queue=[])}function c(p){n(m=>p==null?[]:m.filter(b=>b!==p))}function u(){const{toastContent:p,toastProps:m,staleId:b}=i.queue.shift();h(p,m,b)}function d(p,m){let{delay:b,staleId:y,...C}=m;if(!Ri(p)||function(D){return!o.current||i.props.enableMultiContainer&&D.containerId!==i.props.containerId||a.has(D.toastId)&&D.updateId==null}(C))return;const{toastId:x,updateId:P,data:S}=C,{props:E}=i,N=()=>c(x),L=P==null;L&&i.count++;const g={...E,style:E.toastStyle,key:i.toastKey++,...Object.fromEntries(Object.entries(C).filter(D=>{let[w,M]=D;return M!=null})),toastId:x,updateId:P,data:S,closeToast:N,isIn:!1,className:Ca(C.className||E.toastClassName),bodyClassName:Ca(C.bodyClassName||E.bodyClassName),progressClassName:Ca(C.progressClassName||E.progressClassName),autoClose:!C.isLoading&&(A=C.autoClose,I=E.autoClose,A===!1||Un(A)&&A>0?A:I),deleteToast(){const D=Dp(a.get(x),"removed");a.delete(x),ft.emit(4,D);const w=i.queue.length;if(i.count=x==null?i.count-i.displayedToast:i.count-1,i.count<0&&(i.count=0),w>0){const M=x==null?i.props.limit:1;if(w===1||M===1)i.displayedToast++,u();else{const O=M>w?w:M;i.displayedToast=O;for(let F=0;F<O;F++)u()}}else t()}};var A,I;g.iconOut=function(D){let{theme:w,type:M,isLoading:O,icon:F}=D,$=null;const V={theme:w,type:M};return F===!1||(Xe(F)?$=F(V):f.isValidElement(F)?$=f.cloneElement(F,V):Tr(F)||Un(F)?$=F:O?$=Ki.spinner():(H=>H in Ki)(M)&&($=Ki[M](V))),$}(g),Xe(C.onOpen)&&(g.onOpen=C.onOpen),Xe(C.onClose)&&(g.onClose=C.onClose),g.closeButton=E.closeButton,C.closeButton===!1||Ri(C.closeButton)?g.closeButton=C.closeButton:C.closeButton===!0&&(g.closeButton=!Ri(E.closeButton)||E.closeButton);let T=p;f.isValidElement(p)&&!Tr(p.type)?T=f.cloneElement(p,{closeToast:N,toastProps:g,data:S}):Xe(p)&&(T=p({closeToast:N,toastProps:g,data:S})),E.limit&&E.limit>0&&i.count>E.limit&&L?i.queue.push({toastContent:T,toastProps:g,staleId:y}):Un(b)?setTimeout(()=>{h(T,g,y)},b):h(T,g,y)}function h(p,m,b){const{toastId:y}=m;b&&a.delete(b);const C={content:p,props:m};a.set(y,C),n(x=>[...x,y].filter(P=>P!==b)),ft.emit(4,Dp(C,C.props.updateId==null?"added":"updated"))}return f.useEffect(()=>(i.containerId=e.containerId,ft.cancelEmit(3).on(0,d).on(1,p=>o.current&&c(p)).on(5,l).emit(2,i),()=>{a.clear(),ft.emit(3,i)}),[]),f.useEffect(()=>{i.props=e,i.isToastActive=s,i.displayedToast=r.length}),{getToastToRender:function(p){const m=new Map,b=Array.from(a.values());return e.newestOnTop&&b.reverse(),b.forEach(y=>{const{position:C}=y.props;m.has(C)||m.set(C,[]),m.get(C).push(y)}),Array.from(m,y=>p(y[0],y[1]))},containerRef:o,isToastActive:s}}function Ip(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function kp(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function y4(e){const[t,r]=f.useState(!1),[n,o]=f.useState(!1),a=f.useRef(null),s=f.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,i=f.useRef(e),{autoClose:l,pauseOnHover:c,closeToast:u,onClick:d,closeOnClick:h}=e;function p(S){if(e.draggable){S.nativeEvent.type==="touchstart"&&S.nativeEvent.preventDefault(),s.didMove=!1,document.addEventListener("mousemove",C),document.addEventListener("mouseup",x),document.addEventListener("touchmove",C),document.addEventListener("touchend",x);const E=a.current;s.canCloseOnClick=!0,s.canDrag=!0,s.boundingRect=E.getBoundingClientRect(),E.style.transition="",s.x=Ip(S.nativeEvent),s.y=kp(S.nativeEvent),e.draggableDirection==="x"?(s.start=s.x,s.removalDistance=E.offsetWidth*(e.draggablePercent/100)):(s.start=s.y,s.removalDistance=E.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function m(S){if(s.boundingRect){const{top:E,bottom:N,left:L,right:g}=s.boundingRect;S.nativeEvent.type!=="touchend"&&e.pauseOnHover&&s.x>=L&&s.x<=g&&s.y>=E&&s.y<=N?y():b()}}function b(){r(!0)}function y(){r(!1)}function C(S){const E=a.current;s.canDrag&&E&&(s.didMove=!0,t&&y(),s.x=Ip(S),s.y=kp(S),s.delta=e.draggableDirection==="x"?s.x-s.start:s.y-s.start,s.start!==s.x&&(s.canCloseOnClick=!1),E.style.transform=`translate${e.draggableDirection}(${s.delta}px)`,E.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function x(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",x);const S=a.current;if(s.canDrag&&s.didMove&&S){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),void e.closeToast();S.style.transition="transform 0.2s, opacity 0.2s",S.style.transform=`translate${e.draggableDirection}(0)`,S.style.opacity="1"}}f.useEffect(()=>{i.current=e}),f.useEffect(()=>(a.current&&a.current.addEventListener("d",b,{once:!0}),Xe(e.onOpen)&&e.onOpen(f.isValidElement(e.children)&&e.children.props),()=>{const S=i.current;Xe(S.onClose)&&S.onClose(f.isValidElement(S.children)&&S.children.props)}),[]),f.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",b),window.addEventListener("blur",y)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",y))}),[e.pauseOnFocusLoss]);const P={onMouseDown:p,onTouchStart:p,onMouseUp:m,onTouchEnd:m};return l&&c&&(P.onMouseEnter=y,P.onMouseLeave=b),h&&(P.onClick=S=>{d&&d(S),s.canCloseOnClick&&u()}),{playToast:b,pauseToast:y,isRunning:t,preventExitTransition:n,toastRef:a,eventHandlers:P}}function Ap(e){let{closeToast:t,theme:r,ariaLabel:n="close"}=e;return f.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":n},f.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},f.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function x4(e){let{delay:t,isRunning:r,closeToast:n,type:o="default",hide:a,className:s,style:i,controlledProgress:l,progress:c,rtl:u,isIn:d,theme:h}=e;const p=a||l&&c===0,m={...i,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused",opacity:p?0:1};l&&(m.transform=`scaleX(${c})`);const b=nr("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),y=Xe(s)?s({rtl:u,type:o,defaultClassName:b}):nr(b,s);return f.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:y,style:m,[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{d&&n()}})}const w4=e=>{const{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:o}=y4(e),{closeButton:a,children:s,autoClose:i,onClick:l,type:c,hideProgressBar:u,closeToast:d,transition:h,position:p,className:m,style:b,bodyClassName:y,bodyStyle:C,progressClassName:x,progressStyle:P,updateId:S,role:E,progress:N,rtl:L,toastId:g,deleteToast:A,isIn:I,isLoading:T,iconOut:D,closeOnClick:w,theme:M}=e,O=nr("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":L},{"Toastify__toast--close-on-click":w}),F=Xe(m)?m({rtl:L,position:p,type:c,defaultClassName:O}):nr(O,m),$=!!N||!i,V={closeToast:d,type:c,theme:M};let H=null;return a===!1||(H=Xe(a)?a(V):f.isValidElement(a)?f.cloneElement(a,V):Ap(V)),f.createElement(h,{isIn:I,done:A,position:p,preventExitTransition:r,nodeRef:n},f.createElement("div",{id:g,onClick:l,className:F,...o,style:b,ref:n},f.createElement("div",{...I&&{role:E},className:Xe(y)?y({type:c}):nr("Toastify__toast-body",y),style:C},D!=null&&f.createElement("div",{className:nr("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!T})},D),f.createElement("div",null,s)),H,f.createElement(x4,{...S&&!$?{key:`pb-${S}`}:{},rtl:L,theme:M,delay:i,isRunning:t,isIn:I,closeToast:d,hide:u,type:c,style:P,className:x,controlledProgress:$,progress:N||0})))},Ta=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},C4=Pa(Ta("bounce",!0));Pa(Ta("slide",!0)),Pa(Ta("zoom")),Pa(Ta("flip"));const Op=f.forwardRef((e,t)=>{const{getToastToRender:r,containerRef:n,isToastActive:o}=b4(e),{className:a,style:s,rtl:i,containerId:l}=e;function c(u){const d=nr("Toastify__toast-container",`Toastify__toast-container--${u}`,{"Toastify__toast-container--rtl":i});return Xe(a)?a({position:u,rtl:i,defaultClassName:d}):nr(d,Ca(a))}return f.useEffect(()=>{t&&(t.current=n.current)},[]),f.createElement("div",{ref:n,className:"Toastify",id:l},r((u,d)=>{const h=d.length?{...s}:{...s,pointerEvents:"none"};return f.createElement("div",{className:c(u),style:h,key:`container-${u}`},d.map((p,m)=>{let{content:b,props:y}=p;return f.createElement(w4,{...y,isIn:o(y.toastId),style:{...y.style,"--nth":m+1,"--len":d.length},key:`toast-${y.key}`},b)}))}))});Op.displayName="ToastContainer",Op.defaultProps={position:"top-right",transition:C4,autoClose:5e3,closeButton:Ap,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let Ui,Sr=new Map,Hn=[],P4=1;function Np(){return""+P4++}function M4(e){return e&&(Tr(e.toastId)||Un(e.toastId))?e.toastId:Np()}function Yn(e,t){return Sr.size>0?ft.emit(0,e,t):Hn.push({content:e,options:t}),t.toastId}function Sa(e,t){return{...t,type:t&&t.type||e,toastId:M4(t)}}function Ea(e){return(t,r)=>Yn(t,Sa(e,r))}function Ae(e,t){return Yn(e,Sa("default",t))}Ae.loading=(e,t)=>Yn(e,Sa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ae.promise=function(e,t,r){let n,{pending:o,error:a,success:s}=t;o&&(n=Tr(o)?Ae.loading(o,r):Ae.loading(o.render,{...r,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,d,h)=>{if(d==null)return void Ae.dismiss(n);const p={type:u,...i,...r,data:h},m=Tr(d)?{render:d}:d;return n?Ae.update(n,{...p,...m}):Ae(m.render,{...p,...m}),h},c=Xe(e)?e():e;return c.then(u=>l("success",s,u)).catch(u=>l("error",a,u)),c},Ae.success=Ea("success"),Ae.info=Ea("info"),Ae.error=Ea("error"),Ae.warning=Ea("warning"),Ae.warn=Ae.warning,Ae.dark=(e,t)=>Yn(e,Sa("default",{theme:"dark",...t})),Ae.dismiss=e=>{Sr.size>0?ft.emit(1,e):Hn=Hn.filter(t=>e!=null&&t.options.toastId!==e)},Ae.clearWaitingQueue=function(e){return e===void 0&&(e={}),ft.emit(5,e)},Ae.isActive=e=>{let t=!1;return Sr.forEach(r=>{r.isToastActive&&r.isToastActive(e)&&(t=!0)}),t},Ae.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const r=function(n,o){let{containerId:a}=o;const s=Sr.get(a||Ui);return s&&s.getToast(n)}(e,t);if(r){const{props:n,content:o}=r,a={delay:100,...n,...t,toastId:t.toastId||e,updateId:Np()};a.toastId!==e&&(a.staleId=e);const s=a.render||o;delete a.render,Yn(s,a)}},0)},Ae.done=e=>{Ae.update(e,{progress:1})},Ae.onChange=e=>(ft.on(4,e),()=>{ft.off(4,e)}),Ae.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Ae.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},ft.on(2,e=>{Ui=e.containerId||e,Sr.set(Ui,e),Hn.forEach(t=>{ft.emit(0,t.content,t.options)}),Hn=[]}).on(3,e=>{Sr.delete(e.containerId||e),Sr.size===0&&ft.off(0).off(1).off(5)});const Kx="",T4=()=>({snackbar:(t,r)=>{Ae(j.jsx(Ep,{message:t,actions:r==null?void 0:r.actions,inlineActions:r==null?void 0:r.inlineActions}))}});function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},me.apply(this,arguments)}function Le(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function S4(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Lp(...e){return t=>e.forEach(r=>S4(r,t))}function pt(...e){return f.useCallback(Lp(...e),e)}function tn(e,t=[]){let r=[];function n(a,s){const i=f.createContext(s),l=r.length;r=[...r,s];function c(d){const{scope:h,children:p,...m}=d,b=(h==null?void 0:h[e][l])||i,y=f.useMemo(()=>m,Object.values(m));return f.createElement(b.Provider,{value:y},p)}function u(d,h){const p=(h==null?void 0:h[e][l])||i,m=f.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,u]}const o=()=>{const a=r.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[n,E4(o,...t)]}function E4(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:l,scopeName:c})=>{const d=l(a)[`__scope${c}`];return{...i,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}const Gn=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find($4);if(a){const s=a.props.children,i=o.map(l=>l===a?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:l);return f.createElement(Hi,me({},n,{ref:t}),f.isValidElement(s)?f.cloneElement(s,void 0,i):null)}return f.createElement(Hi,me({},n,{ref:t}),r)});Gn.displayName="Slot";const Hi=f.forwardRef((e,t)=>{const{children:r,...n}=e;return f.isValidElement(r)?f.cloneElement(r,{...D4(n,r.props),ref:t?Lp(t,r.ref):r.ref}):f.Children.count(r)>1?f.Children.only(null):null});Hi.displayName="SlotClone";const jp=({children:e})=>f.createElement(f.Fragment,null,e);function $4(e){return f.isValidElement(e)&&e.type===jp}function D4(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{a(...i),o(...i)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}const Re=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...s}=n,i=a?Gn:t;return f.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),f.createElement(i,me({},s,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function I4(e,t){e&&mn.flushSync(()=>e.dispatchEvent(t))}function Vt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function k4(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e);f.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Yi="dismissableLayer.update",A4="dismissableLayer.pointerDownOutside",O4="dismissableLayer.focusOutside";let _p;const N4=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fp=f.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=f.useContext(N4),[d,h]=f.useState(null),p=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=f.useState({}),b=pt(t,g=>h(g)),y=Array.from(u.layers),[C]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(C),P=d?y.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,E=P>=x,N=L4(g=>{const A=g.target,I=[...u.branches].some(T=>T.contains(A));!E||I||(a==null||a(g),i==null||i(g),g.defaultPrevented||l==null||l())},p),L=j4(g=>{const A=g.target;[...u.branches].some(T=>T.contains(A))||(s==null||s(g),i==null||i(g),g.defaultPrevented||l==null||l())},p);return k4(g=>{P===u.layers.size-1&&(o==null||o(g),!g.defaultPrevented&&l&&(g.preventDefault(),l()))},p),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_p=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Vp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=_p)}},[d,p,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Vp())},[d,u]),f.useEffect(()=>{const g=()=>m({});return document.addEventListener(Yi,g),()=>document.removeEventListener(Yi,g)},[]),f.createElement(Re.div,me({},c,{ref:b,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,L.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,N.onPointerDownCapture)}))});function L4(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e),n=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){zp(A4,r,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function j4(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e),n=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!n.current&&zp(O4,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Vp(){const e=new CustomEvent(Yi);document.dispatchEvent(e)}function zp(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?I4(o,a):o.dispatchEvent(a)}const rn=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},_4=G["useId".toString()]||(()=>{});let F4=0;function $a(e){const[t,r]=G.useState(_4());return rn(()=>{e||r(n=>n??String(F4++))},[e]),e||(t?`radix-${t}`:"")}const V4=["top","right","bottom","left"],or=Math.min,at=Math.max,Da=Math.round,Ia=Math.floor,ar=e=>({x:e,y:e}),z4={left:"right",right:"left",bottom:"top",top:"bottom"},W4={start:"end",end:"start"};function Gi(e,t,r){return at(e,or(t,r))}function zt(e,t){return typeof e=="function"?e(t):e}function Wt(e){return e.split("-")[0]}function nn(e){return e.split("-")[1]}function qi(e){return e==="x"?"y":"x"}function Qi(e){return e==="y"?"height":"width"}function on(e){return["top","bottom"].includes(Wt(e))?"y":"x"}function Xi(e){return qi(on(e))}function B4(e,t,r){r===void 0&&(r=!1);const n=nn(e),o=Xi(e),a=Qi(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=ka(s)),[s,ka(s)]}function R4(e){const t=ka(e);return[Zi(e),t,Zi(t)]}function Zi(e){return e.replace(/start|end/g,t=>W4[t])}function K4(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function U4(e,t,r,n){const o=nn(e);let a=K4(Wt(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Zi)))),a}function ka(e){return e.replace(/left|right|bottom|top/g,t=>z4[t])}function H4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wp(e){return typeof e!="number"?H4(e):{top:e,right:e,bottom:e,left:e}}function Aa(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Bp(e,t,r){let{reference:n,floating:o}=e;const a=on(t),s=Xi(t),i=Qi(s),l=Wt(t),c=a==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,h=n[i]/2-o[i]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(nn(t)){case"start":p[s]-=h*(r&&c?-1:1);break;case"end":p[s]+=h*(r&&c?-1:1);break}return p}const Y4=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Bp(c,n,l),h=n,p={},m=0;for(let b=0;b<i.length;b++){const{name:y,fn:C}=i[b],{x,y:P,data:S,reset:E}=await C({x:u,y:d,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});if(u=x??u,d=P??d,p={...p,[y]:{...p[y],...S}},E&&m<=50){m++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=Bp(c,h,l)),b=-1;continue}}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}};async function qn(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=zt(t,e),m=Wp(p),y=i[h?d==="floating"?"reference":"floating":d],C=Aa(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(y)))==null||r?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{...s.floating,x:n,y:o}:s.reference,P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(P))?await(a.getScale==null?void 0:a.getScale(P))||{x:1,y:1}:{x:1,y:1},E=Aa(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:x,offsetParent:P,strategy:l}):x);return{top:(C.top-E.top+m.top)/S.y,bottom:(E.bottom-C.bottom+m.bottom)/S.y,left:(C.left-E.left+m.left)/S.x,right:(E.right-C.right+m.right)/S.x}}const Rp=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:c,padding:u=0}=zt(e,t)||{};if(c==null)return{};const d=Wp(u),h={x:r,y:n},p=Xi(o),m=Qi(p),b=await s.getDimensions(c),y=p==="y",C=y?"top":"left",x=y?"bottom":"right",P=y?"clientHeight":"clientWidth",S=a.reference[m]+a.reference[p]-h[p]-a.floating[m],E=h[p]-a.reference[p],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let L=N?N[P]:0;(!L||!await(s.isElement==null?void 0:s.isElement(N)))&&(L=i.floating[P]||a.floating[m]);const g=S/2-E/2,A=L/2-b[m]/2-1,I=or(d[C],A),T=or(d[x],A),D=I,w=L-b[m]-T,M=L/2-b[m]/2+g,O=Gi(D,M,w),F=!l.arrow&&nn(o)!=null&&M!=O&&a.reference[m]/2-(M<D?I:T)-b[m]/2<0,$=F?M<D?M-D:M-w:0;return{[p]:h[p]+$,data:{[p]:O,centerOffset:M-O-$,...F&&{alignmentOffset:$}},reset:F}}}),G4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:b=!0,...y}=zt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const C=Wt(o),x=Wt(i)===i,P=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(x||!b?[ka(i)]:R4(i));!h&&m!=="none"&&S.push(...U4(i,b,m,P));const E=[i,...S],N=await qn(t,y),L=[];let g=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&L.push(N[C]),d){const D=B4(o,s,P);L.push(N[D[0]],N[D[1]])}if(g=[...g,{placement:o,overflows:L}],!L.every(D=>D<=0)){var A,I;const D=(((A=a.flip)==null?void 0:A.index)||0)+1,w=E[D];if(w)return{data:{index:D,overflows:g},reset:{placement:w}};let M=(I=g.filter(O=>O.overflows[0]<=0).sort((O,F)=>O.overflows[1]-F.overflows[1])[0])==null?void 0:I.placement;if(!M)switch(p){case"bestFit":{var T;const O=(T=g.map(F=>[F.placement,F.overflows.filter($=>$>0).reduce(($,V)=>$+V,0)]).sort((F,$)=>F[1]-$[1])[0])==null?void 0:T[0];O&&(M=O);break}case"initialPlacement":M=i;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function Kp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Up(e){return V4.some(t=>e[t]>=0)}const q4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=zt(e,t);switch(n){case"referenceHidden":{const a=await qn(t,{...o,elementContext:"reference"}),s=Kp(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Up(s)}}}case"escaped":{const a=await qn(t,{...o,altBoundary:!0}),s=Kp(a,r.floating);return{data:{escapedOffsets:s,escaped:Up(s)}}}default:return{}}}}};async function Q4(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Wt(r),i=nn(r),l=on(r)==="y",c=["left","top"].includes(s)?-1:1,u=a&&l?-1:1,d=zt(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return i&&typeof m=="number"&&(p=i==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const X4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await Q4(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},Z4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:y=>{let{x:C,y:x}=y;return{x:C,y:x}}},...l}=zt(e,t),c={x:r,y:n},u=await qn(t,l),d=on(Wt(o)),h=qi(d);let p=c[h],m=c[d];if(a){const y=h==="y"?"top":"left",C=h==="y"?"bottom":"right",x=p+u[y],P=p-u[C];p=Gi(x,p,P)}if(s){const y=d==="y"?"top":"left",C=d==="y"?"bottom":"right",x=m+u[y],P=m-u[C];m=Gi(x,m,P)}const b=i.fn({...t,[h]:p,[d]:m});return{...b,data:{x:b.x-r,y:b.y-n}}}}},J4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=zt(e,t),u={x:r,y:n},d=on(o),h=qi(d);let p=u[h],m=u[d];const b=zt(i,t),y=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const P=h==="y"?"height":"width",S=a.reference[h]-a.floating[P]+y.mainAxis,E=a.reference[h]+a.reference[P]-y.mainAxis;p<S?p=S:p>E&&(p=E)}if(c){var C,x;const P=h==="y"?"width":"height",S=["top","left"].includes(Wt(o)),E=a.reference[d]-a.floating[P]+(S&&((C=s.offset)==null?void 0:C[d])||0)+(S?0:y.crossAxis),N=a.reference[d]+a.reference[P]+(S?0:((x=s.offset)==null?void 0:x[d])||0)-(S?y.crossAxis:0);m<E?m=E:m>N&&(m=N)}return{[h]:p,[d]:m}}}},e3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:s=()=>{},...i}=zt(e,t),l=await qn(t,i),c=Wt(r),u=nn(r),d=on(r)==="y",{width:h,height:p}=n.floating;let m,b;c==="top"||c==="bottom"?(m=c,b=u===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(b=c,m=u==="end"?"top":"bottom");const y=p-l[m],C=h-l[b],x=!t.middlewareData.shift;let P=y,S=C;if(d){const N=h-l.left-l.right;S=u||x?or(C,N):N}else{const N=p-l.top-l.bottom;P=u||x?or(y,N):N}if(x&&!u){const N=at(l.left,0),L=at(l.right,0),g=at(l.top,0),A=at(l.bottom,0);d?S=h-2*(N!==0||L!==0?N+L:at(l.left,l.right)):P=p-2*(g!==0||A!==0?g+A:at(l.top,l.bottom))}await s({...t,availableWidth:S,availableHeight:P});const E=await o.getDimensions(a.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function sr(e){return Hp(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bt(e){var t;return(t=(Hp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hp(e){return e instanceof Node||e instanceof st(e).Node}function Rt(e){return e instanceof Element||e instanceof st(e).Element}function Et(e){return e instanceof HTMLElement||e instanceof st(e).HTMLElement}function Yp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}function Qn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ht(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function t3(e){return["table","td","th"].includes(sr(e))}function Ji(e){const t=el(),r=ht(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function r3(e){let t=an(e);for(;Et(t)&&!Oa(t);){if(Ji(t))return t;t=an(t)}return null}function el(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Oa(e){return["html","body","#document"].includes(sr(e))}function ht(e){return st(e).getComputedStyle(e)}function Na(e){return Rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function an(e){if(sr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yp(e)&&e.host||Bt(e);return Yp(t)?t.host:t}function Gp(e){const t=an(e);return Oa(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&Qn(t)?t:Gp(t)}function Xn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Gp(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=st(o);return a?t.concat(s,s.visualViewport||[],Qn(o)?o:[],s.frameElement&&r?Xn(s.frameElement):[]):t.concat(o,Xn(o,[],r))}function qp(e){const t=ht(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Et(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=Da(r)!==a||Da(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function tl(e){return Rt(e)?e:e.contextElement}function sn(e){const t=tl(e);if(!Et(t))return ar(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=qp(t);let s=(a?Da(r.width):r.width)/n,i=(a?Da(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const n3=ar(0);function Qp(e){const t=st(e);return!el()||!t.visualViewport?n3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o3(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==st(e)?!1:t}function Er(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=tl(e);let s=ar(1);t&&(n?Rt(n)&&(s=sn(n)):s=sn(e));const i=o3(a,r,n)?Qp(a):ar(0);let l=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(a){const h=st(a),p=n&&Rt(n)?st(n):n;let m=h.frameElement;for(;m&&n&&p!==h;){const b=sn(m),y=m.getBoundingClientRect(),C=ht(m),x=y.left+(m.clientLeft+parseFloat(C.paddingLeft))*b.x,P=y.top+(m.clientTop+parseFloat(C.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=x,c+=P,m=st(m).frameElement}}return Aa({width:u,height:d,x:l,y:c})}function a3(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Et(r),a=Bt(r);if(r===a)return t;let s={scrollLeft:0,scrollTop:0},i=ar(1);const l=ar(0);if((o||!o&&n!=="fixed")&&((sr(r)!=="body"||Qn(a))&&(s=Na(r)),Et(r))){const c=Er(r);i=sn(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:t.width*i.x,height:t.height*i.y,x:t.x*i.x-s.scrollLeft*i.x+l.x,y:t.y*i.y-s.scrollTop*i.y+l.y}}function s3(e){return Array.from(e.getClientRects())}function Xp(e){return Er(Bt(e)).left+Na(e).scrollLeft}function i3(e){const t=Bt(e),r=Na(e),n=e.ownerDocument.body,o=at(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=at(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Xp(e);const i=-r.scrollTop;return ht(n).direction==="rtl"&&(s+=at(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}function l3(e,t){const r=st(e),n=Bt(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const c=el();(!c||c&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}function c3(e,t){const r=Er(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Et(e)?sn(e):ar(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:s,height:i,x:l,y:c}}function Zp(e,t,r){let n;if(t==="viewport")n=l3(e,r);else if(t==="document")n=i3(Bt(e));else if(Rt(t))n=c3(t,r);else{const o=Qp(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Aa(n)}function Jp(e,t){const r=an(e);return r===t||!Rt(r)||Oa(r)?!1:ht(r).position==="fixed"||Jp(r,t)}function u3(e,t){const r=t.get(e);if(r)return r;let n=Xn(e,[],!1).filter(i=>Rt(i)&&sr(i)!=="body"),o=null;const a=ht(e).position==="fixed";let s=a?an(e):e;for(;Rt(s)&&!Oa(s);){const i=ht(s),l=Ji(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Qn(s)&&!l&&Jp(e,s))?n=n.filter(u=>u!==s):o=i,s=an(s)}return t.set(e,n),n}function d3(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?u3(t,this._c):[].concat(r),n],i=s[0],l=s.reduce((c,u)=>{const d=Zp(t,u,o);return c.top=at(d.top,c.top),c.right=or(d.right,c.right),c.bottom=or(d.bottom,c.bottom),c.left=at(d.left,c.left),c},Zp(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function f3(e){return qp(e)}function p3(e,t,r){const n=Et(t),o=Bt(t),a=r==="fixed",s=Er(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ar(0);if(n||!n&&!a)if((sr(t)!=="body"||Qn(o))&&(i=Na(t)),n){const c=Er(t,!0,a,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Xp(o));return{x:s.left+i.scrollLeft-l.x,y:s.top+i.scrollTop-l.y,width:s.width,height:s.height}}function e0(e,t){return!Et(e)||ht(e).position==="fixed"?null:t?t(e):e.offsetParent}function t0(e,t){const r=st(e);if(!Et(e))return r;let n=e0(e,t);for(;n&&t3(n)&&ht(n).position==="static";)n=e0(n,t);return n&&(sr(n)==="html"||sr(n)==="body"&&ht(n).position==="static"&&!Ji(n))?r:n||r3(e)||r}const h3=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||t0,a=this.getDimensions;return{reference:p3(t,await o(r),n),floating:{x:0,y:0,...await a(r)}}};function m3(e){return ht(e).direction==="rtl"}const g3={convertOffsetParentRelativeRectToViewportRelativeRect:a3,getDocumentElement:Bt,getClippingRect:d3,getOffsetParent:t0,getElementRects:h3,getClientRects:s3,getDimensions:f3,getScale:sn,isElement:Rt,isRTL:m3};function v3(e,t){let r=null,n;const o=Bt(e);function a(){clearTimeout(n),r&&r.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(i||t(),!d||!h)return;const p=Ia(u),m=Ia(o.clientWidth-(c+d)),b=Ia(o.clientHeight-(u+h)),y=Ia(c),x={rootMargin:-p+"px "+-m+"px "+-b+"px "+-y+"px",threshold:at(0,or(1,l))||1};let P=!0;function S(E){const N=E[0].intersectionRatio;if(N!==l){if(!P)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},100)}P=!1}try{r=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(S,x)}r.observe(e)}return s(!0),a}function b3(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=tl(e),u=o||a?[...c?Xn(c):[],...Xn(t)]:[];u.forEach(C=>{o&&C.addEventListener("scroll",r,{passive:!0}),a&&C.addEventListener("resize",r)});const d=c&&i?v3(c,r):null;let h=-1,p=null;s&&(p=new ResizeObserver(C=>{let[x]=C;x&&x.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let m,b=l?Er(e):null;l&&y();function y(){const C=Er(e);b&&(C.x!==b.x||C.y!==b.y||C.width!==b.width||C.height!==b.height)&&r(),b=C,m=requestAnimationFrame(y)}return r(),()=>{u.forEach(C=>{o&&C.removeEventListener("scroll",r),a&&C.removeEventListener("resize",r)}),d&&d(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const y3=(e,t,r)=>{const n=new Map,o={platform:g3,...r},a={...o.platform,_c:n};return Y4(e,t,{...o,platform:a})},x3=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Rp({element:n.current,padding:o}).fn(r):{}:n?Rp({element:n,padding:o}).fn(r):{}}}};var La=typeof document<"u"?f.useLayoutEffect:f.useEffect;function ja(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ja(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ja(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function r0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function n0(e,t){const r=r0(e);return Math.round(t*r)/r}function o0(e){const t=G.useRef(e);return La(()=>{t.current=e}),t}function w3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:c}=e,[u,d]=G.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=G.useState(n);ja(h,n)||p(n);const[m,b]=G.useState(null),[y,C]=G.useState(null),x=G.useCallback(F=>{F!=N.current&&(N.current=F,b(F))},[b]),P=G.useCallback(F=>{F!==L.current&&(L.current=F,C(F))},[C]),S=a||m,E=s||y,N=G.useRef(null),L=G.useRef(null),g=G.useRef(u),A=o0(l),I=o0(o),T=G.useCallback(()=>{if(!N.current||!L.current)return;const F={placement:t,strategy:r,middleware:h};I.current&&(F.platform=I.current),y3(N.current,L.current,F).then($=>{const V={...$,isPositioned:!0};D.current&&!ja(g.current,V)&&(g.current=V,Ph.flushSync(()=>{d(V)}))})},[h,t,r,I]);La(()=>{c===!1&&g.current.isPositioned&&(g.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const D=G.useRef(!1);La(()=>(D.current=!0,()=>{D.current=!1}),[]),La(()=>{if(S&&(N.current=S),E&&(L.current=E),S&&E){if(A.current)return A.current(S,E,T);T()}},[S,E,T,A]);const w=G.useMemo(()=>({reference:N,floating:L,setReference:x,setFloating:P}),[x,P]),M=G.useMemo(()=>({reference:S,floating:E}),[S,E]),O=G.useMemo(()=>{const F={position:r,left:0,top:0};if(!M.floating)return F;const $=n0(M.floating,u.x),V=n0(M.floating,u.y);return i?{...F,transform:"translate("+$+"px, "+V+"px)",...r0(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:V}},[r,i,M.floating,u.x,u.y]);return G.useMemo(()=>({...u,update:T,refs:w,elements:M,floatingStyles:O}),[u,T,w,M,O])}const C3=f.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return f.createElement(Re.svg,me({},a,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:f.createElement("polygon",{points:"0,0 30,0 15,10"}))});function P3(e){const[t,r]=f.useState(void 0);return rn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,i=c.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}const a0="Popper",[s0,_a]=tn(a0),[M3,i0]=s0(a0),T3=e=>{const{__scopePopper:t,children:r}=e,[n,o]=f.useState(null);return f.createElement(M3,{scope:t,anchor:n,onAnchorChange:o},r)},S3="PopperAnchor",E3=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=i0(S3,r),s=f.useRef(null),i=pt(t,s);return f.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:f.createElement(Re.div,me({},o,{ref:i}))}),l0="PopperContent",[$3,D3]=s0(l0),I3=f.forwardRef((e,t)=>{var r,n,o,a,s,i,l,c;const{__scopePopper:u,side:d="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:b=0,avoidCollisions:y=!0,collisionBoundary:C=[],collisionPadding:x=0,sticky:P="partial",hideWhenDetached:S=!1,updatePositionStrategy:E="optimized",onPlaced:N,...L}=e,g=i0(l0,u),[A,I]=f.useState(null),T=pt(t,X=>I(X)),[D,w]=f.useState(null),M=P3(D),O=(r=M==null?void 0:M.width)!==null&&r!==void 0?r:0,F=(n=M==null?void 0:M.height)!==null&&n!==void 0?n:0,$=d+(p!=="center"?"-"+p:""),V=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},H=Array.isArray(C)?C:[C],K=H.length>0,R={padding:V,boundary:H.filter(N3),altBoundary:K},{refs:re,floatingStyles:U,placement:ie,isPositioned:ee,middlewareData:te}=w3({strategy:"fixed",placement:$,whileElementsMounted:(...X)=>b3(...X,{animationFrame:E==="always"}),elements:{reference:g.anchor},middleware:[X4({mainAxis:h+F,alignmentAxis:m}),y&&Z4({mainAxis:!0,crossAxis:!1,limiter:P==="partial"?J4():void 0,...R}),y&&G4({...R}),e3({...R,apply:({elements:X,rects:Oe,availableWidth:_e,availableHeight:Fe})=>{const{width:De,height:It}=Oe.reference,mt=X.floating.style;mt.setProperty("--radix-popper-available-width",`${_e}px`),mt.setProperty("--radix-popper-available-height",`${Fe}px`),mt.setProperty("--radix-popper-anchor-width",`${De}px`),mt.setProperty("--radix-popper-anchor-height",`${It}px`)}}),D&&x3({element:D,padding:b}),L3({arrowWidth:O,arrowHeight:F}),S&&q4({strategy:"referenceHidden",...R})]}),[ve,be]=c0(ie),fe=Vt(N);rn(()=>{ee&&(fe==null||fe())},[ee,fe]);const de=(o=te.arrow)===null||o===void 0?void 0:o.x,pe=(a=te.arrow)===null||a===void 0?void 0:a.y,Te=((s=te.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[Se,oe]=f.useState();return rn(()=>{A&&oe(window.getComputedStyle(A).zIndex)},[A]),f.createElement("div",{ref:re.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:ee?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(i=te.transformOrigin)===null||i===void 0?void 0:i.x,(l=te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},f.createElement($3,{scope:u,placedSide:ve,onArrowChange:w,arrowX:de,arrowY:pe,shouldHideArrow:Te},f.createElement(Re.div,me({"data-side":ve,"data-align":be},L,{ref:T,style:{...L.style,animation:ee?void 0:"none",opacity:(c=te.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))}),k3="PopperArrow",A3={top:"bottom",right:"left",bottom:"top",left:"right"},O3=f.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=D3(k3,n),s=A3[a.placedSide];return f.createElement("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0}},f.createElement(C3,me({},o,{ref:r,style:{...o.style,display:"block"}})))});function N3(e){return e!==null}const L3=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,a,s;const{placement:i,rects:l,middlewareData:c}=t,d=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[m,b]=c0(i),y={start:"0%",center:"50%",end:"100%"}[b],C=((n=(o=c.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+h/2,x=((a=(s=c.arrow)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)+p/2;let P="",S="";return m==="bottom"?(P=d?y:`${C}px`,S=`${-p}px`):m==="top"?(P=d?y:`${C}px`,S=`${l.floating.height+p}px`):m==="right"?(P=`${-p}px`,S=d?y:`${x}px`):m==="left"&&(P=`${l.floating.width+p}px`,S=d?y:`${x}px`),{data:{x:P,y:S}}}});function c0(e){const[t,r="center"]=e.split("-");return[t,r]}const u0=T3,d0=E3,f0=I3,j3=O3,p0=f.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?mn.createPortal(f.createElement(Re.div,me({},o,{ref:t})),n):null});function _3(e,t){return f.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const ln=e=>{const{present:t,children:r}=e,n=F3(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=pt(n.ref,o.ref);return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};ln.displayName="Presence";function F3(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=_3(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=Fa(n.current);a.current=i==="mounted"?c:"none"},[i]),rn(()=>{const c=n.current,u=o.current;if(u!==e){const h=a.current,p=Fa(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),rn(()=>{if(t){const c=d=>{const p=Fa(n.current).includes(d.animationName);d.target===t&&p&&mn.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(a.current=Fa(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Fa(e){return(e==null?void 0:e.animationName)||"none"}function Va({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=V3({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,i=Vt(r),l=f.useCallback(c=>{if(a){const d=typeof c=="function"?c(e):c;d!==e&&i(d)}else o(c)},[a,e,o,i]);return[s,l]}function V3({defaultProp:e,onChange:t}){const r=f.useState(e),[n]=r,o=f.useRef(n),a=Vt(t);return f.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}const z3=f.forwardRef((e,t)=>f.createElement(Re.span,me({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[za,Gx]=tn("Tooltip",[_a]),Wa=_a(),W3="TooltipProvider",B3=700,rl="tooltip.open",[R3,nl]=za(W3),K3=e=>{const{__scopeTooltip:t,delayDuration:r=B3,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=f.useState(!0),l=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),f.createElement(R3,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),i(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(u=>{l.current=u},[]),disableHoverableContent:o},a)},ol="Tooltip",[U3,Zn]=za(ol),H3=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=nl(ol,e.__scopeTooltip),c=Wa(t),[u,d]=f.useState(null),h=$a(),p=f.useRef(0),m=s??l.disableHoverableContent,b=i??l.delayDuration,y=f.useRef(!1),[C=!1,x]=Va({prop:n,defaultProp:o,onChange:L=>{L?(l.onOpen(),document.dispatchEvent(new CustomEvent(rl))):l.onClose(),a==null||a(L)}}),P=f.useMemo(()=>C?y.current?"delayed-open":"instant-open":"closed",[C]),S=f.useCallback(()=>{window.clearTimeout(p.current),y.current=!1,x(!0)},[x]),E=f.useCallback(()=>{window.clearTimeout(p.current),x(!1)},[x]),N=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,x(!0)},b)},[b,x]);return f.useEffect(()=>()=>window.clearTimeout(p.current),[]),f.createElement(u0,c,f.createElement(U3,{scope:t,contentId:h,open:C,stateAttribute:P,trigger:u,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayed?N():S()},[l.isOpenDelayed,N,S]),onTriggerLeave:f.useCallback(()=>{m?E():window.clearTimeout(p.current)},[E,m]),onOpen:S,onClose:E,disableHoverableContent:m},r))},h0="TooltipTrigger",Y3=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Zn(h0,r),a=nl(h0,r),s=Wa(r),i=f.useRef(null),l=pt(t,i,o.onTriggerChange),c=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>c.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),f.createElement(d0,me({asChild:!0},s),f.createElement(Re.button,me({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},n,{ref:l,onPointerMove:Le(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:Le(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:Le(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Le(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Le(e.onBlur,o.onClose),onClick:Le(e.onClick,o.onClose)})))}),m0="TooltipPortal",[G3,q3]=za(m0,{forceMount:void 0}),Q3=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Zn(m0,t);return f.createElement(G3,{scope:t,forceMount:r},f.createElement(ln,{present:r||a.open},f.createElement(p0,{asChild:!0,container:o},n)))},Jn="TooltipContent",X3=f.forwardRef((e,t)=>{const r=q3(Jn,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=Zn(Jn,e.__scopeTooltip);return f.createElement(ln,{present:n||s.open},s.disableHoverableContent?f.createElement(g0,me({side:o},a,{ref:t})):f.createElement(Z3,me({side:o},a,{ref:t})))}),Z3=f.forwardRef((e,t)=>{const r=Zn(Jn,e.__scopeTooltip),n=nl(Jn,e.__scopeTooltip),o=f.useRef(null),a=pt(t,o),[s,i]=f.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,h=f.useCallback(()=>{i(null),d(!1)},[d]),p=f.useCallback((m,b)=>{const y=m.currentTarget,C={x:m.clientX,y:m.clientY},x=n6(C,y.getBoundingClientRect()),P=o6(C,x),S=a6(b.getBoundingClientRect()),E=i6([...P,...S]);i(E),d(!0)},[d]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&u){const m=y=>p(y,u),b=y=>p(y,l);return l.addEventListener("pointerleave",m),u.addEventListener("pointerleave",b),()=>{l.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",b)}}},[l,u,p,h]),f.useEffect(()=>{if(s){const m=b=>{const y=b.target,C={x:b.clientX,y:b.clientY},x=(l==null?void 0:l.contains(y))||(u==null?void 0:u.contains(y)),P=!s6(C,s);x?h():P&&(h(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,u,s,c,h]),f.createElement(g0,me({},e,{ref:a}))}),[J3,e6]=za(ol,{isInside:!1}),g0=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Zn(Jn,r),c=Wa(r),{onClose:u}=l;return f.useEffect(()=>(document.addEventListener(rl,u),()=>document.removeEventListener(rl,u)),[u]),f.useEffect(()=>{if(l.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),f.createElement(Fp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u},f.createElement(f0,me({"data-state":l.stateAttribute},c,i,{ref:t,style:{...i.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)"}}),f.createElement(jp,null,n),f.createElement(J3,{scope:r,isInside:!0},f.createElement(z3,{id:l.contentId,role:"tooltip"},o||n))))}),t6="TooltipArrow",r6=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Wa(r);return e6(t6,r).isInside?null:f.createElement(j3,me({},o,n,{ref:t}))});function n6(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function o6(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function a6(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function s6(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,l=t[a].y,c=t[s].x,u=t[s].y;l>n!=u>n&&r<(c-i)*(n-l)/(u-l)+i&&(o=!o)}return o}function i6(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),l6(t)}function l6(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}const c6=K3,u6=H3,d6=Y3,f6=Q3,p6=X3,h6=r6,m6=({children:e,showArrow:t=!1,startOpen:r=!1,content:n,hasCloseButton:o=!1,action:a,size:s="sm"})=>{const[i,l]=f.useState(r),c=we({base:"rounded-lg bg-primary-black-400 px-4 pb-[13px] pt-[12px] font-satoshi text-sm font-medium text-white",variants:{size:{sm:"max-w-[215px]",lg:"max-w-[342px]"}}}),u=()=>{l(!1)},d=()=>{a&&a.onClick(),u()};return j.jsx(c6,{children:j.jsxs(u6,{delayDuration:0,defaultOpen:i,open:i,onOpenChange:h=>l(h),children:[j.jsx(d6,{asChild:!0,children:e}),j.jsx(f6,{children:j.jsxs(p6,{className:c({size:s}),sideOffset:5,children:[j.jsxs("div",{children:[j.jsxs("div",{className:"flex gap-4",children:[n,o&&j.jsx(Ue,{onClick:u,name:"close",className:"mt-1 cursor-pointer text-xs text-white"})]}),a&&j.jsx(Bi,{className:"-mb-1 mt-1 !h-6 !px-0",variant:"tertiaryDark",onClick:d,children:a.label})]}),t&&j.jsx(h6,{className:"TooltipArrow"})]})})]})})};function g6(e){const t=e+"CollectionProvider",[r,n]=tn(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:m,children:b}=p,y=f.useRef(null),C=f.useRef(new Map).current;return f.createElement(o,{scope:m,itemMap:C,collectionRef:y},b)},i=e+"CollectionSlot",l=f.forwardRef((p,m)=>{const{scope:b,children:y}=p,C=a(i,b),x=pt(m,C.collectionRef);return f.createElement(Gn,{ref:x},y)}),c=e+"CollectionItemSlot",u="data-radix-collection-item",d=f.forwardRef((p,m)=>{const{scope:b,children:y,...C}=p,x=f.useRef(null),P=pt(m,x),S=a(c,b);return f.useEffect(()=>(S.itemMap.set(x,{ref:x,...C}),()=>void S.itemMap.delete(x))),f.createElement(Gn,{[u]:"",ref:P},y)});function h(p){const m=a(e+"CollectionConsumer",p);return f.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const C=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((S,E)=>C.indexOf(S.ref.current)-C.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:s,Slot:l,ItemSlot:d},h,n]}const v6=f.createContext(void 0);function v0(e){const t=f.useContext(v6);return e||t||"ltr"}const al="rovingFocusGroup.onEntryFocus",b6={bubbles:!1,cancelable:!0},sl="RovingFocusGroup",[il,b0,y6]=g6(sl),[x6,y0]=tn(sl,[y6]),[w6,C6]=x6(sl),P6=f.forwardRef((e,t)=>f.createElement(il.Provider,{scope:e.__scopeRovingFocusGroup},f.createElement(il.Slot,{scope:e.__scopeRovingFocusGroup},f.createElement(M6,me({},e,{ref:t}))))),M6=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:c,...u}=e,d=f.useRef(null),h=pt(t,d),p=v0(a),[m=null,b]=Va({prop:s,defaultProp:i,onChange:l}),[y,C]=f.useState(!1),x=Vt(c),P=b0(r),S=f.useRef(!1),[E,N]=f.useState(0);return f.useEffect(()=>{const L=d.current;if(L)return L.addEventListener(al,x),()=>L.removeEventListener(al,x)},[x]),f.createElement(w6,{scope:r,orientation:n,dir:p,loop:o,currentTabStopId:m,onItemFocus:f.useCallback(L=>b(L),[b]),onItemShiftTab:f.useCallback(()=>C(!0),[]),onFocusableItemAdd:f.useCallback(()=>N(L=>L+1),[]),onFocusableItemRemove:f.useCallback(()=>N(L=>L-1),[])},f.createElement(Re.div,me({tabIndex:y||E===0?-1:0,"data-orientation":n},u,{ref:h,style:{outline:"none",...e.style},onMouseDown:Le(e.onMouseDown,()=>{S.current=!0}),onFocus:Le(e.onFocus,L=>{const g=!S.current;if(L.target===L.currentTarget&&g&&!y){const A=new CustomEvent(al,b6);if(L.currentTarget.dispatchEvent(A),!A.defaultPrevented){const I=P().filter(O=>O.focusable),T=I.find(O=>O.active),D=I.find(O=>O.id===m),M=[T,D,...I].filter(Boolean).map(O=>O.ref.current);x0(M)}}S.current=!1}),onBlur:Le(e.onBlur,()=>C(!1))})))}),T6="RovingFocusGroupItem",S6=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,...s}=e,i=$a(),l=a||i,c=C6(T6,r),u=c.currentTabStopId===l,d=b0(r),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return f.useEffect(()=>{if(n)return h(),()=>p()},[n,h,p]),f.createElement(il.ItemSlot,{scope:r,id:l,focusable:n,active:o},f.createElement(Re.span,me({tabIndex:u?0:-1,"data-orientation":c.orientation},s,{ref:t,onMouseDown:Le(e.onMouseDown,m=>{n?c.onItemFocus(l):m.preventDefault()}),onFocus:Le(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Le(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const b=D6(m,c.orientation,c.dir);if(b!==void 0){m.preventDefault();let C=d().filter(x=>x.focusable).map(x=>x.ref.current);if(b==="last")C.reverse();else if(b==="prev"||b==="next"){b==="prev"&&C.reverse();const x=C.indexOf(m.currentTarget);C=c.loop?I6(C,x+1):C.slice(x+1)}setTimeout(()=>x0(C))}})})))}),E6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $6(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function D6(e,t,r){const n=$6(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return E6[n]}function x0(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function I6(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const k6=P6,A6=S6,w0="Tabs",[O6,qx]=tn(w0,[y0]),C0=y0(),[N6,ll]=O6(w0),L6=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...c}=e,u=v0(i),[d,h]=Va({prop:n,onChange:o,defaultProp:a});return f.createElement(N6,{scope:r,baseId:$a(),value:d,onValueChange:h,orientation:s,dir:u,activationMode:l},f.createElement(Re.div,me({dir:u,"data-orientation":s},c,{ref:t})))}),j6="TabsList",_6=f.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=ll(j6,r),s=C0(r);return f.createElement(k6,me({asChild:!0},s,{orientation:a.orientation,dir:a.dir,loop:n}),f.createElement(Re.div,me({role:"tablist","aria-orientation":a.orientation},o,{ref:t})))}),F6="TabsTrigger",V6=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,s=ll(F6,r),i=C0(r),l=P0(s.baseId,n),c=M0(s.baseId,n),u=n===s.value;return f.createElement(A6,me({asChild:!0},i,{focusable:!o,active:u}),f.createElement(Re.button,me({type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l},a,{ref:t,onMouseDown:Le(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(n):d.preventDefault()}),onKeyDown:Le(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(n)}),onFocus:Le(e.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!o&&d&&s.onValueChange(n)})})))}),z6="TabsContent",W6=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...s}=e,i=ll(z6,r),l=P0(i.baseId,n),c=M0(i.baseId,n),u=n===i.value,d=f.useRef(u);return f.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),f.createElement(ln,{present:o||u},({present:h})=>f.createElement(Re.div,me({"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0},s,{ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0}}),h&&a))});function P0(e,t){return`${e}-trigger-${t}`}function M0(e,t){return`${e}-content-${t}`}const B6=L6,R6=_6,K6=V6,U6=W6,H6=({tabs:e,defaultValue:t,variant:r="button",className:n,...o})=>{const a=we({base:"",variants:{variant:{underline:"",button:""}}}),s=we({base:"flex flex-row",variants:{variant:{underline:"",button:""}}}),i=we({base:"flex h-[82px] w-[197px] items-center justify-center gap-2 text-lg font-medium text-primary-grey-700 hover:text-primary-grey-800 data-[state=active]:font-bold data-[state=active]:text-secondary-green-500",variants:{variant:{underline:"border-b border-primary-grey-600 border-t-transparent hover:border-b-4 hover:border-t-3 hover:border-b-primary-grey-700 hover:font-bold data-[state=active]:border-b-4 data-[state=active]:border-t-3 data-[state=active]:border-b-secondary-green-500 data-[state=active]:text-secondary-green-500",button:"relative z-0 -mr-[1px] rounded-none border border-primary-grey-600 first:rounded-l-xl last:rounded-r-xl hover:z-10 hover:border-2 hover:border-primary-grey-800 data-[state=active]:z-20 data-[state=active]:border-2 data-[state=active]:border-secondary-green-500"}}});return j.jsxs(B6,{defaultValue:t??e[0].key,className:a({variant:r,className:n}),...o,children:[j.jsx(R6,{className:s({variant:r}),children:e.map(({icon:l,key:c,title:u})=>j.jsxs(K6,{value:c,className:i({variant:r}),children:[l&&(typeof l=="string"?j.jsx(Ue,{className:"-mt-[1px]",name:l}):l),u]},c))}),e.map(({content:l,key:c})=>j.jsx(U6,{value:c,children:l},c))]})},cl=f.forwardRef(({disabled:e,isDatePicker:t,isInvalid:r,isValid:n,className:o,icon:a,message:s,iconAction:i,...l},c)=>{const u=we({base:"[&_input]:data-[filled-within=true]:!bg-transparent [&_label]:data-[filled-within=true]:!left-[15px] [&_label]:data-[filled-within=true]:!top-[20px] [&_label]:data-[filled-within=true]:!ml-[1px] [&_label]:data-[filled-within=true]:!text-xs [&_label]:data-[filled-within=true]:!text-primary-grey-800",variants:{isInvalid:{true:"[&_label]:data-[filled-within=true]:!text-complementary-red-500"},isValid:{true:"[&_label]:data-[filled-within=true]:!text-secondary-green-500"},disabled:{true:"[&_label]:data-[filled-within=true]:!text-primary-grey-700"}}}),d=we({base:"left-[15px] top-6 font-satoshi font-satoshi text-base text-sm text-primary-grey-800",variants:{isInvalid:{true:"text-complementary-red-500"},isValid:{true:"text-secondary-green-500"},disabled:{true:"text-primary-grey-700"}}}),h=we({base:"text-left font-satoshi text-base",variants:{disabled:{true:"!text-primary-grey-700"},isDatePicker:{true:"!cursor-pointer"}}}),p=we({base:"h-12 rounded-lg border border-primary-grey-700 !bg-white px-[15px] text-black !ring-0 !ring-offset-0",variants:{isInvalid:{true:"border-complementary-red-500"},isValid:{true:"border-secondary-green-500"},disabled:{true:"!border-primary-grey-500 !bg-primary-grey-500"},isDatePicker:{true:"!cursor-pointer"}}}),m=we({base:"mt-[5px] pl-3 font-satoshi",variants:{isInvalid:{true:"text-complementary-red-500"},isValid:{true:"text-secondary-green-500"}}}),b=we({base:"text-primary-grey-800",variants:{iconAction:{true:"cursor-pointer"}}}),{Component:y,label:C,domRef:x,startContent:P,shouldLabelBeOutside:S,shouldLabelBeInside:E,getBaseProps:N,getLabelProps:L,getInputProps:g,getInnerWrapperProps:A,getInputWrapperProps:I,getDescriptionProps:T}=k5({...l,disabled:e,labelPlacement:"outside",ref:c,classNames:{input:h({disabled:e,isDatePicker:t}),inputWrapper:p({isInvalid:r,isValid:n,disabled:e,isDatePicker:t}),base:u({isInvalid:r,isValid:n,disabled:e,className:o}),label:d({isInvalid:r,isValid:n,disabled:e}),description:m({isInvalid:r,isValid:n})}}),D=j.jsx("label",{...L(),children:C}),w=f.useMemo(()=>P||a?j.jsxs("div",{...A(),children:[P,j.jsx("input",{...g()}),a&&(typeof a=="string"?j.jsx(Ue,{onClick:i,name:a,className:b({iconAction:!!i})}):a)]}):j.jsx("input",{...g()}),[P,i,b,a,g,A]);return j.jsxs(y,{...N(),children:[S?D:null,j.jsxs("div",{...I(),role:"button",onClick:()=>{var M;(M=x.current)==null||M.focus()},children:[E?D:null,w]}),s&&j.jsx("div",{...T(),children:s})]})}),Y6=f.forwardRef((e,t)=>{const[r,n]=f.useState(!1),o=()=>{n(a=>!a)};return j.jsx(cl,{ref:t,icon:r?"eye":"eye-off",type:r?"text":"password",iconAction:o,...e})});let ul=0;function G6(){f.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:T0()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:T0()),ul++,()=>{ul===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),ul--}},[])}function T0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const dl="focusScope.autoFocusOnMount",fl="focusScope.autoFocusOnUnmount",S0={bubbles:!1,cancelable:!0},q6=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),c=Vt(o),u=Vt(a),d=f.useRef(null),h=pt(t,b=>l(b)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(n){let b=function(P){if(p.paused||!i)return;const S=P.target;i.contains(S)?d.current=S:ir(d.current,{select:!0})},y=function(P){if(p.paused||!i)return;const S=P.relatedTarget;S!==null&&(i.contains(S)||ir(d.current,{select:!0}))},C=function(P){if(document.activeElement===document.body)for(const E of P)E.removedNodes.length>0&&ir(i)};document.addEventListener("focusin",b),document.addEventListener("focusout",y);const x=new MutationObserver(C);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",y),x.disconnect()}}},[n,i,p.paused]),f.useEffect(()=>{if(i){D0.add(p);const b=document.activeElement;if(!i.contains(b)){const C=new CustomEvent(dl,S0);i.addEventListener(dl,c),i.dispatchEvent(C),C.defaultPrevented||(Q6(t7(E0(i)),{select:!0}),document.activeElement===b&&ir(i))}return()=>{i.removeEventListener(dl,c),setTimeout(()=>{const C=new CustomEvent(fl,S0);i.addEventListener(fl,u),i.dispatchEvent(C),C.defaultPrevented||ir(b??document.body,{select:!0}),i.removeEventListener(fl,u),D0.remove(p)},0)}}},[i,c,u,p]);const m=f.useCallback(b=>{if(!r&&!n||p.paused)return;const y=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,C=document.activeElement;if(y&&C){const x=b.currentTarget,[P,S]=X6(x);P&&S?!b.shiftKey&&C===S?(b.preventDefault(),r&&ir(P,{select:!0})):b.shiftKey&&C===P&&(b.preventDefault(),r&&ir(S,{select:!0})):C===x&&b.preventDefault()}},[r,n,p.paused]);return f.createElement(Re.div,me({tabIndex:-1},s,{ref:h,onKeyDown:m}))});function Q6(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ir(n,{select:t}),document.activeElement!==r)return}function X6(e){const t=E0(e),r=$0(t,e),n=$0(t.reverse(),e);return[r,n]}function E0(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function $0(e,t){for(const r of e)if(!Z6(r,{upTo:t}))return r}function Z6(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function J6(e){return e instanceof HTMLInputElement&&"select"in e}function ir(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&J6(e)&&t&&e.select()}}const D0=e7();function e7(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=I0(e,t),e.unshift(t)},remove(t){var r;e=I0(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function I0(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function t7(e){return e.filter(t=>t.tagName!=="A")}var r7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cn=new WeakMap,Ba=new WeakMap,Ra={},pl=0,k0=function(e){return e&&(e.host||k0(e.parentNode))},n7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=k0(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},o7=function(e,t,r,n){var o=n7(t,Array.isArray(e)?e:[e]);Ra[r]||(Ra[r]=new WeakMap);var a=Ra[r],s=[],i=new Set,l=new Set(o),c=function(d){!d||i.has(d)||(i.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))u(h);else{var p=h.getAttribute(n),m=p!==null&&p!=="false",b=(cn.get(h)||0)+1,y=(a.get(h)||0)+1;cn.set(h,b),a.set(h,y),s.push(h),b===1&&m&&Ba.set(h,!0),y===1&&h.setAttribute(r,"true"),m||h.setAttribute(n,"true")}})};return u(t),i.clear(),pl++,function(){s.forEach(function(d){var h=cn.get(d)-1,p=a.get(d)-1;cn.set(d,h),a.set(d,p),h||(Ba.has(d)||d.removeAttribute(n),Ba.delete(d)),p||d.removeAttribute(r)}),pl--,pl||(cn=new WeakMap,cn=new WeakMap,Ba=new WeakMap,Ra={})}},a7=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||r7(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),o7(n,o,r,"aria-hidden")):function(){return null}},A0=V5(),hl=function(){},Ka=G.forwardRef(function(e,t){var r=G.useRef(null),n=G.useState({onScrollCapture:hl,onWheelCapture:hl,onTouchMoveCapture:hl}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,b=e.allowPinchZoom,y=e.as,C=y===void 0?"div":y,x=kc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),P=h,S=j5([r,t]),E=Pt(Pt({},x),o);return G.createElement(G.Fragment,null,u&&G.createElement(P,{sideCar:A0,removeScrollBar:c,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!b,lockRef:r}),s?G.cloneElement(G.Children.only(i),Pt(Pt({},E),{ref:S})):G.createElement(C,Pt({},E,{className:l,ref:S}),i))});Ka.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ka.classNames={fullWidth:xa,zeroRight:ya};var ml=!1;if(typeof window<"u")try{var Ua=Object.defineProperty({},"passive",{get:function(){return ml=!0,!0}});window.addEventListener("test",Ua,Ua),window.removeEventListener("test",Ua,Ua)}catch{ml=!1}var un=ml?{passive:!1}:!1,s7=function(e){return e.tagName==="TEXTAREA"},O0=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!s7(e)&&r[t]==="visible")},i7=function(e){return O0(e,"overflowY")},l7=function(e){return O0(e,"overflowX")},N0=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=L0(e,r);if(n){var o=j0(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},c7=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},u7=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},L0=function(e,t){return e==="v"?i7(t):l7(t)},j0=function(e,t){return e==="v"?c7(t):u7(t)},d7=function(e,t){return e==="h"&&t==="rtl"?-1:1},f7=function(e,t,r,n,o){var a=d7(e,window.getComputedStyle(t).direction),s=a*n,i=r.target,l=t.contains(i),c=!1,u=s>0,d=0,h=0;do{var p=j0(e,i),m=p[0],b=p[1],y=p[2],C=b-y-a*m;(m||C)&&L0(e,i)&&(d+=C,h+=m),i=i.parentNode}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(u&&(o&&d===0||!o&&s>d)||!u&&(o&&h===0||!o&&-s>h))&&(c=!0),c},Ha=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_0=function(e){return[e.deltaX,e.deltaY]},F0=function(e){return e&&"current"in e?e.current:e},p7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},h7=function(e){return`
|
|
73
73
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
74
74
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
75
75
|
`)},m7=0,dn=[];function g7(e){var t=G.useRef([]),r=G.useRef([0,0]),n=G.useRef(),o=G.useState(m7++)[0],a=G.useState(function(){return yp()})[0],s=G.useRef(e);G.useEffect(function(){s.current=e},[e]),G.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=q1([e.lockRef.current],(e.shards||[]).map(F0),!0).filter(Boolean);return b.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=G.useCallback(function(b,y){if("touches"in b&&b.touches.length===2)return!s.current.allowPinchZoom;var C=Ha(b),x=r.current,P="deltaX"in b?b.deltaX:x[0]-C[0],S="deltaY"in b?b.deltaY:x[1]-C[1],E,N=b.target,L=Math.abs(P)>Math.abs(S)?"h":"v";if("touches"in b&&L==="h"&&N.type==="range")return!1;var g=N0(L,N);if(!g)return!0;if(g?E=L:(E=L==="v"?"h":"v",g=N0(L,N)),!g)return!1;if(!n.current&&"changedTouches"in b&&(P||S)&&(n.current=E),!E)return!0;var A=n.current||E;return f7(A,y,b,A==="h"?P:S,!0)},[]),l=G.useCallback(function(b){var y=b;if(!(!dn.length||dn[dn.length-1]!==a)){var C="deltaY"in y?_0(y):Ha(y),x=t.current.filter(function(E){return E.name===y.type&&E.target===y.target&&p7(E.delta,C)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var P=(s.current.shards||[]).map(F0).filter(Boolean).filter(function(E){return E.contains(y.target)}),S=P.length>0?i(y,P[0]):!s.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),c=G.useCallback(function(b,y,C,x){var P={name:b,delta:y,target:C,should:x};t.current.push(P),setTimeout(function(){t.current=t.current.filter(function(S){return S!==P})},1)},[]),u=G.useCallback(function(b){r.current=Ha(b),n.current=void 0},[]),d=G.useCallback(function(b){c(b.type,_0(b),b.target,i(b,e.lockRef.current))},[]),h=G.useCallback(function(b){c(b.type,Ha(b),b.target,i(b,e.lockRef.current))},[]);G.useEffect(function(){return dn.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,un),document.addEventListener("touchmove",l,un),document.addEventListener("touchstart",u,un),function(){dn=dn.filter(function(b){return b!==a}),document.removeEventListener("wheel",l,un),document.removeEventListener("touchmove",l,un),document.removeEventListener("touchstart",u,un)}},[]);var p=e.removeScrollBar,m=e.inert;return G.createElement(G.Fragment,null,m?G.createElement(a,{styles:h7(o)}):null,p?G.createElement(Z5,{gapMode:"margin"}):null)}const v7=z5(A0,g7);var V0=G.forwardRef(function(e,t){return G.createElement(Ka,Pt({},e,{ref:t,sideCar:v7}))});V0.classNames=Ka.classNames;const b7=V0,z0="Popover",[W0,Qx]=tn(z0,[_a]),gl=_a(),[y7,$r]=W0(z0),x7=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=gl(t),l=f.useRef(null),[c,u]=f.useState(!1),[d=!1,h]=Va({prop:n,defaultProp:o,onChange:a});return f.createElement(u0,i,f.createElement(y7,{scope:t,contentId:$a(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:c,onCustomAnchorAdd:f.useCallback(()=>u(!0),[]),onCustomAnchorRemove:f.useCallback(()=>u(!1),[]),modal:s},r))},w7="PopoverTrigger",C7=f.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=$r(w7,r),a=gl(r),s=pt(t,o.triggerRef),i=f.createElement(Re.button,me({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":K0(o.open)},n,{ref:s,onClick:Le(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?i:f.createElement(d0,me({asChild:!0},a),i)}),B0="PopoverPortal",[P7,M7]=W0(B0,{forceMount:void 0}),T7=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=$r(B0,t);return f.createElement(P7,{scope:t,forceMount:r},f.createElement(ln,{present:r||a.open},f.createElement(p0,{asChild:!0,container:o},n)))},eo="PopoverContent",S7=f.forwardRef((e,t)=>{const r=M7(eo,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=$r(eo,e.__scopePopover);return f.createElement(ln,{present:n||a.open},a.modal?f.createElement(E7,me({},o,{ref:t})):f.createElement($7,me({},o,{ref:t})))}),E7=f.forwardRef((e,t)=>{const r=$r(eo,e.__scopePopover),n=f.useRef(null),o=pt(t,n),a=f.useRef(!1);return f.useEffect(()=>{const s=n.current;if(s)return a7(s)},[]),f.createElement(b7,{as:Gn,allowPinchZoom:!0},f.createElement(R0,me({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Le(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=r.triggerRef.current)===null||i===void 0||i.focus()}),onPointerDownOutside:Le(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,c=i.button===2||l;a.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Le(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})))}),$7=f.forwardRef((e,t)=>{const r=$r(eo,e.__scopePopover),n=f.useRef(!1),o=f.useRef(!1);return f.createElement(R0,me({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,a),!a.defaultPrevented){var i;n.current||(i=r.triggerRef.current)===null||i===void 0||i.focus(),a.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:a=>{var s,i;(s=e.onInteractOutside)===null||s===void 0||s.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=a.target;((i=r.triggerRef.current)===null||i===void 0?void 0:i.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}}))}),R0=f.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,h=$r(eo,r),p=gl(r);return G6(),f.createElement(q6,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a},f.createElement(Fp,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1)},f.createElement(f0,me({"data-state":K0(h.open),role:"dialog",id:h.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}),D7="PopoverClose",I7=f.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=$r(D7,r);return f.createElement(Re.button,me({type:"button"},n,{ref:t,onClick:Le(e.onClick,()=>o.onOpenChange(!1))}))});function K0(e){return e?"open":"closed"}const k7=x7,A7=C7,O7=T7,N7=S7,L7=I7,U0=({children:e,content:t,className:r,isOpen:n,side:o="bottom",align:a="center",hasCloseButton:s=!1,hasShadow:i=!1,sideOffset:l=5,onInteractOutside:c,...u})=>{const d=we({base:"flex flex-row justify-end rounded-2xl bg-white ",variants:{hasShadow:{true:"shadow-[0px_4px_30px_0px_rgba(0,0,0,0.15)]"}}});return j.jsxs(k7,{open:n,...u,children:[j.jsx(A7,{asChild:!0,children:e}),j.jsx(O7,{children:j.jsx(N7,{className:Gt(r,d({hasShadow:i})),onInteractOutside:c,side:o,align:a,sideOffset:l,children:j.jsxs("div",{className:"relative flex w-full",children:[t,s&&j.jsx("div",{className:"absolute right-0 top-0 p-6",children:j.jsx(L7,{children:j.jsx(Ue,{name:"close",className:"cursor-pointer text-xs text-black"})})})]})})})]})};function ye(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function it(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Ye(e,t){const r=ye(e);return isNaN(t)?it(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function xt(e,t){const r=ye(e);if(isNaN(t))return it(e,NaN);if(!t)return r;const n=r.getDate(),o=it(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return n>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),n),r)}const vl=6048e5,j7=864e5;let _7={};function to(){return _7}function $t(e,t){var i,l,c,u;const r=to(),n=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=ye(e),a=o.getDay(),s=(a<n?7:0)+a-n;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Dr(e){return $t(e,{weekStartsOn:1})}function H0(e){const t=ye(e),r=t.getFullYear(),n=it(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const o=Dr(n),a=it(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Dr(a);return t.getTime()>=o.getTime()?r+1:t.getTime()>=s.getTime()?r:r-1}function fn(e){const t=ye(e);return t.setHours(0,0,0,0),t}function Ya(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Dt(e,t){const r=fn(e),n=fn(t),o=+r-Ya(r),a=+n-Ya(n);return Math.trunc((o-a)/j7)}function F7(e){const t=H0(e),r=it(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Dr(r)}function bl(e,t){const r=t*7;return Ye(e,r)}function V7(e,t){return xt(e,t*12)}function z7(e){let t;return e.forEach(function(r){const n=ye(r);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function W7(e){let t;return e.forEach(r=>{const n=ye(r);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function Ze(e,t){const r=fn(e),n=fn(t);return+r==+n}function yl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function B7(e){if(!yl(e)&&typeof e!="number")return!1;const t=ye(e);return!isNaN(Number(t))}function ro(e,t){const r=ye(e),n=ye(t),o=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return o*12+a}function R7(e,t,r){const n=$t(e,r),o=$t(t,r),a=+n-Ya(n),s=+o-Ya(o);return Math.trunc((a-s)/vl)}function xl(e){const t=ye(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function Je(e){const t=ye(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Y0(e){const t=ye(e),r=it(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function wl(e,t){var i,l,c,u;const r=to(),n=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=ye(e),a=o.getDay(),s=(a<n?-7:0)+6-(a-n);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function G0(e){return wl(e,{weekStartsOn:1})}const K7={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},U7=(e,t,r)=>{let n;const o=K7[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Cl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const H7={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Y7={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},G7={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},q7={date:Cl({formats:H7,defaultWidth:"full"}),time:Cl({formats:Y7,defaultWidth:"full"}),dateTime:Cl({formats:G7,defaultWidth:"full"})},Q7={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},X7=(e,t,r,n)=>Q7[e];function no(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=r!=null&&r.width?String(r.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=r!=null&&r.width?String(r.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Z7={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},J7={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},e9={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},t9={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},r9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},n9={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},o9={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:no({values:Z7,defaultWidth:"wide"}),quarter:no({values:J7,defaultWidth:"wide",argumentCallback:e=>e-1}),month:no({values:e9,defaultWidth:"wide"}),day:no({values:t9,defaultWidth:"wide"}),dayPeriod:no({values:r9,defaultWidth:"wide",formattingValues:n9,defaultFormattingWidth:"wide"})};function oo(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?s9(i,d=>d.test(s)):a9(i,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function a9(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function s9(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function i9(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=r.valueCallback?r.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const l9=/^(\d+)(th|st|nd|rd)?/i,c9=/\d+/i,u9={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},d9={any:[/^b/i,/^(a|c)/i]},f9={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},p9={any:[/1/i,/2/i,/3/i,/4/i]},h9={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},m9={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},g9={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},v9={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},b9={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},y9={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},x9={ordinalNumber:i9({matchPattern:l9,parsePattern:c9,valueCallback:e=>parseInt(e,10)}),era:oo({matchPatterns:u9,defaultMatchWidth:"wide",parsePatterns:d9,defaultParseWidth:"any"}),quarter:oo({matchPatterns:f9,defaultMatchWidth:"wide",parsePatterns:p9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:oo({matchPatterns:h9,defaultMatchWidth:"wide",parsePatterns:m9,defaultParseWidth:"any"}),day:oo({matchPatterns:g9,defaultMatchWidth:"wide",parsePatterns:v9,defaultParseWidth:"any"}),dayPeriod:oo({matchPatterns:b9,defaultMatchWidth:"any",parsePatterns:y9,defaultParseWidth:"any"})},q0={code:"en-US",formatDistance:U7,formatLong:q7,formatRelative:X7,localize:o9,match:x9,options:{weekStartsOn:0,firstWeekContainsDate:1}};function w9(e){const t=ye(e);return Dt(t,Y0(t))+1}function Q0(e){const t=ye(e),r=+Dr(t)-+F7(t);return Math.trunc(r/vl)+1}function X0(e,t){var u,d,h,p;const r=ye(e),n=r.getFullYear(),o=to(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=it(e,0);s.setFullYear(n+1,0,a),s.setHours(0,0,0,0);const i=$t(s,t),l=it(e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);const c=$t(l,t);return r.getTime()>=i.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function C9(e,t){var i,l,c,u;const r=to(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=X0(e,t),a=it(e,0);return a.setFullYear(o,0,n),a.setHours(0,0,0,0),$t(a,t)}function Z0(e,t){const r=ye(e),n=+$t(r,t)-+C9(r,t);return Math.trunc(n/vl)+1}function Me(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const lr={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Me(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Me(r+1,2)},d(e,t){return Me(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Me(e.getHours()%12||12,t.length)},H(e,t){return Me(e.getHours(),t.length)},m(e,t){return Me(e.getMinutes(),t.length)},s(e,t){return Me(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return Me(o,t.length)}},pn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},J0={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return lr.y(e,t)},Y:function(e,t,r,n){const o=X0(e,n),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return Me(s,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Me(a,t.length)},R:function(e,t){const r=H0(e);return Me(r,t.length)},u:function(e,t){const r=e.getFullYear();return Me(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Me(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Me(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return lr.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Me(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=Z0(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):Me(o,t.length)},I:function(e,t,r){const n=Q0(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Me(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):lr.d(e,t)},D:function(e,t,r){const n=w9(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Me(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Me(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Me(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return Me(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(n===12?o=pn.noon:n===0?o=pn.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(n>=17?o=pn.evening:n>=12?o=pn.afternoon:n>=4?o=pn.morning:o=pn.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return lr.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):lr.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Me(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Me(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):lr.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):lr.s(e,t)},S:function(e,t){return lr.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return th(n);case"XXXX":case"XX":return Ir(n);case"XXXXX":case"XXX":default:return Ir(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return th(n);case"xxxx":case"xx":return Ir(n);case"xxxxx":case"xxx":default:return Ir(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eh(n,":");case"OOOO":default:return"GMT"+Ir(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eh(n,":");case"zzzz":default:return"GMT"+Ir(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Me(n,t.length)},T:function(e,t,r){const n=e.getTime();return Me(n,t.length)}};function eh(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),a=n%60;return a===0?r+String(o):r+String(o)+t+Me(a,2)}function th(e,t){return e%60===0?(e>0?"-":"+")+Me(Math.abs(e)/60,2):Ir(e,t)}function Ir(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Me(Math.trunc(n/60),2),a=Me(n%60,2);return r+o+t+a}const rh=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},nh=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},P9={p:nh,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return rh(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",rh(n,t)).replace("{{time}}",nh(o,t))}},M9=/^D+$/,T9=/^Y+$/,S9=["D","DD","YY","YYYY"];function E9(e){return M9.test(e)}function $9(e){return T9.test(e)}function D9(e,t,r){const n=I9(e,t,r);if(console.warn(n),S9.includes(e))throw new RangeError(n)}function I9(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const k9=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,A9=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,O9=/^'([^]*?)'?$/,N9=/''/g,L9=/[a-zA-Z]/;function Kt(e,t,r){var u,d,h,p,m,b,y,C;const n=to(),o=(r==null?void 0:r.locale)??n.locale??q0,a=(r==null?void 0:r.firstWeekContainsDate)??((d=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=(r==null?void 0:r.weekStartsOn)??((b=(m=r==null?void 0:r.locale)==null?void 0:m.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((C=(y=n.locale)==null?void 0:y.options)==null?void 0:C.weekStartsOn)??0,i=ye(e);if(!B7(i))throw new RangeError("Invalid time value");let l=t.match(A9).map(x=>{const P=x[0];if(P==="p"||P==="P"){const S=P9[P];return S(x,o.formatLong)}return x}).join("").match(k9).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const P=x[0];if(P==="'")return{isToken:!1,value:j9(x)};if(J0[P])return{isToken:!0,value:x};if(P.match(L9))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const c={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(x=>{if(!x.isToken)return x.value;const P=x.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&$9(P)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&E9(P))&&D9(P,t,String(e));const S=J0[P[0]];return S(i,P,o.localize,c)}).join("")}function j9(e){const t=e.match(O9);return t?t[1].replace(N9,"'"):e}function _9(e){const t=ye(e),r=t.getFullYear(),n=t.getMonth(),o=it(e,0);return o.setFullYear(r,n+1,0),o.setHours(0,0,0,0),o.getDate()}function F9(e){return Math.trunc(+ye(e)/1e3)}function V9(e){const t=ye(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function z9(e,t){return R7(V9(e),Je(e),t)+1}function Pl(e,t){const r=ye(e),n=ye(t);return r.getTime()>n.getTime()}function oh(e,t){const r=ye(e),n=ye(t);return+r<+n}function Ml(e,t){const r=ye(e),n=ye(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function W9(e,t){const r=ye(e),n=ye(t);return r.getFullYear()===n.getFullYear()}function Tl(e,t){return Ye(e,-t)}function Sl(e,t){const r=ye(e),n=r.getFullYear(),o=r.getDate(),a=it(e,0);a.setFullYear(n,t,15),a.setHours(0,0,0,0);const s=_9(a);return r.setMonth(t,Math.min(o,s)),r}function ah(e,t){const r=ye(e);return isNaN(+r)?it(e,NaN):(r.setFullYear(t),r)}var ae=function(){return ae=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ae.apply(this,arguments)};function B9(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function sh(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var El={exports:{}},ao={};/**
|