cekat-ui 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,12 +1,12 @@
1
- (function(X,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(X=typeof globalThis<"u"?globalThis:X||self,a(X.CekatUI={},X.React$1,X.$3wX5A$reactdom))})(this,(function(X,a,et){"use strict";function ka(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const b=ka(a);var Pa={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const tt=(t,e,r,n)=>{const o=a.forwardRef(({color:i="currentColor",size:l=24,stroke:s=2,title:c,className:u,children:d,...f},p)=>a.createElement("svg",{ref:p,...Pa[t],width:l,height:l,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),strokeWidth:s,stroke:i,...f},[c&&a.createElement("title",{key:"svg-title"},c),...n.map(([h,m])=>a.createElement(h,m)),...Array.isArray(d)?d:[d]]));return o.displayName=`${r}`,o};const zn=tt("outline","alert-circle","AlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);const _n=tt("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);const Ta=tt("outline","circle-check","CircleCheck",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);const $r=tt("outline","info-circle","InfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);const Na=tt("outline","loader-2","Loader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]);const Ka=tt("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function He(...t){return(...e)=>{for(let r of t)typeof r=="function"&&r(...e)}}const Q=typeof document<"u"?a.useLayoutEffect:()=>{},Dt={prefix:String(Math.round(Math.random()*1e10)),current:0},Vn=a.createContext(Dt),La=a.createContext(!1);let Ma=!!(typeof window<"u"&&window.document&&window.document.createElement),Sr=new WeakMap;function Da(t=!1){let e=a.useContext(Vn),r=a.useRef(null);if(r.current===null&&!t){let n=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(n){let o=Sr.get(n);o==null?Sr.set(n,{id:e.current,state:n.memoizedState}):n.memoizedState!==o.state&&(e.current=o.id,Sr.delete(n))}r.current=++e.current}return r.current}function Ia(t){let e=a.useContext(Vn);e===Dt&&!Ma&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=Da(!!t),n=e===Dt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${n}-${r}`}function Aa(t){let e=a.useId(),[r]=a.useState(ht()),n=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Dt.prefix}`;return t||`${n}-${e}`}const Fa=typeof a.useId=="function"?Aa:Ia;function Oa(){return!1}function Ba(){return!0}function za(t){return()=>{}}function ht(){return typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore(za,Oa,Ba):a.useContext(La)}function _a(t){let[e,r]=a.useState(t),n=a.useRef(e),o=a.useRef(null),i=a.useRef(()=>{if(!o.current)return;let s=o.current.next();if(s.done){o.current=null;return}n.current===s.value?i.current():r(s.value)});Q(()=>{n.current=e,o.current&&i.current()});let l=a.useCallback(s=>{o.current=s(n.current),i.current()},[i]);return[e,l]}let Va=!!(typeof window<"u"&&window.document&&window.document.createElement),rt=new Map,nt;typeof FinalizationRegistry<"u"&&(nt=new FinalizationRegistry(t=>{rt.delete(t)}));let Cr=new WeakMap;function Se(t){let[e,r]=a.useState(t),n=a.useRef(null),o=Fa(e),i=a.useRef(null),l=Cr.get(i);if(nt&&l!==o&&(l!=null&&nt.unregister(i),nt.register(i,o,i),Cr.set(i,o)),Va){const s=rt.get(o);s&&!s.includes(n)?s.push(n):rt.set(o,[n])}return Q(()=>{let s=o;return()=>{nt&&(nt.unregister(i),Cr.delete(i)),rt.delete(s)}},[o]),a.useEffect(()=>{let s=n.current;return s&&r(s),()=>{s&&(n.current=null)}}),o}function Ha(t,e){if(t===e)return t;let r=rt.get(t);if(r)return r.forEach(o=>o.current=e),e;let n=rt.get(e);return n?(n.forEach(o=>o.current=t),t):e}function kr(t=[]){let e=Se(),[r,n]=_a(e),o=a.useCallback(()=>{n(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,n]);return Q(o,[e,o,...t]),r}function Pr(...t){return t.length===1&&t[0]?t[0]:e=>{let r=!1;const n=t.map(o=>{const i=Hn(o,e);return r||=typeof i=="function",i});if(r)return()=>{n.forEach((o,i)=>{typeof o=="function"?o():Hn(t[i],null)})}}}function Hn(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Wn(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Wn(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function O(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Wn(t))&&(n&&(n+=" "),n+=e);return n}function ee(...t){let e={...t[0]};for(let r=1;r<t.length;r++){let n=t[r];for(let o in n){let i=e[o],l=n[o];typeof i=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=He(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=O(i,l):o==="id"&&i&&l?e.id=Ha(i,l):o==="ref"&&i&&l?e.ref=Pr(i,l):e[o]=l!==void 0?l:i}}return e}function gt(t){const e=a.useRef(null),r=a.useRef(void 0),n=a.useCallback(o=>{if(typeof t=="function"){const i=t,l=i(o);return()=>{typeof l=="function"?l():i(null)}}else if(t)return t.current=o,()=>{t.current=null}},[t]);return a.useMemo(()=>({get current(){return e.current},set current(o){e.current=o,r.current&&(r.current(),r.current=void 0),o!=null&&(r.current=n(o))}}),[n])}const jn=Symbol("default");function bt({values:t,children:e}){for(let[r,n]of t)e=a.createElement(r.Provider,{value:n},e);return e}function Ae(t){let{className:e,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:l,values:s,render:c}=t;return a.useMemo(()=>{let u,d,f;return typeof e=="function"?u=e({...s,defaultClassName:o}):u=e,typeof r=="function"?d=r({...s,defaultStyle:l||{}}):d=r,typeof n=="function"?f=n({...s,defaultChildren:i}):n==null?f=i:f=n,{className:u??o,style:d||l?{...l,...d}:void 0,children:f??i,"data-rac":"",render:c?p=>c(p,s):void 0}},[e,r,n,o,i,l,s,c])}function Un(t,e){return r=>e(typeof t=="function"?t(r):t,r)}function It(t,e){let r=a.useContext(t);if(e===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=e||jn;if(!r.slots[n]){let o=new Intl.ListFormat().format(Object.keys(r.slots).map(l=>`"${l}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return r.slots[n]}return r}function ot(t,e,r){let n=It(r,t.slot)||{},{ref:o,...i}=n,l=gt(a.useMemo(()=>Pr(e,o),[e,o])),s=ee(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?s.style=c=>{let u=typeof i.style=="function"?i.style(c):i.style,d={...c.defaultStyle,...u},f=typeof t.style=="function"?t.style({...c,defaultStyle:d}):t.style;return{...d,...f}}:s.style={...i.style,...t.style}),[s,l]}function Wa(t=!0){let[e,r]=a.useState(t),n=a.useRef(!1),o=a.useCallback(i=>{n.current=!0,r(!!i)},[]);return Q(()=>{n.current||r(!1)},[]),[o,e]}function ja(t,e,r){let{render:n,...o}=e,i=a.useRef(null),l=a.useMemo(()=>Pr(r,i),[r,i]);Q(()=>{process.env.NODE_ENV!=="production"&&n&&(i.current?i.current.localName!==t&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${t}>, got <${i.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"))},[t,n]);let s={...o,ref:l};return n?n(s,void 0):a.createElement(t,s)}const Gn={},Ce=new Proxy({},{get(t,e){if(typeof e!="string")return;let r=Gn[e];return r||(r=a.forwardRef(ja.bind(null,e)),Gn[e]=r),r}}),Ua="react-aria-clear-focus",Ga="react-aria-focus",J=t=>Ra(t)?t.document:qa(t)?t:t?.ownerDocument??(typeof document<"u"?document:void 0),fe=t=>J(t)?.defaultView??(typeof window<"u"?window:void 0);function Rn(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function Ra(t){return typeof t=="object"&&t!=null&&"window"in t&&t.window===t}function qa(t){return Rn(t)&&t.nodeType===9}function Tr(t){return Rn(t)&&t.nodeType===11&&"host"in t}function Ya(t,e,r,n){if(r==null||t==null)return()=>{};let o=Array.isArray(t)?t:[t];for(let i of o)i.addEventListener(e,r,n);return()=>{for(let i of o)i.removeEventListener(e,r,n)}}let Xa=!1;function ke(){return Xa}function q(t,e){if(!ke())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let r=e;for(;r!==null;){if(r===t)return!0;typeof r.assignedElements!="function"&&r.assignedSlot?.parentNode?r=r.assignedSlot.parentNode:Tr(r)?r=r.host:r=r.parentNode}return!1}const ie=(t=document)=>{if(!ke())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e};function A(t){if(ke()&&t.target instanceof Element&&t.target.shadowRoot){if("composedPath"in t)return t.composedPath()[0]??null;if("composedPath"in t.nativeEvent)return t.nativeEvent.composedPath()[0]??null}return t.target}function Za(t,e){if(e===null)return[];e=e??fe(t);let r=[e];if(!ke()||!t||t===e)return r;let n="getRootNode"in e?e.getRootNode():null,o=t.getRootNode()??null;for(;Tr(o)&&o!==n;)r.push(o),o=o.host.getRootNode();return r}function At(t){if(!t)return!1;let e=t.getRootNode(),r=fe(t);if(!(e instanceof r.Document||e instanceof r.ShadowRoot))return!1;let n=e.activeElement;return n!=null&&t.contains(n)}function qn(t){let e=Qa(J(t));e!==t&&(e&&Ja(e,t),t&&Yn(t,e))}function Ja(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function Yn(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function Qa(t){let e=ie(t),r=e?.getAttribute("aria-activedescendant");return r&&t.getElementById(r)||e}function we(t){if(ec())t.focus({preventScroll:!0});else{let e=tc(t);t.focus(),rc(e)}}let Ft=null;function ec(){if(Ft==null){Ft=!1;try{document.createElement("div").focus({get preventScroll(){return Ft=!0,!0}})}catch{}}return Ft}function tc(t){let e=t.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&r.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function rc(t){for(let{element:e,scrollTop:r,scrollLeft:n}of t)e.scrollTop=r,e.scrollLeft=n}const nc=typeof Element<"u"&&"checkVisibility"in Element.prototype;function oc(t){const e=fe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:r,visibility:n}=t.style,o=r!=="none"&&n!=="hidden"&&n!=="collapse";if(o){const{getComputedStyle:i}=fe(t);let{display:l,visibility:s}=i(t);o=l!=="none"&&s!=="hidden"&&s!=="collapse"}return o}function ic(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Nr(t,e){return nc?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&oc(t)&&ic(t,e)&&(!t.parentElement||Nr(t.parentElement,t))}const Kr=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],lc=Kr.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Kr.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const sc=Kr.join(':not([hidden]):not([tabindex="-1"]),');function Xn(t,e){return t.matches(lc)&&!Zn(t)&&(e?.skipVisibilityCheck||Nr(t))}function Lr(t){return t.matches(sc)&&Nr(t)&&!Zn(t)}function Zn(t){let e=t;for(;e!=null;){if(e instanceof fe(e).HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function Mr(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function Jn(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function Qn(t){let e=a.useRef({isFocused:!1,observer:null});return Q(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),a.useCallback(r=>{let n=A(r);if(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){e.current.isFocused=!0;let o=n,i=l=>{if(e.current.isFocused=!1,o.disabled){let s=Mr(l);t?.(s)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&o.disabled){e.current.observer?.disconnect();let l=o===ie()?null:ie();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let Ot=!1;function eo(t){for(;t&&!Xn(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=fe(t),r=e.document.activeElement;if(!r||r===t)return;Ot=!0;let n=!1,o=d=>{(A(d)===r||n)&&d.stopImmediatePropagation()},i=d=>{(A(d)===r||n)&&(d.stopImmediatePropagation(),!t&&!n&&(n=!0,we(r),c()))},l=d=>{(A(d)===t||n)&&d.stopImmediatePropagation()},s=d=>{(A(d)===t||n)&&(d.stopImmediatePropagation(),n||(n=!0,we(r),c()))};e.addEventListener("blur",o,!0),e.addEventListener("focusout",i,!0),e.addEventListener("focusin",s,!0),e.addEventListener("focus",l,!0);let c=()=>{cancelAnimationFrame(u),e.removeEventListener("blur",o,!0),e.removeEventListener("focusout",i,!0),e.removeEventListener("focusin",s,!0),e.removeEventListener("focus",l,!0),Ot=!1,n=!1},u=requestAnimationFrame(c);return c}function Bt(t){if(typeof window>"u"||window.navigator==null)return!1;let e=window.navigator.userAgentData?.brands;return Array.isArray(e)&&e.some(r=>t.test(r.brand))||t.test(window.navigator.userAgent)}function Dr(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Pe(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const be=Pe(function(){return Dr(/^Mac/i)}),ac=Pe(function(){return Dr(/^iPhone/i)}),to=Pe(function(){return Dr(/^iPad/i)||be()&&navigator.maxTouchPoints>1}),We=Pe(function(){return ac()||to()}),cc=Pe(function(){return be()||We()}),Fe=Pe(function(){return Bt(/AppleWebKit/i)&&(We()||!Ir())});Pe(function(){return Fe()&&!Ir()&&!ro()});const Ir=Pe(function(){return Bt(/Chrome|CriOS|CrMo/i)}),zt=Pe(function(){return Bt(/Android/i)}),ro=Pe(function(){return Bt(/(Firefox|FxiOS)/i)});function Ar(t){return t.pointerType===""&&t.isTrusted?!0:zt()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function uc(t){return!zt()&&t.width===0&&t.height===0||zt()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const dc=a.createContext({isNative:!0,open:hc,useHref:t=>t});function _t(){return a.useContext(dc)}function fc(t,e){let r=t.getAttribute("target");return(!r||r==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function Me(t,e,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:l}=e;!Fe()&&ro()&&window.event?.type?.startsWith("key")&&t.target==="_blank"&&(be()?n=!0:o=!0);let s=Fe()&&be()&&!to()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:l}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Me.isOpening=r,we(t),t.dispatchEvent(s),Me.isOpening=!1}Me.isOpening=!1;function pc(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let r=document.createElement("a");r.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(r.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(r.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(r.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(r.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(r),e(r),t.removeChild(r)}}function hc(t,e){pc(t,r=>Me(r,e))}function no(t){const r=_t().useHref(t?.href??"");let n={};if(t)for(let o of["href","target","rel","download","ping","referrerPolicy"])o in t&&t[o]!==void 0&&(n[o]=o==="href"?r:t[o]);return n}function gc(t,e,r,n){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&fc(t.currentTarget,t)&&r&&(t.preventDefault(),e.open(t.currentTarget,t,r,n))}let je=null;const Fr=new Set;let mt=new Map,Ue=!1,Or=!1;const bc={Tab:!0,Escape:!0};function Vt(t,e){for(let r of Fr)r(t,e)}function mc(t){return!(t.metaKey||!be()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Ht(t){Ue=!0,!Me.isOpening&&mc(t)&&(je="keyboard",Vt("keyboard",t))}function me(t){je="pointer","pointerType"in t&&t.pointerType,(t.type==="mousedown"||t.type==="pointerdown")&&(Ue=!0,Vt("pointer",t))}function oo(t){!Me.isOpening&&Ar(t)&&(Ue=!0,je="virtual")}function io(t){let e=fe(A(t)),r=J(A(t));A(t)===e||A(t)===r||Ot||!t.isTrusted||(!Ue&&!Or&&(je="virtual",Vt("virtual",t)),Ue=!1,Or=!1)}function lo(){Ot||(Ue=!1,Or=!0)}function Br(t){if(typeof window>"u"||typeof document>"u")return;const e=fe(t),r=J(t);if(mt.get(e))return;let n=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){Ue=!0,n.apply(this,arguments)}}),r.addEventListener("keydown",Ht,!0),r.addEventListener("keyup",Ht,!0),r.addEventListener("click",oo,!0),e.addEventListener("focus",io,!0),e.addEventListener("blur",lo,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",me,!0),r.addEventListener("pointermove",me,!0),r.addEventListener("pointerup",me,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",me,!0),r.addEventListener("mousemove",me,!0),r.addEventListener("mouseup",me,!0)),e.addEventListener("beforeunload",()=>{so(t)},{once:!0}),mt.set(e,{focus:n})}const so=(t,e)=>{const r=fe(t),n=J(t);e&&n.removeEventListener("DOMContentLoaded",e),mt.has(r)&&(Reflect.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:mt.get(r).focus}),n.removeEventListener("keydown",Ht,!0),n.removeEventListener("keyup",Ht,!0),n.removeEventListener("click",oo,!0),r.removeEventListener("focus",io,!0),r.removeEventListener("blur",lo,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",me,!0),n.removeEventListener("pointermove",me,!0),n.removeEventListener("pointerup",me,!0)):process.env.NODE_ENV==="test"&&(n.removeEventListener("mousedown",me,!0),n.removeEventListener("mousemove",me,!0),n.removeEventListener("mouseup",me,!0)),mt.delete(r))};function yc(t){const e=J(t);let r;return e.readyState!=="loading"?Br(t):(r=()=>{Br(t)},e.addEventListener("DOMContentLoaded",r)),()=>so(t,r)}typeof document<"u"&&yc();function yt(){return je!=="pointer"}function xt(){return je}function zr(t){je=t,Vt(t,null)}const xc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function vc(t,e,r){let n=r?A(r):void 0,o=J(n),i=fe(n);const l=typeof i<"u"?i.HTMLInputElement:HTMLInputElement,s=typeof i<"u"?i.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof i<"u"?i.HTMLElement:HTMLElement,u=typeof i<"u"?i.KeyboardEvent:KeyboardEvent;let d=ie(o);return t=t||d instanceof l&&!xc.has(d.type)||d instanceof s||d instanceof c&&d.isContentEditable,!(t&&e==="keyboard"&&r instanceof u&&!bc[r.key])}function wc(t,e,r){Br(),a.useEffect(()=>{if(r?.enabled===!1)return;let n=(o,i)=>{vc(!!r?.isTextInput,o,i)&&t(yt())};return Fr.add(n),()=>{Fr.delete(n)}},e)}function vt(t){return be()?t.metaKey:t.ctrlKey}const Ec=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _r(t){return t instanceof HTMLInputElement&&!Ec.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const $c=a.useInsertionEffect??Q;function Ge(t){const e=a.useRef(null);return $c(()=>{e.current=t},[t]),a.useCallback((...r)=>{const n=e.current;return n?.(...r)},[])}function Wt(t,e,r,n){let o=Ge(r),i=r==null;a.useEffect(()=>{if(i||!t.current)return;let l=t.current;return l.addEventListener(e,o,n),()=>{l.removeEventListener(e,o,n)}},[t,e,n,i])}function ao(t,e){let{id:r,"aria-label":n,"aria-labelledby":o}=t;return r=Se(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!n&&!o&&e&&(n=e),{id:r,"aria-label":n,"aria-labelledby":o}}const Sc=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Cc=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function kc(t){if(Intl.Locale){let r=new Intl.Locale(t).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return Sc.has(r.script)}let e=t.split("-")[0];return Cc.has(e)}const co=Symbol.for("react-aria.i18n.locale");function uo(){let t=typeof window<"u"&&window[co]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:kc(t)?"rtl":"ltr"}}let Vr=uo(),wt=new Set;function fo(){Vr=uo();for(let t of wt)t(Vr)}function Pc(){let t=ht(),[e,r]=a.useState(Vr);return a.useEffect(()=>(wt.size===0&&window.addEventListener("languagechange",fo),wt.add(r),()=>{wt.delete(r),wt.size===0&&window.removeEventListener("languagechange",fo)}),[]),t?{locale:typeof window<"u"&&window[co]||"en-US",direction:"ltr"}:e}const Tc=a.createContext(null);function it(){let t=Pc();return a.useContext(Tc)||t}const Nc=Symbol.for("react-aria.i18n.locale"),Kc=Symbol.for("react-aria.i18n.strings");let jt;class Ut{constructor(e,r="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,n])=>n)),this.defaultLocale=r}getStringForLocale(e,r){let o=this.getStringsForLocale(r)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${r} locale`);return o}getStringsForLocale(e){let r=this.strings[e];return r||(r=Lc(e,this.strings,this.defaultLocale),this.strings[e]=r),r}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let r=window[Nc];if(jt===void 0){let o=window[Kc];if(!o)return null;jt={};for(let i in o)jt[i]=new Ut({[r]:o[i]},r)}let n=jt?.[e];if(!n)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}function Lc(t,e,r="en-US"){if(e[t])return e[t];let n=Mc(t),o=Dc(t);if(o&&e[`${n}-${o}`])return e[`${n}-${o}`];if(e[n])return e[n];for(let i in e)if(i.startsWith(n+"-"))return e[i];return e[r]}function Mc(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}function Dc(t){if(Intl.Locale)return new Intl.Locale(t).script}const po=new Map,ho=new Map;class Ic{constructor(e,r){this.locale=e,this.strings=r}format(e,r){let n=this.strings.getStringForLocale(e,this.locale);return typeof n=="function"?n(r,this):n}plural(e,r,n="cardinal"){let o=r["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+n,l=po.get(i);l||(l=new Intl.PluralRules(this.locale,{type:n}),po.set(i,l));let s=l.select(e);return o=r[s]||r.other,typeof o=="function"?o():o}number(e){let r=ho.get(this.locale);return r||(r=new Intl.NumberFormat(this.locale),ho.set(this.locale,r)),r.format(e)}select(e,r){let n=e[r]||e.other;return typeof n=="function"?n():n}}const go=new WeakMap;function Ac(t){let e=go.get(t);return e||(e=new Ut(t),go.set(t,e)),e}function Fc(t,e){return e&&Ut.getGlobalDictionaryForPackage(e)||Ac(t)}function bo(t,e){let{locale:r}=it(),n=Fc(t,e);return a.useMemo(()=>new Ic(r,n),[r,n])}const Oc=typeof document<"u"?a.useInsertionEffect??a.useLayoutEffect:()=>{};function Gt(t,e,r){let[n,o]=a.useState(t||e),i=a.useRef(n),l=a.useRef(t!==void 0),s=t!==void 0;a.useEffect(()=>{let f=l.current;f!==s&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),l.current=s},[s]);let c=s?t:n;Oc(()=>{i.current=c});let[,u]=a.useReducer(()=>({}),{}),d=a.useCallback((f,...p)=>{let h=typeof f=="function"?f(i.current):f;Object.is(i.current,h)||(i.current=h,o(h),u(),r?.(h,...p))},[r]);return[c,d]}const mo=a.createContext(null),Bc=a.createContext(null);class Re{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,r,n){let o=this.clone();return r.addDescendants(o,e),o}}class yo extends Re{filter(e,r,n){let[o,i]=Eo(e,r,this.firstChildKey,n),l=this.clone();return l.firstChildKey=o,l.lastChildKey=i,l}}const Mn=class Mn extends Re{};Mn.type="header";let xo=Mn;const Dn=class Dn extends Re{};Dn.type="loader";let vo=Dn;const In=class In extends yo{filter(e,r,n){if(n(this.textValue,this)){let o=this.clone();return r.addDescendants(o,e),o}return null}};In.type="item";let Hr=In;const An=class An extends yo{filter(e,r,n){let o=super.filter(e,r,n);if(o&&o.lastChildKey!==null){let i=e.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}};An.type="section";let wo=An;class zc{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let r=this.keyMap;return{*[Symbol.iterator](){let n=r.get(e),o=n?.firstChildKey!=null?r.get(n.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?r.get(o.nextKey):void 0}}}getKeyBefore(e){let r=this.keyMap.get(e);if(!r)return null;if(r.prevKey!=null){for(r=this.keyMap.get(r.prevKey);r&&r.type!=="item"&&r.lastChildKey!=null;)r=this.keyMap.get(r.lastChildKey);return r?.key??null}return r.parentKey}getKeyAfter(e){let r=this.keyMap.get(e);if(!r)return null;if(r.type!=="item"&&r.firstChildKey!=null)return r.firstChildKey;for(;r;){if(r.nextKey!=null)return r.nextKey;if(r.parentKey!=null)r=this.keyMap.get(r.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,r=new e;return r.keyMap=new Map(this.keyMap),r.firstKey=this.firstKey,r.lastKey=this.lastKey,r.itemCount=this.itemCount,r}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,r){this.addNode(e);let n=r.getChildren(e.key);for(let o of n)this.addDescendants(o,r)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let r=this.keyMap.get(e);r!=null&&r.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,r,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=r,this.frozen=!n}filter(e){let r=new this.constructor,[n,o]=Eo(this,r,this.firstKey,e);return r?.commit(n,o),r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function Eo(t,e,r,n){if(r==null)return[null,null];let o=null,i=null,l=t.getItem(r);for(;l!=null;){let s=l.filter(t,e,n);s!=null&&(s.nextKey=null,i&&(s.prevKey=i.key,i.nextKey=s.key),o==null&&(o=s),e.addNode(s),i=s),l=l.nextKey!=null?t.getItem(l.nextKey):null}if(i&&i.type==="separator"){let s=i.prevKey;e.removeNode(i.key),s!=null?(i=e.getItem(s),i.nextKey=null):i=null}return[o?.key??null,i?.key??null]}class $o{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,r){if(r==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=r,e.previousSibling=r.previousSibling,e.index=r.index-1,this.firstChild===r?this.firstChild=e:r.previousSibling&&(r.previousSibling.nextSibling=e),r.previousSibling=e,e.parentNode=r.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class lt extends $o{constructor(e,r){super(r),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof lt?this.parentNode.level+(this.parentNode.node?.type==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let e=this.nextVisibleSibling,r=this.getMutableNode();if(r!=null&&(r.index=this.index,r.level=this.level,r.parentKey=this.parentNode instanceof lt?this.parentNode.node?.key??null:null,r.prevKey=this.previousVisibleSibling?.node?.key??null,r.nextKey=e?.node?.key??null,r.hasChildNodes=!!this.firstChild,r.firstChildKey=this.firstVisibleChild?.node?.key??null,r.lastChildKey=this.lastVisibleChild?.node?.key??null,(r.colSpan!=null||r.colIndex!=null)&&e)){let n=(r.colIndex??r.index)+(r.colSpan??1);if(e.node!=null&&n!==e.node.colIndex){let o=e.getMutableNode();o.colIndex=n}}}setProps(e,r,n,o,i){let l,{value:s,textValue:c,id:u,...d}=e;if(this.node==null?(l=new n(u??`react-aria-${++this.ownerDocument.nodeId}`),this.node=l):l=this.getMutableNode(),d.ref=r,l.props=d,l.rendered=o,l.render=i,l.value=s,e["aria-label"]&&(l["aria-label"]=e["aria-label"]),l.textValue=c||(typeof d.children=="string"?d.children:"")||e["aria-label"]||"",u!=null&&u!==l.key)throw new Error("Cannot change the id of an item");d.colSpan!=null&&(l.colSpan=d.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(r){let n=r==="none";if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let o=e.previousVisibleSibling,i=e.nextVisibleSibling;o&&e.ownerDocument.markDirty(o),i&&e.ownerDocument.markDirty(i),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class _c extends $o{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new lt(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let r=this.getMutableCollection();if(!r.getItem(e.node.key))for(let n of e)this.addNode(n);r.addNode(e.node)}removeNode(e){for(let r of e)this.removeNode(r);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof lt&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof lt?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),this.queuedRender&&e(),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function So(t){let{children:e,items:r,idScope:n,addIdAndValue:o,dependencies:i=[]}=t,l=a.useMemo(()=>process.env.NODE_ENV!=="production"&&typeof e=="function"?e.toString():void 0,[e]),s=a.useMemo(()=>new WeakMap,[...i,l]);return a.useMemo(()=>{if(r&&typeof e=="function"){let c=[];for(let u of r){let d=Vc(u)?u:null,f=d?s.get(d):null;if(!f){f=e(u);let p=f.props.id??u?.key??u?.id;n!=null&&f.props.id==null&&p!=null&&(p=n+":"+p);let h=p??c.length;f=a.cloneElement(f,o?{key:h,id:p,value:u}:{key:h}),d&&s.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,r,s,n,o])}function Vc(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}let Oe=new Map,Wr=new Set;function Co(){if(typeof window>"u")return;function t(n){return"propertyName"in n}let e=n=>{let o=A(n);if(!t(n)||!o)return;let i=Oe.get(o);i||(i=new Set,Oe.set(o,i),o.addEventListener("transitioncancel",r,{once:!0})),i.add(n.propertyName)},r=n=>{let o=A(n);if(!t(n)||!o)return;let i=Oe.get(o);if(i&&(i.delete(n.propertyName),i.size===0&&(o.removeEventListener("transitioncancel",r),Oe.delete(o)),Oe.size===0)){for(let l of Wr)l();Wr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",r)}typeof document<"u"&&(document.readyState!=="loading"?Co():document.addEventListener("DOMContentLoaded",Co));function Hc(){for(const[t]of Oe)"isConnected"in t&&!t.isConnected&&Oe.delete(t)}function ko(t){requestAnimationFrame(()=>{Hc(),Oe.size===0?t():Wr.add(t)})}function st(t){if(!t.isConnected)return;const e=J(t);if(xt()==="virtual"){let r=ie(e);ko(()=>{const n=ie(e);(n===r||n===e.body)&&t.isConnected&&we(t)})}else we(t)}function Po(t){let{isDisabled:e,onFocus:r,onBlur:n,onFocusChange:o}=t;const i=a.useCallback(c=>{if(A(c)===c.currentTarget)return n&&n(c),o&&o(!1),!0},[n,o]),l=Qn(i),s=a.useCallback(c=>{let u=A(c);const d=J(u),f=d?ie(d):ie();u===c.currentTarget&&u===f&&(r&&r(c),o&&o(!0),l(c))},[o,r,l]);return{focusProps:{onFocus:!e&&(r||o||n)?s:void 0,onBlur:!e&&(n||o)?i:void 0}}}function Rt(t){if(t)return e=>{let r=!0,n={...e,preventDefault(){e.preventDefault()},isDefaultPrevented(){return e.isDefaultPrevented()},stopPropagation(){r&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):r=!0},continuePropagation(){r=!1,typeof e.continuePropagation=="function"&&e.continuePropagation()},isPropagationStopped(){return r}};t(n),r&&!(typeof e.isPropagationStopped=="function"&&e.isPropagationStopped())&&e.stopPropagation()}}const Wc=new Set(["shift","alt","control","meta","mod"]),jc=["Alt","Control","Meta","Shift"];function Uc(t){let e=new Set;return t.alt&&e.add("Alt"),t.shift&&e.add("Shift"),t.ctrl&&e.add("Control"),t.meta&&e.add("Meta"),t.mod&&e.add(be()?"Meta":"Control"),e}function Gc(t){let e=new Set;return t.altKey&&e.add("Alt"),t.ctrlKey&&e.add("Control"),t.metaKey&&e.add("Meta"),t.shiftKey&&e.add("Shift"),e}function To(t){return jc.filter(e=>t.has(e))}function Rc(t){let e=t.split("+").reduce((r,n)=>{let o=n.toLowerCase();return Wc.has(o)?o==="shift"?r.shift=!0:o==="alt"?r.alt=!0:o==="control"?r.ctrl=!0:o==="meta"?r.meta=!0:o==="mod"&&(r.mod=!0):r.key=n,r},{shift:!1,alt:!1,ctrl:!1,meta:!1,mod:!1,key:""});if(e.key==="")throw new Error(`Invalid keyboard shortcut: "${t}". Must include exactly one non-modifier key (e.g. "a", "Enter", "ArrowDown"). Combine any of Shift, Alt, Ctrl, Meta, and Mod.`);return e}function No(t){return t.toLowerCase()}const qc={space:" ",esc:"escape",del:"delete",ins:"insert",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",pageup:"pageup",pagedown:"pagedown"};function Yc(t){let e=No(t),r=qc[e];return r??e}function Xc(t){let e=To(Uc(t)),r=Yc(t.key);return e.length>0?`${e.join("+")}+${r}`:r}function Zc(t){let e=To(Gc(t)),r=No(t.key);return(e.length>0?`${e.join("+")}+`:"")+r}function Jc(t){let e=new Map;for(let[r,n]of Object.entries(t)){let o=Rc(r);e.set(Xc(o),n)}return r=>{let n=Zc(r),o=e.get(n),i=o?.(r);i===void 0&&o!==void 0?i={shouldContinuePropagation:!1,shouldPreventDefault:!0}:typeof i=="boolean"&&(i={shouldContinuePropagation:!i,shouldPreventDefault:i}),i?.shouldPreventDefault&&r.preventDefault(),(!o||i?.shouldContinuePropagation)&&r.continuePropagation()}}function at(t){let{shortcuts:e,allowRepeats:r=!1,allowComposing:n=!1}=t,o,i;if(e){let l=Jc(e),s=Rt(u=>{if(!q(u.currentTarget,A(u))){u.continuePropagation();return}if(u.nativeEvent?.repeat&&!r||u.nativeEvent?.isComposing&&!n){u.continuePropagation();return}l(u)}),c=Rt(u=>{if(!q(u.currentTarget,A(u))){u.continuePropagation();return}if(u.nativeEvent?.repeat&&!r||u.nativeEvent?.isComposing&&!n){u.continuePropagation();return}u.continuePropagation()});o=t.onKeyDown?He(t.onKeyDown,s):s,i=t.onKeyUp?He(t.onKeyUp,c):c}else o=Rt(t.onKeyDown),i=Rt(t.onKeyUp);return{keyboardProps:t.isDisabled?{}:{onKeyDown:o,onKeyUp:i}}}function jr(t,e){Q(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}let qt=a.createContext(null);function Qc(t){let e=a.useContext(qt)||{};jr(e,t);let{ref:r,...n}=e;return n}function Ur(t,e){let{focusProps:r}=Po(t),{keyboardProps:n}=at(t),o=ee(r,n),i=Qc(e),l=t.isDisabled?{}:i,s=a.useRef(t.autoFocus);a.useEffect(()=>{s.current&&e.current&&st(e.current),s.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:ee({...o,tabIndex:c},l)}}typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.appendChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.removeChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(t,e){return this.content.insertBefore(t,e)}}));const Yt=a.createContext(!1);function eu(t){if(a.useContext(Yt))return a.createElement(a.Fragment,null,t.children);let r=a.createElement(Yt.Provider,{value:!0},t.children);return a.createElement("template",null,r)}function tu(t){let e=(r,n)=>a.useContext(Yt)?null:t(r,n);return e.displayName=t.displayName||t.name,a.forwardRef(e)}function Ko(){return a.useContext(Yt)}var Xt={exports:{}},Gr={};var Lo;function ru(){if(Lo)return Gr;Lo=1;var t=a;function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,o=t.useEffect,i=t.useLayoutEffect,l=t.useDebugValue;function s(f,p){var h=p(),m=n({inst:{value:h,getSnapshot:p}}),x=m[0].inst,g=m[1];return i(function(){x.value=h,x.getSnapshot=p,c(x)&&g({inst:x})},[f,h,p]),o(function(){return c(x)&&g({inst:x}),f(function(){c(x)&&g({inst:x})})},[f]),l(h),h}function c(f){var p=f.getSnapshot;f=f.value;try{var h=p();return!r(f,h)}catch{return!0}}function u(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Gr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Gr}var Rr={};var Mo;function nu(){return Mo||(Mo=1,process.env.NODE_ENV!=="production"&&(function(){function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}function e(h,m){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=m();if(!f){var g=m();i(x,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}g=l({inst:{value:x,getSnapshot:m}});var w=g[0].inst,v=g[1];return c(function(){w.value=x,w.getSnapshot=m,r(w)&&v({inst:w})},[h,x,m]),s(function(){return r(w)&&v({inst:w}),h(function(){r(w)&&v({inst:w})})},[h]),u(x),x}function r(h){var m=h.getSnapshot;h=h.value;try{var x=m();return!i(h,x)}catch{return!0}}function n(h,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=a,i=typeof Object.is=="function"?Object.is:t,l=o.useState,s=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;Rr.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Rr}var Do;function ou(){return Do||(Do=1,process.env.NODE_ENV==="production"?Xt.exports=ru():Xt.exports=nu()),Xt.exports}var iu=ou();const Io=a.createContext(!1),Et=a.createContext(null);function Ao(t){if(a.useContext(Et))return t.content;let{collection:r,document:n}=cu(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(eu,null,a.createElement(Et.Provider,{value:n},t.content)),a.createElement(lu,{render:t.children,collection:r}))}function lu({collection:t,render:e}){return e(t)}function su(t,e,r){let n=ht(),o=a.useRef(n);o.current=n;let i=a.useCallback(()=>o.current?r():e(),[e,r]);return iu.useSyncExternalStore(t,i)}const au=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:su;function cu(t){let[e]=a.useState(()=>new _c(t?.()||new zc)),r=a.useCallback(l=>e.subscribe(l),[e]),n=a.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:au(r,n,o),document:e}}const qr=a.createContext(null);function uu(t){var r;return r=class extends Re{},r.type=t,r}function du(t,e,r,n,o,i){typeof t=="string"&&(t=uu(t));let l=a.useCallback(c=>{c?.setProps(e,r,t,n,i)},[e,r,n,i,t]),s=a.useContext(qr);if(s){let c=s.ownerDocument.nodesByProps.get(e);return c||(c=s.ownerDocument.createElement(t.type),c.setProps(e,r,t,n,i),s.appendChild(c),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,c)),o?a.createElement(qr.Provider,{value:c},o):null}return a.createElement(t.type,{ref:l},o)}function Fo(t,e){let r=({node:o})=>e(o.props,o.props.ref,o),n=a.forwardRef((o,i)=>{let l=a.useContext(qt);if(!a.useContext(Io)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return du(t,o,i,"children"in o?o.children:null,null,c=>a.createElement(qt.Provider,{value:l},a.createElement(r,{node:c})))});return n.displayName=e.name,n}function fu(t){return So({...t,addIdAndValue:!0})}const Oo=a.createContext(null);function Bo(t){let e=a.useContext(Oo),r=(e?.dependencies||[]).concat(t.dependencies),n=t.idScope??e?.idScope,o=fu({...t,idScope:n,dependencies:r});return a.useContext(Et)&&(o=a.createElement(pu,null,o)),e=a.useMemo(()=>({dependencies:r,idScope:n}),[n,...r]),a.createElement(Oo.Provider,{value:e},o)}function pu({children:t}){let e=a.useContext(Et),r=a.useMemo(()=>a.createElement(Et.Provider,{value:null},a.createElement(Io.Provider,{value:!0},t)),[t]);return ht()?a.createElement(qr.Provider,{value:e},r):et.createPortal(r,e)}const hu=a.createContext(null),gu={CollectionRoot({collection:t,renderDropIndicator:e}){return zo(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:r}){return zo(t,e,r)}};function zo(t,e,r){return So({items:e?t.getChildren(e.key):t,dependencies:[r],children(n){if(n.type==="content")return a.createElement(a.Fragment,null);let o=n.render(n);return!r||n.type!=="item"?o:a.createElement(a.Fragment,null,r({type:"item",key:n.key,dropPosition:"before"}),o,bu(t,n,r))}})}function bu(t,e,r){let n=e.key,o=t.getKeyAfter(n),i=o!=null?t.getItem(o):null;for(;i!=null&&i.type!=="item";)o=t.getKeyAfter(i.key),i=o!=null?t.getItem(o):null;let l=e.nextKey!=null?t.getItem(e.nextKey):null;for(;l!=null&&l.type!=="item";)l=l.nextKey!=null?t.getItem(l.nextKey):null;let s=[];if(l==null){let c=e;for(;c?.type==="item"&&(!i||c.parentKey!==i.parentKey&&i.level<c.level);){let u=r({type:"item",key:c.key,dropPosition:"after"});a.isValidElement(u)&&s.push(a.cloneElement(u,{key:`${c.key}-after`})),c=c.parentKey!=null?t.getItem(c.parentKey):null}}return s}const Zt=a.createContext(gu);function _o(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const mu=new Set(["id"]),yu=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),xu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),vu=new Set(["dir","lang","hidden","inert","translate"]),Vo=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),wu=/^(data-.*)$/;function ye(t,e={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:l}=e,s={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(mu.has(c)||r&&yu.has(c)||n&&xu.has(c)||o&&vu.has(c)||i&&(Vo.has(c)||c.endsWith("Capture")&&Vo.has(c.slice(0,-7)))||l?.has(c)||wu.test(c))&&(s[c]=t[c]);return s}let ct="default",Yr="",Jt=new WeakMap;function Ho(t){if(We()&&Fe()){if(ct==="default"){const e=J(t);Yr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}ct="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";Jt.set(t,t.style[e]),t.style[e]="none"}}function Xr(t){if(We()&&Fe()){if(ct!=="disabled")return;ct="restoring",setTimeout(()=>{ko(()=>{if(ct==="restoring"){const e=J(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Yr||""),Yr="",ct="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Jt.has(t)){let e=Jt.get(t),r="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[r]==="none"&&(t.style[r]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Jt.delete(t)}}function Wo(t){return t?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let Zr=new WeakMap;function jo(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return Wo(e);if(Zr.has(e))return Zr.get(e);let r=e.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof fe(r).HTMLMetaElement&&(r.nonce||r.content)||Wo(e)||void 0;return n!==void 0&&Zr.set(e,n),n}const $t=a.createContext({register:()=>{}});$t.displayName="PressResponderContext";function Qt(){let t=a.useRef(new Map),e=a.useCallback((o,i,l,s)=>{let c=s?.once?(...u)=>{t.current.delete(l),l(...u)}:l;t.current.set(l,{type:i,eventTarget:o,fn:c,options:s}),o.addEventListener(i,c,s)},[]),r=a.useCallback((o,i,l,s)=>{let c=t.current.get(l)?.fn||l;o.removeEventListener(i,c,s),t.current.delete(l)},[]),n=a.useCallback(()=>{t.current.forEach((o,i)=>{r(o.eventTarget,o.type,i,o.options)})},[r]);return a.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:r,removeAllGlobalListeners:n}}function Eu(t){let e=a.useContext($t);if(e){let{register:r,ref:n,...o}=e;t=ee(o,t),r()}return jr(e,t.ref),t}class er{#e;constructor(e,r,n,o){this.#e=!0;const l=(o?.target??n.currentTarget)?.getBoundingClientRect();let s,c=0,u,d=null;n.clientX!=null&&n.clientY!=null&&(u=n.clientX,d=n.clientY),l&&(u!=null&&d!=null?(s=u-l.left,c=d-l.top):(s=l.width/2,c=l.height/2)),this.type=e,this.pointerType=r,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=c,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}const Uo=Symbol("linkClicked"),Go="react-aria-pressable-style",Ro="data-react-aria-pressable";function tr(t){let{onPress:e,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:l,isDisabled:s,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:p,...h}=Eu(t),[m,x]=a.useState(!1),g=a.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:w,removeAllGlobalListeners:v}=Qt(),S=a.useCallback((y,T)=>{let G=g.current;if(s||G.didFirePressStart)return!1;let N=!0;if(G.isTriggeringEvent=!0,n){let Y=new er("pressstart",T,y);n(Y),N=Y.shouldStopPropagation}return r&&r(!0),G.isTriggeringEvent=!1,G.didFirePressStart=!0,x(!0),N},[s,n,r]),k=a.useCallback((y,T,G=!0)=>{let N=g.current;if(!N.didFirePressStart)return!1;N.didFirePressStart=!1,N.isTriggeringEvent=!0;let Y=!0;if(o){let E=new er("pressend",T,y);o(E),Y=E.shouldStopPropagation}if(r&&r(!1),x(!1),e&&G&&!s){let E=new er("press",T,y);e(E),Y&&=E.shouldStopPropagation}return N.isTriggeringEvent=!1,Y},[s,o,r,e]),V=Ge(k),I=a.useCallback((y,T)=>{let G=g.current;if(s)return!1;if(i){G.isTriggeringEvent=!0;let N=new er("pressup",T,y);return i(N),G.isTriggeringEvent=!1,N.shouldStopPropagation}return!0},[s,i]),L=Ge(I),C=a.useCallback(y=>{let T=g.current;if(T.isPressed&&T.target){T.didFirePressStart&&T.pointerType!=null&&k(qe(T.target,y),T.pointerType,!1),T.isPressed=!1,T.isOverTarget=!1,T.activePointerId=null,T.pointerType=null,v(),f||Xr(T.target);for(let G of T.disposables)G();T.disposables=[]}},[f,v,k]),K=Ge(C);a.useEffect(()=>{s&&g.current.isPressed&&K({currentTarget:g.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[s]);let W=a.useCallback(y=>{d&&C(y)},[d,C]),z=a.useCallback(y=>{s||l?.(y)},[s,l]),j=a.useCallback((y,T)=>{if(!s&&l){let G=new MouseEvent("click",y);Jn(G,T),l(Mr(G))}},[s,l]),U=a.useMemo(()=>{let y=g.current,T={onKeyDown(N){if(Qr(N.nativeEvent,N.currentTarget)&&q(N.currentTarget,A(N))){Xo(A(N),N.key)&&N.preventDefault();let Y=!0;!y.isPressed&&!N.repeat&&(y.target=N.currentTarget,y.isPressed=!0,y.pointerType="keyboard",Y=S(N,"keyboard"));let E=N.currentTarget,$=H=>{Qr(H,E)&&!H.repeat&&q(E,A(H))&&y.target&&L(qe(y.target,H),"keyboard")};w(J(N.currentTarget),"keyup",He($,G),!0),Y&&N.stopPropagation(),N.metaKey&&be()&&y.metaKeyEvents?.set(N.key,N.nativeEvent)}else N.key==="Meta"&&(y.metaKeyEvents=new Map)},onClick(N){if(!(N&&!q(N.currentTarget,A(N)))&&N&&N.button===0&&!y.isTriggeringEvent&&!Me.isOpening){let Y=!0;if(s&&N.preventDefault(),!y.ignoreEmulatedMouseEvents&&!y.isPressed&&(y.pointerType==="virtual"||Ar(N.nativeEvent))){let E=S(N,"virtual"),$=L(N,"virtual"),H=V(N,"virtual");z(N),Y=E&&$&&H}else if(y.isPressed&&y.pointerType!=="keyboard"){let E=y.pointerType||N.nativeEvent.pointerType||"virtual",$=L(qe(N.currentTarget,N),E),H=V(qe(N.currentTarget,N),E,!0);Y=$&&H,y.isOverTarget=!1,z(N),K(N)}y.ignoreEmulatedMouseEvents=!1,Y&&N.stopPropagation()}}},G=N=>{if(y.isPressed&&y.target&&Qr(N,y.target)){Xo(A(N),N.key)&&N.preventDefault();let Y=A(N),E=q(y.target,Y);V(qe(y.target,N),"keyboard",E),E&&j(N,y.target),v(),N.key!=="Enter"&&Jr(y.target)&&q(y.target,Y)&&!N[Uo]&&(N[Uo]=!0,Me(y.target,N,!1)),y.isPressed=!1,y.metaKeyEvents?.delete(N.key)}else if(N.key==="Meta"&&y.metaKeyEvents?.size){let Y=y.metaKeyEvents;y.metaKeyEvents=void 0;for(let E of Y.values())y.target?.dispatchEvent(new KeyboardEvent("keyup",E))}};if(typeof PointerEvent<"u"){T.onPointerDown=E=>{if(E.button!==0||!q(E.currentTarget,A(E)))return;if(uc(E.nativeEvent)){y.pointerType="virtual";return}y.pointerType=E.pointerType;let $=!0;if(!y.isPressed){y.isPressed=!0,y.isOverTarget=!0,y.activePointerId=E.pointerId,y.target=E.currentTarget,f||Ho(y.target),$=S(E,y.pointerType);let H=A(E);"releasePointerCapture"in H&&("hasPointerCapture"in H?H.hasPointerCapture(E.pointerId)&&H.releasePointerCapture(E.pointerId):H.releasePointerCapture(E.pointerId)),w(J(E.currentTarget),"pointerup",N,!1),w(J(E.currentTarget),"pointercancel",Y,!1)}$&&E.stopPropagation()},T.onMouseDown=E=>{if(q(E.currentTarget,A(E))&&E.button===0){if(u){let $=eo(E.target);$&&y.disposables.push($)}E.stopPropagation()}},T.onPointerUp=E=>{!q(E.currentTarget,A(E))||y.pointerType==="virtual"||E.button===0&&!y.isPressed&&L(E,y.pointerType||E.pointerType)},T.onPointerEnter=E=>{E.pointerId===y.activePointerId&&y.target&&!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,S(qe(y.target,E),y.pointerType))},T.onPointerLeave=E=>{E.pointerId===y.activePointerId&&y.target&&y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,V(qe(y.target,E),y.pointerType,!1),W(E))};let N=E=>{if(E.pointerId===y.activePointerId&&y.isPressed&&E.button===0&&y.target){if(q(y.target,A(E))&&y.pointerType!=null){let $=!1,H=setTimeout(()=>{y.isPressed&&y.target instanceof HTMLElement&&($?K(E):(we(y.target),y.target.click()))},80);w(E.currentTarget,"click",()=>$=!0,!0),y.disposables.push(()=>clearTimeout(H))}else K(E);y.isOverTarget=!1}},Y=E=>{K(E)};T.onDragStart=E=>{q(E.currentTarget,A(E))&&K(E)}}else if(process.env.NODE_ENV==="test"){T.onMouseDown=E=>{if(E.button!==0||!q(E.currentTarget,A(E)))return;if(y.ignoreEmulatedMouseEvents){E.stopPropagation();return}if(y.isPressed=!0,y.isOverTarget=!0,y.target=E.currentTarget,y.pointerType=Ar(E.nativeEvent)?"virtual":"mouse",et.flushSync(()=>S(E,y.pointerType))&&E.stopPropagation(),u){let H=eo(E.target);H&&y.disposables.push(H)}w(J(E.currentTarget),"mouseup",N,!1)},T.onMouseEnter=E=>{if(!q(E.currentTarget,A(E)))return;let $=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!0,$=S(E,y.pointerType)),$&&E.stopPropagation()},T.onMouseLeave=E=>{if(!q(E.currentTarget,A(E)))return;let $=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!1,$=V(E,y.pointerType,!1),W(E)),$&&E.stopPropagation()},T.onMouseUp=E=>{q(E.currentTarget,A(E))&&!y.ignoreEmulatedMouseEvents&&E.button===0&&!y.isPressed&&L(E,y.pointerType||"mouse")};let N=E=>{if(E.button===0){if(y.ignoreEmulatedMouseEvents){y.ignoreEmulatedMouseEvents=!1;return}y.target&&q(y.target,A(E))&&y.pointerType!=null||K(E),y.isOverTarget=!1}};T.onTouchStart=E=>{if(!q(E.currentTarget,A(E)))return;let $=$u(E.nativeEvent);if(!$)return;y.activePointerId=$.identifier,y.ignoreEmulatedMouseEvents=!0,y.isOverTarget=!0,y.isPressed=!0,y.target=E.currentTarget,y.pointerType="touch",f||Ho(y.target),S(Be(y.target,E),y.pointerType)&&E.stopPropagation(),w(fe(E.currentTarget),"scroll",Y,!0)},T.onTouchMove=E=>{if(!q(E.currentTarget,A(E)))return;if(!y.isPressed){E.stopPropagation();return}let $=qo(E.nativeEvent,y.activePointerId),H=!0;$&&Yo($,E.currentTarget)?!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,H=S(Be(y.target,E),y.pointerType)):y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,H=V(Be(y.target,E),y.pointerType,!1),W(Be(y.target,E))),H&&E.stopPropagation()},T.onTouchEnd=E=>{if(!q(E.currentTarget,A(E)))return;if(!y.isPressed){E.stopPropagation();return}let $=qo(E.nativeEvent,y.activePointerId),H=!0;$&&Yo($,E.currentTarget)&&y.pointerType!=null?(L(Be(y.target,E),y.pointerType),H=V(Be(y.target,E),y.pointerType),j(E.nativeEvent,y.target)):y.isOverTarget&&y.pointerType!=null&&(H=V(Be(y.target,E),y.pointerType,!1)),H&&E.stopPropagation(),y.isPressed=!1,y.activePointerId=null,y.isOverTarget=!1,y.ignoreEmulatedMouseEvents=!0,y.target&&!f&&Xr(y.target),v()},T.onTouchCancel=E=>{q(E.currentTarget,A(E))&&(E.stopPropagation(),y.isPressed&&K(Be(y.target,E)))};let Y=E=>{y.isPressed&&q(A(E),y.target)&&K({currentTarget:y.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};T.onDragStart=E=>{q(E.currentTarget,A(E))&&K(E)}}return T},[w,s,u,v,f,W,S,z,j]);return a.useEffect(()=>{if(!p||process.env.NODE_ENV==="test")return;const y=J(p.current);if(!y||!y.head||y.getElementById(Go))return;const T=y.createElement("style");T.id=Go;let G=jo(y);G&&(T.nonce=G),T.textContent=`
1
+ (function(X,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(X=typeof globalThis<"u"?globalThis:X||self,a(X.CekatUI={},X.React$1,X.$3wX5A$reactdom))})(this,(function(X,a,et){"use strict";function ka(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const b=ka(a);var Pa={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const tt=(t,e,r,n)=>{const o=a.forwardRef(({color:i="currentColor",size:l=24,stroke:s=2,title:c,className:u,children:d,...f},p)=>a.createElement("svg",{ref:p,...Pa[t],width:l,height:l,className:["tabler-icon",`tabler-icon-${e}`,u].join(" "),strokeWidth:s,stroke:i,...f},[c&&a.createElement("title",{key:"svg-title"},c),...n.map(([h,m])=>a.createElement(h,m)),...Array.isArray(d)?d:[d]]));return o.displayName=`${r}`,o};const zn=tt("outline","alert-circle","AlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);const _n=tt("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);const Ta=tt("outline","circle-check","CircleCheck",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);const $r=tt("outline","info-circle","InfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);const Na=tt("outline","loader-2","Loader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]);const Ka=tt("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function He(...t){return(...e)=>{for(let r of t)typeof r=="function"&&r(...e)}}const Q=typeof document<"u"?a.useLayoutEffect:()=>{},Dt={prefix:String(Math.round(Math.random()*1e10)),current:0},Vn=a.createContext(Dt),La=a.createContext(!1);let Ma=!!(typeof window<"u"&&window.document&&window.document.createElement),Sr=new WeakMap;function Da(t=!1){let e=a.useContext(Vn),r=a.useRef(null);if(r.current===null&&!t){let n=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(n){let o=Sr.get(n);o==null?Sr.set(n,{id:e.current,state:n.memoizedState}):n.memoizedState!==o.state&&(e.current=o.id,Sr.delete(n))}r.current=++e.current}return r.current}function Ia(t){let e=a.useContext(Vn);e===Dt&&!Ma&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=Da(!!t),n=e===Dt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${n}-${r}`}function Aa(t){let e=a.useId(),[r]=a.useState(ht()),n=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Dt.prefix}`;return t||`${n}-${e}`}const Fa=typeof a.useId=="function"?Aa:Ia;function Oa(){return!1}function Ba(){return!0}function za(t){return()=>{}}function ht(){return typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore(za,Oa,Ba):a.useContext(La)}function _a(t){let[e,r]=a.useState(t),n=a.useRef(e),o=a.useRef(null),i=a.useRef(()=>{if(!o.current)return;let s=o.current.next();if(s.done){o.current=null;return}n.current===s.value?i.current():r(s.value)});Q(()=>{n.current=e,o.current&&i.current()});let l=a.useCallback(s=>{o.current=s(n.current),i.current()},[i]);return[e,l]}let Va=!!(typeof window<"u"&&window.document&&window.document.createElement),rt=new Map,nt;typeof FinalizationRegistry<"u"&&(nt=new FinalizationRegistry(t=>{rt.delete(t)}));let Cr=new WeakMap;function Se(t){let[e,r]=a.useState(t),n=a.useRef(null),o=Fa(e),i=a.useRef(null),l=Cr.get(i);if(nt&&l!==o&&(l!=null&&nt.unregister(i),nt.register(i,o,i),Cr.set(i,o)),Va){const s=rt.get(o);s&&!s.includes(n)?s.push(n):rt.set(o,[n])}return Q(()=>{let s=o;return()=>{nt&&(nt.unregister(i),Cr.delete(i)),rt.delete(s)}},[o]),a.useEffect(()=>{let s=n.current;return s&&r(s),()=>{s&&(n.current=null)}}),o}function Ha(t,e){if(t===e)return t;let r=rt.get(t);if(r)return r.forEach(o=>o.current=e),e;let n=rt.get(e);return n?(n.forEach(o=>o.current=t),t):e}function kr(t=[]){let e=Se(),[r,n]=_a(e),o=a.useCallback(()=>{n(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,n]);return Q(o,[e,o,...t]),r}function Pr(...t){return t.length===1&&t[0]?t[0]:e=>{let r=!1;const n=t.map(o=>{const i=Hn(o,e);return r||=typeof i=="function",i});if(r)return()=>{n.forEach((o,i)=>{typeof o=="function"?o():Hn(t[i],null)})}}}function Hn(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Wn(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Wn(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function O(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Wn(t))&&(n&&(n+=" "),n+=e);return n}function ee(...t){let e={...t[0]};for(let r=1;r<t.length;r++){let n=t[r];for(let o in n){let i=e[o],l=n[o];typeof i=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=He(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=O(i,l):o==="id"&&i&&l?e.id=Ha(i,l):o==="ref"&&i&&l?e.ref=Pr(i,l):e[o]=l!==void 0?l:i}}return e}function gt(t){const e=a.useRef(null),r=a.useRef(void 0),n=a.useCallback(o=>{if(typeof t=="function"){const i=t,l=i(o);return()=>{typeof l=="function"?l():i(null)}}else if(t)return t.current=o,()=>{t.current=null}},[t]);return a.useMemo(()=>({get current(){return e.current},set current(o){e.current=o,r.current&&(r.current(),r.current=void 0),o!=null&&(r.current=n(o))}}),[n])}const jn=Symbol("default");function bt({values:t,children:e}){for(let[r,n]of t)e=a.createElement(r.Provider,{value:n},e);return e}function Ae(t){let{className:e,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:l,values:s,render:c}=t;return a.useMemo(()=>{let u,d,f;return typeof e=="function"?u=e({...s,defaultClassName:o}):u=e,typeof r=="function"?d=r({...s,defaultStyle:l||{}}):d=r,typeof n=="function"?f=n({...s,defaultChildren:i}):n==null?f=i:f=n,{className:u??o,style:d||l?{...l,...d}:void 0,children:f??i,"data-rac":"",render:c?p=>c(p,s):void 0}},[e,r,n,o,i,l,s,c])}function Un(t,e){return r=>e(typeof t=="function"?t(r):t,r)}function It(t,e){let r=a.useContext(t);if(e===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=e||jn;if(!r.slots[n]){let o=new Intl.ListFormat().format(Object.keys(r.slots).map(l=>`"${l}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return r.slots[n]}return r}function ot(t,e,r){let n=It(r,t.slot)||{},{ref:o,...i}=n,l=gt(a.useMemo(()=>Pr(e,o),[e,o])),s=ee(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?s.style=c=>{let u=typeof i.style=="function"?i.style(c):i.style,d={...c.defaultStyle,...u},f=typeof t.style=="function"?t.style({...c,defaultStyle:d}):t.style;return{...d,...f}}:s.style={...i.style,...t.style}),[s,l]}function Wa(t=!0){let[e,r]=a.useState(t),n=a.useRef(!1),o=a.useCallback(i=>{n.current=!0,r(!!i)},[]);return Q(()=>{n.current||r(!1)},[]),[o,e]}function ja(t,e,r){let{render:n,...o}=e,i=a.useRef(null),l=a.useMemo(()=>Pr(r,i),[r,i]);Q(()=>{process.env.NODE_ENV!=="production"&&n&&(i.current?i.current.localName!==t&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${t}>, got <${i.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"))},[t,n]);let s={...o,ref:l};return n?n(s,void 0):a.createElement(t,s)}const Gn={},Ce=new Proxy({},{get(t,e){if(typeof e!="string")return;let r=Gn[e];return r||(r=a.forwardRef(ja.bind(null,e)),Gn[e]=r),r}}),Ua="react-aria-clear-focus",Ga="react-aria-focus",J=t=>Ra(t)?t.document:qa(t)?t:t?.ownerDocument??(typeof document<"u"?document:void 0),fe=t=>J(t)?.defaultView??(typeof window<"u"?window:void 0);function Rn(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function Ra(t){return typeof t=="object"&&t!=null&&"window"in t&&t.window===t}function qa(t){return Rn(t)&&t.nodeType===9}function Tr(t){return Rn(t)&&t.nodeType===11&&"host"in t}function Ya(t,e,r,n){if(r==null||t==null)return()=>{};let o=Array.isArray(t)?t:[t];for(let i of o)i.addEventListener(e,r,n);return()=>{for(let i of o)i.removeEventListener(e,r,n)}}let Xa=!1;function ke(){return Xa}function q(t,e){if(!ke())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let r=e;for(;r!==null;){if(r===t)return!0;typeof r.assignedElements!="function"&&r.assignedSlot?.parentNode?r=r.assignedSlot.parentNode:Tr(r)?r=r.host:r=r.parentNode}return!1}const ie=(t=document)=>{if(!ke())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e};function A(t){if(ke()&&t.target instanceof Element&&t.target.shadowRoot){if("composedPath"in t)return t.composedPath()[0]??null;if("composedPath"in t.nativeEvent)return t.nativeEvent.composedPath()[0]??null}return t.target}function Za(t,e){if(e===null)return[];e=e??fe(t);let r=[e];if(!ke()||!t||t===e)return r;let n="getRootNode"in e?e.getRootNode():null,o=t.getRootNode()??null;for(;Tr(o)&&o!==n;)r.push(o),o=o.host.getRootNode();return r}function At(t){if(!t)return!1;let e=t.getRootNode(),r=fe(t);if(!(e instanceof r.Document||e instanceof r.ShadowRoot))return!1;let n=e.activeElement;return n!=null&&t.contains(n)}function qn(t){let e=Qa(J(t));e!==t&&(e&&Ja(e,t),t&&Yn(t,e))}function Ja(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function Yn(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function Qa(t){let e=ie(t),r=e?.getAttribute("aria-activedescendant");return r&&t.getElementById(r)||e}function we(t){if(ec())t.focus({preventScroll:!0});else{let e=tc(t);t.focus(),rc(e)}}let Ft=null;function ec(){if(Ft==null){Ft=!1;try{document.createElement("div").focus({get preventScroll(){return Ft=!0,!0}})}catch{}}return Ft}function tc(t){let e=t.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&r.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function rc(t){for(let{element:e,scrollTop:r,scrollLeft:n}of t)e.scrollTop=r,e.scrollLeft=n}const nc=typeof Element<"u"&&"checkVisibility"in Element.prototype;function oc(t){const e=fe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:r,visibility:n}=t.style,o=r!=="none"&&n!=="hidden"&&n!=="collapse";if(o){const{getComputedStyle:i}=fe(t);let{display:l,visibility:s}=i(t);o=l!=="none"&&s!=="hidden"&&s!=="collapse"}return o}function ic(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Nr(t,e){return nc?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&oc(t)&&ic(t,e)&&(!t.parentElement||Nr(t.parentElement,t))}const Kr=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],lc=Kr.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Kr.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const sc=Kr.join(':not([hidden]):not([tabindex="-1"]),');function Xn(t,e){return t.matches(lc)&&!Zn(t)&&(e?.skipVisibilityCheck||Nr(t))}function Lr(t){return t.matches(sc)&&Nr(t)&&!Zn(t)}function Zn(t){let e=t;for(;e!=null;){if(e instanceof fe(e).HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function Mr(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function Jn(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function Qn(t){let e=a.useRef({isFocused:!1,observer:null});return Q(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),a.useCallback(r=>{let n=A(r);if(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){e.current.isFocused=!0;let o=n,i=l=>{if(e.current.isFocused=!1,o.disabled){let s=Mr(l);t?.(s)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&o.disabled){e.current.observer?.disconnect();let l=o===ie()?null:ie();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let Ot=!1;function eo(t){for(;t&&!Xn(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=fe(t),r=e.document.activeElement;if(!r||r===t)return;Ot=!0;let n=!1,o=d=>{(A(d)===r||n)&&d.stopImmediatePropagation()},i=d=>{(A(d)===r||n)&&(d.stopImmediatePropagation(),!t&&!n&&(n=!0,we(r),c()))},l=d=>{(A(d)===t||n)&&d.stopImmediatePropagation()},s=d=>{(A(d)===t||n)&&(d.stopImmediatePropagation(),n||(n=!0,we(r),c()))};e.addEventListener("blur",o,!0),e.addEventListener("focusout",i,!0),e.addEventListener("focusin",s,!0),e.addEventListener("focus",l,!0);let c=()=>{cancelAnimationFrame(u),e.removeEventListener("blur",o,!0),e.removeEventListener("focusout",i,!0),e.removeEventListener("focusin",s,!0),e.removeEventListener("focus",l,!0),Ot=!1,n=!1},u=requestAnimationFrame(c);return c}function Bt(t){if(typeof window>"u"||window.navigator==null)return!1;let e=window.navigator.userAgentData?.brands;return Array.isArray(e)&&e.some(r=>t.test(r.brand))||t.test(window.navigator.userAgent)}function Dr(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Pe(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const be=Pe(function(){return Dr(/^Mac/i)}),ac=Pe(function(){return Dr(/^iPhone/i)}),to=Pe(function(){return Dr(/^iPad/i)||be()&&navigator.maxTouchPoints>1}),We=Pe(function(){return ac()||to()}),cc=Pe(function(){return be()||We()}),Fe=Pe(function(){return Bt(/AppleWebKit/i)&&(We()||!Ir())});Pe(function(){return Fe()&&!Ir()&&!ro()});const Ir=Pe(function(){return Bt(/Chrome|CriOS|CrMo/i)}),zt=Pe(function(){return Bt(/Android/i)}),ro=Pe(function(){return Bt(/(Firefox|FxiOS)/i)});function Ar(t){return t.pointerType===""&&t.isTrusted?!0:zt()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function uc(t){return!zt()&&t.width===0&&t.height===0||zt()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const dc=a.createContext({isNative:!0,open:hc,useHref:t=>t});function _t(){return a.useContext(dc)}function fc(t,e){let r=t.getAttribute("target");return(!r||r==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function Me(t,e,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:l}=e;!Fe()&&ro()&&window.event?.type?.startsWith("key")&&t.target==="_blank"&&(be()?n=!0:o=!0);let s=Fe()&&be()&&!to()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:l}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Me.isOpening=r,we(t),t.dispatchEvent(s),Me.isOpening=!1}Me.isOpening=!1;function pc(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let r=document.createElement("a");r.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(r.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(r.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(r.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(r.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(r),e(r),t.removeChild(r)}}function hc(t,e){pc(t,r=>Me(r,e))}function no(t){const r=_t().useHref(t?.href??"");let n={};if(t)for(let o of["href","target","rel","download","ping","referrerPolicy"])o in t&&t[o]!==void 0&&(n[o]=o==="href"?r:t[o]);return n}function gc(t,e,r,n){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&fc(t.currentTarget,t)&&r&&(t.preventDefault(),e.open(t.currentTarget,t,r,n))}let je=null;const Fr=new Set;let mt=new Map,Ue=!1,Or=!1;const bc={Tab:!0,Escape:!0};function Vt(t,e){for(let r of Fr)r(t,e)}function mc(t){return!(t.metaKey||!be()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Ht(t){Ue=!0,!Me.isOpening&&mc(t)&&(je="keyboard",Vt("keyboard",t))}function me(t){je="pointer","pointerType"in t&&t.pointerType,(t.type==="mousedown"||t.type==="pointerdown")&&(Ue=!0,Vt("pointer",t))}function oo(t){!Me.isOpening&&Ar(t)&&(Ue=!0,je="virtual")}function io(t){let e=fe(A(t)),r=J(A(t));A(t)===e||A(t)===r||Ot||!t.isTrusted||(!Ue&&!Or&&(je="virtual",Vt("virtual",t)),Ue=!1,Or=!1)}function lo(){Ot||(Ue=!1,Or=!0)}function Br(t){if(typeof window>"u"||typeof document>"u")return;const e=fe(t),r=J(t);if(mt.get(e))return;let n=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){Ue=!0,n.apply(this,arguments)}}),r.addEventListener("keydown",Ht,!0),r.addEventListener("keyup",Ht,!0),r.addEventListener("click",oo,!0),e.addEventListener("focus",io,!0),e.addEventListener("blur",lo,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",me,!0),r.addEventListener("pointermove",me,!0),r.addEventListener("pointerup",me,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",me,!0),r.addEventListener("mousemove",me,!0),r.addEventListener("mouseup",me,!0)),e.addEventListener("beforeunload",()=>{so(t)},{once:!0}),mt.set(e,{focus:n})}const so=(t,e)=>{const r=fe(t),n=J(t);e&&n.removeEventListener("DOMContentLoaded",e),mt.has(r)&&(Reflect.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:mt.get(r).focus}),n.removeEventListener("keydown",Ht,!0),n.removeEventListener("keyup",Ht,!0),n.removeEventListener("click",oo,!0),r.removeEventListener("focus",io,!0),r.removeEventListener("blur",lo,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",me,!0),n.removeEventListener("pointermove",me,!0),n.removeEventListener("pointerup",me,!0)):process.env.NODE_ENV==="test"&&(n.removeEventListener("mousedown",me,!0),n.removeEventListener("mousemove",me,!0),n.removeEventListener("mouseup",me,!0)),mt.delete(r))};function yc(t){const e=J(t);let r;return e.readyState!=="loading"?Br(t):(r=()=>{Br(t)},e.addEventListener("DOMContentLoaded",r)),()=>so(t,r)}typeof document<"u"&&yc();function yt(){return je!=="pointer"}function vt(){return je}function zr(t){je=t,Vt(t,null)}const vc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xc(t,e,r){let n=r?A(r):void 0,o=J(n),i=fe(n);const l=typeof i<"u"?i.HTMLInputElement:HTMLInputElement,s=typeof i<"u"?i.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof i<"u"?i.HTMLElement:HTMLElement,u=typeof i<"u"?i.KeyboardEvent:KeyboardEvent;let d=ie(o);return t=t||d instanceof l&&!vc.has(d.type)||d instanceof s||d instanceof c&&d.isContentEditable,!(t&&e==="keyboard"&&r instanceof u&&!bc[r.key])}function wc(t,e,r){Br(),a.useEffect(()=>{if(r?.enabled===!1)return;let n=(o,i)=>{xc(!!r?.isTextInput,o,i)&&t(yt())};return Fr.add(n),()=>{Fr.delete(n)}},e)}function xt(t){return be()?t.metaKey:t.ctrlKey}const Ec=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _r(t){return t instanceof HTMLInputElement&&!Ec.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const $c=a.useInsertionEffect??Q;function Ge(t){const e=a.useRef(null);return $c(()=>{e.current=t},[t]),a.useCallback((...r)=>{const n=e.current;return n?.(...r)},[])}function Wt(t,e,r,n){let o=Ge(r),i=r==null;a.useEffect(()=>{if(i||!t.current)return;let l=t.current;return l.addEventListener(e,o,n),()=>{l.removeEventListener(e,o,n)}},[t,e,n,i])}function ao(t,e){let{id:r,"aria-label":n,"aria-labelledby":o}=t;return r=Se(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!n&&!o&&e&&(n=e),{id:r,"aria-label":n,"aria-labelledby":o}}const Sc=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Cc=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function kc(t){if(Intl.Locale){let r=new Intl.Locale(t).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return Sc.has(r.script)}let e=t.split("-")[0];return Cc.has(e)}const co=Symbol.for("react-aria.i18n.locale");function uo(){let t=typeof window<"u"&&window[co]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:kc(t)?"rtl":"ltr"}}let Vr=uo(),wt=new Set;function fo(){Vr=uo();for(let t of wt)t(Vr)}function Pc(){let t=ht(),[e,r]=a.useState(Vr);return a.useEffect(()=>(wt.size===0&&window.addEventListener("languagechange",fo),wt.add(r),()=>{wt.delete(r),wt.size===0&&window.removeEventListener("languagechange",fo)}),[]),t?{locale:typeof window<"u"&&window[co]||"en-US",direction:"ltr"}:e}const Tc=a.createContext(null);function it(){let t=Pc();return a.useContext(Tc)||t}const Nc=Symbol.for("react-aria.i18n.locale"),Kc=Symbol.for("react-aria.i18n.strings");let jt;class Ut{constructor(e,r="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,n])=>n)),this.defaultLocale=r}getStringForLocale(e,r){let o=this.getStringsForLocale(r)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${r} locale`);return o}getStringsForLocale(e){let r=this.strings[e];return r||(r=Lc(e,this.strings,this.defaultLocale),this.strings[e]=r),r}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let r=window[Nc];if(jt===void 0){let o=window[Kc];if(!o)return null;jt={};for(let i in o)jt[i]=new Ut({[r]:o[i]},r)}let n=jt?.[e];if(!n)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}function Lc(t,e,r="en-US"){if(e[t])return e[t];let n=Mc(t),o=Dc(t);if(o&&e[`${n}-${o}`])return e[`${n}-${o}`];if(e[n])return e[n];for(let i in e)if(i.startsWith(n+"-"))return e[i];return e[r]}function Mc(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}function Dc(t){if(Intl.Locale)return new Intl.Locale(t).script}const po=new Map,ho=new Map;class Ic{constructor(e,r){this.locale=e,this.strings=r}format(e,r){let n=this.strings.getStringForLocale(e,this.locale);return typeof n=="function"?n(r,this):n}plural(e,r,n="cardinal"){let o=r["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+n,l=po.get(i);l||(l=new Intl.PluralRules(this.locale,{type:n}),po.set(i,l));let s=l.select(e);return o=r[s]||r.other,typeof o=="function"?o():o}number(e){let r=ho.get(this.locale);return r||(r=new Intl.NumberFormat(this.locale),ho.set(this.locale,r)),r.format(e)}select(e,r){let n=e[r]||e.other;return typeof n=="function"?n():n}}const go=new WeakMap;function Ac(t){let e=go.get(t);return e||(e=new Ut(t),go.set(t,e)),e}function Fc(t,e){return e&&Ut.getGlobalDictionaryForPackage(e)||Ac(t)}function bo(t,e){let{locale:r}=it(),n=Fc(t,e);return a.useMemo(()=>new Ic(r,n),[r,n])}const Oc=typeof document<"u"?a.useInsertionEffect??a.useLayoutEffect:()=>{};function Gt(t,e,r){let[n,o]=a.useState(t||e),i=a.useRef(n),l=a.useRef(t!==void 0),s=t!==void 0;a.useEffect(()=>{let f=l.current;f!==s&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),l.current=s},[s]);let c=s?t:n;Oc(()=>{i.current=c});let[,u]=a.useReducer(()=>({}),{}),d=a.useCallback((f,...p)=>{let h=typeof f=="function"?f(i.current):f;Object.is(i.current,h)||(i.current=h,o(h),u(),r?.(h,...p))},[r]);return[c,d]}const mo=a.createContext(null),Bc=a.createContext(null);class Re{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,r,n){let o=this.clone();return r.addDescendants(o,e),o}}class yo extends Re{filter(e,r,n){let[o,i]=Eo(e,r,this.firstChildKey,n),l=this.clone();return l.firstChildKey=o,l.lastChildKey=i,l}}const Mn=class Mn extends Re{};Mn.type="header";let vo=Mn;const Dn=class Dn extends Re{};Dn.type="loader";let xo=Dn;const In=class In extends yo{filter(e,r,n){if(n(this.textValue,this)){let o=this.clone();return r.addDescendants(o,e),o}return null}};In.type="item";let Hr=In;const An=class An extends yo{filter(e,r,n){let o=super.filter(e,r,n);if(o&&o.lastChildKey!==null){let i=e.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}};An.type="section";let wo=An;class zc{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let r=this.keyMap;return{*[Symbol.iterator](){let n=r.get(e),o=n?.firstChildKey!=null?r.get(n.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?r.get(o.nextKey):void 0}}}getKeyBefore(e){let r=this.keyMap.get(e);if(!r)return null;if(r.prevKey!=null){for(r=this.keyMap.get(r.prevKey);r&&r.type!=="item"&&r.lastChildKey!=null;)r=this.keyMap.get(r.lastChildKey);return r?.key??null}return r.parentKey}getKeyAfter(e){let r=this.keyMap.get(e);if(!r)return null;if(r.type!=="item"&&r.firstChildKey!=null)return r.firstChildKey;for(;r;){if(r.nextKey!=null)return r.nextKey;if(r.parentKey!=null)r=this.keyMap.get(r.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,r=new e;return r.keyMap=new Map(this.keyMap),r.firstKey=this.firstKey,r.lastKey=this.lastKey,r.itemCount=this.itemCount,r}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,r){this.addNode(e);let n=r.getChildren(e.key);for(let o of n)this.addDescendants(o,r)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let r=this.keyMap.get(e);r!=null&&r.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,r,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=r,this.frozen=!n}filter(e){let r=new this.constructor,[n,o]=Eo(this,r,this.firstKey,e);return r?.commit(n,o),r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function Eo(t,e,r,n){if(r==null)return[null,null];let o=null,i=null,l=t.getItem(r);for(;l!=null;){let s=l.filter(t,e,n);s!=null&&(s.nextKey=null,i&&(s.prevKey=i.key,i.nextKey=s.key),o==null&&(o=s),e.addNode(s),i=s),l=l.nextKey!=null?t.getItem(l.nextKey):null}if(i&&i.type==="separator"){let s=i.prevKey;e.removeNode(i.key),s!=null?(i=e.getItem(s),i.nextKey=null):i=null}return[o?.key??null,i?.key??null]}class $o{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,r){if(r==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=r,e.previousSibling=r.previousSibling,e.index=r.index-1,this.firstChild===r?this.firstChild=e:r.previousSibling&&(r.previousSibling.nextSibling=e),r.previousSibling=e,e.parentNode=r.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class lt extends $o{constructor(e,r){super(r),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof lt?this.parentNode.level+(this.parentNode.node?.type==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let e=this.nextVisibleSibling,r=this.getMutableNode();if(r!=null&&(r.index=this.index,r.level=this.level,r.parentKey=this.parentNode instanceof lt?this.parentNode.node?.key??null:null,r.prevKey=this.previousVisibleSibling?.node?.key??null,r.nextKey=e?.node?.key??null,r.hasChildNodes=!!this.firstChild,r.firstChildKey=this.firstVisibleChild?.node?.key??null,r.lastChildKey=this.lastVisibleChild?.node?.key??null,(r.colSpan!=null||r.colIndex!=null)&&e)){let n=(r.colIndex??r.index)+(r.colSpan??1);if(e.node!=null&&n!==e.node.colIndex){let o=e.getMutableNode();o.colIndex=n}}}setProps(e,r,n,o,i){let l,{value:s,textValue:c,id:u,...d}=e;if(this.node==null?(l=new n(u??`react-aria-${++this.ownerDocument.nodeId}`),this.node=l):l=this.getMutableNode(),d.ref=r,l.props=d,l.rendered=o,l.render=i,l.value=s,e["aria-label"]&&(l["aria-label"]=e["aria-label"]),l.textValue=c||(typeof d.children=="string"?d.children:"")||e["aria-label"]||"",u!=null&&u!==l.key)throw new Error("Cannot change the id of an item");d.colSpan!=null&&(l.colSpan=d.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(r){let n=r==="none";if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let o=e.previousVisibleSibling,i=e.nextVisibleSibling;o&&e.ownerDocument.markDirty(o),i&&e.ownerDocument.markDirty(i),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class _c extends $o{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new lt(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let r=this.getMutableCollection();if(!r.getItem(e.node.key))for(let n of e)this.addNode(n);r.addNode(e.node)}removeNode(e){for(let r of e)this.removeNode(r);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof lt&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof lt?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),this.queuedRender&&e(),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function So(t){let{children:e,items:r,idScope:n,addIdAndValue:o,dependencies:i=[]}=t,l=a.useMemo(()=>process.env.NODE_ENV!=="production"&&typeof e=="function"?e.toString():void 0,[e]),s=a.useMemo(()=>new WeakMap,[...i,l]);return a.useMemo(()=>{if(r&&typeof e=="function"){let c=[];for(let u of r){let d=Vc(u)?u:null,f=d?s.get(d):null;if(!f){f=e(u);let p=f.props.id??u?.key??u?.id;n!=null&&f.props.id==null&&p!=null&&(p=n+":"+p);let h=p??c.length;f=a.cloneElement(f,o?{key:h,id:p,value:u}:{key:h}),d&&s.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,r,s,n,o])}function Vc(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}let Oe=new Map,Wr=new Set;function Co(){if(typeof window>"u")return;function t(n){return"propertyName"in n}let e=n=>{let o=A(n);if(!t(n)||!o)return;let i=Oe.get(o);i||(i=new Set,Oe.set(o,i),o.addEventListener("transitioncancel",r,{once:!0})),i.add(n.propertyName)},r=n=>{let o=A(n);if(!t(n)||!o)return;let i=Oe.get(o);if(i&&(i.delete(n.propertyName),i.size===0&&(o.removeEventListener("transitioncancel",r),Oe.delete(o)),Oe.size===0)){for(let l of Wr)l();Wr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",r)}typeof document<"u"&&(document.readyState!=="loading"?Co():document.addEventListener("DOMContentLoaded",Co));function Hc(){for(const[t]of Oe)"isConnected"in t&&!t.isConnected&&Oe.delete(t)}function ko(t){requestAnimationFrame(()=>{Hc(),Oe.size===0?t():Wr.add(t)})}function st(t){if(!t.isConnected)return;const e=J(t);if(vt()==="virtual"){let r=ie(e);ko(()=>{const n=ie(e);(n===r||n===e.body)&&t.isConnected&&we(t)})}else we(t)}function Po(t){let{isDisabled:e,onFocus:r,onBlur:n,onFocusChange:o}=t;const i=a.useCallback(c=>{if(A(c)===c.currentTarget)return n&&n(c),o&&o(!1),!0},[n,o]),l=Qn(i),s=a.useCallback(c=>{let u=A(c);const d=J(u),f=d?ie(d):ie();u===c.currentTarget&&u===f&&(r&&r(c),o&&o(!0),l(c))},[o,r,l]);return{focusProps:{onFocus:!e&&(r||o||n)?s:void 0,onBlur:!e&&(n||o)?i:void 0}}}function Rt(t){if(t)return e=>{let r=!0,n={...e,preventDefault(){e.preventDefault()},isDefaultPrevented(){return e.isDefaultPrevented()},stopPropagation(){r&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):r=!0},continuePropagation(){r=!1,typeof e.continuePropagation=="function"&&e.continuePropagation()},isPropagationStopped(){return r}};t(n),r&&!(typeof e.isPropagationStopped=="function"&&e.isPropagationStopped())&&e.stopPropagation()}}const Wc=new Set(["shift","alt","control","meta","mod"]),jc=["Alt","Control","Meta","Shift"];function Uc(t){let e=new Set;return t.alt&&e.add("Alt"),t.shift&&e.add("Shift"),t.ctrl&&e.add("Control"),t.meta&&e.add("Meta"),t.mod&&e.add(be()?"Meta":"Control"),e}function Gc(t){let e=new Set;return t.altKey&&e.add("Alt"),t.ctrlKey&&e.add("Control"),t.metaKey&&e.add("Meta"),t.shiftKey&&e.add("Shift"),e}function To(t){return jc.filter(e=>t.has(e))}function Rc(t){let e=t.split("+").reduce((r,n)=>{let o=n.toLowerCase();return Wc.has(o)?o==="shift"?r.shift=!0:o==="alt"?r.alt=!0:o==="control"?r.ctrl=!0:o==="meta"?r.meta=!0:o==="mod"&&(r.mod=!0):r.key=n,r},{shift:!1,alt:!1,ctrl:!1,meta:!1,mod:!1,key:""});if(e.key==="")throw new Error(`Invalid keyboard shortcut: "${t}". Must include exactly one non-modifier key (e.g. "a", "Enter", "ArrowDown"). Combine any of Shift, Alt, Ctrl, Meta, and Mod.`);return e}function No(t){return t.toLowerCase()}const qc={space:" ",esc:"escape",del:"delete",ins:"insert",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",pageup:"pageup",pagedown:"pagedown"};function Yc(t){let e=No(t),r=qc[e];return r??e}function Xc(t){let e=To(Uc(t)),r=Yc(t.key);return e.length>0?`${e.join("+")}+${r}`:r}function Zc(t){let e=To(Gc(t)),r=No(t.key);return(e.length>0?`${e.join("+")}+`:"")+r}function Jc(t){let e=new Map;for(let[r,n]of Object.entries(t)){let o=Rc(r);e.set(Xc(o),n)}return r=>{let n=Zc(r),o=e.get(n),i=o?.(r);i===void 0&&o!==void 0?i={shouldContinuePropagation:!1,shouldPreventDefault:!0}:typeof i=="boolean"&&(i={shouldContinuePropagation:!i,shouldPreventDefault:i}),i?.shouldPreventDefault&&r.preventDefault(),(!o||i?.shouldContinuePropagation)&&r.continuePropagation()}}function at(t){let{shortcuts:e,allowRepeats:r=!1,allowComposing:n=!1}=t,o,i;if(e){let l=Jc(e),s=Rt(u=>{if(!q(u.currentTarget,A(u))){u.continuePropagation();return}if(u.nativeEvent?.repeat&&!r||u.nativeEvent?.isComposing&&!n){u.continuePropagation();return}l(u)}),c=Rt(u=>{if(!q(u.currentTarget,A(u))){u.continuePropagation();return}if(u.nativeEvent?.repeat&&!r||u.nativeEvent?.isComposing&&!n){u.continuePropagation();return}u.continuePropagation()});o=t.onKeyDown?He(t.onKeyDown,s):s,i=t.onKeyUp?He(t.onKeyUp,c):c}else o=Rt(t.onKeyDown),i=Rt(t.onKeyUp);return{keyboardProps:t.isDisabled?{}:{onKeyDown:o,onKeyUp:i}}}function jr(t,e){Q(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}let qt=a.createContext(null);function Qc(t){let e=a.useContext(qt)||{};jr(e,t);let{ref:r,...n}=e;return n}function Ur(t,e){let{focusProps:r}=Po(t),{keyboardProps:n}=at(t),o=ee(r,n),i=Qc(e),l=t.isDisabled?{}:i,s=a.useRef(t.autoFocus);a.useEffect(()=>{s.current&&e.current&&st(e.current),s.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:ee({...o,tabIndex:c},l)}}typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.appendChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.removeChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(t,e){return this.content.insertBefore(t,e)}}));const Yt=a.createContext(!1);function eu(t){if(a.useContext(Yt))return a.createElement(a.Fragment,null,t.children);let r=a.createElement(Yt.Provider,{value:!0},t.children);return a.createElement("template",null,r)}function tu(t){let e=(r,n)=>a.useContext(Yt)?null:t(r,n);return e.displayName=t.displayName||t.name,a.forwardRef(e)}function Ko(){return a.useContext(Yt)}var Xt={exports:{}},Gr={};var Lo;function ru(){if(Lo)return Gr;Lo=1;var t=a;function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,o=t.useEffect,i=t.useLayoutEffect,l=t.useDebugValue;function s(f,p){var h=p(),m=n({inst:{value:h,getSnapshot:p}}),v=m[0].inst,g=m[1];return i(function(){v.value=h,v.getSnapshot=p,c(v)&&g({inst:v})},[f,h,p]),o(function(){return c(v)&&g({inst:v}),f(function(){c(v)&&g({inst:v})})},[f]),l(h),h}function c(f){var p=f.getSnapshot;f=f.value;try{var h=p();return!r(f,h)}catch{return!0}}function u(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Gr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Gr}var Rr={};var Mo;function nu(){return Mo||(Mo=1,process.env.NODE_ENV!=="production"&&(function(){function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}function e(h,m){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=m();if(!f){var g=m();i(v,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}g=l({inst:{value:v,getSnapshot:m}});var w=g[0].inst,x=g[1];return c(function(){w.value=v,w.getSnapshot=m,r(w)&&x({inst:w})},[h,v,m]),s(function(){return r(w)&&x({inst:w}),h(function(){r(w)&&x({inst:w})})},[h]),u(v),v}function r(h){var m=h.getSnapshot;h=h.value;try{var v=m();return!i(h,v)}catch{return!0}}function n(h,m){return m()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=a,i=typeof Object.is=="function"?Object.is:t,l=o.useState,s=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;Rr.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Rr}var Do;function ou(){return Do||(Do=1,process.env.NODE_ENV==="production"?Xt.exports=ru():Xt.exports=nu()),Xt.exports}var iu=ou();const Io=a.createContext(!1),Et=a.createContext(null);function Ao(t){if(a.useContext(Et))return t.content;let{collection:r,document:n}=cu(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(eu,null,a.createElement(Et.Provider,{value:n},t.content)),a.createElement(lu,{render:t.children,collection:r}))}function lu({collection:t,render:e}){return e(t)}function su(t,e,r){let n=ht(),o=a.useRef(n);o.current=n;let i=a.useCallback(()=>o.current?r():e(),[e,r]);return iu.useSyncExternalStore(t,i)}const au=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:su;function cu(t){let[e]=a.useState(()=>new _c(t?.()||new zc)),r=a.useCallback(l=>e.subscribe(l),[e]),n=a.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:au(r,n,o),document:e}}const qr=a.createContext(null);function uu(t){var r;return r=class extends Re{},r.type=t,r}function du(t,e,r,n,o,i){typeof t=="string"&&(t=uu(t));let l=a.useCallback(c=>{c?.setProps(e,r,t,n,i)},[e,r,n,i,t]),s=a.useContext(qr);if(s){let c=s.ownerDocument.nodesByProps.get(e);return c||(c=s.ownerDocument.createElement(t.type),c.setProps(e,r,t,n,i),s.appendChild(c),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,c)),o?a.createElement(qr.Provider,{value:c},o):null}return a.createElement(t.type,{ref:l},o)}function Fo(t,e){let r=({node:o})=>e(o.props,o.props.ref,o),n=a.forwardRef((o,i)=>{let l=a.useContext(qt);if(!a.useContext(Io)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return du(t,o,i,"children"in o?o.children:null,null,c=>a.createElement(qt.Provider,{value:l},a.createElement(r,{node:c})))});return n.displayName=e.name,n}function fu(t){return So({...t,addIdAndValue:!0})}const Oo=a.createContext(null);function Bo(t){let e=a.useContext(Oo),r=(e?.dependencies||[]).concat(t.dependencies),n=t.idScope??e?.idScope,o=fu({...t,idScope:n,dependencies:r});return a.useContext(Et)&&(o=a.createElement(pu,null,o)),e=a.useMemo(()=>({dependencies:r,idScope:n}),[n,...r]),a.createElement(Oo.Provider,{value:e},o)}function pu({children:t}){let e=a.useContext(Et),r=a.useMemo(()=>a.createElement(Et.Provider,{value:null},a.createElement(Io.Provider,{value:!0},t)),[t]);return ht()?a.createElement(qr.Provider,{value:e},r):et.createPortal(r,e)}const hu=a.createContext(null),gu={CollectionRoot({collection:t,renderDropIndicator:e}){return zo(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:r}){return zo(t,e,r)}};function zo(t,e,r){return So({items:e?t.getChildren(e.key):t,dependencies:[r],children(n){if(n.type==="content")return a.createElement(a.Fragment,null);let o=n.render(n);return!r||n.type!=="item"?o:a.createElement(a.Fragment,null,r({type:"item",key:n.key,dropPosition:"before"}),o,bu(t,n,r))}})}function bu(t,e,r){let n=e.key,o=t.getKeyAfter(n),i=o!=null?t.getItem(o):null;for(;i!=null&&i.type!=="item";)o=t.getKeyAfter(i.key),i=o!=null?t.getItem(o):null;let l=e.nextKey!=null?t.getItem(e.nextKey):null;for(;l!=null&&l.type!=="item";)l=l.nextKey!=null?t.getItem(l.nextKey):null;let s=[];if(l==null){let c=e;for(;c?.type==="item"&&(!i||c.parentKey!==i.parentKey&&i.level<c.level);){let u=r({type:"item",key:c.key,dropPosition:"after"});a.isValidElement(u)&&s.push(a.cloneElement(u,{key:`${c.key}-after`})),c=c.parentKey!=null?t.getItem(c.parentKey):null}}return s}const Zt=a.createContext(gu);function _o(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const mu=new Set(["id"]),yu=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),vu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),xu=new Set(["dir","lang","hidden","inert","translate"]),Vo=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),wu=/^(data-.*)$/;function ye(t,e={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:l}=e,s={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(mu.has(c)||r&&yu.has(c)||n&&vu.has(c)||o&&xu.has(c)||i&&(Vo.has(c)||c.endsWith("Capture")&&Vo.has(c.slice(0,-7)))||l?.has(c)||wu.test(c))&&(s[c]=t[c]);return s}let ct="default",Yr="",Jt=new WeakMap;function Ho(t){if(We()&&Fe()){if(ct==="default"){const e=J(t);Yr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}ct="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";Jt.set(t,t.style[e]),t.style[e]="none"}}function Xr(t){if(We()&&Fe()){if(ct!=="disabled")return;ct="restoring",setTimeout(()=>{ko(()=>{if(ct==="restoring"){const e=J(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Yr||""),Yr="",ct="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Jt.has(t)){let e=Jt.get(t),r="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[r]==="none"&&(t.style[r]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Jt.delete(t)}}function Wo(t){return t?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let Zr=new WeakMap;function jo(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return Wo(e);if(Zr.has(e))return Zr.get(e);let r=e.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof fe(r).HTMLMetaElement&&(r.nonce||r.content)||Wo(e)||void 0;return n!==void 0&&Zr.set(e,n),n}const $t=a.createContext({register:()=>{}});$t.displayName="PressResponderContext";function Qt(){let t=a.useRef(new Map),e=a.useCallback((o,i,l,s)=>{let c=s?.once?(...u)=>{t.current.delete(l),l(...u)}:l;t.current.set(l,{type:i,eventTarget:o,fn:c,options:s}),o.addEventListener(i,c,s)},[]),r=a.useCallback((o,i,l,s)=>{let c=t.current.get(l)?.fn||l;o.removeEventListener(i,c,s),t.current.delete(l)},[]),n=a.useCallback(()=>{t.current.forEach((o,i)=>{r(o.eventTarget,o.type,i,o.options)})},[r]);return a.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:r,removeAllGlobalListeners:n}}function Eu(t){let e=a.useContext($t);if(e){let{register:r,ref:n,...o}=e;t=ee(o,t),r()}return jr(e,t.ref),t}class er{#e;constructor(e,r,n,o){this.#e=!0;const l=(o?.target??n.currentTarget)?.getBoundingClientRect();let s,c=0,u,d=null;n.clientX!=null&&n.clientY!=null&&(u=n.clientX,d=n.clientY),l&&(u!=null&&d!=null?(s=u-l.left,c=d-l.top):(s=l.width/2,c=l.height/2)),this.type=e,this.pointerType=r,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=c,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}const Uo=Symbol("linkClicked"),Go="react-aria-pressable-style",Ro="data-react-aria-pressable";function tr(t){let{onPress:e,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:l,isDisabled:s,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:p,...h}=Eu(t),[m,v]=a.useState(!1),g=a.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:w,removeAllGlobalListeners:x}=Qt(),S=a.useCallback((y,T)=>{let G=g.current;if(s||G.didFirePressStart)return!1;let N=!0;if(G.isTriggeringEvent=!0,n){let Y=new er("pressstart",T,y);n(Y),N=Y.shouldStopPropagation}return r&&r(!0),G.isTriggeringEvent=!1,G.didFirePressStart=!0,v(!0),N},[s,n,r]),k=a.useCallback((y,T,G=!0)=>{let N=g.current;if(!N.didFirePressStart)return!1;N.didFirePressStart=!1,N.isTriggeringEvent=!0;let Y=!0;if(o){let E=new er("pressend",T,y);o(E),Y=E.shouldStopPropagation}if(r&&r(!1),v(!1),e&&G&&!s){let E=new er("press",T,y);e(E),Y&&=E.shouldStopPropagation}return N.isTriggeringEvent=!1,Y},[s,o,r,e]),V=Ge(k),I=a.useCallback((y,T)=>{let G=g.current;if(s)return!1;if(i){G.isTriggeringEvent=!0;let N=new er("pressup",T,y);return i(N),G.isTriggeringEvent=!1,N.shouldStopPropagation}return!0},[s,i]),L=Ge(I),C=a.useCallback(y=>{let T=g.current;if(T.isPressed&&T.target){T.didFirePressStart&&T.pointerType!=null&&k(qe(T.target,y),T.pointerType,!1),T.isPressed=!1,T.isOverTarget=!1,T.activePointerId=null,T.pointerType=null,x(),f||Xr(T.target);for(let G of T.disposables)G();T.disposables=[]}},[f,x,k]),K=Ge(C);a.useEffect(()=>{s&&g.current.isPressed&&K({currentTarget:g.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[s]);let W=a.useCallback(y=>{d&&C(y)},[d,C]),z=a.useCallback(y=>{s||l?.(y)},[s,l]),j=a.useCallback((y,T)=>{if(!s&&l){let G=new MouseEvent("click",y);Jn(G,T),l(Mr(G))}},[s,l]),U=a.useMemo(()=>{let y=g.current,T={onKeyDown(N){if(Qr(N.nativeEvent,N.currentTarget)&&q(N.currentTarget,A(N))){Xo(A(N),N.key)&&N.preventDefault();let Y=!0;!y.isPressed&&!N.repeat&&(y.target=N.currentTarget,y.isPressed=!0,y.pointerType="keyboard",Y=S(N,"keyboard"));let E=N.currentTarget,$=H=>{Qr(H,E)&&!H.repeat&&q(E,A(H))&&y.target&&L(qe(y.target,H),"keyboard")};w(J(N.currentTarget),"keyup",He($,G),!0),Y&&N.stopPropagation(),N.metaKey&&be()&&y.metaKeyEvents?.set(N.key,N.nativeEvent)}else N.key==="Meta"&&(y.metaKeyEvents=new Map)},onClick(N){if(!(N&&!q(N.currentTarget,A(N)))&&N&&N.button===0&&!y.isTriggeringEvent&&!Me.isOpening){let Y=!0;if(s&&N.preventDefault(),!y.ignoreEmulatedMouseEvents&&!y.isPressed&&(y.pointerType==="virtual"||Ar(N.nativeEvent))){let E=S(N,"virtual"),$=L(N,"virtual"),H=V(N,"virtual");z(N),Y=E&&$&&H}else if(y.isPressed&&y.pointerType!=="keyboard"){let E=y.pointerType||N.nativeEvent.pointerType||"virtual",$=L(qe(N.currentTarget,N),E),H=V(qe(N.currentTarget,N),E,!0);Y=$&&H,y.isOverTarget=!1,z(N),K(N)}y.ignoreEmulatedMouseEvents=!1,Y&&N.stopPropagation()}}},G=N=>{if(y.isPressed&&y.target&&Qr(N,y.target)){Xo(A(N),N.key)&&N.preventDefault();let Y=A(N),E=q(y.target,Y);V(qe(y.target,N),"keyboard",E),E&&j(N,y.target),x(),N.key!=="Enter"&&Jr(y.target)&&q(y.target,Y)&&!N[Uo]&&(N[Uo]=!0,Me(y.target,N,!1)),y.isPressed=!1,y.metaKeyEvents?.delete(N.key)}else if(N.key==="Meta"&&y.metaKeyEvents?.size){let Y=y.metaKeyEvents;y.metaKeyEvents=void 0;for(let E of Y.values())y.target?.dispatchEvent(new KeyboardEvent("keyup",E))}};if(typeof PointerEvent<"u"){T.onPointerDown=E=>{if(E.button!==0||!q(E.currentTarget,A(E)))return;if(uc(E.nativeEvent)){y.pointerType="virtual";return}y.pointerType=E.pointerType;let $=!0;if(!y.isPressed){y.isPressed=!0,y.isOverTarget=!0,y.activePointerId=E.pointerId,y.target=E.currentTarget,f||Ho(y.target),$=S(E,y.pointerType);let H=A(E);"releasePointerCapture"in H&&("hasPointerCapture"in H?H.hasPointerCapture(E.pointerId)&&H.releasePointerCapture(E.pointerId):H.releasePointerCapture(E.pointerId)),w(J(E.currentTarget),"pointerup",N,!1),w(J(E.currentTarget),"pointercancel",Y,!1)}$&&E.stopPropagation()},T.onMouseDown=E=>{if(q(E.currentTarget,A(E))&&E.button===0){if(u){let $=eo(E.target);$&&y.disposables.push($)}E.stopPropagation()}},T.onPointerUp=E=>{!q(E.currentTarget,A(E))||y.pointerType==="virtual"||E.button===0&&!y.isPressed&&L(E,y.pointerType||E.pointerType)},T.onPointerEnter=E=>{E.pointerId===y.activePointerId&&y.target&&!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,S(qe(y.target,E),y.pointerType))},T.onPointerLeave=E=>{E.pointerId===y.activePointerId&&y.target&&y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,V(qe(y.target,E),y.pointerType,!1),W(E))};let N=E=>{if(E.pointerId===y.activePointerId&&y.isPressed&&E.button===0&&y.target){if(q(y.target,A(E))&&y.pointerType!=null){let $=!1,H=setTimeout(()=>{y.isPressed&&y.target instanceof HTMLElement&&($?K(E):(we(y.target),y.target.click()))},80);w(E.currentTarget,"click",()=>$=!0,!0),y.disposables.push(()=>clearTimeout(H))}else K(E);y.isOverTarget=!1}},Y=E=>{K(E)};T.onDragStart=E=>{q(E.currentTarget,A(E))&&K(E)}}else if(process.env.NODE_ENV==="test"){T.onMouseDown=E=>{if(E.button!==0||!q(E.currentTarget,A(E)))return;if(y.ignoreEmulatedMouseEvents){E.stopPropagation();return}if(y.isPressed=!0,y.isOverTarget=!0,y.target=E.currentTarget,y.pointerType=Ar(E.nativeEvent)?"virtual":"mouse",et.flushSync(()=>S(E,y.pointerType))&&E.stopPropagation(),u){let H=eo(E.target);H&&y.disposables.push(H)}w(J(E.currentTarget),"mouseup",N,!1)},T.onMouseEnter=E=>{if(!q(E.currentTarget,A(E)))return;let $=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!0,$=S(E,y.pointerType)),$&&E.stopPropagation()},T.onMouseLeave=E=>{if(!q(E.currentTarget,A(E)))return;let $=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!1,$=V(E,y.pointerType,!1),W(E)),$&&E.stopPropagation()},T.onMouseUp=E=>{q(E.currentTarget,A(E))&&!y.ignoreEmulatedMouseEvents&&E.button===0&&!y.isPressed&&L(E,y.pointerType||"mouse")};let N=E=>{if(E.button===0){if(y.ignoreEmulatedMouseEvents){y.ignoreEmulatedMouseEvents=!1;return}y.target&&q(y.target,A(E))&&y.pointerType!=null||K(E),y.isOverTarget=!1}};T.onTouchStart=E=>{if(!q(E.currentTarget,A(E)))return;let $=$u(E.nativeEvent);if(!$)return;y.activePointerId=$.identifier,y.ignoreEmulatedMouseEvents=!0,y.isOverTarget=!0,y.isPressed=!0,y.target=E.currentTarget,y.pointerType="touch",f||Ho(y.target),S(Be(y.target,E),y.pointerType)&&E.stopPropagation(),w(fe(E.currentTarget),"scroll",Y,!0)},T.onTouchMove=E=>{if(!q(E.currentTarget,A(E)))return;if(!y.isPressed){E.stopPropagation();return}let $=qo(E.nativeEvent,y.activePointerId),H=!0;$&&Yo($,E.currentTarget)?!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,H=S(Be(y.target,E),y.pointerType)):y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,H=V(Be(y.target,E),y.pointerType,!1),W(Be(y.target,E))),H&&E.stopPropagation()},T.onTouchEnd=E=>{if(!q(E.currentTarget,A(E)))return;if(!y.isPressed){E.stopPropagation();return}let $=qo(E.nativeEvent,y.activePointerId),H=!0;$&&Yo($,E.currentTarget)&&y.pointerType!=null?(L(Be(y.target,E),y.pointerType),H=V(Be(y.target,E),y.pointerType),j(E.nativeEvent,y.target)):y.isOverTarget&&y.pointerType!=null&&(H=V(Be(y.target,E),y.pointerType,!1)),H&&E.stopPropagation(),y.isPressed=!1,y.activePointerId=null,y.isOverTarget=!1,y.ignoreEmulatedMouseEvents=!0,y.target&&!f&&Xr(y.target),x()},T.onTouchCancel=E=>{q(E.currentTarget,A(E))&&(E.stopPropagation(),y.isPressed&&K(Be(y.target,E)))};let Y=E=>{y.isPressed&&q(A(E),y.target)&&K({currentTarget:y.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};T.onDragStart=E=>{q(E.currentTarget,A(E))&&K(E)}}return T},[w,s,u,x,f,W,S,z,j]);return a.useEffect(()=>{if(!p||process.env.NODE_ENV==="test")return;const y=J(p.current);if(!y||!y.head||y.getElementById(Go))return;const T=y.createElement("style");T.id=Go;let G=jo(y);G&&(T.nonce=G),T.textContent=`
2
2
  @layer {
3
3
  [${Ro}] {
4
4
  touch-action: pan-x pan-y pinch-zoom;
5
5
  }
6
6
  }
7
- `.trim(),y.head.prepend(T)},[p]),a.useEffect(()=>{let y=g.current;return()=>{f||Xr(y.target??void 0);for(let T of y.disposables)T();y.disposables=[]}},[f]),{isPressed:c||m,pressProps:ee(h,U,{[Ro]:!0})}}function Jr(t){return t.tagName==="A"&&t.hasAttribute("href")}function Qr(t,e){const{key:r,code:n}=t,o=e,i=o.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(o instanceof fe(o).HTMLInputElement&&!Zo(o,r)||o instanceof fe(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&Jr(o))&&r!=="Enter")}function $u(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function qo(t,e){const r=t.changedTouches;for(let n=0;n<r.length;n++){const o=r[n];if(o.identifier===e)return o}return null}function Be(t,e){let r=0,n=0;return e.targetTouches&&e.targetTouches.length===1&&(r=e.targetTouches[0].clientX,n=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n}}function qe(t,e){let r=e.clientX,n=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n,key:e.key}}function Su(t){let e=0,r=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?r=t.height/2:t.radiusY!==void 0&&(r=t.radiusY),{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function Cu(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Yo(t,e){let r=e.getBoundingClientRect(),n=Su(t);return Cu(r,n)}function ku(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!Jr(t)}function Xo(t,e){return be()&&e==="Enter"?!1:t instanceof HTMLInputElement?e==="Enter"&&(t.type==="checkbox"||t.type==="radio")?!1:!Zo(t,e):ku(t)}const Pu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Zo(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Pu.has(t.type)}function rr(t){let{isDisabled:e,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=t,i=a.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=Qt(),c=a.useCallback(f=>{q(f.currentTarget,A(f))&&i.current.isFocusWithin&&!q(f.currentTarget,f.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(f),o&&o(!1))},[r,o,i,s]),u=Qn(c),d=a.useCallback(f=>{if(!q(f.currentTarget,A(f)))return;let p=A(f);const h=J(p),m=ie(h);if(!i.current.isFocusWithin&&m===p){n&&n(f),o&&o(!0),i.current.isFocusWithin=!0,u(f);let x=f.currentTarget;l(h,"focus",g=>{let w=A(g);if(i.current.isFocusWithin&&!q(x,w)){let v=new h.defaultView.FocusEvent("blur",{relatedTarget:w});Jn(v,x);let S=Mr(v);c(S)}},{capture:!0})}},[n,o,u,l,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}function en(t={}){let{autoFocus:e=!1,isTextInput:r,within:n}=t,o=a.useRef({isFocused:!1,isFocusVisible:e||yt()}),[i,l]=a.useState(!1),[s,c]=a.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=a.useCallback(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=a.useCallback(h=>{o.current.isFocused=h,o.current.isFocusVisible=yt(),l(h),u()},[u]);wc(h=>{o.current.isFocusVisible=h,u()},[r,i],{enabled:i,isTextInput:r});let{focusProps:f}=Po({isDisabled:n,onFocusChange:d}),{focusWithinProps:p}=rr({isDisabled:!n,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:s,focusProps:n?p:f}}let nr=!1,or=0;function tn(){nr=!0,setTimeout(()=>{nr=!1},500)}function Jo(t){t.pointerType==="touch"&&tn()}function Tu(){let t=J(null);if(!(typeof t>"u"))return or===0&&(typeof PointerEvent<"u"?t.addEventListener("pointerup",Jo):process.env.NODE_ENV==="test"&&t.addEventListener("touchend",tn)),or++,()=>{or--,!(or>0)&&(typeof PointerEvent<"u"?t.removeEventListener("pointerup",Jo):process.env.NODE_ENV==="test"&&t.removeEventListener("touchend",tn))}}function ir(t){let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,isDisabled:o}=t,[i,l]=a.useState(!1),s=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(Tu,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=Qt(),{hoverProps:d,triggerHoverEnd:f}=a.useMemo(()=>{let p=(x,g)=>{if(s.pointerType=g,o||g==="touch"||s.isHovered||!q(x.currentTarget,A(x)))return;s.isHovered=!0;let w=x.currentTarget;s.target=w,c(J(A(x)),"pointerover",v=>{s.isHovered&&s.target&&!q(s.target,A(v))&&h(v,v.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:w,pointerType:g}),r&&r(!0),l(!0)},h=(x,g)=>{let w=s.target;s.pointerType="",s.target=null,!(g==="touch"||!s.isHovered||!w)&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:w,pointerType:g}),r&&r(!1),l(!1))},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=x=>{nr&&x.pointerType==="mouse"||p(x,x.pointerType)},m.onPointerLeave=x=>{!o&&q(x.currentTarget,A(x))&&h(x,x.pointerType)}):process.env.NODE_ENV==="test"&&(m.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=x=>{!s.ignoreEmulatedMouseEvents&&!nr&&p(x,"mouse"),s.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=x=>{!o&&q(x.currentTarget,A(x))&&h(x,"mouse")}),{hoverProps:m,triggerHoverEnd:h}},[e,r,n,o,s,c,u]);return a.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:d,isHovered:i}}function rn(t,e=-1/0,r=1/0){return Math.min(Math.max(t,e),r)}const Nu=a.createContext(null),Qo=7e3;let ut=null;function ei(t,e="assertive",r=Qo){ut?ut.announce(t,e,r):(ut=new Ku,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?ut.announce(t,e,r):setTimeout(()=>{ut?.isAttached()&&ut?.announce(t,e,r)},100))}class Ku{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let r=document.createElement("div");return r.setAttribute("role","log"),r.setAttribute("aria-live",e),r.setAttribute("aria-relevant","additions"),r}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,r="assertive",n=Qo){if(!this.node)return;let o=document.createElement("div");typeof e=="object"?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,r==="assertive"?this.assertiveLog?.appendChild(o):this.politeLog?.appendChild(o),e!==""&&setTimeout(()=>{o.remove()},n)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function Lu(t,e){let{elementType:r="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:s,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:f,href:p,target:h,rel:m,type:x="button"}=t,g;r==="button"?g={type:x,disabled:n,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:g={role:"button",href:r==="a"&&!n?p:void 0,target:r==="a"?h:void 0,type:r==="input"?x:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?m:void 0};let{pressProps:w,isPressed:v}=tr({onPressStart:i,onPressEnd:l,onPressChange:c,onPress:o,onPressUp:s,onClick:f,isDisabled:n,preventFocusOnPress:u,ref:e}),{focusableProps:S}=Ur(t,e);d&&(S.tabIndex=n?-1:S.tabIndex);let k=ee(S,w,ye(t,{labelable:!0}));return{isPressed:v,buttonProps:ee(g,k,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}const Mu=a.createContext({}),ti=tu(function(e,r){[e,r]=ot(e,r,Mu);let n=e,{isPending:o}=n,{buttonProps:i,isPressed:l}=Lu(e,r);i=Iu(i,o);let{focusProps:s,isFocused:c,isFocusVisible:u}=en(e),{hoverProps:d,isHovered:f}=ir({...e,isDisabled:e.isDisabled||o}),p={isHovered:f,isPressed:(n.isPressed||l)&&!o,isFocused:c,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:o??!1},h=Ae({...e,values:p,defaultClassName:"react-aria-Button"}),m=Se(i.id),x=Se(),g=i["aria-labelledby"];o&&(g?g=`${g} ${x}`:i["aria-label"]&&(g=`${m} ${x}`));let w=a.useRef(o);a.useEffect(()=>{let S={"aria-labelledby":g||m};(!w.current&&c&&o||w.current&&c&&!o)&&ei(S,"assertive"),w.current=o},[o,c,g,m]);let v=ye(e,{global:!0});return delete v.onClick,a.createElement(Ce.button,{...ee(v,h,i,s,d),type:i.type==="submit"&&o?"button":i.type,id:m,ref:r,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":f||void 0,"data-focused":c||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},a.createElement(Nu.Provider,{value:{id:x}},h.children))}),Du=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function Iu(t,e){if(e){for(const r in t)r.startsWith("on")&&!Du.test(r)&&(t[r]=void 0);t.href=void 0,t.target=void 0}return t}const Au=a.createContext({});function dt(t,e){if(!t)return!1;let r=window.getComputedStyle(t),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return t===n&&r.overflow!=="hidden"&&(o=!0),o&&e&&(o=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),o}function ri(t,e){let r=t;for(dt(r,e)&&(r=r.parentElement);r&&!dt(r,e);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function nn(t,e){let r=[],n=document.scrollingElement||document.documentElement;for(;t&&(dt(t,e)&&r.push(t),t!==n);)t=t.parentElement;return r}function lr(t,e,r={}){let{block:n="nearest",inline:o="nearest"}=r;if(t===e)return;let i=t.scrollTop,l=t.scrollLeft,s=e.getBoundingClientRect(),c=t.getBoundingClientRect(),u=window.getComputedStyle(e),d=window.getComputedStyle(t),f=document.scrollingElement||document.documentElement,p=t===f,h=t===f?0:c.top,m=t===f?t.clientHeight:c.bottom,x=t===f?0:c.left,g=t===f?t.clientWidth:c.right,w=parseFloat(u.scrollMarginTop)||0,v=parseFloat(u.scrollMarginBottom)||0,S=parseFloat(u.scrollMarginLeft)||0,k=parseFloat(u.scrollMarginRight)||0,V=parseFloat(d.scrollPaddingTop)||0,I=parseFloat(d.scrollPaddingBottom)||0,L=parseFloat(d.scrollPaddingLeft)||0,C=parseFloat(d.scrollPaddingRight)||0,K=parseFloat(d.borderTopWidth)||0,W=parseFloat(d.borderBottomWidth)||0,z=parseFloat(d.borderLeftWidth)||0,j=parseFloat(d.borderRightWidth)||0,U=s.top-w,y=s.bottom+v,T=s.left-S,G=s.right+k,N=t===f?0:z+j,Y=t===f?0:K+W,E=t===f?0:t.offsetWidth-t.clientWidth-N,$=t===f?0:t.offsetHeight-t.clientHeight-Y,H=h+(p?0:K)+V,ae=m-(p?0:W)-I-$,pe=x+(p?0:z)+L,ne=g-(p?0:j)-C;We()&&Fe()||d.direction==="ltr"?ne-=E:d.direction==="rtl"&&(pe+=E);let P=U<H||y>ae,R=T<pe||G>ne;if(P&&n==="start")i+=U-H;else if(P&&n==="center")i+=(U+y)/2-(H+ae)/2;else if(P&&n==="end")i+=y-ae;else if(P&&n==="nearest"){let oe=U-H,ge=y-ae;i+=Math.abs(oe)<=Math.abs(ge)?oe:ge}if(R&&o==="start")l+=T-pe;else if(R&&o==="center")l+=(T+G)/2-(pe+ne)/2;else if(R&&o==="end")l+=G-ne;else if(R&&o==="nearest"){let oe=T-pe,ge=G-ne;l+=Math.abs(oe)<=Math.abs(ge)?oe:ge}if(process.env.NODE_ENV==="test"){t.scrollLeft=l,t.scrollTop=i;return}t.scrollTo({left:l,top:i})}function ni(t,e={}){let{containingElement:r}=e;if(t&&t.isConnected){let n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let{left:i,top:l}=t.getBoundingClientRect(),s=nn(t,!0);for(let d of s)lr(d,t);let{left:c,top:u}=t.getBoundingClientRect();if(Math.abs(i-c)>1||Math.abs(l-u)>1){s=r?nn(r,!0):[];for(let d of s)lr(d,r,{block:"center",inline:"center"});for(let d of nn(t,!0))lr(d,t)}}else{let{left:i,top:l}=t.getBoundingClientRect();t?.scrollIntoView?.({block:"nearest"});let{left:s,top:c}=t.getBoundingClientRect();(Math.abs(i-s)>1||Math.abs(l-c)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),t.scrollIntoView?.({block:"nearest"}))}}}let Fu=0;const on=new Map;function Ou(t){let[e,r]=a.useState();return Q(()=>{if(!t)return;let n=on.get(t);if(n)r(n.element.id);else{let o=`react-aria-description-${Fu++}`;r(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),n={refCount:0,element:i},on.set(t,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),on.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}const oi={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Bu(t={}){let{style:e,isFocusable:r}=t,[n,o]=a.useState(!1),{focusWithinProps:i}=rr({isDisabled:!r,onFocusWithinChange:s=>o(s)}),l=a.useMemo(()=>n?e:e?{...oi,...e}:oi,[n]);return{visuallyHiddenProps:{...i,style:l}}}function zu(t){let{children:e,elementType:r="div",isFocusable:n,style:o,...i}=t,{visuallyHiddenProps:l}=Bu(t);return a.createElement(r,ee(i,l),e)}const _u=a.createContext({}),Vu=a.createContext(null);function ii(t){let e=a.useRef({});return a.createElement(Vu.Provider,{value:e},t.children)}const li=a.createContext({isSelected:!1}),Hu=a.createContext({}),Fn=class Fn extends Re{filter(e,r){let n=r.getItem(this.prevKey);if(n&&n.type!=="separator"){let o=this.clone();return r.addDescendants(o,e),o}return null}};Fn.type="separator";let si=Fn;class Wu{constructor(e,r,n,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{if(l.nodeType===Node.ELEMENT_NODE){const s=l.shadowRoot;if(s){const c=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(l);if(this.filter?.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=r,this.filter=o??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=r,this._walkerStack.unshift(e.createTreeWalker(r,n,this._acceptNode));const i=r.shadowRoot;if(i){const l=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}get currentNode(){return this._currentNode}set currentNode(e){if(!q(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const r=[];let n=e,o=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=n,s=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});r.push(s),s.currentNode=o,this._currentSetFor.add(s),n=o=l.host}else n=n.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});r.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=r}get doc(){return this._doc}firstChild(){let e=this.currentNode,r=this.nextNode();return q(e,r)?(r&&(this.currentNode=r),r):(this.currentNode=e,null)}lastChild(){let r=this._walkerStack[0].lastChild();return r&&(this.currentNode=r),r}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let n;if(typeof this.filter=="function"?n=this.filter(e):this.filter?.acceptNode&&(n=this.filter.acceptNode(e)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let o=this.nextNode();return o&&(this.currentNode=o),o}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null;return null}const r=e.previousNode();if(r){if(r.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(r):this.filter?.acceptNode&&(o=this.filter.acceptNode(r)),o===NodeFilter.FILTER_ACCEPT)return r&&(this.currentNode=r),r;let i=this.lastChild();return i&&(this.currentNode=i),i}return r&&(this.currentNode=r),r}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function ai(t,e,r,n){return ke()?new Wu(t,e,r,n):t.createTreeWalker(e,r,n)}const ci=a.createContext(null),ln="react-aria-focus-scope-restore";let te=null;function ui(t){let{children:e,contain:r,restoreFocus:n,autoFocus:o}=t,i=a.useRef(null),l=a.useRef(null),s=a.useRef([]),{parentNode:c}=a.useContext(ci)||{},u=a.useMemo(()=>new cn({scopeRef:s}),[s]);Q(()=>{let p=c||ce.root;if(ce.getTreeNode(p.scopeRef)&&te&&!sr(te,p.scopeRef)){let h=ce.getTreeNode(te);h&&(p=h)}p.addChild(u),ce.addNode(u)},[u,c]),Q(()=>{let p=ce.getTreeNode(s);p&&(p.contain=!!r)},[r]),Q(()=>{let p=i.current?.nextSibling,h=[],m=x=>x.stopPropagation();for(;p&&p!==l.current;)h.push(p),p.addEventListener(ln,m),p=p.nextSibling;return s.current=h,()=>{for(let x of h)x.removeEventListener(ln,m)}},[e]),Xu(s,n,r),Ru(s,r),Zu(s,n,r),Yu(s,o),a.useEffect(()=>{const p=ie(J(s.current?s.current[0]:void 0));let h=null;if(xe(p,s.current)){for(let m of ce.traverse())m.scopeRef&&xe(p,m.scopeRef.current)&&(h=m);h===ce.getTreeNode(s)&&(te=h.scopeRef)}},[s]),Q(()=>()=>{let p=ce.getTreeNode(s)?.parent?.scopeRef??null;(s===te||sr(s,te))&&(!p||ce.getTreeNode(p))&&(te=p),ce.removeTreeNode(s)},[s]);let d=a.useMemo(()=>ju(s),[]),f=a.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return a.createElement(ci.Provider,{value:f},a.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),e,a.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function ju(t){return{focusNext(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:l}=e,s=n||ie(J(r[0]??void 0)),c=r[0].previousElementSibling,u=Ye(r),d=De(u,{tabbable:o,accept:l},r);d.currentNode=xe(s,r)?s:c;let f=d.nextNode();return!f&&i&&(d.currentNode=c,f=d.nextNode()),f&&Ee(f,!0),f},focusPrevious(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:l}=e,s=n||ie(J(r[0]??void 0)),c=r[r.length-1].nextElementSibling,u=Ye(r),d=De(u,{tabbable:o,accept:l},r);d.currentNode=xe(s,r)?s:c;let f=d.previousNode();return!f&&i&&(d.currentNode=c,f=d.previousNode()),f&&Ee(f,!0),f},focusFirst(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=Ye(r),l=De(i,{tabbable:n,accept:o},r);l.currentNode=r[0].previousElementSibling;let s=l.nextNode();return s&&Ee(s,!0),s},focusLast(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=Ye(r),l=De(i,{tabbable:n,accept:o},r);l.currentNode=r[r.length-1].nextElementSibling;let s=l.previousNode();return s&&Ee(s,!0),s}}}function Ye(t){return t[0].parentElement}function St(t){let e=ce.getTreeNode(te);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Uu(t){if(!t.form)return Array.from(J(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(n=>!n.form);const e=t.form.elements.namedItem(t.name);let r=fe(t);return e instanceof r.RadioNodeList?Array.from(e).filter(n=>n instanceof r.HTMLInputElement):e instanceof r.HTMLInputElement?[e]:[]}function Gu(t){if(t.checked)return!0;const e=Uu(t);return e.length>0&&!e.some(r=>r.checked)}function Ru(t,e){let r=a.useRef(void 0),n=a.useRef(void 0);Q(()=>{let o=t.current;if(!e){n.current&&(cancelAnimationFrame(n.current),n.current=void 0);return}const i=J(o?o[0]:void 0);let l=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!St(t)||u.isComposing)return;let d=ie(i),f=t.current;if(!f||!xe(d,f))return;let p=Ye(f),h=De(p,{tabbable:!0},f);if(!d)return;h.currentNode=d;let m=u.shiftKey?h.previousNode():h.nextNode();m||(h.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,m=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),m&&(Ee(m,!0),m instanceof fe(m).HTMLInputElement&&m.select())},s=u=>{(!te||sr(te,t))&&xe(A(u),t.current)?(te=t,r.current=A(u)):St(t)&&!ze(A(u),t)?r.current?Ee(r.current):te&&te.current&&sn(te.current):St(t)&&(r.current=A(u))},c=u=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let d=xt(),f=(d==="virtual"||d===null)&&zt()&&Ir(),p=ie(i);if(!f&&p&&St(t)&&!ze(p,t)){te=t;let h=A(u);h&&h.isConnected?(r.current=h,Ee(r.current)):te.current&&sn(te.current)}})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",s,!1),o?.forEach(u=>u.addEventListener("focusin",s,!1)),o?.forEach(u=>u.addEventListener("focusout",c,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",s,!1),o?.forEach(u=>u.removeEventListener("focusin",s,!1)),o?.forEach(u=>u.removeEventListener("focusout",c,!1))}},[t,e]),Q(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n])}function di(t){return ze(t)}function xe(t,e){return!t||!e?!1:e.some(r=>q(r,t))}function ze(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of ce.traverse(ce.getTreeNode(e)))if(r&&xe(t,r.current))return!0;return!1}function qu(t){return ze(t,te)}function sr(t,e){let r=ce.getTreeNode(e)?.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function Ee(t,e=!1){if(t!=null&&!e)try{st(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function fi(t,e=!0){let r=t[0].previousElementSibling,n=Ye(t),o=De(n,{tabbable:e},t);o.currentNode=r;let i=o.nextNode();return e&&!i&&(n=Ye(t),o=De(n,{tabbable:!1},t),o.currentNode=r,i=o.nextNode()),i}function sn(t,e=!0){Ee(fi(t,e))}function Yu(t,e){const r=a.useRef(e);a.useEffect(()=>{if(r.current){te=t;const n=J(t.current?t.current[0]:void 0);!xe(ie(n),te.current)&&t.current&&sn(t.current)}r.current=!1},[t])}function Xu(t,e,r){Q(()=>{if(e||r)return;let n=t.current;const o=J(n?n[0]:void 0);let i=l=>{let s=A(l);xe(s,t.current)?te=t:di(s)||(te=null)};return o.addEventListener("focusin",i,!1),n?.forEach(l=>l.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),n?.forEach(l=>l.removeEventListener("focusin",i,!1))}},[t,e,r])}function pi(t){let e=ce.getTreeNode(te);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return e?.scopeRef===t}function Zu(t,e,r){const n=a.useRef(typeof document<"u"?ie(J(t.current?t.current[0]:void 0)):null);Q(()=>{let o=t.current;const i=J(o?o[0]:void 0);if(!e||r)return;let l=()=>{(!te||sr(te,t))&&xe(ie(i),t.current)&&(te=t)};return i.addEventListener("focusin",l,!1),o?.forEach(s=>s.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),o?.forEach(s=>s.removeEventListener("focusin",l,!1))}},[t,r]),Q(()=>{const o=J(t.current?t.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!St(t)||l.isComposing)return;let s=o.activeElement;if(!ze(s,t)||!pi(t))return;let c=ce.getTreeNode(t);if(!c)return;let u=c.nodeToRestore,d=De(o.body,{tabbable:!0});d.currentNode=s;let f=l.shiftKey?d.previousNode():d.nextNode();if((!u||!u.isConnected||u===o.body)&&(u=void 0,c.nodeToRestore=void 0),(!f||!ze(f,t))&&u){d.currentNode=u;do f=l.shiftKey?d.previousNode():d.nextNode();while(ze(f,t));l.preventDefault(),l.stopPropagation(),f?Ee(f,!0):di(u)?Ee(u,!0):s.blur()}};return r||o.addEventListener("keydown",i,!0),()=>{r||o.removeEventListener("keydown",i,!0)}},[t,e,r]),Q(()=>{const o=J(t.current?t.current[0]:void 0);if(!e)return;let i=ce.getTreeNode(t);if(i)return i.nodeToRestore=n.current??void 0,()=>{let l=ce.getTreeNode(t);if(!l)return;let s=l.nodeToRestore,c=ie(o);if(e&&s&&(c&&ze(c,t)||c===o.body&&pi(t))){let u=ce.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=u.getTreeNode(t);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){hi(d.nodeToRestore);return}d=d.parent}for(d=u.getTreeNode(t);d;){if(d.scopeRef&&d.scopeRef.current&&ce.getTreeNode(d.scopeRef)){let f=fi(d.scopeRef.current,!0);hi(f);return}d=d.parent}}})}}},[t,e])}function hi(t){t.dispatchEvent(new CustomEvent(ln,{bubbles:!0,cancelable:!0}))&&Ee(t)}function De(t,e,r){let n=e?.tabbable?Lr:Xn,o=t?.nodeType===Node.ELEMENT_NODE?t:null,i=J(o),l=ai(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return q(e?.from,s)||e?.tabbable&&s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(!Gu(s)||l.currentNode.tagName==="INPUT"&&l.currentNode.type==="radio"&&l.currentNode.name===s.name)?NodeFilter.FILTER_REJECT:n(s)&&(!r||xe(s,r))&&(!e?.accept||e.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(l.currentNode=e.from),l}class an{constructor(){this.fastMap=new Map,this.root=new cn({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,r,n){let o=this.fastMap.get(r??null);if(!o)return;let i=new cn({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let r=this.fastMap.get(e);if(!r)return;let n=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&xe(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let o=r.children;n&&(n.removeChild(r),o.size>0&&o.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let r of e.children)yield*this.traverse(r)}clone(){let e=new an;for(let r of this.traverse())e.addTreeNode(r.scopeRef,r.parent?.scopeRef??null,r.nodeToRestore);return e}}class cn{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let ce=new an;function un(t){return cc()?t.altKey:t.ctrlKey}function Xe(t,e){let r=`[data-key="${CSS.escape(String(e))}"]`,n=t.current?.dataset.collection;return n&&(r=`[data-collection="${CSS.escape(n)}"]${r}`),t.current?.querySelector(r)}const gi=new WeakMap;function Ju(t){let e=Se();return gi.set(t,e),e}function Qu(t){return gi.get(t)}const bi=1e3;function ed(t){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:n}=t,o=a.useRef({search:"",timeout:void 0}),i=s=>{if(o.current.search.length>0&&s.key===" "){if(s.preventDefault(),(!("continuePropagation"in s)||"continuePropagation"in s&&!s.isPropagationStopped())&&s.stopPropagation(),o.current.search+=" ",e.getKeyForSearch!=null){let c=e.getKeyForSearch(o.current.search,r.focusedKey);c==null&&(c=e.getKeyForSearch(o.current.search)),c!=null&&(r.setFocusedKey(c),n&&n(c))}clearTimeout(o.current.timeout),o.current.timeout=setTimeout(()=>{o.current.search=""},bi)}},l=s=>{let c=td(s.key);if(!(!c||s.ctrlKey||s.metaKey||s.altKey||!q(s.currentTarget,A(s))||o.current.search.length===0&&c===" ")){if(o.current.search+=c,e.getKeyForSearch!=null){let u=e.getKeyForSearch(o.current.search,r.focusedKey);if(u==null&&(u=e.getKeyForSearch(o.current.search)),u!=null)r.setFocusedKey(u),n&&n(u),s.preventDefault(),"continuePropagation"in s||s.stopPropagation();else{o.current.search="",clearTimeout(o.current.timeout),o.current.timeout=void 0;return}}clearTimeout(o.current.timeout),o.current.timeout=setTimeout(()=>{o.current.search=""},bi)}};return a.useEffect(()=>{let s=o.current.timeout;return()=>{clearTimeout(s)}},[o]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0,onKeyDown:e.getKeyForSearch?l:void 0}}}function td(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function mi(t,e){const r=a.useRef(!0),n=a.useRef(null);Q(()=>(r.current=!0,()=>{r.current=!1}),[]),Q(()=>{r.current?r.current=!1:(!n.current||e.some((o,i)=>!Object.is(o,n[i])))&&t(),n.current=e},e)}function yi(t){let{selectionManager:e,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:l=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c="clearSelection",selectOnFocus:u=e.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:p=!1,scrollRef:h=n,linkBehavior:m="action",UNSTABLE_focusOnEntry:x}=t,{direction:g}=it(),w=_t();const v=(D,M,ue)=>{if(M!=null){if(e.isLink(M)&&m==="selection"&&u&&!un(D)){et.flushSync(()=>{e.setFocusedKey(M,ue)});let re=Xe(n,M),Er=e.getItemProps(M);if(re){w.open(re,D,Er.href,Er.routerOptions);return}return!1}if(e.setFocusedKey(M,ue),e.isLink(M)&&m==="override")return!1;if(D.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(M);return}else if(u&&!un(D)){e.replaceSelection(M);return}}return!1};let S=D=>{if(r.getKeyBelow){let M=e.focusedKey!=null?r.getKeyBelow?.(e.focusedKey):r.getFirstKey?.();if(M==null&&i&&(M=r.getFirstKey?.(e.focusedKey)),M!=null){v(D,M);return}}return!1},k=D=>{if(r.getKeyAbove){let M=e.focusedKey!=null?r.getKeyAbove?.(e.focusedKey):r.getLastKey?.();if(M==null&&i&&(M=r.getLastKey?.(e.focusedKey)),M!=null){v(D,M);return}}return!1},V=D=>{if(r.getFirstKey){if(e.focusedKey===null&&D.shiftKey)return!1;let M=r.getFirstKey(e.focusedKey,vt(D));if(e.setFocusedKey(M),M!=null){if(vt(D)&&D.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(M);return}else if(u){e.replaceSelection(M);return}}}return!1},I=D=>{if(r.getKeyLeftOf){let M=e.focusedKey!=null?r.getKeyLeftOf?.(e.focusedKey):r.getFirstKey?.();if(M==null&&i&&(M=g==="rtl"?r.getFirstKey?.(e.focusedKey):r.getLastKey?.(e.focusedKey)),M!=null){v(D,M,g==="rtl"?"first":"last");return}}return!1},L=D=>{if(r.getKeyRightOf){let M=e.focusedKey!=null?r.getKeyRightOf?.(e.focusedKey):r.getFirstKey?.();if(M==null&&i&&(M=g==="rtl"?r.getLastKey?.(e.focusedKey):r.getFirstKey?.(e.focusedKey)),M!=null){v(D,M,g==="rtl"?"last":"first");return}}return!1},C=D=>{if(r.getLastKey){if(e.focusedKey===null&&D.shiftKey)return!1;let M=r.getLastKey(e.focusedKey,vt(D));if(e.setFocusedKey(M),M!=null){if(vt(D)&&D.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(M);return}else if(u){e.replaceSelection(M);return}}}return!1},K=D=>{if(r.getKeyPageBelow&&e.focusedKey!=null){let M=r.getKeyPageBelow(e.focusedKey);if(M!=null)return v(D,M)}return!1},W=D=>{if(r.getKeyPageAbove&&e.focusedKey!=null){let M=r.getKeyPageAbove(e.focusedKey);if(M!=null)return v(D,M)}return!1},z=()=>{if(e.selectionMode==="multiple"&&s!==!0){e.selectAll();return}return!1},j=()=>{if(c==="clearSelection"&&!l&&e.selectedKeys.size!==0){e.clearSelection();return}return!1},U=()=>{if(!p&&n.current){let D=De(n.current,{tabbable:!0}),M,ue;do ue=D.lastChild(),ue&&(M=ue);while(ue);let re=ie();M&&(!At(M)||re&&!Lr(re))&&we(M)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},y=()=>(!p&&n.current&&n.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),T=(D,M)=>({[be()?D+"+Shift+Alt":D+"+Shift+Control"]:M,[D+"+Shift"]:M,[be()?D+"+Alt":D+"+Control"]:M,[D]:M}),{keyboardProps:G}=at({shortcuts:{...T("ArrowDown",S),...T("ArrowUp",k),...T("ArrowLeft",I),...T("ArrowRight",L),...T("PageDown",K),...T("PageUp",W)},allowRepeats:!0}),{keyboardProps:N}=at({shortcuts:{...T("Home",V),...T("End",C),"Mod+A":z,Escape:j,Tab:U,"Tab+Shift":y}}),Y=a.useRef({top:0,left:0});Wt(h,"scroll",()=>{Y.current={top:h.current?.scrollTop??0,left:h.current?.scrollLeft??0}});let E=D=>{if(e.isFocused){q(D.currentTarget,A(D))||e.setFocused(!1);return}if(!q(D.currentTarget,A(D)))return;let M=xt();e.setFocused(!0);let ue=re=>{re!=null&&(e.setFocusedKey(re),u&&!e.isSelected(re)&&e.replaceSelection(re))};if(x&&(M==="keyboard"||M==="virtual"))ue(x==="first"?r.getFirstKey?.():r.getLastKey?.());else if(e.focusedKey==null){let re=D.relatedTarget;re&&D.currentTarget.compareDocumentPosition(re)&Node.DOCUMENT_POSITION_FOLLOWING?ue(e.lastSelectedKey??r.getLastKey?.()):ue(e.firstSelectedKey??r.getFirstKey?.())}else h.current&&(h.current.scrollTop=Y.current.top,h.current.scrollLeft=Y.current.left);if(e.focusedKey!=null&&h.current){let re=Xe(n,e.focusedKey);re instanceof HTMLElement&&(!At(re)&&!f&&we(re),(M==="keyboard"||x&&M==="virtual")&&ni(re,{containingElement:n.current}))}},$=D=>{q(D.currentTarget,D.relatedTarget)||e.setFocused(!1)},H=a.useRef(!1);Wt(n,Ga,f?D=>{let{detail:M}=D;D.stopPropagation(),e.setFocused(!0),M?.focusStrategy==="first"&&(H.current=!0)}:void 0);let ae=r.getFirstKey?.()??null;mi(()=>{if(H.current)if(ae==null){let D=ie();qn(n.current),Yn(D,null),e.collection.size>0&&(H.current=!1)}else e.setFocusedKey(ae),H.current=!1},[ae,e.collection.size]),mi(()=>{e.collection.size>0&&(H.current=!1)},[e.focusedKey]),Wt(n,Ua,f?D=>{D.stopPropagation(),e.setFocused(!1),D.detail?.clearFocusKey&&e.setFocusedKey(null)}:void 0);const pe=a.useRef(o),ne=a.useRef(!1);a.useEffect(()=>{if(pe.current){let D=null;o==="first"&&(D=r.getFirstKey?.()??null),o==="last"&&(D=r.getLastKey?.()??null);let M=e.selectedKeys;if(M.size){for(let ue of M)if(e.canSelectItem(ue)){D=ue;break}}e.setFocused(!0),e.setFocusedKey(D),D==null&&!f&&n.current&&st(n.current),e.collection.size>0&&(pe.current=!1,ne.current=!0)}});let P=a.useRef(e.focusedKey),R=a.useRef(null);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==P.current||ne.current)&&h.current&&n.current){let D=xt(),M=Xe(n,e.focusedKey);if(!(M instanceof HTMLElement))return;(D==="keyboard"||ne.current)&&(R.current&&cancelAnimationFrame(R.current),R.current=requestAnimationFrame(()=>{h.current&&(lr(h.current,M),D!=="virtual"&&ni(M,{containingElement:n.current}))}))}!f&&e.isFocused&&e.focusedKey==null&&P.current!=null&&n.current&&st(n.current),P.current=e.focusedKey,ne.current=!1}),a.useEffect(()=>()=>{R.current&&cancelAnimationFrame(R.current)},[]),Wt(n,"react-aria-focus-scope-restore",D=>{D.preventDefault(),e.setFocused(!0)});let oe={...ee(N,G),onFocus:E,onBlur:$,onMouseDown(D){h.current===A(D)&&D.preventDefault()}},{typeSelectProps:ge}=ed({keyboardDelegate:r,selectionManager:e});d||(oe=ee(ge,oe));let se;f||(se=e.focusedKey==null?0:-1);let ft=Ju(e.collection);return{collectionProps:ee(oe,{tabIndex:se,"data-collection":ft})}}class xi{constructor(e){this.ref=e}getItemRect(e){let r=this.ref.current;if(!r)return null;let n=e!=null?Xe(this.ref,e):null;if(!n)return null;let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-o.left-r.clientLeft+r.scrollLeft,y:i.top-o.top-r.clientTop+r.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}}class rd{constructor(...e){if(e.length===1){let r=e[0];this.collection=r.collection,this.ref=r.ref,this.collator=r.collator,this.disabledKeys=r.disabledKeys||new Set,this.disabledBehavior=r.disabledBehavior||"all",this.orientation=r.orientation||"vertical",this.direction=r.direction,this.layout=r.layout||"stack",this.layoutDelegate=r.layoutDelegate||new xi(r.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new xi(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){return this.disabledBehavior==="all"&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!=="selection"}findNextNonDisabled(e,r,n=!1){let o=e;for(;o!=null;){let i=this.collection.getItem(o);if(i?.type==="item"&&(n||!this.isDisabled(i)))return o;o=r(o)}return null}getNextKey(e,r){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,o=>this.collection.getKeyAfter(o),r?.includeDisabled)}getPreviousKey(e,r){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,o=>this.collection.getKeyBefore(o),r?.includeDisabled)}findKey(e,r,n){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=r(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&n(l,i)&&o!=null);return o}isSameRow(e,r){return e.y===r.y||e.x!==r.x}isSameColumn(e,r){return e.x===r.x||e.y!==r.y}isReversed(e){let r=this.getNextKey(e),n=Xe(this.ref,e);if(r!=null){let i=Xe(this.ref,r);return!n||!i?!1:n.getBoundingClientRect().top>i.getBoundingClientRect().top}let o=this.getPreviousKey(e);if(o!=null){let i=Xe(this.ref,o);return!n||!i?!1:i.getBoundingClientRect().top>n.getBoundingClientRect().top}return!1}getKeyBelow(e,r){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n,r),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getPreviousKey(e,r):this.getNextKey(e,r):this.getNextKey(e,r)}getKeyAbove(e,r){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n,r),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getNextKey(e,r):this.getPreviousKey(e,r):this.getPreviousKey(e,r)}getNextColumn(e,r,n){return r?this.getPreviousKey(e,n):this.getNextKey(e,n)}getKeyRightOf(e,r){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[n](o),r?.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",r):this.findKey(e,o=>this.getNextColumn(o,this.direction==="rtl",r),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",r):null}getKeyLeftOf(e,r){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[n](o),r?.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",r):this.findKey(e,o=>this.getNextColumn(o,this.direction==="ltr",r),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",r):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,r=>this.collection.getKeyAfter(r))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,r=>this.collection.getKeyBefore(r))}getKeyPageAbove(e){let r=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;let o=this.isReversed(e);if(r&&!dt(r))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let l=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>l&&i!=null;)i=this.getKeyAbove(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}else{let l=this.layoutDelegate.getVisibleRect(),s=o?n.y-l.height:Math.max(0,n.y+n.height-l.height);for(;n&&n.y>s&&i!=null;)i=this.getKeyAbove(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}return i??(o?this.getLastKey():this.getFirstKey())}getKeyPageBelow(e){let r=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;let o=this.isReversed(e);if(r&&!dt(r))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let l=Math.min(this.layoutDelegate.getContentSize().width,n.x-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<l&&i!=null;)i=this.getKeyBelow(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}else{let l=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<l&&i!=null;)i=this.getKeyBelow(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}return i??(o?this.getFirstKey():this.getLastKey())}getKeyForSearch(e,r){if(!this.collator)return null;let n=this.collection,o=r||this.getFirstKey();for(;o!=null;){let i=n.getItem(o);if(!i)return null;let l=i.textValue.slice(0,e.length);if(i.textValue&&this.collator.compare(l,e)===0)return o;o=this.getNextKey(o)}return null}}let dn=new Map;function nd(t){let{locale:e}=it(),r=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(dn.has(r))return dn.get(r);let n=new Intl.Collator(e,t);return dn.set(r,n),n}function od(t){let{selectionManager:e,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:l,orientation:s}=t,c=nd({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,d=a.useMemo(()=>i||new rd({collection:r,disabledKeys:n,disabledBehavior:u,ref:o,collator:c,layoutDelegate:l,orientation:s}),[i,l,r,n,o,c,u,s]),{collectionProps:f}=yi({...t,ref:o,selectionManager:e,keyboardDelegate:d});return{listProps:f}}const id=500;function fn(t){let{isDisabled:e,pointerType:r,onLongPressStart:n,onLongPressEnd:o,onLongPress:i,threshold:l=id,accessibilityDescription:s}=t;const c=a.useRef(void 0);let{addGlobalListener:u,removeAllGlobalListeners:d}=Qt(),f=m=>r?m.pointerType===r:m.pointerType==="mouse"||m.pointerType==="touch",{pressProps:p}=tr({isDisabled:e,onPressStart(m){if(m.continuePropagation(),f(m)){n&&n({...m,type:"longpressstart"}),c.current=setTimeout(()=>{m.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),u(m.target,"click",g=>g.preventDefault(),{once:!0}),J(m.target).activeElement!==m.target&&we(m.target),i&&i({...m,type:"longpress"}),c.current=void 0},l),m.pointerType==="touch"&&u(m.target,"contextmenu",g=>g.preventDefault(),{once:!0});let x=fe(m.target);u(x,"pointerup",()=>{setTimeout(()=>{d()},100)},{once:!0})}},onPressEnd(m){c.current&&clearTimeout(c.current),o&&f(m)&&o({...m,type:"longpressend"})}}),h=Ou(i&&!e?s:void 0);return{longPressProps:ee(p,h)}}function vi(t){let{id:e,selectionManager:r,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:s,isDisabled:c,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=t,p=_t();e=Se(e);let h=P=>{if(P.pointerType==="keyboard"&&un(P))r.toggleSelection(n);else{if(r.selectionMode==="none")return;if(r.isLink(n)){if(f==="selection"&&o.current){let R=r.getItemProps(n);p.open(o.current,P,R.href,R.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(f==="override"||f==="none")return}r.selectionMode==="single"?r.isSelected(n)&&!r.disallowEmptySelection?r.toggleSelection(n):r.replaceSelection(n):P&&P.shiftKey?r.extendSelection(n):r.selectionBehavior==="toggle"||P&&(vt(P)||P.pointerType==="touch"||P.pointerType==="virtual")?r.toggleSelection(n):r.replaceSelection(n)}};a.useEffect(()=>{n===r.focusedKey&&r.isFocused&&(l?qn(o.current):s?s():ie()!==o.current&&o.current&&st(o.current))},[o,n,r.focusedKey,r.childFocusStrategy,r.isFocused,l]),c=c||r.isDisabled(n);let m={};!l&&!c?m={tabIndex:n===r.focusedKey?0:-1,onFocus(P){A(P)===o.current&&r.setFocusedKey(n)}}:c&&(m.onMouseDown=P=>{P.preventDefault()}),a.useEffect(()=>{c&&r.focusedKey===n&&r.setFocusedKey(null)},[r,c,n]);let x=r.isLink(n)&&f==="override",g=u&&t.UNSTABLE_itemBehavior==="action",w=r.isLink(n)&&f!=="selection"&&f!=="none",v=!c&&r.canSelectItem(n)&&!x&&!g,S=(u||w)&&!c,k=S&&(r.selectionBehavior==="replace"?!v:!v||r.isEmpty),V=S&&v&&r.selectionBehavior==="replace",I=k||V,L=a.useRef(null),C=I&&v,K=a.useRef(!1),W=a.useRef(!1),z=r.getItemProps(n),j=P=>{u&&(u(),o.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),w&&o.current&&p.open(o.current,P,z.href,z.routerOptions)},U={ref:o};i?(U.onPressStart=P=>{L.current=P.pointerType,K.current=C,P.pointerType==="keyboard"&&(!I||Ei(P.key))&&h(P)},d?(U.onPressUp=k?void 0:P=>{P.pointerType==="mouse"&&v&&h(P)},U.onPress=k?j:P=>{P.pointerType!=="keyboard"&&P.pointerType!=="mouse"&&v&&h(P)}):U.onPress=P=>{if(k||V&&P.pointerType!=="mouse"){if(P.pointerType==="keyboard"&&!wi(P.key))return;j(P)}else P.pointerType!=="keyboard"&&v&&h(P)}):(U.onPressStart=P=>{L.current=P.pointerType,K.current=C,W.current=k,v&&(P.pointerType==="mouse"&&!k||P.pointerType==="keyboard"&&(!S||Ei(P.key)))&&h(P)},U.onPress=P=>{(P.pointerType==="touch"||P.pointerType==="pen"||P.pointerType==="virtual"||P.pointerType==="keyboard"&&I&&wi(P.key)||P.pointerType==="mouse"&&W.current)&&(I?j(P):v&&h(P))});let y=Qu(r.collection);if(m["data-collection"]=y,m["data-key"]=n,U.preventFocusOnPress=l,l&&(U=ee(U,{onPressStart(P){P.pointerType!=="touch"&&(r.setFocused(!0),r.setFocusedKey(n))},onPress(P){P.pointerType==="touch"&&(r.setFocused(!0),r.setFocusedKey(n))}})),z)for(let P of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])z[P]&&(U[P]=He(U[P],z[P]));let{pressProps:T,isPressed:G}=tr(U),N=V?P=>{L.current==="mouse"&&(P.stopPropagation(),P.preventDefault(),j(P))}:void 0,{longPressProps:Y}=fn({isDisabled:!C,onLongPress(P){P.pointerType==="touch"&&(h(P),r.setSelectionBehavior("toggle"))}}),E=P=>{L.current==="touch"&&K.current&&P.preventDefault()},$=f!=="none"&&r.isLink(n)?P=>{Me.isOpening||P.preventDefault()}:void 0,H=ee(m,v||k||l&&!c?T:{},C?Y:{},{onDoubleClick:N,onDragStartCapture:E,onClick:$,id:e},l?{onMouseDown:P=>P.preventDefault()}:void 0),ae=P=>{let R=P;for(;R&&R!==o.current;){let oe=R.getAttribute("data-collection");if(oe!=null)return oe!==y;R=R.parentElement}return Lr(P)},pe=H.onPointerDown;H.onPointerDown=P=>{let R=A(P);if(R&&R!==o.current&&ae(R)){P.stopPropagation();return}pe?.(P)};let ne=H.onMouseDown;return H.onMouseDown=P=>{let R=A(P);if(R&&R!==o.current&&ae(R)){P.stopPropagation();return}ne?.(P)},{itemProps:H,isPressed:G,isSelected:r.isSelected(n),isFocused:r.isFocused&&r.focusedKey===n,isDisabled:c,allowsSelection:v,hasAction:I}}function wi(t){return t==="Enter"}function Ei(t){return t===" "}function $i(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function ld(t){return sd(t)}function sd(t,e){for(let r of t)return r}function pn(t,e,r){if(e.parentKey===r.parentKey)return e.index-r.index;let n=[...Si(t,e),e],o=[...Si(t,r),r],i=n.slice(0,o.length).findIndex((l,s)=>l!==o[s]);return i!==-1?(e=n[i],r=o[i],e.index-r.index):n.findIndex(l=>l===r)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function Si(t,e){let r=[],n=e;for(;n?.parentKey!=null;)n=t.getItem(n.parentKey),n&&r.unshift(n);return r}const Ci=new WeakMap;function ad(t){let e=Ci.get(t);if(e!=null)return e;let r=0,n=o=>{for(let i of o)i.type==="section"?n($i(i,t)):i.type==="item"&&r++};return n(t),Ci.set(t,r),r}class ki{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let s of l.childNodes)r(s)};for(let l of e)r(l);let n=null,o=0,i=0;for(let[l,s]of this.keyMap)n?(n.nextKey=l,s.prevKey=n.key):(this.firstKey=l,s.prevKey=void 0),s.type==="item"&&(s.index=o++),(s.type==="section"||s.type==="item")&&i++,n=s,n.nextKey=void 0;this._size=i,this.lastKey=n?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);return r?r.prevKey??null:null}getKeyAfter(e){let r=this.keyMap.get(e);return r?r.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}}class $e extends Set{constructor(e,r,n){super(e),e instanceof $e?(this.anchorKey=r??e.anchorKey,this.currentKey=n??e.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}function cd(t,e){if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}function hn(t){let{selectionMode:e="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=t,l=a.useRef(!1),[,s]=a.useState(!1),c=a.useRef(null),u=a.useRef(null),[,d]=a.useState(null),f=a.useMemo(()=>Pi(t.selectedKeys),[t.selectedKeys]),p=a.useMemo(()=>Pi(t.defaultSelectedKeys,new $e),[t.defaultSelectedKeys]),[h,m]=Gt(f,p,t.onSelectionChange),x=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[g,w]=a.useState(o);o==="replace"&&g==="toggle"&&typeof h=="object"&&h.size===0&&w("replace");let v=a.useRef(o);return a.useEffect(()=>{o!==v.current&&(w(o),v.current=o)},[o]),{selectionMode:e,disallowEmptySelection:r,selectionBehavior:g,setSelectionBehavior:w,get isFocused(){return l.current},setFocused(S){l.current=S,s(S)},get focusedKey(){return c.current},get childFocusStrategy(){return u.current},setFocusedKey(S,k="first"){c.current=S,u.current=k,d(S)},selectedKeys:h,setSelectedKeys(S){(n||!cd(S,h))&&m(S)},disabledKeys:x,disabledBehavior:i}}function Pi(t,e){return t?t==="all"?"all":new $e(t):e}class Ct{constructor(e,r,n){this.collection=e,this.state=r,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,r){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,r)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let r=this.getKey(e);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),r=this.state.selectedKeys;return this._isSelectAll=e.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&pn(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&pn(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new $e([r],r,r);else{let o=this.state.selectedKeys,i=o.anchorKey??r;n=new $e(o,i,r);for(let l of this.getKeyRange(i,o.currentKey??r))n.delete(l);for(let l of this.getKeyRange(r,i))this.canSelectItem(l)&&n.add(l)}this.state.setSelectedKeys(n)}getKeyRange(e,r){let n=this.collection.getItem(e),o=this.collection.getItem(r);return n&&o?pn(this.collection,n,o)<=0?this.getKeyRangeInternal(e,r):this.getKeyRangeInternal(r,e):[]}getKeyRangeInternal(e,r){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,r);let n=[],o=e;for(;o!=null;){let i=this.collection.getItem(o);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&n.push(o),o===r)return n;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let r=this.collection.getItem(e);if(!r||r.type==="cell"&&this.allowsCellSelection)return e;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n=new $e(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none")return;let r=this.getKey(e);if(r==null)return;let n=this.canSelectItem(r)?new $e([r],r,r):new $e;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let r=new $e;for(let n of e){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let e=this.fullCollection??this.collection,r=[],n=o=>{for(;o!=null;){if(this.canSelectItemIn(o,e)){let i=e.getItem(o);i?.type==="item"&&r.push(o),i?.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(ld($i(i,e))?.key??null)}o=e.getKeyAfter(o)}};return n(e.getFirstKey()),r}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new $e)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;for(let n of r)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,r){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=r.getItem(e);return!(!n||n?.props?.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){let r=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!r?.props?.isDisabled)&&r?.props?.disabledBehavior!=="selection"}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(e){return new Ct(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class ud{build(e,r){return this.context=r,Ti(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:r,items:n}=e;if(a.isValidElement(r)&&r.type===a.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:r}),o++}else{let o=[];a.Children.forEach(r,l=>{l&&o.push(l)});let i=0;for(let l of o){let s=this.getFullNode({element:l,index:i},{});for(let c of s)i++,yield c}}}getKey(e,r,n,o){if(e.key!=null)return e.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){let l=i.key??i.id;if(l==null)throw new Error("No key found for item");return l}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(e,r){return{renderer:r.renderer||e.renderer}}*getFullNode(e,r,n,o){if(a.isValidElement(e.element)&&e.element.type===a.Fragment){let c=[];a.Children.forEach(e.element.props.children,d=>{c.push(d)});let u=e.index??0;for(const d of c)yield*this.getFullNode({element:d,index:u++},r,n,o);return}let i=e.element;if(!i&&e.value&&r&&r.renderer){let c=this.cache.get(e.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=e.index,c.parentKey=o?o.key:null,yield c;return}i=r.renderer(e.value)}if(a.isValidElement(i)){let c=i.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let p=i.type;throw new Error(`Unknown element <${p}> in collection.`)}let u=c.getCollectionNode(i.props,this.context),d=e.index??0,f=u.next();for(;!f.done&&f.value;){let p=f.value;e.index=d;let h=p.key??null;h==null&&(h=p.element?null:this.getKey(i,e,r,n));let x=[...this.getFullNode({...p,key:h,index:d,wrapper:dd(e.wrapper,p.wrapper)},this.getChildState(r,p),n?`${n}${i.key}`:i.key,o)];for(let g of x){if(g.value=p.value??e.value??null,g.value&&this.cache.set(g.value,g),e.type&&g.type!==e.type)throw new Error(`Unsupported type <${gn(g.type)}> in <${gn(o?.type??"unknown parent type")}>. Only <${gn(e.type)}> is supported.`);d++,yield g}f=u.next(x)}return}if(e.key==null||e.type==null)return;let l=this,s={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:e.value??null,level:(o?.level??0)+(o?.type==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Ti(function*(){if(!e.hasChildNodes||!e.childNodes)return;let c=0;for(let u of e.childNodes()){u.key!=null&&(u.key=`${s.key}${u.key}`);let d=l.getFullNode({...u,index:c},l.getChildState(r,u),s.key,s);for(let f of d)c++,yield f}})};yield s}constructor(){this.cache=new WeakMap}}function Ti(t){let e=[],r=null;return{*[Symbol.iterator](){for(let n of e)yield n;r||(r=t());for(let n of r)e.push(n),yield n}}}function dd(t,e){if(t&&e)return r=>t(e(r));if(t)return t;if(e)return e}function gn(t){return t[0].toUpperCase()+t.slice(1)}function Ni(t,e,r){let n=a.useMemo(()=>new ud,[]),{children:o,items:i,collection:l}=t;return a.useMemo(()=>{if(l)return l;let c=n.build({children:o,items:i},r);return e(c)},[n,o,i,l,r,e])}function fd(t){let{filter:e,layoutDelegate:r}=t,n=hn(t),o=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=a.useCallback(u=>e?new ki(e(u)):new ki(u),[e]),l=a.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),s=Ni(t,i,l),c=a.useMemo(()=>new Ct(s,n,{layoutDelegate:r}),[s,n,r]);return pd(s,c),{collection:s,disabledKeys:o,selectionManager:c}}function pd(t,e){const r=a.useRef(null);a.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&r.current){let n=r.current.getKeyAfter(e.focusedKey),o=null;for(;n!=null;){let i=t.getItem(n);if(i&&i.type==="item"&&!e.isDisabled(n)){o=n;break}n=r.current.getKeyAfter(n)}if(o==null)for(n=r.current.getKeyBefore(e.focusedKey);n!=null;){let i=t.getItem(n);if(i&&i.type==="item"&&!e.isDisabled(n)){o=n;break}n=r.current.getKeyBefore(n)}e.setFocusedKey(o)}r.current=t},[t,e])}const hd=a.createContext({placement:"bottom"}),gd=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Ki(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let kt=new WeakMap,he=[];function bd(t,e){let r=fe(t?.[0]),n=e instanceof r.Element?{root:e}:e,o=n?.root??document.body,i=n?.shouldUseInert&&gd,l=new Set(t),s=new Set,c=g=>i&&g instanceof r.HTMLElement?g.inert:g.getAttribute("aria-hidden")==="true",u=(g,w)=>{i&&g instanceof r.HTMLElement?g.inert=w:w?g.setAttribute("aria-hidden","true"):(g.removeAttribute("aria-hidden"),g instanceof r.HTMLElement&&(g.inert=!1))},d=new Set;if(ke()){let g=o.getRootNode();for(let w of t){let v=w.getRootNode();for(;Tr(v)&&v!==g;)d.add(v),v=v.host.getRootNode()}}let f=g=>{for(let k of g.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(k);let w=k=>{if(s.has(k)||l.has(k)||k.parentElement&&s.has(k.parentElement)&&k.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let V of l)if(q(k,V))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},v=ai(J(g),g,NodeFilter.SHOW_ELEMENT,{acceptNode:w}),S=w(g);if(S===NodeFilter.FILTER_ACCEPT&&p(g),S!==NodeFilter.FILTER_REJECT){let k=v.nextNode();for(;k!=null;)p(k),k=v.nextNode()}},p=g=>{let w=kt.get(g)??0;c(g)&&w===0||(w===0&&u(g,!0),s.add(g),kt.set(g,w+1))};he.length&&he[he.length-1].disconnect(),f(o);let h=new MutationObserver(g=>{for(let w of g)if(w.type==="childList"){if(w.target.isConnected&&![...l,...s].some(v=>q(v,w.target)))for(let v of w.addedNodes)(v instanceof HTMLElement||v instanceof SVGElement)&&Ki(v)?l.add(v):v instanceof Element&&f(v);if(ke()){for(let v of d)if(!v.isConnected){h.disconnect();break}}}});h.observe(o,{childList:!0,subtree:!0});let m=new Set;if(ke())for(let g of d){let w=new MutationObserver(v=>{for(let S of v)if(S.type==="childList"){if(S.target.isConnected&&![...l,...s].some(k=>q(k,S.target)))for(let k of S.addedNodes)(k instanceof HTMLElement||k instanceof SVGElement)&&Ki(k)?l.add(k):k instanceof Element&&f(k);if(ke()){for(let k of d)if(!k.isConnected){h.disconnect();break}}}});w.observe(g,{childList:!0,subtree:!0}),m.add(w)}let x={visibleNodes:l,hiddenNodes:s,observe(){h.observe(o,{childList:!0,subtree:!0})},disconnect(){h.disconnect()}};return he.push(x),()=>{if(h.disconnect(),ke())for(let g of m)g.disconnect();for(let g of s){let w=kt.get(g);w!=null&&(w===1?(u(g,!1),kt.delete(g)):kt.set(g,w-1))}x===he[he.length-1]?(he.pop(),he.length&&he[he.length-1].observe()):he.splice(he.indexOf(x),1)}}function md(t){let e=he[he.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const ve={top:"top",bottom:"top",left:"left",right:"left"},ar={top:"bottom",bottom:"top",left:"right",right:"left"},yd={top:"left",left:"top"},bn={top:"height",left:"width"},Li={width:"totalWidth",height:"totalHeight"},cr={};let xd=()=>typeof document<"u"?window.visualViewport:null;function Mi(t,e){let r=0,n=0,o=0,i=0,l=0,s=0,c={},u=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let d=document.documentElement;o=d.clientWidth,i=d.clientHeight,r=e?.width??o,n=e?.height??i,c.top=d.scrollTop||t.scrollTop,c.left=d.scrollLeft||t.scrollLeft,e&&(l=e.offsetTop,s=e.offsetLeft)}else({width:r,height:n,top:l,left:s}=Pt(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,o=r,i=n;return Fe()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u&&(c.top=0,c.left=0,l=e?.pageTop??0,s=e?.pageLeft??0),{width:r,height:n,totalWidth:o,totalHeight:i,scroll:c,top:l,left:s}}function vd(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Di(t,e,r,n,o,i,l){let s=o.scroll[t]??0,c=n[bn[t]],u=l[t]+n.scroll[ve[t]]+i,d=l[t]+n.scroll[ve[t]]+c-i,f=e-s+n.scroll[ve[t]]+l[t]-n[ve[t]],p=e-s+r+n.scroll[ve[t]]+l[t]-n[ve[t]];return f<u?u-f:p>d?Math.max(d-p,u-f):0}function wd(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function Ii(t){if(cr[t])return cr[t];let[e,r]=t.split(" "),n=ve[e]||"right",o=yd[n];ve[r]||(r="center");let i=bn[n],l=bn[o];return cr[t]={placement:e,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:l},cr[t]}function mn(t,e,r,n,o,i,l,s,c,u,d){let{placement:f,crossPlacement:p,axis:h,crossAxis:m,size:x,crossSize:g}=n,w={};w[m]=t[m]??0,p==="center"?w[m]+=((t[g]??0)-(r[g]??0))/2:p!==m&&(w[m]+=(t[g]??0)-(r[g]??0)),w[m]+=i;const v=t[m]-r[g]+c+u,S=t[m]+t[g]-c-u;if(w[m]=rn(w[m],v,S),f===h){let k=s?d[x]:d[Li[x]];w[ar[h]]=Math.floor(k-t[h]+o)}else w[h]=Math.floor(t[h]+t[x]+o);return w}function Ed(t,e,r,n,o,i,l,s,c,u,d){let f=(t.top!=null?t.top:c[Li.height]-(t.bottom??0)-l)-(c.scroll.top??0),p=u?r.top:0,h={top:Math.max(e.top+p,(d?.offsetTop??e.top)+p),bottom:Math.min(e.top+e.height+p,(d?.offsetTop??0)+(d?.height??0))};return s!=="top"?Math.max(0,h.bottom-f-((o.top??0)+(o.bottom??0)+i)):Math.max(0,f+l-h.top-((o.top??0)+(o.bottom??0)+i))}function Ai(t,e,r,n,o,i,l,s){let{placement:c,axis:u,size:d}=i;return c===u?Math.max(0,r[u]-(l.scroll[u]??0)-(t[u]+(s?e[u]:0))-(n[u]??0)-n[ar[u]]-o):Math.max(0,t[d]+t[u]+(s?e[u]:0)-r[u]-r[d]+(l.scroll[u]??0)-(n[u]??0)-n[ar[u]]-o)}function $d(t,e,r,n,o,i,l,s,c,u,d,f,p,h,m,x,g,w){let v=Ii(t),{size:S,crossAxis:k,crossSize:V,placement:I,crossPlacement:L}=v,C=mn(e,s,r,v,d,f,u,p,m,x,c),K=d,W=Ai(s,u,e,o,i+d,v,c,g);if(l&&r[S]>W){let P=Ii(`${ar[I]} ${L}`),R=mn(e,s,r,P,d,f,u,p,m,x,c);Ai(s,u,e,o,i+d,P,c,g)>W&&(v=P,C=R,K=d)}let z="bottom";v.axis==="top"?v.placement==="top"?z="top":v.placement==="bottom"&&(z="bottom"):v.crossAxis==="top"&&(v.crossPlacement==="top"?z="bottom":v.crossPlacement==="bottom"&&(z="top"));let j=Di(k,C[k],r[V],s,c,i,u);C[k]+=j;let U=Ed(C,s,u,p,o,i,r.height,z,c,g,w);h&&h<U&&(U=h),r.height=Math.min(r.height,U),C=mn(e,s,r,v,K,f,u,p,m,x,c),j=Di(k,C[k],r[V],s,c,i,u),C[k]+=j;let y={},T=e[k]-C[k]-o[ve[k]],G=T+.5*e[V];const N=m/2+x,Y=ve[k]==="left"?(o.left??0)+(o.right??0):(o.top??0)+(o.bottom??0),E=r[V]-Y-m/2-x,$=e[k]+m/2-(C[k]+o[ve[k]]),H=e[k]+e[V]-m/2-(C[k]+o[ve[k]]),ae=rn(G,$,H);y[k]=rn(ae,N,E),{placement:I,crossPlacement:L}=v,m?T=y[k]:L==="right"?T+=e[V]:L==="center"&&(T+=e[V]/2);let pe=I==="left"||I==="top"?r[S]:0,ne={x:I==="top"||I==="bottom"?T:pe,y:I==="left"||I==="right"?T:pe};return{position:C,maxHeight:U,arrowOffsetLeft:y.left,arrowOffsetTop:y.top,placement:I,triggerAnchorPoint:ne}}function Sd(t){let{placement:e,targetNode:r,overlayNode:n,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:s,offset:c,crossOffset:u,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:p=0,targetRect:h}=t,m=xd(),x=n instanceof HTMLElement?Cd(n):document.documentElement,g=x===document.documentElement;const w=window.getComputedStyle(x).position;let v=!!w&&w!=="static",S=g?Pt(r,!1,h):Fi(r,x,!1,h);if(!g){let{marginTop:z,marginLeft:j}=window.getComputedStyle(r);S.top+=parseInt(z,10)||0,S.left+=parseInt(j,10)||0}let k=Pt(n,!0),V=wd(n);k.width+=(V.left??0)+(V.right??0),k.height+=(V.top??0)+(V.bottom??0);let I=vd(o),L=Mi(s,m),C=Mi(x,m),K;if((s.tagName==="BODY"||s.tagName==="HTML")&&!g){let z=ur(x,!1);K={top:-(z.top-L.top),left:-(z.left-L.left),width:0,height:0}}else(s.tagName==="BODY"||s.tagName==="HTML")&&g?K={top:0,left:0,width:0,height:0}:K=Fi(s,x,!1);let W=q(s,x);return $d(e,S,k,I,V,i,l,L,C,K,c,u,v,d,f,p,W,m)}function ur(t,e){let{top:r,left:n,width:o,height:i}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(o=t.offsetWidth,i=t.offsetHeight),{top:r,left:n,width:o,height:i}}function Pt(t,e,r){let{top:n,left:o,width:i,height:l}=r||ur(t,e),{scrollTop:s,scrollLeft:c,clientTop:u,clientLeft:d}=document.documentElement;return{top:n+s-u,left:o+c-d,width:i,height:l}}function Fi(t,e,r,n){let o=window.getComputedStyle(t),i;if(o.position==="fixed")i=n||ur(t,r);else{i=Pt(t,r,n);let l=Pt(e,r),s=window.getComputedStyle(e);l.top+=(parseInt(s.borderTopWidth,10)||0)-e.scrollTop,l.left+=(parseInt(s.borderLeftWidth,10)||0)-e.scrollLeft,i.top-=l.top,i.left-=l.left}return i.top-=parseInt(o.marginTop,10)||0,i.left-=parseInt(o.marginLeft,10)||0,i}function Cd(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Oi(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Oi(e);)e=e.parentElement;return e||document.documentElement}function Oi(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const Bi=new WeakMap;function kd(t){let{triggerRef:e,isOpen:r,onClose:n}=t;a.useEffect(()=>{if(!r||n===null)return;let o=i=>{let l=A(i);if(!e.current||l instanceof Node&&!q(l,e.current)||l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)return;let s=n||Bi.get(e.current);s&&s()};return Ya(Za(e.current),"scroll",o,!0)},[r,n,e])}function Pd(){return typeof window.ResizeObserver<"u"}function yn(t){const{ref:e,box:r,onResize:n}=t;let o=Ge(n);a.useEffect(()=>{let i=e?.current;if(i)if(Pd()){const l=new window.ResizeObserver(s=>{s.length&&o()});return l.observe(i,{box:r}),()=>{i&&l.unobserve(i)}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)}},[e,r])}let Ze=typeof document<"u"?window.visualViewport:null;function Td(t){let{direction:e}=it(),{arrowSize:r,targetRef:n,overlayRef:o,arrowRef:i,scrollRef:l=o,placement:s="bottom",containerPadding:c=12,shouldFlip:u=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:f=0,crossOffset:p=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:x,maxHeight:g,arrowBoundaryOffset:w=0,getTargetRect:v}=t,[S,k]=a.useState(null),V=[h,s,o.current,n.current,i?.current,l.current,c,u,d,f,p,m,e,g,w,r],I=a.useRef(Ze?.scale);a.useEffect(()=>{m&&(I.current=Ze?.scale)},[m]);let L=a.useCallback(()=>{if(h===!1||!m||!o.current||!n.current||!d||Ze?.scale!==I.current)return;let W=null;if(l.current&&At(l.current)){let y=ie()?.getBoundingClientRect(),T=l.current.getBoundingClientRect();W={type:"top",offset:(y?.top??0)-T.top},W.offset>T.height/2&&(W.type="bottom",W.offset=(y?.bottom??0)-T.bottom)}let z=o.current;!g&&o.current&&(z.style.top="0px",z.style.bottom="",z.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let j=Sd({placement:Kd(s,e),overlayNode:o.current,targetNode:n.current,scrollNode:l.current||o.current,padding:c,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:p,maxHeight:g,arrowSize:r??(i?.current?ur(i.current,!0).width:0),arrowBoundaryOffset:w,targetRect:v?.(n.current)});if(!j.position)return;z.style.top="",z.style.bottom="",z.style.left="",z.style.right="",Object.keys(j.position).forEach(y=>z.style[y]=j.position[y]+"px"),z.style.maxHeight=j.maxHeight!=null?j.maxHeight+"px":"";let U=ie();if(W&&U&&l.current){let y=U.getBoundingClientRect(),T=l.current.getBoundingClientRect(),G=y[W.type]-T[W.type];l.current.scrollTop+=G-W.offset}k(j)},V);Q(L,V),Nd(L),yn({ref:o,onResize:L}),yn({ref:n,onResize:L});let C=a.useRef(!1);Q(()=>{let W,z=()=>{C.current=!0,clearTimeout(W),W=setTimeout(()=>{C.current=!1},500),L()},j=()=>{C.current&&z()};return Ze?.addEventListener("resize",z),Ze?.addEventListener("scroll",j),()=>{Ze?.removeEventListener("resize",z),Ze?.removeEventListener("scroll",j)}},[L]);let K=a.useCallback(()=>{C.current||x?.()},[x,C]);return kd({triggerRef:n,isOpen:m,onClose:x&&K}),{overlayProps:{style:{position:S?"absolute":"fixed",top:S?void 0:0,left:S?void 0:0,zIndex:1e5,...S?.position,maxHeight:S?.maxHeight??"100vh"}},placement:S?.placement??null,triggerAnchorPoint:S?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:S?.arrowOffsetLeft,top:S?.arrowOffsetTop}},updatePosition:L}}function Nd(t){Q(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Kd(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}function Ld(t){let{ref:e,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=t,i=a.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Ge(c=>{r&&dr(c,e)&&(o&&o(c),i.current.isPointerDown=!0)}),s=Ge(c=>{r&&r(c)});a.useEffect(()=>{let c=i.current;if(n)return;const u=e.current,d=J(u);if(typeof PointerEvent<"u"){let f=p=>{c.isPointerDown&&dr(p,e)&&s(p),c.isPointerDown=!1};return d.addEventListener("pointerdown",l,!0),d.addEventListener("click",f,!0),()=>{d.removeEventListener("pointerdown",l,!0),d.removeEventListener("click",f,!0)}}else if(process.env.NODE_ENV==="test"){let f=h=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&dr(h,e)&&s(h),c.isPointerDown=!1},p=h=>{c.ignoreEmulatedMouseEvents=!0,c.isPointerDown&&dr(h,e)&&s(h),c.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",p,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",p,!0)}}},[e,n])}function dr(t,e){if(t.button>0)return!1;let r=A(t);if(r){const n=r.ownerDocument;if(!n||!q(n.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const Te=[];function Md(t,e){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:s}=t,c=a.useRef(void 0);a.useEffect(()=>{if(o&&!Te.includes(e))return Te.push(e),()=>{let m=Te.indexOf(e);m>=0&&Te.splice(m,1)}},[o,e]);let u=()=>{Te[Te.length-1]===e&&r&&r()},d=m=>{const x=Te[Te.length-1];c.current=x,(!s||s(A(m)))&&x===e&&m.stopPropagation()},f=m=>{(!s||s(A(m)))&&(Te[Te.length-1]===e&&m.stopPropagation(),c.current===e&&u()),c.current=void 0},{keyboardProps:p}=at({shortcuts:{Escape:()=>{if(!l){u();return}return!1}}});Ld({ref:e,onInteractOutside:i&&o?f:void 0,onInteractOutsideStart:d});let{focusWithinProps:h}=rr({isDisabled:!n,onBlurWithin:m=>{!m.relatedTarget||qu(m.relatedTarget)||(!s||s(m.relatedTarget))&&r?.()}});return{overlayProps:{...p,...h},underlayProps:{}}}const Tt=typeof document<"u"&&window.visualViewport;let fr=0,xn;function Dd(t={}){let{isDisabled:e}=t;Q(()=>{if(!e)return fr++,fr===1&&(We()&&Fe()?xn=Ad():xn=Id()),()=>{fr--,fr===0&&xn()}},[e])}function Id(){let t=window.innerWidth-document.documentElement.clientWidth;return He(t>0&&("scrollbarGutter"in document.documentElement.style?pr(document.documentElement,"scrollbarGutter","stable"):pr(document.documentElement,"paddingRight",`${t}px`)),pr(document.documentElement,"overflow","hidden"))}function Ad(){let t=pr(document.documentElement,"overflow","hidden"),e,r=!1,n=d=>{let f=A(d);e=dt(f)?f:ri(f,!0),r=!1;let p=f.ownerDocument.defaultView.getSelection();p&&!p.isCollapsed&&p.containsNode(f,!0)&&(r=!0),d.composedPath().some(h=>h instanceof HTMLInputElement&&h.type==="range")&&(r=!0),"selectionStart"in f&&"selectionEnd"in f&&f.selectionStart<f.selectionEnd&&f.ownerDocument.activeElement===f&&(r=!0)},o=document.createElement("style"),i=jo();i&&(o.nonce=i),o.textContent=`
7
+ `.trim(),y.head.prepend(T)},[p]),a.useEffect(()=>{let y=g.current;return()=>{f||Xr(y.target??void 0);for(let T of y.disposables)T();y.disposables=[]}},[f]),{isPressed:c||m,pressProps:ee(h,U,{[Ro]:!0})}}function Jr(t){return t.tagName==="A"&&t.hasAttribute("href")}function Qr(t,e){const{key:r,code:n}=t,o=e,i=o.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(o instanceof fe(o).HTMLInputElement&&!Zo(o,r)||o instanceof fe(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&Jr(o))&&r!=="Enter")}function $u(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function qo(t,e){const r=t.changedTouches;for(let n=0;n<r.length;n++){const o=r[n];if(o.identifier===e)return o}return null}function Be(t,e){let r=0,n=0;return e.targetTouches&&e.targetTouches.length===1&&(r=e.targetTouches[0].clientX,n=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n}}function qe(t,e){let r=e.clientX,n=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n,key:e.key}}function Su(t){let e=0,r=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?r=t.height/2:t.radiusY!==void 0&&(r=t.radiusY),{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function Cu(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Yo(t,e){let r=e.getBoundingClientRect(),n=Su(t);return Cu(r,n)}function ku(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!Jr(t)}function Xo(t,e){return be()&&e==="Enter"?!1:t instanceof HTMLInputElement?e==="Enter"&&(t.type==="checkbox"||t.type==="radio")?!1:!Zo(t,e):ku(t)}const Pu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Zo(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Pu.has(t.type)}function rr(t){let{isDisabled:e,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=t,i=a.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=Qt(),c=a.useCallback(f=>{q(f.currentTarget,A(f))&&i.current.isFocusWithin&&!q(f.currentTarget,f.relatedTarget)&&(i.current.isFocusWithin=!1,s(),r&&r(f),o&&o(!1))},[r,o,i,s]),u=Qn(c),d=a.useCallback(f=>{if(!q(f.currentTarget,A(f)))return;let p=A(f);const h=J(p),m=ie(h);if(!i.current.isFocusWithin&&m===p){n&&n(f),o&&o(!0),i.current.isFocusWithin=!0,u(f);let v=f.currentTarget;l(h,"focus",g=>{let w=A(g);if(i.current.isFocusWithin&&!q(v,w)){let x=new h.defaultView.FocusEvent("blur",{relatedTarget:w});Jn(x,v);let S=Mr(x);c(S)}},{capture:!0})}},[n,o,u,l,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}function en(t={}){let{autoFocus:e=!1,isTextInput:r,within:n}=t,o=a.useRef({isFocused:!1,isFocusVisible:e||yt()}),[i,l]=a.useState(!1),[s,c]=a.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=a.useCallback(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=a.useCallback(h=>{o.current.isFocused=h,o.current.isFocusVisible=yt(),l(h),u()},[u]);wc(h=>{o.current.isFocusVisible=h,u()},[r,i],{enabled:i,isTextInput:r});let{focusProps:f}=Po({isDisabled:n,onFocusChange:d}),{focusWithinProps:p}=rr({isDisabled:!n,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:s,focusProps:n?p:f}}let nr=!1,or=0;function tn(){nr=!0,setTimeout(()=>{nr=!1},500)}function Jo(t){t.pointerType==="touch"&&tn()}function Tu(){let t=J(null);if(!(typeof t>"u"))return or===0&&(typeof PointerEvent<"u"?t.addEventListener("pointerup",Jo):process.env.NODE_ENV==="test"&&t.addEventListener("touchend",tn)),or++,()=>{or--,!(or>0)&&(typeof PointerEvent<"u"?t.removeEventListener("pointerup",Jo):process.env.NODE_ENV==="test"&&t.removeEventListener("touchend",tn))}}function ir(t){let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,isDisabled:o}=t,[i,l]=a.useState(!1),s=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(Tu,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=Qt(),{hoverProps:d,triggerHoverEnd:f}=a.useMemo(()=>{let p=(v,g)=>{if(s.pointerType=g,o||g==="touch"||s.isHovered||!q(v.currentTarget,A(v)))return;s.isHovered=!0;let w=v.currentTarget;s.target=w,c(J(A(v)),"pointerover",x=>{s.isHovered&&s.target&&!q(s.target,A(x))&&h(x,x.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:w,pointerType:g}),r&&r(!0),l(!0)},h=(v,g)=>{let w=s.target;s.pointerType="",s.target=null,!(g==="touch"||!s.isHovered||!w)&&(s.isHovered=!1,u(),n&&n({type:"hoverend",target:w,pointerType:g}),r&&r(!1),l(!1))},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=v=>{nr&&v.pointerType==="mouse"||p(v,v.pointerType)},m.onPointerLeave=v=>{!o&&q(v.currentTarget,A(v))&&h(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(m.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!nr&&p(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=v=>{!o&&q(v.currentTarget,A(v))&&h(v,"mouse")}),{hoverProps:m,triggerHoverEnd:h}},[e,r,n,o,s,c,u]);return a.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:d,isHovered:i}}function rn(t,e=-1/0,r=1/0){return Math.min(Math.max(t,e),r)}const Nu=a.createContext(null),Qo=7e3;let ut=null;function ei(t,e="assertive",r=Qo){ut?ut.announce(t,e,r):(ut=new Ku,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?ut.announce(t,e,r):setTimeout(()=>{ut?.isAttached()&&ut?.announce(t,e,r)},100))}class Ku{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let r=document.createElement("div");return r.setAttribute("role","log"),r.setAttribute("aria-live",e),r.setAttribute("aria-relevant","additions"),r}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,r="assertive",n=Qo){if(!this.node)return;let o=document.createElement("div");typeof e=="object"?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,r==="assertive"?this.assertiveLog?.appendChild(o):this.politeLog?.appendChild(o),e!==""&&setTimeout(()=>{o.remove()},n)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function Lu(t,e){let{elementType:r="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:s,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:f,href:p,target:h,rel:m,type:v="button"}=t,g;r==="button"?g={type:v,disabled:n,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:g={role:"button",href:r==="a"&&!n?p:void 0,target:r==="a"?h:void 0,type:r==="input"?v:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?m:void 0};let{pressProps:w,isPressed:x}=tr({onPressStart:i,onPressEnd:l,onPressChange:c,onPress:o,onPressUp:s,onClick:f,isDisabled:n,preventFocusOnPress:u,ref:e}),{focusableProps:S}=Ur(t,e);d&&(S.tabIndex=n?-1:S.tabIndex);let k=ee(S,w,ye(t,{labelable:!0}));return{isPressed:x,buttonProps:ee(g,k,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}const Mu=a.createContext({}),ti=tu(function(e,r){[e,r]=ot(e,r,Mu);let n=e,{isPending:o}=n,{buttonProps:i,isPressed:l}=Lu(e,r);i=Iu(i,o);let{focusProps:s,isFocused:c,isFocusVisible:u}=en(e),{hoverProps:d,isHovered:f}=ir({...e,isDisabled:e.isDisabled||o}),p={isHovered:f,isPressed:(n.isPressed||l)&&!o,isFocused:c,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:o??!1},h=Ae({...e,values:p,defaultClassName:"react-aria-Button"}),m=Se(i.id),v=Se(),g=i["aria-labelledby"];o&&(g?g=`${g} ${v}`:i["aria-label"]&&(g=`${m} ${v}`));let w=a.useRef(o);a.useEffect(()=>{let S={"aria-labelledby":g||m};(!w.current&&c&&o||w.current&&c&&!o)&&ei(S,"assertive"),w.current=o},[o,c,g,m]);let x=ye(e,{global:!0});return delete x.onClick,a.createElement(Ce.button,{...ee(x,h,i,s,d),type:i.type==="submit"&&o?"button":i.type,id:m,ref:r,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":f||void 0,"data-focused":c||void 0,"data-pending":o||void 0,"data-focus-visible":u||void 0},a.createElement(Nu.Provider,{value:{id:v}},h.children))}),Du=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function Iu(t,e){if(e){for(const r in t)r.startsWith("on")&&!Du.test(r)&&(t[r]=void 0);t.href=void 0,t.target=void 0}return t}const Au=a.createContext({});function dt(t,e){if(!t)return!1;let r=window.getComputedStyle(t),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return t===n&&r.overflow!=="hidden"&&(o=!0),o&&e&&(o=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),o}function ri(t,e){let r=t;for(dt(r,e)&&(r=r.parentElement);r&&!dt(r,e);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function nn(t,e){let r=[],n=document.scrollingElement||document.documentElement;for(;t&&(dt(t,e)&&r.push(t),t!==n);)t=t.parentElement;return r}function lr(t,e,r={}){let{block:n="nearest",inline:o="nearest"}=r;if(t===e)return;let i=t.scrollTop,l=t.scrollLeft,s=e.getBoundingClientRect(),c=t.getBoundingClientRect(),u=window.getComputedStyle(e),d=window.getComputedStyle(t),f=document.scrollingElement||document.documentElement,p=t===f,h=t===f?0:c.top,m=t===f?t.clientHeight:c.bottom,v=t===f?0:c.left,g=t===f?t.clientWidth:c.right,w=parseFloat(u.scrollMarginTop)||0,x=parseFloat(u.scrollMarginBottom)||0,S=parseFloat(u.scrollMarginLeft)||0,k=parseFloat(u.scrollMarginRight)||0,V=parseFloat(d.scrollPaddingTop)||0,I=parseFloat(d.scrollPaddingBottom)||0,L=parseFloat(d.scrollPaddingLeft)||0,C=parseFloat(d.scrollPaddingRight)||0,K=parseFloat(d.borderTopWidth)||0,W=parseFloat(d.borderBottomWidth)||0,z=parseFloat(d.borderLeftWidth)||0,j=parseFloat(d.borderRightWidth)||0,U=s.top-w,y=s.bottom+x,T=s.left-S,G=s.right+k,N=t===f?0:z+j,Y=t===f?0:K+W,E=t===f?0:t.offsetWidth-t.clientWidth-N,$=t===f?0:t.offsetHeight-t.clientHeight-Y,H=h+(p?0:K)+V,ae=m-(p?0:W)-I-$,pe=v+(p?0:z)+L,ne=g-(p?0:j)-C;We()&&Fe()||d.direction==="ltr"?ne-=E:d.direction==="rtl"&&(pe+=E);let P=U<H||y>ae,R=T<pe||G>ne;if(P&&n==="start")i+=U-H;else if(P&&n==="center")i+=(U+y)/2-(H+ae)/2;else if(P&&n==="end")i+=y-ae;else if(P&&n==="nearest"){let oe=U-H,ge=y-ae;i+=Math.abs(oe)<=Math.abs(ge)?oe:ge}if(R&&o==="start")l+=T-pe;else if(R&&o==="center")l+=(T+G)/2-(pe+ne)/2;else if(R&&o==="end")l+=G-ne;else if(R&&o==="nearest"){let oe=T-pe,ge=G-ne;l+=Math.abs(oe)<=Math.abs(ge)?oe:ge}if(process.env.NODE_ENV==="test"){t.scrollLeft=l,t.scrollTop=i;return}t.scrollTo({left:l,top:i})}function ni(t,e={}){let{containingElement:r}=e;if(t&&t.isConnected){let n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let{left:i,top:l}=t.getBoundingClientRect(),s=nn(t,!0);for(let d of s)lr(d,t);let{left:c,top:u}=t.getBoundingClientRect();if(Math.abs(i-c)>1||Math.abs(l-u)>1){s=r?nn(r,!0):[];for(let d of s)lr(d,r,{block:"center",inline:"center"});for(let d of nn(t,!0))lr(d,t)}}else{let{left:i,top:l}=t.getBoundingClientRect();t?.scrollIntoView?.({block:"nearest"});let{left:s,top:c}=t.getBoundingClientRect();(Math.abs(i-s)>1||Math.abs(l-c)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),t.scrollIntoView?.({block:"nearest"}))}}}let Fu=0;const on=new Map;function Ou(t){let[e,r]=a.useState();return Q(()=>{if(!t)return;let n=on.get(t);if(n)r(n.element.id);else{let o=`react-aria-description-${Fu++}`;r(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),n={refCount:0,element:i},on.set(t,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),on.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}const oi={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Bu(t={}){let{style:e,isFocusable:r}=t,[n,o]=a.useState(!1),{focusWithinProps:i}=rr({isDisabled:!r,onFocusWithinChange:s=>o(s)}),l=a.useMemo(()=>n?e:e?{...oi,...e}:oi,[n]);return{visuallyHiddenProps:{...i,style:l}}}function zu(t){let{children:e,elementType:r="div",isFocusable:n,style:o,...i}=t,{visuallyHiddenProps:l}=Bu(t);return a.createElement(r,ee(i,l),e)}const _u=a.createContext({}),Vu=a.createContext(null);function ii(t){let e=a.useRef({});return a.createElement(Vu.Provider,{value:e},t.children)}const li=a.createContext({isSelected:!1}),Hu=a.createContext({}),Fn=class Fn extends Re{filter(e,r){let n=r.getItem(this.prevKey);if(n&&n.type!=="separator"){let o=this.clone();return r.addDescendants(o,e),o}return null}};Fn.type="separator";let si=Fn;class Wu{constructor(e,r,n,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{if(l.nodeType===Node.ELEMENT_NODE){const s=l.shadowRoot;if(s){const c=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(l);if(this.filter?.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=r,this.filter=o??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=r,this._walkerStack.unshift(e.createTreeWalker(r,n,this._acceptNode));const i=r.shadowRoot;if(i){const l=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}get currentNode(){return this._currentNode}set currentNode(e){if(!q(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const r=[];let n=e,o=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=n,s=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});r.push(s),s.currentNode=o,this._currentSetFor.add(s),n=o=l.host}else n=n.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});r.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=r}get doc(){return this._doc}firstChild(){let e=this.currentNode,r=this.nextNode();return q(e,r)?(r&&(this.currentNode=r),r):(this.currentNode=e,null)}lastChild(){let r=this._walkerStack[0].lastChild();return r&&(this.currentNode=r),r}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let n;if(typeof this.filter=="function"?n=this.filter(e):this.filter?.acceptNode&&(n=this.filter.acceptNode(e)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let o=this.nextNode();return o&&(this.currentNode=o),o}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null;return null}const r=e.previousNode();if(r){if(r.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(r):this.filter?.acceptNode&&(o=this.filter.acceptNode(r)),o===NodeFilter.FILTER_ACCEPT)return r&&(this.currentNode=r),r;let i=this.lastChild();return i&&(this.currentNode=i),i}return r&&(this.currentNode=r),r}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function ai(t,e,r,n){return ke()?new Wu(t,e,r,n):t.createTreeWalker(e,r,n)}const ci=a.createContext(null),ln="react-aria-focus-scope-restore";let te=null;function ui(t){let{children:e,contain:r,restoreFocus:n,autoFocus:o}=t,i=a.useRef(null),l=a.useRef(null),s=a.useRef([]),{parentNode:c}=a.useContext(ci)||{},u=a.useMemo(()=>new cn({scopeRef:s}),[s]);Q(()=>{let p=c||ce.root;if(ce.getTreeNode(p.scopeRef)&&te&&!sr(te,p.scopeRef)){let h=ce.getTreeNode(te);h&&(p=h)}p.addChild(u),ce.addNode(u)},[u,c]),Q(()=>{let p=ce.getTreeNode(s);p&&(p.contain=!!r)},[r]),Q(()=>{let p=i.current?.nextSibling,h=[],m=v=>v.stopPropagation();for(;p&&p!==l.current;)h.push(p),p.addEventListener(ln,m),p=p.nextSibling;return s.current=h,()=>{for(let v of h)v.removeEventListener(ln,m)}},[e]),Xu(s,n,r),Ru(s,r),Zu(s,n,r),Yu(s,o),a.useEffect(()=>{const p=ie(J(s.current?s.current[0]:void 0));let h=null;if(ve(p,s.current)){for(let m of ce.traverse())m.scopeRef&&ve(p,m.scopeRef.current)&&(h=m);h===ce.getTreeNode(s)&&(te=h.scopeRef)}},[s]),Q(()=>()=>{let p=ce.getTreeNode(s)?.parent?.scopeRef??null;(s===te||sr(s,te))&&(!p||ce.getTreeNode(p))&&(te=p),ce.removeTreeNode(s)},[s]);let d=a.useMemo(()=>ju(s),[]),f=a.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return a.createElement(ci.Provider,{value:f},a.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),e,a.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function ju(t){return{focusNext(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:l}=e,s=n||ie(J(r[0]??void 0)),c=r[0].previousElementSibling,u=Ye(r),d=De(u,{tabbable:o,accept:l},r);d.currentNode=ve(s,r)?s:c;let f=d.nextNode();return!f&&i&&(d.currentNode=c,f=d.nextNode()),f&&Ee(f,!0),f},focusPrevious(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:l}=e,s=n||ie(J(r[0]??void 0)),c=r[r.length-1].nextElementSibling,u=Ye(r),d=De(u,{tabbable:o,accept:l},r);d.currentNode=ve(s,r)?s:c;let f=d.previousNode();return!f&&i&&(d.currentNode=c,f=d.previousNode()),f&&Ee(f,!0),f},focusFirst(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=Ye(r),l=De(i,{tabbable:n,accept:o},r);l.currentNode=r[0].previousElementSibling;let s=l.nextNode();return s&&Ee(s,!0),s},focusLast(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=Ye(r),l=De(i,{tabbable:n,accept:o},r);l.currentNode=r[r.length-1].nextElementSibling;let s=l.previousNode();return s&&Ee(s,!0),s}}}function Ye(t){return t[0].parentElement}function St(t){let e=ce.getTreeNode(te);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function Uu(t){if(!t.form)return Array.from(J(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(n=>!n.form);const e=t.form.elements.namedItem(t.name);let r=fe(t);return e instanceof r.RadioNodeList?Array.from(e).filter(n=>n instanceof r.HTMLInputElement):e instanceof r.HTMLInputElement?[e]:[]}function Gu(t){if(t.checked)return!0;const e=Uu(t);return e.length>0&&!e.some(r=>r.checked)}function Ru(t,e){let r=a.useRef(void 0),n=a.useRef(void 0);Q(()=>{let o=t.current;if(!e){n.current&&(cancelAnimationFrame(n.current),n.current=void 0);return}const i=J(o?o[0]:void 0);let l=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!St(t)||u.isComposing)return;let d=ie(i),f=t.current;if(!f||!ve(d,f))return;let p=Ye(f),h=De(p,{tabbable:!0},f);if(!d)return;h.currentNode=d;let m=u.shiftKey?h.previousNode():h.nextNode();m||(h.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,m=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),m&&(Ee(m,!0),m instanceof fe(m).HTMLInputElement&&m.select())},s=u=>{(!te||sr(te,t))&&ve(A(u),t.current)?(te=t,r.current=A(u)):St(t)&&!ze(A(u),t)?r.current?Ee(r.current):te&&te.current&&sn(te.current):St(t)&&(r.current=A(u))},c=u=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let d=vt(),f=(d==="virtual"||d===null)&&zt()&&Ir(),p=ie(i);if(!f&&p&&St(t)&&!ze(p,t)){te=t;let h=A(u);h&&h.isConnected?(r.current=h,Ee(r.current)):te.current&&sn(te.current)}})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",s,!1),o?.forEach(u=>u.addEventListener("focusin",s,!1)),o?.forEach(u=>u.addEventListener("focusout",c,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",s,!1),o?.forEach(u=>u.removeEventListener("focusin",s,!1)),o?.forEach(u=>u.removeEventListener("focusout",c,!1))}},[t,e]),Q(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n])}function di(t){return ze(t)}function ve(t,e){return!t||!e?!1:e.some(r=>q(r,t))}function ze(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of ce.traverse(ce.getTreeNode(e)))if(r&&ve(t,r.current))return!0;return!1}function qu(t){return ze(t,te)}function sr(t,e){let r=ce.getTreeNode(e)?.parent;for(;r;){if(r.scopeRef===t)return!0;r=r.parent}return!1}function Ee(t,e=!1){if(t!=null&&!e)try{st(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function fi(t,e=!0){let r=t[0].previousElementSibling,n=Ye(t),o=De(n,{tabbable:e},t);o.currentNode=r;let i=o.nextNode();return e&&!i&&(n=Ye(t),o=De(n,{tabbable:!1},t),o.currentNode=r,i=o.nextNode()),i}function sn(t,e=!0){Ee(fi(t,e))}function Yu(t,e){const r=a.useRef(e);a.useEffect(()=>{if(r.current){te=t;const n=J(t.current?t.current[0]:void 0);!ve(ie(n),te.current)&&t.current&&sn(t.current)}r.current=!1},[t])}function Xu(t,e,r){Q(()=>{if(e||r)return;let n=t.current;const o=J(n?n[0]:void 0);let i=l=>{let s=A(l);ve(s,t.current)?te=t:di(s)||(te=null)};return o.addEventListener("focusin",i,!1),n?.forEach(l=>l.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),n?.forEach(l=>l.removeEventListener("focusin",i,!1))}},[t,e,r])}function pi(t){let e=ce.getTreeNode(te);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return e?.scopeRef===t}function Zu(t,e,r){const n=a.useRef(typeof document<"u"?ie(J(t.current?t.current[0]:void 0)):null);Q(()=>{let o=t.current;const i=J(o?o[0]:void 0);if(!e||r)return;let l=()=>{(!te||sr(te,t))&&ve(ie(i),t.current)&&(te=t)};return i.addEventListener("focusin",l,!1),o?.forEach(s=>s.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),o?.forEach(s=>s.removeEventListener("focusin",l,!1))}},[t,r]),Q(()=>{const o=J(t.current?t.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!St(t)||l.isComposing)return;let s=o.activeElement;if(!ze(s,t)||!pi(t))return;let c=ce.getTreeNode(t);if(!c)return;let u=c.nodeToRestore,d=De(o.body,{tabbable:!0});d.currentNode=s;let f=l.shiftKey?d.previousNode():d.nextNode();if((!u||!u.isConnected||u===o.body)&&(u=void 0,c.nodeToRestore=void 0),(!f||!ze(f,t))&&u){d.currentNode=u;do f=l.shiftKey?d.previousNode():d.nextNode();while(ze(f,t));l.preventDefault(),l.stopPropagation(),f?Ee(f,!0):di(u)?Ee(u,!0):s.blur()}};return r||o.addEventListener("keydown",i,!0),()=>{r||o.removeEventListener("keydown",i,!0)}},[t,e,r]),Q(()=>{const o=J(t.current?t.current[0]:void 0);if(!e)return;let i=ce.getTreeNode(t);if(i)return i.nodeToRestore=n.current??void 0,()=>{let l=ce.getTreeNode(t);if(!l)return;let s=l.nodeToRestore,c=ie(o);if(e&&s&&(c&&ze(c,t)||c===o.body&&pi(t))){let u=ce.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=u.getTreeNode(t);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){hi(d.nodeToRestore);return}d=d.parent}for(d=u.getTreeNode(t);d;){if(d.scopeRef&&d.scopeRef.current&&ce.getTreeNode(d.scopeRef)){let f=fi(d.scopeRef.current,!0);hi(f);return}d=d.parent}}})}}},[t,e])}function hi(t){t.dispatchEvent(new CustomEvent(ln,{bubbles:!0,cancelable:!0}))&&Ee(t)}function De(t,e,r){let n=e?.tabbable?Lr:Xn,o=t?.nodeType===Node.ELEMENT_NODE?t:null,i=J(o),l=ai(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return q(e?.from,s)||e?.tabbable&&s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(!Gu(s)||l.currentNode.tagName==="INPUT"&&l.currentNode.type==="radio"&&l.currentNode.name===s.name)?NodeFilter.FILTER_REJECT:n(s)&&(!r||ve(s,r))&&(!e?.accept||e.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(l.currentNode=e.from),l}class an{constructor(){this.fastMap=new Map,this.root=new cn({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,r,n){let o=this.fastMap.get(r??null);if(!o)return;let i=new cn({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let r=this.fastMap.get(e);if(!r)return;let n=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&ve(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let o=r.children;n&&(n.removeChild(r),o.size>0&&o.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let r of e.children)yield*this.traverse(r)}clone(){let e=new an;for(let r of this.traverse())e.addTreeNode(r.scopeRef,r.parent?.scopeRef??null,r.nodeToRestore);return e}}class cn{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let ce=new an;function un(t){return cc()?t.altKey:t.ctrlKey}function Xe(t,e){let r=`[data-key="${CSS.escape(String(e))}"]`,n=t.current?.dataset.collection;return n&&(r=`[data-collection="${CSS.escape(n)}"]${r}`),t.current?.querySelector(r)}const gi=new WeakMap;function Ju(t){let e=Se();return gi.set(t,e),e}function Qu(t){return gi.get(t)}const bi=1e3;function ed(t){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:n}=t,o=a.useRef({search:"",timeout:void 0}),i=s=>{if(o.current.search.length>0&&s.key===" "){if(s.preventDefault(),(!("continuePropagation"in s)||"continuePropagation"in s&&!s.isPropagationStopped())&&s.stopPropagation(),o.current.search+=" ",e.getKeyForSearch!=null){let c=e.getKeyForSearch(o.current.search,r.focusedKey);c==null&&(c=e.getKeyForSearch(o.current.search)),c!=null&&(r.setFocusedKey(c),n&&n(c))}clearTimeout(o.current.timeout),o.current.timeout=setTimeout(()=>{o.current.search=""},bi)}},l=s=>{let c=td(s.key);if(!(!c||s.ctrlKey||s.metaKey||s.altKey||!q(s.currentTarget,A(s))||o.current.search.length===0&&c===" ")){if(o.current.search+=c,e.getKeyForSearch!=null){let u=e.getKeyForSearch(o.current.search,r.focusedKey);if(u==null&&(u=e.getKeyForSearch(o.current.search)),u!=null)r.setFocusedKey(u),n&&n(u),s.preventDefault(),"continuePropagation"in s||s.stopPropagation();else{o.current.search="",clearTimeout(o.current.timeout),o.current.timeout=void 0;return}}clearTimeout(o.current.timeout),o.current.timeout=setTimeout(()=>{o.current.search=""},bi)}};return a.useEffect(()=>{let s=o.current.timeout;return()=>{clearTimeout(s)}},[o]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0,onKeyDown:e.getKeyForSearch?l:void 0}}}function td(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function mi(t,e){const r=a.useRef(!0),n=a.useRef(null);Q(()=>(r.current=!0,()=>{r.current=!1}),[]),Q(()=>{r.current?r.current=!1:(!n.current||e.some((o,i)=>!Object.is(o,n[i])))&&t(),n.current=e},e)}function yi(t){let{selectionManager:e,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:l=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c="clearSelection",selectOnFocus:u=e.selectionBehavior==="replace",disallowTypeAhead:d=!1,shouldUseVirtualFocus:f,allowsTabNavigation:p=!1,scrollRef:h=n,linkBehavior:m="action",UNSTABLE_focusOnEntry:v}=t,{direction:g}=it(),w=_t();const x=(D,M,ue)=>{if(M!=null){if(e.isLink(M)&&m==="selection"&&u&&!un(D)){et.flushSync(()=>{e.setFocusedKey(M,ue)});let re=Xe(n,M),Er=e.getItemProps(M);if(re){w.open(re,D,Er.href,Er.routerOptions);return}return!1}if(e.setFocusedKey(M,ue),e.isLink(M)&&m==="override")return!1;if(D.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(M);return}else if(u&&!un(D)){e.replaceSelection(M);return}}return!1};let S=D=>{if(r.getKeyBelow){let M=e.focusedKey!=null?r.getKeyBelow?.(e.focusedKey):r.getFirstKey?.();if(M==null&&i&&(M=r.getFirstKey?.(e.focusedKey)),M!=null){x(D,M);return}}return!1},k=D=>{if(r.getKeyAbove){let M=e.focusedKey!=null?r.getKeyAbove?.(e.focusedKey):r.getLastKey?.();if(M==null&&i&&(M=r.getLastKey?.(e.focusedKey)),M!=null){x(D,M);return}}return!1},V=D=>{if(r.getFirstKey){if(e.focusedKey===null&&D.shiftKey)return!1;let M=r.getFirstKey(e.focusedKey,xt(D));if(e.setFocusedKey(M),M!=null){if(xt(D)&&D.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(M);return}else if(u){e.replaceSelection(M);return}}}return!1},I=D=>{if(r.getKeyLeftOf){let M=e.focusedKey!=null?r.getKeyLeftOf?.(e.focusedKey):r.getFirstKey?.();if(M==null&&i&&(M=g==="rtl"?r.getFirstKey?.(e.focusedKey):r.getLastKey?.(e.focusedKey)),M!=null){x(D,M,g==="rtl"?"first":"last");return}}return!1},L=D=>{if(r.getKeyRightOf){let M=e.focusedKey!=null?r.getKeyRightOf?.(e.focusedKey):r.getFirstKey?.();if(M==null&&i&&(M=g==="rtl"?r.getLastKey?.(e.focusedKey):r.getFirstKey?.(e.focusedKey)),M!=null){x(D,M,g==="rtl"?"last":"first");return}}return!1},C=D=>{if(r.getLastKey){if(e.focusedKey===null&&D.shiftKey)return!1;let M=r.getLastKey(e.focusedKey,xt(D));if(e.setFocusedKey(M),M!=null){if(xt(D)&&D.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(M);return}else if(u){e.replaceSelection(M);return}}}return!1},K=D=>{if(r.getKeyPageBelow&&e.focusedKey!=null){let M=r.getKeyPageBelow(e.focusedKey);if(M!=null)return x(D,M)}return!1},W=D=>{if(r.getKeyPageAbove&&e.focusedKey!=null){let M=r.getKeyPageAbove(e.focusedKey);if(M!=null)return x(D,M)}return!1},z=()=>{if(e.selectionMode==="multiple"&&s!==!0){e.selectAll();return}return!1},j=()=>{if(c==="clearSelection"&&!l&&e.selectedKeys.size!==0){e.clearSelection();return}return!1},U=()=>{if(!p&&n.current){let D=De(n.current,{tabbable:!0}),M,ue;do ue=D.lastChild(),ue&&(M=ue);while(ue);let re=ie();M&&(!At(M)||re&&!Lr(re))&&we(M)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},y=()=>(!p&&n.current&&n.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),T=(D,M)=>({[be()?D+"+Shift+Alt":D+"+Shift+Control"]:M,[D+"+Shift"]:M,[be()?D+"+Alt":D+"+Control"]:M,[D]:M}),{keyboardProps:G}=at({shortcuts:{...T("ArrowDown",S),...T("ArrowUp",k),...T("ArrowLeft",I),...T("ArrowRight",L),...T("PageDown",K),...T("PageUp",W)},allowRepeats:!0}),{keyboardProps:N}=at({shortcuts:{...T("Home",V),...T("End",C),"Mod+A":z,Escape:j,Tab:U,"Tab+Shift":y}}),Y=a.useRef({top:0,left:0});Wt(h,"scroll",()=>{Y.current={top:h.current?.scrollTop??0,left:h.current?.scrollLeft??0}});let E=D=>{if(e.isFocused){q(D.currentTarget,A(D))||e.setFocused(!1);return}if(!q(D.currentTarget,A(D)))return;let M=vt();e.setFocused(!0);let ue=re=>{re!=null&&(e.setFocusedKey(re),u&&!e.isSelected(re)&&e.replaceSelection(re))};if(v&&(M==="keyboard"||M==="virtual"))ue(v==="first"?r.getFirstKey?.():r.getLastKey?.());else if(e.focusedKey==null){let re=D.relatedTarget;re&&D.currentTarget.compareDocumentPosition(re)&Node.DOCUMENT_POSITION_FOLLOWING?ue(e.lastSelectedKey??r.getLastKey?.()):ue(e.firstSelectedKey??r.getFirstKey?.())}else h.current&&(h.current.scrollTop=Y.current.top,h.current.scrollLeft=Y.current.left);if(e.focusedKey!=null&&h.current){let re=Xe(n,e.focusedKey);re instanceof HTMLElement&&(!At(re)&&!f&&we(re),(M==="keyboard"||v&&M==="virtual")&&ni(re,{containingElement:n.current}))}},$=D=>{q(D.currentTarget,D.relatedTarget)||e.setFocused(!1)},H=a.useRef(!1);Wt(n,Ga,f?D=>{let{detail:M}=D;D.stopPropagation(),e.setFocused(!0),M?.focusStrategy==="first"&&(H.current=!0)}:void 0);let ae=r.getFirstKey?.()??null;mi(()=>{if(H.current)if(ae==null){let D=ie();qn(n.current),Yn(D,null),e.collection.size>0&&(H.current=!1)}else e.setFocusedKey(ae),H.current=!1},[ae,e.collection.size]),mi(()=>{e.collection.size>0&&(H.current=!1)},[e.focusedKey]),Wt(n,Ua,f?D=>{D.stopPropagation(),e.setFocused(!1),D.detail?.clearFocusKey&&e.setFocusedKey(null)}:void 0);const pe=a.useRef(o),ne=a.useRef(!1);a.useEffect(()=>{if(pe.current){let D=null;o==="first"&&(D=r.getFirstKey?.()??null),o==="last"&&(D=r.getLastKey?.()??null);let M=e.selectedKeys;if(M.size){for(let ue of M)if(e.canSelectItem(ue)){D=ue;break}}e.setFocused(!0),e.setFocusedKey(D),D==null&&!f&&n.current&&st(n.current),e.collection.size>0&&(pe.current=!1,ne.current=!0)}});let P=a.useRef(e.focusedKey),R=a.useRef(null);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==P.current||ne.current)&&h.current&&n.current){let D=vt(),M=Xe(n,e.focusedKey);if(!(M instanceof HTMLElement))return;(D==="keyboard"||ne.current)&&(R.current&&cancelAnimationFrame(R.current),R.current=requestAnimationFrame(()=>{h.current&&(lr(h.current,M),D!=="virtual"&&ni(M,{containingElement:n.current}))}))}!f&&e.isFocused&&e.focusedKey==null&&P.current!=null&&n.current&&st(n.current),P.current=e.focusedKey,ne.current=!1}),a.useEffect(()=>()=>{R.current&&cancelAnimationFrame(R.current)},[]),Wt(n,"react-aria-focus-scope-restore",D=>{D.preventDefault(),e.setFocused(!0)});let oe={...ee(N,G),onFocus:E,onBlur:$,onMouseDown(D){h.current===A(D)&&D.preventDefault()}},{typeSelectProps:ge}=ed({keyboardDelegate:r,selectionManager:e});d||(oe=ee(ge,oe));let se;f||(se=e.focusedKey==null?0:-1);let ft=Ju(e.collection);return{collectionProps:ee(oe,{tabIndex:se,"data-collection":ft})}}class vi{constructor(e){this.ref=e}getItemRect(e){let r=this.ref.current;if(!r)return null;let n=e!=null?Xe(this.ref,e):null;if(!n)return null;let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-o.left-r.clientLeft+r.scrollLeft,y:i.top-o.top-r.clientTop+r.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}}class rd{constructor(...e){if(e.length===1){let r=e[0];this.collection=r.collection,this.ref=r.ref,this.collator=r.collator,this.disabledKeys=r.disabledKeys||new Set,this.disabledBehavior=r.disabledBehavior||"all",this.orientation=r.orientation||"vertical",this.direction=r.direction,this.layout=r.layout||"stack",this.layoutDelegate=r.layoutDelegate||new vi(r.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new vi(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){return this.disabledBehavior==="all"&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!=="selection"}findNextNonDisabled(e,r,n=!1){let o=e;for(;o!=null;){let i=this.collection.getItem(o);if(i?.type==="item"&&(n||!this.isDisabled(i)))return o;o=r(o)}return null}getNextKey(e,r){let n=e;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,o=>this.collection.getKeyAfter(o),r?.includeDisabled)}getPreviousKey(e,r){let n=e;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,o=>this.collection.getKeyBefore(o),r?.includeDisabled)}findKey(e,r,n){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=r(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&n(l,i)&&o!=null);return o}isSameRow(e,r){return e.y===r.y||e.x!==r.x}isSameColumn(e,r){return e.x===r.x||e.y!==r.y}isReversed(e){let r=this.getNextKey(e),n=Xe(this.ref,e);if(r!=null){let i=Xe(this.ref,r);return!n||!i?!1:n.getBoundingClientRect().top>i.getBoundingClientRect().top}let o=this.getPreviousKey(e);if(o!=null){let i=Xe(this.ref,o);return!n||!i?!1:i.getBoundingClientRect().top>n.getBoundingClientRect().top}return!1}getKeyBelow(e,r){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n,r),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getPreviousKey(e,r):this.getNextKey(e,r):this.getNextKey(e,r)}getKeyAbove(e,r){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n,r),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getNextKey(e,r):this.getPreviousKey(e,r):this.getPreviousKey(e,r)}getNextColumn(e,r,n){return r?this.getPreviousKey(e,n):this.getNextKey(e,n)}getKeyRightOf(e,r){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[n](o),r?.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",r):this.findKey(e,o=>this.getNextColumn(o,this.direction==="rtl",r),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",r):null}getKeyLeftOf(e,r){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(e=this.layoutDelegate[n](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[n](o),r?.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",r):this.findKey(e,o=>this.getNextColumn(o,this.direction==="ltr",r),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",r):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,r=>this.collection.getKeyAfter(r))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,r=>this.collection.getKeyBefore(r))}getKeyPageAbove(e){let r=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;let o=this.isReversed(e);if(r&&!dt(r))return this.getFirstKey();let i=e;if(this.orientation==="horizontal"){let l=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>l&&i!=null;)i=this.getKeyAbove(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}else{let l=this.layoutDelegate.getVisibleRect(),s=o?n.y-l.height:Math.max(0,n.y+n.height-l.height);for(;n&&n.y>s&&i!=null;)i=this.getKeyAbove(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}return i??(o?this.getLastKey():this.getFirstKey())}getKeyPageBelow(e){let r=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;let o=this.isReversed(e);if(r&&!dt(r))return this.getLastKey();let i=e;if(this.orientation==="horizontal"){let l=Math.min(this.layoutDelegate.getContentSize().width,n.x-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<l&&i!=null;)i=this.getKeyBelow(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}else{let l=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<l&&i!=null;)i=this.getKeyBelow(i),n=i==null?null:this.layoutDelegate.getItemRect(i)}return i??(o?this.getFirstKey():this.getLastKey())}getKeyForSearch(e,r){if(!this.collator)return null;let n=this.collection,o=r||this.getFirstKey();for(;o!=null;){let i=n.getItem(o);if(!i)return null;let l=i.textValue.slice(0,e.length);if(i.textValue&&this.collator.compare(l,e)===0)return o;o=this.getNextKey(o)}return null}}let dn=new Map;function nd(t){let{locale:e}=it(),r=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(dn.has(r))return dn.get(r);let n=new Intl.Collator(e,t);return dn.set(r,n),n}function od(t){let{selectionManager:e,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:l,orientation:s}=t,c=nd({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,d=a.useMemo(()=>i||new rd({collection:r,disabledKeys:n,disabledBehavior:u,ref:o,collator:c,layoutDelegate:l,orientation:s}),[i,l,r,n,o,c,u,s]),{collectionProps:f}=yi({...t,ref:o,selectionManager:e,keyboardDelegate:d});return{listProps:f}}const id=500;function fn(t){let{isDisabled:e,pointerType:r,onLongPressStart:n,onLongPressEnd:o,onLongPress:i,threshold:l=id,accessibilityDescription:s}=t;const c=a.useRef(void 0);let{addGlobalListener:u,removeAllGlobalListeners:d}=Qt(),f=m=>r?m.pointerType===r:m.pointerType==="mouse"||m.pointerType==="touch",{pressProps:p}=tr({isDisabled:e,onPressStart(m){if(m.continuePropagation(),f(m)){n&&n({...m,type:"longpressstart"}),c.current=setTimeout(()=>{m.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),u(m.target,"click",g=>g.preventDefault(),{once:!0}),J(m.target).activeElement!==m.target&&we(m.target),i&&i({...m,type:"longpress"}),c.current=void 0},l),m.pointerType==="touch"&&u(m.target,"contextmenu",g=>g.preventDefault(),{once:!0});let v=fe(m.target);u(v,"pointerup",()=>{setTimeout(()=>{d()},100)},{once:!0})}},onPressEnd(m){c.current&&clearTimeout(c.current),o&&f(m)&&o({...m,type:"longpressend"})}}),h=Ou(i&&!e?s:void 0);return{longPressProps:ee(p,h)}}function xi(t){let{id:e,selectionManager:r,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:s,isDisabled:c,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=t,p=_t();e=Se(e);let h=P=>{if(P.pointerType==="keyboard"&&un(P))r.toggleSelection(n);else{if(r.selectionMode==="none")return;if(r.isLink(n)){if(f==="selection"&&o.current){let R=r.getItemProps(n);p.open(o.current,P,R.href,R.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(f==="override"||f==="none")return}r.selectionMode==="single"?r.isSelected(n)&&!r.disallowEmptySelection?r.toggleSelection(n):r.replaceSelection(n):P&&P.shiftKey?r.extendSelection(n):r.selectionBehavior==="toggle"||P&&(xt(P)||P.pointerType==="touch"||P.pointerType==="virtual")?r.toggleSelection(n):r.replaceSelection(n)}};a.useEffect(()=>{n===r.focusedKey&&r.isFocused&&(l?qn(o.current):s?s():ie()!==o.current&&o.current&&st(o.current))},[o,n,r.focusedKey,r.childFocusStrategy,r.isFocused,l]),c=c||r.isDisabled(n);let m={};!l&&!c?m={tabIndex:n===r.focusedKey?0:-1,onFocus(P){A(P)===o.current&&r.setFocusedKey(n)}}:c&&(m.onMouseDown=P=>{P.preventDefault()}),a.useEffect(()=>{c&&r.focusedKey===n&&r.setFocusedKey(null)},[r,c,n]);let v=r.isLink(n)&&f==="override",g=u&&t.UNSTABLE_itemBehavior==="action",w=r.isLink(n)&&f!=="selection"&&f!=="none",x=!c&&r.canSelectItem(n)&&!v&&!g,S=(u||w)&&!c,k=S&&(r.selectionBehavior==="replace"?!x:!x||r.isEmpty),V=S&&x&&r.selectionBehavior==="replace",I=k||V,L=a.useRef(null),C=I&&x,K=a.useRef(!1),W=a.useRef(!1),z=r.getItemProps(n),j=P=>{u&&(u(),o.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),w&&o.current&&p.open(o.current,P,z.href,z.routerOptions)},U={ref:o};i?(U.onPressStart=P=>{L.current=P.pointerType,K.current=C,P.pointerType==="keyboard"&&(!I||Ei(P.key))&&h(P)},d?(U.onPressUp=k?void 0:P=>{P.pointerType==="mouse"&&x&&h(P)},U.onPress=k?j:P=>{P.pointerType!=="keyboard"&&P.pointerType!=="mouse"&&x&&h(P)}):U.onPress=P=>{if(k||V&&P.pointerType!=="mouse"){if(P.pointerType==="keyboard"&&!wi(P.key))return;j(P)}else P.pointerType!=="keyboard"&&x&&h(P)}):(U.onPressStart=P=>{L.current=P.pointerType,K.current=C,W.current=k,x&&(P.pointerType==="mouse"&&!k||P.pointerType==="keyboard"&&(!S||Ei(P.key)))&&h(P)},U.onPress=P=>{(P.pointerType==="touch"||P.pointerType==="pen"||P.pointerType==="virtual"||P.pointerType==="keyboard"&&I&&wi(P.key)||P.pointerType==="mouse"&&W.current)&&(I?j(P):x&&h(P))});let y=Qu(r.collection);if(m["data-collection"]=y,m["data-key"]=n,U.preventFocusOnPress=l,l&&(U=ee(U,{onPressStart(P){P.pointerType!=="touch"&&(r.setFocused(!0),r.setFocusedKey(n))},onPress(P){P.pointerType==="touch"&&(r.setFocused(!0),r.setFocusedKey(n))}})),z)for(let P of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])z[P]&&(U[P]=He(U[P],z[P]));let{pressProps:T,isPressed:G}=tr(U),N=V?P=>{L.current==="mouse"&&(P.stopPropagation(),P.preventDefault(),j(P))}:void 0,{longPressProps:Y}=fn({isDisabled:!C,onLongPress(P){P.pointerType==="touch"&&(h(P),r.setSelectionBehavior("toggle"))}}),E=P=>{L.current==="touch"&&K.current&&P.preventDefault()},$=f!=="none"&&r.isLink(n)?P=>{Me.isOpening||P.preventDefault()}:void 0,H=ee(m,x||k||l&&!c?T:{},C?Y:{},{onDoubleClick:N,onDragStartCapture:E,onClick:$,id:e},l?{onMouseDown:P=>P.preventDefault()}:void 0),ae=P=>{let R=P;for(;R&&R!==o.current;){let oe=R.getAttribute("data-collection");if(oe!=null)return oe!==y;R=R.parentElement}return Lr(P)},pe=H.onPointerDown;H.onPointerDown=P=>{let R=A(P);if(R&&R!==o.current&&ae(R)){P.stopPropagation();return}pe?.(P)};let ne=H.onMouseDown;return H.onMouseDown=P=>{let R=A(P);if(R&&R!==o.current&&ae(R)){P.stopPropagation();return}ne?.(P)},{itemProps:H,isPressed:G,isSelected:r.isSelected(n),isFocused:r.isFocused&&r.focusedKey===n,isDisabled:c,allowsSelection:x,hasAction:I}}function wi(t){return t==="Enter"}function Ei(t){return t===" "}function $i(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function ld(t){return sd(t)}function sd(t,e){for(let r of t)return r}function pn(t,e,r){if(e.parentKey===r.parentKey)return e.index-r.index;let n=[...Si(t,e),e],o=[...Si(t,r),r],i=n.slice(0,o.length).findIndex((l,s)=>l!==o[s]);return i!==-1?(e=n[i],r=o[i],e.index-r.index):n.findIndex(l=>l===r)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function Si(t,e){let r=[],n=e;for(;n?.parentKey!=null;)n=t.getItem(n.parentKey),n&&r.unshift(n);return r}const Ci=new WeakMap;function ad(t){let e=Ci.get(t);if(e!=null)return e;let r=0,n=o=>{for(let i of o)i.type==="section"?n($i(i,t)):i.type==="item"&&r++};return n(t),Ci.set(t,r),r}class ki{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let s of l.childNodes)r(s)};for(let l of e)r(l);let n=null,o=0,i=0;for(let[l,s]of this.keyMap)n?(n.nextKey=l,s.prevKey=n.key):(this.firstKey=l,s.prevKey=void 0),s.type==="item"&&(s.index=o++),(s.type==="section"||s.type==="item")&&i++,n=s,n.nextKey=void 0;this._size=i,this.lastKey=n?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);return r?r.prevKey??null:null}getKeyAfter(e){let r=this.keyMap.get(e);return r?r.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}}class $e extends Set{constructor(e,r,n){super(e),e instanceof $e?(this.anchorKey=r??e.anchorKey,this.currentKey=n??e.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}function cd(t,e){if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}function hn(t){let{selectionMode:e="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=t,l=a.useRef(!1),[,s]=a.useState(!1),c=a.useRef(null),u=a.useRef(null),[,d]=a.useState(null),f=a.useMemo(()=>Pi(t.selectedKeys),[t.selectedKeys]),p=a.useMemo(()=>Pi(t.defaultSelectedKeys,new $e),[t.defaultSelectedKeys]),[h,m]=Gt(f,p,t.onSelectionChange),v=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[g,w]=a.useState(o);o==="replace"&&g==="toggle"&&typeof h=="object"&&h.size===0&&w("replace");let x=a.useRef(o);return a.useEffect(()=>{o!==x.current&&(w(o),x.current=o)},[o]),{selectionMode:e,disallowEmptySelection:r,selectionBehavior:g,setSelectionBehavior:w,get isFocused(){return l.current},setFocused(S){l.current=S,s(S)},get focusedKey(){return c.current},get childFocusStrategy(){return u.current},setFocusedKey(S,k="first"){c.current=S,u.current=k,d(S)},selectedKeys:h,setSelectedKeys(S){(n||!cd(S,h))&&m(S)},disabledKeys:v,disabledBehavior:i}}function Pi(t,e){return t?t==="all"?"all":new $e(t):e}class Ct{constructor(e,r,n){this.collection=e,this.state=r,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,r){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,r)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let r=this.getKey(e);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),r=this.state.selectedKeys;return this._isSelectAll=e.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&pn(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&pn(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new $e([r],r,r);else{let o=this.state.selectedKeys,i=o.anchorKey??r;n=new $e(o,i,r);for(let l of this.getKeyRange(i,o.currentKey??r))n.delete(l);for(let l of this.getKeyRange(r,i))this.canSelectItem(l)&&n.add(l)}this.state.setSelectedKeys(n)}getKeyRange(e,r){let n=this.collection.getItem(e),o=this.collection.getItem(r);return n&&o?pn(this.collection,n,o)<=0?this.getKeyRangeInternal(e,r):this.getKeyRangeInternal(r,e):[]}getKeyRangeInternal(e,r){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,r);let n=[],o=e;for(;o!=null;){let i=this.collection.getItem(o);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&n.push(o),o===r)return n;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let r=this.collection.getItem(e);if(!r||r.type==="cell"&&this.allowsCellSelection)return e;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n=new $e(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none")return;let r=this.getKey(e);if(r==null)return;let n=this.canSelectItem(r)?new $e([r],r,r):new $e;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let r=new $e;for(let n of e){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let e=this.fullCollection??this.collection,r=[],n=o=>{for(;o!=null;){if(this.canSelectItemIn(o,e)){let i=e.getItem(o);i?.type==="item"&&r.push(o),i?.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(ld($i(i,e))?.key??null)}o=e.getKeyAfter(o)}};return n(e.getFirstKey()),r}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new $e)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;for(let n of r)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,r){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=r.getItem(e);return!(!n||n?.props?.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){let r=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!r?.props?.isDisabled)&&r?.props?.disabledBehavior!=="selection"}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(e){return new Ct(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class ud{build(e,r){return this.context=r,Ti(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:r,items:n}=e;if(a.isValidElement(r)&&r.type===a.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:r}),o++}else{let o=[];a.Children.forEach(r,l=>{l&&o.push(l)});let i=0;for(let l of o){let s=this.getFullNode({element:l,index:i},{});for(let c of s)i++,yield c}}}getKey(e,r,n,o){if(e.key!=null)return e.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){let l=i.key??i.id;if(l==null)throw new Error("No key found for item");return l}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(e,r){return{renderer:r.renderer||e.renderer}}*getFullNode(e,r,n,o){if(a.isValidElement(e.element)&&e.element.type===a.Fragment){let c=[];a.Children.forEach(e.element.props.children,d=>{c.push(d)});let u=e.index??0;for(const d of c)yield*this.getFullNode({element:d,index:u++},r,n,o);return}let i=e.element;if(!i&&e.value&&r&&r.renderer){let c=this.cache.get(e.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=e.index,c.parentKey=o?o.key:null,yield c;return}i=r.renderer(e.value)}if(a.isValidElement(i)){let c=i.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let p=i.type;throw new Error(`Unknown element <${p}> in collection.`)}let u=c.getCollectionNode(i.props,this.context),d=e.index??0,f=u.next();for(;!f.done&&f.value;){let p=f.value;e.index=d;let h=p.key??null;h==null&&(h=p.element?null:this.getKey(i,e,r,n));let v=[...this.getFullNode({...p,key:h,index:d,wrapper:dd(e.wrapper,p.wrapper)},this.getChildState(r,p),n?`${n}${i.key}`:i.key,o)];for(let g of v){if(g.value=p.value??e.value??null,g.value&&this.cache.set(g.value,g),e.type&&g.type!==e.type)throw new Error(`Unsupported type <${gn(g.type)}> in <${gn(o?.type??"unknown parent type")}>. Only <${gn(e.type)}> is supported.`);d++,yield g}f=u.next(v)}return}if(e.key==null||e.type==null)return;let l=this,s={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:e.value??null,level:(o?.level??0)+(o?.type==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Ti(function*(){if(!e.hasChildNodes||!e.childNodes)return;let c=0;for(let u of e.childNodes()){u.key!=null&&(u.key=`${s.key}${u.key}`);let d=l.getFullNode({...u,index:c},l.getChildState(r,u),s.key,s);for(let f of d)c++,yield f}})};yield s}constructor(){this.cache=new WeakMap}}function Ti(t){let e=[],r=null;return{*[Symbol.iterator](){for(let n of e)yield n;r||(r=t());for(let n of r)e.push(n),yield n}}}function dd(t,e){if(t&&e)return r=>t(e(r));if(t)return t;if(e)return e}function gn(t){return t[0].toUpperCase()+t.slice(1)}function Ni(t,e,r){let n=a.useMemo(()=>new ud,[]),{children:o,items:i,collection:l}=t;return a.useMemo(()=>{if(l)return l;let c=n.build({children:o,items:i},r);return e(c)},[n,o,i,l,r,e])}function fd(t){let{filter:e,layoutDelegate:r}=t,n=hn(t),o=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=a.useCallback(u=>e?new ki(e(u)):new ki(u),[e]),l=a.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),s=Ni(t,i,l),c=a.useMemo(()=>new Ct(s,n,{layoutDelegate:r}),[s,n,r]);return pd(s,c),{collection:s,disabledKeys:o,selectionManager:c}}function pd(t,e){const r=a.useRef(null);a.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&r.current){let n=r.current.getKeyAfter(e.focusedKey),o=null;for(;n!=null;){let i=t.getItem(n);if(i&&i.type==="item"&&!e.isDisabled(n)){o=n;break}n=r.current.getKeyAfter(n)}if(o==null)for(n=r.current.getKeyBefore(e.focusedKey);n!=null;){let i=t.getItem(n);if(i&&i.type==="item"&&!e.isDisabled(n)){o=n;break}n=r.current.getKeyBefore(n)}e.setFocusedKey(o)}r.current=t},[t,e])}const hd=a.createContext({placement:"bottom"}),gd=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Ki(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let kt=new WeakMap,he=[];function bd(t,e){let r=fe(t?.[0]),n=e instanceof r.Element?{root:e}:e,o=n?.root??document.body,i=n?.shouldUseInert&&gd,l=new Set(t),s=new Set,c=g=>i&&g instanceof r.HTMLElement?g.inert:g.getAttribute("aria-hidden")==="true",u=(g,w)=>{i&&g instanceof r.HTMLElement?g.inert=w:w?g.setAttribute("aria-hidden","true"):(g.removeAttribute("aria-hidden"),g instanceof r.HTMLElement&&(g.inert=!1))},d=new Set;if(ke()){let g=o.getRootNode();for(let w of t){let x=w.getRootNode();for(;Tr(x)&&x!==g;)d.add(x),x=x.host.getRootNode()}}let f=g=>{for(let k of g.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(k);let w=k=>{if(s.has(k)||l.has(k)||k.parentElement&&s.has(k.parentElement)&&k.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let V of l)if(q(k,V))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},x=ai(J(g),g,NodeFilter.SHOW_ELEMENT,{acceptNode:w}),S=w(g);if(S===NodeFilter.FILTER_ACCEPT&&p(g),S!==NodeFilter.FILTER_REJECT){let k=x.nextNode();for(;k!=null;)p(k),k=x.nextNode()}},p=g=>{let w=kt.get(g)??0;c(g)&&w===0||(w===0&&u(g,!0),s.add(g),kt.set(g,w+1))};he.length&&he[he.length-1].disconnect(),f(o);let h=new MutationObserver(g=>{for(let w of g)if(w.type==="childList"){if(w.target.isConnected&&![...l,...s].some(x=>q(x,w.target)))for(let x of w.addedNodes)(x instanceof HTMLElement||x instanceof SVGElement)&&Ki(x)?l.add(x):x instanceof Element&&f(x);if(ke()){for(let x of d)if(!x.isConnected){h.disconnect();break}}}});h.observe(o,{childList:!0,subtree:!0});let m=new Set;if(ke())for(let g of d){let w=new MutationObserver(x=>{for(let S of x)if(S.type==="childList"){if(S.target.isConnected&&![...l,...s].some(k=>q(k,S.target)))for(let k of S.addedNodes)(k instanceof HTMLElement||k instanceof SVGElement)&&Ki(k)?l.add(k):k instanceof Element&&f(k);if(ke()){for(let k of d)if(!k.isConnected){h.disconnect();break}}}});w.observe(g,{childList:!0,subtree:!0}),m.add(w)}let v={visibleNodes:l,hiddenNodes:s,observe(){h.observe(o,{childList:!0,subtree:!0})},disconnect(){h.disconnect()}};return he.push(v),()=>{if(h.disconnect(),ke())for(let g of m)g.disconnect();for(let g of s){let w=kt.get(g);w!=null&&(w===1?(u(g,!1),kt.delete(g)):kt.set(g,w-1))}v===he[he.length-1]?(he.pop(),he.length&&he[he.length-1].observe()):he.splice(he.indexOf(v),1)}}function md(t){let e=he[he.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const xe={top:"top",bottom:"top",left:"left",right:"left"},ar={top:"bottom",bottom:"top",left:"right",right:"left"},yd={top:"left",left:"top"},bn={top:"height",left:"width"},Li={width:"totalWidth",height:"totalHeight"},cr={};let vd=()=>typeof document<"u"?window.visualViewport:null;function Mi(t,e){let r=0,n=0,o=0,i=0,l=0,s=0,c={},u=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let d=document.documentElement;o=d.clientWidth,i=d.clientHeight,r=e?.width??o,n=e?.height??i,c.top=d.scrollTop||t.scrollTop,c.left=d.scrollLeft||t.scrollLeft,e&&(l=e.offsetTop,s=e.offsetLeft)}else({width:r,height:n,top:l,left:s}=Pt(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,o=r,i=n;return Fe()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u&&(c.top=0,c.left=0,l=e?.pageTop??0,s=e?.pageLeft??0),{width:r,height:n,totalWidth:o,totalHeight:i,scroll:c,top:l,left:s}}function xd(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function Di(t,e,r,n,o,i,l){let s=o.scroll[t]??0,c=n[bn[t]],u=l[t]+n.scroll[xe[t]]+i,d=l[t]+n.scroll[xe[t]]+c-i,f=e-s+n.scroll[xe[t]]+l[t]-n[xe[t]],p=e-s+r+n.scroll[xe[t]]+l[t]-n[xe[t]];return f<u?u-f:p>d?Math.max(d-p,u-f):0}function wd(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function Ii(t){if(cr[t])return cr[t];let[e,r]=t.split(" "),n=xe[e]||"right",o=yd[n];xe[r]||(r="center");let i=bn[n],l=bn[o];return cr[t]={placement:e,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:l},cr[t]}function mn(t,e,r,n,o,i,l,s,c,u,d){let{placement:f,crossPlacement:p,axis:h,crossAxis:m,size:v,crossSize:g}=n,w={};w[m]=t[m]??0,p==="center"?w[m]+=((t[g]??0)-(r[g]??0))/2:p!==m&&(w[m]+=(t[g]??0)-(r[g]??0)),w[m]+=i;const x=t[m]-r[g]+c+u,S=t[m]+t[g]-c-u;if(w[m]=rn(w[m],x,S),f===h){let k=s?d[v]:d[Li[v]];w[ar[h]]=Math.floor(k-t[h]+o)}else w[h]=Math.floor(t[h]+t[v]+o);return w}function Ed(t,e,r,n,o,i,l,s,c,u,d){let f=(t.top!=null?t.top:c[Li.height]-(t.bottom??0)-l)-(c.scroll.top??0),p=u?r.top:0,h={top:Math.max(e.top+p,(d?.offsetTop??e.top)+p),bottom:Math.min(e.top+e.height+p,(d?.offsetTop??0)+(d?.height??0))};return s!=="top"?Math.max(0,h.bottom-f-((o.top??0)+(o.bottom??0)+i)):Math.max(0,f+l-h.top-((o.top??0)+(o.bottom??0)+i))}function Ai(t,e,r,n,o,i,l,s){let{placement:c,axis:u,size:d}=i;return c===u?Math.max(0,r[u]-(l.scroll[u]??0)-(t[u]+(s?e[u]:0))-(n[u]??0)-n[ar[u]]-o):Math.max(0,t[d]+t[u]+(s?e[u]:0)-r[u]-r[d]+(l.scroll[u]??0)-(n[u]??0)-n[ar[u]]-o)}function $d(t,e,r,n,o,i,l,s,c,u,d,f,p,h,m,v,g,w){let x=Ii(t),{size:S,crossAxis:k,crossSize:V,placement:I,crossPlacement:L}=x,C=mn(e,s,r,x,d,f,u,p,m,v,c),K=d,W=Ai(s,u,e,o,i+d,x,c,g);if(l&&r[S]>W){let P=Ii(`${ar[I]} ${L}`),R=mn(e,s,r,P,d,f,u,p,m,v,c);Ai(s,u,e,o,i+d,P,c,g)>W&&(x=P,C=R,K=d)}let z="bottom";x.axis==="top"?x.placement==="top"?z="top":x.placement==="bottom"&&(z="bottom"):x.crossAxis==="top"&&(x.crossPlacement==="top"?z="bottom":x.crossPlacement==="bottom"&&(z="top"));let j=Di(k,C[k],r[V],s,c,i,u);C[k]+=j;let U=Ed(C,s,u,p,o,i,r.height,z,c,g,w);h&&h<U&&(U=h),r.height=Math.min(r.height,U),C=mn(e,s,r,x,K,f,u,p,m,v,c),j=Di(k,C[k],r[V],s,c,i,u),C[k]+=j;let y={},T=e[k]-C[k]-o[xe[k]],G=T+.5*e[V];const N=m/2+v,Y=xe[k]==="left"?(o.left??0)+(o.right??0):(o.top??0)+(o.bottom??0),E=r[V]-Y-m/2-v,$=e[k]+m/2-(C[k]+o[xe[k]]),H=e[k]+e[V]-m/2-(C[k]+o[xe[k]]),ae=rn(G,$,H);y[k]=rn(ae,N,E),{placement:I,crossPlacement:L}=x,m?T=y[k]:L==="right"?T+=e[V]:L==="center"&&(T+=e[V]/2);let pe=I==="left"||I==="top"?r[S]:0,ne={x:I==="top"||I==="bottom"?T:pe,y:I==="left"||I==="right"?T:pe};return{position:C,maxHeight:U,arrowOffsetLeft:y.left,arrowOffsetTop:y.top,placement:I,triggerAnchorPoint:ne}}function Sd(t){let{placement:e,targetNode:r,overlayNode:n,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:s,offset:c,crossOffset:u,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:p=0,targetRect:h}=t,m=vd(),v=n instanceof HTMLElement?Cd(n):document.documentElement,g=v===document.documentElement;const w=window.getComputedStyle(v).position;let x=!!w&&w!=="static",S=g?Pt(r,!1,h):Fi(r,v,!1,h);if(!g){let{marginTop:z,marginLeft:j}=window.getComputedStyle(r);S.top+=parseInt(z,10)||0,S.left+=parseInt(j,10)||0}let k=Pt(n,!0),V=wd(n);k.width+=(V.left??0)+(V.right??0),k.height+=(V.top??0)+(V.bottom??0);let I=xd(o),L=Mi(s,m),C=Mi(v,m),K;if((s.tagName==="BODY"||s.tagName==="HTML")&&!g){let z=ur(v,!1);K={top:-(z.top-L.top),left:-(z.left-L.left),width:0,height:0}}else(s.tagName==="BODY"||s.tagName==="HTML")&&g?K={top:0,left:0,width:0,height:0}:K=Fi(s,v,!1);let W=q(s,v);return $d(e,S,k,I,V,i,l,L,C,K,c,u,x,d,f,p,W,m)}function ur(t,e){let{top:r,left:n,width:o,height:i}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(o=t.offsetWidth,i=t.offsetHeight),{top:r,left:n,width:o,height:i}}function Pt(t,e,r){let{top:n,left:o,width:i,height:l}=r||ur(t,e),{scrollTop:s,scrollLeft:c,clientTop:u,clientLeft:d}=document.documentElement;return{top:n+s-u,left:o+c-d,width:i,height:l}}function Fi(t,e,r,n){let o=window.getComputedStyle(t),i;if(o.position==="fixed")i=n||ur(t,r);else{i=Pt(t,r,n);let l=Pt(e,r),s=window.getComputedStyle(e);l.top+=(parseInt(s.borderTopWidth,10)||0)-e.scrollTop,l.left+=(parseInt(s.borderLeftWidth,10)||0)-e.scrollLeft,i.top-=l.top,i.left-=l.left}return i.top-=parseInt(o.marginTop,10)||0,i.left-=parseInt(o.marginLeft,10)||0,i}function Cd(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Oi(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Oi(e);)e=e.parentElement;return e||document.documentElement}function Oi(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const Bi=new WeakMap;function kd(t){let{triggerRef:e,isOpen:r,onClose:n}=t;a.useEffect(()=>{if(!r||n===null)return;let o=i=>{let l=A(i);if(!e.current||l instanceof Node&&!q(l,e.current)||l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)return;let s=n||Bi.get(e.current);s&&s()};return Ya(Za(e.current),"scroll",o,!0)},[r,n,e])}function Pd(){return typeof window.ResizeObserver<"u"}function yn(t){const{ref:e,box:r,onResize:n}=t;let o=Ge(n);a.useEffect(()=>{let i=e?.current;if(i)if(Pd()){const l=new window.ResizeObserver(s=>{s.length&&o()});return l.observe(i,{box:r}),()=>{i&&l.unobserve(i)}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)}},[e,r])}let Ze=typeof document<"u"?window.visualViewport:null;function Td(t){let{direction:e}=it(),{arrowSize:r,targetRef:n,overlayRef:o,arrowRef:i,scrollRef:l=o,placement:s="bottom",containerPadding:c=12,shouldFlip:u=!0,boundaryElement:d=typeof document<"u"?document.body:null,offset:f=0,crossOffset:p=0,shouldUpdatePosition:h=!0,isOpen:m=!0,onClose:v,maxHeight:g,arrowBoundaryOffset:w=0,getTargetRect:x}=t,[S,k]=a.useState(null),V=[h,s,o.current,n.current,i?.current,l.current,c,u,d,f,p,m,e,g,w,r],I=a.useRef(Ze?.scale);a.useEffect(()=>{m&&(I.current=Ze?.scale)},[m]);let L=a.useCallback(()=>{if(h===!1||!m||!o.current||!n.current||!d||Ze?.scale!==I.current)return;let W=null;if(l.current&&At(l.current)){let y=ie()?.getBoundingClientRect(),T=l.current.getBoundingClientRect();W={type:"top",offset:(y?.top??0)-T.top},W.offset>T.height/2&&(W.type="bottom",W.offset=(y?.bottom??0)-T.bottom)}let z=o.current;!g&&o.current&&(z.style.top="0px",z.style.bottom="",z.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let j=Sd({placement:Kd(s,e),overlayNode:o.current,targetNode:n.current,scrollNode:l.current||o.current,padding:c,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:p,maxHeight:g,arrowSize:r??(i?.current?ur(i.current,!0).width:0),arrowBoundaryOffset:w,targetRect:x?.(n.current)});if(!j.position)return;z.style.top="",z.style.bottom="",z.style.left="",z.style.right="",Object.keys(j.position).forEach(y=>z.style[y]=j.position[y]+"px"),z.style.maxHeight=j.maxHeight!=null?j.maxHeight+"px":"";let U=ie();if(W&&U&&l.current){let y=U.getBoundingClientRect(),T=l.current.getBoundingClientRect(),G=y[W.type]-T[W.type];l.current.scrollTop+=G-W.offset}k(j)},V);Q(L,V),Nd(L),yn({ref:o,onResize:L}),yn({ref:n,onResize:L});let C=a.useRef(!1);Q(()=>{let W,z=()=>{C.current=!0,clearTimeout(W),W=setTimeout(()=>{C.current=!1},500),L()},j=()=>{C.current&&z()};return Ze?.addEventListener("resize",z),Ze?.addEventListener("scroll",j),()=>{Ze?.removeEventListener("resize",z),Ze?.removeEventListener("scroll",j)}},[L]);let K=a.useCallback(()=>{C.current||v?.()},[v,C]);return kd({triggerRef:n,isOpen:m,onClose:v&&K}),{overlayProps:{style:{position:S?"absolute":"fixed",top:S?void 0:0,left:S?void 0:0,zIndex:1e5,...S?.position,maxHeight:S?.maxHeight??"100vh"}},placement:S?.placement??null,triggerAnchorPoint:S?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:S?.arrowOffsetLeft,top:S?.arrowOffsetTop}},updatePosition:L}}function Nd(t){Q(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function Kd(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}function Ld(t){let{ref:e,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=t,i=a.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Ge(c=>{r&&dr(c,e)&&(o&&o(c),i.current.isPointerDown=!0)}),s=Ge(c=>{r&&r(c)});a.useEffect(()=>{let c=i.current;if(n)return;const u=e.current,d=J(u);if(typeof PointerEvent<"u"){let f=p=>{c.isPointerDown&&dr(p,e)&&s(p),c.isPointerDown=!1};return d.addEventListener("pointerdown",l,!0),d.addEventListener("click",f,!0),()=>{d.removeEventListener("pointerdown",l,!0),d.removeEventListener("click",f,!0)}}else if(process.env.NODE_ENV==="test"){let f=h=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&dr(h,e)&&s(h),c.isPointerDown=!1},p=h=>{c.ignoreEmulatedMouseEvents=!0,c.isPointerDown&&dr(h,e)&&s(h),c.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",p,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",p,!0)}}},[e,n])}function dr(t,e){if(t.button>0)return!1;let r=A(t);if(r){const n=r.ownerDocument;if(!n||!q(n.documentElement,r)||r.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const Te=[];function Md(t,e){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:s}=t,c=a.useRef(void 0);a.useEffect(()=>{if(o&&!Te.includes(e))return Te.push(e),()=>{let m=Te.indexOf(e);m>=0&&Te.splice(m,1)}},[o,e]);let u=()=>{Te[Te.length-1]===e&&r&&r()},d=m=>{const v=Te[Te.length-1];c.current=v,(!s||s(A(m)))&&v===e&&m.stopPropagation()},f=m=>{(!s||s(A(m)))&&(Te[Te.length-1]===e&&m.stopPropagation(),c.current===e&&u()),c.current=void 0},{keyboardProps:p}=at({shortcuts:{Escape:()=>{if(!l){u();return}return!1}}});Ld({ref:e,onInteractOutside:i&&o?f:void 0,onInteractOutsideStart:d});let{focusWithinProps:h}=rr({isDisabled:!n,onBlurWithin:m=>{!m.relatedTarget||qu(m.relatedTarget)||(!s||s(m.relatedTarget))&&r?.()}});return{overlayProps:{...p,...h},underlayProps:{}}}const Tt=typeof document<"u"&&window.visualViewport;let fr=0,vn;function Dd(t={}){let{isDisabled:e}=t;Q(()=>{if(!e)return fr++,fr===1&&(We()&&Fe()?vn=Ad():vn=Id()),()=>{fr--,fr===0&&vn()}},[e])}function Id(){let t=window.innerWidth-document.documentElement.clientWidth;return He(t>0&&("scrollbarGutter"in document.documentElement.style?pr(document.documentElement,"scrollbarGutter","stable"):pr(document.documentElement,"paddingRight",`${t}px`)),pr(document.documentElement,"overflow","hidden"))}function Ad(){let t=pr(document.documentElement,"overflow","hidden"),e,r=!1,n=d=>{let f=A(d);e=dt(f)?f:ri(f,!0),r=!1;let p=f.ownerDocument.defaultView.getSelection();p&&!p.isCollapsed&&p.containsNode(f,!0)&&(r=!0),d.composedPath().some(h=>h instanceof HTMLInputElement&&h.type==="range")&&(r=!0),"selectionStart"in f&&"selectionEnd"in f&&f.selectionStart<f.selectionEnd&&f.ownerDocument.activeElement===f&&(r=!0)},o=document.createElement("style"),i=jo();i&&(o.nonce=i),o.textContent=`
8
8
  @layer {
9
9
  * {
10
10
  overscroll-behavior: contain;
11
11
  }
12
- }`.trim(),document.head.prepend(o);let l=d=>{if(!(d.touches.length===2||r)){if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&d.preventDefault()}},s=d=>{let f=A(d),p=d.relatedTarget;p&&_r(p)?(p.focus({preventScroll:!0}),zi(p,_r(f))):p||f.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(d){let f=ie(),p=f!=null&&_r(f);c.call(this,{...d,preventScroll:!0}),(!d||!d.preventScroll)&&zi(this,p)};let u=He(vn(document,"touchstart",n,{passive:!1,capture:!0}),vn(document,"touchmove",l,{passive:!1,capture:!0}),vn(document,"blur",s,!0));return()=>{t(),u(),o.remove(),HTMLElement.prototype.focus=c}}function pr(t,e,r){let n=t.style[e];return t.style[e]=r,()=>{t.style[e]=n}}function vn(t,e,r,n){return t.addEventListener(e,r,n),()=>{t.removeEventListener(e,r,n)}}function zi(t,e){e||!Tt?_i(t):Tt.addEventListener("resize",()=>_i(t),{once:!0})}function _i(t){let e=document.scrollingElement||document.documentElement,r=t;for(;r&&r!==e;){let n=ri(r);if(n!==document.documentElement&&n!==document.body&&n!==r){let o=n.getBoundingClientRect(),i=r.getBoundingClientRect();if(i.top<o.top||i.bottom>o.top+r.clientHeight){let l=o.bottom;Tt&&(l=Math.min(l,Tt.offsetTop+Tt.height));let s=i.top-o.top-((l-o.top)/2-i.height/2);n.scrollTo({top:Math.max(0,Math.min(n.scrollHeight-n.clientHeight,n.scrollTop+s)),behavior:"smooth"})}}r=n.parentElement}}function Fd(t,e){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:s,...c}=t,u=c.trigger==="SubmenuTrigger",{overlayProps:d,underlayProps:f}=Md({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:s},o??n),{overlayProps:p,arrowProps:h,placement:m,triggerAnchorPoint:x}=Td({...c,targetRef:r,overlayRef:n,isOpen:e.isOpen,onClose:i&&!u?e.close:null,getTargetRect:c.getTargetRect??(e.point?()=>new DOMRect(e.point.x,e.point.y,0,0):void 0)});Dd({isDisabled:i||!e.isOpen}),a.useEffect(()=>{if(e.isOpen&&n.current)return i?md(o?.current??n.current):bd([o?.current??n.current],{shouldUseInert:!0})},[i,e.isOpen,n,o]);let{focusWithinProps:g}=rr(t);return{popoverProps:ee(d,p,g),arrowProps:h,underlayProps:f,placement:m,triggerAnchorPoint:x}}var Vi={};Vi={dismiss:"تجاهل"};var Hi={};Hi={dismiss:"Отхвърляне"};var Wi={};Wi={dismiss:"Odstranit"};var ji={};ji={dismiss:"Luk"};var Ui={};Ui={dismiss:"Schließen"};var Gi={};Gi={dismiss:"Απόρριψη"};var Ri={};Ri={dismiss:"Dismiss"};var qi={};qi={dismiss:"Descartar"};var Yi={};Yi={dismiss:"Lõpeta"};var Xi={};Xi={dismiss:"Hylkää"};var Zi={};Zi={dismiss:"Rejeter"};var Ji={};Ji={dismiss:"התעלם"};var Qi={};Qi={dismiss:"Odbaci"};var el={};el={dismiss:"Elutasítás"};var tl={};tl={dismiss:"Ignora"};var rl={};rl={dismiss:"閉じる"};var nl={};nl={dismiss:"무시"};var ol={};ol={dismiss:"Atmesti"};var il={};il={dismiss:"Nerādīt"};var ll={};ll={dismiss:"Lukk"};var sl={};sl={dismiss:"Negeren"};var al={};al={dismiss:"Zignoruj"};var cl={};cl={dismiss:"Descartar"};var ul={};ul={dismiss:"Dispensar"};var dl={};dl={dismiss:"Revocare"};var fl={};fl={dismiss:"Пропустить"};var pl={};pl={dismiss:"Zrušiť"};var hl={};hl={dismiss:"Opusti"};var gl={};gl={dismiss:"Odbaci"};var bl={};bl={dismiss:"Avvisa"};var ml={};ml={dismiss:"Kapat"};var yl={};yl={dismiss:"Скасувати"};var xl={};xl={dismiss:"取消"};var vl={};vl={dismiss:"關閉"};var wl={};wl={"ar-AE":Vi,"bg-BG":Hi,"cs-CZ":Wi,"da-DK":ji,"de-DE":Ui,"el-GR":Gi,"en-US":Ri,"es-ES":qi,"et-EE":Yi,"fi-FI":Xi,"fr-FR":Zi,"he-IL":Ji,"hr-HR":Qi,"hu-HU":el,"it-IT":tl,"ja-JP":rl,"ko-KR":nl,"lt-LT":ol,"lv-LV":il,"nb-NO":ll,"nl-NL":sl,"pl-PL":al,"pt-BR":cl,"pt-PT":ul,"ro-RO":dl,"ru-RU":fl,"sk-SK":pl,"sl-SI":hl,"sr-SP":gl,"sv-SE":bl,"tr-TR":ml,"uk-UA":yl,"zh-CN":xl,"zh-TW":vl};function Od(t){return t&&t.__esModule?t.default:t}function El(t){let{onDismiss:e,...r}=t,n=bo(Od(wl),"@react-aria/overlays"),o=ao(r,n.format("dismiss")),i=()=>{e&&e()};return a.createElement(zu,null,a.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}const Bd=a.forwardRef(({children:t,...e},r)=>{let n=a.useRef(!1),o=a.useContext($t),i=ee(o||{},{...e,register(){n.current=!0,o&&o.register()}});return i.ref=gt(r||o?.ref),jr(o,i.ref),a.useEffect(()=>{n.current||(process.env.NODE_ENV!=="production"&&console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),n.current=!0)},[]),a.createElement($t.Provider,{value:i},t)});function zd({children:t}){let e=a.useMemo(()=>({register:()=>{}}),[]);return a.createElement($t.Provider,{value:e},t)}const _d=a.createContext({});function Vd(){return a.useContext(_d)??{}}const Hd=a.createContext(null);function $l(t){let e=ht(),{portalContainer:r=e?null:document.body,isExiting:n}=t,[o,i]=a.useState(!1),l=a.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=Vd();if(!t.portalContainer&&s&&(r=s()),!r)return null;let c=t.children;return t.disableFocusManagement||(c=a.createElement(ui,{restoreFocus:!0,contain:(t.shouldContainFocus||o)&&!n},c)),c=a.createElement(Hd.Provider,{value:l},a.createElement(zd,null,a.createElement(qt.Provider,{value:null},c))),et.createPortal(c,r)}function Sl(t){let[e,r]=Gt(t.isOpen,t.defaultOpen||!1,t.onOpenChange),[n,o]=a.useState(null);const i=a.useCallback(()=>{r(!0)},[r]),l=a.useCallback(()=>{r(!1)},[r]),s=a.useCallback(()=>{r(!e)},[r,e]);return{isOpen:e,setOpen:r,open:i,close:l,toggle:s,point:n,setPoint:o}}function Wd(t,e=!0){let[r,n]=a.useState(!0),o=r&&e;return Q(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,o]),Cl(t,o,a.useCallback(()=>n(!1),[])),o}function jd(t,e){let[r,n]=a.useState(e?"open":"closed");switch(r){case"open":e||n("exiting");break;case"closed":case"exiting":e&&n("open");break}let o=r==="exiting";return Cl(t,o,a.useCallback(()=>{n(i=>i==="exiting"?"closed":i)},[])),o}function Cl(t,e,r){Q(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){r();return}let n=t.current.getAnimations();if(n.length===0){r();return}let o=!1;return Promise.allSettled(n.map(i=>i.finished)).then(()=>{o||et.flushSync(()=>{r()})}),()=>{o=!0}}},[t,e,r])}const kl=a.createContext(null),Pl=a.createContext(null),Ud=a.forwardRef(function(e,r){[e,r]=ot(e,r,kl);let n=a.useContext(ps),o=Sl(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?o:n,l=jd(r,i.isOpen),s=e.isExiting||!e.shouldSkipAnimation&&l||!1,c=Ko(),{direction:u}=it();if(c){let d=e.children;return typeof d=="function"&&(d=d({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),a.createElement(a.Fragment,null,d)}return i&&!i.isOpen&&!s?null:a.createElement(Gd,{...e,triggerRef:e.triggerRef,state:i,popoverRef:r,isExiting:s,dir:u})});function Gd({state:t,isExiting:e,UNSTABLE_portalContainer:r,clearContexts:n,...o}){let i=a.useRef(null),l=a.useRef(null),s=a.useContext(Pl),c=s&&o.trigger==="SubmenuTrigger",{popoverProps:u,underlayProps:d,arrowProps:f,placement:p,triggerAnchorPoint:h}=Fd({...o,offset:o.offset??8,arrowRef:i,groupRef:c?s:l},t),m=o.popoverRef,x=Wd(m,!!p),g=o.isEntering||!o.shouldSkipAnimation&&x||!1,w=Ae({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:p,isEntering:g,isExiting:e}}),v=!o.isNonModal||o.trigger==="SubmenuTrigger"||o.trigger==="PreviewTrigger",[S,k]=a.useState(o.trigger==="PreviewTrigger");Q(()=>{m.current&&k(v&&!m.current.querySelector("[role=dialog]"))},[m,v]),a.useEffect(()=>{S&&o.trigger!=="PreviewTrigger"&&(o.trigger!=="SubmenuTrigger"||xt()!=="pointer")&&m.current&&!At(m.current)&&st(m.current)},[S,m,o.trigger]);let V=a.useMemo(()=>{let z=w.children;if(n)for(let j of n)z=a.createElement(j.Provider,{value:null},z);return z},[w.children,n]),[I,L]=a.useState(null),C=a.useCallback(()=>{o.triggerRef.current&&L(o.triggerRef.current.getBoundingClientRect().width+"px")},[o.triggerRef]);Q(C,[C]),yn({ref:w.style?.["--trigger-width"]?void 0:o.triggerRef,onResize:C});let K={...u.style,"--trigger-anchor-point":h?`${h.x}px ${h.y}px`:void 0,...w.style,"--trigger-width":w.style?.["--trigger-width"]||I},W=a.createElement(Ce.div,{...ee(ye(o,{global:!0}),u),...w,id:S?o.id:void 0,role:S?"dialog":void 0,tabIndex:S?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:m,slot:o.slot||void 0,style:K,dir:o.dir,"data-trigger":o.trigger,"data-placement":p,"data-entering":g||void 0,"data-exiting":e||void 0},!o.isNonModal&&a.createElement(El,{onDismiss:t.close}),a.createElement(hd.Provider,{value:{...f,placement:p,ref:i}},V),a.createElement(El,{onDismiss:t.close}));return c?a.createElement($l,{...o,shouldContainFocus:S&&o.trigger!=="PreviewTrigger",isExiting:e,portalContainer:r??s?.current??void 0},W):a.createElement($l,{...o,shouldContainFocus:S&&o.trigger!=="PreviewTrigger",isExiting:e,portalContainer:r},!o.isNonModal&&t.isOpen&&a.createElement("div",{"data-testid":"underlay",...d,style:{position:"fixed",inset:0}}),a.createElement("div",{ref:l,style:{display:"contents"}},a.createElement(Pl.Provider,{value:l},W)))}const Rd=a.createContext({});var Tl={};Tl={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Nl={};Nl={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Kl={};Kl={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Ll={};Ll={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var Ml={};Ml={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Dl={};Dl={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Il={};Il={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Al={};Al={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Fl={};Fl={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Ol={};Ol={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Bl={};Bl={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var zl={};zl={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var _l={};_l={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Vl={};Vl={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Hl={};Hl={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var Wl={};Wl={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var jl={};jl={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Ul={};Ul={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Gl={};Gl={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Rl={};Rl={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var ql={};ql={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Yl={};Yl={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Xl={};Xl={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Zl={};Zl={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Jl={};Jl={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Ql={};Ql={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var es={};es={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var ts={};ts={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var rs={};rs={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var ns={};ns={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var os={};os={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var is={};is={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var ls={};ls={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var ss={};ss={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var as={};as={"ar-AE":Tl,"bg-BG":Nl,"cs-CZ":Kl,"da-DK":Ll,"de-DE":Ml,"el-GR":Dl,"en-US":Il,"es-ES":Al,"et-EE":Fl,"fi-FI":Ol,"fr-FR":Bl,"he-IL":zl,"hr-HR":_l,"hu-HU":Vl,"it-IT":Hl,"ja-JP":Wl,"ko-KR":jl,"lt-LT":Ul,"lv-LV":Gl,"nb-NO":Rl,"nl-NL":ql,"pl-PL":Yl,"pt-BR":Xl,"pt-PT":Zl,"ro-RO":Jl,"ru-RU":Ql,"sk-SK":es,"sl-SI":ts,"sr-SP":rs,"sv-SE":ns,"tr-TR":os,"uk-UA":is,"zh-CN":ls,"zh-TW":ss};function qd(t){let{onContextMenu:e}=t,r=a.useRef(!1),{longPressProps:n}=fn({onLongPressStart(){r.current=!1},onLongPress(o){r.current?r.current=!1:e?.({target:o.target,x:o.x,y:o.y})}});return e?{contextMenuProps:ee(We()?n:{},{onContextMenu(o){o.stopPropagation(),o.preventDefault(),r.current=!0;let i=o.currentTarget.getBoundingClientRect();e({target:o.currentTarget,x:o.clientX-i.x,y:o.clientY-i.y})},onKeyDown(o){if(be()&&o.ctrlKey&&o.key==="Enter"){r.current=!1;let i=o.currentTarget;o.stopPropagation(),setTimeout(()=>{if(r.current)r.current=!1;else{let l=i.getBoundingClientRect();e({target:i,x:l.width/2,y:l.height/2})}},10)}}})}:{contextMenuProps:{}}}function Yd(t,e,r){let{type:n}=t,{isOpen:o}=e;a.useEffect(()=>{r&&r.current&&Bi.set(r.current,e.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let l=Se();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}function Xd(t){return t&&t.__esModule?t.default:t}function Zd(t,e,r){let{type:n="menu",isDisabled:o,trigger:i="press"}=t,l=Se(),{triggerProps:s,overlayProps:c}=Yd({type:n},e,r),u=(g,w,v="first")=>{if(!g||w.isDefaultPrevented())return!1;e.toggle(v)},{keyboardProps:d}=at({isDisabled:o,shortcuts:{Enter:g=>u(i!=="longPress",g,"first")," ":g=>u(i!=="longPress",g,"first"),ArrowDown:g=>u(i!=="longPress",g,"first"),ArrowUp:g=>u(i!=="longPress",g,"last"),"Alt+Enter":g=>u(i==="longPress",g,"first"),"Alt+ ":g=>u(i==="longPress",g,"first"),"Alt+ArrowDown":g=>u(!0,g,"first"),"Alt+ArrowUp":g=>u(!0,g,"last")}}),f=bo(Xd(as),"@react-aria/menu"),{longPressProps:p}=fn({isDisabled:o||i!=="longPress",accessibilityDescription:f.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),h={preventFocusOnPress:!0,onPressStart(g){g.pointerType!=="touch"&&g.pointerType!=="keyboard"&&!o&&(we(g.target),e.open(g.pointerType==="virtual"?"first":null))},onPress(g){g.pointerType==="touch"&&!o&&(we(g.target),e.toggle())}};delete s.onPress;let{contextMenuProps:m}=qd({onContextMenu(g){let w=g.target.getBoundingClientRect();e.setPoint({x:w.x+g.x,y:w.y+g.y}),e.open()}});a.useEffect(()=>{if(e.isOpen&&i==="contextMenu"){let g=w=>{(w.button===2||w.button===0&&w.ctrlKey===!0)&&A(w)===document.body&&e.close()};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)}},[e,i]);let x;if(i==="press")x={...h,...d};else if(i==="longPress")x={...p,...d};else if(i==="contextMenu"){x=m;let{"aria-haspopup":g,"aria-expanded":w,"aria-controls":v,...S}=s;s=S}return{menuTriggerProps:{...s,...x,id:l},menuProps:{...c,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const cs=new WeakMap;function Jd(t,e,r){let{shouldFocusWrap:n=!0,onKeyDown:o,onKeyUp:i,...l}=t;!t["aria-label"]&&!t["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=ye(t,{labelable:!0}),{listProps:c}=od({...l,ref:r,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:n,linkBehavior:"override"});return cs.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:ee(s,{onKeyDown:o,onKeyUp:i},{role:"menu",...c,onKeyDown:u=>{(u.key!=="Escape"||t.shouldUseVirtualFocus)&&c.onKeyDown?.(u)}})}}function Qd(t,e,r){let{id:n,key:o,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":c,onPressStart:u,onPressUp:d,onPress:f,onPressChange:p,onPressEnd:h,onClick:m,onHoverStart:x,onHoverChange:g,onHoverEnd:w,onKeyDown:v,onKeyUp:S,onFocus:k,onFocusChange:V,onBlur:I,selectionManager:L=e.selectionManager}=t,C=!!c,K=C&&t["aria-expanded"]==="true",W=t.isDisabled??L.isDisabled(o),z=t.isSelected??L.isSelected(o),j=cs.get(e),U=e.collection.getItem(o),y=t.onClose||j.onClose,T=_t(),G=()=>{if(!C&&(U?.props?.onAction?U.props.onAction():t.onAction&&t.onAction(o),j.onAction)){let le=j.onAction;le(o,U?.value)}},N="menuitem";C||(L.selectionMode==="single"?N="menuitemradio":L.selectionMode==="multiple"&&(N="menuitemcheckbox"));let Y=kr(),E=kr(),$=kr(),H={id:n,"aria-disabled":W||void 0,role:N,"aria-label":t["aria-label"],"aria-labelledby":Y,"aria-describedby":[t["aria-describedby"],E,$].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":c,"aria-expanded":t["aria-expanded"]};if(L.selectionMode!=="none"&&!C&&(H["aria-checked"]=z),s){let le=Number(U?.index);H["aria-posinset"]=Number.isNaN(le)?void 0:le+1,H["aria-setsize"]=ad(e.collection)}let ae=a.useRef(!1),pe=le=>{p?.(le),ae.current=le},ne=a.useRef(null),P=le=>{le.pointerType!=="keyboard"&&(ne.current={pointerType:le.pointerType}),le.pointerType==="mouse"&&(ae.current||le.target.click()),d?.(le)},R=le=>{m?.(le),G(),gc(le,T,U.props.href,U?.props.routerOptions);let pt=ne.current?.pointerType==="keyboard"?ne.current?.key==="Enter"||L.selectionMode==="none"||L.isLink(o):L.selectionMode!=="multiple"||L.isLink(o);pt=l??i??pt,y&&!C&&pt&&y(),ne.current=null},{itemProps:oe,isFocused:ge}=vi({id:n,selectionManager:L,key:o,ref:r,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:j.shouldUseVirtualFocus}),{pressProps:se,isPressed:ft}=tr({onPressStart:u,onPress:f,onPressUp:P,onPressChange:pe,onPressEnd:h,isDisabled:W}),{hoverProps:D}=ir({isDisabled:W,onHoverStart(le){!yt()&&!(K&&c)&&(L.setFocused(!0),L.setFocusedKey(o)),x?.(le)},onHoverChange:g,onHoverEnd:w}),{keyboardProps:M}=at({shortcuts:{" ":le=>{ne.current={pointerType:"keyboard",key:" "},A(le).click(),zr("keyboard")},Enter:le=>{ne.current={pointerType:"keyboard",key:"Enter"};let pt=A(le);if(pt.tagName!=="A"){pt.click(),zr("keyboard");return}return zr("keyboard"),{shouldPreventDefault:!1,shouldContinuePropagation:!1}}},onKeyDown:v,onKeyUp:S}),{focusableProps:ue}=Ur({onBlur:I,onFocus:k,onFocusChange:V},r),re=ye(U?.props);delete re.id;let Er=no(U?.props);return{menuItemProps:{...H,...ee(re,Er,C?{onFocus:oe.onFocus,"data-collection":oe["data-collection"],"data-key":oe["data-key"]}:oe,se,D,M,ue,j.shouldUseVirtualFocus||C?{onMouseDown:le=>le.preventDefault()}:void 0,W?void 0:{onClick:R}),tabIndex:oe.tabIndex!=null&&K&&!j.shouldUseVirtualFocus?-1:oe.tabIndex},labelProps:{id:Y},descriptionProps:{id:E},keyboardShortcutProps:{id:$},isFocused:ge,isFocusVisible:ge&&L.isFocused&&yt()&&!K,isSelected:z,isPressed:ft,isDisabled:W}}function ef(t){let{heading:e,"aria-label":r}=t,n=Se();return{itemProps:{role:"presentation"},headingProps:e?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":e?n:void 0}}}function us(t){let e=Sl(t),[r,n]=a.useState(null),[o,i]=a.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:r,...e,open(u=null){n(u),e.open()},toggle(u=null){n(u),e.toggle()},close(){l()},expandedKeysStack:o,openSubmenu:(u,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),u])},closeSubmenu:(u,d)=>{i(f=>f[d]===u?f.slice(0,d):f)}}}class tf{constructor(e,{expandedKeys:r}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,r=r||new Set;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&(l.type==="section"||r.has(l.key)))for(let s of l.childNodes)n(s)};for(let l of e)n(l);let o=null,i=0;for(let[l,s]of this.keyMap)o?(o.nextKey=l,s.prevKey=o.key):(this.firstKey=l,s.prevKey=void 0),s.type==="item"&&(s.index=i++),o=s,o.nextKey=void 0;this.lastKey=o?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);return r?r.prevKey??null:null}getKeyAfter(e){let r=this.keyMap.get(e);return r?r.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}}function rf(t){let{onExpandedChange:e}=t,[r,n]=Gt(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),o=hn(t),i=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),l=Ni(t,a.useCallback(c=>new tf(c,{expandedKeys:r}),[r]),null);return a.useEffect(()=>{o.focusedKey!=null&&!l.getItem(o.focusedKey)&&o.setFocusedKey(null)},[l,o.focusedKey]),{collection:l,expandedKeys:r,disabledKeys:i,toggleKey:c=>{n(nf(r,c))},setExpandedKeys:n,selectionManager:new Ct(l,o)}}function nf(t,e){let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r}const ds=a.createContext(null),wn=a.createContext(null),En=a.createContext(null),hr=a.createContext(null);function of(t){let e=us(t),r=a.useRef(null),{menuTriggerProps:n,menuProps:o}=Zd({...t,type:"menu"},e,r),i=a.useRef(null);return Ko()?null:a.createElement(bt,{values:[[ds,{...o,ref:i}],[ps,e],[En,e],[kl,{trigger:"MenuTrigger",triggerRef:r,scrollRef:i,placement:"bottom start","aria-labelledby":o["aria-labelledby"],offset:t.trigger==="contextMenu"?0:void 0}]]},a.createElement(Bd,{...n,ref:r,isPressed:e.isOpen},t.children))}const lf=a.createContext(null),On=class On extends Re{filter(e,r,n){let o=e.getItem(this.firstChildKey);if(o&&n(o.textValue,this)){let i=this.clone();return r.addDescendants(i,e),i}return null}};On.type="submenutrigger";let fs=On;const sf=a.forwardRef(function(e,r){return[e,r]=ot(e,r,ds),a.createElement(Ao,{content:a.createElement(Bo,e)},n=>a.createElement(af,{props:e,collection:n,menuRef:r}))});function af({props:t,collection:e,menuRef:r}){[t,r]=ot(t,r,mo);let{filter:n,...o}=t,i=a.useMemo(()=>n?e.filter(n):e,[e,n]),l=rf({...t,collection:i,children:void 0}),s=a.useContext(En),{isVirtualized:c,CollectionRoot:u}=a.useContext(Zt),{menuProps:d}=Jd({...t,isVirtualized:c,onClose:t.onClose||s?.close},l,r),f=Ae({...t,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),p=null;l.collection.size===0&&t.renderEmptyState&&(p=a.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState()));let h=ye(t,{global:!0});return a.createElement(ui,null,a.createElement(Ce.div,{...ee(h,f,d),ref:r,slot:t.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:t.onScroll},a.createElement(bt,{values:[[wn,l],[Hu,{elementType:"div"}],[hu,{name:"MenuSection",render:uf}],[lf,{parentMenuRef:r,shouldUseVirtualFocus:o?.shouldUseVirtualFocus}],[Nt,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[mo,null],[Bc,null],[hr,l.selectionManager],[En,s??us({})]]},a.createElement(ii,null,a.createElement(u,{collection:l.collection,persistedKeys:_o(l.selectionManager.focusedKey),scrollRef:r}))),p))}class cf extends Ct{constructor(e,r){super(e.collection,r),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,r){return this.parent.setFocusedKey(e,r)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}}function uf(t,e,r,n="react-aria-MenuSection"){let o=a.useContext(wn),{CollectionBranch:i}=a.useContext(Zt),[l,s]=Wa(),{headingProps:c,groupProps:u}=ef({heading:s,"aria-label":r.props["aria-label"]??void 0}),d=Ae({...t,id:void 0,children:void 0,defaultClassName:n,className:r.props?.className,style:r.props?.style,values:void 0}),f=a.useContext(hr),p=hn(t),h=t.selectionMode!=null?new cf(f,p):f,m=It(Nt)?.shouldCloseOnSelect,x=ye(t,{global:!0});return delete x.id,a.createElement(Ce.section,{...ee(x,d,u),ref:e},a.createElement(bt,{values:[[_u,{...c,ref:l}],[hr,h],[Nt,{shouldCloseOnSelect:t.shouldCloseOnSelect??m}]]},a.createElement(i,{collection:o.collection,parent:r})))}const Nt=a.createContext(null),df=Fo(Hr,function(e,r,n){[e,r]=ot(e,r,Nt);let o=It(Nt)?.id,i=a.useContext(wn),l=gt(r),s=a.useContext(hr),{isVirtualized:c}=a.useContext(Zt),{menuItemProps:u,labelProps:d,descriptionProps:f,keyboardShortcutProps:p,...h}=Qd({...e,id:o,key:n.key,selectionManager:s,isVirtualized:c},i,l),{hoverProps:m,isHovered:x}=ir({isDisabled:h.isDisabled}),g=Ae({...e,id:void 0,children:n.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:x,isFocusVisible:h.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?Ce.a:Ce.div,v=ye(e,{global:!0});return delete v.id,delete v.onClick,a.createElement(w,{...ee(v,g,u,m),ref:l,"data-disabled":h.isDisabled||void 0,"data-hovered":x||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":h.isFocusVisible||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},a.createElement(bt,{values:[[Au,{slots:{[jn]:d,label:d,description:f}}],[Rd,p],[li,{isSelected:h.isSelected}]]},g.children))}),ps=a.createContext(null),hs=new WeakMap;function gs(t,e,r){if(!t)return"";typeof e=="string"&&(e=e.replace(/\s+/g,""));let n=hs.get(t);return process.env.NODE_ENV!=="production"&&!n&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${n}-${r}-${e}`}function ff(t,e,r){let{key:n,isDisabled:o,shouldSelectOnPressUp:i}=t,{selectionManager:l,selectedKey:s}=e,c=n===s,u=o||e.isDisabled||e.selectionManager.isDisabled(n),d=e.collection.getItem(n),{itemProps:f,isPressed:p}=vi({selectionManager:l,key:n,ref:r,isDisabled:u,shouldSelectOnPressUp:i??d?.props.href!=null,linkBehavior:"selection"}),h=gs(e,n,"tab"),m=gs(e,n,"tabpanel"),{tabIndex:x}=f,g=ye(d?.props,{labelable:!0});delete g.id;let w=no(d?.props),{focusableProps:v}=Ur({...d?.props,isDisabled:u},r);return{tabProps:ee(g,v,w,f,{id:h,"aria-selected":c,"aria-disabled":u||void 0,"aria-controls":c?m:void 0,tabIndex:u?void 0:x,role:"tab"}),isSelected:c,isDisabled:u,isPressed:p}}class pf{constructor(e,r,n,o=new Set){this.collection=e,this.flipDirection=r==="rtl"&&n==="horizontal",this.disabledKeys=o,this.tabDirection=n==="horizontal"}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let r=e;do r=this.collection.getKeyAfter(r),r==null&&(r=this.collection.getFirstKey());while(r!=null&&this.isDisabled(r)&&r!==e);return r}getPreviousKey(e){let r=e;do r=this.collection.getKeyBefore(r),r==null&&(r=this.collection.getLastKey());while(r!=null&&this.isDisabled(r)&&r!==e);return r}}function hf(t,e,r){let{orientation:n="horizontal",keyboardActivation:o="automatic"}=t,{collection:i,selectionManager:l,disabledKeys:s}=e,{direction:c}=it(),u=a.useMemo(()=>new pf(i,c,n,s),[i,s,n,c]),{collectionProps:d}=yi({ref:r,selectionManager:l,keyboardDelegate:u,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),f=Se();hs.set(e,f);let p=ao({...t,id:f});return{tabListProps:{...ee(d,p),role:"tablist","aria-orientation":n,tabIndex:void 0}}}function gf(t){let[e,r]=Gt(t.selectedKey,t.defaultSelectedKey??null,t.onSelectionChange),n=a.useMemo(()=>e!=null?[e]:[],[e]),{collection:o,disabledKeys:i,selectionManager:l}=fd({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:n,onSelectionChange:c=>{if(c==="all")return;let u=c.values().next().value??null;u===e&&t.onSelectionChange&&t.onSelectionChange(u),r(u)}}),s=e!=null?o.getItem(e):null;return{collection:o,disabledKeys:i,selectionManager:l,selectedKey:e,setSelectedKey:r,selectedItem:s}}function bf(t){let e=gf({...t,onSelectionChange:t.onSelectionChange?l=>{l!=null&&t.onSelectionChange?.(l)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:t.defaultSelectedKey??bs(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)??void 0}),{selectionManager:r,collection:n,selectedKey:o}=e,i=a.useRef(o);return a.useEffect(()=>{let l=o;t.selectedKey==null&&(r.isEmpty||l==null||!n.getItem(l))&&(l=bs(n,e.disabledKeys),l!=null&&r.setSelectedKeys([l])),(l!=null&&r.focusedKey==null||!r.isFocused&&l!==i.current)&&r.setFocusedKey(l),i.current=l}),{...e,isDisabled:t.isDisabled||!1}}function bs(t,e){let r=null;if(t){for(r=t.getFirstKey();r!=null&&(e.has(r)||t.getItem(r)?.props?.isDisabled)&&r!==t.getLastKey();)r=t.getKeyAfter(r);r!=null&&(e.has(r)||t.getItem(r)?.props?.isDisabled)&&r===t.getLastKey()&&(r=t.getFirstKey())}return r}const $n=a.createContext(null),gr=a.createContext(null),ms=a.forwardRef(function(e,r){[e,r]=ot(e,r,$n);let{children:n,orientation:o="horizontal"}=e;return n=a.useMemo(()=>typeof n=="function"?n({orientation:o,defaultChildren:null}):n,[n,o]),a.createElement(Ao,{content:n},i=>a.createElement(mf,{props:e,collection:i,tabsRef:r}))});function mf({props:t,tabsRef:e,collection:r}){let{orientation:n="horizontal"}=t,o=bf({...t,collection:r,children:void 0}),{focusProps:i,isFocused:l,isFocusVisible:s}=en({within:!0}),c=a.useMemo(()=>({orientation:n,isFocusWithin:l,isFocusVisible:s}),[n,l,s]),u=Ae({...t,defaultClassName:"react-aria-Tabs",values:c}),d=ye(t,{global:!0});return a.createElement(Ce.div,{...ee(d,u,i),ref:e,slot:t.slot||void 0,"data-focused":l||void 0,"data-orientation":n,"data-focus-visible":s||void 0,"data-disabled":o.isDisabled||void 0},a.createElement(bt,{values:[[$n,t],[gr,o]]},u.children))}const ys=a.forwardRef(function(e,r){return a.useContext(gr)?a.createElement(yf,{props:e,forwardedRef:r}):a.createElement(Bo,e)});function yf({props:t,forwardedRef:e}){let r=a.useContext(gr),{CollectionRoot:n}=a.useContext(Zt),{orientation:o="horizontal",keyboardActivation:i="automatic"}=It($n),l=gt(e),{tabListProps:s}=hf({...t,orientation:o,keyboardActivation:i},r,l),c=Ae({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:o,state:r}}),u=ye(t,{global:!0});return delete u.id,a.createElement(Ce.div,{...ee(u,c,s),ref:l,"data-orientation":o||void 0},a.createElement(ii,null,a.createElement(n,{collection:r.collection,persistedKeys:_o(r.selectionManager.focusedKey)})))}const Bn=class Bn extends Re{};Bn.type="item";let Sn=Bn;const xs=Fo(Sn,(t,e,r)=>{let n=a.useContext(gr),o=gt(e),{tabProps:i,isSelected:l,isDisabled:s,isPressed:c}=ff({key:r.key,...t},n,o),{focusProps:u,isFocused:d,isFocusVisible:f}=en(),{hoverProps:p,isHovered:h}=ir({isDisabled:s,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),m=Ae({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:l,isDisabled:s,isFocused:d,isFocusVisible:f,isPressed:c,isHovered:h}}),x=r.props.href?Ce.a:Ce.div,g=ye(t,{global:!0});return delete g.id,delete g.onClick,a.createElement(x,{...ee(g,m,i,u,p),ref:o,"data-selected":l||void 0,"data-disabled":s||void 0,"data-focused":d||void 0,"data-focus-visible":f||void 0,"data-pressed":c||void 0,"data-hovered":h||void 0},a.createElement(li.Provider,{value:{isSelected:l}},m.children))}),xf=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},vf=(t,e)=>({classGroupId:t,validator:e}),vs=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),br="-",ws=[],wf="arbitrary..",Ef=t=>{const e=Sf(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return $f(l);const s=l.split(br),c=s[0]===""&&s.length>1?1:0;return Es(s,c,e)},getConflictingClassGroupIds:(l,s)=>{if(s){const c=n[l],u=r[l];return c?u?xf(u,c):c:u||ws}return r[l]||ws}}},Es=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const o=t[e],i=r.nextPart.get(o);if(i){const u=Es(t,e+1,i);if(u)return u}const l=r.validators;if(l===null)return;const s=e===0?t.join(br):t.slice(e).join(br),c=l.length;for(let u=0;u<c;u++){const d=l[u];if(d.validator(s))return d.classGroupId}},$f=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?wf+n:void 0})(),Sf=t=>{const{theme:e,classGroups:r}=t;return Cf(r,e)},Cf=(t,e)=>{const r=vs();for(const n in t){const o=t[n];Cn(o,r,n,e)}return r},Cn=(t,e,r,n)=>{const o=t.length;for(let i=0;i<o;i++){const l=t[i];kf(l,e,r,n)}},kf=(t,e,r,n)=>{if(typeof t=="string"){Pf(t,e,r);return}if(typeof t=="function"){Tf(t,e,r,n);return}Nf(t,e,r,n)},Pf=(t,e,r)=>{const n=t===""?e:$s(e,t);n.classGroupId=r},Tf=(t,e,r,n)=>{if(Kf(t)){Cn(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(vf(r,t))},Nf=(t,e,r,n)=>{const o=Object.entries(t),i=o.length;for(let l=0;l<i;l++){const[s,c]=o[l];Cn(c,$s(e,s),r,n)}},$s=(t,e)=>{let r=t;const n=e.split(br),o=n.length;for(let i=0;i<o;i++){const l=n[i];let s=r.nextPart.get(l);s||(s=vs(),r.nextPart.set(l,s)),r=s}return r},Kf=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Lf=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const o=(i,l)=>{r[i]=l,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(i){let l=r[i];if(l!==void 0)return l;if((l=n[i])!==void 0)return o(i,l),l},set(i,l){i in r?r[i]=l:o(i,l)}}},kn="!",Ss=":",Mf=[],Cs=(t,e,r,n,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Df=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=o=>{const i=[];let l=0,s=0,c=0,u;const d=o.length;for(let x=0;x<d;x++){const g=o[x];if(l===0&&s===0){if(g===Ss){i.push(o.slice(c,x)),c=x+1;continue}if(g==="/"){u=x;continue}}g==="["?l++:g==="]"?l--:g==="("?s++:g===")"&&s--}const f=i.length===0?o:o.slice(c);let p=f,h=!1;f.endsWith(kn)?(p=f.slice(0,-1),h=!0):f.startsWith(kn)&&(p=f.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return Cs(i,h,p,m)};if(e){const o=e+Ss,i=n;n=l=>l.startsWith(o)?i(l.slice(o.length)):Cs(Mf,!1,l,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},If=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const l=r[i],s=l[0]==="[",c=e.has(l);s||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(l)):o.push(l)}return o.length>0&&(o.sort(),n.push(...o)),n}},Af=t=>({cache:Lf(t.cacheSize),parseClassName:Df(t),sortModifiers:If(t),postfixLookupClassGroupIds:Ff(t),...Ef(t)}),Ff=t=>{const e=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)e[r[n]]=!0;return e},Of=/\s+/,Bf=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:l}=e,s=[],c=t.trim().split(Of);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:h,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:g}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let w=!!g,v;if(w){const L=x.substring(0,g);v=n(L);const C=v&&l[v]?n(x):void 0;C&&C!==v&&(v=C,w=!1)}else v=n(x);if(!v){if(!w){u=f+(u.length>0?" "+u:u);continue}if(v=n(x),!v){u=f+(u.length>0?" "+u:u);continue}w=!1}const S=h.length===0?"":h.length===1?h[0]:i(h).join(":"),k=m?S+kn:S,V=k+v;if(s.indexOf(V)>-1)continue;s.push(V);const I=o(v,w);for(let L=0;L<I.length;++L){const C=I[L];s.push(k+C)}u=f+(u.length>0?" "+u:u)}return u},zf=(...t)=>{let e=0,r,n,o="";for(;e<t.length;)(r=t[e++])&&(n=ks(r))&&(o&&(o+=" "),o+=n);return o},ks=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=ks(t[n]))&&(r&&(r+=" "),r+=e);return r},_f=(t,...e)=>{let r,n,o,i;const l=c=>{const u=e.reduce((d,f)=>f(d),t());return r=Af(u),n=r.cache.get,o=r.cache.set,i=s,s(c)},s=c=>{const u=n(c);if(u)return u;const d=Bf(c,r);return o(c,d),d};return i=l,(...c)=>i(zf(...c))},Vf=[],de=t=>{const e=r=>r[t]||Vf;return e.isThemeGetter=!0,e},Ps=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ts=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hf=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Wf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Uf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_e=t=>Hf.test(t),Z=t=>!!t&&!Number.isNaN(Number(t)),Ne=t=>!!t&&Number.isInteger(Number(t)),Pn=t=>t.endsWith("%")&&Z(t.slice(0,-1)),Ie=t=>Wf.test(t),Ns=()=>!0,qf=t=>jf.test(t)&&!Uf.test(t),Tn=()=>!1,Yf=t=>Gf.test(t),Xf=t=>Rf.test(t),Zf=t=>!B(t)&&!_(t),Jf=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Qf=t=>Ve(t,As,Tn),B=t=>Ps.test(t),Je=t=>Ve(t,Fs,qf),Ks=t=>Ve(t,sp,Z),ep=t=>Ve(t,Bs,Ns),tp=t=>Ve(t,Os,Tn),Ls=t=>Ve(t,Ds,Tn),rp=t=>Ve(t,Is,Xf),mr=t=>Ve(t,zs,Yf),_=t=>Ts.test(t),Kt=t=>Qe(t,Fs),np=t=>Qe(t,Os),Ms=t=>Qe(t,Ds),op=t=>Qe(t,As),ip=t=>Qe(t,Is),yr=t=>Qe(t,zs,!0),lp=t=>Qe(t,Bs,!0),Ve=(t,e,r)=>{const n=Ps.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Qe=(t,e,r=!1)=>{const n=Ts.exec(t);return n?n[1]?e(n[1]):r:!1},Ds=t=>t==="position"||t==="percentage",Is=t=>t==="image"||t==="url",As=t=>t==="length"||t==="size"||t==="bg-size",Fs=t=>t==="length",sp=t=>t==="number",Os=t=>t==="family-name",Bs=t=>t==="number"||t==="weight",zs=t=>t==="shadow",ap=_f(()=>{const t=de("color"),e=de("font"),r=de("text"),n=de("font-weight"),o=de("tracking"),i=de("leading"),l=de("breakpoint"),s=de("container"),c=de("spacing"),u=de("radius"),d=de("shadow"),f=de("inset-shadow"),p=de("text-shadow"),h=de("drop-shadow"),m=de("blur"),x=de("perspective"),g=de("aspect"),w=de("ease"),v=de("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...k(),_,B],I=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],C=()=>[_,B,c],K=()=>[_e,"full","auto",...C()],W=()=>[Ne,"none","subgrid",_,B],z=()=>["auto",{span:["full",Ne,_,B]},Ne,_,B],j=()=>[Ne,"auto",_,B],U=()=>["auto","min","max","fr",_,B],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],T=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...C()],N=()=>[_e,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],Y=()=>[_e,"screen","full","dvw","lvw","svw","min","max","fit",...C()],E=()=>[_e,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],$=()=>[t,_,B],H=()=>[...k(),Ms,Ls,{position:[_,B]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],pe=()=>["auto","cover","contain",op,Qf,{size:[_,B]}],ne=()=>[Pn,Kt,Je],P=()=>["","none","full",u,_,B],R=()=>["",Z,Kt,Je],oe=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Z,Pn,Ms,Ls],ft=()=>["","none",m,_,B],D=()=>["none",Z,_,B],M=()=>["none",Z,_,B],ue=()=>[Z,_,B],re=()=>[_e,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ie],breakpoint:[Ie],color:[Ns],container:[Ie],"drop-shadow":[Ie],ease:["in","out","in-out"],font:[Zf],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ie],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ie],shadow:[Ie],spacing:["px",Z],text:[Ie],"text-shadow":[Ie],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_e,B,_,g]}],container:["container"],"container-type":[{"@container":["","normal","size",_,B]}],"container-named":[Jf],columns:[{columns:[Z,B,_,s]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Ne,"auto",_,B]}],basis:[{basis:[_e,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Z,_e,"auto","initial","none",B]}],grow:[{grow:["",Z,_,B]}],shrink:[{shrink:["",Z,_,B]}],order:[{order:[Ne,"first","last","none",_,B]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...T(),"normal"]}],"justify-self":[{"justify-self":["auto",...T()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...T(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...T(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...T(),"baseline"]}],"place-self":[{"place-self":["auto",...T()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...E()]}],"min-block-size":[{"min-block":["auto",...E()]}],"max-block-size":[{"max-block":["none",...E()]}],w:[{w:[s,"screen",...N()]}],"min-w":[{"min-w":[s,"screen","none",...N()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",r,Kt,Je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,lp,ep]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pn,B]}],"font-family":[{font:[np,tp,e]}],"font-features":[{"font-features":[B]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,_,B]}],"line-clamp":[{"line-clamp":[Z,"none",_,Ks]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",_,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Z,"from-font","auto",_,Je]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Z,"auto",_,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Ne,_,B]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ne,_,B],radial:["",_,B],conic:[Ne,_,B]},ip,rp]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Z,_,B]}],"outline-w":[{outline:["",Z,Kt,Je]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",d,yr,mr]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",f,yr,mr]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Z,Je]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",p,yr,mr]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Z,_,B]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[_,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_,B]}],filter:[{filter:["","none",_,B]}],blur:[{blur:ft()}],brightness:[{brightness:[Z,_,B]}],contrast:[{contrast:[Z,_,B]}],"drop-shadow":[{"drop-shadow":["","none",h,yr,mr]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Z,_,B]}],"hue-rotate":[{"hue-rotate":[Z,_,B]}],invert:[{invert:["",Z,_,B]}],saturate:[{saturate:[Z,_,B]}],sepia:[{sepia:["",Z,_,B]}],"backdrop-filter":[{"backdrop-filter":["","none",_,B]}],"backdrop-blur":[{"backdrop-blur":ft()}],"backdrop-brightness":[{"backdrop-brightness":[Z,_,B]}],"backdrop-contrast":[{"backdrop-contrast":[Z,_,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Z,_,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,_,B]}],"backdrop-invert":[{"backdrop-invert":["",Z,_,B]}],"backdrop-opacity":[{"backdrop-opacity":[Z,_,B]}],"backdrop-saturate":[{"backdrop-saturate":[Z,_,B]}],"backdrop-sepia":[{"backdrop-sepia":["",Z,_,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Z,"initial",_,B]}],ease:[{ease:["linear","initial",w,_,B]}],delay:[{delay:[Z,_,B]}],animate:[{animate:["none",v,_,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,_,B]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:D()}],"rotate-x":[{"rotate-x":D()}],"rotate-y":[{"rotate-y":D()}],"rotate-z":[{"rotate-z":D()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[_,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],zoom:[{zoom:[Ne,_,B]}],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":$()}],"scrollbar-track-color":[{"scrollbar-track":$()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_,B]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[Z,Kt,Je,Ks]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Ke(...t){return ap(O(t))}const _s=a.createContext({size:"md"}),cp=()=>a.useContext(_s),Vs=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Hs=O,F=(t,e)=>r=>{var n;if(e?.variants==null)return Hs(t,r?.class,r?.className);const{variants:o,defaultVariants:i}=e,l=Object.keys(o).map(u=>{const d=r?.[u],f=i?.[u];if(d===null)return null;const p=Vs(d)||Vs(f);return o[u][p]}),s=r&&Object.entries(r).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:p,...h}=d;return Object.entries(h).every(m=>{let[x,g]=m;return Array.isArray(g)?g.includes({...i,...s}[x]):{...i,...s}[x]===g})?[...u,f,p]:u},[]);return Hs(t,l,c,r?.class,r?.className)},up={xs:18,sm:20,md:20,lg:24,xl:28,"2xl":28},dp=F("inline-flex shrink-0 items-center justify-center [&_svg]:size-full",{variants:{size:{xs:"size-[18px]",sm:"size-[20px]",md:"size-[20px]",lg:"size-[24px]",xl:"size-[28px]","2xl":"size-[28px]"}},defaultVariants:{size:"md"}}),fp=F(["relative inline-flex items-center justify-center font-bold","transition-[color,background-color,border-color,box-shadow,filter,transform] duration-150","focus-visible:outline-none","[-webkit-tap-highlight-color:transparent]","disabled:cursor-not-allowed data-[disabled]:cursor-not-allowed data-[pending]:cursor-wait","data-[pressed]:brightness-[0.96]"],{variants:{size:{xs:"py-1 px-2 gap-1 rounded-md text-caption-sm",sm:"h-[36px] px-4 gap-1 rounded-lg text-caption-sm",md:"h-[44px] px-4 gap-2 rounded-lg text-sm",lg:"h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",xl:"h-[60px] px-6 gap-2 rounded-[10px] text-body-lg","2xl":"h-[68px] px-6 gap-2 rounded-[10px] text-body-lg"},tone:{primary:"",destructive:""},iconOnly:{true:"!p-0",false:""},variant:{solid:["text-white","disabled:bg-light-100 disabled:text-light-400","data-[pending]:!bg-light-100 data-[pending]:!text-light-400"],outline:["bg-white border","disabled:bg-white disabled:text-light-400 disabled:border-light-200","data-[pending]:!bg-white data-[pending]:!text-light-400 data-[pending]:!border-light-200"],ghost:["bg-transparent","disabled:text-light-400","data-[pending]:!bg-transparent data-[pending]:!text-light-400"],"outline-primary":["bg-white border border-primary-500 text-primary-500","hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400 disabled:border-light-200","data-[pending]:!bg-white data-[pending]:!text-light-400 data-[pending]:!border-light-200"],"ghost-primary":["bg-transparent text-primary-500","hover:bg-primary-50 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:text-light-400","data-[pending]:!bg-transparent data-[pending]:!text-light-400"],plain:["bg-transparent h-auto rounded-none p-0 gap-1","disabled:text-light-400 data-[pending]:!text-light-400"],"plain-black":["bg-transparent h-auto rounded-none p-0 gap-1","disabled:text-light-400 data-[pending]:!text-light-400"]}},compoundVariants:[{tone:"primary",variant:"solid",class:["bg-primary-500","hover:bg-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"outline",class:["border-light-200 text-light-900","hover:bg-light-50","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"ghost",class:["text-light-800","hover:bg-light-50 hover:text-light-900","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"plain",class:["text-primary-500","hover:text-primary-800 hover:bg-transparent","focus-visible:rounded focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"plain-black",class:["text-light-800","hover:text-light-900 hover:bg-transparent","focus-visible:rounded focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"destructive",variant:"solid",class:["bg-error-500 text-white","hover:bg-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-light-100 data-[pending]:!bg-light-100"].join(" ")},{tone:"destructive",variant:"outline",class:["border-error-500 text-error-500","hover:border-error-300 hover:bg-error-100 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"destructive",variant:"ghost",class:["text-error-500","hover:bg-error-50 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400","data-[pending]:!bg-white data-[pending]:!text-light-400"].join(" ")},{tone:"destructive",variant:"plain",class:["text-error-500","hover:text-error-800 hover:bg-transparent","focus-visible:rounded focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{size:"xs",iconOnly:!0,class:"!w-[26px] !h-[26px]"},{size:"sm",iconOnly:!0,class:"!w-[36px] !h-[36px]"},{size:"md",iconOnly:!0,class:"!w-[44px] !h-[44px]"},{size:"lg",iconOnly:!0,class:"!w-[52px] !h-[52px]"},{size:"xl",iconOnly:!0,class:"!w-[60px] !h-[60px]"},{size:"2xl",iconOnly:!0,class:"!w-[68px] !h-[68px]"}],defaultVariants:{size:"md",tone:"primary",variant:"solid",iconOnly:!1}}),pp={xs:12,sm:14,md:16,lg:18,xl:20,"2xl":22},Ws=a.forwardRef(({children:t,className:e,tone:r,variant:n,size:o="md",iconOnly:i,isDisabled:l,disabled:s,isPending:c,...u},d)=>a.createElement(_s.Provider,{value:{size:o}},a.createElement(ti,{...u,ref:d,isDisabled:l||s,isPending:c,className:Un(e,f=>Ke(fp({tone:r,variant:n,size:o,iconOnly:i}),f))},Un(t,(f,{isPending:p})=>a.createElement(a.Fragment,null,p?a.createElement("span",{className:"flex shrink-0 items-center","aria-hidden":!0},a.createElement(Na,{size:pp[o],className:"animate-spin"})):null,p&&i?null:f)))));Ws.displayName="Button";const hp=({children:t})=>{const{size:e}=cp();return a.createElement("span",{className:dp({size:e})},t)},gp=({children:t})=>a.createElement("span",{className:"whitespace-nowrap"},t),xr=Ws;xr.Icon=hp,xr.Text=gp;const bp=F(["inline-flex items-center justify-center","border transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4 rounded-[4px]",md:"h-5 w-5 rounded-[6px]",lg:"h-5 w-5 rounded-[6px]"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-white border-light-200 hover:border-light-400"},{checked:!0,disabled:!1,className:"bg-primary-500 border-primary-500 text-white hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"bg-light-100 border-light-200 text-white"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),mp={sm:{width:12,height:9},md:{width:14,height:10},lg:{width:14,height:10}},js=b.forwardRef(({id:t,checked:e,indeterminate:r=!1,disabled:n,size:o="md",onCheckedChange:i,className:l},s)=>{const c=()=>{n||i?.(!e)},u=mp[o],d=n?"text-white/80":"text-current";return b.createElement("button",{id:t,ref:s,type:"button",role:"checkbox","aria-checked":r?"mixed":e,disabled:n,onClick:c,className:O(bp({size:o,checked:e,disabled:n}),l)},e&&!r&&b.createElement("svg",{width:u.width,height:u.height,viewBox:"0 0 14 10",fill:"none",className:d},b.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),r&&b.createElement("span",{className:O(d,"bg-current rounded-sm",o==="sm"&&"h-0.5 w-3",(o==="md"||o==="lg")&&"h-0.5 w-4")}))});js.displayName="Checkbox";const Us=b.createContext(null),yp=({value:t,defaultValue:e,onValueChange:r,children:n,className:o})=>{const[i,l]=b.useState(e),s=t??i,c=u=>{l(u),r?.(u)};return b.createElement(Us.Provider,{value:{value:s,onValueChange:c}},b.createElement("div",{role:"radiogroup",className:o},n))},xp=()=>{const t=b.useContext(Us);if(!t)throw new Error("RadioGroupItem must be used within RadioGroup");return t},vp=F(["relative inline-flex items-center justify-center","border rounded-full transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"border-light-200 bg-white hover:border-light-400"},{checked:!0,disabled:!1,className:"border-primary-500 bg-primary-500 hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"border-light-200 bg-light-100"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),wp=F(["rounded-full bg-white transition-all"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2 w-2"},checked:{true:"scale-100",false:"scale-0"}},defaultVariants:{size:"md",checked:!1}}),Gs=b.forwardRef(({id:t,value:e,disabled:r,size:n="md",className:o},i)=>{const{value:l,onValueChange:s}=xp(),c=l===e;return b.createElement("button",{ref:i,id:t,type:"button",role:"radio","aria-checked":c,disabled:r,onClick:()=>{r||s?.(e)},className:O(vp({size:n,checked:c,disabled:r}),o)},b.createElement("span",{className:wp({size:n,checked:c})}))});Gs.displayName="RadioGroupItem";const Ep=F(["inline-flex items-center shrink-0 rounded-full p-[2px]","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-5 w-9",md:"h-6 w-11",lg:"h-6 w-11"},checked:{true:"justify-end",false:"justify-start"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"},variant:{default:"",success:""}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-light-200"},{checked:!0,disabled:!1,variant:"default",className:"bg-primary-500 hover:bg-primary-800"},{checked:!0,disabled:!1,variant:"success",className:"bg-success-500 hover:bg-success-800"},{disabled:!0,className:"bg-light-100"},{variant:"default",className:"focus-visible:ring-primary-400"},{variant:"success",className:"focus-visible:ring-success-500"}],defaultVariants:{size:"md",checked:!1,disabled:!1,variant:"default"}}),$p=F("rounded-full shrink-0 shadow-[0_1px_3px_0_rgba(16,24,40,0.10),0_1px_2px_0_rgba(16,24,40,0.06)]",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},disabled:{true:"bg-light-50",false:"bg-white"}},defaultVariants:{size:"md",disabled:!1}}),Rs=b.forwardRef(({checked:t=!1,size:e="md",variant:r="default",disabled:n,onCheckedChange:o,className:i},l)=>b.createElement("button",{ref:l,type:"button",role:"switch","aria-checked":t,disabled:n,onClick:()=>{n||o?.(!t)},className:O(Ep({size:e,checked:t,disabled:n,variant:r}),i)},b.createElement("span",{className:$p({size:e,disabled:n})})));Rs.displayName="Toggle";const Sp=F(["relative rounded-lg text-caption-sm font-semibold text-white","bg-primary-900","shadow-lg","pointer-events-none","select-none"],{variants:{side:{top:"",bottom:"",left:"",right:""},hasSupportingText:{true:"p-3",false:"px-3 py-2"}},defaultVariants:{side:"top",hasSupportingText:!1}}),Cp="mt-1 font-medium text-light-100",kp=F(["absolute"],{variants:{side:{top:["bottom-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-t-[6px] border-t-primary-900"],bottom:["top-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-b-[6px] border-b-primary-900"],left:["right-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-l-[6px] border-l-primary-900"],right:["left-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-r-[6px] border-r-primary-900"]}},defaultVariants:{side:"top"}}),vr=12,wr=({content:t,supportingText:e,side:r="top",open:n,defaultOpen:o=!1,disabled:i=!1,delay:l=0,className:s,children:c})=>{const[u,d]=b.useState(o),[f,p]=b.useState(null),h=n??u,m=b.useRef(null),x=b.useRef(null),g=b.useCallback(()=>{const S=m.current;if(!S)return null;const k=S.getBoundingClientRect();switch(r){case"top":return{top:k.top-vr,left:k.left+k.width/2};case"bottom":return{top:k.bottom+vr,left:k.left+k.width/2};case"left":return{top:k.top+k.height/2,left:k.left-vr};default:return{top:k.top+k.height/2,left:k.right+vr}}},[r]),w=()=>{if(i||!m.current)return;const S=()=>{p(g()),d(!0)};l>0?x.current=window.setTimeout(S,l):S()};b.useEffect(()=>{if(!h||!m.current)return;const S=()=>p(g());S();const k=new ResizeObserver(S);return k.observe(m.current),window.addEventListener("scroll",S,!0),window.addEventListener("resize",S),()=>{k.disconnect(),window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S)}},[h,g]);const v=()=>{x.current&&(clearTimeout(x.current),x.current=null),d(!1)};return b.createElement(b.Fragment,null,b.createElement("span",{ref:m,className:"inline-flex",onMouseEnter:w,onMouseLeave:v,onFocus:w,onBlur:v,tabIndex:0},c),h&&f&&et.createPortal(b.createElement("div",{role:"tooltip",className:"fixed z-[9999] pointer-events-none",style:{top:f.top,left:f.left,transform:r==="top"?"translate(-50%, -100%)":r==="bottom"?"translate(-50%, 0)":r==="left"?"translate(-100%, -50%)":"translate(0, -50%)"}},b.createElement("div",{className:O(Sp({side:r,hasSupportingText:!!e}),s)},t,e&&b.createElement("p",{className:Cp},e),b.createElement("span",{className:kp({side:r})}))),document.body))};wr.displayName="Tooltip";const Pp={brand:{bg:"bg-primary-50",border:"border-primary-300",text:"text-primary-700"},gray:{bg:"bg-white",border:"border-light-200",text:"text-light-800"},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700"},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700"},success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700"},"blue-gray":{bg:"bg-blue-gray-50",border:"border-blue-gray-200",text:"text-blue-gray-700"},"blue-light":{bg:"bg-blue-light-50",border:"border-blue-light-200",text:"text-blue-light-700"},indigo:{bg:"bg-indigo-50",border:"border-indigo-200",text:"text-indigo-700"},purple:{bg:"bg-purple-50",border:"border-purple-200",text:"text-purple-700"},blue:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700"},pink:{bg:"bg-pink-50",border:"border-pink-200",text:"text-pink-700"},orange:{bg:"bg-orange-50",border:"border-orange-200",text:"text-orange-700"}},Tp=F(["inline-flex items-center gap-1 border","font-medium transition-colors duration-150","select-none"],{variants:{size:{sm:"text-caption-sm py-[3px]",md:"text-caption-lg py-[2px]",lg:"text-caption-lg py-1"},shape:{rounded:"rounded-md",pill:"rounded-full"},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{size:"sm",hasLeading:!1,className:"pl-2"},{size:"sm",hasLeading:!0,className:"pl-1"},{size:"sm",hasTrailing:!1,className:"pr-2"},{size:"sm",hasTrailing:!0,className:"pr-1"},{size:"md",hasLeading:!1,className:"pl-[9px]"},{size:"md",hasLeading:!0,className:"pl-1"},{size:"md",hasTrailing:!1,className:"pr-[9px]"},{size:"md",hasTrailing:!0,className:"pr-1"},{size:"lg",hasLeading:!1,className:"pl-2.5"},{size:"lg",hasLeading:!0,className:"pl-1.5"},{size:"lg",hasTrailing:!1,className:"pr-2.5"},{size:"lg",hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"rounded",hasLeading:!1,hasTrailing:!1,interactive:!1,disabled:!1}}),Np=F(["shrink-0 rounded border bg-white transition-colors duration-150 size-3.5"],{variants:{checked:{true:"bg-primary-500 border-primary-500",false:""}},defaultVariants:{checked:!1}}),Kp="shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800",Lp="shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",qs=/^#([0-9a-f]{6})$/i,Ys=t=>qs.test(t.trim()),Xs=(t,e)=>{const r=qs.exec(t.trim());if(!r)return;const n=parseInt(r[1],16),o=n>>16&255,i=n>>8&255,l=n&255;return`rgba(${o}, ${i}, ${l}, ${e})`},Nn=({children:t,size:e="sm",shape:r="rounded",icon:n,checked:o,onCheckedChange:i,onClose:l,count:s,disabled:c=!1,className:u,color:d="gray",customColor:f})=>{const p=i!==void 0,h=o!==void 0||!!n,m=!!l||s!==void 0,x=Pp[d],g=!!(f&&Ys(f)),w=g?{borderColor:f,backgroundColor:Xs(f,.12),color:f}:void 0,v=()=>{c||i?.(!o)},S=k=>{!p||c||(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),v())};return b.createElement("div",{role:p?"checkbox":void 0,"aria-checked":p?!!o:void 0,"aria-disabled":c||void 0,tabIndex:p&&!c?0:void 0,onClick:p?v:void 0,onKeyDown:S,style:w,className:O(Tp({size:e,shape:r,hasLeading:h,hasTrailing:m,interactive:p,disabled:c}),!g&&x.bg,!g&&x.border,!g&&x.text,u)},o!==void 0&&b.createElement("span",{className:O(Np({checked:o}),!o&&!g&&x.border),style:!o&&g?{borderColor:f}:void 0},o&&b.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},b.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),n,b.createElement("span",{className:"whitespace-nowrap"},t),s!==void 0&&b.createElement("span",{className:Kp},s),l&&b.createElement("button",{type:"button","aria-label":"Remove",disabled:c,onClick:k=>{k.stopPropagation(),l()},className:Lp},b.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},b.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};Nn.displayName="Tag";const Mp={brand:{solidBg:"bg-primary-50",solidBorder:"border-primary-300",solidText:"text-primary-500",outlineBorder:"border-primary-500",outlineText:"text-primary-700"},gray:{solidBg:"bg-light-50",solidBorder:"border-light-200",solidText:"text-light-700",outlineBorder:"border-light-600",outlineText:"text-light-700"},error:{solidBg:"bg-error-50",solidBorder:"border-error-200",solidText:"text-error-700",outlineBorder:"border-error-600",outlineText:"text-error-700"},warning:{solidBg:"bg-warning-50",solidBorder:"border-warning-200",solidText:"text-warning-700",outlineBorder:"border-warning-600",outlineText:"text-warning-700"},success:{solidBg:"bg-success-50",solidBorder:"border-success-200",solidText:"text-success-700",outlineBorder:"border-success-600",outlineText:"text-success-700"},"blue-gray":{solidBg:"bg-blue-gray-50",solidBorder:"border-blue-gray-200",solidText:"text-blue-gray-700",outlineBorder:"border-blue-gray-600",outlineText:"text-blue-gray-700"},"blue-light":{solidBg:"bg-blue-light-50",solidBorder:"border-blue-light-200",solidText:"text-blue-light-700",outlineBorder:"border-blue-light-600",outlineText:"text-blue-light-700"},indigo:{solidBg:"bg-indigo-50",solidBorder:"border-indigo-200",solidText:"text-indigo-700",outlineBorder:"border-indigo-600",outlineText:"text-indigo-700"},purple:{solidBg:"bg-purple-50",solidBorder:"border-purple-200",solidText:"text-purple-700",outlineBorder:"border-purple-600",outlineText:"text-purple-700"},blue:{solidBg:"bg-blue-50",solidBorder:"border-blue-200",solidText:"text-blue-700",outlineBorder:"border-blue-600",outlineText:"text-blue-700"},pink:{solidBg:"bg-pink-50",solidBorder:"border-pink-200",solidText:"text-pink-700",outlineBorder:"border-pink-600",outlineText:"text-pink-700"},orange:{solidBg:"bg-orange-50",solidBorder:"border-orange-200",solidText:"text-orange-700",outlineBorder:"border-orange-600",outlineText:"text-orange-700"}},Dp=F(["inline-flex items-center gap-1 border font-medium","transition-colors duration-150"],{variants:{size:{sm:"text-caption-sm py-0.5",md:"text-caption-lg py-0.5",lg:"text-caption-lg py-1"},shape:{pill:"rounded-full",badge:""},modern:{true:"rounded-md shadow-xs",false:""},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},iconOnly:{true:"p-[5px]",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{shape:"badge",size:"sm",modern:!1,className:"rounded-md"},{shape:"badge",size:"md",modern:!1,className:"rounded-md"},{shape:"badge",size:"lg",modern:!1,className:"rounded-lg"},{size:"sm",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-2"},{size:"sm",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-1.5"},{size:"sm",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"sm",iconOnly:!1,hasTrailing:!1,className:"pr-2"},{size:"sm",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"md",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"md",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"md",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"md",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"lg",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-3"},{size:"lg",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"lg",iconOnly:!1,hasLeading:!0,className:"pl-1.5"},{size:"lg",shape:"pill",iconOnly:!1,hasTrailing:!1,className:"pr-3"},{size:"lg",shape:"badge",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"lg",iconOnly:!1,hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"pill",modern:!1,hasLeading:!1,hasTrailing:!1,iconOnly:!1,interactive:!1,disabled:!1}}),Ip="size-4 shrink-0 rounded border bg-white",Ap="shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",Zs=({children:t,size:e="sm",shape:r="pill",variant:n="solid",color:o="brand",customColor:i,modern:l=!1,icon:s,trailingIcon:c,checked:u,onCheckedChange:d,onClose:f,iconOnly:p=!1,disabled:h=!1,className:m})=>{const x=d!==void 0,g=u!==void 0||!!s,w=!!f||!!c,v=Mp[o],S=!!(i&&Ys(i)),k=S?{borderColor:i,color:i,backgroundColor:n==="outline"?"transparent":Xs(i,.1)}:void 0,V=()=>{h||d?.(!u)},I=L=>{!x||h||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),V())};return b.createElement("div",{role:x?"checkbox":void 0,"aria-checked":x?!!u:void 0,"aria-disabled":h||void 0,tabIndex:x&&!h?0:void 0,onClick:x?V:void 0,onKeyDown:I,style:k,className:O(Dp({size:e,shape:r,modern:l,hasLeading:g,hasTrailing:w,iconOnly:p,interactive:x,disabled:h}),!S&&(n==="outline"?O("bg-transparent",v.outlineBorder,v.outlineText):O(v.solidBg,v.solidBorder,v.solidText)),m)},u!==void 0&&b.createElement("span",{className:O(Ip,u?"bg-primary-500 border-primary-500":!S&&v.solidBorder),style:!u&&S?{borderColor:i}:void 0},u&&b.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},b.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),s,!p&&b.createElement("span",{className:"whitespace-nowrap"},t),c,f&&b.createElement("button",{type:"button","aria-label":"Remove",disabled:h,onClick:L=>{L.stopPropagation(),f()},className:Ap},b.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},b.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};Zs.displayName="Badge";const Fp={brand:{bg50:"bg-primary-50",hoverBg100:"hover:bg-primary-100",border200:"border-primary-200",border500:"border-primary-500",text500:"text-primary-500"},gray:{bg50:"bg-light-50",hoverBg100:"hover:bg-light-100",border200:"border-light-200",border500:"border-light-500",text500:"text-light-500"},error:{bg50:"bg-error-50",hoverBg100:"hover:bg-error-100",border200:"border-error-200",border500:"border-error-500",text500:"text-error-500"},warning:{bg50:"bg-warning-50",hoverBg100:"hover:bg-warning-100",border200:"border-warning-200",border500:"border-warning-500",text500:"text-warning-500"},success:{bg50:"bg-success-50",hoverBg100:"hover:bg-success-100",border200:"border-success-200",border500:"border-success-500",text500:"text-success-500"}},Op={md:{outerPad:{leading:"pl-1 pr-2.5 py-1",trailing:"pl-3 pr-1 py-1"},gap:"gap-2",chipPad:"px-2 py-0.5",text:"text-caption-lg"},lg:{outerPad:{leading:"pl-1.5 pr-3 py-1.5",trailing:"pl-3 pr-1.5 py-1.5"},gap:"gap-2",chipPad:"px-2.5 py-[3px]",text:"text-body-sm"}},Js=({badgeLabel:t,children:e,size:r="md",theme:n="light",color:o="brand",badgePosition:i="leading",icon:l,onClick:s,className:c})=>{const u=Fp[o],d=Op[r],f=n==="modern",p=n==="outline",h=O("inline-flex items-center border transition-colors duration-150",d.gap,d.outerPad[i],f?"rounded-lg bg-light-50 border-light-200 shadow-xs":p?O("rounded-full bg-white border-[1.5px]",u.border500):O("rounded-full",u.bg50,u.border200,u.hoverBg100),s&&"cursor-pointer",c),m=O("inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",d.chipPad,d.text,f?"rounded-md bg-white border-light-200 text-light-800":p?O("rounded-full bg-white border-[1.5px]",u.border500,u.text500):O("rounded-full bg-white",u.border200,u.text500)),x=O("inline-flex items-center gap-1 font-medium",d.text,f?"text-light-800":u.text500),g=b.createElement("span",{className:m},f&&b.createElement("span",{className:"size-2 shrink-0 rounded-full bg-light-400"}),t);return b.createElement("div",{role:s?"button":void 0,tabIndex:s?0:void 0,onClick:s,className:h},i==="leading"&&g,b.createElement("span",{className:x},e,l),i==="trailing"&&g)};Js.displayName="BadgeGroup";const Bp=({size:t})=>{const e=t*.09,r=(t-e)/2,n=2*Math.PI*r;return b.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin"},b.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:e,className:"stroke-light-100"}),b.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:e,strokeLinecap:"round",strokeDasharray:`${n*.25} ${n}`,className:"stroke-primary-600"}))},zp=({size:t})=>{const e=b.useId(),r=t*.125,n=(t-r)/2,o=2*Math.PI*n;return b.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin text-primary-600"},b.createElement("defs",null,b.createElement("linearGradient",{id:e,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},b.createElement("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),b.createElement("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"}))),b.createElement("circle",{cx:t/2,cy:t/2,r:n,strokeWidth:r,className:"stroke-light-100"}),b.createElement("circle",{cx:t/2,cy:t/2,r:n,strokeWidth:r,strokeLinecap:"round",stroke:`url(#${e})`,strokeDasharray:`${o*.75} ${o}`}))},_p=({size:t})=>{const r=Math.max(t*.1,3),n=(t-r)/2;return b.createElement("div",{className:"relative animate-spin",style:{width:t,height:t}},Array.from({length:12}).map((o,i)=>{const l=30*i,s=.15+.85*i/11;return b.createElement("span",{key:i,className:"absolute rounded-full bg-primary-600 top-1/2 left-1/2",style:{width:r,height:r,opacity:s,marginTop:-r/2,marginLeft:-r/2,transform:`rotate(${l}deg) translate(${n}px) rotate(${-l}deg)`}})}))},Vp={sm:{box:32,gapClass:"gap-4",textClass:"text-caption-lg"},md:{box:48,gapClass:"gap-4",textClass:"text-caption-lg"},lg:{box:56,gapClass:"gap-4",textClass:"text-body-lg"},xl:{box:64,gapClass:"gap-5",textClass:"text-body-lg"}},Qs=({size:t="sm",style:e="line-simple",supportingText:r=!0,label:n="Loading...",className:o})=>{const{box:i,gapClass:l,textClass:s}=Vp[t];return b.createElement("div",{role:"status","aria-label":typeof n=="string"?n:"Loading",className:O("inline-flex flex-col items-center",l,o)},e==="line-simple"&&b.createElement(Bp,{size:i}),e==="line-spinner"&&b.createElement(zp,{size:i}),e==="dot-circle"&&b.createElement(_p,{size:i}),r&&b.createElement("p",{className:O("font-medium text-light-700 whitespace-nowrap",s)},n))};Qs.displayName="Loading";const ea=({className:t,style:e})=>b.createElement("svg",{viewBox:"0 0 24 24",fill:"none",className:t,style:e},b.createElement("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",stroke:"currentColor",strokeWidth:"1.75"}),b.createElement("path",{d:"M3.75 20.25a8.25 8.25 0 0 1 16.5 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})),ta=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("circle",{cx:"10",cy:"10",r:"9",className:"fill-primary-500 stroke-white",strokeWidth:"1.5"}),b.createElement("path",{d:"M6 10.2 8.6 12.8 14 7",stroke:"white",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),Hp={xs:{box:24,borderWidth:"0.5px",statusSize:6,badgeSize:10,textClass:"text-caption-sm"},sm:{box:32,borderWidth:"0.5px",statusSize:8,badgeSize:12,textClass:"text-caption-lg"},md:{box:40,borderWidth:"0.75px",statusSize:10,badgeSize:14,textClass:"text-body-sm"},lg:{box:48,borderWidth:"0.75px",statusSize:12,badgeSize:16,textClass:"text-body-lg"},xl:{box:56,borderWidth:"0.75px",statusSize:14,badgeSize:18,textClass:"text-h6"},"2xl":{box:64,borderWidth:"0.75px",statusSize:16,badgeSize:20,textClass:"text-h5 leading-7"}},Wp="#17B26A",Lt=({src:t,alt:e,initials:r,size:n="md",status:o="none",statusIcon:i,contrastBorder:l=!0,className:s})=>{const{box:c,borderWidth:u,statusSize:d,badgeSize:f,textClass:p}=Hp[n],h=t?"image":r!==void 0?"initials":"placeholder";return b.createElement("div",{className:O("relative inline-block shrink-0 rounded-full",s),style:{width:c,height:c}},h==="image"&&b.createElement("img",{src:t,alt:e??"",className:"absolute inset-0 size-full rounded-full object-cover"}),h==="placeholder"&&b.createElement("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-light-50"},b.createElement(ea,{className:"text-light-300",style:{width:c*.55,height:c*.55}})),h==="initials"&&b.createElement("div",{className:O("absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",p)},r),l&&b.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:u,borderStyle:"solid"}}),o==="online"&&b.createElement("span",{className:"absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",style:{width:d,height:d,backgroundColor:Wp}}),o==="company"&&b.createElement("div",{className:"absolute bottom-0 right-0 flex items-center justify-center overflow-hidden rounded-full border-[1.5px] border-white bg-white",style:{width:f,height:f}},i),o==="verified"&&b.createElement("div",{className:"absolute bottom-0 right-0",style:{width:f,height:f}},b.createElement(ta,{className:"size-full"})))};Lt.displayName="Avatar";const ra=[{bg:"bg-primary-100",text:"text-primary-600"},{bg:"bg-secondary-100",text:"text-secondary-600"},{bg:"bg-purple-100",text:"text-purple-600"},{bg:"bg-pink-100",text:"text-pink-600"},{bg:"bg-orange-100",text:"text-orange-600"},{bg:"bg-teal-100",text:"text-teal-600"},{bg:"bg-indigo-100",text:"text-indigo-600"},{bg:"bg-rose-100",text:"text-rose-600"}],jp=t=>{let e=0;for(let n=0;n<t.length;n+=1)e=e*31+t.charCodeAt(n)|0;const r=Math.abs(e)%ra.length;return ra[r]},Up={xs:{box:24,overlap:-4,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-sm"},sm:{box:32,overlap:-8,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-lg"},md:{box:40,overlap:-12,contrastBorderWidth:"0.75px",plusIconSize:20,textClass:"text-body-sm"}},na=({avatars:t,max:e,size:r="xs",onAdd:n,className:o})=>{const{box:i,overlap:l,contrastBorderWidth:s,textClass:c}=Up[r],u=e?t.slice(0,e):t,d=e&&t.length>e?t.length-e:0;return b.createElement("div",{className:O("inline-flex items-start gap-2",o)},b.createElement("div",{className:"flex items-start"},u.map((f,p)=>{const h=p<u.length-1||d>0;return b.createElement(wr,{key:p,content:f.label,disabled:!f.label,side:"top"},b.createElement("div",{className:"relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",style:{width:i,height:i,marginRight:h?l:0}},f.src?b.createElement("img",{src:f.src,alt:f.alt??"",className:"size-full object-cover"}):(()=>{const{bg:m,text:x}=jp(String(f.label??f.alt??f.initials??p));return b.createElement("div",{className:O("flex size-full items-center justify-center font-semibold",m,x,c)},f.initials)})(),b.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:s,borderStyle:"solid"}})))}),d>0&&b.createElement(wr,{content:t.slice(e).map((f,p)=>b.createElement("div",{key:p},f.label)),disabled:!t.slice(e).some(f=>f.label),side:"top"},b.createElement("div",{className:"relative flex shrink-0 items-center justify-center rounded-full border-2 border-white bg-light-100",style:{width:i,height:i}},b.createElement("span",{className:O("font-semibold text-light-600",c)},"+",d)))),n&&b.createElement("button",{type:"button",onClick:n,"aria-label":"Add",className:"flex shrink-0 items-center justify-center rounded-full border border-dashed border-light-300 bg-white text-light-500 hover:bg-light-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2",style:{width:i,height:i}},b.createElement("svg",{width:i*.4,height:i*.4,viewBox:"0 0 20 20",fill:"none"},b.createElement("path",{d:"M10 4v12M4 10h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}))))};na.displayName="AvatarGroup";const Gp={xs:{nameClass:"text-caption-sm",subtitleClass:"text-caption-sm"},sm:{nameClass:"text-caption-lg",subtitleClass:"text-caption-sm"},md:{nameClass:"text-caption-lg",subtitleClass:"text-caption-lg"},lg:{nameClass:"text-body-sm",subtitleClass:"text-body-sm"},xl:{nameClass:"text-body-lg",subtitleClass:"text-body-sm"}},oa=({name:t,subtitle:e,src:r,initials:n,size:o="xs",status:i="none",statusIcon:l,className:s})=>{const{nameClass:c,subtitleClass:u}=Gp[o];return b.createElement("div",{className:O("inline-flex items-center gap-2",s)},b.createElement(Lt,{src:r,initials:n,size:o,status:i,statusIcon:l}),b.createElement("div",{className:"flex flex-col items-start whitespace-nowrap"},b.createElement("span",{className:O("font-bold text-light-800",c)},t),e&&b.createElement("span",{className:O("font-normal text-light-700",u)},e)))};oa.displayName="AvatarLabelGroup";const Rp={sm:{box:72,ringWidth:3,shadowClass:"shadow-md",iconSize:36,textClass:"text-h4",verifiedSize:20,verifiedOffset:0},md:{box:96,ringWidth:4,shadowClass:"shadow-lg",iconSize:48,textClass:"text-h3",verifiedSize:24,verifiedOffset:0},lg:{box:160,ringWidth:4,shadowClass:"shadow-lg",iconSize:80,textClass:"text-h1",verifiedSize:32,verifiedOffset:4}},ia=({src:t,alt:e,initials:r,size:n="sm",verified:o=!0,contrastBorder:i=!0,className:l})=>{const{box:s,ringWidth:c,shadowClass:u,iconSize:d,textClass:f,verifiedSize:p,verifiedOffset:h}=Rp[n],m=t?"image":r!==void 0?"initials":"placeholder";return b.createElement("div",{className:O("relative rounded-full",l),style:{width:s,height:s}},b.createElement("div",{className:O("absolute inset-0 overflow-hidden rounded-full border-white",u,m!=="image"&&"bg-light-100"),style:{borderWidth:c,borderStyle:"solid"}},m==="image"&&b.createElement("img",{src:t,alt:e??"",className:"absolute inset-0 size-full rounded-full object-cover"}),i&&b.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border border-black/[0.08]"}),m==="placeholder"&&b.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},b.createElement(ea,{className:"text-light-300",style:{width:d,height:d}})),m==="initials"&&b.createElement("div",{className:O("absolute inset-0 flex items-center justify-center font-semibold text-light-500",f)},r)),o&&b.createElement("div",{className:"absolute",style:{width:p,height:p,bottom:h,right:h}},b.createElement(ta,{className:"size-full"})))};ia.displayName="AvatarProfilePhoto";const qp={"button-gray":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-white":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-primary":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},underline:{sm:"h-8 px-1 pb-3 text-sm gap-2",md:"h-9 px-1 pb-3 text-base gap-2"},"underline-filled":{sm:"h-11 p-3 text-sm gap-2",md:"h-12 p-3 text-base gap-2"},line:{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3.5 py-2.5 text-base gap-2"}},Yp={"button-gray":"rounded-md","button-white":"rounded-md","button-primary":"rounded-md",underline:"rounded-none","underline-filled":"rounded-none",line:"rounded-none"},Xp={"button-gray":{active:"bg-light-50 text-light-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-light-50 hover:text-light-700",hasFocusRing:!0},"button-white":{active:"bg-white text-light-700 shadow-sm",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-white hover:text-light-700 hover:shadow-sm",hasFocusRing:!0},"button-primary":{active:"bg-primary-50 text-primary-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:text-primary-700",hasFocusRing:!0},underline:{active:"border-b-2 border-primary-500 text-primary-700",inactive:"border-b-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},"underline-filled":{active:"bg-primary-50 border-b-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-b-2 border-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},line:{active:"bg-transparent border-l-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-l-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!0}},Zp="inline-flex items-center justify-center rounded-full border border-light-200 bg-light-50 px-2 py-0.5 text-caption-sm font-medium text-light-700",Jp={"button-gray":{gapClass:"gap-1",hasHairline:!1},"button-white":{gapClass:"gap-1",hasHairline:!1},"button-primary":{gapClass:"gap-1",hasHairline:!1},underline:{gapClass:"gap-3",hasHairline:!0},"underline-filled":{gapClass:"gap-3",hasHairline:!0},line:{gapClass:"gap-1",hasHairline:!1}},la=({children:t,variant:e="button-primary",size:r="sm",fullWidth:n=!1,count:o,iconLeft:i,iconRight:l,disabled:s=!1,onClick:c,className:u,id:d,active:f})=>{const p=Xp[e];return b.createElement(xs,{id:d,isDisabled:s,onPress:()=>c?.(),className:({isSelected:h})=>Ke("inline-flex items-center justify-center font-semibold transition-colors duration-150",qp[e][r],Yp[e],h?p.active:p.inactive,!h&&!s&&p.hoverInactive,p.hasFocusRing&&"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",n&&"w-full",s?"cursor-not-allowed opacity-60":"cursor-pointer",u)},i&&b.createElement("span",{className:"shrink-0"},i),b.createElement("span",{className:"whitespace-nowrap"},t),o!==void 0&&b.createElement("span",{className:Zp},o),l&&b.createElement("span",{className:"shrink-0"},l))};la.displayName="Tab";const sa=({children:t,variant:e="button-primary",orientation:r="horizontal",boxed:n=!1,"aria-label":o="Tabs",keyboardActivation:i,disabledKeys:l,className:s})=>{const{gapClass:c,hasHairline:u}=Jp[e],d=b.Children.toArray(t),f=d.map((x,g)=>String(g)),p=d.findIndex(x=>x.props.active),h=f[p>=0?p:0],m=x=>{const g=f.indexOf(String(x));g>=0&&d[g].props.onClick?.()};return b.createElement(ms,{orientation:r,keyboardActivation:i,disabledKeys:l,selectedKey:d.length?h:void 0,onSelectionChange:m},b.createElement(ys,{"aria-label":o,className:Ke("inline-flex",r==="vertical"?"flex-col items-stretch":"flex-row items-center",c,n&&"rounded-lg border border-light-200 bg-light-50 p-1",u&&r==="horizontal"&&!n&&"border-b border-light-200",s)},d.map((x,g)=>b.cloneElement(x,{key:f[g],id:f[g]}))))};sa.displayName="TabList";const aa=9,Le=1,Qp=30;function ca(t){const e=aa,r=Le-t,n=r?`calc(100% - ${r}px)`:"100%",o=`calc(100% - ${e+1}px)`,i=`calc(100% - ${e}px)`;return`shape(${[`from ${-t}px 100%`,...r?[`vline to ${n}`]:[],`curve to ${e}px ${o} with ${e}px ${n}`,`vline to ${e-t}px`,`curve to ${2*e-t}px 0 with ${e}px 0`,`hline to calc(100% - ${2*e-t}px)`,`curve to ${i} ${e-t}px with ${i} 0`,`vline to ${o}`,`curve to ${t?`calc(100% + ${t}px)`:"100%"} ${n} with ${i} ${n}`,...r?["vline to 100%"]:[]].join(", ")})`}const ua=ca(0),da=ca(Le),fa={default:{box:"h-12 shrink-0",padX:Qp},"max-width":{box:"h-9 min-w-px flex-1",padX:aa}},eh={clipPath:ua,paddingInline:`${Le}px`},th={paddingInline:`${Le}px`},pa=b.forwardRef(({type:t="default",disabled:e=!1,unstyled:r=!1,iconLeft:n,trailing:o,tooltip:i,children:l,className:s,style:c,contentClassName:u,contentStyle:d,onClick:f,id:p,active:h,...m},x)=>{const{box:g,padX:w}=fa[t];return b.createElement(xs,{ref:x,id:p,isDisabled:e,onPress:()=>f?.(void 0),...m,className:({isSelected:v})=>Ke("group relative flex transition-colors duration-150 focus-visible:outline-none",!r&&"rounded-t-lg pt-px",!r&&g,e&&"cursor-not-allowed opacity-60",!e&&!v&&"cursor-pointer",!r&&v&&"-mb-px bg-light-200 focus-visible:bg-primary-400",v&&"cursor-default",s),style:({isSelected:v})=>r?c:{...v?eh:th,...c}},({isSelected:v})=>{const S=!e&&!v,k=v?{clipPath:da,paddingInline:`${w-Le}px`}:{paddingInline:`${w-Le}px`};return b.createElement("span",{title:i,className:Ke("flex h-full w-full items-center justify-center gap-1 whitespace-nowrap text-caption-sm",!r&&"rounded-t-lg",!r&&(v?"bg-white font-bold text-light-800":"font-medium leading-4 text-light-600"),!r&&S&&"group-hover:bg-light-100 group-hover:text-light-800",!r&&S&&"group-focus-visible:rounded-b-lg group-focus-visible:ring-2 group-focus-visible:ring-primary-400 group-focus-visible:ring-offset-2",u),style:r?d:{...k,...d}},n&&b.createElement("span",{className:"shrink-0"},n),b.createElement("span",{className:"overflow-hidden text-ellipsis"},l),o)})});pa.displayName="TabBrowser";const rh=48,ha=({children:t,separators:e=!1,trailingSlot:r,overflow:n=!1,overflowLabel:o,className:i})=>{const l=b.Children.toArray(t),s=b.useMemo(()=>l.map((C,K)=>String(K)),[l.length]),c=l.findIndex(C=>C.props.active),u=b.useRef(null),d=b.useRef(null),f=b.useRef(new Map),p=b.useRef(new Map),[h,m]=b.useState(l.length),x=s.join("|");b.useLayoutEffect(()=>{n&&(p.current.clear(),m(l.length))},[n,x]);const g=b.useCallback(()=>{const C=u.current;if(!C||l.length===0||(p.current.size<l.length&&s.forEach(U=>{const y=f.current.get(U);y&&p.current.set(U,y.getBoundingClientRect().width)}),p.current.size<l.length))return;const K=C.clientWidth,W=d.current?.getBoundingClientRect().width||rh;let z=0,j=0;for(;j<s.length;j++){const U=p.current.get(s[j])??0,y=j<s.length-1?W:0;if(z+U+y>K&&j>0)break;z+=U}m(U=>U===j?U:j)},[l.length,s]),w=h===l.length;b.useLayoutEffect(()=>{n&&g()},[n,g,w]),b.useEffect(()=>{if(!n)return;const C=u.current;if(!C||typeof ResizeObserver>"u")return;const K=new ResizeObserver(()=>g());return K.observe(C),()=>K.disconnect()},[n,g]);const v=n&&h<l.length?Math.max(h,1):l.length,S=n?c>=0&&c>=v?[...Array(v-1).keys(),c]:[...Array(v).keys()]:s.map((C,K)=>K),k=new Set(S),V=s.map((C,K)=>K).filter(C=>!k.has(C)),I=c>=0?s[c]:S.length?s[S[0]]:void 0,L=C=>{const K=s.indexOf(String(C));K>=0&&l[K].props.onClick?.(void 0)};return b.createElement(ms,{selectedKey:l.length?I:void 0,onSelectionChange:L,className:Ke("flex items-end",n&&"min-w-0 flex-1",i)},(()=>{const C=b.createElement(ys,{"aria-label":"Tabs",className:Ke("flex min-w-0 items-end",n?"shrink-0":"flex-1")},S.map((K,W)=>{const z=l[K],j=W===S.length-1&&V.length===0,U=S[W+1],y=z.props.active||l[U]?.props.active;return b.cloneElement(z,{key:s[K],id:s[K],ref:n?T=>{T?f.current.set(s[K],T):f.current.delete(s[K])}:void 0,className:Ke(z.props.className,e&&!j&&!y&&"after:absolute after:-right-px after:bottom-3 after:h-5 after:w-px after:bg-light-200 after:content-['']")})}));return n?b.createElement("div",{ref:u,className:"flex min-w-0 flex-1 items-end overflow-hidden"},C,V.length>0&&b.createElement(of,null,b.createElement(ti,{ref:d,className:"mb-3 flex h-7 shrink-0 items-center self-end rounded-md px-2 text-caption-sm font-semibold text-light-600 hover:bg-light-100 hover:text-light-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400"},o?o(V.length):`+${V.length}`),b.createElement(Ud,{placement:"bottom end",className:"flex flex-col overflow-hidden rounded-lg border border-light-200 bg-white p-1 shadow-lg"},b.createElement(sf,{className:"flex max-h-[320px] min-h-0 min-w-[160px] flex-1 flex-col gap-0.5 overflow-y-auto outline-none [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",onAction:K=>{const W=s.indexOf(String(K));W>=0&&l[W].props.onClick?.(void 0)}},V.map(K=>{const W=l[K],z=W.props.children;return b.createElement(df,{key:s[K],id:s[K],isDisabled:W.props.disabled,textValue:typeof z=="string"?z:void 0,className:"flex h-9 shrink-0 cursor-pointer items-center gap-2 truncate rounded-md px-2 text-caption-sm text-light-800 outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-60 data-[focused]:bg-light-50 data-[focused]:text-light-900"},W.props.iconLeft&&b.createElement("span",{className:"shrink-0"},W.props.iconLeft),b.createElement("span",{className:"truncate"},z),W.props.trailing&&b.createElement("span",{className:"ml-auto shrink-0"},W.props.trailing))}))))):C})(),r)};ha.displayName="TabBrowserBar";const nh={clipPath:ua,paddingInline:`${Le}px`},oh={paddingInline:`${Le}px`},ga=b.forwardRef(({type:t="default",disabled:e=!1,unstyled:r=!1,active:n=!1,iconLeft:o,trailing:i,tooltip:l,children:s,className:c,style:u,contentClassName:d,contentStyle:f,...p},h)=>{const{box:m,padX:x}=fa[t],g=!e&&!n,w=n?{clipPath:da,paddingInline:`${x-Le}px`}:{paddingInline:`${x-Le}px`};return b.createElement("div",{ref:h,role:"tab","aria-disabled":e,"aria-selected":n,...p,className:Ke("group relative flex transition-colors duration-150 focus-visible:outline-none",!r&&"rounded-t-lg pt-px",!r&&m,e&&"cursor-not-allowed opacity-60",!e&&!n&&"cursor-pointer",!r&&n&&"-mb-px bg-light-200 focus-visible:bg-primary-400",n&&"cursor-default",c),style:r?u:{...n?nh:oh,...u}},b.createElement("span",{title:l,className:Ke("flex h-full w-full items-center justify-center gap-1 whitespace-nowrap text-caption-sm",!r&&"rounded-t-lg",!r&&(n?"bg-white font-bold text-light-800":"font-medium leading-4 text-light-600"),!r&&g&&"group-hover:bg-light-100 group-hover:text-light-800",!r&&g&&"group-focus-visible:rounded-b-lg group-focus-visible:ring-2 group-focus-visible:ring-primary-400 group-focus-visible:ring-offset-2",d),style:r?f:{...w,...f}},o&&b.createElement("span",{className:"shrink-0"},o),b.createElement("span",{className:"overflow-hidden text-ellipsis"},s),i))});ga.displayName="TabBrowserPreview";const ih=F("flex flex-col gap-1 w-full",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-sm"}},defaultVariants:{size:"md"}}),lh=F("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),sh=F(["flex items-center w-full border","bg-white transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 px-2 gap-1 rounded text-caption-sm",sm:"h-9 px-3 gap-2 rounded-lg",md:"h-11 px-3 gap-2 rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),ah=F(["flex-1 bg-transparent outline-none text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},error:{true:"",false:"text-light-900"}},defaultVariants:{size:"md",error:!1}}),ch=F("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}}}),uh=F("flex items-stretch w-full bg-white border overflow-hidden transition-[border-color,border-width]",{variants:{size:{xs:"rounded",sm:"rounded-lg",md:"rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),dh=F("flex flex-1 items-center min-w-0",{variants:{size:{xs:"gap-1 px-2 py-1",sm:"gap-2 px-3 py-2",md:"gap-2 px-3 py-2"},disabled:{true:"text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),fh=F("flex items-center text-light-700 whitespace-nowrap border-r border-light-200",{variants:{size:{xs:"px-2 text-caption-sm",sm:"px-3 text-caption-lg",md:"px-3 text-body-sm"}},defaultVariants:{size:"md"}}),ba=F(["flex items-center gap-1 shrink-0 bg-transparent p-0 text-light-800 cursor-pointer","hover:bg-transparent hover:text-light-900","disabled:cursor-not-allowed disabled:text-light-400"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),ph=F("flex shrink-0 items-center justify-center gap-1 w-[92px] border-l border-light-200 bg-white font-semibold text-light-800 hover:bg-light-50 disabled:cursor-not-allowed disabled:text-light-400",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),ma=({className:t})=>a.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},a.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),hh={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},gh=({size:t,error:e,disabled:r})=>O("flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",hh[t],e?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r&&"bg-light-100 text-light-400 cursor-not-allowed"),bh=({error:t})=>O("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),mh="flex flex-col w-full max-w-[320px]",Mt=a.forwardRef(function({label:e,required:r,hint:n,rightIcon:o,size:i="md",error:l=!1,disabled:s=!1,compact:c=!1,hideCalendarIcon:u=!1,type:d,prefix:f,suffix:p,leadingAddon:h,leadingDropdown:m,trailingDropdown:x,trailingButton:g,maxLength:w,value:v,className:S,wrapperClassName:k,...V},I){const L=!!(h||g),C=a.createElement(a.Fragment,null,m&&a.createElement("button",{type:"button",onClick:m.onClick,disabled:m.disabled||s,className:ba({size:i})},a.createElement("span",null,m.value),a.createElement(ma,{className:"size-5 text-light-500"})),f&&a.createElement("div",{className:"flex items-center"},f),a.createElement("input",{...V,ref:I,type:d,disabled:s,maxLength:w,value:v,className:O(ah({size:i,error:l}),"h-full",u&&"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",d==="date"&&"[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",S)}),(o||p)&&a.createElement("div",{className:"flex h-full items-center gap-2"},o&&a.createElement("div",{className:"flex h-full items-center pb-0.5 text-light-400 hover:text-light-600"},o),p&&a.createElement("div",{className:"flex h-full items-center gap-1 leading-none text-light-700"},p)),x&&a.createElement("button",{type:"button",onClick:x.onClick,disabled:x.disabled||s,className:ba({size:i})},a.createElement("span",null,x.value),a.createElement(ma,{className:"size-5 text-light-500"})));return a.createElement("div",{className:O(c?mh:ih({size:i}),k)},e&&a.createElement("label",{className:c?bh({error:l}):lh({error:l})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),L?a.createElement("div",{className:uh({size:i,error:l,disabled:s})},h&&a.createElement("div",{className:fh({size:i})},h),a.createElement("div",{className:dh({size:i,disabled:s})},C),g&&a.createElement("button",{type:"button",onClick:g.onClick,disabled:g.disabled||s,className:ph({size:i})},g.icon,a.createElement("span",null,g.label))):a.createElement("div",{className:c?gh({size:i,error:l,disabled:s}):sh({size:i,error:l,disabled:s})},C),w&&typeof v=="string"&&a.createElement("div",{className:"text-right text-xs text-light-400"},v.length,"/",w),n&&a.createElement("p",{className:ch({error:l})},n))});function yh({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function xh({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function vh({size:t="md",label:e,required:r,hint:n,error:o,disabled:i,placeholder:l="+1 (555) 000-0000",rightIcon:s,value:c,onChange:u,className:d,wrapperClassName:f}){return a.createElement(Mt,{size:t,label:e,required:r,hint:n,error:o,disabled:i,placeholder:l,rightIcon:s,value:c,onChange:u,className:d,wrapperClassName:f,prefix:a.createElement("div",{className:"flex items-center gap-1 pr-2 text-sm text-light-700"},a.createElement("span",null,"US"),a.createElement(_n,{size:14}))})}function wh({size:t="md",label:e,required:r,hint:n,error:o,disabled:i,value:l,placeholder:s="1,000.00",currency:c="USD",onCurrencyChange:u,rightIcon:d,onChange:f,className:p,wrapperClassName:h}){return a.createElement(Mt,{size:t,label:e,required:r,hint:n,error:o,disabled:i,value:l,placeholder:s,rightIcon:d,onChange:f,className:p,wrapperClassName:h,prefix:a.createElement("span",{className:"select-none text-sm text-light-700"},"$"),suffix:a.createElement("button",{type:"button",disabled:i,onClick:u,className:"flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"},c,a.createElement(_n,{size:14}))})}function Eh({size:t="md",label:e,required:r,hint:n,disabled:o,error:i,className:l,wrapperClassName:s,value:c,maxLength:u,placeholder:d,onChange:f}){const p=c.length>u,h=i||p;return a.createElement(Mt,{size:t,label:e,required:r,disabled:o,error:h,value:c,placeholder:d,onChange:f,className:l,wrapperClassName:s,hint:n,suffix:a.createElement("span",{className:O("text-caption-lg",p?"text-error-600":"text-light-400")},c.length,"/",u)})}function $h({size:t="md",label:e="Card number",required:r,hint:n,error:o,disabled:i,placeholder:l="Card number",value:s,onChange:c,rightIcon:u,prefix:d,className:f,wrapperClassName:p}){return a.createElement(Mt,{size:t,label:e,required:r,hint:n,error:o,disabled:i,placeholder:l,value:s,onChange:c,rightIcon:u,className:f,wrapperClassName:p,prefix:d??a.createElement("img",{src:"/stories/assets/mastercard.png",alt:"mastercard",className:"h-4 w-6 object-contain"}),inputMode:"numeric",autoComplete:"cc-number"})}const Kn=Mt;Kn.Prefix=yh,Kn.Suffix=xh;const Sh="flex flex-col gap-1 w-full",Ch=F("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),kh=F(["flex w-full gap-2 border rounded-lg p-3 bg-white","transition-[border-color,border-width]"],{variants:{error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{error:!1,disabled:!1}}),Ph=F(["flex-1 min-h-[132px] bg-transparent outline-none text-caption-lg text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed disabled:resize-none"],{variants:{resizable:{true:"resize-y",false:"resize-none"}},defaultVariants:{resizable:!0}}),Th=F("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}},defaultVariants:{error:!1}}),Nh=({error:t,disabled:e})=>O("flex w-full gap-2 rounded-lg border bg-white p-2 transition-[border-color,border-width]",t?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",e&&"bg-light-100 cursor-not-allowed"),Kh=({error:t})=>O("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Lh=t=>O("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900","placeholder:text-light-500",t?"resize-y":"resize-none"),Mh="flex flex-col w-full max-w-[320px]",ya=b.forwardRef(({label:t,required:e,hint:r,helpIcon:n,error:o=!1,disabled:i=!1,resizable:l=!0,compact:s=!1,rows:c,style:u,className:d,wrapperClassName:f,...p},h)=>{const m=c?{minHeight:`${c*20}px`}:void 0;return b.createElement("div",{className:O(s?Mh:Sh,f)},t&&b.createElement("label",{className:s?Kh({error:o}):Ch({error:o})},t,e&&b.createElement("span",{className:"text-error-400"},"*"),n),b.createElement("div",{className:s?Nh({error:o,disabled:i}):kh({error:o,disabled:i})},b.createElement("textarea",{ref:h,disabled:i,rows:c,style:{...m,...u},className:O(s?Lh(l&&!i):Ph({resizable:l&&!i}),d),...p})),r&&b.createElement("p",{className:Th({error:o})},r))});ya.displayName="Textarea";const Dh=F("flex w-[320px] flex-col gap-1"),Ih=F("flex items-center gap-1 text-sm font-bold",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Ah=F(["flex items-center","rounded-lg border bg-white","overflow-hidden","transition-colors"],{variants:{size:{sm:"h-9 px-2",md:"h-11 px-3"},error:{true:"border-error-300 focus-within:ring-2 focus-within:ring-error-500",false:"border-light-200 focus-within:ring-2 focus-within:ring-primary-500"},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),Fh=F(["flex items-center gap-1","overflow-x-auto overflow-y-hidden","whitespace-nowrap","scrollbar-hide","flex-1"]),Oh=F("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"),Bh=F(["min-w-[120px]","bg-transparent outline-none","text-light-900 placeholder:text-light-500"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:""}}}),zh=F("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function _h({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:l="Add items",rightIcon:s,className:c,wrapperClassName:u,options:d,value:f=[],onChange:p}){const h=a.useId(),[m,x]=a.useState(""),g=v=>{const S=d.find(k=>k.label===v);S&&(f.some(k=>k.id===S.id)||(p?.([...f,S]),x("")))},w=v=>{p?.(f.filter(S=>S.id!==v))};return a.createElement("div",{className:O(Dh(),u)},e&&a.createElement("label",{className:Ih({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:Ah({size:t,error:o,disabled:i})},a.createElement("div",{className:Fh()},f.map(v=>a.createElement("span",{key:v.id,className:Oh()},v.avatar&&a.createElement("img",{src:v.avatar,alt:v.label,className:"h-4 w-4 rounded-full"}),v.label,!i&&a.createElement("button",{type:"button",onClick:()=>w(v.id),className:"ml-1 text-light-500 hover:text-light-700"},"×"))),a.createElement("input",{list:h,value:m,onChange:v=>{x(v.target.value),g(v.target.value)},placeholder:f.length===0?l:"",disabled:i,className:O(Bh({disabled:i}),c)}),a.createElement("datalist",{id:h},d.map(v=>a.createElement("option",{key:v.id,value:v.label})))),s&&a.createElement("div",{className:"ml-2 flex shrink-0 items-center text-light-400"},s)),n&&a.createElement("p",{className:zh({error:o})},n))}const Vh=F("flex w-[320px] flex-col gap-1"),Hh=F("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}}}),Wh=F("flex items-stretch rounded-lg border bg-white transition-colors",{variants:{error:{true:"",false:"border-light-200"},disabled:{true:"bg-light-100",false:""}}}),jh=F("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-light-100",false:"bg-white"}}}),Uh="w-px bg-light-200",Gh=F(["flex flex-1 items-center gap-2 px-3 rounded-r-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),Rh=F("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),qh=F("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function Yh({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:l="www.cekat.ai",value:s,rightIcon:c,onChange:u,className:d,wrapperClassName:f}){return a.createElement("div",{className:O(Vh(),f)},e&&a.createElement("label",{className:Hh({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:Wh({error:o,disabled:i})},a.createElement("div",{className:jh({size:t})},"http://"),a.createElement("div",{className:Uh}),a.createElement("div",{className:Gh({size:t,error:o,disabled:i})},a.createElement("input",{value:s,onChange:u,placeholder:l,disabled:i,className:O(Rh({disabled:i}),d)}),c&&a.createElement("div",{className:"flex items-center text-light-400"},c))),n&&a.createElement("p",{className:qh({error:o})},n))}const Xh=F("flex w-[320px] flex-col gap-1"),Zh=F("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Jh=F("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors",{variants:{disabled:{true:"bg-light-100",false:""}}}),Qh=F(["flex flex-1 items-center gap-2 px-3 rounded-l-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),eg=F("w-px transition-colors",{variants:{error:{true:"focus:bg-error-200 group-focus-within:bg-error-500",false:"focus:bg-light-200 group-focus-within:bg-primary-500"}}}),tg=F("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-white",false:"bg-white"}}}),rg=F("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),ng=F("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function og({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:l="www.cekat.ai",value:s,rightIcon:c,suffix:u,onChange:d,className:f,wrapperClassName:p}){return a.createElement("div",{className:O(Xh(),p)},e&&a.createElement("label",{className:Zh({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:Jh({disabled:i})},a.createElement("div",{className:Qh({size:t,error:o,disabled:i})},a.createElement("input",{value:s,onChange:d,placeholder:l,disabled:i,className:O(rg({disabled:i}),f)}),c&&a.createElement("div",{className:"text-light-400"},c)),a.createElement("div",{className:eg({error:o})}),a.createElement("div",{className:tg({size:t,disabled:i})},u)),n&&a.createElement("p",{className:ng({error:o})},n))}const ig=F("flex w-full flex-col gap-1"),lg=F("flex items-center gap-1 text-sm font-bold text-light-800"),xa=F(["flex w-full items-center border bg-white text-left","transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 gap-1 rounded px-2 text-caption-sm",sm:"h-9 gap-2 rounded-lg px-3 text-caption-lg",md:"h-11 gap-2 rounded-lg px-3 text-body-sm"},open:{true:"border-2 border-primary-500",false:"border-light-200 focus-within:border-2 focus-within:border-primary-500"},disabled:{true:"cursor-not-allowed bg-light-100",false:"cursor-pointer"}},defaultVariants:{size:"md",open:!1,disabled:!1}}),sg=F(["absolute left-0 top-full z-10 mt-2 w-full overflow-y-auto","rounded-lg border border-light-200 bg-white py-1","shadow-[0_12px_16px_-4px_rgba(16,24,40,0.08),0_4px_6px_-2px_rgba(16,24,40,0.03)]"],{variants:{size:{xs:"max-h-52",sm:"max-h-64",md:"max-h-80"}},defaultVariants:{size:"md"}}),va=F("flex w-full items-center rounded-md text-left",{variants:{size:{xs:"gap-1 px-2 py-1 text-caption-sm",sm:"gap-2 px-3 py-1.5 text-caption-lg",md:"gap-2 py-2.5 pl-4 pr-2.5 text-body-sm"},disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer hover:bg-light-50"}},defaultVariants:{size:"md",disabled:!1}}),ag=F("text-caption-lg text-light-700"),cg=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),ug=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("path",{d:"M17.5 17.5L14.1 14.1M16 9.25C16 12.98 12.98 16 9.25 16C5.52 16 2.5 12.98 2.5 9.25C2.5 5.52 5.52 2.5 9.25 2.5C12.98 2.5 16 5.52 16 9.25Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),dg=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("path",{d:"M16.67 5L7.5 14.17L3.33 10",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Ln={xs:"size-4",sm:"size-5",md:"size-6"},wa={xs:"size-4",sm:"size-5",md:"size-5"},fg={xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},pg={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},Ea=({size:t,open:e,disabled:r})=>O("flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",fg[t],pg[t],e?"border-2 border-primary-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r?"cursor-not-allowed bg-light-100":"cursor-pointer"),hg=()=>"flex items-center gap-1 text-caption-sm font-semibold text-light-800",gg="flex w-full max-w-[320px] flex-col";function bg({size:t="md",type:e="default",label:r,required:n,helpIcon:o,hint:i,placeholder:l="Select option",disabled:s=!1,compact:c=!1,leadingIcon:u,options:d,value:f=null,onChange:p,values:h=[],onValuesChange:m,className:x,wrapperClassName:g}){const[w,v]=b.useState(!1),[S,k]=b.useState(""),V=b.useRef(null),I=b.useRef(null),L=e==="tags",C=e==="search"||L,K=d.find($=>$.id===f)??null,W=d.filter($=>h.includes($.id)),z=S?d.filter($=>`${$.label} ${$.supportingText??""}`.toLowerCase().includes(S.toLowerCase())):d,j=()=>{v(!1),k("")};b.useEffect(()=>{if(!w)return;const $=H=>{V.current?.contains(H.target)||j()};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[w]),b.useEffect(()=>{w&&C&&I.current?.focus()},[w,C]);const U=()=>{s||(w?j():v(!0))},y=$=>{$.disabled||(L?(m?.(h.includes($.id)?h.filter(H=>H!==$.id):[...h,$.id]),k(""),I.current?.focus()):(p?.($),j()))},T=$=>{if($.key==="Enter"){$.preventDefault();const H=z.find(ae=>!ae.disabled);w&&H&&y(H)}else $.key==="Backspace"&&L&&!S&&h.length?m?.(h.slice(0,-1)):w||v(!0)},G=$=>$.avatar?b.createElement("img",{src:$.avatar,alt:"",className:O(Ln[t],"shrink-0 rounded-full object-cover")}):$.icon?b.createElement("span",{className:O(Ln[t],"flex shrink-0 items-center justify-center",s?"text-light-400":"text-light-500")},$.icon):$.dot?b.createElement("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:s?"#d0d5dd":$.dot}}):null,N=K?G(K):u?b.createElement("span",{className:O(Ln[t],"flex shrink-0 items-center justify-center",s?"text-light-400":"text-light-500")},u):null,Y=K?b.createElement("span",{className:"flex min-w-0 items-center gap-2 whitespace-nowrap"},b.createElement("span",{className:O("truncate font-medium",s?"text-light-400":"text-light-800")},K.label),K.supportingText&&b.createElement("span",{className:s?"text-light-400":"text-light-700"},K.supportingText)):b.createElement("span",{className:s?"text-light-400":"text-light-500"},l),E=w&&b.createElement("div",{role:"listbox",className:sg({size:t})},z.length===0&&b.createElement("div",{className:O(va({size:t}),"mx-1 w-auto text-light-500 hover:bg-transparent")},"No options found"),z.map($=>{const H=L?h.includes($.id):$.id===f;return b.createElement("div",{key:$.id,className:"px-1 py-0.5"},b.createElement("button",{type:"button",role:"option","aria-selected":H,disabled:$.disabled,onClick:()=>y($),className:va({size:t,disabled:$.disabled})},G($),b.createElement("span",{className:"flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"},b.createElement("span",{className:O("truncate font-medium",$.disabled?"text-light-400":"text-light-900")},$.label),$.supportingText&&b.createElement("span",{className:$.disabled?"text-light-400":"text-light-700"},$.supportingText)),H&&b.createElement(dg,{className:"ml-auto size-5 shrink-0 text-primary-500"})))}));return b.createElement("div",{ref:V,className:O(c?gg:ig(),g)},r&&b.createElement("label",{className:c?hg():lg()},r,n&&b.createElement("span",{className:"text-error-400"},"*"),o),b.createElement("div",{className:"relative",onKeyDown:$=>{$.key==="Escape"&&j()}},e==="default"?b.createElement("button",{type:"button","aria-haspopup":"listbox","aria-expanded":w,disabled:s,onClick:U,className:O(c?Ea({size:t,open:w,disabled:s}):xa({size:t,open:w,disabled:s}),x)},N,b.createElement("span",{className:"flex min-w-0 flex-1 items-center"},Y),b.createElement(cg,{className:O(wa[t],"shrink-0 text-light-500")})):b.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-expanded":w,onClick:U,className:O(c?Ea({size:t,open:w,disabled:s}):xa({size:t,open:w,disabled:s}),x)},b.createElement(ug,{className:O(wa[t],"shrink-0",s?"text-light-400":"text-light-500")}),L&&W.length>0&&b.createElement("div",{className:"flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide"},W.map($=>b.createElement(Nn,{key:$.id,size:"sm",disabled:s,icon:$.avatar?b.createElement("img",{src:$.avatar,alt:"",className:"size-4 shrink-0 rounded-full object-cover"}):void 0,onClose:()=>y($)},$.label))),!L&&!w&&K?b.createElement("span",{className:"flex min-w-0 flex-1 items-center"},Y):b.createElement("input",{ref:I,value:S,disabled:s,placeholder:L&&W.length>0?"":l,onChange:$=>{k($.target.value),w||v(!0)},onKeyDown:T,className:"min-w-8 flex-1 bg-transparent text-light-900 outline-none placeholder:text-light-500 disabled:cursor-not-allowed disabled:placeholder:text-light-400"})),E),i&&b.createElement("p",{className:ag()},i))}const mg=F(["inline-flex items-center justify-center gap-1 shrink-0","rounded-md border border-light-200 bg-white px-2 py-1","font-bold text-caption-sm text-light-900","transition-shadow"],{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),yg=F("flex size-5 shrink-0 items-center justify-center text-light-500",{variants:{disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer hover:text-light-700"}},defaultVariants:{disabled:!1}}),xg=F("rounded-full transition-shadow",{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),vg=F(["absolute top-full z-10 mt-2 flex w-60 flex-col overflow-clip","rounded-lg border border-light-200 bg-white","shadow-[0px_12px_16px_-4px_rgba(16,24,40,0.08),0px_4px_6px_-2px_rgba(16,24,40,0.03)]"]),wg=F("flex w-full flex-col items-start border-b border-light-200 px-4 py-3"),Eg=F("flex w-full flex-col items-start overflow-y-auto py-1"),$g=F(["mx-1 flex w-[calc(100%-8px)] items-center gap-3 rounded-md px-4 py-2.5","text-left font-bold text-caption-lg"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer text-light-800 hover:bg-light-50"}},defaultVariants:{disabled:!1}}),Sg=F("ml-auto shrink-0 font-normal text-caption-sm text-light-500"),Cg=F("my-1 h-px w-full bg-light-200"),kg=({className:t})=>b.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},b.createElement("path",{d:"M4.5 6.75L9 11.25L13.5 6.75",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Pg=({className:t})=>b.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},b.createElement("path",{d:"M13.5 11.25L9 6.75L4.5 11.25",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Tg=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("path",{d:"M10 10.83a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67ZM10 5a.83.83 0 1 0 0-1.67A.83.83 0 0 0 10 5ZM10 16.67a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"}));function Ng({trigger:t="button",label:e="Account",icon:r,avatarSrc:n,avatarInitials:o,header:i,items:l,open:s,defaultOpen:c=!1,onOpenChange:u,disabled:d=!1,align:f="end",className:p,menuClassName:h}){const[m,x]=b.useState(c),g=s!==void 0,w=g?s:m,v=b.useRef(null),S=I=>{g||x(I),u?.(I)};b.useEffect(()=>{if(!w)return;const I=C=>{v.current?.contains(C.target)||S(!1)},L=C=>{C.key==="Escape"&&S(!1)};return document.addEventListener("mousedown",I),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("keydown",L)}},[w]);const k=()=>{d||S(!w)},V=I=>{I.disabled||(I.onClick?.(),S(!1))};return b.createElement("div",{ref:v,className:O("relative inline-block",p)},t==="button"&&b.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,disabled:d,onClick:k,className:mg({open:w,disabled:d})},b.createElement("span",null,e),w?b.createElement(Pg,{className:"size-[18px]"}):b.createElement(kg,{className:"size-[18px]"})),t==="icon"&&b.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,"aria-label":e,disabled:d,onClick:k,className:yg({disabled:d})},r??b.createElement(Tg,{className:"size-5"})),t==="avatar"&&b.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,"aria-label":e,disabled:d,onClick:k,className:xg({open:w,disabled:d})},b.createElement(Lt,{src:n,initials:o,size:"md",status:"online"})),w&&b.createElement("div",{role:"menu",className:O(vg(),f==="end"?"right-0":"left-0",h)},i&&b.createElement("div",{className:wg()},b.createElement("div",{className:"flex w-full items-center gap-3"},b.createElement(Lt,{src:i.avatarSrc,initials:i.avatarInitials,size:"md",status:i.status??"online"}),b.createElement("div",{className:"flex min-w-0 flex-1 flex-col items-start text-left"},b.createElement("span",{className:"w-full truncate text-sm font-bold text-light-800"},i.name),i.subtitle&&b.createElement("span",{className:"w-full truncate text-caption-lg font-normal text-light-700"},i.subtitle)))),b.createElement("div",{className:Eg()},l.map(I=>I.divider?b.createElement("div",{key:I.id,role:"separator",className:Cg()}):b.createElement("button",{key:I.id,type:"button",role:"menuitem",disabled:I.disabled,onClick:()=>V(I),className:$g({disabled:I.disabled})},I.icon&&b.createElement("span",{className:"flex size-4 shrink-0 items-center justify-center"},I.icon),b.createElement("span",{className:"flex-1 truncate"},I.label),I.shortcut&&b.createElement("span",{className:Sg()},I.shortcut))))))}const $a=F("relative",{variants:{layout:{floating:["flex w-full flex-col gap-4 p-4","rounded-xl border shadow-xs","sm:flex-row sm:items-start"],"full-width":"w-full border-b"}},defaultVariants:{layout:"floating"}}),Kg={default:{surface:"bg-light-50",border:"border-light-300",iconSurface:"border border-light-200 bg-white shadow-xs",iconSurfaceOnLight:"border border-light-200 bg-white shadow-xs",iconText:"text-light-800"},brand:{surface:"bg-primary-50",border:"border-primary-300",iconSurface:"bg-primary-100",iconSurfaceOnLight:"bg-white",iconText:"text-primary-500"},gray:{surface:"bg-light-50",border:"border-light-300",iconSurface:"bg-light-100",iconSurfaceOnLight:"bg-white",iconText:"text-light-800"},error:{surface:"bg-error-50",border:"border-error-300",iconSurface:"bg-error-50",iconSurfaceOnLight:"bg-white",iconText:"text-error-500"},warning:{surface:"bg-warning-50",border:"border-warning-300",iconSurface:"bg-warning-100",iconSurfaceOnLight:"bg-white",iconText:"text-warning-500"},success:{surface:"bg-success-50",border:"border-success-300",iconSurface:"bg-success-50",iconSurfaceOnLight:"bg-white",iconText:"text-success-500"}},Lg="bg-white border-light-200",Mg="relative mx-auto flex w-full max-w-[1280px] flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:gap-3 sm:px-8 sm:py-3",Dg=F("flex shrink-0 items-center justify-center",{variants:{layout:{floating:"","full-width":"hidden sm:flex"},shape:{square:"",circle:""},variant:{featured:"",plain:""}},compoundVariants:[{variant:"featured",layout:"floating",class:"size-8"},{variant:"featured",layout:"full-width",class:"size-10"},{variant:"featured",shape:"circle",class:"rounded-full"},{variant:"featured",shape:"square",layout:"floating",class:"rounded-md"},{variant:"featured",shape:"square",layout:"full-width",class:"rounded-lg"}],defaultVariants:{layout:"floating",shape:"square",variant:"featured"}}),Sa=F("flex min-w-0 flex-1",{variants:{layout:{floating:"flex-col gap-3","full-width":"items-center gap-4"}},defaultVariants:{layout:"floating"}}),Ig=F("flex min-w-0",{variants:{layout:{floating:"flex-col gap-1","full-width":"flex-col gap-0.5 sm:flex-row sm:flex-wrap sm:gap-x-1.5"},closable:{true:"",false:""}},compoundVariants:[{layout:"floating",closable:!0,class:"pr-8"},{layout:"full-width",closable:!0,class:"pr-8 sm:pr-0"}],defaultVariants:{layout:"floating",closable:!1}}),Ag="text-caption-lg font-bold text-light-800",Fg="text-caption-lg text-light-600",Og=F("flex gap-3",{variants:{layout:{floating:"flex-wrap items-center","full-width":""},actionVariant:{link:"flex-wrap items-center",button:""}},compoundVariants:[{layout:"full-width",actionVariant:"button",class:"flex-col-reverse sm:flex-row sm:items-center"}],defaultVariants:{layout:"floating",actionVariant:"link"}}),Bg=F(["inline-flex items-center justify-center gap-1 bg-transparent p-0","text-caption-lg font-bold transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{emphasis:{primary:"text-primary-500 hover:text-primary-800",secondary:"text-light-800 hover:text-light-900"}},defaultVariants:{emphasis:"secondary"}}),zg=F(["flex size-9 shrink-0 items-center justify-center rounded-lg","bg-transparent text-light-500 transition-colors","hover:bg-light-50 hover:text-light-700","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{layout:{floating:"absolute right-[7px] top-[7px]","full-width":"absolute right-2 top-2 sm:static"}},defaultVariants:{layout:"floating"}}),_g={default:$r,brand:$r,gray:$r,error:zn,warning:zn,success:Ta},Ca=({title:t,description:e,color:r="default",layout:n="floating",background:o="white",icon:i,iconVariant:l="featured",showIcon:s=!0,primaryAction:c,secondaryAction:u,actionVariant:d,actions:f,onClose:p,closeLabel:h="Close",className:m,...x})=>{const g=_g[r],w=n==="floating"?16:20,v=d??(n==="floating"?"link":"button"),S=Kg[r],k=o==="light",V=k?O(S.surface,S.border):Lg,I=(j,U)=>j?v==="link"?a.createElement("button",{type:"button",onClick:j.onClick,className:Bg({emphasis:U})},j.label):a.createElement(xr,{size:"sm",variant:U==="primary"?"solid":"outline",onPress:j.onClick,className:n==="full-width"?"w-full sm:w-auto":void 0},j.label):null,C=!!(f||c||u)?a.createElement("div",{className:Og({layout:n,actionVariant:v})},f??a.createElement(a.Fragment,null,I(u,"secondary"),I(c,"primary"))):null,K=s&&(i||g)?a.createElement("div",{className:O(Dg({layout:n,variant:l,shape:r==="default"?"square":"circle"}),S.iconText,l==="featured"&&(k?S.iconSurfaceOnLight:S.iconSurface))},i??a.createElement(g,{size:w,stroke:2})):null,W=p?a.createElement("button",{type:"button","aria-label":h,onClick:p,className:zg({layout:n})},a.createElement(Ka,{size:16,stroke:2})):null,z=a.createElement("div",{className:Ig({layout:n,closable:!!p})},a.createElement("p",{className:Ag},t),e&&a.createElement("p",{className:Fg},e));return n==="full-width"?a.createElement("div",{role:"alert",className:O($a({layout:n}),V,m),...x},a.createElement("div",{className:Mg},a.createElement("div",{className:Sa({layout:n})},K,z),(C||W)&&a.createElement("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2"},C,W))):a.createElement("div",{role:"alert",className:O($a({layout:n}),V,m),...x},K,a.createElement("div",{className:Sa({layout:n})},z,C),W)};Ca.displayName="Alert",X.Alert=Ca,X.Avatar=Lt,X.AvatarGroup=na,X.AvatarLabelGroup=oa,X.AvatarProfilePhoto=ia,X.Badge=Zs,X.BadgeGroup=Js,X.Button=xr,X.CardNumberInput=$h,X.Checkbox=js,X.Dropdown=Ng,X.Input=Kn,X.InputCounter=Eh,X.InputDropdown=bg,X.Loading=Qs,X.MultiSelectInput=_h,X.PhoneInput=vh,X.RadioGroup=yp,X.RadioGroupItem=Gs,X.SaleAmountInput=wh,X.Tab=la,X.TabBrowser=pa,X.TabBrowserBar=ha,X.TabBrowserPreview=ga,X.TabList=sa,X.Tag=Nn,X.Textarea=ya,X.Toggle=Rs,X.Tooltip=wr,X.WebsiteCopyInput=og,X.WebsiteInput=Yh,X.buttonIconSizePx=up,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})}));
12
+ }`.trim(),document.head.prepend(o);let l=d=>{if(!(d.touches.length===2||r)){if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&d.preventDefault()}},s=d=>{let f=A(d),p=d.relatedTarget;p&&_r(p)?(p.focus({preventScroll:!0}),zi(p,_r(f))):p||f.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(d){let f=ie(),p=f!=null&&_r(f);c.call(this,{...d,preventScroll:!0}),(!d||!d.preventScroll)&&zi(this,p)};let u=He(xn(document,"touchstart",n,{passive:!1,capture:!0}),xn(document,"touchmove",l,{passive:!1,capture:!0}),xn(document,"blur",s,!0));return()=>{t(),u(),o.remove(),HTMLElement.prototype.focus=c}}function pr(t,e,r){let n=t.style[e];return t.style[e]=r,()=>{t.style[e]=n}}function xn(t,e,r,n){return t.addEventListener(e,r,n),()=>{t.removeEventListener(e,r,n)}}function zi(t,e){e||!Tt?_i(t):Tt.addEventListener("resize",()=>_i(t),{once:!0})}function _i(t){let e=document.scrollingElement||document.documentElement,r=t;for(;r&&r!==e;){let n=ri(r);if(n!==document.documentElement&&n!==document.body&&n!==r){let o=n.getBoundingClientRect(),i=r.getBoundingClientRect();if(i.top<o.top||i.bottom>o.top+r.clientHeight){let l=o.bottom;Tt&&(l=Math.min(l,Tt.offsetTop+Tt.height));let s=i.top-o.top-((l-o.top)/2-i.height/2);n.scrollTo({top:Math.max(0,Math.min(n.scrollHeight-n.clientHeight,n.scrollTop+s)),behavior:"smooth"})}}r=n.parentElement}}function Fd(t,e){let{triggerRef:r,popoverRef:n,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:s,...c}=t,u=c.trigger==="SubmenuTrigger",{overlayProps:d,underlayProps:f}=Md({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:s},o??n),{overlayProps:p,arrowProps:h,placement:m,triggerAnchorPoint:v}=Td({...c,targetRef:r,overlayRef:n,isOpen:e.isOpen,onClose:i&&!u?e.close:null,getTargetRect:c.getTargetRect??(e.point?()=>new DOMRect(e.point.x,e.point.y,0,0):void 0)});Dd({isDisabled:i||!e.isOpen}),a.useEffect(()=>{if(e.isOpen&&n.current)return i?md(o?.current??n.current):bd([o?.current??n.current],{shouldUseInert:!0})},[i,e.isOpen,n,o]);let{focusWithinProps:g}=rr(t);return{popoverProps:ee(d,p,g),arrowProps:h,underlayProps:f,placement:m,triggerAnchorPoint:v}}var Vi={};Vi={dismiss:"تجاهل"};var Hi={};Hi={dismiss:"Отхвърляне"};var Wi={};Wi={dismiss:"Odstranit"};var ji={};ji={dismiss:"Luk"};var Ui={};Ui={dismiss:"Schließen"};var Gi={};Gi={dismiss:"Απόρριψη"};var Ri={};Ri={dismiss:"Dismiss"};var qi={};qi={dismiss:"Descartar"};var Yi={};Yi={dismiss:"Lõpeta"};var Xi={};Xi={dismiss:"Hylkää"};var Zi={};Zi={dismiss:"Rejeter"};var Ji={};Ji={dismiss:"התעלם"};var Qi={};Qi={dismiss:"Odbaci"};var el={};el={dismiss:"Elutasítás"};var tl={};tl={dismiss:"Ignora"};var rl={};rl={dismiss:"閉じる"};var nl={};nl={dismiss:"무시"};var ol={};ol={dismiss:"Atmesti"};var il={};il={dismiss:"Nerādīt"};var ll={};ll={dismiss:"Lukk"};var sl={};sl={dismiss:"Negeren"};var al={};al={dismiss:"Zignoruj"};var cl={};cl={dismiss:"Descartar"};var ul={};ul={dismiss:"Dispensar"};var dl={};dl={dismiss:"Revocare"};var fl={};fl={dismiss:"Пропустить"};var pl={};pl={dismiss:"Zrušiť"};var hl={};hl={dismiss:"Opusti"};var gl={};gl={dismiss:"Odbaci"};var bl={};bl={dismiss:"Avvisa"};var ml={};ml={dismiss:"Kapat"};var yl={};yl={dismiss:"Скасувати"};var vl={};vl={dismiss:"取消"};var xl={};xl={dismiss:"關閉"};var wl={};wl={"ar-AE":Vi,"bg-BG":Hi,"cs-CZ":Wi,"da-DK":ji,"de-DE":Ui,"el-GR":Gi,"en-US":Ri,"es-ES":qi,"et-EE":Yi,"fi-FI":Xi,"fr-FR":Zi,"he-IL":Ji,"hr-HR":Qi,"hu-HU":el,"it-IT":tl,"ja-JP":rl,"ko-KR":nl,"lt-LT":ol,"lv-LV":il,"nb-NO":ll,"nl-NL":sl,"pl-PL":al,"pt-BR":cl,"pt-PT":ul,"ro-RO":dl,"ru-RU":fl,"sk-SK":pl,"sl-SI":hl,"sr-SP":gl,"sv-SE":bl,"tr-TR":ml,"uk-UA":yl,"zh-CN":vl,"zh-TW":xl};function Od(t){return t&&t.__esModule?t.default:t}function El(t){let{onDismiss:e,...r}=t,n=bo(Od(wl),"@react-aria/overlays"),o=ao(r,n.format("dismiss")),i=()=>{e&&e()};return a.createElement(zu,null,a.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}const Bd=a.forwardRef(({children:t,...e},r)=>{let n=a.useRef(!1),o=a.useContext($t),i=ee(o||{},{...e,register(){n.current=!0,o&&o.register()}});return i.ref=gt(r||o?.ref),jr(o,i.ref),a.useEffect(()=>{n.current||(process.env.NODE_ENV!=="production"&&console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),n.current=!0)},[]),a.createElement($t.Provider,{value:i},t)});function zd({children:t}){let e=a.useMemo(()=>({register:()=>{}}),[]);return a.createElement($t.Provider,{value:e},t)}const _d=a.createContext({});function Vd(){return a.useContext(_d)??{}}const Hd=a.createContext(null);function $l(t){let e=ht(),{portalContainer:r=e?null:document.body,isExiting:n}=t,[o,i]=a.useState(!1),l=a.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=Vd();if(!t.portalContainer&&s&&(r=s()),!r)return null;let c=t.children;return t.disableFocusManagement||(c=a.createElement(ui,{restoreFocus:!0,contain:(t.shouldContainFocus||o)&&!n},c)),c=a.createElement(Hd.Provider,{value:l},a.createElement(zd,null,a.createElement(qt.Provider,{value:null},c))),et.createPortal(c,r)}function Sl(t){let[e,r]=Gt(t.isOpen,t.defaultOpen||!1,t.onOpenChange),[n,o]=a.useState(null);const i=a.useCallback(()=>{r(!0)},[r]),l=a.useCallback(()=>{r(!1)},[r]),s=a.useCallback(()=>{r(!e)},[r,e]);return{isOpen:e,setOpen:r,open:i,close:l,toggle:s,point:n,setPoint:o}}function Wd(t,e=!0){let[r,n]=a.useState(!0),o=r&&e;return Q(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,o]),Cl(t,o,a.useCallback(()=>n(!1),[])),o}function jd(t,e){let[r,n]=a.useState(e?"open":"closed");switch(r){case"open":e||n("exiting");break;case"closed":case"exiting":e&&n("open");break}let o=r==="exiting";return Cl(t,o,a.useCallback(()=>{n(i=>i==="exiting"?"closed":i)},[])),o}function Cl(t,e,r){Q(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){r();return}let n=t.current.getAnimations();if(n.length===0){r();return}let o=!1;return Promise.allSettled(n.map(i=>i.finished)).then(()=>{o||et.flushSync(()=>{r()})}),()=>{o=!0}}},[t,e,r])}const kl=a.createContext(null),Pl=a.createContext(null),Ud=a.forwardRef(function(e,r){[e,r]=ot(e,r,kl);let n=a.useContext(ps),o=Sl(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?o:n,l=jd(r,i.isOpen),s=e.isExiting||!e.shouldSkipAnimation&&l||!1,c=Ko(),{direction:u}=it();if(c){let d=e.children;return typeof d=="function"&&(d=d({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),a.createElement(a.Fragment,null,d)}return i&&!i.isOpen&&!s?null:a.createElement(Gd,{...e,triggerRef:e.triggerRef,state:i,popoverRef:r,isExiting:s,dir:u})});function Gd({state:t,isExiting:e,UNSTABLE_portalContainer:r,clearContexts:n,...o}){let i=a.useRef(null),l=a.useRef(null),s=a.useContext(Pl),c=s&&o.trigger==="SubmenuTrigger",{popoverProps:u,underlayProps:d,arrowProps:f,placement:p,triggerAnchorPoint:h}=Fd({...o,offset:o.offset??8,arrowRef:i,groupRef:c?s:l},t),m=o.popoverRef,v=Wd(m,!!p),g=o.isEntering||!o.shouldSkipAnimation&&v||!1,w=Ae({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:p,isEntering:g,isExiting:e}}),x=!o.isNonModal||o.trigger==="SubmenuTrigger"||o.trigger==="PreviewTrigger",[S,k]=a.useState(o.trigger==="PreviewTrigger");Q(()=>{m.current&&k(x&&!m.current.querySelector("[role=dialog]"))},[m,x]),a.useEffect(()=>{S&&o.trigger!=="PreviewTrigger"&&(o.trigger!=="SubmenuTrigger"||vt()!=="pointer")&&m.current&&!At(m.current)&&st(m.current)},[S,m,o.trigger]);let V=a.useMemo(()=>{let z=w.children;if(n)for(let j of n)z=a.createElement(j.Provider,{value:null},z);return z},[w.children,n]),[I,L]=a.useState(null),C=a.useCallback(()=>{o.triggerRef.current&&L(o.triggerRef.current.getBoundingClientRect().width+"px")},[o.triggerRef]);Q(C,[C]),yn({ref:w.style?.["--trigger-width"]?void 0:o.triggerRef,onResize:C});let K={...u.style,"--trigger-anchor-point":h?`${h.x}px ${h.y}px`:void 0,...w.style,"--trigger-width":w.style?.["--trigger-width"]||I},W=a.createElement(Ce.div,{...ee(ye(o,{global:!0}),u),...w,id:S?o.id:void 0,role:S?"dialog":void 0,tabIndex:S?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:m,slot:o.slot||void 0,style:K,dir:o.dir,"data-trigger":o.trigger,"data-placement":p,"data-entering":g||void 0,"data-exiting":e||void 0},!o.isNonModal&&a.createElement(El,{onDismiss:t.close}),a.createElement(hd.Provider,{value:{...f,placement:p,ref:i}},V),a.createElement(El,{onDismiss:t.close}));return c?a.createElement($l,{...o,shouldContainFocus:S&&o.trigger!=="PreviewTrigger",isExiting:e,portalContainer:r??s?.current??void 0},W):a.createElement($l,{...o,shouldContainFocus:S&&o.trigger!=="PreviewTrigger",isExiting:e,portalContainer:r},!o.isNonModal&&t.isOpen&&a.createElement("div",{"data-testid":"underlay",...d,style:{position:"fixed",inset:0}}),a.createElement("div",{ref:l,style:{display:"contents"}},a.createElement(Pl.Provider,{value:l},W)))}const Rd=a.createContext({});var Tl={};Tl={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Nl={};Nl={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Kl={};Kl={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Ll={};Ll={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var Ml={};Ml={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Dl={};Dl={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Il={};Il={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Al={};Al={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Fl={};Fl={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Ol={};Ol={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Bl={};Bl={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var zl={};zl={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var _l={};_l={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Vl={};Vl={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Hl={};Hl={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var Wl={};Wl={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var jl={};jl={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Ul={};Ul={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Gl={};Gl={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Rl={};Rl={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var ql={};ql={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Yl={};Yl={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Xl={};Xl={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Zl={};Zl={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Jl={};Jl={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Ql={};Ql={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var es={};es={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var ts={};ts={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var rs={};rs={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var ns={};ns={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var os={};os={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var is={};is={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var ls={};ls={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var ss={};ss={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var as={};as={"ar-AE":Tl,"bg-BG":Nl,"cs-CZ":Kl,"da-DK":Ll,"de-DE":Ml,"el-GR":Dl,"en-US":Il,"es-ES":Al,"et-EE":Fl,"fi-FI":Ol,"fr-FR":Bl,"he-IL":zl,"hr-HR":_l,"hu-HU":Vl,"it-IT":Hl,"ja-JP":Wl,"ko-KR":jl,"lt-LT":Ul,"lv-LV":Gl,"nb-NO":Rl,"nl-NL":ql,"pl-PL":Yl,"pt-BR":Xl,"pt-PT":Zl,"ro-RO":Jl,"ru-RU":Ql,"sk-SK":es,"sl-SI":ts,"sr-SP":rs,"sv-SE":ns,"tr-TR":os,"uk-UA":is,"zh-CN":ls,"zh-TW":ss};function qd(t){let{onContextMenu:e}=t,r=a.useRef(!1),{longPressProps:n}=fn({onLongPressStart(){r.current=!1},onLongPress(o){r.current?r.current=!1:e?.({target:o.target,x:o.x,y:o.y})}});return e?{contextMenuProps:ee(We()?n:{},{onContextMenu(o){o.stopPropagation(),o.preventDefault(),r.current=!0;let i=o.currentTarget.getBoundingClientRect();e({target:o.currentTarget,x:o.clientX-i.x,y:o.clientY-i.y})},onKeyDown(o){if(be()&&o.ctrlKey&&o.key==="Enter"){r.current=!1;let i=o.currentTarget;o.stopPropagation(),setTimeout(()=>{if(r.current)r.current=!1;else{let l=i.getBoundingClientRect();e({target:i,x:l.width/2,y:l.height/2})}},10)}}})}:{contextMenuProps:{}}}function Yd(t,e,r){let{type:n}=t,{isOpen:o}=e;a.useEffect(()=>{r&&r.current&&Bi.set(r.current,e.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let l=Se();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}function Xd(t){return t&&t.__esModule?t.default:t}function Zd(t,e,r){let{type:n="menu",isDisabled:o,trigger:i="press"}=t,l=Se(),{triggerProps:s,overlayProps:c}=Yd({type:n},e,r),u=(g,w,x="first")=>{if(!g||w.isDefaultPrevented())return!1;e.toggle(x)},{keyboardProps:d}=at({isDisabled:o,shortcuts:{Enter:g=>u(i!=="longPress",g,"first")," ":g=>u(i!=="longPress",g,"first"),ArrowDown:g=>u(i!=="longPress",g,"first"),ArrowUp:g=>u(i!=="longPress",g,"last"),"Alt+Enter":g=>u(i==="longPress",g,"first"),"Alt+ ":g=>u(i==="longPress",g,"first"),"Alt+ArrowDown":g=>u(!0,g,"first"),"Alt+ArrowUp":g=>u(!0,g,"last")}}),f=bo(Xd(as),"@react-aria/menu"),{longPressProps:p}=fn({isDisabled:o||i!=="longPress",accessibilityDescription:f.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),h={preventFocusOnPress:!0,onPressStart(g){g.pointerType!=="touch"&&g.pointerType!=="keyboard"&&!o&&(we(g.target),e.open(g.pointerType==="virtual"?"first":null))},onPress(g){g.pointerType==="touch"&&!o&&(we(g.target),e.toggle())}};delete s.onPress;let{contextMenuProps:m}=qd({onContextMenu(g){let w=g.target.getBoundingClientRect();e.setPoint({x:w.x+g.x,y:w.y+g.y}),e.open()}});a.useEffect(()=>{if(e.isOpen&&i==="contextMenu"){let g=w=>{(w.button===2||w.button===0&&w.ctrlKey===!0)&&A(w)===document.body&&e.close()};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)}},[e,i]);let v;if(i==="press")v={...h,...d};else if(i==="longPress")v={...p,...d};else if(i==="contextMenu"){v=m;let{"aria-haspopup":g,"aria-expanded":w,"aria-controls":x,...S}=s;s=S}return{menuTriggerProps:{...s,...v,id:l},menuProps:{...c,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const cs=new WeakMap;function Jd(t,e,r){let{shouldFocusWrap:n=!0,onKeyDown:o,onKeyUp:i,...l}=t;!t["aria-label"]&&!t["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=ye(t,{labelable:!0}),{listProps:c}=od({...l,ref:r,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:n,linkBehavior:"override"});return cs.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:ee(s,{onKeyDown:o,onKeyUp:i},{role:"menu",...c,onKeyDown:u=>{(u.key!=="Escape"||t.shouldUseVirtualFocus)&&c.onKeyDown?.(u)}})}}function Qd(t,e,r){let{id:n,key:o,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":c,onPressStart:u,onPressUp:d,onPress:f,onPressChange:p,onPressEnd:h,onClick:m,onHoverStart:v,onHoverChange:g,onHoverEnd:w,onKeyDown:x,onKeyUp:S,onFocus:k,onFocusChange:V,onBlur:I,selectionManager:L=e.selectionManager}=t,C=!!c,K=C&&t["aria-expanded"]==="true",W=t.isDisabled??L.isDisabled(o),z=t.isSelected??L.isSelected(o),j=cs.get(e),U=e.collection.getItem(o),y=t.onClose||j.onClose,T=_t(),G=()=>{if(!C&&(U?.props?.onAction?U.props.onAction():t.onAction&&t.onAction(o),j.onAction)){let le=j.onAction;le(o,U?.value)}},N="menuitem";C||(L.selectionMode==="single"?N="menuitemradio":L.selectionMode==="multiple"&&(N="menuitemcheckbox"));let Y=kr(),E=kr(),$=kr(),H={id:n,"aria-disabled":W||void 0,role:N,"aria-label":t["aria-label"],"aria-labelledby":Y,"aria-describedby":[t["aria-describedby"],E,$].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":c,"aria-expanded":t["aria-expanded"]};if(L.selectionMode!=="none"&&!C&&(H["aria-checked"]=z),s){let le=Number(U?.index);H["aria-posinset"]=Number.isNaN(le)?void 0:le+1,H["aria-setsize"]=ad(e.collection)}let ae=a.useRef(!1),pe=le=>{p?.(le),ae.current=le},ne=a.useRef(null),P=le=>{le.pointerType!=="keyboard"&&(ne.current={pointerType:le.pointerType}),le.pointerType==="mouse"&&(ae.current||le.target.click()),d?.(le)},R=le=>{m?.(le),G(),gc(le,T,U.props.href,U?.props.routerOptions);let pt=ne.current?.pointerType==="keyboard"?ne.current?.key==="Enter"||L.selectionMode==="none"||L.isLink(o):L.selectionMode!=="multiple"||L.isLink(o);pt=l??i??pt,y&&!C&&pt&&y(),ne.current=null},{itemProps:oe,isFocused:ge}=xi({id:n,selectionManager:L,key:o,ref:r,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:j.shouldUseVirtualFocus}),{pressProps:se,isPressed:ft}=tr({onPressStart:u,onPress:f,onPressUp:P,onPressChange:pe,onPressEnd:h,isDisabled:W}),{hoverProps:D}=ir({isDisabled:W,onHoverStart(le){!yt()&&!(K&&c)&&(L.setFocused(!0),L.setFocusedKey(o)),v?.(le)},onHoverChange:g,onHoverEnd:w}),{keyboardProps:M}=at({shortcuts:{" ":le=>{ne.current={pointerType:"keyboard",key:" "},A(le).click(),zr("keyboard")},Enter:le=>{ne.current={pointerType:"keyboard",key:"Enter"};let pt=A(le);if(pt.tagName!=="A"){pt.click(),zr("keyboard");return}return zr("keyboard"),{shouldPreventDefault:!1,shouldContinuePropagation:!1}}},onKeyDown:x,onKeyUp:S}),{focusableProps:ue}=Ur({onBlur:I,onFocus:k,onFocusChange:V},r),re=ye(U?.props);delete re.id;let Er=no(U?.props);return{menuItemProps:{...H,...ee(re,Er,C?{onFocus:oe.onFocus,"data-collection":oe["data-collection"],"data-key":oe["data-key"]}:oe,se,D,M,ue,j.shouldUseVirtualFocus||C?{onMouseDown:le=>le.preventDefault()}:void 0,W?void 0:{onClick:R}),tabIndex:oe.tabIndex!=null&&K&&!j.shouldUseVirtualFocus?-1:oe.tabIndex},labelProps:{id:Y},descriptionProps:{id:E},keyboardShortcutProps:{id:$},isFocused:ge,isFocusVisible:ge&&L.isFocused&&yt()&&!K,isSelected:z,isPressed:ft,isDisabled:W}}function ef(t){let{heading:e,"aria-label":r}=t,n=Se();return{itemProps:{role:"presentation"},headingProps:e?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":e?n:void 0}}}function us(t){let e=Sl(t),[r,n]=a.useState(null),[o,i]=a.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:r,...e,open(u=null){n(u),e.open()},toggle(u=null){n(u),e.toggle()},close(){l()},expandedKeysStack:o,openSubmenu:(u,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),u])},closeSubmenu:(u,d)=>{i(f=>f[d]===u?f.slice(0,d):f)}}}class tf{constructor(e,{expandedKeys:r}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,r=r||new Set;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&(l.type==="section"||r.has(l.key)))for(let s of l.childNodes)n(s)};for(let l of e)n(l);let o=null,i=0;for(let[l,s]of this.keyMap)o?(o.nextKey=l,s.prevKey=o.key):(this.firstKey=l,s.prevKey=void 0),s.type==="item"&&(s.index=i++),o=s,o.nextKey=void 0;this.lastKey=o?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);return r?r.prevKey??null:null}getKeyAfter(e){let r=this.keyMap.get(e);return r?r.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}}function rf(t){let{onExpandedChange:e}=t,[r,n]=Gt(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),o=hn(t),i=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),l=Ni(t,a.useCallback(c=>new tf(c,{expandedKeys:r}),[r]),null);return a.useEffect(()=>{o.focusedKey!=null&&!l.getItem(o.focusedKey)&&o.setFocusedKey(null)},[l,o.focusedKey]),{collection:l,expandedKeys:r,disabledKeys:i,toggleKey:c=>{n(nf(r,c))},setExpandedKeys:n,selectionManager:new Ct(l,o)}}function nf(t,e){let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r}const ds=a.createContext(null),wn=a.createContext(null),En=a.createContext(null),hr=a.createContext(null);function of(t){let e=us(t),r=a.useRef(null),{menuTriggerProps:n,menuProps:o}=Zd({...t,type:"menu"},e,r),i=a.useRef(null);return Ko()?null:a.createElement(bt,{values:[[ds,{...o,ref:i}],[ps,e],[En,e],[kl,{trigger:"MenuTrigger",triggerRef:r,scrollRef:i,placement:"bottom start","aria-labelledby":o["aria-labelledby"],offset:t.trigger==="contextMenu"?0:void 0}]]},a.createElement(Bd,{...n,ref:r,isPressed:e.isOpen},t.children))}const lf=a.createContext(null),On=class On extends Re{filter(e,r,n){let o=e.getItem(this.firstChildKey);if(o&&n(o.textValue,this)){let i=this.clone();return r.addDescendants(i,e),i}return null}};On.type="submenutrigger";let fs=On;const sf=a.forwardRef(function(e,r){return[e,r]=ot(e,r,ds),a.createElement(Ao,{content:a.createElement(Bo,e)},n=>a.createElement(af,{props:e,collection:n,menuRef:r}))});function af({props:t,collection:e,menuRef:r}){[t,r]=ot(t,r,mo);let{filter:n,...o}=t,i=a.useMemo(()=>n?e.filter(n):e,[e,n]),l=rf({...t,collection:i,children:void 0}),s=a.useContext(En),{isVirtualized:c,CollectionRoot:u}=a.useContext(Zt),{menuProps:d}=Jd({...t,isVirtualized:c,onClose:t.onClose||s?.close},l,r),f=Ae({...t,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),p=null;l.collection.size===0&&t.renderEmptyState&&(p=a.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState()));let h=ye(t,{global:!0});return a.createElement(ui,null,a.createElement(Ce.div,{...ee(h,f,d),ref:r,slot:t.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:t.onScroll},a.createElement(bt,{values:[[wn,l],[Hu,{elementType:"div"}],[hu,{name:"MenuSection",render:uf}],[lf,{parentMenuRef:r,shouldUseVirtualFocus:o?.shouldUseVirtualFocus}],[Nt,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[mo,null],[Bc,null],[hr,l.selectionManager],[En,s??us({})]]},a.createElement(ii,null,a.createElement(u,{collection:l.collection,persistedKeys:_o(l.selectionManager.focusedKey),scrollRef:r}))),p))}class cf extends Ct{constructor(e,r){super(e.collection,r),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,r){return this.parent.setFocusedKey(e,r)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}}function uf(t,e,r,n="react-aria-MenuSection"){let o=a.useContext(wn),{CollectionBranch:i}=a.useContext(Zt),[l,s]=Wa(),{headingProps:c,groupProps:u}=ef({heading:s,"aria-label":r.props["aria-label"]??void 0}),d=Ae({...t,id:void 0,children:void 0,defaultClassName:n,className:r.props?.className,style:r.props?.style,values:void 0}),f=a.useContext(hr),p=hn(t),h=t.selectionMode!=null?new cf(f,p):f,m=It(Nt)?.shouldCloseOnSelect,v=ye(t,{global:!0});return delete v.id,a.createElement(Ce.section,{...ee(v,d,u),ref:e},a.createElement(bt,{values:[[_u,{...c,ref:l}],[hr,h],[Nt,{shouldCloseOnSelect:t.shouldCloseOnSelect??m}]]},a.createElement(i,{collection:o.collection,parent:r})))}const Nt=a.createContext(null),df=Fo(Hr,function(e,r,n){[e,r]=ot(e,r,Nt);let o=It(Nt)?.id,i=a.useContext(wn),l=gt(r),s=a.useContext(hr),{isVirtualized:c}=a.useContext(Zt),{menuItemProps:u,labelProps:d,descriptionProps:f,keyboardShortcutProps:p,...h}=Qd({...e,id:o,key:n.key,selectionManager:s,isVirtualized:c},i,l),{hoverProps:m,isHovered:v}=ir({isDisabled:h.isDisabled}),g=Ae({...e,id:void 0,children:n.rendered,defaultClassName:"react-aria-MenuItem",values:{...h,isHovered:v,isFocusVisible:h.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?Ce.a:Ce.div,x=ye(e,{global:!0});return delete x.id,delete x.onClick,a.createElement(w,{...ee(x,g,u,m),ref:l,"data-disabled":h.isDisabled||void 0,"data-hovered":v||void 0,"data-focused":h.isFocused||void 0,"data-focus-visible":h.isFocusVisible||void 0,"data-pressed":h.isPressed||void 0,"data-selected":h.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},a.createElement(bt,{values:[[Au,{slots:{[jn]:d,label:d,description:f}}],[Rd,p],[li,{isSelected:h.isSelected}]]},g.children))}),ps=a.createContext(null),hs=new WeakMap;function gs(t,e,r){if(!t)return"";typeof e=="string"&&(e=e.replace(/\s+/g,""));let n=hs.get(t);return process.env.NODE_ENV!=="production"&&!n&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${n}-${r}-${e}`}function ff(t,e,r){let{key:n,isDisabled:o,shouldSelectOnPressUp:i}=t,{selectionManager:l,selectedKey:s}=e,c=n===s,u=o||e.isDisabled||e.selectionManager.isDisabled(n),d=e.collection.getItem(n),{itemProps:f,isPressed:p}=xi({selectionManager:l,key:n,ref:r,isDisabled:u,shouldSelectOnPressUp:i??d?.props.href!=null,linkBehavior:"selection"}),h=gs(e,n,"tab"),m=gs(e,n,"tabpanel"),{tabIndex:v}=f,g=ye(d?.props,{labelable:!0});delete g.id;let w=no(d?.props),{focusableProps:x}=Ur({...d?.props,isDisabled:u},r);return{tabProps:ee(g,x,w,f,{id:h,"aria-selected":c,"aria-disabled":u||void 0,"aria-controls":c?m:void 0,tabIndex:u?void 0:v,role:"tab"}),isSelected:c,isDisabled:u,isPressed:p}}class pf{constructor(e,r,n,o=new Set){this.collection=e,this.flipDirection=r==="rtl"&&n==="horizontal",this.disabledKeys=o,this.tabDirection=n==="horizontal"}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let r=e;do r=this.collection.getKeyAfter(r),r==null&&(r=this.collection.getFirstKey());while(r!=null&&this.isDisabled(r)&&r!==e);return r}getPreviousKey(e){let r=e;do r=this.collection.getKeyBefore(r),r==null&&(r=this.collection.getLastKey());while(r!=null&&this.isDisabled(r)&&r!==e);return r}}function hf(t,e,r){let{orientation:n="horizontal",keyboardActivation:o="automatic"}=t,{collection:i,selectionManager:l,disabledKeys:s}=e,{direction:c}=it(),u=a.useMemo(()=>new pf(i,c,n,s),[i,s,n,c]),{collectionProps:d}=yi({ref:r,selectionManager:l,keyboardDelegate:u,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),f=Se();hs.set(e,f);let p=ao({...t,id:f});return{tabListProps:{...ee(d,p),role:"tablist","aria-orientation":n,tabIndex:void 0}}}function gf(t){let[e,r]=Gt(t.selectedKey,t.defaultSelectedKey??null,t.onSelectionChange),n=a.useMemo(()=>e!=null?[e]:[],[e]),{collection:o,disabledKeys:i,selectionManager:l}=fd({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:n,onSelectionChange:c=>{if(c==="all")return;let u=c.values().next().value??null;u===e&&t.onSelectionChange&&t.onSelectionChange(u),r(u)}}),s=e!=null?o.getItem(e):null;return{collection:o,disabledKeys:i,selectionManager:l,selectedKey:e,setSelectedKey:r,selectedItem:s}}function bf(t){let e=gf({...t,onSelectionChange:t.onSelectionChange?l=>{l!=null&&t.onSelectionChange?.(l)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:t.defaultSelectedKey??bs(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)??void 0}),{selectionManager:r,collection:n,selectedKey:o}=e,i=a.useRef(o);return a.useEffect(()=>{let l=o;t.selectedKey==null&&(r.isEmpty||l==null||!n.getItem(l))&&(l=bs(n,e.disabledKeys),l!=null&&r.setSelectedKeys([l])),(l!=null&&r.focusedKey==null||!r.isFocused&&l!==i.current)&&r.setFocusedKey(l),i.current=l}),{...e,isDisabled:t.isDisabled||!1}}function bs(t,e){let r=null;if(t){for(r=t.getFirstKey();r!=null&&(e.has(r)||t.getItem(r)?.props?.isDisabled)&&r!==t.getLastKey();)r=t.getKeyAfter(r);r!=null&&(e.has(r)||t.getItem(r)?.props?.isDisabled)&&r===t.getLastKey()&&(r=t.getFirstKey())}return r}const $n=a.createContext(null),gr=a.createContext(null),ms=a.forwardRef(function(e,r){[e,r]=ot(e,r,$n);let{children:n,orientation:o="horizontal"}=e;return n=a.useMemo(()=>typeof n=="function"?n({orientation:o,defaultChildren:null}):n,[n,o]),a.createElement(Ao,{content:n},i=>a.createElement(mf,{props:e,collection:i,tabsRef:r}))});function mf({props:t,tabsRef:e,collection:r}){let{orientation:n="horizontal"}=t,o=bf({...t,collection:r,children:void 0}),{focusProps:i,isFocused:l,isFocusVisible:s}=en({within:!0}),c=a.useMemo(()=>({orientation:n,isFocusWithin:l,isFocusVisible:s}),[n,l,s]),u=Ae({...t,defaultClassName:"react-aria-Tabs",values:c}),d=ye(t,{global:!0});return a.createElement(Ce.div,{...ee(d,u,i),ref:e,slot:t.slot||void 0,"data-focused":l||void 0,"data-orientation":n,"data-focus-visible":s||void 0,"data-disabled":o.isDisabled||void 0},a.createElement(bt,{values:[[$n,t],[gr,o]]},u.children))}const ys=a.forwardRef(function(e,r){return a.useContext(gr)?a.createElement(yf,{props:e,forwardedRef:r}):a.createElement(Bo,e)});function yf({props:t,forwardedRef:e}){let r=a.useContext(gr),{CollectionRoot:n}=a.useContext(Zt),{orientation:o="horizontal",keyboardActivation:i="automatic"}=It($n),l=gt(e),{tabListProps:s}=hf({...t,orientation:o,keyboardActivation:i},r,l),c=Ae({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:o,state:r}}),u=ye(t,{global:!0});return delete u.id,a.createElement(Ce.div,{...ee(u,c,s),ref:l,"data-orientation":o||void 0},a.createElement(ii,null,a.createElement(n,{collection:r.collection,persistedKeys:_o(r.selectionManager.focusedKey)})))}const Bn=class Bn extends Re{};Bn.type="item";let Sn=Bn;const vs=Fo(Sn,(t,e,r)=>{let n=a.useContext(gr),o=gt(e),{tabProps:i,isSelected:l,isDisabled:s,isPressed:c}=ff({key:r.key,...t},n,o),{focusProps:u,isFocused:d,isFocusVisible:f}=en(),{hoverProps:p,isHovered:h}=ir({isDisabled:s,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),m=Ae({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:l,isDisabled:s,isFocused:d,isFocusVisible:f,isPressed:c,isHovered:h}}),v=r.props.href?Ce.a:Ce.div,g=ye(t,{global:!0});return delete g.id,delete g.onClick,a.createElement(v,{...ee(g,m,i,u,p),ref:o,"data-selected":l||void 0,"data-disabled":s||void 0,"data-focused":d||void 0,"data-focus-visible":f||void 0,"data-pressed":c||void 0,"data-hovered":h||void 0},a.createElement(li.Provider,{value:{isSelected:l}},m.children))}),vf=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},xf=(t,e)=>({classGroupId:t,validator:e}),xs=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),br="-",ws=[],wf="arbitrary..",Ef=t=>{const e=Sf(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return $f(l);const s=l.split(br),c=s[0]===""&&s.length>1?1:0;return Es(s,c,e)},getConflictingClassGroupIds:(l,s)=>{if(s){const c=n[l],u=r[l];return c?u?vf(u,c):c:u||ws}return r[l]||ws}}},Es=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const o=t[e],i=r.nextPart.get(o);if(i){const u=Es(t,e+1,i);if(u)return u}const l=r.validators;if(l===null)return;const s=e===0?t.join(br):t.slice(e).join(br),c=l.length;for(let u=0;u<c;u++){const d=l[u];if(d.validator(s))return d.classGroupId}},$f=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?wf+n:void 0})(),Sf=t=>{const{theme:e,classGroups:r}=t;return Cf(r,e)},Cf=(t,e)=>{const r=xs();for(const n in t){const o=t[n];Cn(o,r,n,e)}return r},Cn=(t,e,r,n)=>{const o=t.length;for(let i=0;i<o;i++){const l=t[i];kf(l,e,r,n)}},kf=(t,e,r,n)=>{if(typeof t=="string"){Pf(t,e,r);return}if(typeof t=="function"){Tf(t,e,r,n);return}Nf(t,e,r,n)},Pf=(t,e,r)=>{const n=t===""?e:$s(e,t);n.classGroupId=r},Tf=(t,e,r,n)=>{if(Kf(t)){Cn(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(xf(r,t))},Nf=(t,e,r,n)=>{const o=Object.entries(t),i=o.length;for(let l=0;l<i;l++){const[s,c]=o[l];Cn(c,$s(e,s),r,n)}},$s=(t,e)=>{let r=t;const n=e.split(br),o=n.length;for(let i=0;i<o;i++){const l=n[i];let s=r.nextPart.get(l);s||(s=xs(),r.nextPart.set(l,s)),r=s}return r},Kf=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Lf=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const o=(i,l)=>{r[i]=l,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(i){let l=r[i];if(l!==void 0)return l;if((l=n[i])!==void 0)return o(i,l),l},set(i,l){i in r?r[i]=l:o(i,l)}}},kn="!",Ss=":",Mf=[],Cs=(t,e,r,n,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Df=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=o=>{const i=[];let l=0,s=0,c=0,u;const d=o.length;for(let v=0;v<d;v++){const g=o[v];if(l===0&&s===0){if(g===Ss){i.push(o.slice(c,v)),c=v+1;continue}if(g==="/"){u=v;continue}}g==="["?l++:g==="]"?l--:g==="("?s++:g===")"&&s--}const f=i.length===0?o:o.slice(c);let p=f,h=!1;f.endsWith(kn)?(p=f.slice(0,-1),h=!0):f.startsWith(kn)&&(p=f.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return Cs(i,h,p,m)};if(e){const o=e+Ss,i=n;n=l=>l.startsWith(o)?i(l.slice(o.length)):Cs(Mf,!1,l,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},If=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const l=r[i],s=l[0]==="[",c=e.has(l);s||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(l)):o.push(l)}return o.length>0&&(o.sort(),n.push(...o)),n}},Af=t=>({cache:Lf(t.cacheSize),parseClassName:Df(t),sortModifiers:If(t),postfixLookupClassGroupIds:Ff(t),...Ef(t)}),Ff=t=>{const e=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)e[r[n]]=!0;return e},Of=/\s+/,Bf=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:l}=e,s=[],c=t.trim().split(Of);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:h,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let w=!!g,x;if(w){const L=v.substring(0,g);x=n(L);const C=x&&l[x]?n(v):void 0;C&&C!==x&&(x=C,w=!1)}else x=n(v);if(!x){if(!w){u=f+(u.length>0?" "+u:u);continue}if(x=n(v),!x){u=f+(u.length>0?" "+u:u);continue}w=!1}const S=h.length===0?"":h.length===1?h[0]:i(h).join(":"),k=m?S+kn:S,V=k+x;if(s.indexOf(V)>-1)continue;s.push(V);const I=o(x,w);for(let L=0;L<I.length;++L){const C=I[L];s.push(k+C)}u=f+(u.length>0?" "+u:u)}return u},zf=(...t)=>{let e=0,r,n,o="";for(;e<t.length;)(r=t[e++])&&(n=ks(r))&&(o&&(o+=" "),o+=n);return o},ks=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=ks(t[n]))&&(r&&(r+=" "),r+=e);return r},_f=(t,...e)=>{let r,n,o,i;const l=c=>{const u=e.reduce((d,f)=>f(d),t());return r=Af(u),n=r.cache.get,o=r.cache.set,i=s,s(c)},s=c=>{const u=n(c);if(u)return u;const d=Bf(c,r);return o(c,d),d};return i=l,(...c)=>i(zf(...c))},Vf=[],de=t=>{const e=r=>r[t]||Vf;return e.isThemeGetter=!0,e},Ps=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ts=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hf=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Wf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Uf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_e=t=>Hf.test(t),Z=t=>!!t&&!Number.isNaN(Number(t)),Ne=t=>!!t&&Number.isInteger(Number(t)),Pn=t=>t.endsWith("%")&&Z(t.slice(0,-1)),Ie=t=>Wf.test(t),Ns=()=>!0,qf=t=>jf.test(t)&&!Uf.test(t),Tn=()=>!1,Yf=t=>Gf.test(t),Xf=t=>Rf.test(t),Zf=t=>!B(t)&&!_(t),Jf=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Qf=t=>Ve(t,As,Tn),B=t=>Ps.test(t),Je=t=>Ve(t,Fs,qf),Ks=t=>Ve(t,sp,Z),ep=t=>Ve(t,Bs,Ns),tp=t=>Ve(t,Os,Tn),Ls=t=>Ve(t,Ds,Tn),rp=t=>Ve(t,Is,Xf),mr=t=>Ve(t,zs,Yf),_=t=>Ts.test(t),Kt=t=>Qe(t,Fs),np=t=>Qe(t,Os),Ms=t=>Qe(t,Ds),op=t=>Qe(t,As),ip=t=>Qe(t,Is),yr=t=>Qe(t,zs,!0),lp=t=>Qe(t,Bs,!0),Ve=(t,e,r)=>{const n=Ps.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Qe=(t,e,r=!1)=>{const n=Ts.exec(t);return n?n[1]?e(n[1]):r:!1},Ds=t=>t==="position"||t==="percentage",Is=t=>t==="image"||t==="url",As=t=>t==="length"||t==="size"||t==="bg-size",Fs=t=>t==="length",sp=t=>t==="number",Os=t=>t==="family-name",Bs=t=>t==="number"||t==="weight",zs=t=>t==="shadow",ap=_f(()=>{const t=de("color"),e=de("font"),r=de("text"),n=de("font-weight"),o=de("tracking"),i=de("leading"),l=de("breakpoint"),s=de("container"),c=de("spacing"),u=de("radius"),d=de("shadow"),f=de("inset-shadow"),p=de("text-shadow"),h=de("drop-shadow"),m=de("blur"),v=de("perspective"),g=de("aspect"),w=de("ease"),x=de("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...k(),_,B],I=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],C=()=>[_,B,c],K=()=>[_e,"full","auto",...C()],W=()=>[Ne,"none","subgrid",_,B],z=()=>["auto",{span:["full",Ne,_,B]},Ne,_,B],j=()=>[Ne,"auto",_,B],U=()=>["auto","min","max","fr",_,B],y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],T=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...C()],N=()=>[_e,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],Y=()=>[_e,"screen","full","dvw","lvw","svw","min","max","fit",...C()],E=()=>[_e,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],$=()=>[t,_,B],H=()=>[...k(),Ms,Ls,{position:[_,B]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],pe=()=>["auto","cover","contain",op,Qf,{size:[_,B]}],ne=()=>[Pn,Kt,Je],P=()=>["","none","full",u,_,B],R=()=>["",Z,Kt,Je],oe=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Z,Pn,Ms,Ls],ft=()=>["","none",m,_,B],D=()=>["none",Z,_,B],M=()=>["none",Z,_,B],ue=()=>[Z,_,B],re=()=>[_e,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ie],breakpoint:[Ie],color:[Ns],container:[Ie],"drop-shadow":[Ie],ease:["in","out","in-out"],font:[Zf],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ie],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ie],shadow:[Ie],spacing:["px",Z],text:[Ie],"text-shadow":[Ie],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_e,B,_,g]}],container:["container"],"container-type":[{"@container":["","normal","size",_,B]}],"container-named":[Jf],columns:[{columns:[Z,B,_,s]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Ne,"auto",_,B]}],basis:[{basis:[_e,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Z,_e,"auto","initial","none",B]}],grow:[{grow:["",Z,_,B]}],shrink:[{shrink:["",Z,_,B]}],order:[{order:[Ne,"first","last","none",_,B]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...y(),"normal"]}],"justify-items":[{"justify-items":[...T(),"normal"]}],"justify-self":[{"justify-self":["auto",...T()]}],"align-content":[{content:["normal",...y()]}],"align-items":[{items:[...T(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...T(),{baseline:["","last"]}]}],"place-content":[{"place-content":y()}],"place-items":[{"place-items":[...T(),"baseline"]}],"place-self":[{"place-self":["auto",...T()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:N()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...E()]}],"min-block-size":[{"min-block":["auto",...E()]}],"max-block-size":[{"max-block":["none",...E()]}],w:[{w:[s,"screen",...N()]}],"min-w":[{"min-w":[s,"screen","none",...N()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...N()]}],h:[{h:["screen","lh",...N()]}],"min-h":[{"min-h":["screen","lh","none",...N()]}],"max-h":[{"max-h":["screen","lh",...N()]}],"font-size":[{text:["base",r,Kt,Je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,lp,ep]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pn,B]}],"font-family":[{font:[np,tp,e]}],"font-features":[{"font-features":[B]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,_,B]}],"line-clamp":[{"line-clamp":[Z,"none",_,Ks]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",_,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Z,"from-font","auto",_,Je]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[Z,"auto",_,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Ne,_,B]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ne,_,B],radial:["",_,B],conic:[Ne,_,B]},ip,rp]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":R()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Z,_,B]}],"outline-w":[{outline:["",Z,Kt,Je]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",d,yr,mr]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",f,yr,mr]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[Z,Je]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",p,yr,mr]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[Z,_,B]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[_,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_,B]}],filter:[{filter:["","none",_,B]}],blur:[{blur:ft()}],brightness:[{brightness:[Z,_,B]}],contrast:[{contrast:[Z,_,B]}],"drop-shadow":[{"drop-shadow":["","none",h,yr,mr]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",Z,_,B]}],"hue-rotate":[{"hue-rotate":[Z,_,B]}],invert:[{invert:["",Z,_,B]}],saturate:[{saturate:[Z,_,B]}],sepia:[{sepia:["",Z,_,B]}],"backdrop-filter":[{"backdrop-filter":["","none",_,B]}],"backdrop-blur":[{"backdrop-blur":ft()}],"backdrop-brightness":[{"backdrop-brightness":[Z,_,B]}],"backdrop-contrast":[{"backdrop-contrast":[Z,_,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Z,_,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,_,B]}],"backdrop-invert":[{"backdrop-invert":["",Z,_,B]}],"backdrop-opacity":[{"backdrop-opacity":[Z,_,B]}],"backdrop-saturate":[{"backdrop-saturate":[Z,_,B]}],"backdrop-sepia":[{"backdrop-sepia":["",Z,_,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Z,"initial",_,B]}],ease:[{ease:["linear","initial",w,_,B]}],delay:[{delay:[Z,_,B]}],animate:[{animate:["none",x,_,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,_,B]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:D()}],"rotate-x":[{"rotate-x":D()}],"rotate-y":[{"rotate-y":D()}],"rotate-z":[{"rotate-z":D()}],scale:[{scale:M()}],"scale-x":[{"scale-x":M()}],"scale-y":[{"scale-y":M()}],"scale-z":[{"scale-z":M()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[_,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],zoom:[{zoom:[Ne,_,B]}],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":$()}],"scrollbar-track-color":[{"scrollbar-track":$()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_,B]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[Z,Kt,Je,Ks]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Ke(...t){return ap(O(t))}const _s=a.createContext({size:"md"}),cp=()=>a.useContext(_s),Vs=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Hs=O,F=(t,e)=>r=>{var n;if(e?.variants==null)return Hs(t,r?.class,r?.className);const{variants:o,defaultVariants:i}=e,l=Object.keys(o).map(u=>{const d=r?.[u],f=i?.[u];if(d===null)return null;const p=Vs(d)||Vs(f);return o[u][p]}),s=r&&Object.entries(r).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:p,...h}=d;return Object.entries(h).every(m=>{let[v,g]=m;return Array.isArray(g)?g.includes({...i,...s}[v]):{...i,...s}[v]===g})?[...u,f,p]:u},[]);return Hs(t,l,c,r?.class,r?.className)},up={xs:18,sm:20,md:20,lg:24,xl:28,"2xl":28},dp=F("inline-flex shrink-0 items-center justify-center [&_svg]:size-full",{variants:{size:{xs:"size-[18px]",sm:"size-[20px]",md:"size-[20px]",lg:"size-[24px]",xl:"size-[28px]","2xl":"size-[28px]"}},defaultVariants:{size:"md"}}),fp=F(["relative inline-flex items-center justify-center font-bold","transition-[color,background-color,border-color,box-shadow,filter,transform] duration-150","focus-visible:outline-none","[-webkit-tap-highlight-color:transparent]","disabled:cursor-not-allowed data-[disabled]:cursor-not-allowed data-[pending]:cursor-wait","data-[pressed]:brightness-[0.96]"],{variants:{size:{xs:"py-1 px-2 gap-1 rounded-md text-caption-sm",sm:"h-[36px] px-4 gap-1 rounded-lg text-caption-sm",md:"h-[44px] px-4 gap-2 rounded-lg text-sm",lg:"h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",xl:"h-[60px] px-6 gap-2 rounded-[10px] text-body-lg","2xl":"h-[68px] px-6 gap-2 rounded-[10px] text-body-lg"},tone:{primary:"",destructive:""},iconOnly:{true:"!p-0",false:""},variant:{solid:["text-white","disabled:bg-light-100 disabled:text-light-400","data-[pending]:!bg-light-100 data-[pending]:!text-light-400"],outline:["bg-white border","disabled:bg-white disabled:text-light-400 disabled:border-light-200","data-[pending]:!bg-white data-[pending]:!text-light-400 data-[pending]:!border-light-200"],ghost:["bg-transparent","disabled:text-light-400","data-[pending]:!bg-transparent data-[pending]:!text-light-400"],"outline-primary":["bg-white border border-primary-500 text-primary-500","hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400 disabled:border-light-200","data-[pending]:!bg-white data-[pending]:!text-light-400 data-[pending]:!border-light-200"],"ghost-primary":["bg-transparent text-primary-500","hover:bg-primary-50 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:text-light-400","data-[pending]:!bg-transparent data-[pending]:!text-light-400"],plain:["bg-transparent h-auto rounded-none p-0 gap-1","disabled:text-light-400 data-[pending]:!text-light-400"],"plain-black":["bg-transparent h-auto rounded-none p-0 gap-1","disabled:text-light-400 data-[pending]:!text-light-400"]}},compoundVariants:[{tone:"primary",variant:"solid",class:["bg-primary-500","hover:bg-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"outline",class:["border-light-200 text-light-900","hover:bg-light-50","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"ghost",class:["text-light-800","hover:bg-light-50 hover:text-light-900","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"plain",class:["text-primary-500","hover:text-primary-800 hover:bg-transparent","focus-visible:rounded focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"plain-black",class:["text-light-800","hover:text-light-900 hover:bg-transparent","focus-visible:rounded focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"destructive",variant:"solid",class:["bg-error-500 text-white","hover:bg-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-light-100 data-[pending]:!bg-light-100"].join(" ")},{tone:"destructive",variant:"outline",class:["border-error-500 text-error-500","hover:border-error-300 hover:bg-error-100 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"destructive",variant:"ghost",class:["text-error-500","hover:bg-error-50 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400","data-[pending]:!bg-white data-[pending]:!text-light-400"].join(" ")},{tone:"destructive",variant:"plain",class:["text-error-500","hover:text-error-800 hover:bg-transparent","focus-visible:rounded focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{size:"xs",iconOnly:!0,class:"!w-[26px] !h-[26px]"},{size:"sm",iconOnly:!0,class:"!w-[36px] !h-[36px]"},{size:"md",iconOnly:!0,class:"!w-[44px] !h-[44px]"},{size:"lg",iconOnly:!0,class:"!w-[52px] !h-[52px]"},{size:"xl",iconOnly:!0,class:"!w-[60px] !h-[60px]"},{size:"2xl",iconOnly:!0,class:"!w-[68px] !h-[68px]"}],defaultVariants:{size:"md",tone:"primary",variant:"solid",iconOnly:!1}}),pp={xs:12,sm:14,md:16,lg:18,xl:20,"2xl":22},Ws=a.forwardRef(({children:t,className:e,tone:r,variant:n,size:o="md",iconOnly:i,isDisabled:l,disabled:s,isPending:c,title:u,value:d,...f},p)=>{const h=a.useCallback(v=>{v&&(u===void 0?v.removeAttribute("title"):v.title=u,d===void 0?v.removeAttribute("value"):v.value=String(d)),typeof p=="function"?p(v):p&&(p.current=v)},[p,u,d]),m=f;return a.createElement(_s.Provider,{value:{size:o}},a.createElement(ti,{...m,ref:h,isDisabled:l||s,isPending:c,className:Un(e,v=>Ke(fp({tone:r,variant:n,size:o,iconOnly:i}),v))},Un(t,(v,{isPending:g})=>a.createElement(a.Fragment,null,g?a.createElement("span",{className:"flex shrink-0 items-center","aria-hidden":!0},a.createElement(Na,{size:pp[o],className:"animate-spin"})):null,g&&i?null:v))))});Ws.displayName="Button";const hp=({children:t})=>{const{size:e}=cp();return a.createElement("span",{className:dp({size:e})},t)},gp=({children:t})=>a.createElement("span",{className:"whitespace-nowrap"},t),vr=Ws;vr.Icon=hp,vr.Text=gp;const bp=F(["inline-flex items-center justify-center","border transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4 rounded-[4px]",md:"h-5 w-5 rounded-[6px]",lg:"h-5 w-5 rounded-[6px]"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-white border-light-200 hover:border-light-400"},{checked:!0,disabled:!1,className:"bg-primary-500 border-primary-500 text-white hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"bg-light-100 border-light-200 text-white"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),mp={sm:{width:12,height:9},md:{width:14,height:10},lg:{width:14,height:10}},js=b.forwardRef(({id:t,checked:e,indeterminate:r=!1,disabled:n,size:o="md",onCheckedChange:i,className:l},s)=>{const c=()=>{n||i?.(!e)},u=mp[o],d=n?"text-white/80":"text-current";return b.createElement("button",{id:t,ref:s,type:"button",role:"checkbox","aria-checked":r?"mixed":e,disabled:n,onClick:c,className:O(bp({size:o,checked:e,disabled:n}),l)},e&&!r&&b.createElement("svg",{width:u.width,height:u.height,viewBox:"0 0 14 10",fill:"none",className:d},b.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),r&&b.createElement("span",{className:O(d,"bg-current rounded-sm",o==="sm"&&"h-0.5 w-3",(o==="md"||o==="lg")&&"h-0.5 w-4")}))});js.displayName="Checkbox";const Us=b.createContext(null),yp=({value:t,defaultValue:e,onValueChange:r,children:n,className:o})=>{const[i,l]=b.useState(e),s=t??i,c=u=>{l(u),r?.(u)};return b.createElement(Us.Provider,{value:{value:s,onValueChange:c}},b.createElement("div",{role:"radiogroup",className:o},n))},vp=()=>{const t=b.useContext(Us);if(!t)throw new Error("RadioGroupItem must be used within RadioGroup");return t},xp=F(["relative inline-flex items-center justify-center","border rounded-full transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"border-light-200 bg-white hover:border-light-400"},{checked:!0,disabled:!1,className:"border-primary-500 bg-primary-500 hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"border-light-200 bg-light-100"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),wp=F(["rounded-full bg-white transition-all"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2 w-2"},checked:{true:"scale-100",false:"scale-0"}},defaultVariants:{size:"md",checked:!1}}),Gs=b.forwardRef(({id:t,value:e,disabled:r,size:n="md",className:o},i)=>{const{value:l,onValueChange:s}=vp(),c=l===e;return b.createElement("button",{ref:i,id:t,type:"button",role:"radio","aria-checked":c,disabled:r,onClick:()=>{r||s?.(e)},className:O(xp({size:n,checked:c,disabled:r}),o)},b.createElement("span",{className:wp({size:n,checked:c})}))});Gs.displayName="RadioGroupItem";const Ep=F(["inline-flex items-center shrink-0 rounded-full p-[2px]","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-5 w-9",md:"h-6 w-11",lg:"h-6 w-11"},checked:{true:"justify-end",false:"justify-start"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"},variant:{default:"",success:""}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-light-200"},{checked:!0,disabled:!1,variant:"default",className:"bg-primary-500 hover:bg-primary-800"},{checked:!0,disabled:!1,variant:"success",className:"bg-success-500 hover:bg-success-800"},{disabled:!0,className:"bg-light-100"},{variant:"default",className:"focus-visible:ring-primary-400"},{variant:"success",className:"focus-visible:ring-success-500"}],defaultVariants:{size:"md",checked:!1,disabled:!1,variant:"default"}}),$p=F("rounded-full shrink-0 shadow-[0_1px_3px_0_rgba(16,24,40,0.10),0_1px_2px_0_rgba(16,24,40,0.06)]",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},disabled:{true:"bg-light-50",false:"bg-white"}},defaultVariants:{size:"md",disabled:!1}}),Rs=b.forwardRef(({checked:t=!1,size:e="md",variant:r="default",disabled:n,onCheckedChange:o,className:i},l)=>b.createElement("button",{ref:l,type:"button",role:"switch","aria-checked":t,disabled:n,onClick:()=>{n||o?.(!t)},className:O(Ep({size:e,checked:t,disabled:n,variant:r}),i)},b.createElement("span",{className:$p({size:e,disabled:n})})));Rs.displayName="Toggle";const Sp=F(["relative rounded-lg text-caption-sm font-semibold text-white","bg-primary-900","shadow-lg","pointer-events-none","select-none"],{variants:{side:{top:"",bottom:"",left:"",right:""},hasSupportingText:{true:"p-3",false:"px-3 py-2"}},defaultVariants:{side:"top",hasSupportingText:!1}}),Cp="mt-1 font-medium text-light-100",kp=F(["absolute"],{variants:{side:{top:["bottom-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-t-[6px] border-t-primary-900"],bottom:["top-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-b-[6px] border-b-primary-900"],left:["right-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-l-[6px] border-l-primary-900"],right:["left-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-r-[6px] border-r-primary-900"]}},defaultVariants:{side:"top"}}),xr=12,wr=({content:t,supportingText:e,side:r="top",open:n,defaultOpen:o=!1,disabled:i=!1,delay:l=0,className:s,children:c})=>{const[u,d]=b.useState(o),[f,p]=b.useState(null),h=n??u,m=b.useRef(null),v=b.useRef(null),g=b.useCallback(()=>{const S=m.current;if(!S)return null;const k=S.getBoundingClientRect();switch(r){case"top":return{top:k.top-xr,left:k.left+k.width/2};case"bottom":return{top:k.bottom+xr,left:k.left+k.width/2};case"left":return{top:k.top+k.height/2,left:k.left-xr};default:return{top:k.top+k.height/2,left:k.right+xr}}},[r]),w=()=>{if(i||!m.current)return;const S=()=>{p(g()),d(!0)};l>0?v.current=window.setTimeout(S,l):S()};b.useEffect(()=>{if(!h||!m.current)return;const S=()=>p(g());S();const k=new ResizeObserver(S);return k.observe(m.current),window.addEventListener("scroll",S,!0),window.addEventListener("resize",S),()=>{k.disconnect(),window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S)}},[h,g]);const x=()=>{v.current&&(clearTimeout(v.current),v.current=null),d(!1)};return b.createElement(b.Fragment,null,b.createElement("span",{ref:m,className:"inline-flex",onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,tabIndex:0},c),h&&f&&et.createPortal(b.createElement("div",{role:"tooltip",className:"fixed z-[9999] pointer-events-none",style:{top:f.top,left:f.left,transform:r==="top"?"translate(-50%, -100%)":r==="bottom"?"translate(-50%, 0)":r==="left"?"translate(-100%, -50%)":"translate(0, -50%)"}},b.createElement("div",{className:O(Sp({side:r,hasSupportingText:!!e}),s)},t,e&&b.createElement("p",{className:Cp},e),b.createElement("span",{className:kp({side:r})}))),document.body))};wr.displayName="Tooltip";const Pp={brand:{bg:"bg-primary-50",border:"border-primary-300",text:"text-primary-700"},gray:{bg:"bg-white",border:"border-light-200",text:"text-light-800"},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700"},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700"},success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700"},"blue-gray":{bg:"bg-blue-gray-50",border:"border-blue-gray-200",text:"text-blue-gray-700"},"blue-light":{bg:"bg-blue-light-50",border:"border-blue-light-200",text:"text-blue-light-700"},indigo:{bg:"bg-indigo-50",border:"border-indigo-200",text:"text-indigo-700"},purple:{bg:"bg-purple-50",border:"border-purple-200",text:"text-purple-700"},blue:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700"},pink:{bg:"bg-pink-50",border:"border-pink-200",text:"text-pink-700"},orange:{bg:"bg-orange-50",border:"border-orange-200",text:"text-orange-700"}},Tp=F(["inline-flex items-center gap-1 border","font-medium transition-colors duration-150","select-none"],{variants:{size:{sm:"text-caption-sm py-[3px]",md:"text-caption-lg py-[2px]",lg:"text-caption-lg py-1"},shape:{rounded:"rounded-md",pill:"rounded-full"},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{size:"sm",hasLeading:!1,className:"pl-2"},{size:"sm",hasLeading:!0,className:"pl-1"},{size:"sm",hasTrailing:!1,className:"pr-2"},{size:"sm",hasTrailing:!0,className:"pr-1"},{size:"md",hasLeading:!1,className:"pl-[9px]"},{size:"md",hasLeading:!0,className:"pl-1"},{size:"md",hasTrailing:!1,className:"pr-[9px]"},{size:"md",hasTrailing:!0,className:"pr-1"},{size:"lg",hasLeading:!1,className:"pl-2.5"},{size:"lg",hasLeading:!0,className:"pl-1.5"},{size:"lg",hasTrailing:!1,className:"pr-2.5"},{size:"lg",hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"rounded",hasLeading:!1,hasTrailing:!1,interactive:!1,disabled:!1}}),Np=F(["shrink-0 rounded border bg-white transition-colors duration-150 size-3.5"],{variants:{checked:{true:"bg-primary-500 border-primary-500",false:""}},defaultVariants:{checked:!1}}),Kp="shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800",Lp="shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",qs=/^#([0-9a-f]{6})$/i,Ys=t=>qs.test(t.trim()),Xs=(t,e)=>{const r=qs.exec(t.trim());if(!r)return;const n=parseInt(r[1],16),o=n>>16&255,i=n>>8&255,l=n&255;return`rgba(${o}, ${i}, ${l}, ${e})`},Nn=({children:t,size:e="sm",shape:r="rounded",icon:n,checked:o,onCheckedChange:i,onClose:l,count:s,disabled:c=!1,className:u,color:d="gray",customColor:f})=>{const p=i!==void 0,h=o!==void 0||!!n,m=!!l||s!==void 0,v=Pp[d],g=!!(f&&Ys(f)),w=g?{borderColor:f,backgroundColor:Xs(f,.12),color:f}:void 0,x=()=>{c||i?.(!o)},S=k=>{!p||c||(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),x())};return b.createElement("div",{role:p?"checkbox":void 0,"aria-checked":p?!!o:void 0,"aria-disabled":c||void 0,tabIndex:p&&!c?0:void 0,onClick:p?x:void 0,onKeyDown:S,style:w,className:O(Tp({size:e,shape:r,hasLeading:h,hasTrailing:m,interactive:p,disabled:c}),!g&&v.bg,!g&&v.border,!g&&v.text,u)},o!==void 0&&b.createElement("span",{className:O(Np({checked:o}),!o&&!g&&v.border),style:!o&&g?{borderColor:f}:void 0},o&&b.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},b.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),n,b.createElement("span",{className:"whitespace-nowrap"},t),s!==void 0&&b.createElement("span",{className:Kp},s),l&&b.createElement("button",{type:"button","aria-label":"Remove",disabled:c,onClick:k=>{k.stopPropagation(),l()},className:Lp},b.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},b.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};Nn.displayName="Tag";const Mp={brand:{solidBg:"bg-primary-50",solidBorder:"border-primary-300",solidText:"text-primary-500",outlineBorder:"border-primary-500",outlineText:"text-primary-700"},gray:{solidBg:"bg-light-50",solidBorder:"border-light-200",solidText:"text-light-700",outlineBorder:"border-light-600",outlineText:"text-light-700"},error:{solidBg:"bg-error-50",solidBorder:"border-error-200",solidText:"text-error-700",outlineBorder:"border-error-600",outlineText:"text-error-700"},warning:{solidBg:"bg-warning-50",solidBorder:"border-warning-200",solidText:"text-warning-700",outlineBorder:"border-warning-600",outlineText:"text-warning-700"},success:{solidBg:"bg-success-50",solidBorder:"border-success-200",solidText:"text-success-700",outlineBorder:"border-success-600",outlineText:"text-success-700"},"blue-gray":{solidBg:"bg-blue-gray-50",solidBorder:"border-blue-gray-200",solidText:"text-blue-gray-700",outlineBorder:"border-blue-gray-600",outlineText:"text-blue-gray-700"},"blue-light":{solidBg:"bg-blue-light-50",solidBorder:"border-blue-light-200",solidText:"text-blue-light-700",outlineBorder:"border-blue-light-600",outlineText:"text-blue-light-700"},indigo:{solidBg:"bg-indigo-50",solidBorder:"border-indigo-200",solidText:"text-indigo-700",outlineBorder:"border-indigo-600",outlineText:"text-indigo-700"},purple:{solidBg:"bg-purple-50",solidBorder:"border-purple-200",solidText:"text-purple-700",outlineBorder:"border-purple-600",outlineText:"text-purple-700"},blue:{solidBg:"bg-blue-50",solidBorder:"border-blue-200",solidText:"text-blue-700",outlineBorder:"border-blue-600",outlineText:"text-blue-700"},pink:{solidBg:"bg-pink-50",solidBorder:"border-pink-200",solidText:"text-pink-700",outlineBorder:"border-pink-600",outlineText:"text-pink-700"},orange:{solidBg:"bg-orange-50",solidBorder:"border-orange-200",solidText:"text-orange-700",outlineBorder:"border-orange-600",outlineText:"text-orange-700"}},Dp=F(["inline-flex items-center gap-1 border font-medium","transition-colors duration-150"],{variants:{size:{sm:"text-caption-sm py-0.5",md:"text-caption-lg py-0.5",lg:"text-caption-lg py-1"},shape:{pill:"rounded-full",badge:""},modern:{true:"rounded-md shadow-xs",false:""},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},iconOnly:{true:"p-[5px]",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{shape:"badge",size:"sm",modern:!1,className:"rounded-md"},{shape:"badge",size:"md",modern:!1,className:"rounded-md"},{shape:"badge",size:"lg",modern:!1,className:"rounded-lg"},{size:"sm",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-2"},{size:"sm",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-1.5"},{size:"sm",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"sm",iconOnly:!1,hasTrailing:!1,className:"pr-2"},{size:"sm",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"md",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"md",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"md",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"md",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"lg",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-3"},{size:"lg",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"lg",iconOnly:!1,hasLeading:!0,className:"pl-1.5"},{size:"lg",shape:"pill",iconOnly:!1,hasTrailing:!1,className:"pr-3"},{size:"lg",shape:"badge",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"lg",iconOnly:!1,hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"pill",modern:!1,hasLeading:!1,hasTrailing:!1,iconOnly:!1,interactive:!1,disabled:!1}}),Ip="size-4 shrink-0 rounded border bg-white",Ap="shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",Zs=({children:t,size:e="sm",shape:r="pill",variant:n="solid",color:o="brand",customColor:i,modern:l=!1,icon:s,trailingIcon:c,checked:u,onCheckedChange:d,onClose:f,iconOnly:p=!1,disabled:h=!1,className:m})=>{const v=d!==void 0,g=u!==void 0||!!s,w=!!f||!!c,x=Mp[o],S=!!(i&&Ys(i)),k=S?{borderColor:i,color:i,backgroundColor:n==="outline"?"transparent":Xs(i,.1)}:void 0,V=()=>{h||d?.(!u)},I=L=>{!v||h||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),V())};return b.createElement("div",{role:v?"checkbox":void 0,"aria-checked":v?!!u:void 0,"aria-disabled":h||void 0,tabIndex:v&&!h?0:void 0,onClick:v?V:void 0,onKeyDown:I,style:k,className:O(Dp({size:e,shape:r,modern:l,hasLeading:g,hasTrailing:w,iconOnly:p,interactive:v,disabled:h}),!S&&(n==="outline"?O("bg-transparent",x.outlineBorder,x.outlineText):O(x.solidBg,x.solidBorder,x.solidText)),m)},u!==void 0&&b.createElement("span",{className:O(Ip,u?"bg-primary-500 border-primary-500":!S&&x.solidBorder),style:!u&&S?{borderColor:i}:void 0},u&&b.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},b.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),s,!p&&b.createElement("span",{className:"whitespace-nowrap"},t),c,f&&b.createElement("button",{type:"button","aria-label":"Remove",disabled:h,onClick:L=>{L.stopPropagation(),f()},className:Ap},b.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},b.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};Zs.displayName="Badge";const Fp={brand:{bg50:"bg-primary-50",hoverBg100:"hover:bg-primary-100",border200:"border-primary-200",border500:"border-primary-500",text500:"text-primary-500"},gray:{bg50:"bg-light-50",hoverBg100:"hover:bg-light-100",border200:"border-light-200",border500:"border-light-500",text500:"text-light-500"},error:{bg50:"bg-error-50",hoverBg100:"hover:bg-error-100",border200:"border-error-200",border500:"border-error-500",text500:"text-error-500"},warning:{bg50:"bg-warning-50",hoverBg100:"hover:bg-warning-100",border200:"border-warning-200",border500:"border-warning-500",text500:"text-warning-500"},success:{bg50:"bg-success-50",hoverBg100:"hover:bg-success-100",border200:"border-success-200",border500:"border-success-500",text500:"text-success-500"}},Op={md:{outerPad:{leading:"pl-1 pr-2.5 py-1",trailing:"pl-3 pr-1 py-1"},gap:"gap-2",chipPad:"px-2 py-0.5",text:"text-caption-lg"},lg:{outerPad:{leading:"pl-1.5 pr-3 py-1.5",trailing:"pl-3 pr-1.5 py-1.5"},gap:"gap-2",chipPad:"px-2.5 py-[3px]",text:"text-body-sm"}},Js=({badgeLabel:t,children:e,size:r="md",theme:n="light",color:o="brand",badgePosition:i="leading",icon:l,onClick:s,className:c})=>{const u=Fp[o],d=Op[r],f=n==="modern",p=n==="outline",h=O("inline-flex items-center border transition-colors duration-150",d.gap,d.outerPad[i],f?"rounded-lg bg-light-50 border-light-200 shadow-xs":p?O("rounded-full bg-white border-[1.5px]",u.border500):O("rounded-full",u.bg50,u.border200,u.hoverBg100),s&&"cursor-pointer",c),m=O("inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",d.chipPad,d.text,f?"rounded-md bg-white border-light-200 text-light-800":p?O("rounded-full bg-white border-[1.5px]",u.border500,u.text500):O("rounded-full bg-white",u.border200,u.text500)),v=O("inline-flex items-center gap-1 font-medium",d.text,f?"text-light-800":u.text500),g=b.createElement("span",{className:m},f&&b.createElement("span",{className:"size-2 shrink-0 rounded-full bg-light-400"}),t);return b.createElement("div",{role:s?"button":void 0,tabIndex:s?0:void 0,onClick:s,className:h},i==="leading"&&g,b.createElement("span",{className:v},e,l),i==="trailing"&&g)};Js.displayName="BadgeGroup";const Bp=({size:t})=>{const e=t*.09,r=(t-e)/2,n=2*Math.PI*r;return b.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin"},b.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:e,className:"stroke-light-100"}),b.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:e,strokeLinecap:"round",strokeDasharray:`${n*.25} ${n}`,className:"stroke-primary-600"}))},zp=({size:t})=>{const e=b.useId(),r=t*.125,n=(t-r)/2,o=2*Math.PI*n;return b.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin text-primary-600"},b.createElement("defs",null,b.createElement("linearGradient",{id:e,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},b.createElement("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),b.createElement("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"}))),b.createElement("circle",{cx:t/2,cy:t/2,r:n,strokeWidth:r,className:"stroke-light-100"}),b.createElement("circle",{cx:t/2,cy:t/2,r:n,strokeWidth:r,strokeLinecap:"round",stroke:`url(#${e})`,strokeDasharray:`${o*.75} ${o}`}))},_p=({size:t})=>{const r=Math.max(t*.1,3),n=(t-r)/2;return b.createElement("div",{className:"relative animate-spin",style:{width:t,height:t}},Array.from({length:12}).map((o,i)=>{const l=30*i,s=.15+.85*i/11;return b.createElement("span",{key:i,className:"absolute rounded-full bg-primary-600 top-1/2 left-1/2",style:{width:r,height:r,opacity:s,marginTop:-r/2,marginLeft:-r/2,transform:`rotate(${l}deg) translate(${n}px) rotate(${-l}deg)`}})}))},Vp={sm:{box:32,gapClass:"gap-4",textClass:"text-caption-lg"},md:{box:48,gapClass:"gap-4",textClass:"text-caption-lg"},lg:{box:56,gapClass:"gap-4",textClass:"text-body-lg"},xl:{box:64,gapClass:"gap-5",textClass:"text-body-lg"}},Qs=({size:t="sm",style:e="line-simple",supportingText:r=!0,label:n="Loading...",className:o})=>{const{box:i,gapClass:l,textClass:s}=Vp[t];return b.createElement("div",{role:"status","aria-label":typeof n=="string"?n:"Loading",className:O("inline-flex flex-col items-center",l,o)},e==="line-simple"&&b.createElement(Bp,{size:i}),e==="line-spinner"&&b.createElement(zp,{size:i}),e==="dot-circle"&&b.createElement(_p,{size:i}),r&&b.createElement("p",{className:O("font-medium text-light-700 whitespace-nowrap",s)},n))};Qs.displayName="Loading";const ea=({className:t,style:e})=>b.createElement("svg",{viewBox:"0 0 24 24",fill:"none",className:t,style:e},b.createElement("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",stroke:"currentColor",strokeWidth:"1.75"}),b.createElement("path",{d:"M3.75 20.25a8.25 8.25 0 0 1 16.5 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})),ta=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("circle",{cx:"10",cy:"10",r:"9",className:"fill-primary-500 stroke-white",strokeWidth:"1.5"}),b.createElement("path",{d:"M6 10.2 8.6 12.8 14 7",stroke:"white",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),Hp={xs:{box:24,borderWidth:"0.5px",statusSize:6,badgeSize:10,textClass:"text-caption-sm"},sm:{box:32,borderWidth:"0.5px",statusSize:8,badgeSize:12,textClass:"text-caption-lg"},md:{box:40,borderWidth:"0.75px",statusSize:10,badgeSize:14,textClass:"text-body-sm"},lg:{box:48,borderWidth:"0.75px",statusSize:12,badgeSize:16,textClass:"text-body-lg"},xl:{box:56,borderWidth:"0.75px",statusSize:14,badgeSize:18,textClass:"text-h6"},"2xl":{box:64,borderWidth:"0.75px",statusSize:16,badgeSize:20,textClass:"text-h5 leading-7"}},Wp="#17B26A",Lt=({src:t,alt:e,initials:r,size:n="md",status:o="none",statusIcon:i,contrastBorder:l=!0,className:s})=>{const{box:c,borderWidth:u,statusSize:d,badgeSize:f,textClass:p}=Hp[n],h=t?"image":r!==void 0?"initials":"placeholder";return b.createElement("div",{className:O("relative inline-block shrink-0 rounded-full",s),style:{width:c,height:c}},h==="image"&&b.createElement("img",{src:t,alt:e??"",className:"absolute inset-0 size-full rounded-full object-cover"}),h==="placeholder"&&b.createElement("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-light-50"},b.createElement(ea,{className:"text-light-300",style:{width:c*.55,height:c*.55}})),h==="initials"&&b.createElement("div",{className:O("absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",p)},r),l&&b.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:u,borderStyle:"solid"}}),o==="online"&&b.createElement("span",{className:"absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",style:{width:d,height:d,backgroundColor:Wp}}),o==="company"&&b.createElement("div",{className:"absolute bottom-0 right-0 flex items-center justify-center overflow-hidden rounded-full border-[1.5px] border-white bg-white",style:{width:f,height:f}},i),o==="verified"&&b.createElement("div",{className:"absolute bottom-0 right-0",style:{width:f,height:f}},b.createElement(ta,{className:"size-full"})))};Lt.displayName="Avatar";const ra=[{bg:"bg-primary-100",text:"text-primary-600"},{bg:"bg-secondary-100",text:"text-secondary-600"},{bg:"bg-purple-100",text:"text-purple-600"},{bg:"bg-pink-100",text:"text-pink-600"},{bg:"bg-orange-100",text:"text-orange-600"},{bg:"bg-teal-100",text:"text-teal-600"},{bg:"bg-indigo-100",text:"text-indigo-600"},{bg:"bg-rose-100",text:"text-rose-600"}],jp=t=>{let e=0;for(let n=0;n<t.length;n+=1)e=e*31+t.charCodeAt(n)|0;const r=Math.abs(e)%ra.length;return ra[r]},Up={xs:{box:24,overlap:-4,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-sm"},sm:{box:32,overlap:-8,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-lg"},md:{box:40,overlap:-12,contrastBorderWidth:"0.75px",plusIconSize:20,textClass:"text-body-sm"}},na=({avatars:t,max:e,size:r="xs",onAdd:n,className:o})=>{const{box:i,overlap:l,contrastBorderWidth:s,textClass:c}=Up[r],u=e?t.slice(0,e):t,d=e&&t.length>e?t.length-e:0;return b.createElement("div",{className:O("inline-flex items-start gap-2",o)},b.createElement("div",{className:"flex items-start"},u.map((f,p)=>{const h=p<u.length-1||d>0;return b.createElement(wr,{key:p,content:f.label,disabled:!f.label,side:"top"},b.createElement("div",{className:"relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",style:{width:i,height:i,marginRight:h?l:0}},f.src?b.createElement("img",{src:f.src,alt:f.alt??"",className:"size-full object-cover"}):(()=>{const{bg:m,text:v}=jp(String(f.label??f.alt??f.initials??p));return b.createElement("div",{className:O("flex size-full items-center justify-center font-semibold",m,v,c)},f.initials)})(),b.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:s,borderStyle:"solid"}})))}),d>0&&b.createElement(wr,{content:t.slice(e).map((f,p)=>b.createElement("div",{key:p},f.label)),disabled:!t.slice(e).some(f=>f.label),side:"top"},b.createElement("div",{className:"relative flex shrink-0 items-center justify-center rounded-full border-2 border-white bg-light-100",style:{width:i,height:i}},b.createElement("span",{className:O("font-semibold text-light-600",c)},"+",d)))),n&&b.createElement("button",{type:"button",onClick:n,"aria-label":"Add",className:"flex shrink-0 items-center justify-center rounded-full border border-dashed border-light-300 bg-white text-light-500 hover:bg-light-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2",style:{width:i,height:i}},b.createElement("svg",{width:i*.4,height:i*.4,viewBox:"0 0 20 20",fill:"none"},b.createElement("path",{d:"M10 4v12M4 10h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}))))};na.displayName="AvatarGroup";const Gp={xs:{nameClass:"text-caption-sm",subtitleClass:"text-caption-sm"},sm:{nameClass:"text-caption-lg",subtitleClass:"text-caption-sm"},md:{nameClass:"text-caption-lg",subtitleClass:"text-caption-lg"},lg:{nameClass:"text-body-sm",subtitleClass:"text-body-sm"},xl:{nameClass:"text-body-lg",subtitleClass:"text-body-sm"}},oa=({name:t,subtitle:e,src:r,initials:n,size:o="xs",status:i="none",statusIcon:l,className:s})=>{const{nameClass:c,subtitleClass:u}=Gp[o];return b.createElement("div",{className:O("inline-flex items-center gap-2",s)},b.createElement(Lt,{src:r,initials:n,size:o,status:i,statusIcon:l}),b.createElement("div",{className:"flex flex-col items-start whitespace-nowrap"},b.createElement("span",{className:O("font-bold text-light-800",c)},t),e&&b.createElement("span",{className:O("font-normal text-light-700",u)},e)))};oa.displayName="AvatarLabelGroup";const Rp={sm:{box:72,ringWidth:3,shadowClass:"shadow-md",iconSize:36,textClass:"text-h4",verifiedSize:20,verifiedOffset:0},md:{box:96,ringWidth:4,shadowClass:"shadow-lg",iconSize:48,textClass:"text-h3",verifiedSize:24,verifiedOffset:0},lg:{box:160,ringWidth:4,shadowClass:"shadow-lg",iconSize:80,textClass:"text-h1",verifiedSize:32,verifiedOffset:4}},ia=({src:t,alt:e,initials:r,size:n="sm",verified:o=!0,contrastBorder:i=!0,className:l})=>{const{box:s,ringWidth:c,shadowClass:u,iconSize:d,textClass:f,verifiedSize:p,verifiedOffset:h}=Rp[n],m=t?"image":r!==void 0?"initials":"placeholder";return b.createElement("div",{className:O("relative rounded-full",l),style:{width:s,height:s}},b.createElement("div",{className:O("absolute inset-0 overflow-hidden rounded-full border-white",u,m!=="image"&&"bg-light-100"),style:{borderWidth:c,borderStyle:"solid"}},m==="image"&&b.createElement("img",{src:t,alt:e??"",className:"absolute inset-0 size-full rounded-full object-cover"}),i&&b.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border border-black/[0.08]"}),m==="placeholder"&&b.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},b.createElement(ea,{className:"text-light-300",style:{width:d,height:d}})),m==="initials"&&b.createElement("div",{className:O("absolute inset-0 flex items-center justify-center font-semibold text-light-500",f)},r)),o&&b.createElement("div",{className:"absolute",style:{width:p,height:p,bottom:h,right:h}},b.createElement(ta,{className:"size-full"})))};ia.displayName="AvatarProfilePhoto";const qp={"button-gray":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-white":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-primary":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},underline:{sm:"h-8 px-1 pb-3 text-sm gap-2",md:"h-9 px-1 pb-3 text-base gap-2"},"underline-filled":{sm:"h-11 p-3 text-sm gap-2",md:"h-12 p-3 text-base gap-2"},line:{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3.5 py-2.5 text-base gap-2"}},Yp={"button-gray":"rounded-md","button-white":"rounded-md","button-primary":"rounded-md",underline:"rounded-none","underline-filled":"rounded-none",line:"rounded-none"},Xp={"button-gray":{active:"bg-light-50 text-light-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-light-50 hover:text-light-700",hasFocusRing:!0},"button-white":{active:"bg-white text-light-700 shadow-sm",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-white hover:text-light-700 hover:shadow-sm",hasFocusRing:!0},"button-primary":{active:"bg-primary-50 text-primary-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:text-primary-700",hasFocusRing:!0},underline:{active:"border-b-2 border-primary-500 text-primary-700",inactive:"border-b-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},"underline-filled":{active:"bg-primary-50 border-b-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-b-2 border-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},line:{active:"bg-transparent border-l-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-l-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!0}},Zp="inline-flex items-center justify-center rounded-full border border-light-200 bg-light-50 px-2 py-0.5 text-caption-sm font-medium text-light-700",Jp={"button-gray":{gapClass:"gap-1",hasHairline:!1},"button-white":{gapClass:"gap-1",hasHairline:!1},"button-primary":{gapClass:"gap-1",hasHairline:!1},underline:{gapClass:"gap-3",hasHairline:!0},"underline-filled":{gapClass:"gap-3",hasHairline:!0},line:{gapClass:"gap-1",hasHairline:!1}},la=({children:t,variant:e="button-primary",size:r="sm",fullWidth:n=!1,count:o,iconLeft:i,iconRight:l,disabled:s=!1,onClick:c,className:u,id:d,active:f})=>{const p=Xp[e];return b.createElement(vs,{id:d,isDisabled:s,onPress:()=>c?.(),className:({isSelected:h})=>Ke("inline-flex items-center justify-center font-semibold transition-colors duration-150",qp[e][r],Yp[e],h?p.active:p.inactive,!h&&!s&&p.hoverInactive,p.hasFocusRing&&"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",n&&"w-full",s?"cursor-not-allowed opacity-60":"cursor-pointer",u)},i&&b.createElement("span",{className:"shrink-0"},i),b.createElement("span",{className:"whitespace-nowrap"},t),o!==void 0&&b.createElement("span",{className:Zp},o),l&&b.createElement("span",{className:"shrink-0"},l))};la.displayName="Tab";const sa=({children:t,variant:e="button-primary",orientation:r="horizontal",boxed:n=!1,"aria-label":o="Tabs",keyboardActivation:i,disabledKeys:l,className:s})=>{const{gapClass:c,hasHairline:u}=Jp[e],d=b.Children.toArray(t),f=d.map((v,g)=>String(g)),p=d.findIndex(v=>v.props.active),h=f[p>=0?p:0],m=v=>{const g=f.indexOf(String(v));g>=0&&d[g].props.onClick?.()};return b.createElement(ms,{orientation:r,keyboardActivation:i,disabledKeys:l,selectedKey:d.length?h:void 0,onSelectionChange:m},b.createElement(ys,{"aria-label":o,className:Ke("inline-flex",r==="vertical"?"flex-col items-stretch":"flex-row items-center",c,n&&"rounded-lg border border-light-200 bg-light-50 p-1",u&&r==="horizontal"&&!n&&"border-b border-light-200",s)},d.map((v,g)=>b.cloneElement(v,{key:f[g],id:f[g]}))))};sa.displayName="TabList";const aa=9,Le=1,Qp=30;function ca(t){const e=aa,r=Le-t,n=r?`calc(100% - ${r}px)`:"100%",o=`calc(100% - ${e+1}px)`,i=`calc(100% - ${e}px)`;return`shape(${[`from ${-t}px 100%`,...r?[`vline to ${n}`]:[],`curve to ${e}px ${o} with ${e}px ${n}`,`vline to ${e-t}px`,`curve to ${2*e-t}px 0 with ${e}px 0`,`hline to calc(100% - ${2*e-t}px)`,`curve to ${i} ${e-t}px with ${i} 0`,`vline to ${o}`,`curve to ${t?`calc(100% + ${t}px)`:"100%"} ${n} with ${i} ${n}`,...r?["vline to 100%"]:[]].join(", ")})`}const ua=ca(0),da=ca(Le),fa={default:{box:"h-12 shrink-0",padX:Qp},"max-width":{box:"h-9 min-w-px flex-1",padX:aa}},eh={clipPath:ua,paddingInline:`${Le}px`},th={paddingInline:`${Le}px`},pa=b.forwardRef(({type:t="default",disabled:e=!1,unstyled:r=!1,iconLeft:n,trailing:o,tooltip:i,children:l,className:s,style:c,contentClassName:u,contentStyle:d,onClick:f,id:p,active:h,...m},v)=>{const{box:g,padX:w}=fa[t];return b.createElement(vs,{ref:v,id:p,isDisabled:e,onPress:()=>f?.(void 0),...m,className:({isSelected:x})=>Ke("group relative flex transition-colors duration-150 focus-visible:outline-none",!r&&"rounded-t-lg pt-px",!r&&g,e&&"cursor-not-allowed opacity-60",!e&&!x&&"cursor-pointer",!r&&x&&"-mb-px bg-light-200 focus-visible:bg-primary-400",x&&"cursor-default",s),style:({isSelected:x})=>r?c:{...x?eh:th,...c}},({isSelected:x})=>{const S=!e&&!x,k=x?{clipPath:da,paddingInline:`${w-Le}px`}:{paddingInline:`${w-Le}px`};return b.createElement("span",{title:i,className:Ke("flex h-full w-full items-center justify-center gap-1 whitespace-nowrap text-caption-sm",!r&&"rounded-t-lg",!r&&(x?"bg-white font-bold text-light-800":"font-medium leading-4 text-light-600"),!r&&S&&"group-hover:bg-light-100 group-hover:text-light-800",!r&&S&&"group-focus-visible:rounded-b-lg group-focus-visible:ring-2 group-focus-visible:ring-primary-400 group-focus-visible:ring-offset-2",u),style:r?d:{...k,...d}},n&&b.createElement("span",{className:"shrink-0"},n),b.createElement("span",{className:"overflow-hidden text-ellipsis"},l),o)})});pa.displayName="TabBrowser";const rh=48,ha=({children:t,separators:e=!1,trailingSlot:r,overflow:n=!1,overflowLabel:o,className:i})=>{const l=b.Children.toArray(t),s=b.useMemo(()=>l.map((C,K)=>String(K)),[l.length]),c=l.findIndex(C=>C.props.active),u=b.useRef(null),d=b.useRef(null),f=b.useRef(new Map),p=b.useRef(new Map),[h,m]=b.useState(l.length),v=s.join("|");b.useLayoutEffect(()=>{n&&(p.current.clear(),m(l.length))},[n,v]);const g=b.useCallback(()=>{const C=u.current;if(!C||l.length===0||(p.current.size<l.length&&s.forEach(U=>{const y=f.current.get(U);y&&p.current.set(U,y.getBoundingClientRect().width)}),p.current.size<l.length))return;const K=C.clientWidth,W=d.current?.getBoundingClientRect().width||rh;let z=0,j=0;for(;j<s.length;j++){const U=p.current.get(s[j])??0,y=j<s.length-1?W:0;if(z+U+y>K&&j>0)break;z+=U}m(U=>U===j?U:j)},[l.length,s]),w=h===l.length;b.useLayoutEffect(()=>{n&&g()},[n,g,w]),b.useEffect(()=>{if(!n)return;const C=u.current;if(!C||typeof ResizeObserver>"u")return;const K=new ResizeObserver(()=>g());return K.observe(C),()=>K.disconnect()},[n,g]);const x=n&&h<l.length?Math.max(h,1):l.length,S=n?c>=0&&c>=x?[...Array(x-1).keys(),c]:[...Array(x).keys()]:s.map((C,K)=>K),k=new Set(S),V=s.map((C,K)=>K).filter(C=>!k.has(C)),I=c>=0?s[c]:S.length?s[S[0]]:void 0,L=C=>{const K=s.indexOf(String(C));K>=0&&l[K].props.onClick?.(void 0)};return b.createElement(ms,{selectedKey:l.length?I:void 0,onSelectionChange:L,className:Ke("flex items-end",n&&"min-w-0 flex-1",i)},(()=>{const C=b.createElement(ys,{"aria-label":"Tabs",className:Ke("flex min-w-0 items-end",n?"shrink-0":"flex-1")},S.map((K,W)=>{const z=l[K],j=W===S.length-1&&V.length===0,U=S[W+1],y=z.props.active||l[U]?.props.active;return b.cloneElement(z,{key:s[K],id:s[K],ref:n?T=>{T?f.current.set(s[K],T):f.current.delete(s[K])}:void 0,className:Ke(z.props.className,e&&!j&&!y&&"after:absolute after:-right-px after:bottom-3 after:h-5 after:w-px after:bg-light-200 after:content-['']")})}));return n?b.createElement("div",{ref:u,className:"flex min-w-0 flex-1 items-end overflow-hidden"},C,V.length>0&&b.createElement(of,null,b.createElement(ti,{ref:d,className:"mb-3 flex h-7 shrink-0 items-center self-end rounded-md px-2 text-caption-sm font-semibold text-light-600 hover:bg-light-100 hover:text-light-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400"},o?o(V.length):`+${V.length}`),b.createElement(Ud,{placement:"bottom end",className:"flex flex-col overflow-hidden rounded-lg border border-light-200 bg-white p-1 shadow-lg"},b.createElement(sf,{className:"flex max-h-[320px] min-h-0 min-w-[160px] flex-1 flex-col gap-0.5 overflow-y-auto outline-none [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",onAction:K=>{const W=s.indexOf(String(K));W>=0&&l[W].props.onClick?.(void 0)}},V.map(K=>{const W=l[K],z=W.props.children;return b.createElement(df,{key:s[K],id:s[K],isDisabled:W.props.disabled,textValue:typeof z=="string"?z:void 0,className:"flex h-9 shrink-0 cursor-pointer items-center gap-2 truncate rounded-md px-2 text-caption-sm text-light-800 outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-60 data-[focused]:bg-light-50 data-[focused]:text-light-900"},W.props.iconLeft&&b.createElement("span",{className:"shrink-0"},W.props.iconLeft),b.createElement("span",{className:"truncate"},z),W.props.trailing&&b.createElement("span",{className:"ml-auto shrink-0"},W.props.trailing))}))))):C})(),r)};ha.displayName="TabBrowserBar";const nh={clipPath:ua,paddingInline:`${Le}px`},oh={paddingInline:`${Le}px`},ga=b.forwardRef(({type:t="default",disabled:e=!1,unstyled:r=!1,active:n=!1,iconLeft:o,trailing:i,tooltip:l,children:s,className:c,style:u,contentClassName:d,contentStyle:f,...p},h)=>{const{box:m,padX:v}=fa[t],g=!e&&!n,w=n?{clipPath:da,paddingInline:`${v-Le}px`}:{paddingInline:`${v-Le}px`};return b.createElement("div",{ref:h,role:"tab","aria-disabled":e,"aria-selected":n,...p,className:Ke("group relative flex transition-colors duration-150 focus-visible:outline-none",!r&&"rounded-t-lg pt-px",!r&&m,e&&"cursor-not-allowed opacity-60",!e&&!n&&"cursor-pointer",!r&&n&&"-mb-px bg-light-200 focus-visible:bg-primary-400",n&&"cursor-default",c),style:r?u:{...n?nh:oh,...u}},b.createElement("span",{title:l,className:Ke("flex h-full w-full items-center justify-center gap-1 whitespace-nowrap text-caption-sm",!r&&"rounded-t-lg",!r&&(n?"bg-white font-bold text-light-800":"font-medium leading-4 text-light-600"),!r&&g&&"group-hover:bg-light-100 group-hover:text-light-800",!r&&g&&"group-focus-visible:rounded-b-lg group-focus-visible:ring-2 group-focus-visible:ring-primary-400 group-focus-visible:ring-offset-2",d),style:r?f:{...w,...f}},o&&b.createElement("span",{className:"shrink-0"},o),b.createElement("span",{className:"overflow-hidden text-ellipsis"},s),i))});ga.displayName="TabBrowserPreview";const ih=F("flex flex-col gap-1 w-full",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-sm"}},defaultVariants:{size:"md"}}),lh=F("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),sh=F(["flex items-center w-full border","bg-white transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 px-2 gap-1 rounded text-caption-sm",sm:"h-9 px-3 gap-2 rounded-lg",md:"h-11 px-3 gap-2 rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),ah=F(["flex-1 bg-transparent outline-none text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},error:{true:"",false:"text-light-900"}},defaultVariants:{size:"md",error:!1}}),ch=F("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}}}),uh=F("flex items-stretch w-full bg-white border overflow-hidden transition-[border-color,border-width]",{variants:{size:{xs:"rounded",sm:"rounded-lg",md:"rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),dh=F("flex flex-1 items-center min-w-0",{variants:{size:{xs:"gap-1 px-2 py-1",sm:"gap-2 px-3 py-2",md:"gap-2 px-3 py-2"},disabled:{true:"text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),fh=F("flex items-center text-light-700 whitespace-nowrap border-r border-light-200",{variants:{size:{xs:"px-2 text-caption-sm",sm:"px-3 text-caption-lg",md:"px-3 text-body-sm"}},defaultVariants:{size:"md"}}),ba=F(["flex items-center gap-1 shrink-0 bg-transparent p-0 text-light-800 cursor-pointer","hover:bg-transparent hover:text-light-900","disabled:cursor-not-allowed disabled:text-light-400"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),ph=F("flex shrink-0 items-center justify-center gap-1 w-[92px] border-l border-light-200 bg-white font-semibold text-light-800 hover:bg-light-50 disabled:cursor-not-allowed disabled:text-light-400",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),ma=({className:t})=>a.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},a.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),hh={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},gh=({size:t,error:e,disabled:r})=>O("flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",hh[t],e?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r&&"bg-light-100 text-light-400 cursor-not-allowed"),bh=({error:t})=>O("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),mh="flex flex-col w-full max-w-[320px]",Mt=a.forwardRef(function({label:e,required:r,hint:n,rightIcon:o,size:i="md",error:l=!1,disabled:s=!1,compact:c=!1,hideCalendarIcon:u=!1,type:d,prefix:f,suffix:p,leadingAddon:h,leadingDropdown:m,trailingDropdown:v,trailingButton:g,maxLength:w,value:x,className:S,wrapperClassName:k,...V},I){const L=!!(h||g),C=a.createElement(a.Fragment,null,m&&a.createElement("button",{type:"button",onClick:m.onClick,disabled:m.disabled||s,className:ba({size:i})},a.createElement("span",null,m.value),a.createElement(ma,{className:"size-5 text-light-500"})),f&&a.createElement("div",{className:"flex items-center"},f),a.createElement("input",{...V,ref:I,type:d,disabled:s,maxLength:w,value:x,className:O(ah({size:i,error:l}),"h-full",u&&"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",d==="date"&&"[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",S)}),(o||p)&&a.createElement("div",{className:"flex h-full items-center gap-2"},o&&a.createElement("div",{className:"flex h-full items-center pb-0.5 text-light-400 hover:text-light-600"},o),p&&a.createElement("div",{className:"flex h-full items-center gap-1 leading-none text-light-700"},p)),v&&a.createElement("button",{type:"button",onClick:v.onClick,disabled:v.disabled||s,className:ba({size:i})},a.createElement("span",null,v.value),a.createElement(ma,{className:"size-5 text-light-500"})));return a.createElement("div",{className:O(c?mh:ih({size:i}),k)},e&&a.createElement("label",{className:c?bh({error:l}):lh({error:l})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),L?a.createElement("div",{className:uh({size:i,error:l,disabled:s})},h&&a.createElement("div",{className:fh({size:i})},h),a.createElement("div",{className:dh({size:i,disabled:s})},C),g&&a.createElement("button",{type:"button",onClick:g.onClick,disabled:g.disabled||s,className:ph({size:i})},g.icon,a.createElement("span",null,g.label))):a.createElement("div",{className:c?gh({size:i,error:l,disabled:s}):sh({size:i,error:l,disabled:s})},C),w&&typeof x=="string"&&a.createElement("div",{className:"text-right text-xs text-light-400"},x.length,"/",w),n&&a.createElement("p",{className:ch({error:l})},n))});function yh({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function vh({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function xh({size:t="md",label:e,required:r,hint:n,error:o,disabled:i,placeholder:l="+1 (555) 000-0000",rightIcon:s,value:c,onChange:u,className:d,wrapperClassName:f}){return a.createElement(Mt,{size:t,label:e,required:r,hint:n,error:o,disabled:i,placeholder:l,rightIcon:s,value:c,onChange:u,className:d,wrapperClassName:f,prefix:a.createElement("div",{className:"flex items-center gap-1 pr-2 text-sm text-light-700"},a.createElement("span",null,"US"),a.createElement(_n,{size:14}))})}function wh({size:t="md",label:e,required:r,hint:n,error:o,disabled:i,value:l,placeholder:s="1,000.00",currency:c="USD",onCurrencyChange:u,rightIcon:d,onChange:f,className:p,wrapperClassName:h}){return a.createElement(Mt,{size:t,label:e,required:r,hint:n,error:o,disabled:i,value:l,placeholder:s,rightIcon:d,onChange:f,className:p,wrapperClassName:h,prefix:a.createElement("span",{className:"select-none text-sm text-light-700"},"$"),suffix:a.createElement("button",{type:"button",disabled:i,onClick:u,className:"flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"},c,a.createElement(_n,{size:14}))})}function Eh({size:t="md",label:e,required:r,hint:n,disabled:o,error:i,className:l,wrapperClassName:s,value:c,maxLength:u,placeholder:d,onChange:f}){const p=c.length>u,h=i||p;return a.createElement(Mt,{size:t,label:e,required:r,disabled:o,error:h,value:c,placeholder:d,onChange:f,className:l,wrapperClassName:s,hint:n,suffix:a.createElement("span",{className:O("text-caption-lg",p?"text-error-600":"text-light-400")},c.length,"/",u)})}function $h({size:t="md",label:e="Card number",required:r,hint:n,error:o,disabled:i,placeholder:l="Card number",value:s,onChange:c,rightIcon:u,prefix:d,className:f,wrapperClassName:p}){return a.createElement(Mt,{size:t,label:e,required:r,hint:n,error:o,disabled:i,placeholder:l,value:s,onChange:c,rightIcon:u,className:f,wrapperClassName:p,prefix:d??a.createElement("img",{src:"/stories/assets/mastercard.png",alt:"mastercard",className:"h-4 w-6 object-contain"}),inputMode:"numeric",autoComplete:"cc-number"})}const Kn=Mt;Kn.Prefix=yh,Kn.Suffix=vh;const Sh="flex flex-col gap-1 w-full",Ch=F("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),kh=F(["flex w-full gap-2 border rounded-lg p-3 bg-white","transition-[border-color,border-width]"],{variants:{error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{error:!1,disabled:!1}}),Ph=F(["flex-1 min-h-[132px] bg-transparent outline-none text-caption-lg text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed disabled:resize-none"],{variants:{resizable:{true:"resize-y",false:"resize-none"}},defaultVariants:{resizable:!0}}),Th=F("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}},defaultVariants:{error:!1}}),Nh=({error:t,disabled:e})=>O("flex w-full gap-2 rounded-lg border bg-white p-2 transition-[border-color,border-width]",t?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",e&&"bg-light-100 cursor-not-allowed"),Kh=({error:t})=>O("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Lh=t=>O("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900","placeholder:text-light-500",t?"resize-y":"resize-none"),Mh="flex flex-col w-full max-w-[320px]",ya=b.forwardRef(({label:t,required:e,hint:r,helpIcon:n,error:o=!1,disabled:i=!1,resizable:l=!0,compact:s=!1,rows:c,style:u,className:d,wrapperClassName:f,...p},h)=>{const m=c?{minHeight:`${c*20}px`}:void 0;return b.createElement("div",{className:O(s?Mh:Sh,f)},t&&b.createElement("label",{className:s?Kh({error:o}):Ch({error:o})},t,e&&b.createElement("span",{className:"text-error-400"},"*"),n),b.createElement("div",{className:s?Nh({error:o,disabled:i}):kh({error:o,disabled:i})},b.createElement("textarea",{ref:h,disabled:i,rows:c,style:{...m,...u},className:O(s?Lh(l&&!i):Ph({resizable:l&&!i}),d),...p})),r&&b.createElement("p",{className:Th({error:o})},r))});ya.displayName="Textarea";const Dh=F("flex w-[320px] flex-col gap-1"),Ih=F("flex items-center gap-1 text-sm font-bold",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Ah=F(["flex items-center","rounded-lg border bg-white","overflow-hidden","transition-colors"],{variants:{size:{sm:"h-9 px-2",md:"h-11 px-3"},error:{true:"border-error-300 focus-within:ring-2 focus-within:ring-error-500",false:"border-light-200 focus-within:ring-2 focus-within:ring-primary-500"},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),Fh=F(["flex items-center gap-1","overflow-x-auto overflow-y-hidden","whitespace-nowrap","scrollbar-hide","flex-1"]),Oh=F("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"),Bh=F(["min-w-[120px]","bg-transparent outline-none","text-light-900 placeholder:text-light-500"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:""}}}),zh=F("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function _h({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:l="Add items",rightIcon:s,className:c,wrapperClassName:u,options:d,value:f=[],onChange:p}){const h=a.useId(),[m,v]=a.useState(""),g=x=>{const S=d.find(k=>k.label===x);S&&(f.some(k=>k.id===S.id)||(p?.([...f,S]),v("")))},w=x=>{p?.(f.filter(S=>S.id!==x))};return a.createElement("div",{className:O(Dh(),u)},e&&a.createElement("label",{className:Ih({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:Ah({size:t,error:o,disabled:i})},a.createElement("div",{className:Fh()},f.map(x=>a.createElement("span",{key:x.id,className:Oh()},x.avatar&&a.createElement("img",{src:x.avatar,alt:x.label,className:"h-4 w-4 rounded-full"}),x.label,!i&&a.createElement("button",{type:"button",onClick:()=>w(x.id),className:"ml-1 text-light-500 hover:text-light-700"},"×"))),a.createElement("input",{list:h,value:m,onChange:x=>{v(x.target.value),g(x.target.value)},placeholder:f.length===0?l:"",disabled:i,className:O(Bh({disabled:i}),c)}),a.createElement("datalist",{id:h},d.map(x=>a.createElement("option",{key:x.id,value:x.label})))),s&&a.createElement("div",{className:"ml-2 flex shrink-0 items-center text-light-400"},s)),n&&a.createElement("p",{className:zh({error:o})},n))}const Vh=F("flex w-[320px] flex-col gap-1"),Hh=F("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}}}),Wh=F("flex items-stretch rounded-lg border bg-white transition-colors",{variants:{error:{true:"",false:"border-light-200"},disabled:{true:"bg-light-100",false:""}}}),jh=F("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-light-100",false:"bg-white"}}}),Uh="w-px bg-light-200",Gh=F(["flex flex-1 items-center gap-2 px-3 rounded-r-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),Rh=F("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),qh=F("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function Yh({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:l="www.cekat.ai",value:s,rightIcon:c,onChange:u,className:d,wrapperClassName:f}){return a.createElement("div",{className:O(Vh(),f)},e&&a.createElement("label",{className:Hh({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:Wh({error:o,disabled:i})},a.createElement("div",{className:jh({size:t})},"http://"),a.createElement("div",{className:Uh}),a.createElement("div",{className:Gh({size:t,error:o,disabled:i})},a.createElement("input",{value:s,onChange:u,placeholder:l,disabled:i,className:O(Rh({disabled:i}),d)}),c&&a.createElement("div",{className:"flex items-center text-light-400"},c))),n&&a.createElement("p",{className:qh({error:o})},n))}const Xh=F("flex w-[320px] flex-col gap-1"),Zh=F("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Jh=F("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors",{variants:{disabled:{true:"bg-light-100",false:""}}}),Qh=F(["flex flex-1 items-center gap-2 px-3 rounded-l-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),eg=F("w-px transition-colors",{variants:{error:{true:"focus:bg-error-200 group-focus-within:bg-error-500",false:"focus:bg-light-200 group-focus-within:bg-primary-500"}}}),tg=F("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-white",false:"bg-white"}}}),rg=F("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),ng=F("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function og({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:l="www.cekat.ai",value:s,rightIcon:c,suffix:u,onChange:d,className:f,wrapperClassName:p}){return a.createElement("div",{className:O(Xh(),p)},e&&a.createElement("label",{className:Zh({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:Jh({disabled:i})},a.createElement("div",{className:Qh({size:t,error:o,disabled:i})},a.createElement("input",{value:s,onChange:d,placeholder:l,disabled:i,className:O(rg({disabled:i}),f)}),c&&a.createElement("div",{className:"text-light-400"},c)),a.createElement("div",{className:eg({error:o})}),a.createElement("div",{className:tg({size:t,disabled:i})},u)),n&&a.createElement("p",{className:ng({error:o})},n))}const ig=F("flex w-full flex-col gap-1"),lg=F("flex items-center gap-1 text-sm font-bold text-light-800"),va=F(["flex w-full items-center border bg-white text-left","transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 gap-1 rounded px-2 text-caption-sm",sm:"h-9 gap-2 rounded-lg px-3 text-caption-lg",md:"h-11 gap-2 rounded-lg px-3 text-body-sm"},open:{true:"border-2 border-primary-500",false:"border-light-200 focus-within:border-2 focus-within:border-primary-500"},disabled:{true:"cursor-not-allowed bg-light-100",false:"cursor-pointer"}},defaultVariants:{size:"md",open:!1,disabled:!1}}),sg=F(["absolute left-0 top-full z-10 mt-2 w-full overflow-y-auto","rounded-lg border border-light-200 bg-white py-1","shadow-[0_12px_16px_-4px_rgba(16,24,40,0.08),0_4px_6px_-2px_rgba(16,24,40,0.03)]"],{variants:{size:{xs:"max-h-52",sm:"max-h-64",md:"max-h-80"}},defaultVariants:{size:"md"}}),xa=F("flex w-full items-center rounded-md text-left",{variants:{size:{xs:"gap-1 px-2 py-1 text-caption-sm",sm:"gap-2 px-3 py-1.5 text-caption-lg",md:"gap-2 py-2.5 pl-4 pr-2.5 text-body-sm"},disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer hover:bg-light-50"}},defaultVariants:{size:"md",disabled:!1}}),ag=F("text-caption-lg text-light-700"),cg=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),ug=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("path",{d:"M17.5 17.5L14.1 14.1M16 9.25C16 12.98 12.98 16 9.25 16C5.52 16 2.5 12.98 2.5 9.25C2.5 5.52 5.52 2.5 9.25 2.5C12.98 2.5 16 5.52 16 9.25Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),dg=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("path",{d:"M16.67 5L7.5 14.17L3.33 10",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Ln={xs:"size-4",sm:"size-5",md:"size-6"},wa={xs:"size-4",sm:"size-5",md:"size-5"},fg={xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},pg={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},Ea=({size:t,open:e,disabled:r})=>O("flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",fg[t],pg[t],e?"border-2 border-primary-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r?"cursor-not-allowed bg-light-100":"cursor-pointer"),hg=()=>"flex items-center gap-1 text-caption-sm font-semibold text-light-800",gg="flex w-full max-w-[320px] flex-col";function bg({size:t="md",type:e="default",label:r,required:n,helpIcon:o,hint:i,placeholder:l="Select option",disabled:s=!1,compact:c=!1,leadingIcon:u,options:d,value:f=null,onChange:p,values:h=[],onValuesChange:m,className:v,wrapperClassName:g}){const[w,x]=b.useState(!1),[S,k]=b.useState(""),V=b.useRef(null),I=b.useRef(null),L=e==="tags",C=e==="search"||L,K=d.find($=>$.id===f)??null,W=d.filter($=>h.includes($.id)),z=S?d.filter($=>`${$.label} ${$.supportingText??""}`.toLowerCase().includes(S.toLowerCase())):d,j=()=>{x(!1),k("")};b.useEffect(()=>{if(!w)return;const $=H=>{V.current?.contains(H.target)||j()};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[w]),b.useEffect(()=>{w&&C&&I.current?.focus()},[w,C]);const U=()=>{s||(w?j():x(!0))},y=$=>{$.disabled||(L?(m?.(h.includes($.id)?h.filter(H=>H!==$.id):[...h,$.id]),k(""),I.current?.focus()):(p?.($),j()))},T=$=>{if($.key==="Enter"){$.preventDefault();const H=z.find(ae=>!ae.disabled);w&&H&&y(H)}else $.key==="Backspace"&&L&&!S&&h.length?m?.(h.slice(0,-1)):w||x(!0)},G=$=>$.avatar?b.createElement("img",{src:$.avatar,alt:"",className:O(Ln[t],"shrink-0 rounded-full object-cover")}):$.icon?b.createElement("span",{className:O(Ln[t],"flex shrink-0 items-center justify-center",s?"text-light-400":"text-light-500")},$.icon):$.dot?b.createElement("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:s?"#d0d5dd":$.dot}}):null,N=K?G(K):u?b.createElement("span",{className:O(Ln[t],"flex shrink-0 items-center justify-center",s?"text-light-400":"text-light-500")},u):null,Y=K?b.createElement("span",{className:"flex min-w-0 items-center gap-2 whitespace-nowrap"},b.createElement("span",{className:O("truncate font-medium",s?"text-light-400":"text-light-800")},K.label),K.supportingText&&b.createElement("span",{className:s?"text-light-400":"text-light-700"},K.supportingText)):b.createElement("span",{className:s?"text-light-400":"text-light-500"},l),E=w&&b.createElement("div",{role:"listbox",className:sg({size:t})},z.length===0&&b.createElement("div",{className:O(xa({size:t}),"mx-1 w-auto text-light-500 hover:bg-transparent")},"No options found"),z.map($=>{const H=L?h.includes($.id):$.id===f;return b.createElement("div",{key:$.id,className:"px-1 py-0.5"},b.createElement("button",{type:"button",role:"option","aria-selected":H,disabled:$.disabled,onClick:()=>y($),className:xa({size:t,disabled:$.disabled})},G($),b.createElement("span",{className:"flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"},b.createElement("span",{className:O("truncate font-medium",$.disabled?"text-light-400":"text-light-900")},$.label),$.supportingText&&b.createElement("span",{className:$.disabled?"text-light-400":"text-light-700"},$.supportingText)),H&&b.createElement(dg,{className:"ml-auto size-5 shrink-0 text-primary-500"})))}));return b.createElement("div",{ref:V,className:O(c?gg:ig(),g)},r&&b.createElement("label",{className:c?hg():lg()},r,n&&b.createElement("span",{className:"text-error-400"},"*"),o),b.createElement("div",{className:"relative",onKeyDown:$=>{$.key==="Escape"&&j()}},e==="default"?b.createElement("button",{type:"button","aria-haspopup":"listbox","aria-expanded":w,disabled:s,onClick:U,className:O(c?Ea({size:t,open:w,disabled:s}):va({size:t,open:w,disabled:s}),v)},N,b.createElement("span",{className:"flex min-w-0 flex-1 items-center"},Y),b.createElement(cg,{className:O(wa[t],"shrink-0 text-light-500")})):b.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-expanded":w,onClick:U,className:O(c?Ea({size:t,open:w,disabled:s}):va({size:t,open:w,disabled:s}),v)},b.createElement(ug,{className:O(wa[t],"shrink-0",s?"text-light-400":"text-light-500")}),L&&W.length>0&&b.createElement("div",{className:"flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide"},W.map($=>b.createElement(Nn,{key:$.id,size:"sm",disabled:s,icon:$.avatar?b.createElement("img",{src:$.avatar,alt:"",className:"size-4 shrink-0 rounded-full object-cover"}):void 0,onClose:()=>y($)},$.label))),!L&&!w&&K?b.createElement("span",{className:"flex min-w-0 flex-1 items-center"},Y):b.createElement("input",{ref:I,value:S,disabled:s,placeholder:L&&W.length>0?"":l,onChange:$=>{k($.target.value),w||x(!0)},onKeyDown:T,className:"min-w-8 flex-1 bg-transparent text-light-900 outline-none placeholder:text-light-500 disabled:cursor-not-allowed disabled:placeholder:text-light-400"})),E),i&&b.createElement("p",{className:ag()},i))}const mg=F(["inline-flex items-center justify-center gap-1 shrink-0","rounded-md border border-light-200 bg-white px-2 py-1","font-bold text-caption-sm text-light-900","transition-shadow"],{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),yg=F("flex size-5 shrink-0 items-center justify-center text-light-500",{variants:{disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer hover:text-light-700"}},defaultVariants:{disabled:!1}}),vg=F("rounded-full transition-shadow",{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),xg=F(["absolute top-full z-10 mt-2 flex w-60 flex-col overflow-clip","rounded-lg border border-light-200 bg-white","shadow-[0px_12px_16px_-4px_rgba(16,24,40,0.08),0px_4px_6px_-2px_rgba(16,24,40,0.03)]"]),wg=F("flex w-full flex-col items-start border-b border-light-200 px-4 py-3"),Eg=F("flex w-full flex-col items-start overflow-y-auto py-1"),$g=F(["mx-1 flex w-[calc(100%-8px)] items-center gap-3 rounded-md px-4 py-2.5","text-left font-bold text-caption-lg"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer text-light-800 hover:bg-light-50"}},defaultVariants:{disabled:!1}}),Sg=F("ml-auto shrink-0 font-normal text-caption-sm text-light-500"),Cg=F("my-1 h-px w-full bg-light-200"),kg=({className:t})=>b.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},b.createElement("path",{d:"M4.5 6.75L9 11.25L13.5 6.75",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Pg=({className:t})=>b.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},b.createElement("path",{d:"M13.5 11.25L9 6.75L4.5 11.25",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Tg=({className:t})=>b.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},b.createElement("path",{d:"M10 10.83a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67ZM10 5a.83.83 0 1 0 0-1.67A.83.83 0 0 0 10 5ZM10 16.67a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"}));function Ng({trigger:t="button",label:e="Account",icon:r,avatarSrc:n,avatarInitials:o,header:i,items:l,open:s,defaultOpen:c=!1,onOpenChange:u,disabled:d=!1,align:f="end",className:p,menuClassName:h}){const[m,v]=b.useState(c),g=s!==void 0,w=g?s:m,x=b.useRef(null),S=I=>{g||v(I),u?.(I)};b.useEffect(()=>{if(!w)return;const I=C=>{x.current?.contains(C.target)||S(!1)},L=C=>{C.key==="Escape"&&S(!1)};return document.addEventListener("mousedown",I),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",I),document.removeEventListener("keydown",L)}},[w]);const k=()=>{d||S(!w)},V=I=>{I.disabled||(I.onClick?.(),S(!1))};return b.createElement("div",{ref:x,className:O("relative inline-block",p)},t==="button"&&b.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,disabled:d,onClick:k,className:mg({open:w,disabled:d})},b.createElement("span",null,e),w?b.createElement(Pg,{className:"size-[18px]"}):b.createElement(kg,{className:"size-[18px]"})),t==="icon"&&b.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,"aria-label":e,disabled:d,onClick:k,className:yg({disabled:d})},r??b.createElement(Tg,{className:"size-5"})),t==="avatar"&&b.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,"aria-label":e,disabled:d,onClick:k,className:vg({open:w,disabled:d})},b.createElement(Lt,{src:n,initials:o,size:"md",status:"online"})),w&&b.createElement("div",{role:"menu",className:O(xg(),f==="end"?"right-0":"left-0",h)},i&&b.createElement("div",{className:wg()},b.createElement("div",{className:"flex w-full items-center gap-3"},b.createElement(Lt,{src:i.avatarSrc,initials:i.avatarInitials,size:"md",status:i.status??"online"}),b.createElement("div",{className:"flex min-w-0 flex-1 flex-col items-start text-left"},b.createElement("span",{className:"w-full truncate text-sm font-bold text-light-800"},i.name),i.subtitle&&b.createElement("span",{className:"w-full truncate text-caption-lg font-normal text-light-700"},i.subtitle)))),b.createElement("div",{className:Eg()},l.map(I=>I.divider?b.createElement("div",{key:I.id,role:"separator",className:Cg()}):b.createElement("button",{key:I.id,type:"button",role:"menuitem",disabled:I.disabled,onClick:()=>V(I),className:$g({disabled:I.disabled})},I.icon&&b.createElement("span",{className:"flex size-4 shrink-0 items-center justify-center"},I.icon),b.createElement("span",{className:"flex-1 truncate"},I.label),I.shortcut&&b.createElement("span",{className:Sg()},I.shortcut))))))}const $a=F("relative",{variants:{layout:{floating:["flex w-full flex-col gap-4 p-4","rounded-xl border shadow-xs","sm:flex-row sm:items-start"],"full-width":"w-full border-b"}},defaultVariants:{layout:"floating"}}),Kg={default:{surface:"bg-light-50",border:"border-light-300",iconSurface:"border border-light-200 bg-white shadow-xs",iconSurfaceOnLight:"border border-light-200 bg-white shadow-xs",iconText:"text-light-800"},brand:{surface:"bg-primary-50",border:"border-primary-300",iconSurface:"bg-primary-100",iconSurfaceOnLight:"bg-white",iconText:"text-primary-500"},gray:{surface:"bg-light-50",border:"border-light-300",iconSurface:"bg-light-100",iconSurfaceOnLight:"bg-white",iconText:"text-light-800"},error:{surface:"bg-error-50",border:"border-error-300",iconSurface:"bg-error-50",iconSurfaceOnLight:"bg-white",iconText:"text-error-500"},warning:{surface:"bg-warning-50",border:"border-warning-300",iconSurface:"bg-warning-100",iconSurfaceOnLight:"bg-white",iconText:"text-warning-500"},success:{surface:"bg-success-50",border:"border-success-300",iconSurface:"bg-success-50",iconSurfaceOnLight:"bg-white",iconText:"text-success-500"}},Lg="bg-white border-light-200",Mg="relative mx-auto flex w-full max-w-[1280px] flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:gap-3 sm:px-8 sm:py-3",Dg=F("flex shrink-0 items-center justify-center",{variants:{layout:{floating:"","full-width":"hidden sm:flex"},shape:{square:"",circle:""},variant:{featured:"",plain:""}},compoundVariants:[{variant:"featured",layout:"floating",class:"size-8"},{variant:"featured",layout:"full-width",class:"size-10"},{variant:"featured",shape:"circle",class:"rounded-full"},{variant:"featured",shape:"square",layout:"floating",class:"rounded-md"},{variant:"featured",shape:"square",layout:"full-width",class:"rounded-lg"}],defaultVariants:{layout:"floating",shape:"square",variant:"featured"}}),Sa=F("flex min-w-0 flex-1",{variants:{layout:{floating:"flex-col gap-3","full-width":"items-center gap-4"}},defaultVariants:{layout:"floating"}}),Ig=F("flex min-w-0",{variants:{layout:{floating:"flex-col gap-1","full-width":"flex-col gap-0.5 sm:flex-row sm:flex-wrap sm:gap-x-1.5"},closable:{true:"",false:""}},compoundVariants:[{layout:"floating",closable:!0,class:"pr-8"},{layout:"full-width",closable:!0,class:"pr-8 sm:pr-0"}],defaultVariants:{layout:"floating",closable:!1}}),Ag="text-caption-lg font-bold text-light-800",Fg="text-caption-lg text-light-600",Og=F("flex gap-3",{variants:{layout:{floating:"flex-wrap items-center","full-width":""},actionVariant:{link:"flex-wrap items-center",button:""}},compoundVariants:[{layout:"full-width",actionVariant:"button",class:"flex-col-reverse sm:flex-row sm:items-center"}],defaultVariants:{layout:"floating",actionVariant:"link"}}),Bg=F(["inline-flex items-center justify-center gap-1 bg-transparent p-0","text-caption-lg font-bold transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{emphasis:{primary:"text-primary-500 hover:text-primary-800",secondary:"text-light-800 hover:text-light-900"}},defaultVariants:{emphasis:"secondary"}}),zg=F(["flex size-9 shrink-0 items-center justify-center rounded-lg","bg-transparent text-light-500 transition-colors","hover:bg-light-50 hover:text-light-700","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{layout:{floating:"absolute right-[7px] top-[7px]","full-width":"absolute right-2 top-2 sm:static"}},defaultVariants:{layout:"floating"}}),_g={default:$r,brand:$r,gray:$r,error:zn,warning:zn,success:Ta},Ca=({title:t,description:e,color:r="default",layout:n="floating",background:o="white",icon:i,iconVariant:l="featured",showIcon:s=!0,primaryAction:c,secondaryAction:u,actionVariant:d,actions:f,onClose:p,closeLabel:h="Close",className:m,...v})=>{const g=_g[r],w=n==="floating"?16:20,x=d??(n==="floating"?"link":"button"),S=Kg[r],k=o==="light",V=k?O(S.surface,S.border):Lg,I=(j,U)=>j?x==="link"?a.createElement("button",{type:"button",onClick:j.onClick,className:Bg({emphasis:U})},j.label):a.createElement(vr,{size:"sm",variant:U==="primary"?"solid":"outline",onPress:j.onClick,className:n==="full-width"?"w-full sm:w-auto":void 0},j.label):null,C=!!(f||c||u)?a.createElement("div",{className:Og({layout:n,actionVariant:x})},f??a.createElement(a.Fragment,null,I(u,"secondary"),I(c,"primary"))):null,K=s&&(i||g)?a.createElement("div",{className:O(Dg({layout:n,variant:l,shape:r==="default"?"square":"circle"}),S.iconText,l==="featured"&&(k?S.iconSurfaceOnLight:S.iconSurface))},i??a.createElement(g,{size:w,stroke:2})):null,W=p?a.createElement("button",{type:"button","aria-label":h,onClick:p,className:zg({layout:n})},a.createElement(Ka,{size:16,stroke:2})):null,z=a.createElement("div",{className:Ig({layout:n,closable:!!p})},a.createElement("p",{className:Ag},t),e&&a.createElement("p",{className:Fg},e));return n==="full-width"?a.createElement("div",{role:"alert",className:O($a({layout:n}),V,m),...v},a.createElement("div",{className:Mg},a.createElement("div",{className:Sa({layout:n})},K,z),(C||W)&&a.createElement("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2"},C,W))):a.createElement("div",{role:"alert",className:O($a({layout:n}),V,m),...v},K,a.createElement("div",{className:Sa({layout:n})},z,C),W)};Ca.displayName="Alert",X.Alert=Ca,X.Avatar=Lt,X.AvatarGroup=na,X.AvatarLabelGroup=oa,X.AvatarProfilePhoto=ia,X.Badge=Zs,X.BadgeGroup=Js,X.Button=vr,X.CardNumberInput=$h,X.Checkbox=js,X.Dropdown=Ng,X.Input=Kn,X.InputCounter=Eh,X.InputDropdown=bg,X.Loading=Qs,X.MultiSelectInput=_h,X.PhoneInput=xh,X.RadioGroup=yp,X.RadioGroupItem=Gs,X.SaleAmountInput=wh,X.Tab=la,X.TabBrowser=pa,X.TabBrowserBar=ha,X.TabBrowserPreview=ga,X.TabList=sa,X.Tag=Nn,X.Textarea=ya,X.Toggle=Rs,X.Tooltip=wr,X.WebsiteCopyInput=og,X.WebsiteInput=Yh,X.buttonIconSizePx=up,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})}));