@openpawlabs/diy-guides-ui 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/components/GuideLayout/GuideLayout.d.ts +7 -1
  2. package/dist/components/GuideLayout/GuideLayout.d.ts.map +1 -1
  3. package/dist/components/GuideLayout/GuideLayout.stories.d.ts +1 -1
  4. package/dist/components/GuideLayout/GuideLayout.stories.d.ts.map +1 -1
  5. package/dist/components/GuideStep/GuideStep.d.ts +5 -2
  6. package/dist/components/GuideStep/GuideStep.d.ts.map +1 -1
  7. package/dist/components/GuideStep/GuideStep.stories.d.ts +1 -1
  8. package/dist/components/GuideStep/GuideStep.stories.d.ts.map +1 -1
  9. package/dist/components/GuideStepList/GuideStepList.d.ts +26 -1
  10. package/dist/components/GuideStepList/GuideStepList.d.ts.map +1 -1
  11. package/dist/components/GuideStepList/GuideStepList.stories.d.ts.map +1 -1
  12. package/dist/components/GuideStepList/index.d.ts +1 -0
  13. package/dist/components/GuideStepList/index.d.ts.map +1 -1
  14. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
  15. package/dist/context/guideScrollMargin.d.ts +14 -0
  16. package/dist/context/guideScrollMargin.d.ts.map +1 -0
  17. package/dist/context/guideScrollMargin.test.d.ts +2 -0
  18. package/dist/context/guideScrollMargin.test.d.ts.map +1 -0
  19. package/dist/diy-guides-ui.cjs +6 -6
  20. package/dist/diy-guides-ui.cjs.map +1 -1
  21. package/dist/diy-guides-ui.js +2917 -2676
  22. package/dist/diy-guides-ui.js.map +1 -1
  23. package/dist/hooks/useGuideStepUrlSync.d.ts +24 -0
  24. package/dist/hooks/useGuideStepUrlSync.d.ts.map +1 -0
  25. package/dist/hooks/useGuideStepUrlSync.test.d.ts +2 -0
  26. package/dist/hooks/useGuideStepUrlSync.test.d.ts.map +1 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/style.css +1 -1
  30. package/dist/utils/guideStepUrl.d.ts +11 -0
  31. package/dist/utils/guideStepUrl.d.ts.map +1 -0
  32. package/dist/utils/guideStepUrl.test.d.ts +2 -0
  33. package/dist/utils/guideStepUrl.test.d.ts.map +1 -0
  34. package/dist/utils/pickActiveGuideStep.d.ts +9 -0
  35. package/dist/utils/pickActiveGuideStep.d.ts.map +1 -0
  36. package/dist/utils/pickActiveGuideStep.test.d.ts +2 -0
  37. package/dist/utils/pickActiveGuideStep.test.d.ts.map +1 -0
  38. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- "use strict";var zc=Object.create;var Bo=Object.defineProperty;var Hc=Object.getOwnPropertyDescriptor;var Uc=Object.getOwnPropertyNames;var Wc=Object.getPrototypeOf,Gc=Object.prototype.hasOwnProperty;var Vo=t=>{throw TypeError(t)};var qc=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Uc(e))!Gc.call(t,o)&&o!==n&&Bo(t,o,{get:()=>e[o],enumerable:!(r=Hc(e,o))||r.enumerable});return t};var Yc=(t,e,n)=>(n=t!=null?zc(Wc(t)):{},qc(e||!t||!t.__esModule?Bo(n,"default",{value:t,enumerable:!0}):n,t));var zo=(t,e,n)=>e.has(t)||Vo("Cannot "+n);var Ho=(t,e,n)=>(zo(t,e,"read from private field"),n?n.call(t):e.get(t)),Uo=(t,e,n)=>e.has(t)?Vo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),lr=(t,e,n,r)=>(zo(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),a=require("react"),Yt=require("react-dom"),je={GREY:"#7A8090",RED:"#E7320D",ORANGE:"#FF850A",YELLOW:"#F5E429",GREEN:"#14CC76",LIGHT_BLUE:"#20B3E9",BLUE:"#1738DE",MAGENTA:"#D945B1"};function ot(t,e){const n=t.replace("#",""),r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),i=parseInt(n.slice(4,6),16);return`rgba(${r}, ${o}, ${i}, ${e})`}function Hn(t){const e=t.replace("#",""),n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16);return(.299*n+.587*r+.114*o)/255>.55?"#111111":"#ffffff"}const xl={note:"GREY",info:"LIGHT_BLUE",tip:"GREEN",caution:"ORANGE",danger:"RED"};function $l(t){return je[xl[t]]}const Cn={note:"Note",info:"Info",tip:"Tip",caution:"Caution",danger:"Danger"},Xc="react-aria-clear-focus",Zc="react-aria-focus";function Un(t){var n;if(typeof window>"u"||window.navigator==null)return!1;let e=(n=window.navigator.userAgentData)==null?void 0:n.brands;return Array.isArray(e)&&e.some(r=>t.test(r.brand))||t.test(window.navigator.userAgent)}function io(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)==null?void 0:e.platform)||window.navigator.platform):!1}function Ve(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const it=Ve(function(){return io(/^Mac/i)}),Jc=Ve(function(){return io(/^iPhone/i)}),wl=Ve(function(){return io(/^iPad/i)||it()&&navigator.maxTouchPoints>1}),lt=Ve(function(){return Jc()||wl()}),Qc=Ve(function(){return it()||lt()}),El=Ve(function(){return Un(/AppleWebKit/i)&&!Cl()}),Cl=Ve(function(){return Un(/Chrome/i)}),lo=Ve(function(){return Un(/Android/i)}),eu=Ve(function(){return Un(/Firefox/i)});function de(t){if(tu())t.focus({preventScroll:!0});else{let e=nu(t);t.focus(),ru(e)}}let on=null;function tu(){if(on==null){on=!1;try{document.createElement("div").focus({get preventScroll(){return on=!0,!0}})}catch{}}return on}function nu(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function ru(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}const ou=a.createContext({isNative:!0,open:su,useHref:t=>t});function Xt(){return a.useContext(ou)}function iu(t,e){let n=t.getAttribute("target");return(!n||n==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function _e(t,e,n=!0){var c,u;let{metaKey:r,ctrlKey:o,altKey:i,shiftKey:l}=e;eu()&&((u=(c=window.event)==null?void 0:c.type)!=null&&u.startsWith("key"))&&t.target==="_blank"&&(it()?r=!0:o=!0);let s=El()&&it()&&!wl()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:o,altKey:i,shiftKey:l}):new MouseEvent("click",{metaKey:r,ctrlKey:o,altKey:i,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});_e.isOpening=n,de(t),t.dispatchEvent(s),_e.isOpening=!1}_e.isOpening=!1;function lu(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function su(t,e){lu(t,n=>_e(n,e))}function Sl(t){const n=Xt().useHref((t==null?void 0:t.href)??"");let r={};if(t)for(let o of["href","target","rel","download","ping","referrerPolicy"])o in t&&(r[o]=o==="href"?n:t[o]);return r}function Pl(t,e,n,r){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&iu(t.currentTarget,t)&&n&&(t.preventDefault(),e.open(t.currentTarget,t,n,r))}const J=typeof document<"u"?a.useLayoutEffect:()=>{},Sn={prefix:String(Math.round(Math.random()*1e10)),current:0},kl=a.createContext(Sn),au=a.createContext(!1);let cu=!!(typeof window<"u"&&window.document&&window.document.createElement),sr=new WeakMap;function uu(t=!1){var r,o;let e=a.useContext(kl),n=a.useRef(null);if(n.current===null&&!t){let i=(o=(r=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:r.ReactCurrentOwner)==null?void 0:o.current;if(i){let l=sr.get(i);l==null?sr.set(i,{id:e.current,state:i.memoizedState}):i.memoizedState!==l.state&&(e.current=l.id,sr.delete(i))}n.current=++e.current}return n.current}function du(t){let e=a.useContext(kl);e===Sn&&!cu&&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 n=uu(!!t),r=e===Sn&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function fu(t){let e=a.useId(),[n]=a.useState(Ze()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Sn.prefix}`;return t||`${r}-${e}`}const hu=typeof a.useId=="function"?fu:du;function pu(){return!1}function bu(){return!0}function mu(t){return()=>{}}function Ze(){return typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore(mu,pu,bu):a.useContext(au)}function gu(t){let[e,n]=a.useState(t),r=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}r.current===s.value?i.current():n(s.value)});J(()=>{r.current=e,o.current&&i.current()});let l=a.useCallback(s=>{o.current=s(r.current),i.current()},[i]);return[e,l]}let yu=!!(typeof window<"u"&&window.document&&window.document.createElement),yt=new Map,Nt;typeof FinalizationRegistry<"u"&&(Nt=new FinalizationRegistry(t=>{yt.delete(t)}));function he(t){let[e,n]=a.useState(t),r=a.useRef(null),o=hu(e),i=a.useRef(null);if(Nt&&Nt.register(i,o),yu){const l=yt.get(o);l&&!l.includes(r)?l.push(r):yt.set(o,[r])}return J(()=>{let l=o;return()=>{Nt&&Nt.unregister(i),yt.delete(l)}},[o]),a.useEffect(()=>{let l=r.current;return l&&n(l),()=>{l&&(r.current=null)}}),o}function vu(t,e){if(t===e)return t;let n=yt.get(t);if(n)return n.forEach(o=>o.current=e),e;let r=yt.get(e);return r?(r.forEach(o=>o.current=t),t):e}function vn(t=[]){let e=he(),[n,r]=gu(e),o=a.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return J(o,[e,o,...t]),n}function Zt(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Q=t=>(t==null?void 0:t.ownerDocument)??document,fe=t=>t&&"window"in t&&t.window===t?t:Q(t).defaultView||window;function xu(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function $u(t){return xu(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let wu=!1;function Ae(){return wu}function H(t,e){if(!Ae())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let n=e;for(;n!==null;){if(n===t)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:$u(n)?n=n.host:n=n.parentNode}return!1}const ne=(t=document)=>{var n;if(!Ae())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&((n=e.shadowRoot)!=null&&n.activeElement);)e=e.shadowRoot.activeElement;return e};function F(t){if(Ae()&&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 $t(t){if(!t)return!1;let e=t.getRootNode(),n=fe(t);if(!(e instanceof n.Document||e instanceof n.ShadowRoot))return!1;let r=e.activeElement;return r!=null&&t.contains(r)}class Eu{constructor(e,n,r,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{var s;if(l.nodeType===Node.ELEMENT_NODE){const c=l.shadowRoot;if(c){const u=this._doc.createTreeWalker(c,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(l);if((s=this.filter)!=null&&s.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=o??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const i=n.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(!H(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=e,o=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=r,s=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=o,this._currentSetFor.add(s),r=o=l.host}else r=r.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return H(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){var n;const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(e):(n=this.filter)!=null&&n.acceptNode&&(o=this.filter.acceptNode(e)),o===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let i=this.nextNode();return i&&(this.currentNode=i),i}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(){var r;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 o=this.previousNode();return o&&(this.currentNode=o),o}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){let i;if(typeof this.filter=="function"?i=this.filter(n):(r=this.filter)!=null&&r.acceptNode&&(i=this.filter.acceptNode(n)),i===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let l=this.lastChild();return l&&(this.currentNode=l),l}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let o=this.previousNode();return o&&(this.currentNode=o),o}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function Tl(t,e,n,r){return Ae()?new Eu(t,e,n,r):t.createTreeWalker(e,n,r)}function ut(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(o=>{const i=Wo(o,e);return n||(n=typeof i=="function"),i});if(n)return()=>{r.forEach((o,i)=>{typeof o=="function"?o():Wo(t[i],null)})}}}function Wo(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ml(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Ml(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Cu(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Ml(t))&&(r&&(r+=" "),r+=e);return r}function Y(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let o in r){let i=e[o],l=r[o];typeof i=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=Zt(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=Cu(i,l):o==="id"&&i&&l?e.id=vu(i,l):o==="ref"&&i&&l?e.ref=ut(i,l):e[o]=l!==void 0?l:i}}return e}const Su=new Set(["id"]),Pu=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),ku=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Tu=new Set(["dir","lang","hidden","inert","translate"]),Go=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"]),Mu=/^(data-.*)$/;function ae(t,e={}){let{labelable:n,isLink:r,global:o,events:i=o,propNames:l}=e,s={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(Su.has(c)||n&&Pu.has(c)||r&&ku.has(c)||o&&Tu.has(c)||i&&(Go.has(c)||c.endsWith("Capture")&&Go.has(c.slice(0,-7)))||l!=null&&l.has(c)||Mu.test(c))&&(s[c]=t[c]);return s}let We=new Map,kr=new Set;function qo(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{let o=F(r);if(!t(r)||!o)return;let i=We.get(o);i||(i=new Set,We.set(o,i),o.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{let o=F(r);if(!t(r)||!o)return;let i=We.get(o);if(i&&(i.delete(r.propertyName),i.size===0&&(o.removeEventListener("transitioncancel",n),We.delete(o)),We.size===0)){for(let l of kr)l();kr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?qo():document.addEventListener("DOMContentLoaded",qo));function Ru(){for(const[t]of We)"isConnected"in t&&!t.isConnected&&We.delete(t)}function Rl(t){requestAnimationFrame(()=>{Ru(),We.size===0?t():kr.add(t)})}function Wn(){let t=a.useRef(new Map),e=a.useCallback((o,i,l,s)=>{let c=s!=null&&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)},[]),n=a.useCallback((o,i,l,s)=>{var u;let c=((u=t.current.get(l))==null?void 0:u.fn)||l;o.removeEventListener(i,c,s),t.current.delete(l)},[]),r=a.useCallback(()=>{t.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return a.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function Dl(t,e){let{id:n,"aria-label":r,"aria-labelledby":o}=t;return n=he(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":o}}function Je(t){const e=a.useRef(null),n=a.useRef(void 0),r=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,n.current&&(n.current(),n.current=void 0),o!=null&&(n.current=r(o))}}),[r])}const Du=a.useInsertionEffect??J;function Pe(t){const e=a.useRef(null);return Du(()=>{e.current=t},[t]),a.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function Yo(t,e){const n=a.useRef(!0),r=a.useRef(null);J(()=>(n.current=!0,()=>{n.current=!1}),[]),J(()=>{n.current?n.current=!1:(!r.current||e.some((o,i)=>!Object.is(o,r[i])))&&t(),r.current=e},e)}function Nu(){return typeof window.ResizeObserver<"u"}function Pn(t){const{ref:e,box:n,onResize:r}=t;let o=Pe(r);a.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Nu()){const l=new window.ResizeObserver(s=>{s.length&&o()});return l.observe(i,{box:n}),()=>{i&&l.unobserve(i)}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)}},[e,n])}function so(t,e){J(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function st(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return t===r&&n.overflow!=="hidden"&&(o=!0),o&&e&&(o=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),o}function Nl(t,e){let n=t;for(st(n,e)&&(n=n.parentElement);n&&!st(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function ar(t,e){let n=[],r=document.scrollingElement||document.documentElement;for(;t&&(st(t,e)&&n.push(t),t!==r);)t=t.parentElement;return n}function bt(t){return it()?t.metaKey:t.ctrlKey}const Iu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ft(t){return t instanceof HTMLInputElement&&!Iu.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}let ve=typeof document<"u"&&window.visualViewport;function Lu(){let t=Ze(),[e,n]=a.useState(()=>t?{width:0,height:0}:cr());return a.useEffect(()=>{let r=s=>{n(c=>s.width===c.width&&s.height===c.height?c:s)},o=()=>{ve&&ve.scale>1||r(cr())},i,l=s=>{ve&&ve.scale>1||Ft(F(s))&&(i=requestAnimationFrame(()=>{let c=ne();(!c||!Ft(c))&&r({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return r(cr()),lt()&&window.addEventListener("blur",l,!0),ve?ve.addEventListener("resize",o):window.addEventListener("resize",o),()=>{cancelAnimationFrame(i),lt()&&window.removeEventListener("blur",l,!0),ve?ve.removeEventListener("resize",o):window.removeEventListener("resize",o)}},[]),e}function cr(){return{width:ve?Math.min(ve.width*ve.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:ve?ve.height*ve.scale:document.documentElement.clientHeight}}let Ku=0;const ur=new Map;function Au(t){let[e,n]=a.useState();return J(()=>{if(!t)return;let r=ur.get(t);if(r)n(r.element.id);else{let o=`react-aria-description-${Ku++}`;n(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),r={refCount:0,element:i},ur.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ur.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function It(t,e,n,r){let o=Pe(n),i=n==null;a.useEffect(()=>{if(i||!t.current)return;let l=t.current;return l.addEventListener(e,o,r),()=>{l.removeEventListener(e,o,r)}},[t,e,r,i])}function xn(t,e,n={}){let{block:r="nearest",inline:o="nearest"}=n;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,b=t===f,p=t===f?0:c.top,g=t===f?t.clientHeight:c.bottom,y=t===f?0:c.left,v=t===f?t.clientWidth:c.right,w=parseFloat(u.scrollMarginTop)||0,x=parseFloat(u.scrollMarginBottom)||0,P=parseFloat(u.scrollMarginLeft)||0,T=parseFloat(u.scrollMarginRight)||0,R=parseFloat(d.scrollPaddingTop)||0,K=parseFloat(d.scrollPaddingBottom)||0,M=parseFloat(d.scrollPaddingLeft)||0,N=parseFloat(d.scrollPaddingRight)||0,O=parseFloat(d.borderTopWidth)||0,k=parseFloat(d.borderBottomWidth)||0,A=parseFloat(d.borderLeftWidth)||0,V=parseFloat(d.borderRightWidth)||0,j=s.top-w,m=s.bottom+x,E=s.left-P,I=s.right+T,C=t===f?0:A+V,D=t===f?0:O+k,$=t===f?0:t.offsetWidth-t.clientWidth-C,S=t===f?0:t.offsetHeight-t.clientHeight-D,L=p+(b?0:O)+R,U=g-(b?0:k)-K-S,W=y+(b?0:A)+M,G=v-(b?0:V)-N;d.direction==="rtl"&&!lt()?W+=$:G-=$;let ee=j<L||m>U,le=E<W||I>G;if(ee&&r==="start")i+=j-L;else if(ee&&r==="center")i+=(j+m)/2-(L+U)/2;else if(ee&&r==="end")i+=m-U;else if(ee&&r==="nearest"){let Z=j-L,be=m-U;i+=Math.abs(Z)<=Math.abs(be)?Z:be}if(le&&o==="start")l+=E-W;else if(le&&o==="center")l+=(E+I)/2-(W+G)/2;else if(le&&o==="end")l+=I-G;else if(le&&o==="nearest"){let Z=E-W,be=I-G;l+=Math.abs(Z)<=Math.abs(be)?Z:be}if(process.env.NODE_ENV==="test"){t.scrollLeft=l,t.scrollTop=i;return}t.scrollTo({left:l,top:i})}function Xo(t,e={}){var r,o,i;let{containingElement:n}=e;if(t&&t.isConnected){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let{left:c,top:u}=t.getBoundingClientRect(),d=ar(t,!0);for(let p of d)xn(p,t);let{left:f,top:b}=t.getBoundingClientRect();if(Math.abs(c-f)>1||Math.abs(u-b)>1){d=n?ar(n,!0):[];for(let p of d)xn(p,n,{block:"center",inline:"center"});for(let p of ar(t,!0))xn(p,t)}}else{let{left:c,top:u}=t.getBoundingClientRect();(r=t==null?void 0:t.scrollIntoView)==null||r.call(t,{block:"nearest"});let{left:d,top:f}=t.getBoundingClientRect();(Math.abs(c-d)>1||Math.abs(u-f)>1)&&((o=n==null?void 0:n.scrollIntoView)==null||o.call(n,{block:"center",inline:"center"}),(i=t.scrollIntoView)==null||i.call(t,{block:"nearest"}))}}}function Tr(t){return t.pointerType===""&&t.isTrusted?!0:lo()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Ou(t){return!lo()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function Fu(t,e,n){let r=Pe(o=>{n&&!o.defaultPrevented&&n(e)});a.useEffect(()=>{var i;let o=(i=t==null?void 0:t.current)==null?void 0:i.form;return o==null||o.addEventListener("reset",r),()=>{o==null||o.removeEventListener("reset",r)}},[t])}function ao(t,e=!0){let[n,r]=a.useState(!0),o=n&&e;return J(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,o]),Il(t,o,a.useCallback(()=>r(!1),[])),o}function Mr(t,e){let[n,r]=a.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let o=n==="exiting";return Il(t,o,a.useCallback(()=>{r(i=>i==="exiting"?"closed":i)},[])),o}function Il(t,e,n){J(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let o=!1;return Promise.allSettled(r.map(i=>i.finished)).then(()=>{o||Yt.flushSync(()=>{n()})}),()=>{o=!0}}},[t,e,n])}const ju=typeof Element<"u"&&"checkVisibility"in Element.prototype;function _u(t){const e=fe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,o=n!=="none"&&r!=="hidden"&&r!=="collapse";if(o){const{getComputedStyle:i}=t.ownerDocument.defaultView;let{display:l,visibility:s}=i(t);o=l!=="none"&&s!=="hidden"&&s!=="collapse"}return o}function Bu(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 co(t,e){return ju?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&_u(t)&&Bu(t,e)&&(!t.parentElement||co(t.parentElement,t))}const uo=["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"],Vu=uo.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";uo.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const zu=uo.join(':not([hidden]):not([tabindex="-1"]),');function fo(t,e){return t.matches(Vu)&&!Kl(t)&&((e==null?void 0:e.skipVisibilityCheck)||co(t))}function Ll(t){return t.matches(zu)&&co(t)&&!Kl(t)}function Kl(t){let e=t;for(;e!=null;){if(e instanceof e.ownerDocument.defaultView.HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function Zo(t){let e=t==null?void 0:t.defaultView;return(e==null?void 0:e.__webpack_nonce__)||globalThis.__webpack_nonce__||void 0}let dr=new WeakMap;function Al(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return Zo(e);if(dr.has(e))return dr.get(e);let n=e.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof fe(n).HTMLMetaElement&&(n.nonce||n.content)||Zo(e)||void 0;return r!==void 0&&dr.set(e,r),r}function Hu(t,e,n){const{render:r,...o}=e,i=a.useRef(null),l=a.useMemo(()=>ut(n,i),[n,i]);J(()=>{var c;typeof process<"u"&&((c=process.env)==null?void 0:c.NODE_ENV)!=="production"&&r&&(i.current||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,r]);const s={...o,ref:l};return r?r(s,void 0):h.jsx(t,{...s})}const Jo={},oe=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=Jo[e];return n||(n=a.forwardRef(Hu.bind(null,e)),Jo[e]=n),n}});var Uu=/\s+/g,Wu=t=>typeof t!="string"||!t?t:t.replace(Uu," ").trim(),Bt=(...t)=>{const e=[],n=r=>{if(!r&&r!==0&&r!==0n)return;if(Array.isArray(r)){for(let i=0,l=r.length;i<l;i++)n(r[i]);return}const o=typeof r;if(o==="string"||o==="number"||o==="bigint"){if(o==="number"&&r!==r)return;e.push(String(r))}else if(o==="object"){const i=Object.keys(r);for(let l=0,s=i.length;l<s;l++){const c=i[l];r[c]&&e.push(c)}}};for(let r=0,o=t.length;r<o;r++){const i=t[r];i!=null&&n(i)}return e.length>0?Wu(e.join(" ")):void 0},Qo=t=>t===!1?"false":t===!0?"true":t===0?"0":t,ge=t=>{if(!t||typeof t!="object")return!0;for(const e in t)return!1;return!0},Gu=(t,e)=>{if(t===e)return!0;if(!t||!e)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!r.includes(i)||t[i]!==e[i])return!1}return!0},qu=(t,e)=>{for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=e[n];n in t?t[n]=Bt(t[n],r):t[n]=r}return t},Ol=(t,e)=>{for(let n=0;n<t.length;n++){const r=t[n];Array.isArray(r)?Ol(r,e):r&&e.push(r)}},Fl=(...t)=>{const e=[];Ol(t,e);const n=[];for(let r=0;r<e.length;r++)e[r]&&n.push(e[r]);return n},Rr=(t,e)=>{const n={};for(const r in t){const o=t[r];if(r in e){const i=e[r];Array.isArray(o)||Array.isArray(i)?n[r]=Fl(i,o):typeof o=="object"&&typeof i=="object"&&o&&i?n[r]=Rr(o,i):n[r]=i+" "+o}else n[r]=o}for(const r in e)r in t||(n[r]=e[r]);return n},Yu={twMerge:!0,twMergeConfig:{}};function Xu(){let t=null,e={},n=!1;return{get cachedTwMerge(){return t},set cachedTwMerge(r){t=r},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(r){e=r},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(r){n=r},reset(){t=null,e={},n=!1}}}var Ke=Xu(),Zu=t=>{const e=(r,o)=>{const{extend:i=null,slots:l={},variants:s={},compoundVariants:c=[],compoundSlots:u=[],defaultVariants:d={}}=r,f={...Yu,...o},b=i!=null&&i.base?Bt(i.base,r==null?void 0:r.base):r==null?void 0:r.base,p=i!=null&&i.variants&&!ge(i.variants)?Rr(s,i.variants):s,g=i!=null&&i.defaultVariants&&!ge(i.defaultVariants)?{...i.defaultVariants,...d}:d;!ge(f.twMergeConfig)&&!Gu(f.twMergeConfig,Ke.cachedTwMergeConfig)&&(Ke.didTwMergeConfigChange=!0,Ke.cachedTwMergeConfig=f.twMergeConfig);const y=ge(i==null?void 0:i.slots),v=ge(l)?{}:{base:Bt(r==null?void 0:r.base,y&&(i==null?void 0:i.base)),...l},w=y?v:qu({...i==null?void 0:i.slots},ge(v)?{base:r==null?void 0:r.base}:v),x=ge(i==null?void 0:i.compoundVariants)?c:Fl(i==null?void 0:i.compoundVariants,c),P=R=>{if(ge(p)&&ge(l)&&y)return t(b,R==null?void 0:R.class,R==null?void 0:R.className)(f);if(x&&!Array.isArray(x))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof x}`);if(u&&!Array.isArray(u))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof u}`);const K=(m,E=p,I=null,C=null)=>{const D=E[m];if(!D||ge(D))return null;const $=(C==null?void 0:C[m])??(R==null?void 0:R[m]);if($===null)return null;const S=Qo($);if(typeof S=="object")return null;const L=g==null?void 0:g[m],U=S??Qo(L);return D[U||"false"]},M=()=>{if(!p)return null;const m=Object.keys(p),E=[];for(let I=0;I<m.length;I++){const C=K(m[I],p);C&&E.push(C)}return E},N=(m,E)=>{if(!p||typeof p!="object")return null;const I=[];for(const C in p){const D=K(C,p,m,E),$=m==="base"&&typeof D=="string"?D:D&&D[m];$&&I.push($)}return I},O={};for(const m in R){const E=R[m];E!==void 0&&(O[m]=E)}const k=(m,E)=>{var C;const I=typeof(R==null?void 0:R[m])=="object"?{[m]:(C=R[m])==null?void 0:C.initial}:{};return{...g,...O,...I,...E}},A=(m=[],E)=>{const I=[],C=m.length;for(let D=0;D<C;D++){const{class:$,className:S,...L}=m[D];let U=!0;const W=k(null,E);for(const G in L){const ee=L[G],le=W[G];if(Array.isArray(ee)){if(!ee.includes(le)){U=!1;break}}else{if((ee==null||ee===!1)&&(le==null||le===!1))continue;if(le!==ee){U=!1;break}}}U&&($&&I.push($),S&&I.push(S))}return I},V=m=>{const E=A(x,m);if(!Array.isArray(E))return E;const I={},C=t;for(let D=0;D<E.length;D++){const $=E[D];if(typeof $=="string")I.base=C(I.base,$)(f);else if(typeof $=="object")for(const S in $)I[S]=C(I[S],$[S])(f)}return I},j=m=>{if(u.length<1)return null;const E={},I=k(null,m);for(let C=0;C<u.length;C++){const{slots:D=[],class:$,className:S,...L}=u[C];if(!ge(L)){let U=!0;for(const W in L){const G=I[W],ee=L[W];if(G===void 0||(Array.isArray(ee)?!ee.includes(G):ee!==G)){U=!1;break}}if(!U)continue}for(let U=0;U<D.length;U++){const W=D[U];E[W]||(E[W]=[]),E[W].push([$,S])}}return E};if(!ge(l)||!y){const m={};if(typeof w=="object"&&!ge(w)){const E=t;for(const I in w)m[I]=C=>{const D=V(C),$=j(C);return E(w[I],N(I,C),D?D[I]:void 0,$?$[I]:void 0,C==null?void 0:C.class,C==null?void 0:C.className)(f)}}return m}return t(b,M(),A(x),R==null?void 0:R.class,R==null?void 0:R.className)(f)},T=()=>{if(!(!p||typeof p!="object"))return Object.keys(p)};return P.variantKeys=T(),P.extend=i,P.base=b,P.slots=w,P.variants=p,P.defaultVariants=g,P.compoundSlots=u,P.compoundVariants=x,P};return{tv:e,createTV:r=>(o,i)=>e(o,i?Rr(r,i):r)}};const Ju=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},Qu=(t,e)=>({classGroupId:t,validator:e}),jl=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),kn="-",ei=[],ed="arbitrary..",td=t=>{const e=rd(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return nd(l);const s=l.split(kn),c=s[0]===""&&s.length>1?1:0;return _l(s,c,e)},getConflictingClassGroupIds:(l,s)=>{if(s){const c=r[l],u=n[l];return c?u?Ju(u,c):c:u||ei}return n[l]||ei}}},_l=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],i=n.nextPart.get(o);if(i){const u=_l(t,e+1,i);if(u)return u}const l=n.validators;if(l===null)return;const s=e===0?t.join(kn):t.slice(e).join(kn),c=l.length;for(let u=0;u<c;u++){const d=l[u];if(d.validator(s))return d.classGroupId}},nd=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?ed+r:void 0})(),rd=t=>{const{theme:e,classGroups:n}=t;return od(n,e)},od=(t,e)=>{const n=jl();for(const r in t){const o=t[r];ho(o,n,r,e)}return n},ho=(t,e,n,r)=>{const o=t.length;for(let i=0;i<o;i++){const l=t[i];id(l,e,n,r)}},id=(t,e,n,r)=>{if(typeof t=="string"){ld(t,e,n);return}if(typeof t=="function"){sd(t,e,n,r);return}ad(t,e,n,r)},ld=(t,e,n)=>{const r=t===""?e:Bl(e,t);r.classGroupId=n},sd=(t,e,n,r)=>{if(cd(t)){ho(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Qu(n,t))},ad=(t,e,n,r)=>{const o=Object.entries(t),i=o.length;for(let l=0;l<i;l++){const[s,c]=o[l];ho(c,Bl(e,s),n,r)}},Bl=(t,e)=>{let n=t;const r=e.split(kn),o=r.length;for(let i=0;i<o;i++){const l=r[i];let s=n.nextPart.get(l);s||(s=jl(),n.nextPart.set(l,s)),n=s}return n},cd=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,ud=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(i,l)=>{n[i]=l,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return o(i,l),l},set(i,l){i in n?n[i]=l:o(i,l)}}},Dr="!",ti=":",dd=[],ni=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),fd=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const i=[];let l=0,s=0,c=0,u;const d=o.length;for(let y=0;y<d;y++){const v=o[y];if(l===0&&s===0){if(v===ti){i.push(o.slice(c,y)),c=y+1;continue}if(v==="/"){u=y;continue}}v==="["?l++:v==="]"?l--:v==="("?s++:v===")"&&s--}const f=i.length===0?o:o.slice(c);let b=f,p=!1;f.endsWith(Dr)?(b=f.slice(0,-1),p=!0):f.startsWith(Dr)&&(b=f.slice(1),p=!0);const g=u&&u>c?u-c:void 0;return ni(i,p,b,g)};if(e){const o=e+ti,i=r;r=l=>l.startsWith(o)?i(l.slice(o.length)):ni(dd,!1,l,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},hd=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const l=n[i],s=l[0]==="[",c=e.has(l);s||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},pd=t=>({cache:ud(t.cacheSize),parseClassName:fd(t),sortModifiers:hd(t),...td(t)}),bd=/\s+/,md=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=e,l=[],s=t.trim().split(bd);let c="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:f,modifiers:b,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:y}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let v=!!y,w=r(v?g.substring(0,y):g);if(!w){if(!v){c=d+(c.length>0?" "+c:c);continue}if(w=r(g),!w){c=d+(c.length>0?" "+c:c);continue}v=!1}const x=b.length===0?"":b.length===1?b[0]:i(b).join(":"),P=p?x+Dr:x,T=P+w;if(l.indexOf(T)>-1)continue;l.push(T);const R=o(w,v);for(let K=0;K<R.length;++K){const M=R[K];l.push(P+M)}c=d+(c.length>0?" "+c:c)}return c},gd=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=Vl(n))&&(o&&(o+=" "),o+=r);return o},Vl=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=Vl(t[r]))&&(n&&(n+=" "),n+=e);return n},Nr=(t,...e)=>{let n,r,o,i;const l=c=>{const u=e.reduce((d,f)=>f(d),t());return n=pd(u),r=n.cache.get,o=n.cache.set,i=s,s(c)},s=c=>{const u=r(c);if(u)return u;const d=md(c,n);return o(c,d),d};return i=l,(...c)=>i(gd(...c))},yd=[],ue=t=>{const e=n=>n[t]||yd;return e.isThemeGetter=!0,e},zl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vd=/^\d+\/\d+$/,xd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$d=/\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$/,wd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ed=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ft=t=>vd.test(t),X=t=>!!t&&!Number.isNaN(Number(t)),He=t=>!!t&&Number.isInteger(Number(t)),fr=t=>t.endsWith("%")&&X(t.slice(0,-1)),Le=t=>xd.test(t),Sd=()=>!0,Pd=t=>$d.test(t)&&!wd.test(t),Ul=()=>!1,kd=t=>Ed.test(t),Td=t=>Cd.test(t),Md=t=>!_(t)&&!B(t),Rd=t=>Et(t,ql,Ul),_=t=>zl.test(t),tt=t=>Et(t,Yl,Pd),hr=t=>Et(t,Kd,X),ri=t=>Et(t,Wl,Ul),Dd=t=>Et(t,Gl,Td),ln=t=>Et(t,Xl,kd),B=t=>Hl.test(t),Tt=t=>Ct(t,Yl),Nd=t=>Ct(t,Ad),oi=t=>Ct(t,Wl),Id=t=>Ct(t,ql),Ld=t=>Ct(t,Gl),sn=t=>Ct(t,Xl,!0),Et=(t,e,n)=>{const r=zl.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Ct=(t,e,n=!1)=>{const r=Hl.exec(t);return r?r[1]?e(r[1]):n:!1},Wl=t=>t==="position"||t==="percentage",Gl=t=>t==="image"||t==="url",ql=t=>t==="length"||t==="size"||t==="bg-size",Yl=t=>t==="length",Kd=t=>t==="number",Ad=t=>t==="family-name",Xl=t=>t==="shadow",Ir=()=>{const t=ue("color"),e=ue("font"),n=ue("text"),r=ue("font-weight"),o=ue("tracking"),i=ue("leading"),l=ue("breakpoint"),s=ue("container"),c=ue("spacing"),u=ue("radius"),d=ue("shadow"),f=ue("inset-shadow"),b=ue("text-shadow"),p=ue("drop-shadow"),g=ue("blur"),y=ue("perspective"),v=ue("aspect"),w=ue("ease"),x=ue("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...T(),B,_],K=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],N=()=>[B,_,c],O=()=>[ft,"full","auto",...N()],k=()=>[He,"none","subgrid",B,_],A=()=>["auto",{span:["full",He,B,_]},He,B,_],V=()=>[He,"auto",B,_],j=()=>["auto","min","max","fr",B,_],m=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],E=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...N()],C=()=>[ft,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],D=()=>[t,B,_],$=()=>[...T(),oi,ri,{position:[B,_]}],S=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",Id,Rd,{size:[B,_]}],U=()=>[fr,Tt,tt],W=()=>["","none","full",u,B,_],G=()=>["",X,Tt,tt],ee=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[X,fr,oi,ri],be=()=>["","none",g,B,_],Ie=()=>["none",X,B,_],z=()=>["none",X,B,_],$e=()=>[X,B,_],me=()=>[ft,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Le],breakpoint:[Le],color:[Sd],container:[Le],"drop-shadow":[Le],ease:["in","out","in-out"],font:[Md],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Le],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Le],shadow:[Le],spacing:["px",X],text:[Le],"text-shadow":[Le],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ft,_,B,v]}],container:["container"],columns:[{columns:[X,_,B,s]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:R()}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[He,"auto",B,_]}],basis:[{basis:[ft,"full","auto",s,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,ft,"auto","initial","none",_]}],grow:[{grow:["",X,B,_]}],shrink:[{shrink:["",X,B,_]}],order:[{order:[He,"first","last","none",B,_]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...m(),"normal"]}],"justify-items":[{"justify-items":[...E(),"normal"]}],"justify-self":[{"justify-self":["auto",...E()]}],"align-content":[{content:["normal",...m()]}],"align-items":[{items:[...E(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...E(),{baseline:["","last"]}]}],"place-content":[{"place-content":m()}],"place-items":[{"place-items":[...E(),"baseline"]}],"place-self":[{"place-self":["auto",...E()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:C()}],w:[{w:[s,"screen",...C()]}],"min-w":[{"min-w":[s,"screen","none",...C()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...C()]}],h:[{h:["screen","lh",...C()]}],"min-h":[{"min-h":["screen","lh","none",...C()]}],"max-h":[{"max-h":["screen","lh",...C()]}],"font-size":[{text:["base",n,Tt,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,B,hr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fr,_]}],"font-family":[{font:[Nd,_,e]}],"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":[X,"none",B,hr]}],leading:[{leading:[i,...N()]}],"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:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",B,tt]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[X,"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:N()}],"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:$()}],"bg-repeat":[{bg:S()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},He,B,_],radial:["",B,_],conic:[He,B,_]},Ld,Dd]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,B,_]}],"outline-w":[{outline:["",X,Tt,tt]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,sn,ln]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,sn,ln]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[X,tt]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",b,sn,ln]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[X,B,_]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[B,_]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:S()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,_]}],filter:[{filter:["","none",B,_]}],blur:[{blur:be()}],brightness:[{brightness:[X,B,_]}],contrast:[{contrast:[X,B,_]}],"drop-shadow":[{"drop-shadow":["","none",p,sn,ln]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",X,B,_]}],"hue-rotate":[{"hue-rotate":[X,B,_]}],invert:[{invert:["",X,B,_]}],saturate:[{saturate:[X,B,_]}],sepia:[{sepia:["",X,B,_]}],"backdrop-filter":[{"backdrop-filter":["","none",B,_]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[X,B,_]}],"backdrop-contrast":[{"backdrop-contrast":[X,B,_]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,B,_]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,B,_]}],"backdrop-invert":[{"backdrop-invert":["",X,B,_]}],"backdrop-opacity":[{"backdrop-opacity":[X,B,_]}],"backdrop-saturate":[{"backdrop-saturate":[X,B,_]}],"backdrop-sepia":[{"backdrop-sepia":["",X,B,_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"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:[X,"initial",B,_]}],ease:[{ease:["linear","initial",w,B,_]}],delay:[{delay:[X,B,_]}],animate:[{animate:["none",x,B,_]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,B,_]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:z()}],"scale-x":[{"scale-x":z()}],"scale-y":[{"scale-y":z()}],"scale-z":[{"scale-z":z()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[B,_,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",...D()]}],"stroke-w":[{stroke:[X,Tt,tt,hr]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Od=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(Lt(t,"cacheSize",e),Lt(t,"prefix",n),Lt(t,"experimentalParseClassName",r),an(t.theme,i.theme),an(t.classGroups,i.classGroups),an(t.conflictingClassGroups,i.conflictingClassGroups),an(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Lt(t,"orderSensitiveModifiers",i.orderSensitiveModifiers),cn(t.theme,o.theme),cn(t.classGroups,o.classGroups),cn(t.conflictingClassGroups,o.conflictingClassGroups),cn(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Zl(t,o,"orderSensitiveModifiers"),t),Lt=(t,e,n)=>{n!==void 0&&(t[e]=n)},an=(t,e)=>{if(e)for(const n in e)Lt(t,n,e[n])},cn=(t,e)=>{if(e)for(const n in e)Zl(t,e,n)},Zl=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},Fd=(t,...e)=>typeof t=="function"?Nr(Ir,t,...e):Nr(()=>Od(Ir(),t),...e),jd=Nr(Ir);var _d=t=>ge(t)?jd:Fd({...t,extend:{theme:t.theme,classGroups:t.classGroups,conflictingClassGroupModifiers:t.conflictingClassGroupModifiers,conflictingClassGroups:t.conflictingClassGroups,...t.extend}}),Jl=(t,e)=>{const n=Bt(t);return!n||!((e==null?void 0:e.twMerge)??!0)?n:((!Ke.cachedTwMerge||Ke.didTwMergeConfigChange)&&(Ke.didTwMergeConfigChange=!1,Ke.cachedTwMerge=_d(Ke.cachedTwMergeConfig)),Ke.cachedTwMerge(n)||void 0)},q=(...t)=>Jl(t,{}),Bd=(...t)=>e=>Jl(t,e),{tv:xe}=Zu(Bd);const Vd=xe({defaultVariants:{status:"default"},slots:{base:"alert",content:"alert__content",description:"alert__description",indicator:"alert__indicator",title:"alert__title"},variants:{status:{accent:{base:"alert--accent"},danger:{base:"alert--danger"},default:{base:"alert--default"},success:{base:"alert--success"},warning:{base:"alert--warning"}}}}),qe=xe({base:"button",defaultVariants:{fullWidth:!1,isIconOnly:!1,size:"md",variant:"primary"},variants:{fullWidth:{false:"",true:"button--full-width"},isIconOnly:{true:"button--icon-only"},size:{lg:"button--lg",md:"button--md",sm:"button--sm"},variant:{danger:"button--danger","danger-soft":"button--danger-soft",ghost:"button--ghost",outline:"button--outline",primary:"button--primary",secondary:"button--secondary",tertiary:"button--tertiary"}}}),po=xe({defaultVariants:{fullWidth:!1,orientation:"horizontal"},slots:{base:"button-group",separator:"button-group__separator"},variants:{fullWidth:{false:{},true:{base:"button-group--full-width"}},orientation:{horizontal:{base:"button-group--horizontal"},vertical:{base:"button-group--vertical"}}}}),zd=xe({defaultVariants:{variant:"default"},slots:{base:"card",content:"card__content",description:"card__description",footer:"card__footer",header:"card__header",title:"card__title"},variants:{variant:{default:{base:"card--default"},secondary:{base:"card--secondary"},tertiary:{base:"card--tertiary"},transparent:{base:"card--transparent"}}}}),Hd=xe({defaultVariants:{variant:"primary"},slots:{base:"checkbox",content:"checkbox__content",control:"checkbox__control",indicator:"checkbox__indicator"},variants:{variant:{primary:{base:"checkbox--primary"},secondary:{base:"checkbox--secondary"}}}}),Ud=xe({defaultVariants:{color:"default",variant:"secondary"},slots:{base:"chip",label:"chip__label"},variants:{color:{accent:{base:"chip--accent"},danger:{base:"chip--danger"},default:{base:"chip--default"},success:{base:"chip--success"},warning:{base:"chip--warning"}},size:{lg:{base:"chip--lg"},md:{base:"chip--md"},sm:{base:"chip--sm"}},variant:{primary:{base:"chip--primary"},secondary:{base:"chip--secondary"},soft:{base:"chip--soft"},tertiary:{base:"chip--tertiary"}}}}),Wd=xe({base:"close-button",defaultVariants:{variant:"default"},variants:{variant:{default:"close-button--default"}}}),Gd=xe({slots:{menu:"dropdown__menu",popover:"dropdown__popover",root:"dropdown",trigger:"dropdown__trigger"}}),qd=xe({slots:{base:"link",icon:"link__icon"}}),Yd=xe({defaultVariants:{color:"accent",size:"md"},slots:{base:"progress-bar",fill:"progress-bar__fill",output:"progress-bar__output",track:"progress-bar__track"},variants:{color:{accent:{base:"progress-bar--accent"},danger:{base:"progress-bar--danger"},default:{base:"progress-bar--default"},success:{base:"progress-bar--success"},warning:{base:"progress-bar--warning"}},size:{lg:{base:"progress-bar--lg"},md:{base:"progress-bar--md"},sm:{base:"progress-bar--sm"}}}}),Xd=xe({defaultVariants:{variant:"default"},slots:{indicator:"menu-item__indicator",item:"menu-item",submenuIndicator:"menu-item__indicator menu-item__indicator--submenu"},variants:{variant:{danger:{item:"menu-item--danger"},default:{item:"menu-item--default"}}}}),Zd=xe({base:"menu-section"}),bo=xe({defaultVariants:{scroll:"inside",size:"md",variant:"opaque"},slots:{backdrop:"modal__backdrop",body:"modal__body",closeTrigger:"modal__close-trigger",container:"modal__container",dialog:"modal__dialog",footer:"modal__footer",header:"modal__header",heading:"modal__heading",icon:"modal__icon",trigger:"modal__trigger"},variants:{scroll:{inside:{body:"modal__body--scroll-inside",dialog:"modal__dialog--scroll-inside"},outside:{body:"modal__body--scroll-outside",container:"modal__container--scroll-outside",dialog:"modal__dialog--scroll-outside"}},size:{cover:{dialog:"modal__dialog--cover"},full:{container:"modal__container--full",dialog:"modal__dialog--full"},lg:{dialog:"modal__dialog--lg"},md:{dialog:"modal__dialog--md"},sm:{dialog:"modal__dialog--sm"},xs:{dialog:"modal__dialog--xs"}},variant:{blur:{backdrop:"modal__backdrop--blur"},opaque:{backdrop:"modal__backdrop--opaque"},transparent:{backdrop:"modal__backdrop--transparent"}}}}),Jd=xe({base:"separator",defaultVariants:{orientation:"horizontal",variant:"default"},variants:{orientation:{horizontal:"separator--horizontal",vertical:"separator--vertical"},variant:{default:"separator--default",secondary:"separator--secondary",tertiary:"separator--tertiary"}}}),Tn=Symbol("default");function ze({values:t,children:e}){for(let[n,r]of t)e=a.createElement(n.Provider,{value:r},e);return e}function Te(t){let{className:e,style:n,children:r,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 n=="function"?d=n({...s,defaultStyle:l||{}}):d=n,typeof r=="function"?f=r({...s,defaultChildren:i}):r==null?f=i:f=r,{className:u??o,style:d||l?{...l,...d}:void 0,children:f??i,"data-rac":"",render:c?b=>c(b,s):void 0}},[e,n,r,o,i,l,s,c])}function Qd(t,e){return n=>e(typeof t=="function"?t(n):t,n)}function Jt(t,e){let n=a.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||Tn;if(!n.slots[r]){let o=new Intl.ListFormat().format(Object.keys(n.slots).map(l=>`"${l}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return n.slots[r]}return n}function Me(t,e,n){let r=Jt(n,t.slot)||{},{ref:o,...i}=r,l=Je(a.useMemo(()=>ut(e,o),[e,o])),s=Y(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 Ql(t=!0){let[e,n]=a.useState(t),r=a.useRef(!1),o=a.useCallback(i=>{r.current=!0,n(!!i)},[]);return J(()=>{r.current||n(!1)},[]),[o,e]}function ef(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}function tf(t,e,n){let{render:r,...o}=e,i=a.useRef(null),l=a.useMemo(()=>ut(n,i),[n,i]);J(()=>{process.env.NODE_ENV!=="production"&&r&&(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,r]);let s={...o,ref:l};return r?r(s,void 0):a.createElement(t,s)}const ii={},pe=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=ii[e];return n||(n=a.forwardRef(tf.bind(null,e)),ii[e]=n),n}});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 Mn=a.createContext(!1);function nf(t){if(a.useContext(Mn))return a.createElement(a.Fragment,null,t.children);let n=a.createElement(Mn.Provider,{value:!0},t.children);return a.createElement("template",null,n)}function rf(t){let e=(n,r)=>a.useContext(Mn)?null:t(n,r);return e.displayName=t.displayName||t.name,a.forwardRef(e)}function es(){return a.useContext(Mn)}const of=a.createContext({});function lf(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=t;e=he(e);let l=he(),s={};n?(r=r?`${l} ${r}`:l,s={id:l,htmlFor:i==="label"?e:void 0}):!r&&!o&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=Dl({id:e,"aria-label":o,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}const sf=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),af=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function cf(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return sf.has(n.script)}let e=t.split("-")[0];return af.has(e)}const ts=Symbol.for("react-aria.i18n.locale");function ns(){let t=typeof window<"u"&&window[ts]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:cf(t)?"rtl":"ltr"}}let Lr=ns(),Kt=new Set;function li(){Lr=ns();for(let t of Kt)t(Lr)}function uf(){let t=Ze(),[e,n]=a.useState(Lr);return a.useEffect(()=>(Kt.size===0&&window.addEventListener("languagechange",li),Kt.add(n),()=>{Kt.delete(n),Kt.size===0&&window.removeEventListener("languagechange",li)}),[]),t?{locale:typeof window<"u"&&window[ts]||"en-US",direction:"ltr"}:e}const df=a.createContext(null);function dt(){let t=uf();return a.useContext(df)||t}let pr=new Map,Kr=!1;try{Kr=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Rn=!1;try{Rn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const rs={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class ff{constructor(e,n={}){this.numberFormatter=hf(e,n),this.options=n}format(e){var r;let n="";if(!Kr&&this.options.signDisplay!=null?n=pf(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!Rn){let{unit:o,unitDisplay:i="short",locale:l}=this.resolvedOptions();if(!o)return n;let s=(r=rs[o])==null?void 0:r[i];n+=s[l]||s.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),o=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Kr&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Rn&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}}function hf(t,e={}){var i;let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!Rn){let{unit:l,unitDisplay:s="short"}=e;if(!l)throw new Error('unit option must be provided with style: "unit"');if(!((i=rs[l])!=null&&i[s]))throw new Error(`Unsupported unit ${l} with unitDisplay = ${s}`);e={...e,style:"decimal"}}let r=t+(e?Object.entries(e).sort((l,s)=>l[0]<s[0]?-1:1).join():"");if(pr.has(r))return pr.get(r);let o=new Intl.NumberFormat(t,e);return pr.set(r,o),o}function pf(t,e,n){if(e==="auto")return t.format(n);if(e==="never")return t.format(Math.abs(n));{let r=!1;if(e==="always"?r=n>0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let o=t.format(-n),i=t.format(n),l=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...l].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(l,"+").replace("!!!",i)}else return t.format(n)}}function bf(t={}){let{locale:e}=dt();return a.useMemo(()=>new ff(e,t),[e,t])}function Dn(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}function mf(t){let{value:e=0,minValue:n=0,maxValue:r=100,valueLabel:o,isIndeterminate:i,formatOptions:l={style:"percent"}}=t,s=ae(t,{labelable:!0}),{labelProps:c,fieldProps:u}=lf({...t,labelElementType:"span"});e=Dn(e,n,r);let d=(e-n)/(r-n),f=bf(l);if(!i&&!o){let b=l.style==="percent"?d:e;o=f.format(b)}return{progressBarProps:Y(s,{...u,"aria-valuenow":i?void 0:e,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":i?void 0:o,role:"progressbar"}),labelProps:c}}function gf(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const os=a.createContext(null),yf=a.forwardRef(function(e,n){[e,n]=Me(e,n,os);let{value:r=0,minValue:o=0,maxValue:i=100,isIndeterminate:l=!1}=e;r=gf(r,o,i);let[s,c]=Ql(!e["aria-label"]&&!e["aria-labelledby"]),{progressBarProps:u,labelProps:d}=mf({...e,label:c}),f=l?void 0:(r-o)/(i-o)*100,b=Te({...e,defaultClassName:"react-aria-ProgressBar",values:{percentage:f,valueText:u["aria-valuetext"],isIndeterminate:l}}),p=ae(e,{global:!0});return a.createElement(pe.div,{...Y(p,b,u),ref:n,slot:e.slot||void 0},a.createElement(of.Provider,{value:{...d,ref:s,elementType:"span"}},b.children))}),is=7e3;let De=null;function si(t,e="assertive",n=is){De?De.announce(t,e,n):(De=new vf,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?De.announce(t,e,n):setTimeout(()=>{De!=null&&De.isAttached()&&(De==null||De.announce(t,e,n))},100))}class vf{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(){var e;return(e=this.node)==null?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",r=is){var i,l;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,n==="assertive"?(i=this.assertiveLog)==null||i.appendChild(o):(l=this.politeLog)==null||l.appendChild(o),e!==""&&setTimeout(()=>{o.remove()},r)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function mo(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function ls(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function ss(t){let e=a.useRef({isFocused:!1,observer:null});return J(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),a.useCallback(n=>{let r=F(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){e.current.isFocused=!0;let o=r,i=l=>{if(e.current.isFocused=!1,o.disabled){let s=mo(l);t==null||t(s)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{var l;if(e.current.isFocused&&o.disabled){(l=e.current.observer)==null||l.disconnect();let s=o===ne()?null:ne();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let Nn=!1;function ai(t){for(;t&&!fo(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=fe(t),n=e.document.activeElement;if(!n||n===t)return;Nn=!0;let r=!1,o=d=>{(F(d)===n||r)&&d.stopImmediatePropagation()},i=d=>{(F(d)===n||r)&&(d.stopImmediatePropagation(),!t&&!r&&(r=!0,de(n),c()))},l=d=>{(F(d)===t||r)&&d.stopImmediatePropagation()},s=d=>{(F(d)===t||r)&&(d.stopImmediatePropagation(),r||(r=!0,de(n),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),Nn=!1,r=!1},u=requestAnimationFrame(c);return c}let Be=null;const Vt=new Set;let jt=new Map,at=!1,Ar=!1;const xf={Tab:!0,Escape:!0};function Gn(t,e){for(let n of Vt)n(t,e)}function $f(t){return!(t.metaKey||!it()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function In(t){at=!0,!_e.isOpening&&$f(t)&&(Be="keyboard",Gn("keyboard",t))}function Ce(t){Be="pointer","pointerType"in t&&t.pointerType,(t.type==="mousedown"||t.type==="pointerdown")&&(at=!0,Gn("pointer",t))}function as(t){!_e.isOpening&&Tr(t)&&(at=!0,Be="virtual")}function cs(t){let e=fe(F(t)),n=Q(F(t));F(t)===e||F(t)===n||Nn||!t.isTrusted||(!at&&!Ar&&(Be="virtual",Gn("virtual",t)),at=!1,Ar=!1)}function us(){Nn||(at=!1,Ar=!0)}function Ln(t){if(typeof window>"u"||typeof document>"u")return;const e=fe(t),n=Q(t);if(jt.get(e))return;let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){at=!0,r.apply(this,arguments)},n.addEventListener("keydown",In,!0),n.addEventListener("keyup",In,!0),n.addEventListener("click",as,!0),e.addEventListener("focus",cs,!0),e.addEventListener("blur",us,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ce,!0),n.addEventListener("pointermove",Ce,!0),n.addEventListener("pointerup",Ce,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Ce,!0),n.addEventListener("mousemove",Ce,!0),n.addEventListener("mouseup",Ce,!0)),e.addEventListener("beforeunload",()=>{ds(t)},{once:!0}),jt.set(e,{focus:r})}const ds=(t,e)=>{const n=fe(t),r=Q(t);e&&r.removeEventListener("DOMContentLoaded",e),jt.has(n)&&(n.HTMLElement.prototype.focus=jt.get(n).focus,r.removeEventListener("keydown",In,!0),r.removeEventListener("keyup",In,!0),r.removeEventListener("click",as,!0),n.removeEventListener("focus",cs,!0),n.removeEventListener("blur",us,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ce,!0),r.removeEventListener("pointermove",Ce,!0),r.removeEventListener("pointerup",Ce,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Ce,!0),r.removeEventListener("mousemove",Ce,!0),r.removeEventListener("mouseup",Ce,!0)),jt.delete(n))};function wf(t){const e=Q(t);let n;return e.readyState!=="loading"?Ln(t):(n=()=>{Ln(t)},e.addEventListener("DOMContentLoaded",n)),()=>ds(t,n)}typeof document<"u"&&wf();function zt(){return Be!=="pointer"}function Ht(){return Be}function Or(t){Be=t,Gn(t,null)}function Ef(){Ln();let[t,e]=a.useState(Be);return a.useEffect(()=>{let n=()=>{e(Be)};return Vt.add(n),()=>{Vt.delete(n)}},[]),Ze()?null:t}const Cf=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Sf(t,e,n){let r=n?F(n):void 0,o=Q(r),i=fe(r);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=ne(o);return t=t||d instanceof l&&!Cf.has(d.type)||d instanceof s||d instanceof c&&d.isContentEditable,!(t&&e==="keyboard"&&n instanceof u&&!xf[n.key])}function Pf(t,e,n){Ln(),a.useEffect(()=>{if((n==null?void 0:n.enabled)===!1)return;let r=(o,i)=>{Sf(!!(n!=null&&n.isTextInput),o,i)&&t(zt())};return Vt.add(r),()=>{Vt.delete(r)}},e)}function Ye(t){if(!t.isConnected)return;const e=Q(t);if(Ht()==="virtual"){let n=ne(e);Rl(()=>{const r=ne(e);(r===n||r===e.body)&&t.isConnected&&de(t)})}else de(t)}function fs(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:o}=t;const i=a.useCallback(c=>{if(F(c)===c.currentTarget)return r&&r(c),o&&o(!1),!0},[r,o]),l=ss(i),s=a.useCallback(c=>{let u=F(c);const d=Q(u),f=d?ne(d):ne();u===c.currentTarget&&u===f&&(n&&n(c),o&&o(!0),l(c))},[o,n,l]);return{focusProps:{onFocus:!e&&(n||o||r)?s:void 0,onBlur:!e&&(r||o)?i:void 0}}}function ci(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e&&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."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function hs(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:ci(t.onKeyDown),onKeyUp:ci(t.onKeyUp)}}}let Fr=a.createContext(null);function kf(t){let e=a.useContext(Fr)||{};so(e,t);let{ref:n,...r}=e;return r}function Qt(t,e){let{focusProps:n}=fs(t),{keyboardProps:r}=hs(t),o=Y(n,r),i=kf(e),l=t.isDisabled?{}:i,s=a.useRef(t.autoFocus);a.useEffect(()=>{s.current&&e.current&&Ye(e.current),s.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:Y({...o,tabIndex:c},l)}}let gt="default",jr="",$n=new WeakMap;function ui(t){if(lt()){if(gt==="default"){const e=Q(t);jr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}gt="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";$n.set(t,t.style[e]),t.style[e]="none"}}function br(t){if(lt()){if(gt!=="disabled")return;gt="restoring",setTimeout(()=>{Rl(()=>{if(gt==="restoring"){const e=Q(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=jr||""),jr="",gt="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&$n.has(t)){let e=$n.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),$n.delete(t)}}const Ut=a.createContext({register:()=>{}});Ut.displayName="PressResponderContext";function Tf(t){let e=a.useContext(Ut);if(e){let{register:n,ref:r,...o}=e;t=Y(o,t),n()}return so(e,t.ref),t}var xt;class un{constructor(e,n,r,o){Uo(this,xt);lr(this,xt,!0);let i=(o==null?void 0:o.target)??r.currentTarget;const l=i==null?void 0:i.getBoundingClientRect();let s,c=0,u,d=null;r.clientX!=null&&r.clientY!=null&&(u=r.clientX,d=r.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=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=c,this.key=r.key}continuePropagation(){lr(this,xt,!1)}get shouldStopPropagation(){return Ho(this,xt)}}xt=new WeakMap;const di=Symbol("linkClicked"),fi="react-aria-pressable-style",hi="data-react-aria-pressable";function Xe(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:l,isDisabled:s,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:b,...p}=Tf(t),[g,y]=a.useState(!1),v=a.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:w,removeAllGlobalListeners:x}=Wn(),P=a.useCallback((m,E)=>{let I=v.current;if(s||I.didFirePressStart)return!1;let C=!0;if(I.isTriggeringEvent=!0,r){let D=new un("pressstart",E,m);r(D),C=D.shouldStopPropagation}return n&&n(!0),I.isTriggeringEvent=!1,I.didFirePressStart=!0,y(!0),C},[s,r,n]),T=a.useCallback((m,E,I=!0)=>{let C=v.current;if(!C.didFirePressStart)return!1;C.didFirePressStart=!1,C.isTriggeringEvent=!0;let D=!0;if(o){let $=new un("pressend",E,m);o($),D=$.shouldStopPropagation}if(n&&n(!1),y(!1),e&&I&&!s){let $=new un("press",E,m);e($),D&&(D=$.shouldStopPropagation)}return C.isTriggeringEvent=!1,D},[s,o,n,e]),R=Pe(T),K=a.useCallback((m,E)=>{let I=v.current;if(s)return!1;if(i){I.isTriggeringEvent=!0;let C=new un("pressup",E,m);return i(C),I.isTriggeringEvent=!1,C.shouldStopPropagation}return!0},[s,i]),M=Pe(K),N=a.useCallback(m=>{let E=v.current;if(E.isPressed&&E.target){E.didFirePressStart&&E.pointerType!=null&&T(nt(E.target,m),E.pointerType,!1),E.isPressed=!1,E.isOverTarget=!1,E.activePointerId=null,E.pointerType=null,x(),f||br(E.target);for(let I of E.disposables)I();E.disposables=[]}},[f,x,T]),O=Pe(N);a.useEffect(()=>{s&&v.current.isPressed&&O({currentTarget:v.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[s]);let k=a.useCallback(m=>{d&&N(m)},[d,N]),A=a.useCallback(m=>{s||l==null||l(m)},[s,l]),V=a.useCallback((m,E)=>{if(!s&&l){let I=new MouseEvent("click",m);ls(I,E),l(mo(I))}},[s,l]),j=a.useMemo(()=>{let m=v.current,E={onKeyDown(C){var D;if(mr(C.nativeEvent,C.currentTarget)&&H(C.currentTarget,F(C))){mi(F(C),C.key)&&C.preventDefault();let $=!0;!m.isPressed&&!C.repeat&&(m.target=C.currentTarget,m.isPressed=!0,m.pointerType="keyboard",$=P(C,"keyboard"));let S=C.currentTarget,L=U=>{mr(U,S)&&!U.repeat&&H(S,F(U))&&m.target&&M(nt(m.target,U),"keyboard")};w(Q(C.currentTarget),"keyup",Zt(L,I),!0),$&&C.stopPropagation(),C.metaKey&&it()&&((D=m.metaKeyEvents)==null||D.set(C.key,C.nativeEvent))}else C.key==="Meta"&&(m.metaKeyEvents=new Map)},onClick(C){if(!(C&&!H(C.currentTarget,F(C)))&&C&&C.button===0&&!m.isTriggeringEvent&&!_e.isOpening){let D=!0;if(s&&C.preventDefault(),!m.ignoreEmulatedMouseEvents&&!m.isPressed&&(m.pointerType==="virtual"||Tr(C.nativeEvent))){let $=P(C,"virtual"),S=M(C,"virtual"),L=R(C,"virtual");A(C),D=$&&S&&L}else if(m.isPressed&&m.pointerType!=="keyboard"){let $=m.pointerType||C.nativeEvent.pointerType||"virtual",S=M(nt(C.currentTarget,C),$),L=R(nt(C.currentTarget,C),$,!0);D=S&&L,m.isOverTarget=!1,A(C),O(C)}m.ignoreEmulatedMouseEvents=!1,D&&C.stopPropagation()}}},I=C=>{var D,$,S;if(m.isPressed&&m.target&&mr(C,m.target)){mi(F(C),C.key)&&C.preventDefault();let L=F(C),U=H(m.target,L);R(nt(m.target,C),"keyboard",U),U&&V(C,m.target),x(),C.key!=="Enter"&&go(m.target)&&H(m.target,L)&&!C[di]&&(C[di]=!0,_e(m.target,C,!1)),m.isPressed=!1,(D=m.metaKeyEvents)==null||D.delete(C.key)}else if(C.key==="Meta"&&(($=m.metaKeyEvents)!=null&&$.size)){let L=m.metaKeyEvents;m.metaKeyEvents=void 0;for(let U of L.values())(S=m.target)==null||S.dispatchEvent(new KeyboardEvent("keyup",U))}};if(typeof PointerEvent<"u"){E.onPointerDown=$=>{if($.button!==0||!H($.currentTarget,F($)))return;if(Ou($.nativeEvent)){m.pointerType="virtual";return}m.pointerType=$.pointerType;let S=!0;if(!m.isPressed){m.isPressed=!0,m.isOverTarget=!0,m.activePointerId=$.pointerId,m.target=$.currentTarget,f||ui(m.target),S=P($,m.pointerType);let L=F($);"releasePointerCapture"in L&&("hasPointerCapture"in L?L.hasPointerCapture($.pointerId)&&L.releasePointerCapture($.pointerId):L.releasePointerCapture($.pointerId)),w(Q($.currentTarget),"pointerup",C,!1),w(Q($.currentTarget),"pointercancel",D,!1)}S&&$.stopPropagation()},E.onMouseDown=$=>{if(H($.currentTarget,F($))&&$.button===0){if(u){let S=ai($.target);S&&m.disposables.push(S)}$.stopPropagation()}},E.onPointerUp=$=>{!H($.currentTarget,F($))||m.pointerType==="virtual"||$.button===0&&!m.isPressed&&M($,m.pointerType||$.pointerType)},E.onPointerEnter=$=>{$.pointerId===m.activePointerId&&m.target&&!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,P(nt(m.target,$),m.pointerType))},E.onPointerLeave=$=>{$.pointerId===m.activePointerId&&m.target&&m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,R(nt(m.target,$),m.pointerType,!1),k($))};let C=$=>{if($.pointerId===m.activePointerId&&m.isPressed&&$.button===0&&m.target){if(H(m.target,F($))&&m.pointerType!=null){let S=!1,L=setTimeout(()=>{m.isPressed&&m.target instanceof HTMLElement&&(S?O($):(de(m.target),m.target.click()))},80);w($.currentTarget,"click",()=>S=!0,!0),m.disposables.push(()=>clearTimeout(L))}else O($);m.isOverTarget=!1}},D=$=>{O($)};E.onDragStart=$=>{H($.currentTarget,F($))&&O($)}}else if(process.env.NODE_ENV==="test"){E.onMouseDown=$=>{if($.button!==0||!H($.currentTarget,F($)))return;if(m.ignoreEmulatedMouseEvents){$.stopPropagation();return}if(m.isPressed=!0,m.isOverTarget=!0,m.target=$.currentTarget,m.pointerType=Tr($.nativeEvent)?"virtual":"mouse",Yt.flushSync(()=>P($,m.pointerType))&&$.stopPropagation(),u){let L=ai($.target);L&&m.disposables.push(L)}w(Q($.currentTarget),"mouseup",C,!1)},E.onMouseEnter=$=>{if(!H($.currentTarget,F($)))return;let S=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!0,S=P($,m.pointerType)),S&&$.stopPropagation()},E.onMouseLeave=$=>{if(!H($.currentTarget,F($)))return;let S=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!1,S=R($,m.pointerType,!1),k($)),S&&$.stopPropagation()},E.onMouseUp=$=>{H($.currentTarget,F($))&&!m.ignoreEmulatedMouseEvents&&$.button===0&&!m.isPressed&&M($,m.pointerType||"mouse")};let C=$=>{if($.button===0){if(m.ignoreEmulatedMouseEvents){m.ignoreEmulatedMouseEvents=!1;return}m.target&&H(m.target,F($))&&m.pointerType!=null||O($),m.isOverTarget=!1}};E.onTouchStart=$=>{if(!H($.currentTarget,F($)))return;let S=Mf($.nativeEvent);if(!S)return;m.activePointerId=S.identifier,m.ignoreEmulatedMouseEvents=!0,m.isOverTarget=!0,m.isPressed=!0,m.target=$.currentTarget,m.pointerType="touch",f||ui(m.target),P(Ue(m.target,$),m.pointerType)&&$.stopPropagation(),w(fe($.currentTarget),"scroll",D,!0)},E.onTouchMove=$=>{if(!H($.currentTarget,F($)))return;if(!m.isPressed){$.stopPropagation();return}let S=pi($.nativeEvent,m.activePointerId),L=!0;S&&bi(S,$.currentTarget)?!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,L=P(Ue(m.target,$),m.pointerType)):m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,L=R(Ue(m.target,$),m.pointerType,!1),k(Ue(m.target,$))),L&&$.stopPropagation()},E.onTouchEnd=$=>{if(!H($.currentTarget,F($)))return;if(!m.isPressed){$.stopPropagation();return}let S=pi($.nativeEvent,m.activePointerId),L=!0;S&&bi(S,$.currentTarget)&&m.pointerType!=null?(M(Ue(m.target,$),m.pointerType),L=R(Ue(m.target,$),m.pointerType),V($.nativeEvent,m.target)):m.isOverTarget&&m.pointerType!=null&&(L=R(Ue(m.target,$),m.pointerType,!1)),L&&$.stopPropagation(),m.isPressed=!1,m.activePointerId=null,m.isOverTarget=!1,m.ignoreEmulatedMouseEvents=!0,m.target&&!f&&br(m.target),x()},E.onTouchCancel=$=>{H($.currentTarget,F($))&&($.stopPropagation(),m.isPressed&&O(Ue(m.target,$)))};let D=$=>{m.isPressed&&H(F($),m.target)&&O({currentTarget:m.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};E.onDragStart=$=>{H($.currentTarget,F($))&&O($)}}return E},[w,s,u,x,f,k,P,A,V]);return a.useEffect(()=>{if(!b||process.env.NODE_ENV==="test")return;const m=Q(b.current);if(!m||!m.head||m.getElementById(fi))return;const E=m.createElement("style");E.id=fi;let I=Al(m);I&&(E.nonce=I),E.textContent=`
1
+ "use strict";var tu=Object.create;var Wo=Object.defineProperty;var nu=Object.getOwnPropertyDescriptor;var ru=Object.getOwnPropertyNames;var ou=Object.getPrototypeOf,iu=Object.prototype.hasOwnProperty;var qo=t=>{throw TypeError(t)};var lu=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ru(e))!iu.call(t,o)&&o!==n&&Wo(t,o,{get:()=>e[o],enumerable:!(r=nu(e,o))||r.enumerable});return t};var su=(t,e,n)=>(n=t!=null?tu(ou(t)):{},lu(e||!t||!t.__esModule?Wo(n,"default",{value:t,enumerable:!0}):n,t));var Yo=(t,e,n)=>e.has(t)||qo("Cannot "+n);var Xo=(t,e,n)=>(Yo(t,e,"read from private field"),n?n.call(t):e.get(t)),Zo=(t,e,n)=>e.has(t)?qo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),cr=(t,e,n,r)=>(Yo(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),h=require("react/jsx-runtime"),Yt=require("react-dom"),je={GREY:"#7A8090",RED:"#E7320D",ORANGE:"#FF850A",YELLOW:"#F5E429",GREEN:"#14CC76",LIGHT_BLUE:"#20B3E9",BLUE:"#1738DE",MAGENTA:"#D945B1"};function ot(t,e){const n=t.replace("#",""),r=parseInt(n.slice(0,2),16),o=parseInt(n.slice(2,4),16),i=parseInt(n.slice(4,6),16);return`rgba(${r}, ${o}, ${i}, ${e})`}function Un(t){const e=t.replace("#",""),n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16);return(.299*n+.587*r+.114*o)/255>.55?"#111111":"#ffffff"}const Pl={note:"GREY",info:"LIGHT_BLUE",tip:"GREEN",caution:"ORANGE",danger:"RED"};function kl(t){return je[Pl[t]]}const Sn={note:"Note",info:"Info",tip:"Tip",caution:"Caution",danger:"Danger"},au="react-aria-clear-focus",cu="react-aria-focus";function Gn(t){var n;if(typeof window>"u"||window.navigator==null)return!1;let e=(n=window.navigator.userAgentData)==null?void 0:n.brands;return Array.isArray(e)&&e.some(r=>t.test(r.brand))||t.test(window.navigator.userAgent)}function co(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)==null?void 0:e.platform)||window.navigator.platform):!1}function Ve(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const it=Ve(function(){return co(/^Mac/i)}),uu=Ve(function(){return co(/^iPhone/i)}),Tl=Ve(function(){return co(/^iPad/i)||it()&&navigator.maxTouchPoints>1}),lt=Ve(function(){return uu()||Tl()}),du=Ve(function(){return it()||lt()}),Ml=Ve(function(){return Gn(/AppleWebKit/i)&&!Rl()}),Rl=Ve(function(){return Gn(/Chrome/i)}),uo=Ve(function(){return Gn(/Android/i)}),fu=Ve(function(){return Gn(/Firefox/i)});function de(t){if(hu())t.focus({preventScroll:!0});else{let e=pu(t);t.focus(),bu(e)}}let on=null;function hu(){if(on==null){on=!1;try{document.createElement("div").focus({get preventScroll(){return on=!0,!0}})}catch{}}return on}function pu(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function bu(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}const mu=a.createContext({isNative:!0,open:vu,useHref:t=>t});function Xt(){return a.useContext(mu)}function gu(t,e){let n=t.getAttribute("target");return(!n||n==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function _e(t,e,n=!0){var c,u;let{metaKey:r,ctrlKey:o,altKey:i,shiftKey:l}=e;fu()&&((u=(c=window.event)==null?void 0:c.type)!=null&&u.startsWith("key"))&&t.target==="_blank"&&(it()?r=!0:o=!0);let s=Ml()&&it()&&!Tl()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:o,altKey:i,shiftKey:l}):new MouseEvent("click",{metaKey:r,ctrlKey:o,altKey:i,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});_e.isOpening=n,de(t),t.dispatchEvent(s),_e.isOpening=!1}_e.isOpening=!1;function yu(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function vu(t,e){yu(t,n=>_e(n,e))}function Dl(t){const n=Xt().useHref((t==null?void 0:t.href)??"");let r={};if(t)for(let o of["href","target","rel","download","ping","referrerPolicy"])o in t&&(r[o]=o==="href"?n:t[o]);return r}function Nl(t,e,n,r){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&gu(t.currentTarget,t)&&n&&(t.preventDefault(),e.open(t.currentTarget,t,n,r))}const J=typeof document<"u"?a.useLayoutEffect:()=>{},Pn={prefix:String(Math.round(Math.random()*1e10)),current:0},Il=a.createContext(Pn),xu=a.createContext(!1);let $u=!!(typeof window<"u"&&window.document&&window.document.createElement),ur=new WeakMap;function wu(t=!1){var r,o;let e=a.useContext(Il),n=a.useRef(null);if(n.current===null&&!t){let i=(o=(r=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:r.ReactCurrentOwner)==null?void 0:o.current;if(i){let l=ur.get(i);l==null?ur.set(i,{id:e.current,state:i.memoizedState}):i.memoizedState!==l.state&&(e.current=l.id,ur.delete(i))}n.current=++e.current}return n.current}function Eu(t){let e=a.useContext(Il);e===Pn&&!$u&&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 n=wu(!!t),r=e===Pn&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function Cu(t){let e=a.useId(),[n]=a.useState(Ze()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Pn.prefix}`;return t||`${r}-${e}`}const Su=typeof a.useId=="function"?Cu:Eu;function Pu(){return!1}function ku(){return!0}function Tu(t){return()=>{}}function Ze(){return typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore(Tu,Pu,ku):a.useContext(xu)}function Mu(t){let[e,n]=a.useState(t),r=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}r.current===s.value?i.current():n(s.value)});J(()=>{r.current=e,o.current&&i.current()});let l=a.useCallback(s=>{o.current=s(r.current),i.current()},[i]);return[e,l]}let Ru=!!(typeof window<"u"&&window.document&&window.document.createElement),yt=new Map,Nt;typeof FinalizationRegistry<"u"&&(Nt=new FinalizationRegistry(t=>{yt.delete(t)}));function he(t){let[e,n]=a.useState(t),r=a.useRef(null),o=Su(e),i=a.useRef(null);if(Nt&&Nt.register(i,o),Ru){const l=yt.get(o);l&&!l.includes(r)?l.push(r):yt.set(o,[r])}return J(()=>{let l=o;return()=>{Nt&&Nt.unregister(i),yt.delete(l)}},[o]),a.useEffect(()=>{let l=r.current;return l&&n(l),()=>{l&&(r.current=null)}}),o}function Du(t,e){if(t===e)return t;let n=yt.get(t);if(n)return n.forEach(o=>o.current=e),e;let r=yt.get(e);return r?(r.forEach(o=>o.current=t),t):e}function vn(t=[]){let e=he(),[n,r]=Mu(e),o=a.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return J(o,[e,o,...t]),n}function Zt(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Q=t=>(t==null?void 0:t.ownerDocument)??document,fe=t=>t&&"window"in t&&t.window===t?t:Q(t).defaultView||window;function Nu(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function Iu(t){return Nu(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let Lu=!1;function Ae(){return Lu}function H(t,e){if(!Ae())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let n=e;for(;n!==null;){if(n===t)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Iu(n)?n=n.host:n=n.parentNode}return!1}const ne=(t=document)=>{var n;if(!Ae())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&((n=e.shadowRoot)!=null&&n.activeElement);)e=e.shadowRoot.activeElement;return e};function F(t){if(Ae()&&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 $t(t){if(!t)return!1;let e=t.getRootNode(),n=fe(t);if(!(e instanceof n.Document||e instanceof n.ShadowRoot))return!1;let r=e.activeElement;return r!=null&&t.contains(r)}class Ku{constructor(e,n,r,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{var s;if(l.nodeType===Node.ELEMENT_NODE){const c=l.shadowRoot;if(c){const u=this._doc.createTreeWalker(c,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(l);if((s=this.filter)!=null&&s.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=o??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const i=n.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(!H(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=e,o=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=r,s=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=o,this._currentSetFor.add(s),r=o=l.host}else r=r.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return H(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){var n;const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(e):(n=this.filter)!=null&&n.acceptNode&&(o=this.filter.acceptNode(e)),o===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let i=this.nextNode();return i&&(this.currentNode=i),i}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(){var r;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 o=this.previousNode();return o&&(this.currentNode=o),o}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){let i;if(typeof this.filter=="function"?i=this.filter(n):(r=this.filter)!=null&&r.acceptNode&&(i=this.filter.acceptNode(n)),i===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let l=this.lastChild();return l&&(this.currentNode=l),l}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let o=this.previousNode();return o&&(this.currentNode=o),o}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function Ll(t,e,n,r){return Ae()?new Ku(t,e,n,r):t.createTreeWalker(e,n,r)}function ut(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(o=>{const i=Jo(o,e);return n||(n=typeof i=="function"),i});if(n)return()=>{r.forEach((o,i)=>{typeof o=="function"?o():Jo(t[i],null)})}}}function Jo(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Kl(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Kl(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Au(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Kl(t))&&(r&&(r+=" "),r+=e);return r}function Y(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let o in r){let i=e[o],l=r[o];typeof i=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=Zt(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=Au(i,l):o==="id"&&i&&l?e.id=Du(i,l):o==="ref"&&i&&l?e.ref=ut(i,l):e[o]=l!==void 0?l:i}}return e}const Ou=new Set(["id"]),Fu=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),ju=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),_u=new Set(["dir","lang","hidden","inert","translate"]),Qo=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"]),Bu=/^(data-.*)$/;function ae(t,e={}){let{labelable:n,isLink:r,global:o,events:i=o,propNames:l}=e,s={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(Ou.has(c)||n&&Fu.has(c)||r&&ju.has(c)||o&&_u.has(c)||i&&(Qo.has(c)||c.endsWith("Capture")&&Qo.has(c.slice(0,-7)))||l!=null&&l.has(c)||Bu.test(c))&&(s[c]=t[c]);return s}let Ge=new Map,Rr=new Set;function ei(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{let o=F(r);if(!t(r)||!o)return;let i=Ge.get(o);i||(i=new Set,Ge.set(o,i),o.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{let o=F(r);if(!t(r)||!o)return;let i=Ge.get(o);if(i&&(i.delete(r.propertyName),i.size===0&&(o.removeEventListener("transitioncancel",n),Ge.delete(o)),Ge.size===0)){for(let l of Rr)l();Rr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?ei():document.addEventListener("DOMContentLoaded",ei));function Vu(){for(const[t]of Ge)"isConnected"in t&&!t.isConnected&&Ge.delete(t)}function Al(t){requestAnimationFrame(()=>{Vu(),Ge.size===0?t():Rr.add(t)})}function Wn(){let t=a.useRef(new Map),e=a.useCallback((o,i,l,s)=>{let c=s!=null&&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)},[]),n=a.useCallback((o,i,l,s)=>{var u;let c=((u=t.current.get(l))==null?void 0:u.fn)||l;o.removeEventListener(i,c,s),t.current.delete(l)},[]),r=a.useCallback(()=>{t.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return a.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function Ol(t,e){let{id:n,"aria-label":r,"aria-labelledby":o}=t;return n=he(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":o}}function Je(t){const e=a.useRef(null),n=a.useRef(void 0),r=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,n.current&&(n.current(),n.current=void 0),o!=null&&(n.current=r(o))}}),[r])}const zu=a.useInsertionEffect??J;function Pe(t){const e=a.useRef(null);return zu(()=>{e.current=t},[t]),a.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function ti(t,e){const n=a.useRef(!0),r=a.useRef(null);J(()=>(n.current=!0,()=>{n.current=!1}),[]),J(()=>{n.current?n.current=!1:(!r.current||e.some((o,i)=>!Object.is(o,r[i])))&&t(),r.current=e},e)}function Hu(){return typeof window.ResizeObserver<"u"}function kn(t){const{ref:e,box:n,onResize:r}=t;let o=Pe(r);a.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Hu()){const l=new window.ResizeObserver(s=>{s.length&&o()});return l.observe(i,{box:n}),()=>{i&&l.unobserve(i)}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1)}},[e,n])}function fo(t,e){J(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function st(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return t===r&&n.overflow!=="hidden"&&(o=!0),o&&e&&(o=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),o}function Fl(t,e){let n=t;for(st(n,e)&&(n=n.parentElement);n&&!st(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function dr(t,e){let n=[],r=document.scrollingElement||document.documentElement;for(;t&&(st(t,e)&&n.push(t),t!==r);)t=t.parentElement;return n}function bt(t){return it()?t.metaKey:t.ctrlKey}const Uu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ft(t){return t instanceof HTMLInputElement&&!Uu.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}let ve=typeof document<"u"&&window.visualViewport;function Gu(){let t=Ze(),[e,n]=a.useState(()=>t?{width:0,height:0}:fr());return a.useEffect(()=>{let r=s=>{n(c=>s.width===c.width&&s.height===c.height?c:s)},o=()=>{ve&&ve.scale>1||r(fr())},i,l=s=>{ve&&ve.scale>1||Ft(F(s))&&(i=requestAnimationFrame(()=>{let c=ne();(!c||!Ft(c))&&r({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return r(fr()),lt()&&window.addEventListener("blur",l,!0),ve?ve.addEventListener("resize",o):window.addEventListener("resize",o),()=>{cancelAnimationFrame(i),lt()&&window.removeEventListener("blur",l,!0),ve?ve.removeEventListener("resize",o):window.removeEventListener("resize",o)}},[]),e}function fr(){return{width:ve?Math.min(ve.width*ve.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:ve?ve.height*ve.scale:document.documentElement.clientHeight}}let Wu=0;const hr=new Map;function qu(t){let[e,n]=a.useState();return J(()=>{if(!t)return;let r=hr.get(t);if(r)n(r.element.id);else{let o=`react-aria-description-${Wu++}`;n(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),r={refCount:0,element:i},hr.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),hr.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function It(t,e,n,r){let o=Pe(n),i=n==null;a.useEffect(()=>{if(i||!t.current)return;let l=t.current;return l.addEventListener(e,o,r),()=>{l.removeEventListener(e,o,r)}},[t,e,r,i])}function xn(t,e,n={}){let{block:r="nearest",inline:o="nearest"}=n;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,b=t===f,p=t===f?0:c.top,g=t===f?t.clientHeight:c.bottom,v=t===f?0:c.left,y=t===f?t.clientWidth:c.right,w=parseFloat(u.scrollMarginTop)||0,x=parseFloat(u.scrollMarginBottom)||0,S=parseFloat(u.scrollMarginLeft)||0,T=parseFloat(u.scrollMarginRight)||0,M=parseFloat(d.scrollPaddingTop)||0,L=parseFloat(d.scrollPaddingBottom)||0,R=parseFloat(d.scrollPaddingLeft)||0,N=parseFloat(d.scrollPaddingRight)||0,O=parseFloat(d.borderTopWidth)||0,k=parseFloat(d.borderBottomWidth)||0,A=parseFloat(d.borderLeftWidth)||0,V=parseFloat(d.borderRightWidth)||0,j=s.top-w,m=s.bottom+x,E=s.left-S,I=s.right+T,C=t===f?0:A+V,D=t===f?0:O+k,$=t===f?0:t.offsetWidth-t.clientWidth-C,P=t===f?0:t.offsetHeight-t.clientHeight-D,K=p+(b?0:O)+M,U=g-(b?0:k)-L-P,G=v+(b?0:A)+R,W=y-(b?0:V)-N;d.direction==="rtl"&&!lt()?G+=$:W-=$;let ee=j<K||m>U,le=E<G||I>W;if(ee&&r==="start")i+=j-K;else if(ee&&r==="center")i+=(j+m)/2-(K+U)/2;else if(ee&&r==="end")i+=m-U;else if(ee&&r==="nearest"){let Z=j-K,be=m-U;i+=Math.abs(Z)<=Math.abs(be)?Z:be}if(le&&o==="start")l+=E-G;else if(le&&o==="center")l+=(E+I)/2-(G+W)/2;else if(le&&o==="end")l+=I-W;else if(le&&o==="nearest"){let Z=E-G,be=I-W;l+=Math.abs(Z)<=Math.abs(be)?Z:be}if(process.env.NODE_ENV==="test"){t.scrollLeft=l,t.scrollTop=i;return}t.scrollTo({left:l,top:i})}function ni(t,e={}){var r,o,i;let{containingElement:n}=e;if(t&&t.isConnected){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let{left:c,top:u}=t.getBoundingClientRect(),d=dr(t,!0);for(let p of d)xn(p,t);let{left:f,top:b}=t.getBoundingClientRect();if(Math.abs(c-f)>1||Math.abs(u-b)>1){d=n?dr(n,!0):[];for(let p of d)xn(p,n,{block:"center",inline:"center"});for(let p of dr(t,!0))xn(p,t)}}else{let{left:c,top:u}=t.getBoundingClientRect();(r=t==null?void 0:t.scrollIntoView)==null||r.call(t,{block:"nearest"});let{left:d,top:f}=t.getBoundingClientRect();(Math.abs(c-d)>1||Math.abs(u-f)>1)&&((o=n==null?void 0:n.scrollIntoView)==null||o.call(n,{block:"center",inline:"center"}),(i=t.scrollIntoView)==null||i.call(t,{block:"nearest"}))}}}function Dr(t){return t.pointerType===""&&t.isTrusted?!0:uo()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Yu(t){return!uo()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function Xu(t,e,n){let r=Pe(o=>{n&&!o.defaultPrevented&&n(e)});a.useEffect(()=>{var i;let o=(i=t==null?void 0:t.current)==null?void 0:i.form;return o==null||o.addEventListener("reset",r),()=>{o==null||o.removeEventListener("reset",r)}},[t])}function ho(t,e=!0){let[n,r]=a.useState(!0),o=n&&e;return J(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,o]),jl(t,o,a.useCallback(()=>r(!1),[])),o}function Nr(t,e){let[n,r]=a.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let o=n==="exiting";return jl(t,o,a.useCallback(()=>{r(i=>i==="exiting"?"closed":i)},[])),o}function jl(t,e,n){J(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let o=!1;return Promise.allSettled(r.map(i=>i.finished)).then(()=>{o||Yt.flushSync(()=>{n()})}),()=>{o=!0}}},[t,e,n])}const Zu=typeof Element<"u"&&"checkVisibility"in Element.prototype;function Ju(t){const e=fe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,o=n!=="none"&&r!=="hidden"&&r!=="collapse";if(o){const{getComputedStyle:i}=t.ownerDocument.defaultView;let{display:l,visibility:s}=i(t);o=l!=="none"&&s!=="hidden"&&s!=="collapse"}return o}function Qu(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 po(t,e){return Zu?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&Ju(t)&&Qu(t,e)&&(!t.parentElement||po(t.parentElement,t))}const bo=["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"],ed=bo.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";bo.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const td=bo.join(':not([hidden]):not([tabindex="-1"]),');function mo(t,e){return t.matches(ed)&&!Bl(t)&&((e==null?void 0:e.skipVisibilityCheck)||po(t))}function _l(t){return t.matches(td)&&po(t)&&!Bl(t)}function Bl(t){let e=t;for(;e!=null;){if(e instanceof e.ownerDocument.defaultView.HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function ri(t){let e=t==null?void 0:t.defaultView;return(e==null?void 0:e.__webpack_nonce__)||globalThis.__webpack_nonce__||void 0}let pr=new WeakMap;function Vl(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return ri(e);if(pr.has(e))return pr.get(e);let n=e.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof fe(n).HTMLMetaElement&&(n.nonce||n.content)||ri(e)||void 0;return r!==void 0&&pr.set(e,r),r}function nd(t,e,n){const{render:r,...o}=e,i=a.useRef(null),l=a.useMemo(()=>ut(n,i),[n,i]);J(()=>{var c;typeof process<"u"&&((c=process.env)==null?void 0:c.NODE_ENV)!=="production"&&r&&(i.current||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,r]);const s={...o,ref:l};return r?r(s,void 0):h.jsx(t,{...s})}const oi={},oe=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=oi[e];return n||(n=a.forwardRef(nd.bind(null,e)),oi[e]=n),n}});var rd=/\s+/g,od=t=>typeof t!="string"||!t?t:t.replace(rd," ").trim(),Bt=(...t)=>{const e=[],n=r=>{if(!r&&r!==0&&r!==0n)return;if(Array.isArray(r)){for(let i=0,l=r.length;i<l;i++)n(r[i]);return}const o=typeof r;if(o==="string"||o==="number"||o==="bigint"){if(o==="number"&&r!==r)return;e.push(String(r))}else if(o==="object"){const i=Object.keys(r);for(let l=0,s=i.length;l<s;l++){const c=i[l];r[c]&&e.push(c)}}};for(let r=0,o=t.length;r<o;r++){const i=t[r];i!=null&&n(i)}return e.length>0?od(e.join(" ")):void 0},ii=t=>t===!1?"false":t===!0?"true":t===0?"0":t,ge=t=>{if(!t||typeof t!="object")return!0;for(const e in t)return!1;return!0},id=(t,e)=>{if(t===e)return!0;if(!t||!e)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!r.includes(i)||t[i]!==e[i])return!1}return!0},ld=(t,e)=>{for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const r=e[n];n in t?t[n]=Bt(t[n],r):t[n]=r}return t},zl=(t,e)=>{for(let n=0;n<t.length;n++){const r=t[n];Array.isArray(r)?zl(r,e):r&&e.push(r)}},Hl=(...t)=>{const e=[];zl(t,e);const n=[];for(let r=0;r<e.length;r++)e[r]&&n.push(e[r]);return n},Ir=(t,e)=>{const n={};for(const r in t){const o=t[r];if(r in e){const i=e[r];Array.isArray(o)||Array.isArray(i)?n[r]=Hl(i,o):typeof o=="object"&&typeof i=="object"&&o&&i?n[r]=Ir(o,i):n[r]=i+" "+o}else n[r]=o}for(const r in e)r in t||(n[r]=e[r]);return n},sd={twMerge:!0,twMergeConfig:{}};function ad(){let t=null,e={},n=!1;return{get cachedTwMerge(){return t},set cachedTwMerge(r){t=r},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(r){e=r},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(r){n=r},reset(){t=null,e={},n=!1}}}var Ke=ad(),cd=t=>{const e=(r,o)=>{const{extend:i=null,slots:l={},variants:s={},compoundVariants:c=[],compoundSlots:u=[],defaultVariants:d={}}=r,f={...sd,...o},b=i!=null&&i.base?Bt(i.base,r==null?void 0:r.base):r==null?void 0:r.base,p=i!=null&&i.variants&&!ge(i.variants)?Ir(s,i.variants):s,g=i!=null&&i.defaultVariants&&!ge(i.defaultVariants)?{...i.defaultVariants,...d}:d;!ge(f.twMergeConfig)&&!id(f.twMergeConfig,Ke.cachedTwMergeConfig)&&(Ke.didTwMergeConfigChange=!0,Ke.cachedTwMergeConfig=f.twMergeConfig);const v=ge(i==null?void 0:i.slots),y=ge(l)?{}:{base:Bt(r==null?void 0:r.base,v&&(i==null?void 0:i.base)),...l},w=v?y:ld({...i==null?void 0:i.slots},ge(y)?{base:r==null?void 0:r.base}:y),x=ge(i==null?void 0:i.compoundVariants)?c:Hl(i==null?void 0:i.compoundVariants,c),S=M=>{if(ge(p)&&ge(l)&&v)return t(b,M==null?void 0:M.class,M==null?void 0:M.className)(f);if(x&&!Array.isArray(x))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof x}`);if(u&&!Array.isArray(u))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof u}`);const L=(m,E=p,I=null,C=null)=>{const D=E[m];if(!D||ge(D))return null;const $=(C==null?void 0:C[m])??(M==null?void 0:M[m]);if($===null)return null;const P=ii($);if(typeof P=="object")return null;const K=g==null?void 0:g[m],U=P??ii(K);return D[U||"false"]},R=()=>{if(!p)return null;const m=Object.keys(p),E=[];for(let I=0;I<m.length;I++){const C=L(m[I],p);C&&E.push(C)}return E},N=(m,E)=>{if(!p||typeof p!="object")return null;const I=[];for(const C in p){const D=L(C,p,m,E),$=m==="base"&&typeof D=="string"?D:D&&D[m];$&&I.push($)}return I},O={};for(const m in M){const E=M[m];E!==void 0&&(O[m]=E)}const k=(m,E)=>{var C;const I=typeof(M==null?void 0:M[m])=="object"?{[m]:(C=M[m])==null?void 0:C.initial}:{};return{...g,...O,...I,...E}},A=(m=[],E)=>{const I=[],C=m.length;for(let D=0;D<C;D++){const{class:$,className:P,...K}=m[D];let U=!0;const G=k(null,E);for(const W in K){const ee=K[W],le=G[W];if(Array.isArray(ee)){if(!ee.includes(le)){U=!1;break}}else{if((ee==null||ee===!1)&&(le==null||le===!1))continue;if(le!==ee){U=!1;break}}}U&&($&&I.push($),P&&I.push(P))}return I},V=m=>{const E=A(x,m);if(!Array.isArray(E))return E;const I={},C=t;for(let D=0;D<E.length;D++){const $=E[D];if(typeof $=="string")I.base=C(I.base,$)(f);else if(typeof $=="object")for(const P in $)I[P]=C(I[P],$[P])(f)}return I},j=m=>{if(u.length<1)return null;const E={},I=k(null,m);for(let C=0;C<u.length;C++){const{slots:D=[],class:$,className:P,...K}=u[C];if(!ge(K)){let U=!0;for(const G in K){const W=I[G],ee=K[G];if(W===void 0||(Array.isArray(ee)?!ee.includes(W):ee!==W)){U=!1;break}}if(!U)continue}for(let U=0;U<D.length;U++){const G=D[U];E[G]||(E[G]=[]),E[G].push([$,P])}}return E};if(!ge(l)||!v){const m={};if(typeof w=="object"&&!ge(w)){const E=t;for(const I in w)m[I]=C=>{const D=V(C),$=j(C);return E(w[I],N(I,C),D?D[I]:void 0,$?$[I]:void 0,C==null?void 0:C.class,C==null?void 0:C.className)(f)}}return m}return t(b,R(),A(x),M==null?void 0:M.class,M==null?void 0:M.className)(f)},T=()=>{if(!(!p||typeof p!="object"))return Object.keys(p)};return S.variantKeys=T(),S.extend=i,S.base=b,S.slots=w,S.variants=p,S.defaultVariants=g,S.compoundSlots=u,S.compoundVariants=x,S};return{tv:e,createTV:r=>(o,i)=>e(o,i?Ir(r,i):r)}};const ud=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},dd=(t,e)=>({classGroupId:t,validator:e}),Ul=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Tn="-",li=[],fd="arbitrary..",hd=t=>{const e=bd(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return pd(l);const s=l.split(Tn),c=s[0]===""&&s.length>1?1:0;return Gl(s,c,e)},getConflictingClassGroupIds:(l,s)=>{if(s){const c=r[l],u=n[l];return c?u?ud(u,c):c:u||li}return n[l]||li}}},Gl=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],i=n.nextPart.get(o);if(i){const u=Gl(t,e+1,i);if(u)return u}const l=n.validators;if(l===null)return;const s=e===0?t.join(Tn):t.slice(e).join(Tn),c=l.length;for(let u=0;u<c;u++){const d=l[u];if(d.validator(s))return d.classGroupId}},pd=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?fd+r:void 0})(),bd=t=>{const{theme:e,classGroups:n}=t;return md(n,e)},md=(t,e)=>{const n=Ul();for(const r in t){const o=t[r];go(o,n,r,e)}return n},go=(t,e,n,r)=>{const o=t.length;for(let i=0;i<o;i++){const l=t[i];gd(l,e,n,r)}},gd=(t,e,n,r)=>{if(typeof t=="string"){yd(t,e,n);return}if(typeof t=="function"){vd(t,e,n,r);return}xd(t,e,n,r)},yd=(t,e,n)=>{const r=t===""?e:Wl(e,t);r.classGroupId=n},vd=(t,e,n,r)=>{if($d(t)){go(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(dd(n,t))},xd=(t,e,n,r)=>{const o=Object.entries(t),i=o.length;for(let l=0;l<i;l++){const[s,c]=o[l];go(c,Wl(e,s),n,r)}},Wl=(t,e)=>{let n=t;const r=e.split(Tn),o=r.length;for(let i=0;i<o;i++){const l=r[i];let s=n.nextPart.get(l);s||(s=Ul(),n.nextPart.set(l,s)),n=s}return n},$d=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,wd=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const o=(i,l)=>{n[i]=l,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return o(i,l),l},set(i,l){i in n?n[i]=l:o(i,l)}}},Lr="!",si=":",Ed=[],ai=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Cd=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=o=>{const i=[];let l=0,s=0,c=0,u;const d=o.length;for(let v=0;v<d;v++){const y=o[v];if(l===0&&s===0){if(y===si){i.push(o.slice(c,v)),c=v+1;continue}if(y==="/"){u=v;continue}}y==="["?l++:y==="]"?l--:y==="("?s++:y===")"&&s--}const f=i.length===0?o:o.slice(c);let b=f,p=!1;f.endsWith(Lr)?(b=f.slice(0,-1),p=!0):f.startsWith(Lr)&&(b=f.slice(1),p=!0);const g=u&&u>c?u-c:void 0;return ai(i,p,b,g)};if(e){const o=e+si,i=r;r=l=>l.startsWith(o)?i(l.slice(o.length)):ai(Ed,!1,l,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Sd=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const l=n[i],s=l[0]==="[",c=e.has(l);s||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},Pd=t=>({cache:wd(t.cacheSize),parseClassName:Cd(t),sortModifiers:Sd(t),...hd(t)}),kd=/\s+/,Td=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=e,l=[],s=t.trim().split(kd);let c="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:f,modifiers:b,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:v}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let y=!!v,w=r(y?g.substring(0,v):g);if(!w){if(!y){c=d+(c.length>0?" "+c:c);continue}if(w=r(g),!w){c=d+(c.length>0?" "+c:c);continue}y=!1}const x=b.length===0?"":b.length===1?b[0]:i(b).join(":"),S=p?x+Lr:x,T=S+w;if(l.indexOf(T)>-1)continue;l.push(T);const M=o(w,y);for(let L=0;L<M.length;++L){const R=M[L];l.push(S+R)}c=d+(c.length>0?" "+c:c)}return c},Md=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=ql(n))&&(o&&(o+=" "),o+=r);return o},ql=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=ql(t[r]))&&(n&&(n+=" "),n+=e);return n},Kr=(t,...e)=>{let n,r,o,i;const l=c=>{const u=e.reduce((d,f)=>f(d),t());return n=Pd(u),r=n.cache.get,o=n.cache.set,i=s,s(c)},s=c=>{const u=r(c);if(u)return u;const d=Td(c,n);return o(c,d),d};return i=l,(...c)=>i(Md(...c))},Rd=[],ue=t=>{const e=n=>n[t]||Rd;return e.isThemeGetter=!0,e},Yl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Dd=/^\d+\/\d+$/,Nd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Id=/\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$/,Ld=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ad=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ft=t=>Dd.test(t),X=t=>!!t&&!Number.isNaN(Number(t)),He=t=>!!t&&Number.isInteger(Number(t)),br=t=>t.endsWith("%")&&X(t.slice(0,-1)),Le=t=>Nd.test(t),Od=()=>!0,Fd=t=>Id.test(t)&&!Ld.test(t),Zl=()=>!1,jd=t=>Kd.test(t),_d=t=>Ad.test(t),Bd=t=>!_(t)&&!B(t),Vd=t=>Et(t,es,Zl),_=t=>Yl.test(t),tt=t=>Et(t,ts,Fd),mr=t=>Et(t,Wd,X),ci=t=>Et(t,Jl,Zl),zd=t=>Et(t,Ql,_d),ln=t=>Et(t,ns,jd),B=t=>Xl.test(t),Tt=t=>Ct(t,ts),Hd=t=>Ct(t,qd),ui=t=>Ct(t,Jl),Ud=t=>Ct(t,es),Gd=t=>Ct(t,Ql),sn=t=>Ct(t,ns,!0),Et=(t,e,n)=>{const r=Yl.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Ct=(t,e,n=!1)=>{const r=Xl.exec(t);return r?r[1]?e(r[1]):n:!1},Jl=t=>t==="position"||t==="percentage",Ql=t=>t==="image"||t==="url",es=t=>t==="length"||t==="size"||t==="bg-size",ts=t=>t==="length",Wd=t=>t==="number",qd=t=>t==="family-name",ns=t=>t==="shadow",Ar=()=>{const t=ue("color"),e=ue("font"),n=ue("text"),r=ue("font-weight"),o=ue("tracking"),i=ue("leading"),l=ue("breakpoint"),s=ue("container"),c=ue("spacing"),u=ue("radius"),d=ue("shadow"),f=ue("inset-shadow"),b=ue("text-shadow"),p=ue("drop-shadow"),g=ue("blur"),v=ue("perspective"),y=ue("aspect"),w=ue("ease"),x=ue("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...T(),B,_],L=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],N=()=>[B,_,c],O=()=>[ft,"full","auto",...N()],k=()=>[He,"none","subgrid",B,_],A=()=>["auto",{span:["full",He,B,_]},He,B,_],V=()=>[He,"auto",B,_],j=()=>["auto","min","max","fr",B,_],m=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],E=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...N()],C=()=>[ft,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],D=()=>[t,B,_],$=()=>[...T(),ui,ci,{position:[B,_]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",Ud,Vd,{size:[B,_]}],U=()=>[br,Tt,tt],G=()=>["","none","full",u,B,_],W=()=>["",X,Tt,tt],ee=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[X,br,ui,ci],be=()=>["","none",g,B,_],Ie=()=>["none",X,B,_],z=()=>["none",X,B,_],$e=()=>[X,B,_],me=()=>[ft,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Le],breakpoint:[Le],color:[Od],container:[Le],"drop-shadow":[Le],ease:["in","out","in-out"],font:[Bd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Le],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Le],shadow:[Le],spacing:["px",X],text:[Le],"text-shadow":[Le],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ft,_,B,y]}],container:["container"],columns:[{columns:[X,_,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:M()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[He,"auto",B,_]}],basis:[{basis:[ft,"full","auto",s,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,ft,"auto","initial","none",_]}],grow:[{grow:["",X,B,_]}],shrink:[{shrink:["",X,B,_]}],order:[{order:[He,"first","last","none",B,_]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...m(),"normal"]}],"justify-items":[{"justify-items":[...E(),"normal"]}],"justify-self":[{"justify-self":["auto",...E()]}],"align-content":[{content:["normal",...m()]}],"align-items":[{items:[...E(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...E(),{baseline:["","last"]}]}],"place-content":[{"place-content":m()}],"place-items":[{"place-items":[...E(),"baseline"]}],"place-self":[{"place-self":["auto",...E()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:C()}],w:[{w:[s,"screen",...C()]}],"min-w":[{"min-w":[s,"screen","none",...C()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...C()]}],h:[{h:["screen","lh",...C()]}],"min-h":[{"min-h":["screen","lh","none",...C()]}],"max-h":[{"max-h":["screen","lh",...C()]}],"font-size":[{text:["base",n,Tt,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,B,mr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",br,_]}],"font-family":[{font:[Hd,_,e]}],"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":[X,"none",B,mr]}],leading:[{leading:[i,...N()]}],"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:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",B,tt]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[X,"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:N()}],"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:$()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},He,B,_],radial:["",B,_],conic:[He,B,_]},Gd,zd]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,B,_]}],"outline-w":[{outline:["",X,Tt,tt]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,sn,ln]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",f,sn,ln]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[X,tt]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",b,sn,ln]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[X,B,_]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[B,_]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,_]}],filter:[{filter:["","none",B,_]}],blur:[{blur:be()}],brightness:[{brightness:[X,B,_]}],contrast:[{contrast:[X,B,_]}],"drop-shadow":[{"drop-shadow":["","none",p,sn,ln]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",X,B,_]}],"hue-rotate":[{"hue-rotate":[X,B,_]}],invert:[{invert:["",X,B,_]}],saturate:[{saturate:[X,B,_]}],sepia:[{sepia:["",X,B,_]}],"backdrop-filter":[{"backdrop-filter":["","none",B,_]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[X,B,_]}],"backdrop-contrast":[{"backdrop-contrast":[X,B,_]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,B,_]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,B,_]}],"backdrop-invert":[{"backdrop-invert":["",X,B,_]}],"backdrop-opacity":[{"backdrop-opacity":[X,B,_]}],"backdrop-saturate":[{"backdrop-saturate":[X,B,_]}],"backdrop-sepia":[{"backdrop-sepia":["",X,B,_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"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:[X,"initial",B,_]}],ease:[{ease:["linear","initial",w,B,_]}],delay:[{delay:[X,B,_]}],animate:[{animate:["none",x,B,_]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,B,_]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:z()}],"scale-x":[{"scale-x":z()}],"scale-y":[{"scale-y":z()}],"scale-z":[{"scale-z":z()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[B,_,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",...D()]}],"stroke-w":[{stroke:[X,Tt,tt,mr]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Yd=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(Lt(t,"cacheSize",e),Lt(t,"prefix",n),Lt(t,"experimentalParseClassName",r),an(t.theme,i.theme),an(t.classGroups,i.classGroups),an(t.conflictingClassGroups,i.conflictingClassGroups),an(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Lt(t,"orderSensitiveModifiers",i.orderSensitiveModifiers),cn(t.theme,o.theme),cn(t.classGroups,o.classGroups),cn(t.conflictingClassGroups,o.conflictingClassGroups),cn(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),rs(t,o,"orderSensitiveModifiers"),t),Lt=(t,e,n)=>{n!==void 0&&(t[e]=n)},an=(t,e)=>{if(e)for(const n in e)Lt(t,n,e[n])},cn=(t,e)=>{if(e)for(const n in e)rs(t,e,n)},rs=(t,e,n)=>{const r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},Xd=(t,...e)=>typeof t=="function"?Kr(Ar,t,...e):Kr(()=>Yd(Ar(),t),...e),Zd=Kr(Ar);var Jd=t=>ge(t)?Zd:Xd({...t,extend:{theme:t.theme,classGroups:t.classGroups,conflictingClassGroupModifiers:t.conflictingClassGroupModifiers,conflictingClassGroups:t.conflictingClassGroups,...t.extend}}),os=(t,e)=>{const n=Bt(t);return!n||!((e==null?void 0:e.twMerge)??!0)?n:((!Ke.cachedTwMerge||Ke.didTwMergeConfigChange)&&(Ke.didTwMergeConfigChange=!1,Ke.cachedTwMerge=Jd(Ke.cachedTwMergeConfig)),Ke.cachedTwMerge(n)||void 0)},q=(...t)=>os(t,{}),Qd=(...t)=>e=>os(t,e),{tv:xe}=cd(Qd);const ef=xe({defaultVariants:{status:"default"},slots:{base:"alert",content:"alert__content",description:"alert__description",indicator:"alert__indicator",title:"alert__title"},variants:{status:{accent:{base:"alert--accent"},danger:{base:"alert--danger"},default:{base:"alert--default"},success:{base:"alert--success"},warning:{base:"alert--warning"}}}}),qe=xe({base:"button",defaultVariants:{fullWidth:!1,isIconOnly:!1,size:"md",variant:"primary"},variants:{fullWidth:{false:"",true:"button--full-width"},isIconOnly:{true:"button--icon-only"},size:{lg:"button--lg",md:"button--md",sm:"button--sm"},variant:{danger:"button--danger","danger-soft":"button--danger-soft",ghost:"button--ghost",outline:"button--outline",primary:"button--primary",secondary:"button--secondary",tertiary:"button--tertiary"}}}),yo=xe({defaultVariants:{fullWidth:!1,orientation:"horizontal"},slots:{base:"button-group",separator:"button-group__separator"},variants:{fullWidth:{false:{},true:{base:"button-group--full-width"}},orientation:{horizontal:{base:"button-group--horizontal"},vertical:{base:"button-group--vertical"}}}}),tf=xe({defaultVariants:{variant:"default"},slots:{base:"card",content:"card__content",description:"card__description",footer:"card__footer",header:"card__header",title:"card__title"},variants:{variant:{default:{base:"card--default"},secondary:{base:"card--secondary"},tertiary:{base:"card--tertiary"},transparent:{base:"card--transparent"}}}}),nf=xe({defaultVariants:{variant:"primary"},slots:{base:"checkbox",content:"checkbox__content",control:"checkbox__control",indicator:"checkbox__indicator"},variants:{variant:{primary:{base:"checkbox--primary"},secondary:{base:"checkbox--secondary"}}}}),rf=xe({defaultVariants:{color:"default",variant:"secondary"},slots:{base:"chip",label:"chip__label"},variants:{color:{accent:{base:"chip--accent"},danger:{base:"chip--danger"},default:{base:"chip--default"},success:{base:"chip--success"},warning:{base:"chip--warning"}},size:{lg:{base:"chip--lg"},md:{base:"chip--md"},sm:{base:"chip--sm"}},variant:{primary:{base:"chip--primary"},secondary:{base:"chip--secondary"},soft:{base:"chip--soft"},tertiary:{base:"chip--tertiary"}}}}),of=xe({base:"close-button",defaultVariants:{variant:"default"},variants:{variant:{default:"close-button--default"}}}),lf=xe({slots:{menu:"dropdown__menu",popover:"dropdown__popover",root:"dropdown",trigger:"dropdown__trigger"}}),sf=xe({slots:{base:"link",icon:"link__icon"}}),af=xe({defaultVariants:{color:"accent",size:"md"},slots:{base:"progress-bar",fill:"progress-bar__fill",output:"progress-bar__output",track:"progress-bar__track"},variants:{color:{accent:{base:"progress-bar--accent"},danger:{base:"progress-bar--danger"},default:{base:"progress-bar--default"},success:{base:"progress-bar--success"},warning:{base:"progress-bar--warning"}},size:{lg:{base:"progress-bar--lg"},md:{base:"progress-bar--md"},sm:{base:"progress-bar--sm"}}}}),cf=xe({defaultVariants:{variant:"default"},slots:{indicator:"menu-item__indicator",item:"menu-item",submenuIndicator:"menu-item__indicator menu-item__indicator--submenu"},variants:{variant:{danger:{item:"menu-item--danger"},default:{item:"menu-item--default"}}}}),uf=xe({base:"menu-section"}),vo=xe({defaultVariants:{scroll:"inside",size:"md",variant:"opaque"},slots:{backdrop:"modal__backdrop",body:"modal__body",closeTrigger:"modal__close-trigger",container:"modal__container",dialog:"modal__dialog",footer:"modal__footer",header:"modal__header",heading:"modal__heading",icon:"modal__icon",trigger:"modal__trigger"},variants:{scroll:{inside:{body:"modal__body--scroll-inside",dialog:"modal__dialog--scroll-inside"},outside:{body:"modal__body--scroll-outside",container:"modal__container--scroll-outside",dialog:"modal__dialog--scroll-outside"}},size:{cover:{dialog:"modal__dialog--cover"},full:{container:"modal__container--full",dialog:"modal__dialog--full"},lg:{dialog:"modal__dialog--lg"},md:{dialog:"modal__dialog--md"},sm:{dialog:"modal__dialog--sm"},xs:{dialog:"modal__dialog--xs"}},variant:{blur:{backdrop:"modal__backdrop--blur"},opaque:{backdrop:"modal__backdrop--opaque"},transparent:{backdrop:"modal__backdrop--transparent"}}}}),df=xe({base:"separator",defaultVariants:{orientation:"horizontal",variant:"default"},variants:{orientation:{horizontal:"separator--horizontal",vertical:"separator--vertical"},variant:{default:"separator--default",secondary:"separator--secondary",tertiary:"separator--tertiary"}}}),Mn=Symbol("default");function ze({values:t,children:e}){for(let[n,r]of t)e=a.createElement(n.Provider,{value:r},e);return e}function Te(t){let{className:e,style:n,children:r,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 n=="function"?d=n({...s,defaultStyle:l||{}}):d=n,typeof r=="function"?f=r({...s,defaultChildren:i}):r==null?f=i:f=r,{className:u??o,style:d||l?{...l,...d}:void 0,children:f??i,"data-rac":"",render:c?b=>c(b,s):void 0}},[e,n,r,o,i,l,s,c])}function ff(t,e){return n=>e(typeof t=="function"?t(n):t,n)}function Jt(t,e){let n=a.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||Mn;if(!n.slots[r]){let o=new Intl.ListFormat().format(Object.keys(n.slots).map(l=>`"${l}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return n.slots[r]}return n}function Me(t,e,n){let r=Jt(n,t.slot)||{},{ref:o,...i}=r,l=Je(a.useMemo(()=>ut(e,o),[e,o])),s=Y(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 is(t=!0){let[e,n]=a.useState(t),r=a.useRef(!1),o=a.useCallback(i=>{r.current=!0,n(!!i)},[]);return J(()=>{r.current||n(!1)},[]),[o,e]}function hf(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}function pf(t,e,n){let{render:r,...o}=e,i=a.useRef(null),l=a.useMemo(()=>ut(n,i),[n,i]);J(()=>{process.env.NODE_ENV!=="production"&&r&&(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,r]);let s={...o,ref:l};return r?r(s,void 0):a.createElement(t,s)}const di={},pe=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=di[e];return n||(n=a.forwardRef(pf.bind(null,e)),di[e]=n),n}});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 Rn=a.createContext(!1);function bf(t){if(a.useContext(Rn))return a.createElement(a.Fragment,null,t.children);let n=a.createElement(Rn.Provider,{value:!0},t.children);return a.createElement("template",null,n)}function mf(t){let e=(n,r)=>a.useContext(Rn)?null:t(n,r);return e.displayName=t.displayName||t.name,a.forwardRef(e)}function ls(){return a.useContext(Rn)}const gf=a.createContext({});function yf(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=t;e=he(e);let l=he(),s={};n?(r=r?`${l} ${r}`:l,s={id:l,htmlFor:i==="label"?e:void 0}):!r&&!o&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=Ol({id:e,"aria-label":o,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}const vf=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),xf=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function $f(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return vf.has(n.script)}let e=t.split("-")[0];return xf.has(e)}const ss=Symbol.for("react-aria.i18n.locale");function as(){let t=typeof window<"u"&&window[ss]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:$f(t)?"rtl":"ltr"}}let Or=as(),Kt=new Set;function fi(){Or=as();for(let t of Kt)t(Or)}function wf(){let t=Ze(),[e,n]=a.useState(Or);return a.useEffect(()=>(Kt.size===0&&window.addEventListener("languagechange",fi),Kt.add(n),()=>{Kt.delete(n),Kt.size===0&&window.removeEventListener("languagechange",fi)}),[]),t?{locale:typeof window<"u"&&window[ss]||"en-US",direction:"ltr"}:e}const Ef=a.createContext(null);function dt(){let t=wf();return a.useContext(Ef)||t}let gr=new Map,Fr=!1;try{Fr=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Dn=!1;try{Dn=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const cs={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Cf{constructor(e,n={}){this.numberFormatter=Sf(e,n),this.options=n}format(e){var r;let n="";if(!Fr&&this.options.signDisplay!=null?n=Pf(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!Dn){let{unit:o,unitDisplay:i="short",locale:l}=this.resolvedOptions();if(!o)return n;let s=(r=cs[o])==null?void 0:r[i];n+=s[l]||s.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),o=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Fr&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Dn&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}}function Sf(t,e={}){var i;let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!Dn){let{unit:l,unitDisplay:s="short"}=e;if(!l)throw new Error('unit option must be provided with style: "unit"');if(!((i=cs[l])!=null&&i[s]))throw new Error(`Unsupported unit ${l} with unitDisplay = ${s}`);e={...e,style:"decimal"}}let r=t+(e?Object.entries(e).sort((l,s)=>l[0]<s[0]?-1:1).join():"");if(gr.has(r))return gr.get(r);let o=new Intl.NumberFormat(t,e);return gr.set(r,o),o}function Pf(t,e,n){if(e==="auto")return t.format(n);if(e==="never")return t.format(Math.abs(n));{let r=!1;if(e==="always"?r=n>0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let o=t.format(-n),i=t.format(n),l=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...l].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(l,"+").replace("!!!",i)}else return t.format(n)}}function kf(t={}){let{locale:e}=dt();return a.useMemo(()=>new Cf(e,t),[e,t])}function Nn(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}function Tf(t){let{value:e=0,minValue:n=0,maxValue:r=100,valueLabel:o,isIndeterminate:i,formatOptions:l={style:"percent"}}=t,s=ae(t,{labelable:!0}),{labelProps:c,fieldProps:u}=yf({...t,labelElementType:"span"});e=Nn(e,n,r);let d=(e-n)/(r-n),f=kf(l);if(!i&&!o){let b=l.style==="percent"?d:e;o=f.format(b)}return{progressBarProps:Y(s,{...u,"aria-valuenow":i?void 0:e,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":i?void 0:o,role:"progressbar"}),labelProps:c}}function Mf(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const us=a.createContext(null),Rf=a.forwardRef(function(e,n){[e,n]=Me(e,n,us);let{value:r=0,minValue:o=0,maxValue:i=100,isIndeterminate:l=!1}=e;r=Mf(r,o,i);let[s,c]=is(!e["aria-label"]&&!e["aria-labelledby"]),{progressBarProps:u,labelProps:d}=Tf({...e,label:c}),f=l?void 0:(r-o)/(i-o)*100,b=Te({...e,defaultClassName:"react-aria-ProgressBar",values:{percentage:f,valueText:u["aria-valuetext"],isIndeterminate:l}}),p=ae(e,{global:!0});return a.createElement(pe.div,{...Y(p,b,u),ref:n,slot:e.slot||void 0},a.createElement(gf.Provider,{value:{...d,ref:s,elementType:"span"}},b.children))}),ds=7e3;let De=null;function hi(t,e="assertive",n=ds){De?De.announce(t,e,n):(De=new Df,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?De.announce(t,e,n):setTimeout(()=>{De!=null&&De.isAttached()&&(De==null||De.announce(t,e,n))},100))}class Df{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(){var e;return(e=this.node)==null?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",r=ds){var i,l;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,n==="assertive"?(i=this.assertiveLog)==null||i.appendChild(o):(l=this.politeLog)==null||l.appendChild(o),e!==""&&setTimeout(()=>{o.remove()},r)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function xo(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function fs(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function hs(t){let e=a.useRef({isFocused:!1,observer:null});return J(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),a.useCallback(n=>{let r=F(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){e.current.isFocused=!0;let o=r,i=l=>{if(e.current.isFocused=!1,o.disabled){let s=xo(l);t==null||t(s)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{var l;if(e.current.isFocused&&o.disabled){(l=e.current.observer)==null||l.disconnect();let s=o===ne()?null:ne();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let In=!1;function pi(t){for(;t&&!mo(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=fe(t),n=e.document.activeElement;if(!n||n===t)return;In=!0;let r=!1,o=d=>{(F(d)===n||r)&&d.stopImmediatePropagation()},i=d=>{(F(d)===n||r)&&(d.stopImmediatePropagation(),!t&&!r&&(r=!0,de(n),c()))},l=d=>{(F(d)===t||r)&&d.stopImmediatePropagation()},s=d=>{(F(d)===t||r)&&(d.stopImmediatePropagation(),r||(r=!0,de(n),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),In=!1,r=!1},u=requestAnimationFrame(c);return c}let Be=null;const Vt=new Set;let jt=new Map,at=!1,jr=!1;const Nf={Tab:!0,Escape:!0};function qn(t,e){for(let n of Vt)n(t,e)}function If(t){return!(t.metaKey||!it()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Ln(t){at=!0,!_e.isOpening&&If(t)&&(Be="keyboard",qn("keyboard",t))}function Ce(t){Be="pointer","pointerType"in t&&t.pointerType,(t.type==="mousedown"||t.type==="pointerdown")&&(at=!0,qn("pointer",t))}function ps(t){!_e.isOpening&&Dr(t)&&(at=!0,Be="virtual")}function bs(t){let e=fe(F(t)),n=Q(F(t));F(t)===e||F(t)===n||In||!t.isTrusted||(!at&&!jr&&(Be="virtual",qn("virtual",t)),at=!1,jr=!1)}function ms(){In||(at=!1,jr=!0)}function Kn(t){if(typeof window>"u"||typeof document>"u")return;const e=fe(t),n=Q(t);if(jt.get(e))return;let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){at=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ln,!0),n.addEventListener("keyup",Ln,!0),n.addEventListener("click",ps,!0),e.addEventListener("focus",bs,!0),e.addEventListener("blur",ms,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ce,!0),n.addEventListener("pointermove",Ce,!0),n.addEventListener("pointerup",Ce,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Ce,!0),n.addEventListener("mousemove",Ce,!0),n.addEventListener("mouseup",Ce,!0)),e.addEventListener("beforeunload",()=>{gs(t)},{once:!0}),jt.set(e,{focus:r})}const gs=(t,e)=>{const n=fe(t),r=Q(t);e&&r.removeEventListener("DOMContentLoaded",e),jt.has(n)&&(n.HTMLElement.prototype.focus=jt.get(n).focus,r.removeEventListener("keydown",Ln,!0),r.removeEventListener("keyup",Ln,!0),r.removeEventListener("click",ps,!0),n.removeEventListener("focus",bs,!0),n.removeEventListener("blur",ms,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ce,!0),r.removeEventListener("pointermove",Ce,!0),r.removeEventListener("pointerup",Ce,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Ce,!0),r.removeEventListener("mousemove",Ce,!0),r.removeEventListener("mouseup",Ce,!0)),jt.delete(n))};function Lf(t){const e=Q(t);let n;return e.readyState!=="loading"?Kn(t):(n=()=>{Kn(t)},e.addEventListener("DOMContentLoaded",n)),()=>gs(t,n)}typeof document<"u"&&Lf();function zt(){return Be!=="pointer"}function Ht(){return Be}function _r(t){Be=t,qn(t,null)}function Kf(){Kn();let[t,e]=a.useState(Be);return a.useEffect(()=>{let n=()=>{e(Be)};return Vt.add(n),()=>{Vt.delete(n)}},[]),Ze()?null:t}const Af=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Of(t,e,n){let r=n?F(n):void 0,o=Q(r),i=fe(r);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=ne(o);return t=t||d instanceof l&&!Af.has(d.type)||d instanceof s||d instanceof c&&d.isContentEditable,!(t&&e==="keyboard"&&n instanceof u&&!Nf[n.key])}function Ff(t,e,n){Kn(),a.useEffect(()=>{if((n==null?void 0:n.enabled)===!1)return;let r=(o,i)=>{Of(!!(n!=null&&n.isTextInput),o,i)&&t(zt())};return Vt.add(r),()=>{Vt.delete(r)}},e)}function Ye(t){if(!t.isConnected)return;const e=Q(t);if(Ht()==="virtual"){let n=ne(e);Al(()=>{const r=ne(e);(r===n||r===e.body)&&t.isConnected&&de(t)})}else de(t)}function ys(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:o}=t;const i=a.useCallback(c=>{if(F(c)===c.currentTarget)return r&&r(c),o&&o(!1),!0},[r,o]),l=hs(i),s=a.useCallback(c=>{let u=F(c);const d=Q(u),f=d?ne(d):ne();u===c.currentTarget&&u===f&&(n&&n(c),o&&o(!0),l(c))},[o,n,l]);return{focusProps:{onFocus:!e&&(n||o||r)?s:void 0,onBlur:!e&&(r||o)?i:void 0}}}function bi(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e&&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."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function vs(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:bi(t.onKeyDown),onKeyUp:bi(t.onKeyUp)}}}let Br=a.createContext(null);function jf(t){let e=a.useContext(Br)||{};fo(e,t);let{ref:n,...r}=e;return r}function Qt(t,e){let{focusProps:n}=ys(t),{keyboardProps:r}=vs(t),o=Y(n,r),i=jf(e),l=t.isDisabled?{}:i,s=a.useRef(t.autoFocus);a.useEffect(()=>{s.current&&e.current&&Ye(e.current),s.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:Y({...o,tabIndex:c},l)}}let gt="default",Vr="",$n=new WeakMap;function mi(t){if(lt()){if(gt==="default"){const e=Q(t);Vr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}gt="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";$n.set(t,t.style[e]),t.style[e]="none"}}function yr(t){if(lt()){if(gt!=="disabled")return;gt="restoring",setTimeout(()=>{Al(()=>{if(gt==="restoring"){const e=Q(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Vr||""),Vr="",gt="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&$n.has(t)){let e=$n.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),$n.delete(t)}}const Ut=a.createContext({register:()=>{}});Ut.displayName="PressResponderContext";function _f(t){let e=a.useContext(Ut);if(e){let{register:n,ref:r,...o}=e;t=Y(o,t),n()}return fo(e,t.ref),t}var xt;class un{constructor(e,n,r,o){Zo(this,xt);cr(this,xt,!0);let i=(o==null?void 0:o.target)??r.currentTarget;const l=i==null?void 0:i.getBoundingClientRect();let s,c=0,u,d=null;r.clientX!=null&&r.clientY!=null&&(u=r.clientX,d=r.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=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=c,this.key=r.key}continuePropagation(){cr(this,xt,!1)}get shouldStopPropagation(){return Xo(this,xt)}}xt=new WeakMap;const gi=Symbol("linkClicked"),yi="react-aria-pressable-style",vi="data-react-aria-pressable";function Xe(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,onClick:l,isDisabled:s,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:b,...p}=_f(t),[g,v]=a.useState(!1),y=a.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:w,removeAllGlobalListeners:x}=Wn(),S=a.useCallback((m,E)=>{let I=y.current;if(s||I.didFirePressStart)return!1;let C=!0;if(I.isTriggeringEvent=!0,r){let D=new un("pressstart",E,m);r(D),C=D.shouldStopPropagation}return n&&n(!0),I.isTriggeringEvent=!1,I.didFirePressStart=!0,v(!0),C},[s,r,n]),T=a.useCallback((m,E,I=!0)=>{let C=y.current;if(!C.didFirePressStart)return!1;C.didFirePressStart=!1,C.isTriggeringEvent=!0;let D=!0;if(o){let $=new un("pressend",E,m);o($),D=$.shouldStopPropagation}if(n&&n(!1),v(!1),e&&I&&!s){let $=new un("press",E,m);e($),D&&(D=$.shouldStopPropagation)}return C.isTriggeringEvent=!1,D},[s,o,n,e]),M=Pe(T),L=a.useCallback((m,E)=>{let I=y.current;if(s)return!1;if(i){I.isTriggeringEvent=!0;let C=new un("pressup",E,m);return i(C),I.isTriggeringEvent=!1,C.shouldStopPropagation}return!0},[s,i]),R=Pe(L),N=a.useCallback(m=>{let E=y.current;if(E.isPressed&&E.target){E.didFirePressStart&&E.pointerType!=null&&T(nt(E.target,m),E.pointerType,!1),E.isPressed=!1,E.isOverTarget=!1,E.activePointerId=null,E.pointerType=null,x(),f||yr(E.target);for(let I of E.disposables)I();E.disposables=[]}},[f,x,T]),O=Pe(N);a.useEffect(()=>{s&&y.current.isPressed&&O({currentTarget:y.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[s]);let k=a.useCallback(m=>{d&&N(m)},[d,N]),A=a.useCallback(m=>{s||l==null||l(m)},[s,l]),V=a.useCallback((m,E)=>{if(!s&&l){let I=new MouseEvent("click",m);fs(I,E),l(xo(I))}},[s,l]),j=a.useMemo(()=>{let m=y.current,E={onKeyDown(C){var D;if(vr(C.nativeEvent,C.currentTarget)&&H(C.currentTarget,F(C))){wi(F(C),C.key)&&C.preventDefault();let $=!0;!m.isPressed&&!C.repeat&&(m.target=C.currentTarget,m.isPressed=!0,m.pointerType="keyboard",$=S(C,"keyboard"));let P=C.currentTarget,K=U=>{vr(U,P)&&!U.repeat&&H(P,F(U))&&m.target&&R(nt(m.target,U),"keyboard")};w(Q(C.currentTarget),"keyup",Zt(K,I),!0),$&&C.stopPropagation(),C.metaKey&&it()&&((D=m.metaKeyEvents)==null||D.set(C.key,C.nativeEvent))}else C.key==="Meta"&&(m.metaKeyEvents=new Map)},onClick(C){if(!(C&&!H(C.currentTarget,F(C)))&&C&&C.button===0&&!m.isTriggeringEvent&&!_e.isOpening){let D=!0;if(s&&C.preventDefault(),!m.ignoreEmulatedMouseEvents&&!m.isPressed&&(m.pointerType==="virtual"||Dr(C.nativeEvent))){let $=S(C,"virtual"),P=R(C,"virtual"),K=M(C,"virtual");A(C),D=$&&P&&K}else if(m.isPressed&&m.pointerType!=="keyboard"){let $=m.pointerType||C.nativeEvent.pointerType||"virtual",P=R(nt(C.currentTarget,C),$),K=M(nt(C.currentTarget,C),$,!0);D=P&&K,m.isOverTarget=!1,A(C),O(C)}m.ignoreEmulatedMouseEvents=!1,D&&C.stopPropagation()}}},I=C=>{var D,$,P;if(m.isPressed&&m.target&&vr(C,m.target)){wi(F(C),C.key)&&C.preventDefault();let K=F(C),U=H(m.target,K);M(nt(m.target,C),"keyboard",U),U&&V(C,m.target),x(),C.key!=="Enter"&&$o(m.target)&&H(m.target,K)&&!C[gi]&&(C[gi]=!0,_e(m.target,C,!1)),m.isPressed=!1,(D=m.metaKeyEvents)==null||D.delete(C.key)}else if(C.key==="Meta"&&(($=m.metaKeyEvents)!=null&&$.size)){let K=m.metaKeyEvents;m.metaKeyEvents=void 0;for(let U of K.values())(P=m.target)==null||P.dispatchEvent(new KeyboardEvent("keyup",U))}};if(typeof PointerEvent<"u"){E.onPointerDown=$=>{if($.button!==0||!H($.currentTarget,F($)))return;if(Yu($.nativeEvent)){m.pointerType="virtual";return}m.pointerType=$.pointerType;let P=!0;if(!m.isPressed){m.isPressed=!0,m.isOverTarget=!0,m.activePointerId=$.pointerId,m.target=$.currentTarget,f||mi(m.target),P=S($,m.pointerType);let K=F($);"releasePointerCapture"in K&&("hasPointerCapture"in K?K.hasPointerCapture($.pointerId)&&K.releasePointerCapture($.pointerId):K.releasePointerCapture($.pointerId)),w(Q($.currentTarget),"pointerup",C,!1),w(Q($.currentTarget),"pointercancel",D,!1)}P&&$.stopPropagation()},E.onMouseDown=$=>{if(H($.currentTarget,F($))&&$.button===0){if(u){let P=pi($.target);P&&m.disposables.push(P)}$.stopPropagation()}},E.onPointerUp=$=>{!H($.currentTarget,F($))||m.pointerType==="virtual"||$.button===0&&!m.isPressed&&R($,m.pointerType||$.pointerType)},E.onPointerEnter=$=>{$.pointerId===m.activePointerId&&m.target&&!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,S(nt(m.target,$),m.pointerType))},E.onPointerLeave=$=>{$.pointerId===m.activePointerId&&m.target&&m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,M(nt(m.target,$),m.pointerType,!1),k($))};let C=$=>{if($.pointerId===m.activePointerId&&m.isPressed&&$.button===0&&m.target){if(H(m.target,F($))&&m.pointerType!=null){let P=!1,K=setTimeout(()=>{m.isPressed&&m.target instanceof HTMLElement&&(P?O($):(de(m.target),m.target.click()))},80);w($.currentTarget,"click",()=>P=!0,!0),m.disposables.push(()=>clearTimeout(K))}else O($);m.isOverTarget=!1}},D=$=>{O($)};E.onDragStart=$=>{H($.currentTarget,F($))&&O($)}}else if(process.env.NODE_ENV==="test"){E.onMouseDown=$=>{if($.button!==0||!H($.currentTarget,F($)))return;if(m.ignoreEmulatedMouseEvents){$.stopPropagation();return}if(m.isPressed=!0,m.isOverTarget=!0,m.target=$.currentTarget,m.pointerType=Dr($.nativeEvent)?"virtual":"mouse",Yt.flushSync(()=>S($,m.pointerType))&&$.stopPropagation(),u){let K=pi($.target);K&&m.disposables.push(K)}w(Q($.currentTarget),"mouseup",C,!1)},E.onMouseEnter=$=>{if(!H($.currentTarget,F($)))return;let P=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!0,P=S($,m.pointerType)),P&&$.stopPropagation()},E.onMouseLeave=$=>{if(!H($.currentTarget,F($)))return;let P=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!1,P=M($,m.pointerType,!1),k($)),P&&$.stopPropagation()},E.onMouseUp=$=>{H($.currentTarget,F($))&&!m.ignoreEmulatedMouseEvents&&$.button===0&&!m.isPressed&&R($,m.pointerType||"mouse")};let C=$=>{if($.button===0){if(m.ignoreEmulatedMouseEvents){m.ignoreEmulatedMouseEvents=!1;return}m.target&&H(m.target,F($))&&m.pointerType!=null||O($),m.isOverTarget=!1}};E.onTouchStart=$=>{if(!H($.currentTarget,F($)))return;let P=Bf($.nativeEvent);if(!P)return;m.activePointerId=P.identifier,m.ignoreEmulatedMouseEvents=!0,m.isOverTarget=!0,m.isPressed=!0,m.target=$.currentTarget,m.pointerType="touch",f||mi(m.target),S(Ue(m.target,$),m.pointerType)&&$.stopPropagation(),w(fe($.currentTarget),"scroll",D,!0)},E.onTouchMove=$=>{if(!H($.currentTarget,F($)))return;if(!m.isPressed){$.stopPropagation();return}let P=xi($.nativeEvent,m.activePointerId),K=!0;P&&$i(P,$.currentTarget)?!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,K=S(Ue(m.target,$),m.pointerType)):m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,K=M(Ue(m.target,$),m.pointerType,!1),k(Ue(m.target,$))),K&&$.stopPropagation()},E.onTouchEnd=$=>{if(!H($.currentTarget,F($)))return;if(!m.isPressed){$.stopPropagation();return}let P=xi($.nativeEvent,m.activePointerId),K=!0;P&&$i(P,$.currentTarget)&&m.pointerType!=null?(R(Ue(m.target,$),m.pointerType),K=M(Ue(m.target,$),m.pointerType),V($.nativeEvent,m.target)):m.isOverTarget&&m.pointerType!=null&&(K=M(Ue(m.target,$),m.pointerType,!1)),K&&$.stopPropagation(),m.isPressed=!1,m.activePointerId=null,m.isOverTarget=!1,m.ignoreEmulatedMouseEvents=!0,m.target&&!f&&yr(m.target),x()},E.onTouchCancel=$=>{H($.currentTarget,F($))&&($.stopPropagation(),m.isPressed&&O(Ue(m.target,$)))};let D=$=>{m.isPressed&&H(F($),m.target)&&O({currentTarget:m.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};E.onDragStart=$=>{H($.currentTarget,F($))&&O($)}}return E},[w,s,u,x,f,k,S,A,V]);return a.useEffect(()=>{if(!b||process.env.NODE_ENV==="test")return;const m=Q(b.current);if(!m||!m.head||m.getElementById(yi))return;const E=m.createElement("style");E.id=yi;let I=Vl(m);I&&(E.nonce=I),E.textContent=`
2
2
  @layer {
3
- [${hi}] {
3
+ [${vi}] {
4
4
  touch-action: pan-x pan-y pinch-zoom;
5
5
  }
6
6
  }
7
- `.trim(),m.head.prepend(E)},[b]),a.useEffect(()=>{let m=v.current;return()=>{f||br(m.target??void 0);for(let E of m.disposables)E();m.disposables=[]}},[f]),{isPressed:c||g,pressProps:Y(p,j,{[hi]:!0})}}function go(t){return t.tagName==="A"&&t.hasAttribute("href")}function mr(t,e){const{key:n,code:r}=t,o=e,i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof fe(o).HTMLInputElement&&!ps(o,n)||o instanceof fe(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&go(o))&&n!=="Enter")}function Mf(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function pi(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const o=n[r];if(o.identifier===e)return o}return null}function Ue(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function nt(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r,key:e.key}}function Rf(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function Df(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function bi(t,e){let n=e.getBoundingClientRect(),r=Rf(t);return Df(n,r)}function Nf(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!go(t)}function mi(t,e){return t instanceof HTMLInputElement?!ps(t,e):Nf(t)}const If=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ps(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":If.has(t.type)}function Lf(t,e){let{elementType:n="button",isDisabled:r,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:s,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:f,href:b,target:p,rel:g,type:y="button"}=t,v;n==="button"?v={type:y,disabled:r,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:v={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?p:void 0,type:n==="input"?y:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?g:void 0};let{pressProps:w,isPressed:x}=Xe({onPressStart:i,onPressEnd:l,onPressChange:c,onPress:o,onPressUp:s,onClick:f,isDisabled:r,preventFocusOnPress:u,ref:e}),{focusableProps:P}=Qt(t,e);d&&(P.tabIndex=r?-1:P.tabIndex);let T=Y(P,w,ae(t,{labelable:!0}));return{isPressed:x,buttonProps:Y(v,T,{"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"]})}}function yo(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=t,i=a.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=Wn(),c=a.useCallback(f=>{H(f.currentTarget,F(f))&&i.current.isFocusWithin&&!H(f.currentTarget,f.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(f),o&&o(!1))},[n,o,i,s]),u=ss(c),d=a.useCallback(f=>{if(!H(f.currentTarget,F(f)))return;let b=F(f);const p=Q(b),g=ne(p);if(!i.current.isFocusWithin&&g===b){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,u(f);let y=f.currentTarget;l(p,"focus",v=>{let w=F(v);if(i.current.isFocusWithin&&!H(y,w)){let x=new p.defaultView.FocusEvent("blur",{relatedTarget:w});ls(x,y);let P=mo(x);c(P)}},{capture:!0})}},[r,o,u,l,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}function vo(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,o=a.useRef({isFocused:!1,isFocusVisible:e||zt()}),[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(p=>{o.current.isFocused=p,o.current.isFocusVisible=zt(),l(p),u()},[u]);Pf(p=>{o.current.isFocusVisible=p,u()},[n,i],{enabled:i,isTextInput:n});let{focusProps:f}=fs({isDisabled:r,onFocusChange:d}),{focusWithinProps:b}=yo({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:s,focusProps:r?b:f}}let Kn=!1,dn=0;function _r(){Kn=!0,setTimeout(()=>{Kn=!1},500)}function gi(t){t.pointerType==="touch"&&_r()}function Kf(){let t=Q(null);if(!(typeof t>"u"))return dn===0&&(typeof PointerEvent<"u"?t.addEventListener("pointerup",gi):process.env.NODE_ENV==="test"&&t.addEventListener("touchend",_r)),dn++,()=>{dn--,!(dn>0)&&(typeof PointerEvent<"u"?t.removeEventListener("pointerup",gi):process.env.NODE_ENV==="test"&&t.removeEventListener("touchend",_r))}}function en(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:o}=t,[i,l]=a.useState(!1),s=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(Kf,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=Wn(),{hoverProps:d,triggerHoverEnd:f}=a.useMemo(()=>{let b=(y,v)=>{if(s.pointerType=v,o||v==="touch"||s.isHovered||!H(y.currentTarget,F(y)))return;s.isHovered=!0;let w=y.currentTarget;s.target=w,c(Q(F(y)),"pointerover",x=>{s.isHovered&&s.target&&!H(s.target,F(x))&&p(x,x.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:w,pointerType:v}),n&&n(!0),l(!0)},p=(y,v)=>{let w=s.target;s.pointerType="",s.target=null,!(v==="touch"||!s.isHovered||!w)&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:w,pointerType:v}),n&&n(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=y=>{Kn&&y.pointerType==="mouse"||b(y,y.pointerType)},g.onPointerLeave=y=>{!o&&H(y.currentTarget,F(y))&&p(y,y.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=y=>{!s.ignoreEmulatedMouseEvents&&!Kn&&b(y,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=y=>{!o&&H(y.currentTarget,F(y))&&p(y,"mouse")}),{hoverProps:g,triggerHoverEnd:p}},[e,n,r,o,s,c,u]);return a.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:d,isHovered:i}}const bs=a.createContext({}),xo=rf(function(e,n){[e,n]=Me(e,n,bs);let r=e,{isPending:o}=r,{buttonProps:i,isPressed:l}=Lf(e,n);i=Of(i,o);let{focusProps:s,isFocused:c,isFocusVisible:u}=vo(e),{hoverProps:d,isHovered:f}=en({...e,isDisabled:e.isDisabled||o}),b={isHovered:f,isPressed:(r.isPressed||l)&&!o,isFocused:c,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:o??!1},p=Te({...e,values:b,defaultClassName:"react-aria-Button"}),g=he(i.id),y=he(),v=i["aria-labelledby"];o&&(v?v=`${v} ${y}`:i["aria-label"]&&(v=`${g} ${y}`));let w=a.useRef(o);a.useEffect(()=>{let P={"aria-labelledby":v||g};(!w.current&&c&&o||w.current&&c&&!o)&&si(P,"assertive"),w.current=o},[o,c,v,g]);let x=ae(e,{global:!0});return delete x.onClick,a.createElement(pe.button,{...Y(x,p,i,s,d),type:i.type==="submit"&&o?"button":i.type,id:g,ref:n,"aria-labelledby":v,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":b.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(os.Provider,{value:{id:y}},p.children))}),Af=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function Of(t,e){if(e){for(const n in t)n.startsWith("on")&&!Af.test(n)&&(t[n]=void 0);t.href=void 0,t.target=void 0}return t}const Ff=typeof document<"u"?a.useInsertionEffect??a.useLayoutEffect:()=>{};function qn(t,e,n){let[r,o]=a.useState(t||e),i=a.useRef(r),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:r;Ff(()=>{i.current=c});let[,u]=a.useReducer(()=>({}),{}),d=a.useCallback((f,...b)=>{let p=typeof f=="function"?f(i.current):f;Object.is(i.current,p)||(i.current=p,o(p),u(),n==null||n(p,...b))},[n]);return[c,d]}const ms=a.createContext({}),jf=a.forwardRef(function(e,n){[e,n]=Me(e,n,ms);let{children:r,level:o=3,className:i,...l}=e,s=pe[`h${o}`];return a.createElement(s,{...l,ref:n,className:i??"react-aria-Heading"},r)}),_f=t=>t?"true":void 0;function Ee(t,e){return Qd(t,(n,r)=>{const o=typeof e=="function"?e(r)??"":e??"";return Bt(o,n??"")??""})}const ie=(t,e,n)=>typeof t=="function"?t({className:e}):e,Bf=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Chevron right icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M5.47 2.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 0-1.06Z",fill:"currentColor",fillRule:"evenodd"})}),Vf=({height:t=9,width:e=9,...n})=>h.jsx("svg",{"aria-hidden":"true","aria-label":"External link icon",fill:"none",height:t,role:"presentation",viewBox:"0 0 7 7",width:e,xmlns:"http://www.w3.org/2000/svg",...n,children:h.jsx("path",{d:"M1.20592 6.84333L0.379822 6.01723L4.52594 1.8672H1.37819L1.38601 0.731812H6.48742V5.83714H5.34421L5.35203 2.6933L1.20592 6.84333Z",fill:"currentColor"})}),zf=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Close icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z",fill:"currentColor",fillRule:"evenodd"})}),yi=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Info icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",fill:"currentColor",fillRule:"evenodd"})}),Hf=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Warning icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M7.134 2.994L2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0a1 1 0 0 1 2 0",fill:"currentColor",fillRule:"evenodd"})}),Uf=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Danger icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z",fill:"currentColor",fillRule:"evenodd"})}),Wf=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Success icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M13.5 8a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858L6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",fill:"currentColor",fillRule:"evenodd"})}),Yn=a.createContext({}),Gf=a.createContext({placement:"bottom"}),qf=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function vi(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let Mt=new WeakMap,ye=[];function gs(t,e){let n=fe(t==null?void 0:t[0]),r=e instanceof n.Element?{root:e}:e,o=(r==null?void 0:r.root)??document.body,i=(r==null?void 0:r.shouldUseInert)&&qf,l=new Set(t),s=new Set,c=v=>i&&v instanceof n.HTMLElement?v.inert:v.getAttribute("aria-hidden")==="true",u=(v,w)=>{i&&v instanceof n.HTMLElement?v.inert=w:w?v.setAttribute("aria-hidden","true"):(v.removeAttribute("aria-hidden"),v instanceof n.HTMLElement&&(v.inert=!1))},d=new Set;if(Ae())for(let v of t){let w=v;for(;w&&w!==o;){let x=w.getRootNode();"shadowRoot"in x&&d.add(x.shadowRoot),w=x.parentNode}}let f=v=>{for(let T of v.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(T);let w=T=>{if(s.has(T)||l.has(T)||T.parentElement&&s.has(T.parentElement)&&T.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let R of l)if(H(T,R))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},x=Tl(Q(v),v,NodeFilter.SHOW_ELEMENT,{acceptNode:w}),P=w(v);if(P===NodeFilter.FILTER_ACCEPT&&b(v),P!==NodeFilter.FILTER_REJECT){let T=x.nextNode();for(;T!=null;)b(T),T=x.nextNode()}},b=v=>{let w=Mt.get(v)??0;c(v)&&w===0||(w===0&&u(v,!0),s.add(v),Mt.set(v,w+1))};ye.length&&ye[ye.length-1].disconnect(),f(o);let p=new MutationObserver(v=>{for(let w of v)if(w.type==="childList"){if(w.target.isConnected&&![...l,...s].some(x=>H(x,w.target)))for(let x of w.addedNodes)(x instanceof HTMLElement||x instanceof SVGElement)&&vi(x)?l.add(x):x instanceof Element&&f(x);if(Ae()){for(let x of d)if(!x.isConnected){p.disconnect();break}}}});p.observe(o,{childList:!0,subtree:!0});let g=new Set;if(Ae())for(let v of d){let w=new MutationObserver(x=>{for(let P of x)if(P.type==="childList"){if(P.target.isConnected&&![...l,...s].some(T=>H(T,P.target)))for(let T of P.addedNodes)(T instanceof HTMLElement||T instanceof SVGElement)&&vi(T)?l.add(T):T instanceof Element&&f(T);if(Ae()){for(let T of d)if(!T.isConnected){p.disconnect();break}}}});w.observe(v,{childList:!0,subtree:!0}),g.add(w)}let y={visibleNodes:l,hiddenNodes:s,observe(){p.observe(o,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}};return ye.push(y),()=>{if(p.disconnect(),Ae())for(let v of g)v.disconnect();for(let v of s){let w=Mt.get(v);w!=null&&(w===1?(u(v,!1),Mt.delete(v)):Mt.set(v,w-1))}y===ye[ye.length-1]?(ye.pop(),ye.length&&ye[ye.length-1].observe()):ye.splice(ye.indexOf(y),1)}}function Yf(t){let e=ye[ye.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const Se={top:"top",bottom:"top",left:"left",right:"left"},An={top:"bottom",bottom:"top",left:"right",right:"left"},Xf={top:"left",left:"top"},Br={top:"height",left:"width"},ys={width:"totalWidth",height:"totalHeight"},fn={};let Zf=()=>typeof document<"u"?window.visualViewport:null;function xi(t,e){let n=0,r=0,o=0,i=0,l=0,s=0,c={},u=((e==null?void 0:e.scale)??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let d=document.documentElement;o=d.clientWidth,i=d.clientHeight,n=(e==null?void 0:e.width)??o,r=(e==null?void 0:e.height)??i,c.top=d.scrollTop||t.scrollTop,c.left=d.scrollLeft||t.scrollLeft,e&&(l=e.offsetTop,s=e.offsetLeft)}else({width:n,height:r,top:l,left:s}=Wt(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,o=n,i=r;return El()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u&&(c.top=0,c.left=0,l=(e==null?void 0:e.pageTop)??0,s=(e==null?void 0:e.pageLeft)??0),{width:n,height:r,totalWidth:o,totalHeight:i,scroll:c,top:l,left:s}}function Jf(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function $i(t,e,n,r,o,i,l){let s=o.scroll[t]??0,c=r[Br[t]],u=l[t]+r.scroll[Se[t]]+i,d=l[t]+r.scroll[Se[t]]+c-i,f=e-s+r.scroll[Se[t]]+l[t]-r[Se[t]],b=e-s+n+r.scroll[Se[t]]+l[t]-r[Se[t]];return f<u?u-f:b>d?Math.max(d-b,u-f):0}function Qf(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 wi(t){if(fn[t])return fn[t];let[e,n]=t.split(" "),r=Se[e]||"right",o=Xf[r];Se[n]||(n="center");let i=Br[r],l=Br[o];return fn[t]={placement:e,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:l},fn[t]}function gr(t,e,n,r,o,i,l,s,c,u,d){let{placement:f,crossPlacement:b,axis:p,crossAxis:g,size:y,crossSize:v}=r,w={};w[g]=t[g]??0,b==="center"?w[g]+=((t[v]??0)-(n[v]??0))/2:b!==g&&(w[g]+=(t[v]??0)-(n[v]??0)),w[g]+=i;const x=t[g]-n[v]+c+u,P=t[g]+t[v]-c-u;if(w[g]=Dn(w[g],x,P),f===p){let T=s?d[y]:d[ys[y]];w[An[p]]=Math.floor(T-t[p]+o)}else w[p]=Math.floor(t[p]+t[y]+o);return w}function eh(t,e,n,r,o,i,l,s,c,u,d){let f=(t.top!=null?t.top:c[ys.height]-(t.bottom??0)-l)-(c.scroll.top??0),b=u?n.top:0,p={top:Math.max(e.top+b,((d==null?void 0:d.offsetTop)??e.top)+b),bottom:Math.min(e.top+e.height+b,((d==null?void 0:d.offsetTop)??0)+((d==null?void 0:d.height)??0))};return s!=="top"?Math.max(0,p.bottom-f-((o.top??0)+(o.bottom??0)+i)):Math.max(0,f+l-p.top-((o.top??0)+(o.bottom??0)+i))}function Ei(t,e,n,r,o,i,l,s){let{placement:c,axis:u,size:d}=i;return c===u?Math.max(0,n[u]-(l.scroll[u]??0)-(t[u]+(s?e[u]:0))-(r[u]??0)-r[An[u]]-o):Math.max(0,t[d]+t[u]+(s?e[u]:0)-n[u]-n[d]+(l.scroll[u]??0)-(r[u]??0)-r[An[u]]-o)}function th(t,e,n,r,o,i,l,s,c,u,d,f,b,p,g,y,v,w){let x=wi(t),{size:P,crossAxis:T,crossSize:R,placement:K,crossPlacement:M}=x,N=gr(e,s,n,x,d,f,u,b,g,y,c),O=d,k=Ei(s,u,e,o,i+d,x,c,v);if(l&&n[P]>k){let ee=wi(`${An[K]} ${M}`),le=gr(e,s,n,ee,d,f,u,b,g,y,c);Ei(s,u,e,o,i+d,ee,c,v)>k&&(x=ee,N=le,O=d)}let A="bottom";x.axis==="top"?x.placement==="top"?A="top":x.placement==="bottom"&&(A="bottom"):x.crossAxis==="top"&&(x.crossPlacement==="top"?A="bottom":x.crossPlacement==="bottom"&&(A="top"));let V=$i(T,N[T],n[R],s,c,i,u);N[T]+=V;let j=eh(N,s,u,b,o,i,n.height,A,c,v,w);p&&p<j&&(j=p),n.height=Math.min(n.height,j),N=gr(e,s,n,x,O,f,u,b,g,y,c),V=$i(T,N[T],n[R],s,c,i,u),N[T]+=V;let m={},E=e[T]-N[T]-o[Se[T]],I=E+.5*e[R];const C=g/2+y,D=Se[T]==="left"?(o.left??0)+(o.right??0):(o.top??0)+(o.bottom??0),$=n[R]-D-g/2-y,S=e[T]+g/2-(N[T]+o[Se[T]]),L=e[T]+e[R]-g/2-(N[T]+o[Se[T]]),U=Dn(I,S,L);m[T]=Dn(U,C,$),{placement:K,crossPlacement:M}=x,g?E=m[T]:M==="right"?E+=e[R]:M==="center"&&(E+=e[R]/2);let W=K==="left"||K==="top"?n[P]:0,G={x:K==="top"||K==="bottom"?E:W,y:K==="left"||K==="right"?E:W};return{position:N,maxHeight:j,arrowOffsetLeft:m.left,arrowOffsetTop:m.top,placement:K,triggerAnchorPoint:G}}function nh(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:s,offset:c,crossOffset:u,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:b=0}=t,p=Zf(),g=r instanceof HTMLElement?rh(r):document.documentElement,y=g===document.documentElement;const v=window.getComputedStyle(g).position;let w=!!v&&v!=="static",x=y?Wt(n,!1):Ci(n,g,!1);if(!y){let{marginTop:k,marginLeft:A}=window.getComputedStyle(n);x.top+=parseInt(k,10)||0,x.left+=parseInt(A,10)||0}let P=Wt(r,!0),T=Qf(r);P.width+=(T.left??0)+(T.right??0),P.height+=(T.top??0)+(T.bottom??0);let R=Jf(o),K=xi(s,p),M=xi(g,p),N;if((s.tagName==="BODY"||s.tagName==="HTML")&&!y){let k=Xn(g,!1);N={top:-(k.top-K.top),left:-(k.left-K.left),width:0,height:0}}else(s.tagName==="BODY"||s.tagName==="HTML")&&y?N={top:0,left:0,width:0,height:0}:N=Ci(s,g,!1);let O=H(s,g);return th(e,x,P,R,T,i,l,K,M,N,c,u,w,d,f,b,O,p)}function Xn(t,e){let{top:n,left:r,width:o,height:i}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(o=t.offsetWidth,i=t.offsetHeight),{top:n,left:r,width:o,height:i}}function Wt(t,e){let{top:n,left:r,width:o,height:i}=Xn(t,e),{scrollTop:l,scrollLeft:s,clientTop:c,clientLeft:u}=document.documentElement;return{top:n+l-c,left:r+s-u,width:o,height:i}}function Ci(t,e,n){let r=window.getComputedStyle(t),o;if(r.position==="fixed")o=Xn(t,n);else{o=Wt(t,n);let i=Wt(e,n),l=window.getComputedStyle(e);i.top+=(parseInt(l.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(l.borderLeftWidth,10)||0)-e.scrollLeft,o.top-=i.top,o.left-=i.left}return o.top-=parseInt(r.marginTop,10)||0,o.left-=parseInt(r.marginLeft,10)||0,o}function rh(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Si(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Si(e);)e=e.parentElement;return e||document.documentElement}function Si(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 vs=new WeakMap;function oh(t){let{triggerRef:e,isOpen:n,onClose:r}=t;a.useEffect(()=>{if(!n||r===null)return;let o=i=>{let l=F(i);if(!e.current||l instanceof Node&&!H(l,e.current)||l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)return;let s=r||vs.get(e.current);s&&s()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[n,r,e])}let se=typeof document<"u"?window.visualViewport:null;function ih(t){let{direction:e}=dt(),{arrowSize:n,targetRef:r,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:b=0,shouldUpdatePosition:p=!0,isOpen:g=!0,onClose:y,maxHeight:v,arrowBoundaryOffset:w=0}=t,[x,P]=a.useState(null),T=[p,s,o.current,r.current,i==null?void 0:i.current,l.current,c,u,d,f,b,g,e,v,w,n],R=a.useRef(se==null?void 0:se.scale);a.useEffect(()=>{g&&(R.current=se==null?void 0:se.scale)},[g]);let K=a.useCallback(()=>{var j,m;if(p===!1||!g||!o.current||!r.current||!d||(se==null?void 0:se.scale)!==R.current)return;let O=null;if(l.current&&$t(l.current)){let E=(j=ne())==null?void 0:j.getBoundingClientRect(),I=l.current.getBoundingClientRect();O={type:"top",offset:((E==null?void 0:E.top)??0)-I.top},O.offset>I.height/2&&(O.type="bottom",O.offset=((E==null?void 0:E.bottom)??0)-I.bottom)}let k=o.current;!v&&o.current&&(k.style.top="0px",k.style.bottom="",k.style.maxHeight=(((m=window.visualViewport)==null?void 0:m.height)??window.innerHeight)+"px");let A=nh({placement:sh(s,e),overlayNode:o.current,targetNode:r.current,scrollNode:l.current||o.current,padding:c,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:b,maxHeight:v,arrowSize:n??(i!=null&&i.current?Xn(i.current,!0).width:0),arrowBoundaryOffset:w});if(!A.position)return;k.style.top="",k.style.bottom="",k.style.left="",k.style.right="",Object.keys(A.position).forEach(E=>k.style[E]=A.position[E]+"px"),k.style.maxHeight=A.maxHeight!=null?A.maxHeight+"px":"";let V=ne();if(O&&V&&l.current){let E=V.getBoundingClientRect(),I=l.current.getBoundingClientRect(),C=E[O.type]-I[O.type];l.current.scrollTop+=C-O.offset}P(A)},T);J(K,T),lh(K),Pn({ref:o,onResize:K}),Pn({ref:r,onResize:K});let M=a.useRef(!1);J(()=>{let O,k=()=>{M.current=!0,clearTimeout(O),O=setTimeout(()=>{M.current=!1},500),K()},A=()=>{M.current&&k()};return se==null||se.addEventListener("resize",k),se==null||se.addEventListener("scroll",A),()=>{se==null||se.removeEventListener("resize",k),se==null||se.removeEventListener("scroll",A)}},[K]);let N=a.useCallback(()=>{M.current||y==null||y()},[y,M]);return oh({triggerRef:r,isOpen:g,onClose:y&&N}),{overlayProps:{style:{position:x?"absolute":"fixed",top:x?void 0:0,left:x?void 0:0,zIndex:1e5,...x==null?void 0:x.position,maxHeight:(x==null?void 0:x.maxHeight)??"100vh"}},placement:(x==null?void 0:x.placement)??null,triggerAnchorPoint:(x==null?void 0:x.triggerAnchorPoint)??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:x==null?void 0:x.arrowOffsetLeft,top:x==null?void 0:x.arrowOffsetTop}},updatePosition:K}}function lh(t){J(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function sh(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Pi=a.createContext(null),Vr="react-aria-focus-scope-restore";let re=null;function xs(t){let{children:e,contain:n,restoreFocus:r,autoFocus:o}=t,i=a.useRef(null),l=a.useRef(null),s=a.useRef([]),{parentNode:c}=a.useContext(Pi)||{},u=a.useMemo(()=>new Hr({scopeRef:s}),[s]);J(()=>{let b=c||ce.root;if(ce.getTreeNode(b.scopeRef)&&re&&!On(re,b.scopeRef)){let p=ce.getTreeNode(re);p&&(b=p)}b.addChild(u),ce.addNode(u)},[u,c]),J(()=>{let b=ce.getTreeNode(s);b&&(b.contain=!!n)},[n]),J(()=>{var y;let b=(y=i.current)==null?void 0:y.nextSibling,p=[],g=v=>v.stopPropagation();for(;b&&b!==l.current;)p.push(b),b.addEventListener(Vr,g),b=b.nextSibling;return s.current=p,()=>{for(let v of p)v.removeEventListener(Vr,g)}},[e]),ph(s,r,n),dh(s,n),bh(s,r,n),hh(s,o),a.useEffect(()=>{const b=ne(Q(s.current?s.current[0]:void 0));let p=null;if(ke(b,s.current)){for(let g of ce.traverse())g.scopeRef&&ke(b,g.scopeRef.current)&&(p=g);p===ce.getTreeNode(s)&&(re=p.scopeRef)}},[s]),J(()=>()=>{var p,g;let b=((g=(p=ce.getTreeNode(s))==null?void 0:p.parent)==null?void 0:g.scopeRef)??null;(s===re||On(s,re))&&(!b||ce.getTreeNode(b))&&(re=b),ce.removeTreeNode(s)},[s]);let d=a.useMemo(()=>ah(s),[]),f=a.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return a.createElement(Pi.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 ah(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:o,wrap:i,accept:l}=e,s=r||ne(Q(n[0]??void 0)),c=n[0].previousElementSibling,u=rt(n),d=Fe(u,{tabbable:o,accept:l},n);d.currentNode=ke(s,n)?s:c;let f=d.nextNode();return!f&&i&&(d.currentNode=c,f=d.nextNode()),f&&Oe(f,!0),f},focusPrevious(e={}){let n=t.current,{from:r,tabbable:o,wrap:i,accept:l}=e,s=r||ne(Q(n[0]??void 0)),c=n[n.length-1].nextElementSibling,u=rt(n),d=Fe(u,{tabbable:o,accept:l},n);d.currentNode=ke(s,n)?s:c;let f=d.previousNode();return!f&&i&&(d.currentNode=c,f=d.previousNode()),f&&Oe(f,!0),f},focusFirst(e={}){let n=t.current,{tabbable:r,accept:o}=e,i=rt(n),l=Fe(i,{tabbable:r,accept:o},n);l.currentNode=n[0].previousElementSibling;let s=l.nextNode();return s&&Oe(s,!0),s},focusLast(e={}){let n=t.current,{tabbable:r,accept:o}=e,i=rt(n),l=Fe(i,{tabbable:r,accept:o},n);l.currentNode=n[n.length-1].nextElementSibling;let s=l.previousNode();return s&&Oe(s,!0),s}}}function rt(t){return t[0].parentElement}function At(t){let e=ce.getTreeNode(re);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function ch(t){if(!t.form)return Array.from(Q(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(r=>!r.form);const e=t.form.elements.namedItem(t.name);let n=fe(t);return e instanceof n.RadioNodeList?Array.from(e).filter(r=>r instanceof n.HTMLInputElement):e instanceof n.HTMLInputElement?[e]:[]}function uh(t){if(t.checked)return!0;const e=ch(t);return e.length>0&&!e.some(n=>n.checked)}function dh(t,e){let n=a.useRef(void 0),r=a.useRef(void 0);J(()=>{let o=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const i=Q(o?o[0]:void 0);let l=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!At(t)||u.isComposing)return;let d=ne(i),f=t.current;if(!f||!ke(d,f))return;let b=rt(f),p=Fe(b,{tabbable:!0},f);if(!d)return;p.currentNode=d;let g=u.shiftKey?p.previousNode():p.nextNode();g||(p.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,g=u.shiftKey?p.previousNode():p.nextNode()),u.preventDefault(),g&&(Oe(g,!0),g instanceof fe(g).HTMLInputElement&&g.select())},s=u=>{(!re||On(re,t))&&ke(F(u),t.current)?(re=t,n.current=F(u)):At(t)&&!Ge(F(u),t)?n.current?n.current.focus():re&&re.current&&zr(re.current):At(t)&&(n.current=F(u))},c=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{var p;let d=Ht(),f=(d==="virtual"||d===null)&&lo()&&Cl(),b=ne(i);if(!f&&b&&At(t)&&!Ge(b,t)){re=t;let g=F(u);g&&g.isConnected?(n.current=g,(p=n.current)==null||p.focus()):re.current&&zr(re.current)}})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",s,!1),o==null||o.forEach(u=>u.addEventListener("focusin",s,!1)),o==null||o.forEach(u=>u.addEventListener("focusout",c,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",s,!1),o==null||o.forEach(u=>u.removeEventListener("focusin",s,!1)),o==null||o.forEach(u=>u.removeEventListener("focusout",c,!1))}},[t,e]),J(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function $s(t){return Ge(t)}function ke(t,e){return!t||!e?!1:e.some(n=>H(n,t))}function Ge(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ce.traverse(ce.getTreeNode(e)))if(n&&ke(t,n.current))return!0;return!1}function fh(t){return Ge(t,re)}function On(t,e){var r;let n=(r=ce.getTreeNode(e))==null?void 0:r.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function Oe(t,e=!1){if(t!=null&&!e)try{Ye(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function ws(t,e=!0){let n=t[0].previousElementSibling,r=rt(t),o=Fe(r,{tabbable:e},t);o.currentNode=n;let i=o.nextNode();return e&&!i&&(r=rt(t),o=Fe(r,{tabbable:!1},t),o.currentNode=n,i=o.nextNode()),i}function zr(t,e=!0){Oe(ws(t,e))}function hh(t,e){const n=a.useRef(e);a.useEffect(()=>{if(n.current){re=t;const r=Q(t.current?t.current[0]:void 0);!ke(ne(r),re.current)&&t.current&&zr(t.current)}n.current=!1},[t])}function ph(t,e,n){J(()=>{if(e||n)return;let r=t.current;const o=Q(r?r[0]:void 0);let i=l=>{let s=F(l);ke(s,t.current)?re=t:$s(s)||(re=null)};return o.addEventListener("focusin",i,!1),r==null||r.forEach(l=>l.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),r==null||r.forEach(l=>l.removeEventListener("focusin",i,!1))}},[t,e,n])}function ki(t){let e=ce.getTreeNode(re);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function bh(t,e,n){const r=a.useRef(typeof document<"u"?ne(Q(t.current?t.current[0]:void 0)):null);J(()=>{let o=t.current;const i=Q(o?o[0]:void 0);if(!e||n)return;let l=()=>{(!re||On(re,t))&&ke(ne(i),t.current)&&(re=t)};return i.addEventListener("focusin",l,!1),o==null||o.forEach(s=>s.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),o==null||o.forEach(s=>s.removeEventListener("focusin",l,!1))}},[t,n]),J(()=>{const o=Q(t.current?t.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!At(t)||l.isComposing)return;let s=o.activeElement;if(!Ge(s,t)||!ki(t))return;let c=ce.getTreeNode(t);if(!c)return;let u=c.nodeToRestore,d=Fe(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||!Ge(f,t))&&u){d.currentNode=u;do f=l.shiftKey?d.previousNode():d.nextNode();while(Ge(f,t));l.preventDefault(),l.stopPropagation(),f?Oe(f,!0):$s(u)?Oe(u,!0):s.blur()}};return n||o.addEventListener("keydown",i,!0),()=>{n||o.removeEventListener("keydown",i,!0)}},[t,e,n]),J(()=>{const o=Q(t.current?t.current[0]:void 0);if(!e)return;let i=ce.getTreeNode(t);if(i)return i.nodeToRestore=r.current??void 0,()=>{let l=ce.getTreeNode(t);if(!l)return;let s=l.nodeToRestore,c=ne(o);if(e&&s&&(c&&Ge(c,t)||c===o.body&&ki(t))){let u=ce.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=u.getTreeNode(t);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){Ti(d.nodeToRestore);return}d=d.parent}for(d=u.getTreeNode(t);d;){if(d.scopeRef&&d.scopeRef.current&&ce.getTreeNode(d.scopeRef)){let f=ws(d.scopeRef.current,!0);Ti(f);return}d=d.parent}}})}}},[t,e])}function Ti(t){t.dispatchEvent(new CustomEvent(Vr,{bubbles:!0,cancelable:!0}))&&Oe(t)}function Fe(t,e,n){let r=e!=null&&e.tabbable?Ll:fo,o=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null,i=Q(o),l=Tl(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return H(e==null?void 0:e.from,s)||e!=null&&e.tabbable&&s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(!uh(s)||l.currentNode.tagName==="INPUT"&&l.currentNode.type==="radio"&&l.currentNode.name===s.name)?NodeFilter.FILTER_REJECT:r(s)&&(!n||ke(s,n))&&(!(e!=null&&e.accept)||e.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(l.currentNode=e.from),l}class $o{constructor(){this.fastMap=new Map,this.root=new Hr({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let o=this.fastMap.get(n??null);if(!o)return;let i=new Hr({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ke(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let o=n.children;r&&(r.removeChild(n),o.size>0&&o.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var n;let e=new $o;for(let r of this.traverse())e.addTreeNode(r.scopeRef,((n=r.parent)==null?void 0:n.scopeRef)??null,r.nodeToRestore);return e}}class Hr{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 $o;function mh(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=t,i=a.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Pe(c=>{n&&hn(c,e)&&(o&&o(c),i.current.isPointerDown=!0)}),s=Pe(c=>{n&&n(c)});a.useEffect(()=>{let c=i.current;if(r)return;const u=e.current,d=Q(u);if(typeof PointerEvent<"u"){let f=b=>{c.isPointerDown&&hn(b,e)&&s(b),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=p=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&hn(p,e)&&s(p),c.isPointerDown=!1},b=p=>{c.ignoreEmulatedMouseEvents=!0,c.isPointerDown&&hn(p,e)&&s(p),c.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",b,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",b,!0)}}},[e,r])}function hn(t,e){if(t.button>0)return!1;let n=F(t);if(n){const r=n.ownerDocument;if(!r||!H(r.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const Ne=[];function Es(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:s}=t,c=a.useRef(void 0);a.useEffect(()=>{if(o&&!Ne.includes(e))return Ne.push(e),()=>{let g=Ne.indexOf(e);g>=0&&Ne.splice(g,1)}},[o,e]);let u=()=>{Ne[Ne.length-1]===e&&n&&n()},d=g=>{const y=Ne[Ne.length-1];c.current=y,(!s||s(F(g)))&&y===e&&g.stopPropagation()},f=g=>{(!s||s(F(g)))&&(Ne[Ne.length-1]===e&&g.stopPropagation(),c.current===e&&u()),c.current=void 0},b=g=>{g.key==="Escape"&&!l&&!g.nativeEvent.isComposing&&(g.stopPropagation(),g.preventDefault(),u())};mh({ref:e,onInteractOutside:i&&o?f:void 0,onInteractOutsideStart:d});let{focusWithinProps:p}=yo({isDisabled:!r,onBlurWithin:g=>{!g.relatedTarget||fh(g.relatedTarget)||(!s||s(g.relatedTarget))&&(n==null||n())}});return{overlayProps:{onKeyDown:b,...p},underlayProps:{}}}const _t=typeof document<"u"&&window.visualViewport;let pn=0,yr;function Cs(t={}){let{isDisabled:e}=t;J(()=>{if(!e)return pn++,pn===1&&(lt()?yr=yh():yr=gh()),()=>{pn--,pn===0&&yr()}},[e])}function gh(){let t=window.innerWidth-document.documentElement.clientWidth;return Zt(t>0&&("scrollbarGutter"in document.documentElement.style?wn(document.documentElement,"scrollbarGutter","stable"):wn(document.documentElement,"paddingRight",`${t}px`)),wn(document.documentElement,"overflow","hidden"))}function yh(){let t=wn(document.documentElement,"overflow","hidden"),e,n=!1,r=d=>{let f=F(d);e=st(f)?f:Nl(f,!0),n=!1;let b=f.ownerDocument.defaultView.getSelection();b&&!b.isCollapsed&&b.containsNode(f,!0)&&(n=!0),d.composedPath().some(p=>p instanceof HTMLInputElement&&p.type==="range")&&(n=!0),"selectionStart"in f&&"selectionEnd"in f&&f.selectionStart<f.selectionEnd&&f.ownerDocument.activeElement===f&&(n=!0)},o=document.createElement("style"),i=Al();i&&(o.nonce=i),o.textContent=`
7
+ `.trim(),m.head.prepend(E)},[b]),a.useEffect(()=>{let m=y.current;return()=>{f||yr(m.target??void 0);for(let E of m.disposables)E();m.disposables=[]}},[f]),{isPressed:c||g,pressProps:Y(p,j,{[vi]:!0})}}function $o(t){return t.tagName==="A"&&t.hasAttribute("href")}function vr(t,e){const{key:n,code:r}=t,o=e,i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof fe(o).HTMLInputElement&&!xs(o,n)||o instanceof fe(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&$o(o))&&n!=="Enter")}function Bf(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function xi(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const o=n[r];if(o.identifier===e)return o}return null}function Ue(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function nt(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r,key:e.key}}function Vf(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function zf(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function $i(t,e){let n=e.getBoundingClientRect(),r=Vf(t);return zf(n,r)}function Hf(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!$o(t)}function wi(t,e){return t instanceof HTMLInputElement?!xs(t,e):Hf(t)}const Uf=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xs(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Uf.has(t.type)}function Gf(t,e){let{elementType:n="button",isDisabled:r,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:s,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:f,href:b,target:p,rel:g,type:v="button"}=t,y;n==="button"?y={type:v,disabled:r,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:y={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?p:void 0,type:n==="input"?v:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?g:void 0};let{pressProps:w,isPressed:x}=Xe({onPressStart:i,onPressEnd:l,onPressChange:c,onPress:o,onPressUp:s,onClick:f,isDisabled:r,preventFocusOnPress:u,ref:e}),{focusableProps:S}=Qt(t,e);d&&(S.tabIndex=r?-1:S.tabIndex);let T=Y(S,w,ae(t,{labelable:!0}));return{isPressed:x,buttonProps:Y(y,T,{"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"]})}}function wo(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=t,i=a.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=Wn(),c=a.useCallback(f=>{H(f.currentTarget,F(f))&&i.current.isFocusWithin&&!H(f.currentTarget,f.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(f),o&&o(!1))},[n,o,i,s]),u=hs(c),d=a.useCallback(f=>{if(!H(f.currentTarget,F(f)))return;let b=F(f);const p=Q(b),g=ne(p);if(!i.current.isFocusWithin&&g===b){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,u(f);let v=f.currentTarget;l(p,"focus",y=>{let w=F(y);if(i.current.isFocusWithin&&!H(v,w)){let x=new p.defaultView.FocusEvent("blur",{relatedTarget:w});fs(x,v);let S=xo(x);c(S)}},{capture:!0})}},[r,o,u,l,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}function Eo(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,o=a.useRef({isFocused:!1,isFocusVisible:e||zt()}),[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(p=>{o.current.isFocused=p,o.current.isFocusVisible=zt(),l(p),u()},[u]);Ff(p=>{o.current.isFocusVisible=p,u()},[n,i],{enabled:i,isTextInput:n});let{focusProps:f}=ys({isDisabled:r,onFocusChange:d}),{focusWithinProps:b}=wo({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:s,focusProps:r?b:f}}let An=!1,dn=0;function zr(){An=!0,setTimeout(()=>{An=!1},500)}function Ei(t){t.pointerType==="touch"&&zr()}function Wf(){let t=Q(null);if(!(typeof t>"u"))return dn===0&&(typeof PointerEvent<"u"?t.addEventListener("pointerup",Ei):process.env.NODE_ENV==="test"&&t.addEventListener("touchend",zr)),dn++,()=>{dn--,!(dn>0)&&(typeof PointerEvent<"u"?t.removeEventListener("pointerup",Ei):process.env.NODE_ENV==="test"&&t.removeEventListener("touchend",zr))}}function en(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:o}=t,[i,l]=a.useState(!1),s=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(Wf,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=Wn(),{hoverProps:d,triggerHoverEnd:f}=a.useMemo(()=>{let b=(v,y)=>{if(s.pointerType=y,o||y==="touch"||s.isHovered||!H(v.currentTarget,F(v)))return;s.isHovered=!0;let w=v.currentTarget;s.target=w,c(Q(F(v)),"pointerover",x=>{s.isHovered&&s.target&&!H(s.target,F(x))&&p(x,x.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:w,pointerType:y}),n&&n(!0),l(!0)},p=(v,y)=>{let w=s.target;s.pointerType="",s.target=null,!(y==="touch"||!s.isHovered||!w)&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:w,pointerType:y}),n&&n(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=v=>{An&&v.pointerType==="mouse"||b(v,v.pointerType)},g.onPointerLeave=v=>{!o&&H(v.currentTarget,F(v))&&p(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!An&&b(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=v=>{!o&&H(v.currentTarget,F(v))&&p(v,"mouse")}),{hoverProps:g,triggerHoverEnd:p}},[e,n,r,o,s,c,u]);return a.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:d,isHovered:i}}const $s=a.createContext({}),Co=mf(function(e,n){[e,n]=Me(e,n,$s);let r=e,{isPending:o}=r,{buttonProps:i,isPressed:l}=Gf(e,n);i=Yf(i,o);let{focusProps:s,isFocused:c,isFocusVisible:u}=Eo(e),{hoverProps:d,isHovered:f}=en({...e,isDisabled:e.isDisabled||o}),b={isHovered:f,isPressed:(r.isPressed||l)&&!o,isFocused:c,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:o??!1},p=Te({...e,values:b,defaultClassName:"react-aria-Button"}),g=he(i.id),v=he(),y=i["aria-labelledby"];o&&(y?y=`${y} ${v}`:i["aria-label"]&&(y=`${g} ${v}`));let w=a.useRef(o);a.useEffect(()=>{let S={"aria-labelledby":y||g};(!w.current&&c&&o||w.current&&c&&!o)&&hi(S,"assertive"),w.current=o},[o,c,y,g]);let x=ae(e,{global:!0});return delete x.onClick,a.createElement(pe.button,{...Y(x,p,i,s,d),type:i.type==="submit"&&o?"button":i.type,id:g,ref:n,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":b.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(us.Provider,{value:{id:v}},p.children))}),qf=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function Yf(t,e){if(e){for(const n in t)n.startsWith("on")&&!qf.test(n)&&(t[n]=void 0);t.href=void 0,t.target=void 0}return t}const Xf=typeof document<"u"?a.useInsertionEffect??a.useLayoutEffect:()=>{};function Yn(t,e,n){let[r,o]=a.useState(t||e),i=a.useRef(r),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:r;Xf(()=>{i.current=c});let[,u]=a.useReducer(()=>({}),{}),d=a.useCallback((f,...b)=>{let p=typeof f=="function"?f(i.current):f;Object.is(i.current,p)||(i.current=p,o(p),u(),n==null||n(p,...b))},[n]);return[c,d]}const ws=a.createContext({}),Zf=a.forwardRef(function(e,n){[e,n]=Me(e,n,ws);let{children:r,level:o=3,className:i,...l}=e,s=pe[`h${o}`];return a.createElement(s,{...l,ref:n,className:i??"react-aria-Heading"},r)}),Jf=t=>t?"true":void 0;function Ee(t,e){return ff(t,(n,r)=>{const o=typeof e=="function"?e(r)??"":e??"";return Bt(o,n??"")??""})}const ie=(t,e,n)=>typeof t=="function"?t({className:e}):e,Qf=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Chevron right icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M5.47 2.97a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 0-1.06Z",fill:"currentColor",fillRule:"evenodd"})}),eh=({height:t=9,width:e=9,...n})=>h.jsx("svg",{"aria-hidden":"true","aria-label":"External link icon",fill:"none",height:t,role:"presentation",viewBox:"0 0 7 7",width:e,xmlns:"http://www.w3.org/2000/svg",...n,children:h.jsx("path",{d:"M1.20592 6.84333L0.379822 6.01723L4.52594 1.8672H1.37819L1.38601 0.731812H6.48742V5.83714H5.34421L5.35203 2.6933L1.20592 6.84333Z",fill:"currentColor"})}),th=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Close icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z",fill:"currentColor",fillRule:"evenodd"})}),Ci=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Info icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",fill:"currentColor",fillRule:"evenodd"})}),nh=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Warning icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M7.134 2.994L2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0a1 1 0 0 1 2 0",fill:"currentColor",fillRule:"evenodd"})}),rh=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Danger icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z",fill:"currentColor",fillRule:"evenodd"})}),oh=t=>h.jsx("svg",{"aria-hidden":"true","aria-label":"Success icon",fill:"none",height:16,role:"presentation",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...t,children:h.jsx("path",{clipRule:"evenodd",d:"M13.5 8a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858L6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",fill:"currentColor",fillRule:"evenodd"})}),Xn=a.createContext({}),ih=a.createContext({placement:"bottom"}),lh=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Si(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let Mt=new WeakMap,ye=[];function Es(t,e){let n=fe(t==null?void 0:t[0]),r=e instanceof n.Element?{root:e}:e,o=(r==null?void 0:r.root)??document.body,i=(r==null?void 0:r.shouldUseInert)&&lh,l=new Set(t),s=new Set,c=y=>i&&y instanceof n.HTMLElement?y.inert:y.getAttribute("aria-hidden")==="true",u=(y,w)=>{i&&y instanceof n.HTMLElement?y.inert=w:w?y.setAttribute("aria-hidden","true"):(y.removeAttribute("aria-hidden"),y instanceof n.HTMLElement&&(y.inert=!1))},d=new Set;if(Ae())for(let y of t){let w=y;for(;w&&w!==o;){let x=w.getRootNode();"shadowRoot"in x&&d.add(x.shadowRoot),w=x.parentNode}}let f=y=>{for(let T of y.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(T);let w=T=>{if(s.has(T)||l.has(T)||T.parentElement&&s.has(T.parentElement)&&T.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let M of l)if(H(T,M))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},x=Ll(Q(y),y,NodeFilter.SHOW_ELEMENT,{acceptNode:w}),S=w(y);if(S===NodeFilter.FILTER_ACCEPT&&b(y),S!==NodeFilter.FILTER_REJECT){let T=x.nextNode();for(;T!=null;)b(T),T=x.nextNode()}},b=y=>{let w=Mt.get(y)??0;c(y)&&w===0||(w===0&&u(y,!0),s.add(y),Mt.set(y,w+1))};ye.length&&ye[ye.length-1].disconnect(),f(o);let p=new MutationObserver(y=>{for(let w of y)if(w.type==="childList"){if(w.target.isConnected&&![...l,...s].some(x=>H(x,w.target)))for(let x of w.addedNodes)(x instanceof HTMLElement||x instanceof SVGElement)&&Si(x)?l.add(x):x instanceof Element&&f(x);if(Ae()){for(let x of d)if(!x.isConnected){p.disconnect();break}}}});p.observe(o,{childList:!0,subtree:!0});let g=new Set;if(Ae())for(let y of d){let w=new MutationObserver(x=>{for(let S of x)if(S.type==="childList"){if(S.target.isConnected&&![...l,...s].some(T=>H(T,S.target)))for(let T of S.addedNodes)(T instanceof HTMLElement||T instanceof SVGElement)&&Si(T)?l.add(T):T instanceof Element&&f(T);if(Ae()){for(let T of d)if(!T.isConnected){p.disconnect();break}}}});w.observe(y,{childList:!0,subtree:!0}),g.add(w)}let v={visibleNodes:l,hiddenNodes:s,observe(){p.observe(o,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}};return ye.push(v),()=>{if(p.disconnect(),Ae())for(let y of g)y.disconnect();for(let y of s){let w=Mt.get(y);w!=null&&(w===1?(u(y,!1),Mt.delete(y)):Mt.set(y,w-1))}v===ye[ye.length-1]?(ye.pop(),ye.length&&ye[ye.length-1].observe()):ye.splice(ye.indexOf(v),1)}}function sh(t){let e=ye[ye.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const Se={top:"top",bottom:"top",left:"left",right:"left"},On={top:"bottom",bottom:"top",left:"right",right:"left"},ah={top:"left",left:"top"},Hr={top:"height",left:"width"},Cs={width:"totalWidth",height:"totalHeight"},fn={};let ch=()=>typeof document<"u"?window.visualViewport:null;function Pi(t,e){let n=0,r=0,o=0,i=0,l=0,s=0,c={},u=((e==null?void 0:e.scale)??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let d=document.documentElement;o=d.clientWidth,i=d.clientHeight,n=(e==null?void 0:e.width)??o,r=(e==null?void 0:e.height)??i,c.top=d.scrollTop||t.scrollTop,c.left=d.scrollLeft||t.scrollLeft,e&&(l=e.offsetTop,s=e.offsetLeft)}else({width:n,height:r,top:l,left:s}=Gt(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,o=n,i=r;return Ml()&&(t.tagName==="BODY"||t.tagName==="HTML")&&u&&(c.top=0,c.left=0,l=(e==null?void 0:e.pageTop)??0,s=(e==null?void 0:e.pageLeft)??0),{width:n,height:r,totalWidth:o,totalHeight:i,scroll:c,top:l,left:s}}function uh(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function ki(t,e,n,r,o,i,l){let s=o.scroll[t]??0,c=r[Hr[t]],u=l[t]+r.scroll[Se[t]]+i,d=l[t]+r.scroll[Se[t]]+c-i,f=e-s+r.scroll[Se[t]]+l[t]-r[Se[t]],b=e-s+n+r.scroll[Se[t]]+l[t]-r[Se[t]];return f<u?u-f:b>d?Math.max(d-b,u-f):0}function dh(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 Ti(t){if(fn[t])return fn[t];let[e,n]=t.split(" "),r=Se[e]||"right",o=ah[r];Se[n]||(n="center");let i=Hr[r],l=Hr[o];return fn[t]={placement:e,crossPlacement:n,axis:r,crossAxis:o,size:i,crossSize:l},fn[t]}function xr(t,e,n,r,o,i,l,s,c,u,d){let{placement:f,crossPlacement:b,axis:p,crossAxis:g,size:v,crossSize:y}=r,w={};w[g]=t[g]??0,b==="center"?w[g]+=((t[y]??0)-(n[y]??0))/2:b!==g&&(w[g]+=(t[y]??0)-(n[y]??0)),w[g]+=i;const x=t[g]-n[y]+c+u,S=t[g]+t[y]-c-u;if(w[g]=Nn(w[g],x,S),f===p){let T=s?d[v]:d[Cs[v]];w[On[p]]=Math.floor(T-t[p]+o)}else w[p]=Math.floor(t[p]+t[v]+o);return w}function fh(t,e,n,r,o,i,l,s,c,u,d){let f=(t.top!=null?t.top:c[Cs.height]-(t.bottom??0)-l)-(c.scroll.top??0),b=u?n.top:0,p={top:Math.max(e.top+b,((d==null?void 0:d.offsetTop)??e.top)+b),bottom:Math.min(e.top+e.height+b,((d==null?void 0:d.offsetTop)??0)+((d==null?void 0:d.height)??0))};return s!=="top"?Math.max(0,p.bottom-f-((o.top??0)+(o.bottom??0)+i)):Math.max(0,f+l-p.top-((o.top??0)+(o.bottom??0)+i))}function Mi(t,e,n,r,o,i,l,s){let{placement:c,axis:u,size:d}=i;return c===u?Math.max(0,n[u]-(l.scroll[u]??0)-(t[u]+(s?e[u]:0))-(r[u]??0)-r[On[u]]-o):Math.max(0,t[d]+t[u]+(s?e[u]:0)-n[u]-n[d]+(l.scroll[u]??0)-(r[u]??0)-r[On[u]]-o)}function hh(t,e,n,r,o,i,l,s,c,u,d,f,b,p,g,v,y,w){let x=Ti(t),{size:S,crossAxis:T,crossSize:M,placement:L,crossPlacement:R}=x,N=xr(e,s,n,x,d,f,u,b,g,v,c),O=d,k=Mi(s,u,e,o,i+d,x,c,y);if(l&&n[S]>k){let ee=Ti(`${On[L]} ${R}`),le=xr(e,s,n,ee,d,f,u,b,g,v,c);Mi(s,u,e,o,i+d,ee,c,y)>k&&(x=ee,N=le,O=d)}let A="bottom";x.axis==="top"?x.placement==="top"?A="top":x.placement==="bottom"&&(A="bottom"):x.crossAxis==="top"&&(x.crossPlacement==="top"?A="bottom":x.crossPlacement==="bottom"&&(A="top"));let V=ki(T,N[T],n[M],s,c,i,u);N[T]+=V;let j=fh(N,s,u,b,o,i,n.height,A,c,y,w);p&&p<j&&(j=p),n.height=Math.min(n.height,j),N=xr(e,s,n,x,O,f,u,b,g,v,c),V=ki(T,N[T],n[M],s,c,i,u),N[T]+=V;let m={},E=e[T]-N[T]-o[Se[T]],I=E+.5*e[M];const C=g/2+v,D=Se[T]==="left"?(o.left??0)+(o.right??0):(o.top??0)+(o.bottom??0),$=n[M]-D-g/2-v,P=e[T]+g/2-(N[T]+o[Se[T]]),K=e[T]+e[M]-g/2-(N[T]+o[Se[T]]),U=Nn(I,P,K);m[T]=Nn(U,C,$),{placement:L,crossPlacement:R}=x,g?E=m[T]:R==="right"?E+=e[M]:R==="center"&&(E+=e[M]/2);let G=L==="left"||L==="top"?n[S]:0,W={x:L==="top"||L==="bottom"?E:G,y:L==="left"||L==="right"?E:G};return{position:N,maxHeight:j,arrowOffsetLeft:m.left,arrowOffsetTop:m.top,placement:L,triggerAnchorPoint:W}}function ph(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:s,offset:c,crossOffset:u,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:b=0}=t,p=ch(),g=r instanceof HTMLElement?bh(r):document.documentElement,v=g===document.documentElement;const y=window.getComputedStyle(g).position;let w=!!y&&y!=="static",x=v?Gt(n,!1):Ri(n,g,!1);if(!v){let{marginTop:k,marginLeft:A}=window.getComputedStyle(n);x.top+=parseInt(k,10)||0,x.left+=parseInt(A,10)||0}let S=Gt(r,!0),T=dh(r);S.width+=(T.left??0)+(T.right??0),S.height+=(T.top??0)+(T.bottom??0);let M=uh(o),L=Pi(s,p),R=Pi(g,p),N;if((s.tagName==="BODY"||s.tagName==="HTML")&&!v){let k=Zn(g,!1);N={top:-(k.top-L.top),left:-(k.left-L.left),width:0,height:0}}else(s.tagName==="BODY"||s.tagName==="HTML")&&v?N={top:0,left:0,width:0,height:0}:N=Ri(s,g,!1);let O=H(s,g);return hh(e,x,S,M,T,i,l,L,R,N,c,u,w,d,f,b,O,p)}function Zn(t,e){let{top:n,left:r,width:o,height:i}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(o=t.offsetWidth,i=t.offsetHeight),{top:n,left:r,width:o,height:i}}function Gt(t,e){let{top:n,left:r,width:o,height:i}=Zn(t,e),{scrollTop:l,scrollLeft:s,clientTop:c,clientLeft:u}=document.documentElement;return{top:n+l-c,left:r+s-u,width:o,height:i}}function Ri(t,e,n){let r=window.getComputedStyle(t),o;if(r.position==="fixed")o=Zn(t,n);else{o=Gt(t,n);let i=Gt(e,n),l=window.getComputedStyle(e);i.top+=(parseInt(l.borderTopWidth,10)||0)-e.scrollTop,i.left+=(parseInt(l.borderLeftWidth,10)||0)-e.scrollLeft,o.top-=i.top,o.left-=i.left}return o.top-=parseInt(r.marginTop,10)||0,o.left-=parseInt(r.marginLeft,10)||0,o}function bh(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!Di(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!Di(e);)e=e.parentElement;return e||document.documentElement}function Di(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 Ss=new WeakMap;function mh(t){let{triggerRef:e,isOpen:n,onClose:r}=t;a.useEffect(()=>{if(!n||r===null)return;let o=i=>{let l=F(i);if(!e.current||l instanceof Node&&!H(l,e.current)||l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)return;let s=r||Ss.get(e.current);s&&s()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[n,r,e])}let se=typeof document<"u"?window.visualViewport:null;function gh(t){let{direction:e}=dt(),{arrowSize:n,targetRef:r,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:b=0,shouldUpdatePosition:p=!0,isOpen:g=!0,onClose:v,maxHeight:y,arrowBoundaryOffset:w=0}=t,[x,S]=a.useState(null),T=[p,s,o.current,r.current,i==null?void 0:i.current,l.current,c,u,d,f,b,g,e,y,w,n],M=a.useRef(se==null?void 0:se.scale);a.useEffect(()=>{g&&(M.current=se==null?void 0:se.scale)},[g]);let L=a.useCallback(()=>{var j,m;if(p===!1||!g||!o.current||!r.current||!d||(se==null?void 0:se.scale)!==M.current)return;let O=null;if(l.current&&$t(l.current)){let E=(j=ne())==null?void 0:j.getBoundingClientRect(),I=l.current.getBoundingClientRect();O={type:"top",offset:((E==null?void 0:E.top)??0)-I.top},O.offset>I.height/2&&(O.type="bottom",O.offset=((E==null?void 0:E.bottom)??0)-I.bottom)}let k=o.current;!y&&o.current&&(k.style.top="0px",k.style.bottom="",k.style.maxHeight=(((m=window.visualViewport)==null?void 0:m.height)??window.innerHeight)+"px");let A=ph({placement:vh(s,e),overlayNode:o.current,targetNode:r.current,scrollNode:l.current||o.current,padding:c,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:b,maxHeight:y,arrowSize:n??(i!=null&&i.current?Zn(i.current,!0).width:0),arrowBoundaryOffset:w});if(!A.position)return;k.style.top="",k.style.bottom="",k.style.left="",k.style.right="",Object.keys(A.position).forEach(E=>k.style[E]=A.position[E]+"px"),k.style.maxHeight=A.maxHeight!=null?A.maxHeight+"px":"";let V=ne();if(O&&V&&l.current){let E=V.getBoundingClientRect(),I=l.current.getBoundingClientRect(),C=E[O.type]-I[O.type];l.current.scrollTop+=C-O.offset}S(A)},T);J(L,T),yh(L),kn({ref:o,onResize:L}),kn({ref:r,onResize:L});let R=a.useRef(!1);J(()=>{let O,k=()=>{R.current=!0,clearTimeout(O),O=setTimeout(()=>{R.current=!1},500),L()},A=()=>{R.current&&k()};return se==null||se.addEventListener("resize",k),se==null||se.addEventListener("scroll",A),()=>{se==null||se.removeEventListener("resize",k),se==null||se.removeEventListener("scroll",A)}},[L]);let N=a.useCallback(()=>{R.current||v==null||v()},[v,R]);return mh({triggerRef:r,isOpen:g,onClose:v&&N}),{overlayProps:{style:{position:x?"absolute":"fixed",top:x?void 0:0,left:x?void 0:0,zIndex:1e5,...x==null?void 0:x.position,maxHeight:(x==null?void 0:x.maxHeight)??"100vh"}},placement:(x==null?void 0:x.placement)??null,triggerAnchorPoint:(x==null?void 0:x.triggerAnchorPoint)??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:x==null?void 0:x.arrowOffsetLeft,top:x==null?void 0:x.arrowOffsetTop}},updatePosition:L}}function yh(t){J(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function vh(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const Ni=a.createContext(null),Ur="react-aria-focus-scope-restore";let re=null;function Ps(t){let{children:e,contain:n,restoreFocus:r,autoFocus:o}=t,i=a.useRef(null),l=a.useRef(null),s=a.useRef([]),{parentNode:c}=a.useContext(Ni)||{},u=a.useMemo(()=>new Wr({scopeRef:s}),[s]);J(()=>{let b=c||ce.root;if(ce.getTreeNode(b.scopeRef)&&re&&!Fn(re,b.scopeRef)){let p=ce.getTreeNode(re);p&&(b=p)}b.addChild(u),ce.addNode(u)},[u,c]),J(()=>{let b=ce.getTreeNode(s);b&&(b.contain=!!n)},[n]),J(()=>{var v;let b=(v=i.current)==null?void 0:v.nextSibling,p=[],g=y=>y.stopPropagation();for(;b&&b!==l.current;)p.push(b),b.addEventListener(Ur,g),b=b.nextSibling;return s.current=p,()=>{for(let y of p)y.removeEventListener(Ur,g)}},[e]),Ph(s,r,n),Eh(s,n),kh(s,r,n),Sh(s,o),a.useEffect(()=>{const b=ne(Q(s.current?s.current[0]:void 0));let p=null;if(ke(b,s.current)){for(let g of ce.traverse())g.scopeRef&&ke(b,g.scopeRef.current)&&(p=g);p===ce.getTreeNode(s)&&(re=p.scopeRef)}},[s]),J(()=>()=>{var p,g;let b=((g=(p=ce.getTreeNode(s))==null?void 0:p.parent)==null?void 0:g.scopeRef)??null;(s===re||Fn(s,re))&&(!b||ce.getTreeNode(b))&&(re=b),ce.removeTreeNode(s)},[s]);let d=a.useMemo(()=>xh(s),[]),f=a.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return a.createElement(Ni.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 xh(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:o,wrap:i,accept:l}=e,s=r||ne(Q(n[0]??void 0)),c=n[0].previousElementSibling,u=rt(n),d=Fe(u,{tabbable:o,accept:l},n);d.currentNode=ke(s,n)?s:c;let f=d.nextNode();return!f&&i&&(d.currentNode=c,f=d.nextNode()),f&&Oe(f,!0),f},focusPrevious(e={}){let n=t.current,{from:r,tabbable:o,wrap:i,accept:l}=e,s=r||ne(Q(n[0]??void 0)),c=n[n.length-1].nextElementSibling,u=rt(n),d=Fe(u,{tabbable:o,accept:l},n);d.currentNode=ke(s,n)?s:c;let f=d.previousNode();return!f&&i&&(d.currentNode=c,f=d.previousNode()),f&&Oe(f,!0),f},focusFirst(e={}){let n=t.current,{tabbable:r,accept:o}=e,i=rt(n),l=Fe(i,{tabbable:r,accept:o},n);l.currentNode=n[0].previousElementSibling;let s=l.nextNode();return s&&Oe(s,!0),s},focusLast(e={}){let n=t.current,{tabbable:r,accept:o}=e,i=rt(n),l=Fe(i,{tabbable:r,accept:o},n);l.currentNode=n[n.length-1].nextElementSibling;let s=l.previousNode();return s&&Oe(s,!0),s}}}function rt(t){return t[0].parentElement}function At(t){let e=ce.getTreeNode(re);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function $h(t){if(!t.form)return Array.from(Q(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(r=>!r.form);const e=t.form.elements.namedItem(t.name);let n=fe(t);return e instanceof n.RadioNodeList?Array.from(e).filter(r=>r instanceof n.HTMLInputElement):e instanceof n.HTMLInputElement?[e]:[]}function wh(t){if(t.checked)return!0;const e=$h(t);return e.length>0&&!e.some(n=>n.checked)}function Eh(t,e){let n=a.useRef(void 0),r=a.useRef(void 0);J(()=>{let o=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const i=Q(o?o[0]:void 0);let l=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!At(t)||u.isComposing)return;let d=ne(i),f=t.current;if(!f||!ke(d,f))return;let b=rt(f),p=Fe(b,{tabbable:!0},f);if(!d)return;p.currentNode=d;let g=u.shiftKey?p.previousNode():p.nextNode();g||(p.currentNode=u.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,g=u.shiftKey?p.previousNode():p.nextNode()),u.preventDefault(),g&&(Oe(g,!0),g instanceof fe(g).HTMLInputElement&&g.select())},s=u=>{(!re||Fn(re,t))&&ke(F(u),t.current)?(re=t,n.current=F(u)):At(t)&&!We(F(u),t)?n.current?n.current.focus():re&&re.current&&Gr(re.current):At(t)&&(n.current=F(u))},c=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{var p;let d=Ht(),f=(d==="virtual"||d===null)&&uo()&&Rl(),b=ne(i);if(!f&&b&&At(t)&&!We(b,t)){re=t;let g=F(u);g&&g.isConnected?(n.current=g,(p=n.current)==null||p.focus()):re.current&&Gr(re.current)}})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",s,!1),o==null||o.forEach(u=>u.addEventListener("focusin",s,!1)),o==null||o.forEach(u=>u.addEventListener("focusout",c,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",s,!1),o==null||o.forEach(u=>u.removeEventListener("focusin",s,!1)),o==null||o.forEach(u=>u.removeEventListener("focusout",c,!1))}},[t,e]),J(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function ks(t){return We(t)}function ke(t,e){return!t||!e?!1:e.some(n=>H(n,t))}function We(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of ce.traverse(ce.getTreeNode(e)))if(n&&ke(t,n.current))return!0;return!1}function Ch(t){return We(t,re)}function Fn(t,e){var r;let n=(r=ce.getTreeNode(e))==null?void 0:r.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function Oe(t,e=!1){if(t!=null&&!e)try{Ye(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Ts(t,e=!0){let n=t[0].previousElementSibling,r=rt(t),o=Fe(r,{tabbable:e},t);o.currentNode=n;let i=o.nextNode();return e&&!i&&(r=rt(t),o=Fe(r,{tabbable:!1},t),o.currentNode=n,i=o.nextNode()),i}function Gr(t,e=!0){Oe(Ts(t,e))}function Sh(t,e){const n=a.useRef(e);a.useEffect(()=>{if(n.current){re=t;const r=Q(t.current?t.current[0]:void 0);!ke(ne(r),re.current)&&t.current&&Gr(t.current)}n.current=!1},[t])}function Ph(t,e,n){J(()=>{if(e||n)return;let r=t.current;const o=Q(r?r[0]:void 0);let i=l=>{let s=F(l);ke(s,t.current)?re=t:ks(s)||(re=null)};return o.addEventListener("focusin",i,!1),r==null||r.forEach(l=>l.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),r==null||r.forEach(l=>l.removeEventListener("focusin",i,!1))}},[t,e,n])}function Ii(t){let e=ce.getTreeNode(re);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function kh(t,e,n){const r=a.useRef(typeof document<"u"?ne(Q(t.current?t.current[0]:void 0)):null);J(()=>{let o=t.current;const i=Q(o?o[0]:void 0);if(!e||n)return;let l=()=>{(!re||Fn(re,t))&&ke(ne(i),t.current)&&(re=t)};return i.addEventListener("focusin",l,!1),o==null||o.forEach(s=>s.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),o==null||o.forEach(s=>s.removeEventListener("focusin",l,!1))}},[t,n]),J(()=>{const o=Q(t.current?t.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!At(t)||l.isComposing)return;let s=o.activeElement;if(!We(s,t)||!Ii(t))return;let c=ce.getTreeNode(t);if(!c)return;let u=c.nodeToRestore,d=Fe(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||!We(f,t))&&u){d.currentNode=u;do f=l.shiftKey?d.previousNode():d.nextNode();while(We(f,t));l.preventDefault(),l.stopPropagation(),f?Oe(f,!0):ks(u)?Oe(u,!0):s.blur()}};return n||o.addEventListener("keydown",i,!0),()=>{n||o.removeEventListener("keydown",i,!0)}},[t,e,n]),J(()=>{const o=Q(t.current?t.current[0]:void 0);if(!e)return;let i=ce.getTreeNode(t);if(i)return i.nodeToRestore=r.current??void 0,()=>{let l=ce.getTreeNode(t);if(!l)return;let s=l.nodeToRestore,c=ne(o);if(e&&s&&(c&&We(c,t)||c===o.body&&Ii(t))){let u=ce.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=u.getTreeNode(t);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){Li(d.nodeToRestore);return}d=d.parent}for(d=u.getTreeNode(t);d;){if(d.scopeRef&&d.scopeRef.current&&ce.getTreeNode(d.scopeRef)){let f=Ts(d.scopeRef.current,!0);Li(f);return}d=d.parent}}})}}},[t,e])}function Li(t){t.dispatchEvent(new CustomEvent(Ur,{bubbles:!0,cancelable:!0}))&&Oe(t)}function Fe(t,e,n){let r=e!=null&&e.tabbable?_l:mo,o=(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null,i=Q(o),l=Ll(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(s){return H(e==null?void 0:e.from,s)||e!=null&&e.tabbable&&s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(!wh(s)||l.currentNode.tagName==="INPUT"&&l.currentNode.type==="radio"&&l.currentNode.name===s.name)?NodeFilter.FILTER_REJECT:r(s)&&(!n||ke(s,n))&&(!(e!=null&&e.accept)||e.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(l.currentNode=e.from),l}class So{constructor(){this.fastMap=new Map,this.root=new Wr({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let o=this.fastMap.get(n??null);if(!o)return;let i=new Wr({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),r&&(i.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ke(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let o=n.children;r&&(r.removeChild(n),o.size>0&&o.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var n;let e=new So;for(let r of this.traverse())e.addTreeNode(r.scopeRef,((n=r.parent)==null?void 0:n.scopeRef)??null,r.nodeToRestore);return e}}class Wr{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 So;function Th(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=t,i=a.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Pe(c=>{n&&hn(c,e)&&(o&&o(c),i.current.isPointerDown=!0)}),s=Pe(c=>{n&&n(c)});a.useEffect(()=>{let c=i.current;if(r)return;const u=e.current,d=Q(u);if(typeof PointerEvent<"u"){let f=b=>{c.isPointerDown&&hn(b,e)&&s(b),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=p=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&hn(p,e)&&s(p),c.isPointerDown=!1},b=p=>{c.ignoreEmulatedMouseEvents=!0,c.isPointerDown&&hn(p,e)&&s(p),c.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",b,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",b,!0)}}},[e,r])}function hn(t,e){if(t.button>0)return!1;let n=F(t);if(n){const r=n.ownerDocument;if(!r||!H(r.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const Ne=[];function Ms(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:s}=t,c=a.useRef(void 0);a.useEffect(()=>{if(o&&!Ne.includes(e))return Ne.push(e),()=>{let g=Ne.indexOf(e);g>=0&&Ne.splice(g,1)}},[o,e]);let u=()=>{Ne[Ne.length-1]===e&&n&&n()},d=g=>{const v=Ne[Ne.length-1];c.current=v,(!s||s(F(g)))&&v===e&&g.stopPropagation()},f=g=>{(!s||s(F(g)))&&(Ne[Ne.length-1]===e&&g.stopPropagation(),c.current===e&&u()),c.current=void 0},b=g=>{g.key==="Escape"&&!l&&!g.nativeEvent.isComposing&&(g.stopPropagation(),g.preventDefault(),u())};Th({ref:e,onInteractOutside:i&&o?f:void 0,onInteractOutsideStart:d});let{focusWithinProps:p}=wo({isDisabled:!r,onBlurWithin:g=>{!g.relatedTarget||Ch(g.relatedTarget)||(!s||s(g.relatedTarget))&&(n==null||n())}});return{overlayProps:{onKeyDown:b,...p},underlayProps:{}}}const _t=typeof document<"u"&&window.visualViewport;let pn=0,$r;function Rs(t={}){let{isDisabled:e}=t;J(()=>{if(!e)return pn++,pn===1&&(lt()?$r=Rh():$r=Mh()),()=>{pn--,pn===0&&$r()}},[e])}function Mh(){let t=window.innerWidth-document.documentElement.clientWidth;return Zt(t>0&&("scrollbarGutter"in document.documentElement.style?wn(document.documentElement,"scrollbarGutter","stable"):wn(document.documentElement,"paddingRight",`${t}px`)),wn(document.documentElement,"overflow","hidden"))}function Rh(){let t=wn(document.documentElement,"overflow","hidden"),e,n=!1,r=d=>{let f=F(d);e=st(f)?f:Fl(f,!0),n=!1;let b=f.ownerDocument.defaultView.getSelection();b&&!b.isCollapsed&&b.containsNode(f,!0)&&(n=!0),d.composedPath().some(p=>p instanceof HTMLInputElement&&p.type==="range")&&(n=!0),"selectionStart"in f&&"selectionEnd"in f&&f.selectionStart<f.selectionEnd&&f.ownerDocument.activeElement===f&&(n=!0)},o=document.createElement("style"),i=Vl();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||n)){if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&d.preventDefault()}},s=d=>{var p;let f=F(d),b=d.relatedTarget;if(b&&Ft(b))b.focus({preventScroll:!0}),Mi(b,Ft(f));else if(!b){let g=(p=f.parentElement)==null?void 0:p.closest("[tabindex]");g==null||g.focus({preventScroll:!0})}},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(d){let f=ne(),b=f!=null&&Ft(f);c.call(this,{...d,preventScroll:!0}),(!d||!d.preventScroll)&&Mi(this,b)};let u=Zt(vr(document,"touchstart",r,{passive:!1,capture:!0}),vr(document,"touchmove",l,{passive:!1,capture:!0}),vr(document,"blur",s,!0));return()=>{t(),u(),o.remove(),HTMLElement.prototype.focus=c}}function wn(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function vr(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Mi(t,e){e||!_t?Ri(t):_t.addEventListener("resize",()=>Ri(t),{once:!0})}function Ri(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Nl(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();if(i.top<o.top||i.bottom>o.top+n.clientHeight){let l=o.bottom;_t&&(l=Math.min(l,_t.offsetTop+_t.height));let s=i.top-o.top-((l-o.top)/2-i.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+s)),behavior:"smooth"})}}n=r.parentElement}}function vh(t,e){let{triggerRef:n,popoverRef:r,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:s,...c}=t,u=c.trigger==="SubmenuTrigger",{overlayProps:d,underlayProps:f}=Es({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:s},o??r),{overlayProps:b,arrowProps:p,placement:g,triggerAnchorPoint:y}=ih({...c,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i&&!u?e.close:null});return Cs({isDisabled:i||!e.isOpen}),a.useEffect(()=>{if(e.isOpen&&r.current)return i?Yf((o==null?void 0:o.current)??r.current):gs([(o==null?void 0:o.current)??r.current],{shouldUseInert:!0})},[i,e.isOpen,r,o]),{popoverProps:Y(d,b),arrowProps:p,underlayProps:f,placement:g,triggerAnchorPoint:y}}var Ss={};Ss={dismiss:"تجاهل"};var Ps={};Ps={dismiss:"Отхвърляне"};var ks={};ks={dismiss:"Odstranit"};var Ts={};Ts={dismiss:"Luk"};var Ms={};Ms={dismiss:"Schließen"};var Rs={};Rs={dismiss:"Απόρριψη"};var Ds={};Ds={dismiss:"Dismiss"};var Ns={};Ns={dismiss:"Descartar"};var Is={};Is={dismiss:"Lõpeta"};var Ls={};Ls={dismiss:"Hylkää"};var Ks={};Ks={dismiss:"Rejeter"};var As={};As={dismiss:"התעלם"};var Os={};Os={dismiss:"Odbaci"};var Fs={};Fs={dismiss:"Elutasítás"};var js={};js={dismiss:"Ignora"};var _s={};_s={dismiss:"閉じる"};var Bs={};Bs={dismiss:"무시"};var Vs={};Vs={dismiss:"Atmesti"};var zs={};zs={dismiss:"Nerādīt"};var Hs={};Hs={dismiss:"Lukk"};var Us={};Us={dismiss:"Negeren"};var Ws={};Ws={dismiss:"Zignoruj"};var Gs={};Gs={dismiss:"Descartar"};var qs={};qs={dismiss:"Dispensar"};var Ys={};Ys={dismiss:"Revocare"};var Xs={};Xs={dismiss:"Пропустить"};var Zs={};Zs={dismiss:"Zrušiť"};var Js={};Js={dismiss:"Opusti"};var Qs={};Qs={dismiss:"Odbaci"};var ea={};ea={dismiss:"Avvisa"};var ta={};ta={dismiss:"Kapat"};var na={};na={dismiss:"Скасувати"};var ra={};ra={dismiss:"取消"};var oa={};oa={dismiss:"關閉"};var ia={};ia={"ar-AE":Ss,"bg-BG":Ps,"cs-CZ":ks,"da-DK":Ts,"de-DE":Ms,"el-GR":Rs,"en-US":Ds,"es-ES":Ns,"et-EE":Is,"fi-FI":Ls,"fr-FR":Ks,"he-IL":As,"hr-HR":Os,"hu-HU":Fs,"it-IT":js,"ja-JP":_s,"ko-KR":Bs,"lt-LT":Vs,"lv-LV":zs,"nb-NO":Hs,"nl-NL":Us,"pl-PL":Ws,"pt-BR":Gs,"pt-PT":qs,"ro-RO":Ys,"ru-RU":Xs,"sk-SK":Zs,"sl-SI":Js,"sr-SP":Qs,"sv-SE":ea,"tr-TR":ta,"uk-UA":na,"zh-CN":ra,"zh-TW":oa};const xh=Symbol.for("react-aria.i18n.locale"),$h=Symbol.for("react-aria.i18n.strings");let ht;class Zn{constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}getStringForLocale(e,n){let o=this.getStringsForLocale(n)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${n} locale`);return o}getStringsForLocale(e){let n=this.strings[e];return n||(n=wh(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[xh];if(ht===void 0){let o=window[$h];if(!o)return null;ht={};for(let i in o)ht[i]=new Zn({[n]:o[i]},n)}let r=ht==null?void 0:ht[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function wh(t,e,n="en-US"){if(e[t])return e[t];let r=Eh(t);if(e[r])return e[r];for(let o in e)if(o.startsWith(r+"-"))return e[o];return e[n]}function Eh(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const Di=new Map,Ni=new Map;class Ch{constructor(e,n){this.locale=e,this.strings=n}format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let o=n["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+r,l=Di.get(i);l||(l=new Intl.PluralRules(this.locale,{type:r}),Di.set(i,l));let s=l.select(e);return o=n[s]||n.other,typeof o=="function"?o():o}number(e){let n=Ni.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Ni.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}}const Ii=new WeakMap;function Sh(t){let e=Ii.get(t);return e||(e=new Zn(t),Ii.set(t,e)),e}function Ph(t,e){return e&&Zn.getGlobalDictionaryForPackage(e)||Sh(t)}function la(t,e){let{locale:n}=dt(),r=Ph(t,e);return a.useMemo(()=>new Ch(n,r),[n,r])}const Li={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 kh(t={}){let{style:e,isFocusable:n}=t,[r,o]=a.useState(!1),{focusWithinProps:i}=yo({isDisabled:!n,onFocusWithinChange:s=>o(s)}),l=a.useMemo(()=>r?e:e?{...Li,...e}:Li,[r]);return{visuallyHiddenProps:{...i,style:l}}}function sa(t){let{children:e,elementType:n="div",isFocusable:r,style:o,...i}=t,{visuallyHiddenProps:l}=kh(t);return a.createElement(n,Y(i,l),e)}function Th(t){return t&&t.__esModule?t.default:t}function Ur(t){let{onDismiss:e,...n}=t,r=la(Th(ia),"@react-aria/overlays"),o=Dl(n,r.format("dismiss")),i=()=>{e&&e()};return a.createElement(sa,null,a.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}const aa=a.forwardRef(({children:t,...e},n)=>{let r=a.useRef(!1),o=a.useContext(Ut),i=Y(o||{},{...e,register(){r.current=!0,o&&o.register()}});return i.ref=Je(n||(o==null?void 0:o.ref)),so(o,i.ref),a.useEffect(()=>{r.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."),r.current=!0)},[]),a.createElement(Ut.Provider,{value:i},t)});function Mh({children:t}){let e=a.useMemo(()=>({register:()=>{}}),[]);return a.createElement(Ut.Provider,{value:e},t)}const Rh=a.createContext({});function Dh(){return a.useContext(Rh)??{}}const ca=a.createContext(null);function Wr(t){let e=Ze(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[o,i]=a.useState(!1),l=a.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=Dh();if(!t.portalContainer&&s&&(n=s()),!n)return null;let c=t.children;return t.disableFocusManagement||(c=a.createElement(xs,{restoreFocus:!0,contain:(t.shouldContainFocus||o)&&!r},c)),c=a.createElement(ca.Provider,{value:l},a.createElement(Mh,null,c)),Yt.createPortal(c,n)}function ua(){let t=a.useContext(ca),e=t==null?void 0:t.setContain;J(()=>{e==null||e(!0)},[e])}function wo(t){let[e,n]=qn(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=a.useCallback(()=>{n(!0)},[n]),o=a.useCallback(()=>{n(!1)},[n]),i=a.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:o,toggle:i}}const Jn=a.createContext(null),Ki=a.createContext(null),Nh=a.forwardRef(function(e,n){[e,n]=Me(e,n,Jn);let r=a.useContext(Qe),o=wo(e),i=e.isOpen!=null||e.defaultOpen!=null||!r?o:r,l=Mr(n,i.isOpen)||e.isExiting||!1,s=es(),{direction:c}=dt();if(s){let u=e.children;return typeof u=="function"&&(u=u({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),a.createElement(a.Fragment,null,u)}return i&&!i.isOpen&&!l?null:a.createElement(Ih,{...e,triggerRef:e.triggerRef,state:i,popoverRef:n,isExiting:l,dir:c})});function Ih({state:t,isExiting:e,UNSTABLE_portalContainer:n,clearContexts:r,...o}){var k,A;let i=a.useRef(null),l=a.useRef(null),s=a.useContext(Ki),c=s&&o.trigger==="SubmenuTrigger",{popoverProps:u,underlayProps:d,arrowProps:f,placement:b,triggerAnchorPoint:p}=vh({...o,offset:o.offset??8,arrowRef:i,groupRef:c?s:l},t),g=o.popoverRef,y=ao(g,!!b)||o.isEntering||!1,v=Te({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:b,isEntering:y,isExiting:e}}),w=!o.isNonModal||o.trigger==="SubmenuTrigger",[x,P]=a.useState(!1);J(()=>{g.current&&P(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),a.useEffect(()=>{x&&(o.trigger!=="SubmenuTrigger"||Ht()!=="pointer")&&g.current&&!$t(g.current)&&Ye(g.current)},[x,g,o.trigger]);let T=a.useMemo(()=>{let V=v.children;if(r)for(let j of r)V=a.createElement(j.Provider,{value:null},V);return V},[v.children,r]),[R,K]=a.useState(null),M=a.useCallback(()=>{o.triggerRef.current&&K(o.triggerRef.current.getBoundingClientRect().width+"px")},[o.triggerRef]);J(M,[M]),Pn({ref:(k=v.style)!=null&&k["--trigger-width"]?void 0:o.triggerRef,onResize:M});let N={...u.style,"--trigger-anchor-point":p?`${p.x}px ${p.y}px`:void 0,...v.style,"--trigger-width":((A=v.style)==null?void 0:A["--trigger-width"])||R},O=a.createElement(pe.div,{...Y(ae(o,{global:!0}),u),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:g,slot:o.slot||void 0,style:N,dir:o.dir,"data-trigger":o.trigger,"data-placement":b,"data-entering":y||void 0,"data-exiting":e||void 0},!o.isNonModal&&a.createElement(Ur,{onDismiss:t.close}),a.createElement(Gf.Provider,{value:{...f,placement:b,ref:i}},T),a.createElement(Ur,{onDismiss:t.close}));return c?a.createElement(Wr,{...o,shouldContainFocus:x,isExiting:e,portalContainer:n??(s==null?void 0:s.current)??void 0},O):a.createElement(Wr,{...o,shouldContainFocus:x,isExiting:e,portalContainer:n},!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(Ki.Provider,{value:l},O)))}class St{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,n,r){let o=this.clone();return n.addDescendants(o,e),o}}class da extends St{filter(e,n,r){let[o,i]=fa(e,n,this.firstChildKey,r),l=this.clone();return l.firstChildKey=o,l.lastChildKey=i,l}}const No=class No extends St{};No.type="header";let Ai=No;const Io=class Io extends St{};Io.type="loader";let Oi=Io;const Lo=class Lo extends da{filter(e,n,r){if(r(this.textValue,this)){let o=this.clone();return n.addDescendants(o,e),o}return null}};Lo.type="item";let Gr=Lo;const Ko=class Ko extends da{filter(e,n,r){let o=super.filter(e,n,r);if(o&&o.lastChildKey!==null){let i=e.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}};Ko.type="section";let qr=Ko;class Lh{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 n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),o=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?n.get(o.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);return(n==null?void 0:n.key)??null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);return(e==null?void 0:e.key)??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n.itemCount=this.itemCount,n}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,n){this.addNode(e);let r=n.getChildren(e.key);for(let o of r)this.addDescendants(o,n)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let n=this.keyMap.get(e);n!=null&&n.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new this.constructor,[r,o]=fa(this,n,this.firstKey,e);return n==null||n.commit(r,o),n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function fa(t,e,n,r){if(n==null)return[null,null];let o=null,i=null,l=t.getItem(n);for(;l!=null;){let s=l.filter(t,e,r);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==null?void 0:o.key)??null,(i==null?void 0:i.key)??null]}class ha{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(){var e;return((e=this.parentNode)==null?void 0:e.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,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index-1,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.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 vt extends ha{constructor(e,n){super(n),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(){var e;return this.parentNode instanceof vt?this.parentNode.level+(((e=this.parentNode.node)==null?void 0:e.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(){var r,o,i,l,s,c,u,d;let e=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof vt?((r=this.parentNode.node)==null?void 0:r.key)??null:null,n.prevKey=((i=(o=this.previousVisibleSibling)==null?void 0:o.node)==null?void 0:i.key)??null,n.nextKey=((l=e==null?void 0:e.node)==null?void 0:l.key)??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=((c=(s=this.firstVisibleChild)==null?void 0:s.node)==null?void 0:c.key)??null,n.lastChildKey=((d=(u=this.lastVisibleChild)==null?void 0:u.node)==null?void 0:d.key)??null,(n.colSpan!=null||n.colIndex!=null)&&e)){let f=(n.colIndex??n.index)+(n.colSpan??1);if(e.node!=null&&f!==e.node.colIndex){let b=e.getMutableNode();b.colIndex=f}}}setProps(e,n,r,o,i){let l,{value:s,textValue:c,id:u,...d}=e;if(this.node==null?(l=new r(u??`react-aria-${++this.ownerDocument.nodeId}`),this.node=l):l=this.getMutableNode(),d.ref=n,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(n){var o,i;let r=n==="none";if(e.isHidden!==r){(((o=e.parentNode)==null?void 0:o.firstVisibleChild)===e||((i=e.parentNode)==null?void 0:i.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let l=e.previousVisibleSibling,s=e.nextVisibleSibling;l&&e.ownerDocument.markDirty(l),s&&e.ownerDocument.markDirty(s),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class Kh extends ha{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 vt(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 n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){var e,n,r,o;for(let i of this.dirtyNodes)i instanceof vt&&(!i.isConnected||i.isHidden)?this.removeNode(i):i.updateChildIndices();for(let i of this.dirtyNodes)i instanceof vt?(i.isConnected&&!i.isHidden&&(i.updateNode(),this.addNode(i)),i.node&&this.dirtyNodes.delete(i),i.isMutated=!1):this.dirtyNodes.delete(i);this.nextCollection&&(this.nextCollection.commit(((n=(e=this.firstVisibleChild)==null?void 0:e.node)==null?void 0:n.key)??null,((o=(r=this.lastVisibleChild)==null?void 0:r.node)==null?void 0:o.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.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function pa(t){let{children:e,items:n,idScope:r,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(n&&typeof e=="function"){let c=[];for(let u of n){let d=Ah(u)?u:null,f=d?s.get(d):null;if(!f){f=e(u);let b=f.props.id??(u==null?void 0:u.key)??(u==null?void 0:u.id);r!=null&&f.props.id==null&&b!=null&&(b=r+":"+b);let p=b??c.length;f=a.cloneElement(f,o?{key:p,id:b,value:u}:{key:p}),d&&s.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,n,s,r,o])}function Ah(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}var bn={exports:{}},xr={};/**
12
+ }`.trim(),document.head.prepend(o);let l=d=>{if(!(d.touches.length===2||n)){if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&d.preventDefault()}},s=d=>{var p;let f=F(d),b=d.relatedTarget;if(b&&Ft(b))b.focus({preventScroll:!0}),Ki(b,Ft(f));else if(!b){let g=(p=f.parentElement)==null?void 0:p.closest("[tabindex]");g==null||g.focus({preventScroll:!0})}},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(d){let f=ne(),b=f!=null&&Ft(f);c.call(this,{...d,preventScroll:!0}),(!d||!d.preventScroll)&&Ki(this,b)};let u=Zt(wr(document,"touchstart",r,{passive:!1,capture:!0}),wr(document,"touchmove",l,{passive:!1,capture:!0}),wr(document,"blur",s,!0));return()=>{t(),u(),o.remove(),HTMLElement.prototype.focus=c}}function wn(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function wr(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Ki(t,e){e||!_t?Ai(t):_t.addEventListener("resize",()=>Ai(t),{once:!0})}function Ai(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Fl(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();if(i.top<o.top||i.bottom>o.top+n.clientHeight){let l=o.bottom;_t&&(l=Math.min(l,_t.offsetTop+_t.height));let s=i.top-o.top-((l-o.top)/2-i.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+s)),behavior:"smooth"})}}n=r.parentElement}}function Dh(t,e){let{triggerRef:n,popoverRef:r,groupRef:o,isNonModal:i,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:s,...c}=t,u=c.trigger==="SubmenuTrigger",{overlayProps:d,underlayProps:f}=Ms({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!i||u,isKeyboardDismissDisabled:l,shouldCloseOnInteractOutside:s},o??r),{overlayProps:b,arrowProps:p,placement:g,triggerAnchorPoint:v}=gh({...c,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:i&&!u?e.close:null});return Rs({isDisabled:i||!e.isOpen}),a.useEffect(()=>{if(e.isOpen&&r.current)return i?sh((o==null?void 0:o.current)??r.current):Es([(o==null?void 0:o.current)??r.current],{shouldUseInert:!0})},[i,e.isOpen,r,o]),{popoverProps:Y(d,b),arrowProps:p,underlayProps:f,placement:g,triggerAnchorPoint:v}}var Ds={};Ds={dismiss:"تجاهل"};var Ns={};Ns={dismiss:"Отхвърляне"};var Is={};Is={dismiss:"Odstranit"};var Ls={};Ls={dismiss:"Luk"};var Ks={};Ks={dismiss:"Schließen"};var As={};As={dismiss:"Απόρριψη"};var Os={};Os={dismiss:"Dismiss"};var Fs={};Fs={dismiss:"Descartar"};var js={};js={dismiss:"Lõpeta"};var _s={};_s={dismiss:"Hylkää"};var Bs={};Bs={dismiss:"Rejeter"};var Vs={};Vs={dismiss:"התעלם"};var zs={};zs={dismiss:"Odbaci"};var Hs={};Hs={dismiss:"Elutasítás"};var Us={};Us={dismiss:"Ignora"};var Gs={};Gs={dismiss:"閉じる"};var Ws={};Ws={dismiss:"무시"};var qs={};qs={dismiss:"Atmesti"};var Ys={};Ys={dismiss:"Nerādīt"};var Xs={};Xs={dismiss:"Lukk"};var Zs={};Zs={dismiss:"Negeren"};var Js={};Js={dismiss:"Zignoruj"};var Qs={};Qs={dismiss:"Descartar"};var ea={};ea={dismiss:"Dispensar"};var ta={};ta={dismiss:"Revocare"};var na={};na={dismiss:"Пропустить"};var ra={};ra={dismiss:"Zrušiť"};var oa={};oa={dismiss:"Opusti"};var ia={};ia={dismiss:"Odbaci"};var la={};la={dismiss:"Avvisa"};var sa={};sa={dismiss:"Kapat"};var aa={};aa={dismiss:"Скасувати"};var ca={};ca={dismiss:"取消"};var ua={};ua={dismiss:"關閉"};var da={};da={"ar-AE":Ds,"bg-BG":Ns,"cs-CZ":Is,"da-DK":Ls,"de-DE":Ks,"el-GR":As,"en-US":Os,"es-ES":Fs,"et-EE":js,"fi-FI":_s,"fr-FR":Bs,"he-IL":Vs,"hr-HR":zs,"hu-HU":Hs,"it-IT":Us,"ja-JP":Gs,"ko-KR":Ws,"lt-LT":qs,"lv-LV":Ys,"nb-NO":Xs,"nl-NL":Zs,"pl-PL":Js,"pt-BR":Qs,"pt-PT":ea,"ro-RO":ta,"ru-RU":na,"sk-SK":ra,"sl-SI":oa,"sr-SP":ia,"sv-SE":la,"tr-TR":sa,"uk-UA":aa,"zh-CN":ca,"zh-TW":ua};const Nh=Symbol.for("react-aria.i18n.locale"),Ih=Symbol.for("react-aria.i18n.strings");let ht;class Jn{constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}getStringForLocale(e,n){let o=this.getStringsForLocale(n)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${n} locale`);return o}getStringsForLocale(e){let n=this.strings[e];return n||(n=Lh(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[Nh];if(ht===void 0){let o=window[Ih];if(!o)return null;ht={};for(let i in o)ht[i]=new Jn({[n]:o[i]},n)}let r=ht==null?void 0:ht[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function Lh(t,e,n="en-US"){if(e[t])return e[t];let r=Kh(t);if(e[r])return e[r];for(let o in e)if(o.startsWith(r+"-"))return e[o];return e[n]}function Kh(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const Oi=new Map,Fi=new Map;class Ah{constructor(e,n){this.locale=e,this.strings=n}format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let o=n["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+r,l=Oi.get(i);l||(l=new Intl.PluralRules(this.locale,{type:r}),Oi.set(i,l));let s=l.select(e);return o=n[s]||n.other,typeof o=="function"?o():o}number(e){let n=Fi.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Fi.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}}const ji=new WeakMap;function Oh(t){let e=ji.get(t);return e||(e=new Jn(t),ji.set(t,e)),e}function Fh(t,e){return e&&Jn.getGlobalDictionaryForPackage(e)||Oh(t)}function fa(t,e){let{locale:n}=dt(),r=Fh(t,e);return a.useMemo(()=>new Ah(n,r),[n,r])}const _i={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 jh(t={}){let{style:e,isFocusable:n}=t,[r,o]=a.useState(!1),{focusWithinProps:i}=wo({isDisabled:!n,onFocusWithinChange:s=>o(s)}),l=a.useMemo(()=>r?e:e?{..._i,...e}:_i,[r]);return{visuallyHiddenProps:{...i,style:l}}}function ha(t){let{children:e,elementType:n="div",isFocusable:r,style:o,...i}=t,{visuallyHiddenProps:l}=jh(t);return a.createElement(n,Y(i,l),e)}function _h(t){return t&&t.__esModule?t.default:t}function qr(t){let{onDismiss:e,...n}=t,r=fa(_h(da),"@react-aria/overlays"),o=Ol(n,r.format("dismiss")),i=()=>{e&&e()};return a.createElement(ha,null,a.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}const pa=a.forwardRef(({children:t,...e},n)=>{let r=a.useRef(!1),o=a.useContext(Ut),i=Y(o||{},{...e,register(){r.current=!0,o&&o.register()}});return i.ref=Je(n||(o==null?void 0:o.ref)),fo(o,i.ref),a.useEffect(()=>{r.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."),r.current=!0)},[]),a.createElement(Ut.Provider,{value:i},t)});function Bh({children:t}){let e=a.useMemo(()=>({register:()=>{}}),[]);return a.createElement(Ut.Provider,{value:e},t)}const Vh=a.createContext({});function zh(){return a.useContext(Vh)??{}}const ba=a.createContext(null);function Yr(t){let e=Ze(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[o,i]=a.useState(!1),l=a.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=zh();if(!t.portalContainer&&s&&(n=s()),!n)return null;let c=t.children;return t.disableFocusManagement||(c=a.createElement(Ps,{restoreFocus:!0,contain:(t.shouldContainFocus||o)&&!r},c)),c=a.createElement(ba.Provider,{value:l},a.createElement(Bh,null,c)),Yt.createPortal(c,n)}function ma(){let t=a.useContext(ba),e=t==null?void 0:t.setContain;J(()=>{e==null||e(!0)},[e])}function Po(t){let[e,n]=Yn(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=a.useCallback(()=>{n(!0)},[n]),o=a.useCallback(()=>{n(!1)},[n]),i=a.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:o,toggle:i}}const Qn=a.createContext(null),Bi=a.createContext(null),Hh=a.forwardRef(function(e,n){[e,n]=Me(e,n,Qn);let r=a.useContext(Qe),o=Po(e),i=e.isOpen!=null||e.defaultOpen!=null||!r?o:r,l=Nr(n,i.isOpen)||e.isExiting||!1,s=ls(),{direction:c}=dt();if(s){let u=e.children;return typeof u=="function"&&(u=u({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),a.createElement(a.Fragment,null,u)}return i&&!i.isOpen&&!l?null:a.createElement(Uh,{...e,triggerRef:e.triggerRef,state:i,popoverRef:n,isExiting:l,dir:c})});function Uh({state:t,isExiting:e,UNSTABLE_portalContainer:n,clearContexts:r,...o}){var k,A;let i=a.useRef(null),l=a.useRef(null),s=a.useContext(Bi),c=s&&o.trigger==="SubmenuTrigger",{popoverProps:u,underlayProps:d,arrowProps:f,placement:b,triggerAnchorPoint:p}=Dh({...o,offset:o.offset??8,arrowRef:i,groupRef:c?s:l},t),g=o.popoverRef,v=ho(g,!!b)||o.isEntering||!1,y=Te({...o,defaultClassName:"react-aria-Popover",values:{trigger:o.trigger||null,placement:b,isEntering:v,isExiting:e}}),w=!o.isNonModal||o.trigger==="SubmenuTrigger",[x,S]=a.useState(!1);J(()=>{g.current&&S(w&&!g.current.querySelector("[role=dialog]"))},[g,w]),a.useEffect(()=>{x&&(o.trigger!=="SubmenuTrigger"||Ht()!=="pointer")&&g.current&&!$t(g.current)&&Ye(g.current)},[x,g,o.trigger]);let T=a.useMemo(()=>{let V=y.children;if(r)for(let j of r)V=a.createElement(j.Provider,{value:null},V);return V},[y.children,r]),[M,L]=a.useState(null),R=a.useCallback(()=>{o.triggerRef.current&&L(o.triggerRef.current.getBoundingClientRect().width+"px")},[o.triggerRef]);J(R,[R]),kn({ref:(k=y.style)!=null&&k["--trigger-width"]?void 0:o.triggerRef,onResize:R});let N={...u.style,"--trigger-anchor-point":p?`${p.x}px ${p.y}px`:void 0,...y.style,"--trigger-width":((A=y.style)==null?void 0:A["--trigger-width"])||M},O=a.createElement(pe.div,{...Y(ae(o,{global:!0}),u),...y,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"],ref:g,slot:o.slot||void 0,style:N,dir:o.dir,"data-trigger":o.trigger,"data-placement":b,"data-entering":v||void 0,"data-exiting":e||void 0},!o.isNonModal&&a.createElement(qr,{onDismiss:t.close}),a.createElement(ih.Provider,{value:{...f,placement:b,ref:i}},T),a.createElement(qr,{onDismiss:t.close}));return c?a.createElement(Yr,{...o,shouldContainFocus:x,isExiting:e,portalContainer:n??(s==null?void 0:s.current)??void 0},O):a.createElement(Yr,{...o,shouldContainFocus:x,isExiting:e,portalContainer:n},!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(Bi.Provider,{value:l},O)))}class St{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,n,r){let o=this.clone();return n.addDescendants(o,e),o}}class ga extends St{filter(e,n,r){let[o,i]=ya(e,n,this.firstChildKey,r),l=this.clone();return l.firstChildKey=o,l.lastChildKey=i,l}}const Fo=class Fo extends St{};Fo.type="header";let Vi=Fo;const jo=class jo extends St{};jo.type="loader";let zi=jo;const _o=class _o extends ga{filter(e,n,r){if(r(this.textValue,this)){let o=this.clone();return n.addDescendants(o,e),o}return null}};_o.type="item";let Xr=_o;const Bo=class Bo extends ga{filter(e,n,r){let o=super.filter(e,n,r);if(o&&o.lastChildKey!==null){let i=e.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}};Bo.type="section";let Zr=Bo;class Gh{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 n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),o=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?n.get(o.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);return(n==null?void 0:n.key)??null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);return(e==null?void 0:e.key)??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n.itemCount=this.itemCount,n}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,n){this.addNode(e);let r=n.getChildren(e.key);for(let o of r)this.addDescendants(o,n)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let n=this.keyMap.get(e);n!=null&&n.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new this.constructor,[r,o]=ya(this,n,this.firstKey,e);return n==null||n.commit(r,o),n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function ya(t,e,n,r){if(n==null)return[null,null];let o=null,i=null,l=t.getItem(n);for(;l!=null;){let s=l.filter(t,e,r);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==null?void 0:o.key)??null,(i==null?void 0:i.key)??null]}class va{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(){var e;return((e=this.parentNode)==null?void 0:e.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,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index-1,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.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 vt extends va{constructor(e,n){super(n),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(){var e;return this.parentNode instanceof vt?this.parentNode.level+(((e=this.parentNode.node)==null?void 0:e.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(){var r,o,i,l,s,c,u,d;let e=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof vt?((r=this.parentNode.node)==null?void 0:r.key)??null:null,n.prevKey=((i=(o=this.previousVisibleSibling)==null?void 0:o.node)==null?void 0:i.key)??null,n.nextKey=((l=e==null?void 0:e.node)==null?void 0:l.key)??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=((c=(s=this.firstVisibleChild)==null?void 0:s.node)==null?void 0:c.key)??null,n.lastChildKey=((d=(u=this.lastVisibleChild)==null?void 0:u.node)==null?void 0:d.key)??null,(n.colSpan!=null||n.colIndex!=null)&&e)){let f=(n.colIndex??n.index)+(n.colSpan??1);if(e.node!=null&&f!==e.node.colIndex){let b=e.getMutableNode();b.colIndex=f}}}setProps(e,n,r,o,i){let l,{value:s,textValue:c,id:u,...d}=e;if(this.node==null?(l=new r(u??`react-aria-${++this.ownerDocument.nodeId}`),this.node=l):l=this.getMutableNode(),d.ref=n,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(n){var o,i;let r=n==="none";if(e.isHidden!==r){(((o=e.parentNode)==null?void 0:o.firstVisibleChild)===e||((i=e.parentNode)==null?void 0:i.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let l=e.previousVisibleSibling,s=e.nextVisibleSibling;l&&e.ownerDocument.markDirty(l),s&&e.ownerDocument.markDirty(s),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class Wh extends va{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 vt(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 n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){var e,n,r,o;for(let i of this.dirtyNodes)i instanceof vt&&(!i.isConnected||i.isHidden)?this.removeNode(i):i.updateChildIndices();for(let i of this.dirtyNodes)i instanceof vt?(i.isConnected&&!i.isHidden&&(i.updateNode(),this.addNode(i)),i.node&&this.dirtyNodes.delete(i),i.isMutated=!1):this.dirtyNodes.delete(i);this.nextCollection&&(this.nextCollection.commit(((n=(e=this.firstVisibleChild)==null?void 0:e.node)==null?void 0:n.key)??null,((o=(r=this.lastVisibleChild)==null?void 0:r.node)==null?void 0:o.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.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function xa(t){let{children:e,items:n,idScope:r,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(n&&typeof e=="function"){let c=[];for(let u of n){let d=qh(u)?u:null,f=d?s.get(d):null;if(!f){f=e(u);let b=f.props.id??(u==null?void 0:u.key)??(u==null?void 0:u.id);r!=null&&f.props.id==null&&b!=null&&(b=r+":"+b);let p=b??c.length;f=a.cloneElement(f,o?{key:p,id:b,value:u}:{key:p}),d&&s.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,n,s,r,o])}function qh(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}var bn={exports:{}},Er={};/**
13
13
  * @license React
14
14
  * use-sync-external-store-shim.production.js
15
15
  *
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * This source code is licensed under the MIT license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
- */var Fi;function Oh(){if(Fi)return xr;Fi=1;var t=a;function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,l=t.useDebugValue;function s(f,b){var p=b(),g=r({inst:{value:p,getSnapshot:b}}),y=g[0].inst,v=g[1];return i(function(){y.value=p,y.getSnapshot=b,c(y)&&v({inst:y})},[f,p,b]),o(function(){return c(y)&&v({inst:y}),f(function(){c(y)&&v({inst:y})})},[f]),l(p),p}function c(f){var b=f.getSnapshot;f=f.value;try{var p=b();return!n(f,p)}catch{return!0}}function u(f,b){return b()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return xr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,xr}var $r={};/**
20
+ */var Hi;function Yh(){if(Hi)return Er;Hi=1;var t=a;function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,l=t.useDebugValue;function s(f,b){var p=b(),g=r({inst:{value:p,getSnapshot:b}}),v=g[0].inst,y=g[1];return i(function(){v.value=p,v.getSnapshot=b,c(v)&&y({inst:v})},[f,p,b]),o(function(){return c(v)&&y({inst:v}),f(function(){c(v)&&y({inst:v})})},[f]),l(p),p}function c(f){var b=f.getSnapshot;f=f.value;try{var p=b();return!n(f,p)}catch{return!0}}function u(f,b){return b()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Er.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Er}var Cr={};/**
21
21
  * @license React
22
22
  * use-sync-external-store-shim.development.js
23
23
  *
@@ -25,5 +25,5 @@
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */var ji;function Fh(){return ji||(ji=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function e(p,g){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 y=g();if(!f){var v=g();i(y,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=l({inst:{value:y,getSnapshot:g}});var w=v[0].inst,x=v[1];return c(function(){w.value=y,w.getSnapshot=g,n(w)&&x({inst:w})},[p,y,g]),s(function(){return n(w)&&x({inst:w}),p(function(){n(w)&&x({inst:w})})},[p]),u(y),y}function n(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!i(p,y)}catch{return!0}}function r(p,g){return g()}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,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;$r.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),$r}var _i;function jh(){return _i||(_i=1,process.env.NODE_ENV==="production"?bn.exports=Oh():bn.exports=Fh()),bn.exports}var _h=jh();const ba=a.createContext(!1),Gt=a.createContext(null);function Bh(t){if(a.useContext(Gt))return t.content;let{collection:n,document:r}=Uh(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(nf,null,a.createElement(Gt.Provider,{value:r},t.content)),a.createElement(Vh,{render:t.children,collection:n}))}function Vh({collection:t,render:e}){return e(t)}function zh(t,e,n){let r=Ze(),o=a.useRef(r);o.current=r;let i=a.useCallback(()=>o.current?n():e(),[e,n]);return _h.useSyncExternalStore(t,i)}const Hh=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:zh;function Uh(t){let[e]=a.useState(()=>new Kh((t==null?void 0:t())||new Lh)),n=a.useCallback(l=>e.subscribe(l),[e]),r=a.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:Hh(n,r,o),document:e}}const Yr=a.createContext(null);function Wh(t){var n;return n=class extends St{},n.type=t,n}function ma(t,e,n,r,o,i){typeof t=="string"&&(t=Wh(t));let l=a.useCallback(c=>{c==null||c.setProps(e,n,t,r,i)},[e,n,r,i,t]),s=a.useContext(Yr);if(s){let c=s.ownerDocument.nodesByProps.get(e);return c||(c=s.ownerDocument.createElement(t.type),c.setProps(e,n,t,r,i),s.appendChild(c),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,c)),o?a.createElement(Yr.Provider,{value:c},o):null}return a.createElement(t.type,{ref:l},o)}function ga(t,e){let n=({node:o})=>e(o.props,o.props.ref,o),r=a.forwardRef((o,i)=>{let l=a.useContext(Fr);if(!a.useContext(ba)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return ma(t,o,i,"children"in o?o.children:null,null,c=>a.createElement(Fr.Provider,{value:l},a.createElement(n,{node:c})))});return r.displayName=e.name,r}function ya(t,e,n=va){let r=({node:i})=>e(i.props,i.props.ref,i),o=a.forwardRef((i,l)=>{let s=n(i);return ma(t,i,l,null,s,c=>a.createElement(r,{node:c}))??a.createElement(a.Fragment,null)});return o.displayName=e.name,o}function va(t){return pa({...t,addIdAndValue:!0})}const Bi=a.createContext(null);function Gh(t){let e=a.useContext(Bi),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope??(e==null?void 0:e.idScope),o=va({...t,idScope:r,dependencies:n});return a.useContext(Gt)&&(o=a.createElement(qh,null,o)),e=a.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),a.createElement(Bi.Provider,{value:e},o)}function qh({children:t}){let e=a.useContext(Gt),n=a.useMemo(()=>a.createElement(Gt.Provider,{value:null},a.createElement(ba.Provider,{value:!0},t)),[t]);return Ze()?a.createElement(Yr.Provider,{value:e},n):Yt.createPortal(n,e)}const Yh=a.createContext(null),Xh={CollectionRoot({collection:t,renderDropIndicator:e}){return Vi(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Vi(t,e,n)}};function Vi(t,e,n){return pa({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){if(r.type==="content")return a.createElement(a.Fragment,null);let o=r.render(r);return!n||r.type!=="item"?o:a.createElement(a.Fragment,null,n({type:"item",key:r.key,dropPosition:"before"}),o,Zh(t,r,n))}})}function Zh(t,e,n){let r=e.key,o=t.getKeyAfter(r),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==null?void 0:c.type)==="item"&&(!i||c.parentKey!==i.parentKey&&i.level<c.level);){let u=n({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 Qn=a.createContext(Xh);function Jh(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}function xa(t){let e=ep(Q(t));e!==t&&(e&&Qh(e,t),t&&$a(t,e))}function Qh(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function $a(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function ep(t){let e=ne(t),n=e==null?void 0:e.getAttribute("aria-activedescendant");return n&&t.getElementById(n)||e}const zi=a.createContext(null),tp=a.createContext(null),np=a.createContext({}),rp=a.createContext({}),op=a.createContext(null);function ip(t){let e=a.useRef({});return a.createElement(op.Provider,{value:e},t.children)}const lp=a.createContext({isSelected:!1});function sp(t){let e=ae(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const Eo=a.createContext({}),Ao=class Ao extends St{filter(e,n){let r=n.getItem(this.prevKey);if(r&&r.type!=="separator"){let o=this.clone();return n.addDescendants(o,e),o}return null}};Ao.type="separator";let Xr=Ao;const ap=ga(Xr,function(e,n){[e,n]=Me(e,n,Eo);let{elementType:r,orientation:o,style:i,className:l,slot:s,...c}=e,u=r||"hr";u==="hr"&&o==="vertical"&&(u="div");let d=pe[u],{separatorProps:f}=sp({...c,elementType:r,orientation:o}),b=ae(e,{global:!0});return a.createElement(d,{render:e.render,...Y(b,f),style:i,className:l??"react-aria-Separator",ref:n,slot:s||void 0})}),wa=a.createContext({});var Ea={};Ea={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ca={};Ca={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Sa={};Sa={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Pa={};Pa={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var ka={};ka={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Ta={};Ta={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Ma={};Ma={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Ra={};Ra={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Da={};Da={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Na={};Na={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Ia={};Ia={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var La={};La={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Ka={};Ka={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Aa={};Aa={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Oa={};Oa={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var Fa={};Fa={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var ja={};ja={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var _a={};_a={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Ba={};Ba={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Va={};Va={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var za={};za={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Ha={};Ha={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Ua={};Ua={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Wa={};Wa={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Ga={};Ga={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var qa={};qa={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Ya={};Ya={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Xa={};Xa={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Za={};Za={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Ja={};Ja={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var Qa={};Qa={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var ec={};ec={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var tc={};tc={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var nc={};nc={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var rc={};rc={"ar-AE":Ea,"bg-BG":Ca,"cs-CZ":Sa,"da-DK":Pa,"de-DE":ka,"el-GR":Ta,"en-US":Ma,"es-ES":Ra,"et-EE":Da,"fi-FI":Na,"fr-FR":Ia,"he-IL":La,"hr-HR":Ka,"hu-HU":Aa,"it-IT":Oa,"ja-JP":Fa,"ko-KR":ja,"lt-LT":_a,"lv-LV":Ba,"nb-NO":Va,"nl-NL":za,"pl-PL":Ha,"pt-BR":Ua,"pt-PT":Wa,"ro-RO":Ga,"ru-RU":qa,"sk-SK":Ya,"sl-SI":Xa,"sr-SP":Za,"sv-SE":Ja,"tr-TR":Qa,"uk-UA":ec,"zh-CN":tc,"zh-TW":nc};const cp=500;function oc(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:o,threshold:i=cp,accessibilityDescription:l}=t;const s=a.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:u}=Wn(),{pressProps:d}=Xe({isDisabled:e,onPressStart(b){if(b.continuePropagation(),(b.pointerType==="mouse"||b.pointerType==="touch")&&(n&&n({...b,type:"longpressstart"}),s.current=setTimeout(()=>{b.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),Q(b.target).activeElement!==b.target&&de(b.target),o&&o({...b,type:"longpress"}),s.current=void 0},i),b.pointerType==="touch")){let p=y=>{y.preventDefault()},g=fe(b.target);c(b.target,"contextmenu",p,{once:!0}),c(g,"pointerup",()=>{setTimeout(()=>{u(b.target,"contextmenu",p)},30)},{once:!0})}},onPressEnd(b){s.current&&clearTimeout(s.current),r&&(b.pointerType==="mouse"||b.pointerType==="touch")&&r({...b,type:"longpressend"})}}),f=Au(o&&!e?l:void 0);return{longPressProps:Y(d,f)}}function ic(t,e,n){let{type:r}=t,{isOpen:o}=e;a.useEffect(()=>{n&&n.current&&vs.set(n.current,e.close)});let i;r==="menu"?i=!0:r==="listbox"&&(i="listbox");let l=he();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}function up(t){return t&&t.__esModule?t.default:t}function dp(t,e,n){let{type:r="menu",isDisabled:o,trigger:i="press"}=t,l=he(),{triggerProps:s,overlayProps:c}=ic({type:r},e,n),u=p=>{if(!o&&!(i==="longPress"&&!p.altKey)&&n&&n.current)switch(p.key){case"Enter":case" ":if(i==="longPress"||p.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("last");break;default:"continuePropagation"in p&&p.continuePropagation()}},d=la(up(rc),"@react-aria/menu"),{longPressProps:f}=oc({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),b={preventFocusOnPress:!0,onPressStart(p){p.pointerType!=="touch"&&p.pointerType!=="keyboard"&&!o&&(de(p.target),e.open(p.pointerType==="virtual"?"first":null))},onPress(p){p.pointerType==="touch"&&!o&&(de(p.target),e.toggle())}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?b:f,id:l,onKeyDown:u},menuProps:{...c,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const lc=new WeakMap;function Zr(t){return Qc()?t.altKey:t.ctrlKey}function En(t,e){var o,i;let n=`[data-key="${CSS.escape(String(e))}"]`,r=(o=t.current)==null?void 0:o.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),(i=t.current)==null?void 0:i.querySelector(n)}const sc=new WeakMap;function fp(t){let e=he();return sc.set(t,e),e}function hp(t){return sc.get(t)}const pp=1e3;function bp(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,o=a.useRef({search:"",timeout:void 0}).current,i=l=>{let s=mp(l.key);if(!(!s||l.ctrlKey||l.metaKey||!H(l.currentTarget,F(l))||o.search.length===0&&s===" ")){if(s===" "&&o.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),o.search+=s,e.getKeyForSearch!=null){let c=e.getKeyForSearch(o.search,n.focusedKey);c==null&&(c=e.getKeyForSearch(o.search)),c!=null&&(n.setFocusedKey(c),r&&r(c))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},pp)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function mp(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function gp(t){let{selectionManager:e,keyboardDelegate:n,ref:r,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:b=!1,scrollRef:p=r,linkBehavior:g="action"}=t,{direction:y}=dt(),v=Xt(),w=m=>{var I,C,D,$,S,L,U,W,G,ee,le,Z,be,Ie;if(m.altKey&&m.key==="Tab"&&m.preventDefault(),!r.current||!H(r.current,F(m)))return;const E=(z,$e)=>{if(z!=null){if(e.isLink(z)&&g==="selection"&&u&&!Zr(m)){Yt.flushSync(()=>{e.setFocusedKey(z,$e)});let me=En(r,z),et=e.getItemProps(z);me&&v.open(me,m,et.href,et.routerOptions);return}if(e.setFocusedKey(z,$e),e.isLink(z)&&g==="override")return;m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&!Zr(m)&&e.replaceSelection(z)}};switch(m.key){case"ArrowDown":if(n.getKeyBelow){let z=e.focusedKey!=null?(I=n.getKeyBelow)==null?void 0:I.call(n,e.focusedKey):(C=n.getFirstKey)==null?void 0:C.call(n);z==null&&i&&(z=(D=n.getFirstKey)==null?void 0:D.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),E(z))}break;case"ArrowUp":if(n.getKeyAbove){let z=e.focusedKey!=null?($=n.getKeyAbove)==null?void 0:$.call(n,e.focusedKey):(S=n.getLastKey)==null?void 0:S.call(n);z==null&&i&&(z=(L=n.getLastKey)==null?void 0:L.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),E(z))}break;case"ArrowLeft":if(n.getKeyLeftOf){let z=e.focusedKey!=null?(U=n.getKeyLeftOf)==null?void 0:U.call(n,e.focusedKey):(W=n.getFirstKey)==null?void 0:W.call(n);z==null&&i&&(z=y==="rtl"?(G=n.getFirstKey)==null?void 0:G.call(n,e.focusedKey):(ee=n.getLastKey)==null?void 0:ee.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),E(z,y==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){let z=e.focusedKey!=null?(le=n.getKeyRightOf)==null?void 0:le.call(n,e.focusedKey):(Z=n.getFirstKey)==null?void 0:Z.call(n);z==null&&i&&(z=y==="rtl"?(be=n.getLastKey)==null?void 0:be.call(n,e.focusedKey):(Ie=n.getFirstKey)==null?void 0:Ie.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),E(z,y==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let z=n.getFirstKey(e.focusedKey,bt(m));e.setFocusedKey(z),z!=null&&(bt(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&e.replaceSelection(z))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let z=n.getLastKey(e.focusedKey,bt(m));e.setFocusedKey(z),z!=null&&(bt(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&e.replaceSelection(z))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let z=n.getKeyPageBelow(e.focusedKey);z!=null&&(m.preventDefault(),E(z))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let z=n.getKeyPageAbove(e.focusedKey);z!=null&&(m.preventDefault(),E(z))}break;case"a":bt(m)&&e.selectionMode==="multiple"&&s!==!0&&(m.preventDefault(),e.selectAll());break;case"Escape":c==="clearSelection"&&!l&&e.selectedKeys.size!==0&&(m.stopPropagation(),m.preventDefault(),e.clearSelection());break;case"Tab":if(!b){if(m.shiftKey)r.current.focus();else{let z=Fe(r.current,{tabbable:!0}),$e,me;do me=z.lastChild(),me&&($e=me);while(me);let et=ne();$e&&(!$t($e)||et&&!Ll(et))&&de($e)}break}}},x=a.useRef({top:0,left:0});It(p,"scroll",()=>{var m,E;x.current={top:((m=p.current)==null?void 0:m.scrollTop)??0,left:((E=p.current)==null?void 0:E.scrollLeft)??0}});let P=m=>{var E,I;if(e.isFocused){H(m.currentTarget,F(m))||e.setFocused(!1);return}if(H(m.currentTarget,F(m))){if(e.setFocused(!0),e.focusedKey==null){let C=$=>{$!=null&&(e.setFocusedKey($),u&&!e.isSelected($)&&e.replaceSelection($))},D=m.relatedTarget;D&&m.currentTarget.compareDocumentPosition(D)&Node.DOCUMENT_POSITION_FOLLOWING?C(e.lastSelectedKey??((E=n.getLastKey)==null?void 0:E.call(n))):C(e.firstSelectedKey??((I=n.getFirstKey)==null?void 0:I.call(n)))}else p.current&&(p.current.scrollTop=x.current.top,p.current.scrollLeft=x.current.left);if(e.focusedKey!=null&&p.current){let C=En(r,e.focusedKey);C instanceof HTMLElement&&(!$t(C)&&!f&&de(C),Ht()==="keyboard"&&Xo(C,{containingElement:r.current}))}}},T=m=>{H(m.currentTarget,m.relatedTarget)||e.setFocused(!1)},R=a.useRef(!1);It(r,Zc,f?m=>{let{detail:E}=m;m.stopPropagation(),e.setFocused(!0),(E==null?void 0:E.focusStrategy)==="first"&&(R.current=!0)}:void 0),Yo(()=>{var m;if(R.current){let E=((m=n.getFirstKey)==null?void 0:m.call(n))??null;if(E==null){let I=ne();xa(r.current),$a(I,null),e.collection.size>0&&(R.current=!1)}else e.setFocusedKey(E),R.current=!1}},[e.collection]),Yo(()=>{e.collection.size>0&&(R.current=!1)},[e.focusedKey]),It(r,Xc,f?m=>{var E;m.stopPropagation(),e.setFocused(!1),(E=m.detail)!=null&&E.clearFocusKey&&e.setFocusedKey(null)}:void 0);const K=a.useRef(o),M=a.useRef(!1);a.useEffect(()=>{var m,E;if(K.current){let I=null;o==="first"&&(I=((m=n.getFirstKey)==null?void 0:m.call(n))??null),o==="last"&&(I=((E=n.getLastKey)==null?void 0:E.call(n))??null);let C=e.selectedKeys;if(C.size){for(let D of C)if(e.canSelectItem(D)){I=D;break}}e.setFocused(!0),e.setFocusedKey(I),I==null&&!f&&r.current&&Ye(r.current),e.collection.size>0&&(K.current=!1,M.current=!0)}});let N=a.useRef(e.focusedKey),O=a.useRef(null);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==N.current||M.current)&&p.current&&r.current){let m=Ht(),E=En(r,e.focusedKey);if(!(E instanceof HTMLElement))return;(m==="keyboard"||M.current)&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(()=>{p.current&&(xn(p.current,E),m!=="virtual"&&Xo(E,{containingElement:r.current}))}))}!f&&e.isFocused&&e.focusedKey==null&&N.current!=null&&r.current&&Ye(r.current),N.current=e.focusedKey,M.current=!1}),a.useEffect(()=>()=>{O.current&&cancelAnimationFrame(O.current)},[]),It(r,"react-aria-focus-scope-restore",m=>{m.preventDefault(),e.setFocused(!0)});let k={onKeyDown:w,onFocus:P,onBlur:T,onMouseDown(m){p.current===F(m)&&m.preventDefault()}},{typeSelectProps:A}=bp({keyboardDelegate:n,selectionManager:e});d||(k=Y(A,k));let V;f||(V=e.focusedKey==null?0:-1);let j=fp(e.collection);return{collectionProps:Y(k,{tabIndex:V,"data-collection":j})}}class Hi{constructor(e){this.ref=e}getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?En(this.ref,e):null;if(!r)return null;let o=n.getBoundingClientRect(),i=r.getBoundingClientRect();return{x:i.left-o.left-n.clientLeft+n.scrollLeft,y:i.top-o.top-n.clientTop+n.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:(e==null?void 0:e.scrollWidth)??0,height:(e==null?void 0:e.scrollHeight)??0}}getVisibleRect(){let e=this.ref.current;return{x:(e==null?void 0:e.scrollLeft)??0,y:(e==null?void 0:e.scrollTop)??0,width:(e==null?void 0:e.clientWidth)??0,height:(e==null?void 0:e.clientHeight)??0}}}class yp{constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Hi(n.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 Hi(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){var n,r;return this.disabledBehavior==="all"&&(((n=e.props)==null?void 0:n.isDisabled)||this.disabledKeys.has(e.key))&&((r=e.props)==null?void 0:r.disabledBehavior)!=="selection"}findNextNonDisabled(e,n,r=!1){let o=e;for(;o!=null;){let i=this.collection.getItem(o);if((i==null?void 0:i.type)==="item"&&(r||!this.isDisabled(i)))return o;o=n(o)}return null}getNextKey(e,n){let r=e;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,o=>this.collection.getKeyAfter(o),n==null?void 0:n.includeDisabled)}getPreviousKey(e,n){let r=e;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,o=>this.collection.getKeyBefore(o),n==null?void 0:n.includeDisabled)}findKey(e,n,r){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=n(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&r(l,i)&&o!=null);return o}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getNextKey(r,n),this.isSameRow):this.getNextKey(e,n)}getKeyAbove(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getPreviousKey(r,n),this.isSameRow):this.getPreviousKey(e,n)}getNextColumn(e,n,r){return n?this.getPreviousKey(e,r):this.getNextKey(e,r)}getKeyRightOf(e,n){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[r](o),n==null?void 0:n.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",n):this.findKey(e,o=>this.getNextColumn(o,this.direction==="rtl",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",n):null}getKeyLeftOf(e,n){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[r](o),n==null?void 0:n.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",n):this.findKey(e,o=>this.getNextColumn(o,this.direction==="ltr",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",n):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!st(n))return this.getFirstKey();let o=e;if(this.orientation==="horizontal"){let i=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!st(n))return this.getLastKey();let o=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,r.x-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,o=n||this.getFirstKey();for(;o!=null;){let i=r.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 wr=new Map;function vp(t){let{locale:e}=dt(),n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(wr.has(n))return wr.get(n);let r=new Intl.Collator(e,t);return wr.set(n,r),r}function xp(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:o,keyboardDelegate:i,layoutDelegate:l,orientation:s}=t,c=vp({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,d=a.useMemo(()=>i||new yp({collection:n,disabledKeys:r,disabledBehavior:u,ref:o,collator:c,layoutDelegate:l,orientation:s}),[i,l,n,r,o,c,u,s]),{collectionProps:f}=gp({...t,ref:o,selectionManager:e,keyboardDelegate:d});return{listProps:f}}function $p(t,e,n){let{shouldFocusWrap:r=!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=ae(t,{labelable:!0}),{listProps:c}=xp({...l,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return lc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:Y(s,{onKeyDown:o,onKeyUp:i},{role:"menu",...c,onKeyDown:u=>{var d;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((d=c.onKeyDown)==null||d.call(c,u))}})}}function wp(t){let{id:e,selectionManager:n,key:r,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:s,isDisabled:c,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=t,b=Xt();e=he(e);let p=S=>{if(S.pointerType==="keyboard"&&Zr(S))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(f==="selection"&&o.current){let L=n.getItemProps(r);b.open(o.current,S,L.href,L.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(f==="override"||f==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):S&&S.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||S&&(bt(S)||S.pointerType==="touch"||S.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};a.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(l?xa(o.current):s?s():ne()!==o.current&&o.current&&Ye(o.current))},[o,r,n.focusedKey,n.childFocusStrategy,n.isFocused,l]),c=c||n.isDisabled(r);let g={};!l&&!c?g={tabIndex:r===n.focusedKey?0:-1,onFocus(S){F(S)===o.current&&n.setFocusedKey(r)}}:c&&(g.onMouseDown=S=>{S.preventDefault()}),a.useEffect(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let y=n.isLink(r)&&f==="override",v=u&&t.UNSTABLE_itemBehavior==="action",w=n.isLink(r)&&f!=="selection"&&f!=="none",x=!c&&n.canSelectItem(r)&&!y&&!v,P=(u||w)&&!c,T=P&&(n.selectionBehavior==="replace"?!x:!x||n.isEmpty),R=P&&x&&n.selectionBehavior==="replace",K=T||R,M=a.useRef(null),N=K&&x,O=a.useRef(!1),k=a.useRef(!1),A=n.getItemProps(r),V=S=>{var L;u&&(u(),(L=o.current)==null||L.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),w&&o.current&&b.open(o.current,S,A.href,A.routerOptions)},j={ref:o};if(i?(j.onPressStart=S=>{M.current=S.pointerType,O.current=N,S.pointerType==="keyboard"&&(!K||Wi(S.key))&&p(S)},d?(j.onPressUp=T?void 0:S=>{S.pointerType==="mouse"&&x&&p(S)},j.onPress=T?V:S=>{S.pointerType!=="keyboard"&&S.pointerType!=="mouse"&&x&&p(S)}):j.onPress=S=>{if(T||R&&S.pointerType!=="mouse"){if(S.pointerType==="keyboard"&&!Ui(S.key))return;V(S)}else S.pointerType!=="keyboard"&&x&&p(S)}):(j.onPressStart=S=>{M.current=S.pointerType,O.current=N,k.current=T,x&&(S.pointerType==="mouse"&&!T||S.pointerType==="keyboard"&&(!P||Wi(S.key)))&&p(S)},j.onPress=S=>{(S.pointerType==="touch"||S.pointerType==="pen"||S.pointerType==="virtual"||S.pointerType==="keyboard"&&K&&Ui(S.key)||S.pointerType==="mouse"&&k.current)&&(K?V(S):x&&p(S))}),g["data-collection"]=hp(n.collection),g["data-key"]=r,j.preventFocusOnPress=l,l&&(j=Y(j,{onPressStart(S){S.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(S){S.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}})),A)for(let S of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])A[S]&&(j[S]=Zt(j[S],A[S]));let{pressProps:m,isPressed:E}=Xe(j),I=R?S=>{M.current==="mouse"&&(S.stopPropagation(),S.preventDefault(),V(S))}:void 0,{longPressProps:C}=oc({isDisabled:!N,onLongPress(S){S.pointerType==="touch"&&(p(S),n.setSelectionBehavior("toggle"))}}),D=S=>{M.current==="touch"&&O.current&&S.preventDefault()},$=f!=="none"&&n.isLink(r)?S=>{_e.isOpening||S.preventDefault()}:void 0;return{itemProps:Y(g,x||T||l&&!c?m:{},N?C:{},{onDoubleClick:I,onDragStartCapture:D,onClick:$,id:e},l?{onMouseDown:S=>S.preventDefault()}:void 0),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:x,hasAction:K}}function Ui(t){return t==="Enter"}function Wi(t){return t===" "}function Ep(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}const Gi=new WeakMap;function Cp(t){let e=Gi.get(t);if(e!=null)return e;let n=0,r=o=>{for(let i of o)i.type==="section"?r(Ep(i,t)):i.type==="item"&&n++};return r(t),Gi.set(t,n),n}function Sp(t,e,n){let{id:r,key:o,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":c,onPressStart:u,onPressUp:d,onPress:f,onPressChange:b,onPressEnd:p,onClick:g,onHoverStart:y,onHoverChange:v,onHoverEnd:w,onKeyDown:x,onKeyUp:P,onFocus:T,onFocusChange:R,onBlur:K,selectionManager:M=e.selectionManager}=t,N=!!c,O=N&&t["aria-expanded"]==="true",k=t.isDisabled??M.isDisabled(o),A=t.isSelected??M.isSelected(o),V=lc.get(e),j=e.collection.getItem(o),m=t.onClose||V.onClose,E=Xt(),I=()=>{var te;if(!N&&((te=j==null?void 0:j.props)!=null&&te.onAction?j.props.onAction():t.onAction&&t.onAction(o),V.onAction)){let kt=V.onAction;kt(o)}},C="menuitem";N||(M.selectionMode==="single"?C="menuitemradio":M.selectionMode==="multiple"&&(C="menuitemcheckbox"));let D=vn(),$=vn(),S=vn(),L={id:r,"aria-disabled":k||void 0,role:C,"aria-label":t["aria-label"],"aria-labelledby":D,"aria-describedby":[t["aria-describedby"],$,S].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":c,"aria-expanded":t["aria-expanded"]};if(M.selectionMode!=="none"&&!N&&(L["aria-checked"]=A),s){let te=Number(j==null?void 0:j.index);L["aria-posinset"]=Number.isNaN(te)?void 0:te+1,L["aria-setsize"]=Cp(e.collection)}let U=a.useRef(!1),W=te=>{b==null||b(te),U.current=te},G=a.useRef(null),ee=te=>{te.pointerType!=="keyboard"&&(G.current={pointerType:te.pointerType}),te.pointerType==="mouse"&&(U.current||te.target.click()),d==null||d(te)},le=te=>{var jo,_o;g==null||g(te),I(),Pl(te,E,j.props.href,j==null?void 0:j.props.routerOptions);let kt=((jo=G.current)==null?void 0:jo.pointerType)==="keyboard"?((_o=G.current)==null?void 0:_o.key)==="Enter"||M.selectionMode==="none"||M.isLink(o):M.selectionMode!=="multiple"||M.isLink(o);kt=l??i??kt,m&&!N&&kt&&m(),G.current=null},{itemProps:Z,isFocused:be}=wp({id:r,selectionManager:M,key:o,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:V.shouldUseVirtualFocus}),{pressProps:Ie,isPressed:z}=Xe({onPressStart:u,onPress:f,onPressUp:ee,onPressChange:W,onPressEnd:p,isDisabled:k}),{hoverProps:$e}=en({isDisabled:k,onHoverStart(te){!zt()&&!(O&&c)&&(M.setFocused(!0),M.setFocusedKey(o)),y==null||y(te)},onHoverChange:v,onHoverEnd:w}),{keyboardProps:me}=hs({onKeyDown:te=>{if(te.repeat){te.continuePropagation();return}switch(te.key){case" ":G.current={pointerType:"keyboard",key:" "},F(te).click(),Or("keyboard");break;case"Enter":G.current={pointerType:"keyboard",key:"Enter"},F(te).tagName!=="A"&&F(te).click(),Or("keyboard");break;default:N||te.continuePropagation(),x==null||x(te);break}},onKeyUp:P}),{focusableProps:et}=Qt({onBlur:K,onFocus:T,onFocusChange:R},n),Fo=ae(j==null?void 0:j.props);delete Fo.id;let Vc=Sl(j==null?void 0:j.props);return{menuItemProps:{...L,...Y(Fo,Vc,N?{onFocus:Z.onFocus,"data-collection":Z["data-collection"],"data-key":Z["data-key"]}:Z,Ie,$e,me,et,V.shouldUseVirtualFocus||N?{onMouseDown:te=>te.preventDefault()}:void 0,k?void 0:{onClick:le}),tabIndex:Z.tabIndex!=null&&O&&!V.shouldUseVirtualFocus?-1:Z.tabIndex},labelProps:{id:D},descriptionProps:{id:$},keyboardShortcutProps:{id:S},isFocused:be,isFocusVisible:be&&M.isFocused&&zt()&&!O,isSelected:A,isPressed:z,isDisabled:k}}function Pp(t){let{heading:e,"aria-label":n}=t,r=he();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}const mn=2,kp=50,Tp=1e3,qi=Math.PI/12;function Mp(t){let{menuRef:e,submenuRef:n,isOpen:r,isDisabled:o}=t,i=a.useRef(void 0),l=a.useRef(void 0),s=a.useRef(0),c=a.useRef(void 0),u=a.useRef(void 0),d=a.useRef(void 0),f=a.useRef(2),[b,p]=a.useState(!1);Pn({ref:r?n:void 0,onResize:()=>{n.current&&(l.current=n.current.getBoundingClientRect(),d.current=void 0)}});let y=()=>{p(!1),f.current=mn,i.current=void 0},v=Ef(),w=Pe(x=>{b&&x.preventDefault()});a.useEffect(()=>{b&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents=""},[e,b]),J(()=>{let x=n.current,P=e.current;if(o||!x||!r||v!=="pointer"||!P){y();return}l.current=x.getBoundingClientRect();let T=R=>{if(R.pointerType==="touch"||R.pointerType==="pen")return;let K=Date.now();if(K-s.current<kp)return;clearTimeout(c.current),clearTimeout(u.current);let{clientX:M,clientY:N}=R;if(!i.current){i.current={x:M,y:N};return}if(!l.current)return;if(d.current||(d.current=M>l.current.right?"left":"right"),M<P.getBoundingClientRect().left||M>P.getBoundingClientRect().right||N<P.getBoundingClientRect().top||N>P.getBoundingClientRect().bottom){y();return}let O=i.current.x,k=i.current.y,A=d.current==="right"?l.current.left-O:O-l.current.right,V=Math.atan2(k-l.current.top,A)+qi,j=Math.atan2(k-l.current.bottom,A)-qi,m=Math.atan2(k-N,d.current==="left"?-(M-O):M-O),E=m<V&&m>j;f.current=E?Math.min(f.current+1,mn):Math.max(f.current-1,0),f.current>=mn?p(!0):p(!1),s.current=K,i.current={x:M,y:N},E&&(c.current=setTimeout(()=>{y(),u.current=setTimeout(()=>{let I=document.elementFromPoint(M,N);I&&H(P,I)&&I.dispatchEvent(new PointerEvent("pointerover",{bubbles:!0,cancelable:!0}))},100)},Tp))};return window.addEventListener("pointermove",T),process.env.NODE_ENV!=="test"&&window.addEventListener("pointerdown",w,!0),()=>{window.removeEventListener("pointermove",T),process.env.NODE_ENV!=="test"&&window.removeEventListener("pointerdown",w,!0),clearTimeout(c.current),clearTimeout(u.current),f.current=mn}},[o,r,e,v,p,n])}function Rp(t,e,n){let{parentMenuRef:r,submenuRef:o,type:i="menu",isDisabled:l,delay:s=200,shouldUseVirtualFocus:c}=t,u=he(),d=he(),{direction:f}=dt(),b=a.useRef(void 0),p=a.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=void 0)},[b]),g=a.useCallback(M=>{p(),e.open(M)},[e,p]),y=a.useCallback(()=>{p(),e.close()},[e,p]);J(()=>()=>{p()},[p]);let v=M=>{if($t(M.currentTarget))switch(M.key){case"ArrowLeft":f==="ltr"&&H(M.currentTarget,F(M))&&(M.preventDefault(),M.stopPropagation(),y(),!c&&n.current&&de(n.current));break;case"ArrowRight":f==="rtl"&&H(M.currentTarget,F(M))&&(M.preventDefault(),M.stopPropagation(),y(),!c&&n.current&&de(n.current));break;case"Escape":H(o.current,F(M))&&(M.stopPropagation(),y(),!c&&n.current&&de(n.current));break}},w={id:d,"aria-labelledby":u,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:v}},x=M=>{switch(M.key){case"ArrowRight":l||(f==="ltr"?(M.preventDefault(),e.isOpen||g("first"),i==="menu"&&(o!=null&&o.current)&&ne()===(n==null?void 0:n.current)&&de(o.current)):e.isOpen?y():M.continuePropagation());break;case"ArrowLeft":l||(f==="rtl"?(M.preventDefault(),e.isOpen||g("first"),i==="menu"&&(o!=null&&o.current)&&ne()===(n==null?void 0:n.current)&&de(o.current)):e.isOpen?y():M.continuePropagation());break;default:M.continuePropagation();break}},P=M=>{!l&&(M.pointerType==="virtual"||M.pointerType==="keyboard")&&g("first")},T=M=>{!l&&(M.pointerType==="touch"||M.pointerType==="mouse")&&g()},R=M=>{l||(M&&!e.isOpen?b.current||(b.current=setTimeout(()=>{g()},s)):M||p())};It(r,"focusin",M=>{e.isOpen&&H(r.current,F(M))&&F(M)!==n.current&&y()});let K=M=>M!==n.current;return Mp({menuRef:r,submenuRef:o,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:u,"aria-controls":e.isOpen?d:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:P,onPress:T,onHoverChange:R,onKeyDown:x,isOpen:e.isOpen},submenuProps:w,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:K}}}function Co(t){let e=wo(t),[n,r]=a.useState(null),[o,i]=a.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:n,...e,open(u=null){r(u),e.open()},toggle(u=null){r(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)}}}function Dp(t,e){let{triggerKey:n}=t,{expandedKeysStack:r,openSubmenu:o,closeSubmenu:i,close:l}=e,[s]=a.useState(r==null?void 0:r.length),c=a.useMemo(()=>r[s]===n,[r,n,s]),[u,d]=a.useState(null),f=a.useCallback(g=>{d(g??null),o(n,s)},[o,s,n]),b=a.useCallback(()=>{d(null),i(n,s)},[i,s,n]),p=a.useCallback(g=>{d(g??null),c?b():f(g)},[b,f,c]);return a.useMemo(()=>({focusStrategy:u,isOpen:c,open:f,close:b,closeAll:l,submenuLevel:s,setOpen:()=>{},toggle:p}),[c,f,b,l,u,p,s])}function Np(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Ip(t){return Lp(t)}function Lp(t,e){for(let n of t)return n}function Er(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...Yi(t,e),e],o=[...Yi(t,n),n],i=r.slice(0,o.length).findIndex((l,s)=>l!==o[s]);return i!==-1?(e=r[i],n=o[i],e.index-n.index):r.findIndex(l=>l===n)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function Yi(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}class Re extends Set{constructor(e,n,r){super(e),e instanceof Re?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}class er{constructor(e,n,r){this.collection=e,this.state=n,this.allowsCellSelection=(r==null?void 0:r.allowsCellSelection)??!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null,this.fullCollection=(r==null?void 0:r.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,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}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 n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}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(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Er(this.collection,r,e)<0)&&(e=r)}return(e==null?void 0:e.key)??null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Er(this.collection,r,e)>0)&&(e=r)}return(e==null?void 0: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 n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Re([n],n,n);else{let o=this.state.selectedKeys,i=o.anchorKey??n;r=new Re(o,i,n);for(let l of this.getKeyRange(i,o.currentKey??n))r.delete(l);for(let l of this.getKeyRange(n,i))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),o=this.collection.getItem(n);return r&&o?Er(this.collection,r,o)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var i;if((i=this.layoutDelegate)!=null&&i.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let r=[],o=e;for(;o!=null;){let l=this.collection.getItem(o);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&r.push(o),o===n)return r;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new Re(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new Re([n],n,n):new Re;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Re;for(let r of e){let o=this.getKey(r);if(o!=null&&(n.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=this.fullCollection??this.collection,n=[],r=o=>{var i;for(;o!=null;){if(this.canSelectItemIn(o,e)){let l=e.getItem(o);(l==null?void 0:l.type)==="item"&&n.push(o),l!=null&&l.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&r(((i=Ip(Np(l,e)))==null?void 0:i.key)??null)}o=e.getKeyAfter(o)}};return r(e.getFirstKey()),n}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 Re)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,n){var o;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=n.getItem(e);return!(!r||(o=r==null?void 0:r.props)!=null&&o.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var r,o;let n=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!((r=n==null?void 0:n.props)!=null&&r.isDisabled))&&((o=n==null?void 0:n.props)==null?void 0:o.disabledBehavior)!=="selection"}isLink(e){var n,r;return!!((r=(n=this.collection.getItem(e))==null?void 0:n.props)!=null&&r.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))==null?void 0:n.props}withCollection(e){return new er(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class Kp{constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&(l.type==="section"||n.has(l.key)))for(let s of l.childNodes)r(s)};for(let l of e)r(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==null?void 0:o.key)??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey??null:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}}class Ap{build(e,n){return this.context=n,Xi(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(a.isValidElement(n)&&n.type===a.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of r)yield*this.getFullNode({value:i,index:o},{renderer:n}),o++}else{let o=[];a.Children.forEach(n,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,n,r,o){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${o}${n.key}`;let i=n.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}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,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++},n,r,o);return}let i=e.element;if(!i&&e.value&&n&&n.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=n.renderer(e.value)}if(a.isValidElement(i)){let c=i.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let b=i.type;throw new Error(`Unknown element <${b}> in collection.`)}let u=c.getCollectionNode(i.props,this.context),d=e.index??0,f=u.next();for(;!f.done&&f.value;){let b=f.value;e.index=d;let p=b.key??null;p==null&&(p=b.element?null:this.getKey(i,e,n,r));let y=[...this.getFullNode({...b,key:p,index:d,wrapper:Op(e.wrapper,b.wrapper)},this.getChildState(n,b),r?`${r}${i.key}`:i.key,o)];for(let v of y){if(v.value=b.value??e.value??null,v.value&&this.cache.set(v.value,v),e.type&&v.type!==e.type)throw new Error(`Unsupported type <${Cr(v.type)}> in <${Cr((o==null?void 0:o.type)??"unknown parent type")}>. Only <${Cr(e.type)}> is supported.`);d++,yield v}f=u.next(y)}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==null?void 0:o.level)??0)+((o==null?void 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:Xi(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(n,u),s.key,s);for(let f of d)c++,yield f}})};yield s}constructor(){this.cache=new WeakMap}}function Xi(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function Op(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function Cr(t){return t[0].toUpperCase()+t.slice(1)}function Fp(t,e,n){let r=a.useMemo(()=>new Ap,[]),{children:o,items:i,collection:l}=t;return a.useMemo(()=>{if(l)return l;let c=r.build({children:o,items:i},n);return e(c)},[r,o,i,l,n,e])}function jp(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function ac(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,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(()=>Zi(t.selectedKeys),[t.selectedKeys]),b=a.useMemo(()=>Zi(t.defaultSelectedKeys,new Re),[t.defaultSelectedKeys]),[p,g]=qn(f,b,t.onSelectionChange),y=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[v,w]=a.useState(o);o==="replace"&&v==="toggle"&&typeof p=="object"&&p.size===0&&w("replace");let x=a.useRef(o);return a.useEffect(()=>{o!==x.current&&(w(o),x.current=o)},[o]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:v,setSelectionBehavior:w,get isFocused(){return l.current},setFocused(P){l.current=P,s(P)},get focusedKey(){return c.current},get childFocusStrategy(){return u.current},setFocusedKey(P,T="first"){c.current=P,u.current=T,d(P)},selectedKeys:p,setSelectedKeys(P){(r||!jp(P,p))&&g(P)},disabledKeys:y,disabledBehavior:i}}function Zi(t,e){return t?t==="all"?"all":new Re(t):e}function _p(t){let{onExpandedChange:e}=t,[n,r]=qn(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),o=ac(t),i=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),l=Fp(t,a.useCallback(c=>new Kp(c,{expandedKeys:n}),[n]),null);return a.useEffect(()=>{o.focusedKey!=null&&!l.getItem(o.focusedKey)&&o.setFocusedKey(null)},[l,o.focusedKey]),{collection:l,expandedKeys:n,disabledKeys:i,toggleKey:c=>{r(Bp(n,c))},setExpandedKeys:r,selectionManager:new er(l,o)}}function Bp(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const So=a.createContext(null),tr=a.createContext(null),qt=a.createContext(null),Fn=a.createContext(null);function Vp(t){let e=Co(t),n=a.useRef(null),{menuTriggerProps:r,menuProps:o}=dp({...t,type:"menu"},e,n),i=a.useRef(null);return es()?null:a.createElement(ze,{values:[[So,{...o,ref:i}],[Qe,e],[qt,e],[Jn,{trigger:"MenuTrigger",triggerRef:n,scrollRef:i,placement:"bottom start","aria-labelledby":o["aria-labelledby"]}]]},a.createElement(aa,{...r,ref:n,isPressed:e.isOpen},t.children))}const cc=a.createContext(null),Oo=class Oo extends St{filter(e,n,r){let o=e.getItem(this.firstChildKey);if(o&&r(o.textValue,this)){let i=this.clone();return n.addDescendants(i,e),i}return null}};Oo.type="submenutrigger";let Jr=Oo;const zp=ya(Jr,(t,e,n)=>{let{CollectionBranch:r}=a.useContext(Qn),o=a.useContext(tr),i=a.useContext(qt),l=Dp({triggerKey:n.key},i),s=a.useRef(null),c=Je(e),{parentMenuRef:u,shouldUseVirtualFocus:d}=a.useContext(cc),{submenuTriggerProps:f,submenuProps:b,popoverProps:p}=Rp({parentMenuRef:u,submenuRef:s,delay:t.delay,shouldUseVirtualFocus:d},l,c);return a.createElement(ze,{values:[[wt,{...f,onAction:void 0,ref:c}],[So,{ref:s,...b}],[Qe,l],[Jn,{trigger:"SubmenuTrigger",triggerRef:c,placement:"end top","aria-labelledby":b["aria-labelledby"],...p}]]},a.createElement(r,{collection:o.collection,parent:n}),t.children[1])},t=>t.children[0]),Hp=a.forwardRef(function(e,n){return[e,n]=Me(e,n,So),a.createElement(Bh,{content:a.createElement(Gh,e)},r=>a.createElement(Up,{props:e,collection:r,menuRef:n}))});function Up({props:t,collection:e,menuRef:n}){[t,n]=Me(t,n,zi);let{filter:r,...o}=t,i=a.useMemo(()=>r?e.filter(r):e,[e,r]),l=_p({...t,collection:i,children:void 0}),s=a.useContext(qt),{isVirtualized:c,CollectionRoot:u}=a.useContext(Qn),{menuProps:d}=$p({...t,isVirtualized:c,onClose:t.onClose||(s==null?void 0:s.close)},l,n),f=Te({...t,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),b=null;l.collection.size===0&&t.renderEmptyState&&(b=a.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState()));let p=ae(t,{global:!0});return a.createElement(xs,null,a.createElement(pe.div,{...Y(p,f,d),ref:n,slot:t.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:t.onScroll},a.createElement(ze,{values:[[tr,l],[Eo,{elementType:"div"}],[Yh,{name:"MenuSection",render:uc}],[cc,{parentMenuRef:n,shouldUseVirtualFocus:o==null?void 0:o.shouldUseVirtualFocus}],[wt,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[zi,null],[tp,null],[Fn,l.selectionManager],[qt,s??Co({})]]},a.createElement(ip,null,a.createElement(u,{collection:l.collection,persistedKeys:Jh(l.selectionManager.focusedKey),scrollRef:n}))),b))}class Wp extends er{constructor(e,n){super(e.collection,n),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}}function uc(t,e,n,r="react-aria-MenuSection"){var v,w,x;let o=a.useContext(tr),{CollectionBranch:i}=a.useContext(Qn),[l,s]=Ql(),{headingProps:c,groupProps:u}=Pp({heading:s,"aria-label":n.props["aria-label"]??void 0}),d=Te({...t,id:void 0,children:void 0,defaultClassName:r,className:(v=n.props)==null?void 0:v.className,style:(w=n.props)==null?void 0:w.style,values:void 0}),f=a.useContext(Fn),b=ac(t),p=t.selectionMode!=null?new Wp(f,b):f,g=(x=Jt(wt))==null?void 0:x.shouldCloseOnSelect,y=ae(t,{global:!0});return delete y.id,a.createElement(pe.section,{...Y(y,d,u),ref:e},a.createElement(ze,{values:[[np,{...c,ref:l}],[Fn,p],[wt,{shouldCloseOnSelect:t.shouldCloseOnSelect??g}]]},a.createElement(i,{collection:o.collection,parent:n})))}const Gp=ya(qr,uc),wt=a.createContext(null),qp=ga(Gr,function(e,n,r){var P;[e,n]=Me(e,n,wt);let o=(P=Jt(wt))==null?void 0:P.id,i=a.useContext(tr),l=Je(n),s=a.useContext(Fn),{isVirtualized:c}=a.useContext(Qn),{menuItemProps:u,labelProps:d,descriptionProps:f,keyboardShortcutProps:b,...p}=Sp({...e,id:o,key:r.key,selectionManager:s,isVirtualized:c},i,l),{hoverProps:g,isHovered:y}=en({isDisabled:p.isDisabled}),v=Te({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...p,isHovered:y,isFocusVisible:p.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?pe.a:pe.div,x=ae(e,{global:!0});return delete x.id,delete x.onClick,a.createElement(w,{...Y(x,v,u,g),ref:l,"data-disabled":p.isDisabled||void 0,"data-hovered":y||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":p.isFocusVisible||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.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(ze,{values:[[wa,{slots:{[Tn]:d,label:d,description:f}}],[rp,b],[lp,{isSelected:p.isSelected}]]},v.children))});function Yp(t,e){let{role:n="dialog"}=t,r=vn();r=t["aria-label"]?void 0:r;let o=a.useRef(!1);a.useEffect(()=>{if(e.current&&!$t(e.current)){Ye(e.current);let l=setTimeout(()=>{(ne()===e.current||ne()===document.body)&&(o.current=!0,e.current&&(e.current.blur(),Ye(e.current)),o.current=!1)},500);return()=>{clearTimeout(l)}}},[e]),ua();let i=a.useRef(!1);return a.useEffect(()=>{if(process.env.NODE_ENV!=="production"&&!i.current&&e.current){let l=e.current,s=l.hasAttribute("aria-label"),c=l.hasAttribute("aria-labelledby");!s&&!c&&(console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),i.current=!0)}}),{dialogProps:{...ae(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:l=>{o.current&&l.stopPropagation()}},titleProps:{id:r}}}const dc=a.createContext(null),Qe=a.createContext(null);function Xp(t){let e=Co(t),n=a.useRef(null),{triggerProps:r,overlayProps:o}=ic({type:"dialog"},e,n);return r.id=he(),o["aria-labelledby"]=r.id,a.createElement(ze,{values:[[Qe,e],[qt,e],[dc,o],[Jn,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":o["aria-labelledby"]}]]},a.createElement(aa,{...r,ref:n,isPressed:e.isOpen},t.children))}const Zp=a.forwardRef(function(e,n){let r=e["aria-labelledby"];[e,n]=Me(e,n,dc);let{dialogProps:o,titleProps:i}=Yp({...e,"aria-labelledby":r},n),l=a.useContext(Qe);!o["aria-label"]&&!o["aria-labelledby"]&&(e["aria-labelledby"]?o["aria-labelledby"]=e["aria-labelledby"]:process.env.NODE_ENV!=="production"&&console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let s=Te({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(l==null?void 0:l.close)||(()=>{})}}),c=ae(e,{global:!0});return a.createElement(pe.section,{...Y(c,s,o),render:e.render,ref:n,slot:e.slot||void 0},a.createElement(ze,{values:[[ms,{slots:{[Tn]:{},title:{...i,level:2}}}],[bs,{slots:{[Tn]:{},close:{onPress:()=>l==null?void 0:l.close()}}}]]},s.children))});function Jp(t,e,n){let{overlayProps:r,underlayProps:o}=Es({...t,isOpen:e.isOpen,onClose:e.close},n);return Cs({isDisabled:!e.isOpen}),ua(),a.useEffect(()=>{if(e.isOpen&&n.current)return gs([n.current],{shouldUseInert:!0})},[e.isOpen,n]),{modalProps:Y(r),underlayProps:o}}const Qp=a.createContext(null),Po=a.createContext(null),eb=a.forwardRef(function(e,n){if(a.useContext(Po)){if(process.env.NODE_ENV!=="production"&&(e.onOpenChange||e.defaultOpen!==void 0||e.isOpen!==void 0)){const y=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),v=Object.keys(e).filter(w=>y.has(w));console.warn(`This modal is already wrapped in a ModalOverlay, props [${v.join(", ")}] should be placed on the ModalOverlay instead.`)}return a.createElement(Ji,{...e,modalRef:n},e.children)}let{isDismissable:o,isKeyboardDismissDisabled:i,isOpen:l,defaultOpen:s,onOpenChange:c,children:u,isEntering:d,isExiting:f,UNSTABLE_portalContainer:b,shouldCloseOnInteractOutside:p,...g}=e;return a.createElement(fc,{isDismissable:o,isKeyboardDismissDisabled:i,isOpen:l,defaultOpen:s,onOpenChange:c,isEntering:d,isExiting:f,UNSTABLE_portalContainer:b,shouldCloseOnInteractOutside:p},a.createElement(Ji,{...g,modalRef:n},u))});function tb(t,e){[t,e]=Me(t,e,Qp);let n=a.useContext(Qe),r=wo(t),o=t.isOpen!=null||t.defaultOpen!=null||!n?r:n;o===n&&process.env.NODE_ENV!=="production"&&(t.onOpenChange||t.defaultOpen!==void 0||t.isOpen!==void 0)&&console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.");let i=Je(e),l=a.useRef(null),s=Mr(i,o.isOpen),c=Mr(l,o.isOpen),u=s||c||t.isExiting||!1,d=Ze();return!o.isOpen&&!u||d?null:a.createElement(nb,{...t,state:o,isExiting:u,overlayRef:i,modalRef:l})}const fc=a.forwardRef(tb);function nb({UNSTABLE_portalContainer:t,...e}){let n=e.modalRef,{state:r}=e,{modalProps:o,underlayProps:i}=Jp(e,r,n),l=ao(e.overlayRef)||e.isEntering||!1,s=Te({...e,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:l,isExiting:e.isExiting,state:r}}),c=Lu(),u,d;if(typeof document<"u"){let b=st(document.body)?document.body:document.scrollingElement||document.documentElement,p=b.getBoundingClientRect().width%1,g=b.getBoundingClientRect().height%1;u=b.scrollWidth-p,d=b.scrollHeight-g}let f={...s.style,"--visual-viewport-width":c.width+"px","--visual-viewport-height":c.height+"px","--page-width":u!==void 0?u+"px":void 0,"--page-height":d!==void 0?d+"px":void 0};return a.createElement(Wr,{isExiting:e.isExiting,portalContainer:t},a.createElement(pe.div,{...Y(ae(e,{global:!0}),i),...s,style:f,ref:e.overlayRef,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},a.createElement(ze,{values:[[Po,{modalProps:o,modalRef:n,isExiting:e.isExiting,isDismissable:e.isDismissable}],[Qe,r]]},s.children)))}function Ji(t){let{modalProps:e,modalRef:n,isExiting:r,isDismissable:o}=a.useContext(Po),i=a.useContext(Qe),l=a.useMemo(()=>ut(t.modalRef,n),[t.modalRef,n]),s=Je(l),c=ao(s),u=Te({...t,defaultClassName:"react-aria-Modal",values:{isEntering:c,isExiting:r,state:i}});return a.createElement(pe.div,{...Y(ae(t,{global:!0}),e),...u,ref:s,"data-entering":c||void 0,"data-exiting":r||void 0},o&&a.createElement(Ur,{onDismiss:i.close}),u.children)}const rb=a.forwardRef(({children:t,...e},n)=>{n=Je(n);let{pressProps:r}=Xe({...e,ref:n}),{focusableProps:o}=Qt(e,n),i=a.Children.only(t);a.useEffect(()=>{if(process.env.NODE_ENV==="production")return;let s=n.current;if(!s||!(s instanceof fe(s).Element)){console.error("<Pressable> child must forward its ref to a DOM element.");return}if(!e.isDisabled&&!fo(s)){console.warn("<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(s.localName!=="button"&&s.localName!=="input"&&s.localName!=="select"&&s.localName!=="textarea"&&s.localName!=="a"&&s.localName!=="area"&&s.localName!=="summary"){let c=s.getAttribute("role");c?c!=="application"&&c!=="button"&&c!=="checkbox"&&c!=="combobox"&&c!=="gridcell"&&c!=="link"&&c!=="menuitem"&&c!=="menuitemcheckbox"&&c!=="menuitemradio"&&c!=="option"&&c!=="radio"&&c!=="searchbox"&&c!=="separator"&&c!=="slider"&&c!=="spinbutton"&&c!=="switch"&&c!=="tab"&&c!=="textbox"&&c!=="treeitem"&&console.warn(`<Pressable> child must have an interactive ARIA role. Got "${c}".`):console.warn("<Pressable> child must have an interactive ARIA role.")}},[n,e.isDisabled]);let l=parseInt(a.version,10)<19?i.ref:i.props.ref;return a.cloneElement(i,{...Y(r,o,i.props),ref:ut(l,n)})}),Qi=({children:t,className:e,slot:n,style:r,variant:o,...i})=>{const l=a.useMemo(()=>Wd({variant:o}),[o]);return h.jsx(xo,{"aria-label":"Close",className:Ee(e,l),"data-slot":"close-button",slot:n,style:r,...i,children:s=>typeof t=="function"?t(s):t??h.jsx(zf,{"data-slot":"close-button-icon"})})},ob=Object.assign(Qi,{Root:Qi}),ib=a.createContext(null),lb=a.createContext(null);function sb(t,e,n){let{validationBehavior:r,focus:o}=t;J(()=>{if(r==="native"&&(n!=null&&n.current)&&!n.current.disabled){let u=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(cb(n.current))}});let i=a.useRef(!1),l=Pe(()=>{i.current||e.resetValidation()}),s=Pe(u=>{var f,b;e.displayValidation.isInvalid||e.commitValidation();let d=(f=n==null?void 0:n.current)==null?void 0:f.form;!u.defaultPrevented&&n&&d&&ub(d)===n.current&&(o?o():(b=n.current)==null||b.focus(),Or("keyboard")),u.preventDefault()}),c=Pe(()=>{e.commitValidation()});a.useEffect(()=>{let u=n==null?void 0:n.current;if(!u)return;let d=u.form,f=d==null?void 0:d.reset;return d&&(d.reset=()=>{i.current=!window.event||window.event.type==="message"&&F(window.event)instanceof MessagePort,f==null||f.call(d),i.current=!1}),u.addEventListener("invalid",s),u.addEventListener("change",c),d==null||d.addEventListener("reset",l),()=>{u.removeEventListener("invalid",s),u.removeEventListener("change",c),d==null||d.removeEventListener("reset",l),d&&(d.reset=f)}},[n,r])}function ab(t){let e=t.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function cb(t){return{isInvalid:!t.validity.valid,validationDetails:ab(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function ub(t){var e;for(let n=0;n<t.elements.length;n++){let r=t.elements[n];if(((e=r.validity)==null?void 0:e.valid)===!1)return r}return null}function db(t,e){let{elementType:n="a",onPress:r,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:s,...c}=t,u={};n!=="a"&&(u={role:"link",tabIndex:s?void 0:0});let{focusableProps:d}=Qt(t,e),{pressProps:f,isPressed:b}=Xe({onPress:r,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:s,ref:e}),p=ae(c,{labelable:!0}),g=Y(d,f),y=Xt(),v=Sl(t);return{isPressed:b,linkProps:Y(p,v,{...g,...u,"aria-disabled":s||void 0,"aria-current":t["aria-current"],onClick:w=>{var x;(x=f.onClick)==null||x.call(f,w),Pl(w,y,t.href,t.routerOptions)}})}}const fb=a.createContext(null),hb=a.forwardRef(function(e,n){[e,n]=Me(e,n,fb);let r=e.href&&!e.isDisabled?"a":"span",{linkProps:o,isPressed:i}=db({...e,elementType:r},n),l=pe[r],{hoverProps:s,isHovered:c}=en(e),{focusProps:u,isFocused:d,isFocusVisible:f}=vo(),b=Te({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:i,isHovered:c,isFocused:d,isFocusVisible:f}}),p=ae(e,{global:!0});return delete p.onClick,a.createElement(l,{ref:n,slot:e.slot||void 0,...Y(p,b,o,s,u),"data-focused":d||void 0,"data-hovered":c||void 0,"data-pressed":i||void 0,"data-focus-visible":f||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},b.children)}),hc=a.createContext({}),el=({children:t,className:e,...n})=>{const r=a.useMemo(()=>qd(),[]);return h.jsx(hc,{value:{slots:r},children:h.jsx(hb,{...n,className:Ee(e,r==null?void 0:r.base()),children:o=>h.jsx(h.Fragment,{children:typeof t=="function"?t(o):t})})})},pb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(hc);return h.jsx(oe.span,{className:ie(r==null?void 0:r.icon,e),"data-default-icon":_f(!t),"data-slot":"link-icon",...n,children:t??h.jsx(Vf,{"data-slot":"link-default-icon"})})},ko=Object.assign(el,{Root:el,Icon:pb});function bb(t={}){let{isReadOnly:e}=t,[n,r]=qn(t.isSelected,t.defaultSelected||!1,t.onChange),[o]=a.useState(n);function i(s){e||r(s)}function l(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??o,setSelected:i,toggle:l}}const mb=a.createContext({}),gb="__button_group_child",tl=({children:t,className:e,fullWidth:n,isDisabled:r,isIconOnly:o,size:i,slot:l,style:s,variant:c,[gb]:u,...d})=>{const f=a.useContext(mb),b=u===!0,p=i??(b?f==null?void 0:f.size:void 0),g=c??(b?f==null?void 0:f.variant:void 0),y=r??(b?f==null?void 0:f.isDisabled:void 0),v=n??(b?f==null?void 0:f.fullWidth:void 0),w=qe({fullWidth:v,isIconOnly:o,size:p,variant:g});return h.jsx(xo,{className:Ee(e,w),"data-slot":"button",isDisabled:y,slot:l,style:s,...d,children:x=>typeof t=="function"?t(x):t})},yb=Object.assign(tl,{Root:tl}),Pt=a.createContext({}),nl=({children:t,className:e,variant:n="default",...r})=>{const o=a.useMemo(()=>zd({variant:n}),[n]),i=h.jsx(oe.div,{className:o.base({className:e}),"data-slot":"card",...r,children:t});return h.jsx(Pt,{value:{slots:o},children:n==="transparent"?i:h.jsx(Yn,{value:{variant:n},children:i})})},vb=({className:t,...e})=>{const{slots:n}=a.useContext(Pt);return h.jsx(oe.div,{className:ie(n==null?void 0:n.header,t),"data-slot":"card-header",...e})},xb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(Pt);return h.jsx(oe.h3,{className:ie(r==null?void 0:r.title,e),"data-slot":"card-title",...n,children:t})},$b=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(Pt);return h.jsx(oe.p,{className:ie(r==null?void 0:r.description,e),"data-slot":"card-description",...n,children:t})},wb=({className:t,...e})=>{const{slots:n}=a.useContext(Pt);return h.jsx(oe.div,{className:ie(n==null?void 0:n.content,t),"data-slot":"card-content",...e})},Eb=({className:t,...e})=>{const{slots:n}=a.useContext(Pt);return h.jsx(oe.div,{className:ie(n==null?void 0:n.footer,t),"data-slot":"card-footer",...e})},Ot=Object.assign(nl,{Root:nl,Header:vb,Title:xb,Description:$b,Content:wb,Footer:Eb}),Cb=new WeakMap;function Sb(t=!0){let[e,n]=a.useState(t),r=a.useRef(!1),o=a.useCallback(i=>{r.current=!0,n(!!i)},[]);return J(()=>{r.current||n(!1)},[]),[o,e]}function rl(t=!0){let e=he(),[n,r]=Sb(t);return{id:r?e:void 0,ref:n}}const pc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},bc={...pc,customError:!0,valid:!1},mt={isInvalid:!1,validationDetails:pc,validationErrors:[]},Pb=a.createContext({}),jn="__reactAriaFormValidationState";function mc(t){if(t[jn]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=t[jn];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return kb(t)}function kb(t){let{isInvalid:e,validationState:n,name:r,value:o,builtinValidation:i,validate:l,validationBehavior:s="aria"}=t;n&&(e||(e=n==="invalid"));let c=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:bc}:null,u=a.useMemo(()=>{if(!l||o==null)return null;let k=Tb(l,o);return ol(k)},[l,o]);i!=null&&i.validationDetails.valid&&(i=void 0);let d=a.useContext(Pb),f=a.useMemo(()=>r?Array.isArray(r)?r.flatMap(k=>Qr(d[k])):Qr(d[r]):[],[d,r]),[b,p]=a.useState(d),[g,y]=a.useState(!1);d!==b&&(p(d),y(!1));let v=a.useMemo(()=>ol(g?[]:f),[g,f]),w=a.useRef(mt),[x,P]=a.useState(mt),T=a.useRef(mt),R=()=>{if(!K)return;M(!1);let k=u||i||w.current;Sr(k,T.current)||(T.current=k,P(k))},[K,M]=a.useState(!1);return a.useEffect(R),{realtimeValidation:c||v||u||i||mt,displayValidation:s==="native"?c||v||x:c||v||u||i||x,updateValidation(k){s==="aria"&&!Sr(x,k)?P(k):w.current=k},resetValidation(){let k=mt;Sr(k,T.current)||(T.current=k,P(k)),s==="native"&&M(!1),y(!0)},commitValidation(){s==="native"&&M(!0),y(!0)}}}function Qr(t){return t?Array.isArray(t)?t:[t]:[]}function Tb(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return Qr(n)}return[]}function ol(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:bc}:null}function Sr(t,e){return t===e?!0:!!t&&!!e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((n,r)=>n===e.validationErrors[r])&&Object.entries(t.validationDetails).every(([n,r])=>e.validationDetails[n]===r)}function Mb(t,e,n){let{isDisabled:r=!1,isReadOnly:o=!1,value:i,name:l,form:s,children:c,isRequired:u,validationBehavior:d="aria","aria-label":f,"aria-labelledby":b,"aria-describedby":p,onPressStart:g,onPressEnd:y,onPressChange:v,onPress:w,onPressUp:x,onClick:P}=t,T=mc({...t,value:e.isSelected}),{isInvalid:R,validationErrors:K,validationDetails:M}=T.displayValidation;sb(t,T,n);let N=L=>{L.stopPropagation(),e.setSelected(F(L).checked)},O=c!=null,k=f!=null||b!=null;!O&&!k&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:A,isPressed:V}=Xe({onPressStart:g,onPressEnd:y,onPressChange:v,onPress:w,onPressUp:x,onClick:P,isDisabled:r}),[j,m]=a.useState(!1),{pressProps:E}=Xe({onPressStart(L){if(L.pointerType==="keyboard"||L.pointerType==="virtual"){L.continuePropagation();return}g==null||g(L),v==null||v(!0),m(!0)},onPressEnd(L){if(L.pointerType==="keyboard"||L.pointerType==="virtual"){L.continuePropagation();return}y==null||y(L),v==null||v(!1),m(!1)},onPressUp(L){if(L.pointerType==="keyboard"||L.pointerType==="virtual"){L.continuePropagation();return}x==null||x(L)},onClick:P,onPress(L){var G;if(L.pointerType==="keyboard"||L.pointerType==="virtual"){L.continuePropagation();return}w==null||w(L),e.toggle(),(G=n.current)==null||G.focus();let{[jn]:U}=t,{commitValidation:W}=U||T;W()},isDisabled:r||o}),{focusableProps:I}=Qt(t,n),C=Y(A,I),D=ae(t,{labelable:!0});Fu(n,e.defaultSelected,e.setSelected);let $=rl(),S=rl();return{labelProps:Y(E,{onClick:L=>L.preventDefault()}),inputProps:Y(D,{checked:e.isSelected,"aria-required":u&&d==="aria"||void 0,required:u&&d==="native","aria-invalid":R||t.validationState==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-controls":t["aria-controls"],"aria-readonly":o||void 0,"aria-describedby":[$.id,S.id,p].filter(Boolean).join(" ")||void 0,onChange:N,disabled:r,...i==null?{}:{value:i},name:l,form:s,type:"checkbox",...C}),descriptionProps:$,errorMessageProps:S,isSelected:e.isSelected,isPressed:V||j,isDisabled:r,isReadOnly:o,isInvalid:R||t.validationState==="invalid",validationErrors:K,validationDetails:M}}function gc(t,e,n){let{labelProps:r,inputProps:o,descriptionProps:i,errorMessageProps:l,isSelected:s,isPressed:c,isDisabled:u,isReadOnly:d,isInvalid:f,validationErrors:b,validationDetails:p}=Mb(t,e,n),{isIndeterminate:g}=t;return a.useEffect(()=>{n.current&&(n.current.indeterminate=!!g)}),{labelProps:Y(r,a.useMemo(()=>({onMouseDown:y=>y.preventDefault()}),[])),inputProps:o,descriptionProps:i,errorMessageProps:l,isSelected:s,isPressed:c,isDisabled:u,isReadOnly:d,isInvalid:f,validationErrors:b,validationDetails:p}}const Rb=typeof document<"u"?a.useInsertionEffect??a.useLayoutEffect:()=>{};function Db(t,e,n){let[r,o]=a.useState(t||e),i=a.useRef(r),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:r;Rb(()=>{i.current=c});let[,u]=a.useReducer(()=>({}),{}),d=a.useCallback((f,...b)=>{let p=typeof f=="function"?f(i.current):f;Object.is(i.current,p)||(i.current=p,o(p),u(),n==null||n(p,...b))},[n]);return[c,d]}function Nb(t={}){let{isReadOnly:e}=t,[n,r]=Db(t.isSelected,t.defaultSelected||!1,t.onChange),[o]=a.useState(n);function i(s){e||r(s)}function l(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??o,setSelected:i,toggle:l}}function Ib(t,e,n){const r=Nb({isReadOnly:t.isReadOnly||e.isReadOnly,isSelected:e.isSelected(t.value),defaultSelected:e.defaultValue.includes(t.value),onChange(y){y?e.addValue(t.value):e.removeValue(t.value),t.onChange&&t.onChange(y)}});let{name:o,form:i,descriptionId:l,errorMessageId:s,validationBehavior:c}=Cb.get(e);c=t.validationBehavior??c;let{realtimeValidation:u}=mc({...t,value:r.isSelected,name:void 0,validationBehavior:"aria"}),d=a.useRef(mt),f=()=>{e.setInvalid(t.value,u.isInvalid?u:d.current)};a.useEffect(f);let b=e.realtimeValidation.isInvalid?e.realtimeValidation:u,p=c==="native"?e.displayValidation:b,g=gc({...t,isReadOnly:t.isReadOnly||e.isReadOnly,isDisabled:t.isDisabled||e.isDisabled,name:t.name||o,form:t.form||i,isRequired:t.isRequired??e.isRequired,validationBehavior:c,[jn]:{realtimeValidation:b,displayValidation:p,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(y){d.current=y,f()}}},r,n);return{...g,inputProps:{...g.inputProps,"aria-describedby":[g.inputProps["aria-describedby"],e.isInvalid?s:null,l].filter(Boolean).join(" ")||void 0}}}const Lb=a.createContext(null),yc=a.createContext(null),vc=a.createContext(null),Kb=a.forwardRef(function(e,n){let{inputRef:r=null,...o}=e;[e,n]=Me(o,n,Lb);let i=a.useContext(yc),[l,s]=Ab(e,r),{descriptionProps:c,errorMessageProps:u,isSelected:d,isDisabled:f,isReadOnly:b,isInvalid:p,validationDetails:g,validationErrors:y}=l,v=Te({...e,defaultClassName:"react-aria-CheckboxField",values:{isSelected:d,isIndeterminate:e.isIndeterminate||!1,isDisabled:f,isReadOnly:b,isInvalid:p,isRequired:e.isRequired||!1}}),w=ae(e,{global:!0});return delete w.id,delete w.onClick,a.createElement(pe.div,{...Y(w,v),ref:n,slot:e.slot||void 0,"data-selected":d||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-disabled":f||void 0,"data-readonly":b||void 0,"data-invalid":p||void 0,"data-required":e.isRequired||void 0},a.createElement(ze,{values:[[vc,{...l,inputRef:s,defaultClassName:"react-aria-CheckboxButton",isIndeterminate:e.isIndeterminate,isRequired:e.isRequired}],[wa,{slots:{description:c,errorMessage:u}}],[ib,i?null:{isInvalid:p,validationDetails:g,validationErrors:y}]]},v.children))});function Ab(t,e){let{validationBehavior:n}=Jt(lb)||{},r=t.validationBehavior??n??"native",o=a.useContext(yc),i=Je(a.useMemo(()=>ut(e,t.inputRef!==void 0?t.inputRef:null),[e,t.inputRef])),l={...ef(t),children:typeof t.children=="function"?!0:t.children,value:t.value,validationBehavior:r};return[o?Ib(l,o,i):gc(l,bb(t),i),i]}const Ob=a.forwardRef(function(e,n){let{labelProps:r,inputProps:o,isSelected:i,isDisabled:l,isReadOnly:s,isPressed:c,isInvalid:u,inputRef:d,defaultClassName:f,isIndeterminate:b,isRequired:p}=a.useContext(vc),{isFocused:g,isFocusVisible:y,focusProps:v}=vo(),w=l||s,{hoverProps:x,isHovered:P}=en({...e,isDisabled:w}),T=Te({...e,defaultClassName:f,values:{isSelected:i,isIndeterminate:b||!1,isPressed:c,isHovered:P,isFocused:g,isFocusVisible:y,isDisabled:l,isReadOnly:s,isInvalid:u,isRequired:p||!1}}),R=ae(e,{global:!0});return delete R.id,delete R.onClick,a.createElement(pe.label,{...Y(R,r,x,T),ref:n,slot:e.slot||void 0,"data-selected":i||void 0,"data-indeterminate":b||void 0,"data-pressed":c||void 0,"data-hovered":P||void 0,"data-focused":g||void 0,"data-focus-visible":y||void 0,"data-disabled":l||void 0,"data-readonly":s||void 0,"data-invalid":u||void 0,"data-required":p||void 0},a.createElement(sa,{elementType:"span"},a.createElement("input",{...Y(o,v),ref:d})),T.children)}),Fb=a.createContext({}),nr=a.createContext({}),eo=({children:t,className:e,variant:n,...r})=>{const o=a.useContext(Fb),i=n??o.variant,l=a.useMemo(()=>Hd({variant:i}),[i]);return h.jsx(Kb,{"data-slot":"checkbox",...r,className:Ee(e,l.base()),children:s=>h.jsx(nr,{value:{slots:l,state:s},children:typeof t=="function"?t(s):t})})};eo.displayName="HeroUI.Checkbox";const xc=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(nr);return h.jsx(Ob,{"data-slot":"checkbox-content",...n,className:Ee(e,r==null?void 0:r.content()),children:t})};xc.displayName="HeroUI.Checkbox.Content";const $c=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(nr);return h.jsx(oe.span,{className:ie(r==null?void 0:r.control,e),"data-slot":"checkbox-control",...n,children:t})};$c.displayName="HeroUI.Checkbox.Control";const wc=({children:t,className:e,...n})=>{const{slots:r,state:o}=a.useContext(nr),i=o==null?void 0:o.isSelected,l=o==null?void 0:o.isIndeterminate,s=typeof t=="function"?t(o??{}):t||(l?h.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--indeterminate",fill:"none",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeWidth:3,viewBox:"0 0 24 24",children:h.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}):h.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:i?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:h.jsx("polyline",{points:"1 9 7 14 15 4"})}));return h.jsx(oe.span,{"aria-hidden":"true",className:ie(r==null?void 0:r.indicator,e),"data-slot":"checkbox-indicator",...n,children:s})};wc.displayName="HeroUI.Checkbox.Indicator";const gn=Object.assign(eo,{Root:eo,Content:xc,Control:$c,Indicator:wc}),Ec=a.createContext({}),il=({children:t,className:e,color:n,size:r,variant:o,...i})=>{const l=a.useMemo(()=>Ud({color:n,size:r,variant:o}),[n,r,o]),s=a.useMemo(()=>typeof t=="string"||typeof t=="number"?h.jsx(Cc,{children:t}):t,[t]);return h.jsx(Ec,{value:{slots:l},children:h.jsx(oe.span,{...i,className:ie(l.base,e),"data-slot":"chip",children:s})})},Cc=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(Ec);return h.jsx(oe.span,{className:ie(r==null?void 0:r.label,e),"data-slot":"chip-label",...n,children:t})},_n=Object.assign(il,{Root:il,Label:Cc}),rr=a.createContext({}),to=({children:t,className:e,color:n,size:r,...o})=>{const i=a.useMemo(()=>Yd({color:n,size:r}),[n,r]);return h.jsx(yf,{"data-slot":"progress-bar",...o,className:Ee(e,i.base()),children:l=>h.jsx(rr,{value:{slots:i,state:l},children:typeof t=="function"?t(l):t})})};to.displayName="HeroUI.ProgressBar";const Sc=({children:t,className:e,...n})=>{const{slots:r,state:o}=a.useContext(rr);return h.jsx(oe.span,{className:ie(r==null?void 0:r.output,e),"data-slot":"progress-bar-output",...n,children:t??(o==null?void 0:o.valueText)})};Sc.displayName="HeroUI.ProgressBar.Output";const Pc=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(rr);return h.jsx(oe.div,{className:ie(r==null?void 0:r.track,e),"data-slot":"progress-bar-track",...n,children:t})};Pc.displayName="HeroUI.ProgressBar.Track";const kc=({className:t,style:e,...n})=>{const{slots:r,state:o}=a.useContext(rr);return h.jsx(oe.div,{className:ie(r==null?void 0:r.fill,t),"data-slot":"progress-bar-fill",style:{...e,width:o!=null&&o.isIndeterminate?void 0:`${(o==null?void 0:o.percentage)??0}%`},...n})};kc.displayName="HeroUI.ProgressBar.Fill";const yn=Object.assign(to,{Root:to,Output:Sc,Track:Pc,Fill:kc}),ll=({className:t,orientation:e,variant:n,...r})=>{const o=Jt(Eo),i=e??(o==null?void 0:o.orientation)??"horizontal";return h.jsx(ap,{"data-orientation":i,"data-slot":"separator",orientation:i,className:Jd({orientation:i,variant:n,className:t}),...r})},jb=Object.assign(ll,{Root:ll}),tn=a.createContext({}),sl=({children:t,className:e,status:n,...r})=>{const o=a.useMemo(()=>Vd({status:n}),[n]);return h.jsx(tn,{value:{slots:o,status:n},children:h.jsx(Yn,{value:{variant:"default"},children:h.jsx(oe.div,{className:o==null?void 0:o.base({className:e}),"data-slot":"alert-root",...r,children:t})})})},_b=({children:t,className:e,...n})=>{const{slots:r,status:o}=a.useContext(tn),i=()=>{switch(o){case"accent":return h.jsx(yi,{"data-slot":"alert-default-icon"});case"success":return h.jsx(Wf,{"data-slot":"alert-default-icon"});case"warning":return h.jsx(Hf,{"data-slot":"alert-default-icon"});case"danger":return h.jsx(Uf,{"data-slot":"alert-default-icon"});default:return h.jsx(yi,{"data-slot":"alert-default-icon"})}};return h.jsx(oe.div,{className:ie(r==null?void 0:r.indicator,e),"data-slot":"alert-indicator",...n,children:t??i()})},Bb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(tn);return h.jsx(oe.div,{className:ie(r==null?void 0:r.content,e),"data-slot":"alert-content",...n,children:t})},Vb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(tn);return h.jsx(oe.p,{className:ie(r==null?void 0:r.title,e),"data-slot":"alert-title",...n,children:t})},zb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(tn);return h.jsx(oe.span,{className:ie(r==null?void 0:r.description,e),"data-slot":"alert-description",...n,children:t})},Rt=Object.assign(sl,{Root:sl,Indicator:_b,Content:Bb,Title:Vb,Description:zb}),To=a.createContext({}),Hb=({children:t,className:e,variant:n,...r})=>{const o=a.useMemo(()=>Xd({variant:n}),[n]);return h.jsx(qp,{className:Ee(e,o.item()),"data-slot":"menu-item",...r,children:i=>h.jsx(To,{value:{slots:o,state:i},children:typeof t=="function"?t(i):t})})},Ub=({children:t,className:e,type:n="checkmark",...r})=>{const{slots:o,state:i}=a.useContext(To),l=i==null?void 0:i.isSelected,s=typeof t=="function"?t(i??{}):t||(n==="dot"?h.jsx("svg",{"aria-hidden":"true","data-slot":"menu-item-indicator--dot",fill:"currentColor",fillRule:"evenodd",role:"presentation",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{clipRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14",fillRule:"evenodd"})}):h.jsx("svg",{"aria-hidden":"true","data-slot":"menu-item-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:l?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:h.jsx("polyline",{points:"1 9 7 14 15 4"})}));return h.jsx(oe.span,{"aria-hidden":"true",className:ie(o==null?void 0:o.indicator,e),"data-slot":"menu-item-indicator","data-type":n,"data-visible":l||void 0,...r,children:s})},Wb=({children:t,className:e,...n})=>{const{slots:r,state:o}=a.useContext(To);if(!(o==null?void 0:o.hasSubmenu))return null;const s=t??h.jsx(Bf,{});return h.jsx(oe.span,{"aria-hidden":"true",className:ie(r==null?void 0:r.submenuIndicator,e),"data-slot":"submenu-indicator",...n,children:s})},Gb=({children:t,className:e,...n})=>{const r=a.useMemo(()=>Zd({class:typeof e=="string"?e:void 0}),[e]);return h.jsx(Gp,{className:r,...n,children:t})},or=a.createContext({}),al=({children:t,...e})=>{const n=a.useMemo(()=>Gd(),[]);return h.jsx(or,{value:{slots:n},children:h.jsx(Vp,{...e,children:t})})},qb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(or);return h.jsx(xo,{className:Ee(e,r==null?void 0:r.trigger()),"data-slot":"dropdown-trigger",...n,children:o=>h.jsx(h.Fragment,{children:typeof t=="function"?t(o):t})})},Yb=({children:t,className:e,placement:n,...r})=>{const{slots:o}=a.useContext(or);return h.jsx(Yn,{value:{variant:"default"},children:h.jsx(Nh,{...r,className:Ee(e,o==null?void 0:o.popover()),"data-slot":"dropdown-popover",placement:n,children:t})})};function Xb({className:t,...e}){const{slots:n}=a.useContext(or);return h.jsx(Hp,{className:Ee(t,n==null?void 0:n.menu()),"data-selection-mode":e.selectionMode,"data-slot":"dropdown-menu",...e})}const Zb=t=>h.jsx(Hb,{...t}),Jb=t=>h.jsx(Wb,{...t}),Qb=({children:t,...e})=>h.jsx(zp,{"data-slot":"dropdown-submenu-trigger",...e,children:t}),em=t=>h.jsx(Ub,{...t}),tm=t=>h.jsx(Gb,{...t}),Dt=Object.assign(al,{Root:al,Trigger:qb,Popover:Yb,Menu:Xb,Section:tm,Item:Zb,ItemIndicator:em,SubmenuIndicator:Jb,SubmenuTrigger:Qb}),we=a.createContext({}),cl=({children:t,state:e,...n})=>{const r=a.useMemo(()=>({slots:bo(),placement:void 0}),[]),o=a.useMemo(()=>e?{isOpen:e.isOpen,onOpenChange:e.setOpen}:{},[e]);return h.jsx(we,{value:r,children:h.jsx(Xp,{"data-slot":"modal-root",...Y(n,o),children:t})})},nm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(rb,{children:h.jsx(oe.div,{className:ie(r==null?void 0:r.trigger,e),"data-slot":"modal-trigger",role:"button",...n,children:t})})},rm=({children:t,className:e,isDismissable:n=!0,onClick:r,variant:o,...i})=>{const{slots:l}=a.useContext(we),s=a.useMemo(()=>bo({variant:o}),[o]),c=a.useMemo(()=>({slots:{...l,...s}}),[l,s]);return h.jsx(fc,{className:Ee(e,s==null?void 0:s.backdrop()),"data-slot":"modal-backdrop",isDismissable:n,onClick:u=>{u.stopPropagation(),r==null||r(u)},...i,children:u=>h.jsxs(we,{value:c,children:[typeof t=="function"?t(u):t," "]})})},om=({children:t,className:e,placement:n="auto",scroll:r,size:o,...i})=>{const{slots:l}=a.useContext(we),s=a.useMemo(()=>bo({scroll:r,size:o}),[r,o]),c=a.useMemo(()=>({placement:n,slots:{...l,...s}}),[l,n,s]);return h.jsx(eb,{className:Ee(e,s==null?void 0:s.container()),"data-placement":n,"data-slot":"modal-container",...i,children:u=>h.jsx(we,{value:c,children:typeof t=="function"?t(u):t})})},im=({children:t,className:e,...n})=>{const{placement:r,slots:o}=a.useContext(we);return h.jsx(Yn,{value:{variant:"default"},children:h.jsx(Zp,{className:ie(o==null?void 0:o.dialog,e),"data-placement":r,"data-slot":"modal-dialog",...n,children:t})})},lm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(oe.div,{className:ie(r==null?void 0:r.header,e),"data-slot":"modal-header",...n,children:t})},sm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(oe.div,{className:ie(r==null?void 0:r.body,e),"data-slot":"modal-body",...n,children:t})},am=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(oe.div,{className:ie(r==null?void 0:r.footer,e),"data-slot":"modal-footer",...n,children:t})},cm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(jf,{className:ie(r==null?void 0:r.heading,e),"data-slot":"modal-heading",slot:"title",...n,children:t})},um=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(oe.div,{className:ie(r==null?void 0:r.icon,e),"data-slot":"modal-icon",...n,children:t})},dm=({className:t,...e})=>{const{slots:n}=a.useContext(we);return h.jsx(ob,{className:Ee(t,n==null?void 0:n.closeTrigger()),"data-slot":"modal-close-trigger",slot:"close",...e})},pt=Object.assign(cl,{Root:cl,Trigger:nm,Backdrop:rm,Container:om,Dialog:im,Header:lm,Icon:um,Heading:cm,Body:sm,Footer:am,CloseTrigger:dm}),fm={easy:"GREEN",moderate:"ORANGE",difficult:"RED"},hm={easy:"Easy",moderate:"Moderate",difficult:"Difficult"};function pm(){return h.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[1em]",children:[h.jsx("path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),h.jsx("path",{d:"m13.4 10.6 3.6-3.6"}),h.jsx("path",{d:"M3.3 16a9 9 0 1 1 17.4 0"})]})}function Tc({difficulty:t,label:e,showIcon:n=!0,size:r="md",className:o}){const i=je[fm[t]];return h.jsxs(_n,{variant:"soft",size:r,className:q(o),style:{backgroundColor:ot(i,.15),color:i},children:[n&&h.jsx(pm,{}),h.jsx(_n.Label,{children:e??hm[t]})]})}const ul=h.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01"}),dl=h.jsxs(h.Fragment,{children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"M12 16v-4M12 8h.01"})]}),bm=h.jsxs(h.Fragment,{children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),mm={note:dl,info:dl,tip:bm,caution:ul,danger:ul};function gm({type:t}){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5",children:mm[t]})}function ym({type:t="caution",title:e,icon:n,children:r,className:o}){const i=e===void 0?Cn[t]:e,l=$l(t);return h.jsxs(Rt,{className:q("border",o),style:{backgroundColor:ot(l,.1),borderColor:l},children:[h.jsx(Rt.Indicator,{style:{color:l},children:n??h.jsx(gm,{type:t})}),h.jsxs(Rt.Content,{children:[i!=null&&h.jsx(Rt.Title,{children:i}),h.jsx(Rt.Description,{children:r})]})]})}const Mc="media-figure-point-marker absolute flex -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full font-semibold shadow ring-2 ring-background",Bn="media-figure-shape-outline";function vm(t){return t.type==="circle"}function xm(t){return t.type==="rectangle"}function $m(t,e){const n=t.id??e,r=t.color??"GREY",o=je[r];if(vm(t))return h.jsx("div",{role:"img","aria-label":t.title,className:q("pointer-events-none absolute rounded-full",Bn),style:{left:`${t.x}%`,top:`${t.y}%`,width:`${t.radius*2}%`,aspectRatio:"1",transform:"translate(-50%, -50%)",borderColor:o,backgroundColor:ot(o,.1)}},n);if(xm(t)){const i=Math.min(t.x1,t.x2),l=Math.min(t.y1,t.y2),s=Math.abs(t.x2-t.x1),c=Math.abs(t.y2-t.y1);return h.jsx("div",{role:"img","aria-label":t.title,className:q("pointer-events-none absolute",Bn),style:{left:`${i}%`,top:`${l}%`,width:`${s}%`,height:`${c}%`,borderColor:o,backgroundColor:ot(o,.1)}},n)}return h.jsx("span",{role:"img","aria-label":t.title,style:{left:`${t.x}%`,top:`${t.y}%`,backgroundColor:o,color:Hn(o)},className:Mc,children:t.label},n)}function no({annotations:t}){return h.jsx(h.Fragment,{children:t.map($m)})}const Vn=4/3,Mo=16;function ct(t){return Math.round(t*3/4)}const Pr=(t,e,n)=>Math.min(Math.max(t,e),n);function nn(t,e,n){const r=Math.min(e,Math.floor(n*Vn)),o=Pr(Math.round(t.width),Math.min(Mo,r),r),i=ct(o);return{width:o,x:Pr(Math.round(t.x),0,e-o),y:Pr(Math.round(t.y),0,n-i)}}function Rc(t,e){const r=t/e<=Vn?t:Math.round(e*Vn),o=ct(r);return nn({x:(t-r)/2,y:(e-o)/2,width:r},t,e)}function wm(t,e,n){const{x:r,y:o,width:i}=t;if(i<=0||r<0||o<0)return!1;const l=ct(i);return r+i<=e&&o+l<=n}function Em(t,e,n,r,o){if(r<=0||o<=0||e<=0||n<=0||!wm(t,e,n))return null;const i=r/t.width;return{position:"absolute",width:i*e,height:i*n,left:-t.x*i,top:-t.y*i,maxWidth:"none"}}function Cm(t,e){t(),requestAnimationFrame(()=>{t(),requestAnimationFrame(t)});const n=[];for(let r=50;r<=e;r+=50)n.push(setTimeout(t,r));return()=>{for(const r of n)clearTimeout(r)}}function Sm(t={}){const{settleMs:e=0,observeParent:n=!1,remeasureWhenVisible:r=!1,layoutSettleKey:o}=t,i=a.useRef(null),[l,s]=a.useState(null),c=a.useCallback(()=>{const d=i.current;if(!d)return;const{width:f,height:b}=d.getBoundingClientRect();f<=0||b<=0||s(p=>(p==null?void 0:p.width)===f&&(p==null?void 0:p.height)===b?p:{width:f,height:b})},[]),u=a.useCallback(()=>{c(),requestAnimationFrame(()=>{c(),requestAnimationFrame(()=>{c(),setTimeout(c,0)})})},[c]);return a.useLayoutEffect(()=>{c();const d=i.current;if(!d)return;const f=new ResizeObserver(()=>c());f.observe(d),n&&d.parentElement&&f.observe(d.parentElement);const b=[];let p=d;for(let y=0;p&&y<6;y+=1)b.push(p),p=p.parentElement;const g=()=>u();for(const y of b)y.addEventListener("transitionend",g);return()=>{f.disconnect();for(const y of b)y.removeEventListener("transitionend",g)}},[c,u,n]),a.useEffect(()=>{if(!(e<=0))return Cm(c,e)},[o,c,e]),a.useEffect(()=>{if(!r)return;const d=i.current;if(!d)return;const f=new IntersectionObserver(b=>{for(const p of b)p.isIntersecting&&p.intersectionRatio>=.99&&u()},{threshold:[0,.25,.5,.75,.99,1]});return f.observe(d),()=>f.disconnect()},[o,u,r]),a.useEffect(()=>{o!==void 0&&u()},[o,u]),{ref:i,size:l,measure:c,measureAfterLayout:u}}function Pm(t){const e=t.split(/[?#]/)[0]??t,n=e.lastIndexOf("/"),r=e.lastIndexOf(".");return r<=n?null:e.slice(r+1).toLowerCase()||null}function km({src:t,modelFileName:e}){const n=a.useRef(null);return a.useEffect(()=>{const r=n.current;if(!r)return;let o=!1,i=null,l=null;return import("online-3d-viewer").then(s=>{if(o)return;const c=new s.EmbeddedViewer(r,{projectionMode:s.ProjectionMode.Orthographic,backgroundColor:new s.RGBAColor(219,234,254,255),defaultColor:new s.RGBColor(30,64,175),onModelLoaded:()=>{const d=c.GetViewer();d.SetNavigationMode(s.NavigationMode.FreeOrbit),d.SetUpVector(s.Direction.Z,!1);const f=d.GetBoundingSphere(()=>!0);d.FitSphereToWindow(f,!1)}});l=c,(t.startsWith("blob:")||Pm(t)===null&&!!e)&&e?c.LoadModelFromInputFiles([new s.InputFile(e,s.FileSource.Url,t)]):c.LoadModelFromUrlList([t]),typeof ResizeObserver<"u"&&(i=new ResizeObserver(()=>{c.Resize()}),i.observe(r))}),()=>{o=!0,i==null||i.disconnect(),l==null||l.Destroy()}},[t,e]),h.jsx("div",{ref:n,className:"absolute inset-0 [&_canvas]:size-full!","aria-label":"Interactive 3D model",role:"img"})}const Tm=400;function Ro({className:t,src:e,type:n="image",displayRegion:r,modelFileName:o,layoutSettleKey:i,remeasureWhenVisible:l=!1,children:s}){const c=!!r,{ref:u,size:d,measureAfterLayout:f}=Sm({settleMs:c?Tm:0,observeParent:c,remeasureWhenVisible:c&&l,layoutSettleKey:i}),[b,p]=a.useState(null),g=r&&b&&d&&Em(r,b.width,b.height,d.width,d.height),y=!!g,v=!!(r&&b&&!g),w="size-full object-cover object-center",x=T=>{const R=T.currentTarget;R.naturalWidth>0&&R.naturalHeight>0&&(p({width:R.naturalWidth,height:R.naturalHeight}),f())},P=T=>{const R=T.currentTarget;R.videoWidth>0&&R.videoHeight>0&&(p({width:R.videoWidth,height:R.videoHeight}),f())};return a.useEffect(()=>{p(null)},[e]),n==="model"?h.jsxs("div",{ref:u,className:q("@container relative overflow-hidden",t),children:[h.jsx(km,{src:e,modelFileName:o}),s]}):h.jsxs("div",{ref:u,className:q("@container relative overflow-hidden",t),children:[n==="video"?h.jsx("video",{src:e,controls:!0,className:y?"absolute max-w-none":w,style:{...y&&g?g:void 0,opacity:v?0:1},onLoadedMetadata:r?P:void 0}):h.jsx("img",{src:e,alt:"",className:y?"absolute max-w-none":w,style:{...y&&g?g:void 0,opacity:v?0:1},onLoad:r?x:void 0}),s]})}function Mm({className:t="absolute inset-0",...e}){return h.jsx(Ro,{className:t,...e})}const Rm=2,fl=3,zn=(t,e,n)=>Math.min(Math.max(t,e),n),Dc=t=>t.type==="circle",rn=t=>t.type==="rectangle",hl=t=>rn(t)?[t.x1,t.x2]:[t.x],pl=t=>rn(t)?[t.y1,t.y2]:[t.y];function Dm(t,e,n){const r=zn(e,-Math.min(...hl(t)),100-Math.max(...hl(t))),o=zn(n,-Math.min(...pl(t)),100-Math.max(...pl(t)));return rn(t)?{...t,x1:t.x1+r,y1:t.y1+o,x2:t.x2+r,y2:t.y2+o}:{...t,x:t.x+r,y:t.y+o}}function bl(t,e,n){return Math.hypot(e.x-t.x,(e.y-t.y)/n)}function Nc(t){return{...t,x1:Math.min(t.x1,t.x2),y1:Math.min(t.y1,t.y2),x2:Math.max(t.x1,t.x2),y2:Math.max(t.y1,t.y2)}}function Nm(t,e,n){return t==="circle"?{type:"circle",x:e.x,y:e.y,radius:0,color:n}:t==="rectangle"?{type:"rectangle",x1:e.x,y1:e.y,x2:e.x,y2:e.y,color:n}:{type:"point",x:e.x,y:e.y,color:n}}function Im(t){return t==="circle"?"create-circle":t==="rectangle"?"create-rectangle":"create-point"}function Lm(t,e,n){switch(t.mode){case"create-point":return{...t.base,x:e.x,y:e.y};case"move":return Dm(t.base,e.x-t.start.x,e.y-t.start.y);case"create-circle":return{...t.base,radius:bl(t.start,e,n)};case"resize-circle":{const r=t.base;return{...r,radius:bl({x:r.x,y:r.y},e,n)}}case"create-rectangle":return{...t.base,x2:e.x,y2:e.y};case"resize-rect":{const r=t.base,o=t.corner==="nw"||t.corner==="sw",i=t.corner==="nw"||t.corner==="ne";return{...r,x1:o?e.x:r.x1,x2:o?r.x2:e.x,y1:i?e.y:r.y1,y2:i?r.y2:e.y}}}}function ml(t){if(Dc(t))return{...t,radius:Math.max(t.radius,Rm)};if(rn(t)){const e=Nc(t);return{...e,x2:Math.max(e.x2,e.x1+fl),y2:Math.max(e.y2,e.y1+fl)}}return t}function gl({x:t,y:e,cursor:n,onPointerDown:r}){return h.jsx("span",{onPointerDown:r,className:"annotation-handle pointer-events-auto absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-accent shadow",style:{left:`${t}%`,top:`${e}%`,cursor:n}})}function Km({annotations:t,editing:e}){const{tool:n,color:r,selectedId:o,onSelect:i,onAdd:l,onChange:s,onRemove:c}=e,u=a.useRef(null),d=a.useRef(!1),[f,b]=a.useState(null),[p,g]=a.useState(null),y=n==="select",v=k=>{const A=u.current.getBoundingClientRect();return{x:zn((k.clientX-A.left)/A.width*100,0,100),y:zn((k.clientY-A.top)/A.height*100,0,100)}},w=(k,A)=>{var V;(V=u.current)==null||V.setPointerCapture(k.pointerId),d.current=!1,b(A),g(ml(A.base))},x=k=>{if(y){i==null||i(null);return}const A=v(k);w(k,{mode:Im(n),id:null,start:A,base:Nm(n,A,r)})},P=k=>{if(!f)return;const A=u.current.getBoundingClientRect();d.current=!0,g(ml(Lm(f,v(k),A.width/A.height)))},T=k=>{var A;f&&p&&((A=u.current)==null||A.releasePointerCapture(k.pointerId),f.id===null?l==null||l(p):d.current&&(s==null||s(f.id,p))),b(null),g(null)},R=(k,A,V)=>{var j;k.stopPropagation(),(j=u.current)==null||j.focus(),i==null||i(A),w(k,{mode:"move",id:A,start:v(k),base:V})},K=(k,A,V)=>{k.stopPropagation(),w(k,{mode:"resize-circle",id:A,start:v(k),base:V})},M=(k,A,V,j)=>{k.stopPropagation(),w(k,{mode:"resize-rect",id:A,start:v(k),base:Nc(V),corner:j})},N=k=>{(k.key==="Delete"||k.key==="Backspace")&&o!=null&&(k.preventDefault(),c==null||c(o))},O=(k,A,V)=>{const j=V&&A===o,m=je[k.color??"GREY"],E=V?"pointer-events-auto cursor-move":"pointer-events-none",I=V?C=>R(C,A,k):void 0;if(Dc(k))return h.jsxs("div",{children:[h.jsx("div",{role:"img","aria-label":k.title,onPointerDown:I,className:q("absolute rounded-full",Bn,E,j&&"outline outline-2 outline-offset-2 outline-accent"),style:{left:`${k.x}%`,top:`${k.y}%`,width:`${k.radius*2}%`,aspectRatio:"1",transform:"translate(-50%, -50%)",borderColor:m,backgroundColor:ot(m,.1)}}),j&&h.jsx(gl,{x:k.x+k.radius,y:k.y,cursor:"ew-resize",onPointerDown:C=>K(C,A,k)})]},A);if(rn(k)){const C=Math.min(k.x1,k.x2),D=Math.min(k.y1,k.y2),$=Math.abs(k.x2-k.x1),S=Math.abs(k.y2-k.y1),L=[{corner:"nw",x:C,y:D,cursor:"nwse-resize"},{corner:"ne",x:C+$,y:D,cursor:"nesw-resize"},{corner:"sw",x:C,y:D+S,cursor:"nesw-resize"},{corner:"se",x:C+$,y:D+S,cursor:"nwse-resize"}];return h.jsxs("div",{children:[h.jsx("div",{role:"img","aria-label":k.title,onPointerDown:I,className:q("absolute",Bn,E,j&&"outline outline-2 outline-offset-2 outline-accent"),style:{left:`${C}%`,top:`${D}%`,width:`${$}%`,height:`${S}%`,borderColor:m,backgroundColor:ot(m,.1)}}),j&&L.map(({corner:U,x:W,y:G,cursor:ee})=>h.jsx(gl,{x:W,y:G,cursor:ee,onPointerDown:le=>M(le,A,k,U)},U))]},A)}return h.jsx("span",{role:"img","aria-label":k.title,onPointerDown:I,style:{left:`${k.x}%`,top:`${k.y}%`,backgroundColor:m,color:Hn(m)},className:q(Mc,E,j&&"outline outline-2 outline-offset-2 outline-accent"),children:k.label},A)};return h.jsxs("div",{ref:u,tabIndex:0,role:"application","aria-label":"Annotation editor",onPointerDown:x,onPointerMove:P,onPointerUp:T,onKeyDown:N,className:q("absolute inset-0 focus:outline-none",y?"cursor-default":"cursor-crosshair"),children:[t.map((k,A)=>{const V=k.id??String(A),j=(f==null?void 0:f.id)===V&&p?p:k;return O(j,V,y)}),(f==null?void 0:f.id)===null&&p&&O(p,"__draft__",!1)]})}function ir({src:t,type:e="image",modelFileName:n,annotations:r=[],displayRegion:o,zoomable:i=!0,annotationEditing:l,layoutSettleKey:s,className:c}){const u="@container relative aspect-[4/3] overflow-hidden rounded-lg border border-default bg-default-soft",d=h.jsxs(h.Fragment,{children:[h.jsx(Mm,{src:t,type:e,displayRegion:o,modelFileName:n,layoutSettleKey:s}),l?h.jsx(Km,{annotations:r,editing:l}):h.jsx(no,{annotations:r})]});return h.jsx("figure",{className:q("flex flex-col gap-2",c),children:i&&e==="image"&&!l?h.jsxs(pt,{children:[h.jsx(pt.Trigger,{"aria-label":"View image full size",className:q(u,"cursor-zoom-in"),children:d}),h.jsx(pt.Backdrop,{variant:"blur",children:h.jsx(pt.Container,{placement:"center",children:h.jsxs(pt.Dialog,{"aria-label":"Full size image",className:"w-auto max-w-[95vw] overflow-hidden bg-transparent p-0 shadow-none",children:[h.jsx(Ro,{className:"aspect-[4/3] max-h-[88vh] w-[min(95vw,calc(88vh*4/3))] rounded-lg border border-default bg-default-soft",src:t,type:"image",displayRegion:o,remeasureWhenVisible:!0,children:h.jsx(no,{annotations:r})}),h.jsx(pt.CloseTrigger,{})]})})})]}):h.jsx("div",{className:u,children:d})})}const Do=Symbol.for("@openpawlabs/diy-guides-ui/MediaFigure");ir[Do]=!0;function Am(){return h.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:"size-2/3",children:h.jsx("path",{d:"M8 5v14l11-7z"})})}const Om={model:{hex:je.BLUE,content:h.jsx("span",{className:"text-lg font-bold",children:"3D"})},video:{hex:je.MAGENTA,content:h.jsx(Am,{})}};function Ic({src:t,type:e="image",annotations:n=[],displayRegion:r,className:o}){if(e==="image")return h.jsx(Ro,{className:q("aspect-[4/3]",o),src:t,type:"image",displayRegion:r,children:h.jsx(no,{annotations:n})});const{hex:i,content:l}=Om[e];return h.jsx("div",{"aria-hidden":"true",className:q("flex aspect-[4/3] items-center justify-center",o),style:{backgroundColor:i,color:Hn(i)},children:l})}const Fm=[{corner:"nw",cursor:"nwse-resize"},{corner:"ne",cursor:"nesw-resize"},{corner:"sw",cursor:"nesw-resize"},{corner:"se",cursor:"nwse-resize"}],jm=(t,e,n)=>Math.min(Math.max(t,e),n);function _m(t,e,n,r,o){return nn({x:t.x+e,y:t.y+n,width:t.width},r,o)}function Bm(t,e,n,r,o){const i=e==="nw"||e==="sw",l=e==="nw"||e==="ne",s=i?t.x+t.width:t.x,c=l?t.y+ct(t.width):t.y,u=i?s:r-s,d=l?c:o-c,f=Math.min(u,d*(4/3)),b=jm(Math.abs(n.x-s),Mo,f),p=ct(b);return nn({x:i?s-b:s,y:l?c-p:c,width:b},r,o)}function Vm({src:t,region:e,onChange:n,className:r}){const o=a.useRef(null),[i,l]=a.useState(null),[s,c]=a.useState(null),[u,d]=a.useState(null),f=x=>{const P=x.currentTarget;P.naturalWidth>0&&P.naturalHeight>0&&l({width:P.naturalWidth,height:P.naturalHeight})},b=u??(i?e?nn(e,i.width,i.height):Rc(i.width,i.height):null),p=x=>{const P=o.current.getBoundingClientRect();return{x:(x.clientX-P.left)/P.width*i.width,y:(x.clientY-P.top)/P.height*i.height}},g=(x,P)=>{var T;x.stopPropagation(),(T=o.current)==null||T.setPointerCapture(x.pointerId),c(P),d(P.base)},y=x=>{if(!s||!i)return;const P=p(x),T=s.mode==="move"?_m(s.base,P.x-s.start.x,P.y-s.start.y,i.width,i.height):Bm(s.base,s.corner,P,i.width,i.height);d(T)},v=x=>{var P;s&&u&&((P=o.current)==null||P.releasePointerCapture(x.pointerId),n(u)),c(null),d(null)},w=b&&i?{left:b.x/i.width*100,top:b.y/i.height*100,width:b.width/i.width*100,height:ct(b.width)/i.height*100}:null;return h.jsxs("div",{ref:o,role:"application","aria-label":"Crop editor",className:q("relative inline-block touch-none select-none overflow-hidden leading-none",r),style:i?{"--crop-aspect":i.width/i.height}:void 0,onPointerMove:y,onPointerUp:v,children:[h.jsx("img",{src:t,alt:"",draggable:!1,onLoad:f,className:"block h-auto w-full select-none"}),w&&h.jsx("div",{className:"crop-region absolute cursor-move border-2 border-background",style:{left:`${w.left}%`,top:`${w.top}%`,width:`${w.width}%`,height:`${w.height}%`,boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.5)"},onPointerDown:x=>g(x,{mode:"move",start:p(x),base:b}),children:Fm.map(({corner:x,cursor:P})=>h.jsx("span",{className:"crop-handle pointer-events-auto absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-accent shadow",style:{left:x==="nw"||x==="sw"?"0%":"100%",top:x==="nw"||x==="ne"?"0%":"100%",cursor:P},onPointerDown:T=>g(T,{mode:"resize",corner:x,start:p(T),base:b})},x))})]})}function zm({name:t,thumbnail:e,href:n,quantity:r,price:o,children:i,className:l}){return h.jsxs("li",{className:q("flex items-center gap-3 py-3 first:pt-0 last:pb-0",l),children:[e&&h.jsx("img",{src:e,alt:"",className:"size-12 shrink-0 rounded-md border border-default object-cover"}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[n?h.jsx(ko,{href:n,className:"font-medium",children:t}):h.jsx("span",{className:"font-medium",children:t}),i!=null&&h.jsx("span",{className:"text-sm text-default-500",children:i})]}),r!=null&&h.jsxs("span",{className:"shrink-0 text-sm text-default-500",children:["×",r]}),o!=null&&h.jsx("span",{className:"shrink-0 text-sm font-medium",children:o})]})}function Hm({title:t="What you need",children:e,className:n}){return h.jsxs(Ot,{className:q("w-full",n),children:[t!=null&&h.jsx(Ot.Header,{children:h.jsx(Ot.Title,{children:t})}),h.jsx(Ot.Content,{children:h.jsx("ul",{className:"flex flex-col divide-y divide-default",children:e})})]})}const Um=Object.assign(Hm,{Item:zm});function Lc(t){return null}function Wm(t){return a.isValidElement(t)&&t.type===Lc}function Kc(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"mr-1 size-4 shrink-0",children:h.jsx("path",{d:"m6 9 6 6 6-6"})})}function yl(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})})}function Gm(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})}function qm(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:h.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}function Ym(){return h.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",className:"size-4",children:[h.jsx("circle",{cx:"9",cy:"6",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"6",r:"1.4"}),h.jsx("circle",{cx:"9",cy:"12",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"12",r:"1.4"}),h.jsx("circle",{cx:"9",cy:"18",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"18",r:"1.4"})]})}function ro(t){const{href:e,download:n,external:r}=t.props;return{href:e,download:n,...r?{target:"_blank",rel:"noreferrer noopener"}:{}}}function Xm(t,e,n,r){return q(qe({variant:t,size:e,fullWidth:!0}),"!min-h-0 !justify-center !rounded-none",n&&"!rounded-b-3xl",r&&"border-b border-separator","hover:!bg-[var(--button-bg-hover)] data-[hovered=true]:!bg-[var(--button-bg-hover)]")}function oo(){return h.jsx("span",{"aria-hidden":"true",className:po({orientation:"horizontal"}).separator()})}function Zm({variant:t="primary",size:e="md",icon:n,menuLabel:r="More download options",editing:o,children:i,className:l}){const s=a.Children.toArray(i).filter(Wm);if(o)return h.jsx(Qm,{items:s,variant:t,size:e,icon:n,menuLabel:r,editing:o,className:l});if(s.length===0)return null;const[c,...u]=s;if(u.length===0){const d=qe({variant:"secondary",size:e});return h.jsxs(ko,{...ro(c),className:q(d,l),children:[n,c.props.children]})}return h.jsx(Jm,{items:s,variant:t,size:e,icon:n,menuLabel:r,className:l})}function Jm({items:t,variant:e,size:n,icon:r,menuLabel:o,className:i}){const l=a.useRef(null),[s,c]=a.useState(),[u]=t,d=qe({variant:e,size:n});return a.useLayoutEffect(()=>{const f=l.current;if(!f)return;const b=()=>c(f.offsetWidth);b();const p=new ResizeObserver(b);return p.observe(f),()=>p.disconnect()},[t,e,n]),h.jsxs("div",{ref:l,className:q(po({orientation:"horizontal"}).base(),i),children:[h.jsxs(ko,{...ro(u),className:d,children:[r,u.props.children]}),h.jsxs(Dt,{children:[h.jsxs(Dt.Trigger,{"aria-label":o,className:q(qe({variant:e,size:n,isIconOnly:!0}),"!inline-flex items-center justify-center"),children:[h.jsx(oo,{}),h.jsx(Kc,{})]}),h.jsx(Dt.Popover,{placement:"bottom",offset:0,triggerRef:l,className:"!max-w-none !p-0",style:s?{minWidth:s}:void 0,children:h.jsx(Dt.Menu,{className:"!gap-0 !p-0",children:t.map((f,b)=>h.jsxs(Dt.Item,{...ro(f),className:Xm("secondary",n,b===t.length-1,b<t.length-1),children:[b===0?r:null,f.props.children]},b))})})]})]})}function Qm({items:t,variant:e,size:n,icon:r,menuLabel:o,editing:i,className:l}){const[s,c]=a.useState(!1),[u,d]=a.useState(null),[f,b]=a.useState(null),{onAddItem:p,onRemoveItem:g,onReorderItem:y,onSelectItem:v}=i,w=t[0],x=t.slice(1),P=qe({variant:e,size:n}),T=y!=null,R=()=>{d(null),b(null)},K=M=>{u!=null&&u!==M&&(y==null||y(u,M)),R()};return h.jsxs("div",{className:q("relative inline-flex flex-col items-start",l),children:[h.jsxs("div",{className:po({orientation:"horizontal"}).base(),children:[h.jsxs("span",{className:q(P,"cursor-text"),children:[r,w?w.props.children:h.jsx("span",{className:"opacity-60",children:"Add a link"})]}),w&&v&&h.jsxs("button",{type:"button",onClick:()=>v(0),"aria-label":"Edit primary link",className:qe({variant:e,size:n,isIconOnly:!0}),children:[h.jsx(oo,{}),h.jsx(yl,{})]}),h.jsxs("button",{type:"button",onClick:()=>c(M=>!M),"aria-label":o,"aria-expanded":s,className:qe({variant:e,size:n,isIconOnly:!0}),children:[!(w&&v)&&h.jsx(oo,{}),h.jsx(Kc,{})]})]}),s&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1),"aria-hidden":"true"}),h.jsxs("div",{className:"absolute left-0 top-full z-50 mt-2 w-64 rounded-lg border border-default-200 bg-background p-2 shadow-lg",children:[x.length>0?h.jsx("ul",{className:"flex flex-col gap-0.5",children:x.map((M,N)=>{const O=N+1;return h.jsxs("li",{draggable:T||void 0,onDragStart:T?()=>d(O):void 0,onDragOver:T?k=>{k.preventDefault(),b(O)}:void 0,onDrop:T?k=>{k.preventDefault(),K(O)}:void 0,onDragEnd:T?R:void 0,className:q("flex items-center gap-1.5 rounded-md px-1.5 py-1 transition",T&&"cursor-grab",u===O&&"opacity-40",f===O&&u!==O&&"ring-2 ring-accent"),children:[T&&h.jsx("span",{className:"shrink-0 text-default-400",children:h.jsx(Ym,{})}),h.jsx("span",{className:"min-w-0 flex-1 text-sm",children:M.props.children}),y&&h.jsx("button",{type:"button",onClick:()=>y(O,0),"aria-label":"Make default download",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:h.jsx(Gm,{})}),v&&h.jsx("button",{type:"button",onClick:()=>v(O),"aria-label":"Edit link",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:h.jsx(yl,{})}),g&&h.jsx("button",{type:"button",onClick:()=>g(O),"aria-label":"Remove option",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-danger focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:h.jsx(qm,{})})]},O)})}):h.jsx("p",{className:"px-1.5 py-1 text-sm text-default-500",children:"No other options yet."}),p&&h.jsx("button",{type:"button",onClick:p,className:"mt-1 w-full rounded-md px-1.5 py-1 text-left text-sm font-medium text-accent transition hover:bg-default-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:"+ Add option"})]})]})]})}const eg=Object.assign(Zm,{Item:Lc});function tg(t,e,n){const[r,o]=a.useState(e),i=t!==void 0,l=i?t:r,s=a.useCallback(c=>{i||o(c),n==null||n(c)},[i,n]);return[l,s]}const Ac=3,ng="#3ABF84",rg="#34B07A",og="#0B7A47",ig={caution:Cn.caution,reminder:"Reminder",note:Cn.note};function lg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 shrink-0 text-danger",children:h.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01"})})}function sg(){return h.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 shrink-0 text-default-500",children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"M12 16v-4M12 8h.01"})]})}function ag(){return h.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex size-6 shrink-0 items-center justify-center rounded bg-default-100",children:h.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"size-3.5 text-default-500",children:h.jsx("path",{d:"M16 12V4h1V3H7v1h1v8l-2 2v1h5.2c-.2.6-.3 1.2-.3 1.8 0 2.2 1.8 4 4 4s4-1.8 4-4c0-.6-.1-1.2-.3-1.8H18v-1l-2-2z"})})})}function cg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-7",children:h.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"})})}function Oc(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3",children:h.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}function ug(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"M12 20h9M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})})}function dg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"M6 2v14a2 2 0 0 0 2 2h14M2 6h14a2 2 0 0 1 2 2v14"})})}function fg(){return h.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",className:"size-3.5",children:[h.jsx("circle",{cx:"9",cy:"6",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"6",r:"1.4"}),h.jsx("circle",{cx:"9",cy:"12",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"12",r:"1.4"}),h.jsx("circle",{cx:"9",cy:"18",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"18",r:"1.4"})]})}function hg(t){return a.isValidElement(t)?t.type===ir?!0:typeof t.type=="function"&&t.type[Do]===!0:!1}function vl(t,e){return t.type===ir?h.jsx(Ic,{src:t.props.src,type:t.props.type,annotations:t.props.annotations,displayRegion:t.props.displayRegion,className:e}):a.cloneElement(t,{thumbnailPreview:!0,className:e})}function Fc(t){return a.isValidElement(t)&&t.type===Bc}function pg(t){return a.isValidElement(t)?a.Children.toArray(t.props.children).filter(Fc).length:0}function bg(t,e=!1){let n=null,r=null;for(const i of a.Children.toArray(t))a.isValidElement(i)&&(i.type===jc&&(n=i.props.children),i.type===_c&&(r=i));const o=a.Children.toArray(n).filter(hg);return pg(r),{figures:o.slice(0,Ac),bullets:r}}function jc(t){return null}function _c({children:t,className:e,editing:n}){const[r,o]=a.useState(null),[i,l]=a.useState(null);if(!n)return h.jsx("ul",{className:q("flex flex-col gap-2",e),children:t});const{onAddBullet:s,onRemoveBullet:c,onReorderBullet:u}=n,d=a.Children.toArray(t).filter(Fc),f=u!=null&&d.length>1,b=c!=null&&d.length>1,p=()=>{o(null),l(null)},g=y=>{r!=null&&r!==y&&(u==null||u(r,y)),p()};return h.jsxs("ul",{className:q("flex flex-col gap-2",e),children:[d.map((y,v)=>a.cloneElement(y,{key:y.key??v,__edit:{canReorder:f,isDragging:r===v,isOver:i===v&&r!==v,onRemove:b?()=>c==null?void 0:c(v):void 0,onDragStart:()=>o(v),onDragOver:()=>l(v),onDrop:()=>g(v),onDragEnd:p}})),s&&h.jsx("li",{className:"list-none",children:h.jsx("button",{type:"button",onClick:s,className:"rounded-md px-1 py-0.5 text-sm font-medium text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:"+ New bullet"})})]})}function Bc(t){const{variant:e="dot",color:n="GREY",label:r,hideLabel:o=!1,onMarkerPress:i,markerAriaLabel:l,children:s,className:c}=t,u=t.__edit,[d,f]=a.useState(!1);let b=null,p;if(e==="dot")b=i?h.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"mt-1.5 size-2 shrink-0 cursor-pointer rounded-full outline-none transition hover:ring-2 hover:ring-accent focus-visible:ring-2 focus-visible:ring-accent",style:{backgroundColor:je[n]}}):h.jsx("span",{"aria-hidden":"true",className:"mt-1.5 size-2 shrink-0 rounded-full",style:{backgroundColor:je[n]}}),p=h.jsx("span",{className:"flex-1",children:s});else if(e==="button")b=i?h.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"size-2 shrink-0 cursor-pointer rounded-full bg-default-300 outline-none transition hover:ring-2 hover:ring-accent focus-visible:ring-2 focus-visible:ring-accent"}):null,p=h.jsx("div",{className:"min-w-0 flex-1",children:s});else{const P=r??ig[e],T=e==="caution"?h.jsx(lg,{}):e==="reminder"?h.jsx(ag,{}):h.jsx(sg,{});b=i?h.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"shrink-0 cursor-pointer rounded outline-none transition hover:opacity-70 focus-visible:ring-2 focus-visible:ring-accent",children:T}):T,p=h.jsxs("span",{className:"flex-1",children:[!o&&h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"font-semibold",children:[P,":"]})," "]}),s]})}const g=q("flex gap-2.5",e==="button"&&"items-center",e==="caution"&&"text-danger",c);if(!u)return h.jsxs("li",{className:g,children:[b,p]});const{canReorder:y,isDragging:v,isOver:w,onRemove:x}=u;return h.jsxs("li",{className:q("group rounded-md",g,v&&"opacity-40",w&&"ring-2 ring-accent"),draggable:y&&d?!0:void 0,onDragStart:y?P=>{P.dataTransfer.effectAllowed="move",u.onDragStart()}:void 0,onDragOver:y?P=>{P.preventDefault(),P.dataTransfer.dropEffect="move",u.onDragOver()}:void 0,onDrop:y?P=>{P.preventDefault(),u.onDrop()}:void 0,onDragEnd:y?()=>{f(!1),u.onDragEnd()}:void 0,children:[y&&h.jsx("span",{"aria-hidden":"true",onPointerDown:()=>f(!0),onPointerUp:()=>f(!1),className:"mt-1 shrink-0 cursor-grab text-default-400 transition hover:text-default-500",children:h.jsx(fg,{})}),b,p,x&&h.jsx("button",{type:"button",onClick:x,"aria-label":"Remove bullet",className:"mt-1 shrink-0 rounded p-0.5 text-default-400 opacity-0 transition hover:text-danger focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent group-hover:opacity-100",children:h.jsx(Oc,{})})]})}function mg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"m5 12 5 5 9-11"})})}function gg({figures:t,bullets:e,mediaEditing:n}){const r=n!=null,[o,i]=a.useState(0),[l,s]=a.useState(null),[c,u]=a.useState(null),d=(n==null?void 0:n.activeIndex)??o,f=t[d]??t[0],p=((f==null?void 0:f.props.type)??"image")==="image",g=R=>{var K;i(R),(K=n==null?void 0:n.onSelectImage)==null||K.call(n,R)},y=r&&(n==null?void 0:n.onReorderImage)!=null&&t.length>1,v=()=>{s(null),u(null)},w=R=>{var K;l!=null&&l!==R&&((K=n==null?void 0:n.onReorderImage)==null||K.call(n,l,R)),v()},x=r&&((n==null?void 0:n.canAddImage)??!0)&&t.length>=1&&t.length<Ac,P=r?t.length>=1:t.length>1,T="aspect-[4/3] w-28 sm:w-26 lg:w-30";return h.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:[h.jsx("div",{className:"min-w-0",children:f?r?h.jsxs("div",{className:"group relative",children:[a.cloneElement(f,{className:q("w-full",f.props.className),zoomable:!1}),h.jsxs("div",{className:"absolute inset-0 flex items-center justify-center gap-2 rounded-lg opacity-0 transition group-hover:bg-foreground/40 group-hover:opacity-100 focus-within:bg-foreground/40 focus-within:opacity-100",children:[p&&h.jsxs("button",{type:"button",onClick:()=>{var R;return(R=n==null?void 0:n.onEditAnnotations)==null?void 0:R.call(n,d)},className:"flex items-center gap-1.5 rounded-md bg-background/90 px-2.5 py-1.5 text-sm font-semibold text-foreground shadow transition hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[h.jsx(ug,{}),"Edit annotations"]}),p&&(n==null?void 0:n.onEditCrop)&&h.jsxs("button",{type:"button",onClick:()=>{var R;return(R=n==null?void 0:n.onEditCrop)==null?void 0:R.call(n,d)},className:"flex items-center gap-1.5 rounded-md bg-background/90 px-2.5 py-1.5 text-sm font-semibold text-foreground shadow transition hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[h.jsx(dg,{}),"Adjust crop"]})]})]}):a.cloneElement(f,{className:q("w-full",f.props.className)}):r&&h.jsxs("button",{type:"button",onClick:()=>{var R;return(R=n==null?void 0:n.onAddImage)==null?void 0:R.call(n)},className:"flex aspect-[4/3] w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-default bg-default-soft text-default-500 transition hover:border-accent hover:text-accent focus-visible:border-accent focus-visible:text-accent focus-visible:outline-none",children:[h.jsx(cg,{}),h.jsx("span",{className:"text-sm font-medium",children:"Add image"})]})}),h.jsxs("div",{className:"flex min-w-0 flex-col gap-4",children:[(P||x)&&h.jsxs("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Step images",children:[t.map((R,K)=>r?h.jsxs("div",{className:q("relative rounded-md transition-shadow",y&&"cursor-grab",l===K&&"opacity-40",c===K&&l!==K&&"ring-2 ring-accent ring-offset-2 ring-offset-background"),draggable:y||void 0,onDragStart:y?M=>{M.dataTransfer.effectAllowed="move",s(K)}:void 0,onDragOver:y?M=>{M.preventDefault(),M.dataTransfer.dropEffect="move",u(K)}:void 0,onDrop:y?M=>{M.preventDefault(),w(K)}:void 0,onDragEnd:y?v:void 0,children:[h.jsx("button",{type:"button",className:q("block overflow-hidden rounded-md border-2 transition-[box-shadow,opacity,border-color]",K===d?"border-accent shadow-md":"border-default opacity-80 hover:opacity-100"),onClick:()=>g(K),"aria-label":`Image ${K+1}`,"aria-pressed":K===d,children:vl(R,T)}),h.jsx("button",{type:"button",onClick:()=>{var M;return(M=n==null?void 0:n.onRemoveImage)==null?void 0:M.call(n,K)},"aria-label":`Remove image ${K+1}`,className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-foreground text-background shadow transition hover:bg-danger focus-visible:bg-danger focus-visible:outline-none",children:h.jsx(Oc,{})})]},R.key??R.props.src??K):h.jsx("button",{type:"button",className:q("overflow-hidden rounded-md border-2 transition-[box-shadow,opacity,border-color]",K===d?"border-accent shadow-md":"border-default opacity-80 hover:opacity-100"),onMouseEnter:()=>g(K),onFocus:()=>g(K),"aria-label":`Image ${K+1}`,"aria-pressed":K===d,children:vl(R,T)},R.key??R.props.src??K)),x&&h.jsx("button",{type:"button",onClick:()=>{var R;return(R=n==null?void 0:n.onAddImage)==null?void 0:R.call(n)},"aria-label":"Add image",className:q(T,"flex items-center justify-center rounded-md border-2 border-dashed border-default text-default-500 transition hover:border-accent hover:text-accent focus-visible:border-accent focus-visible:text-accent focus-visible:outline-none"),children:h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-6",children:h.jsx("path",{d:"M12 5v14M5 12h14"})})})]}),e]})]})}function yg({number:t,title:e,isCompleted:n,defaultCompleted:r=!1,onCompletedChange:o,completable:i=!0,mediaEditing:l,children:s,className:c}){const[u,d]=tg(n,r,o),f=a.useId(),{figures:b,bullets:p}=bg(s,l!=null);return h.jsxs("section",{"aria-labelledby":e!=null?f:void 0,"data-completed":u||void 0,className:q("flex flex-col gap-4 transition-opacity",u&&"opacity-60",c),children:[h.jsxs("header",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3 sm:flex-1",children:[t!=null&&h.jsx("span",{className:q("flex size-8 shrink-0 items-center justify-center rounded-md text-sm font-bold tabular-nums",u?"bg-success text-success-foreground":"bg-foreground text-background"),children:u?h.jsx(mg,{}):t}),e!=null&&h.jsx("h3",{id:f,className:"min-w-0 flex-1 text-lg font-semibold leading-tight",children:e})]}),i&&h.jsx(yb,{variant:u?"primary":"secondary",size:"lg",onPress:()=>d(!u),"aria-pressed":u,className:q("ml-auto shrink-0",u&&"guide-step-complete-button"),style:u?{"--guide-step-complete-bg":ng,"--guide-step-complete-bg-hover":rg,"--guide-step-complete-checkbox":og}:void 0,children:h.jsx(gn,{isSelected:u,isReadOnly:!0,"aria-hidden":!0,className:"pointer-events-none gap-2 text-inherit",children:h.jsxs(gn.Content,{className:"flex items-center gap-2 whitespace-nowrap",children:[h.jsx(gn.Control,{children:h.jsx(gn.Indicator,{})}),"Mark complete"]})})})]}),h.jsx(gg,{figures:b,bullets:p,mediaEditing:l})]})}const vg=Object.assign(yg,{Media:jc,Bullets:_c,Bullet:Bc});function xg(t){return a.isValidElement(t)}function $g({children:t,showProgress:e=!0,onProgressChange:n,className:r}){const o=a.Children.toArray(t).filter(xg),i=o.length,[l,s]=a.useState(()=>Object.fromEntries(o.map((u,d)=>[u.props.number??d+1,!!(u.props.defaultCompleted??u.props.isCompleted)]))),c=Object.values(l).filter(Boolean).length;return a.useEffect(()=>{n==null||n({completed:c,total:i})},[c,i,n]),h.jsxs("div",{className:q("flex flex-col gap-8",r),children:[e&&i>0&&h.jsx("div",{className:"sticky top-2 mx-2 z-10",children:h.jsx(Ot,{className:"w-full px-6 py-4",children:h.jsxs(yn,{value:c,maxValue:i,"aria-label":"Guide progress",className:"flex flex-col gap-1.5",children:[h.jsxs("div",{className:"flex items-center justify-between text-sm text-default-500",children:[h.jsx("span",{children:"Guide Progress"}),h.jsxs(yn.Output,{children:[c," / ",i," steps"]})]}),h.jsx(yn.Track,{className:"h-2 overflow-hidden rounded-full bg-default-soft",children:h.jsx(yn.Fill,{className:"h-full rounded-full bg-success transition-[width]"})})]})})}),h.jsx("ol",{className:"flex flex-col",children:o.map((u,d)=>{const f=u.props.number??d+1;return h.jsxs("li",{children:[a.cloneElement(u,{number:f,isCompleted:l[f]??!1,onCompletedChange:b=>{var p,g;s(y=>({...y,[f]:b})),(g=(p=u.props).onCompletedChange)==null||g.call(p,b)}}),d<o.length-1&&h.jsx(jb,{className:"my-8"})]},u.key??f)})})]})}function wg({title:t,heroImage:e,heroImageAlt:n,difficulty:r,timeEstimate:o,meta:i,className:l}){const s=r!=null||o!=null,c=e!=null;return h.jsxs("header",{className:q("flex flex-col gap-4 border-b border-default pb-6 md:[grid-area:header]",c&&"sm:flex-row sm:items-center sm:gap-6",l),children:[c&&h.jsx("div",{className:"aspect-[4/3] h-32 shrink-0 overflow-hidden rounded-lg border border-default bg-default-100",children:h.jsx("img",{src:e,alt:n??"",className:"size-full object-cover"})}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4",children:[h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:t}),i!=null&&h.jsx("div",{className:"text-sm text-default-500",children:i})]}),s&&h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r!=null&&h.jsx(Tc,{difficulty:r}),o!=null&&h.jsx(_n,{variant:"soft",color:"default",children:h.jsx(_n.Label,{children:o})})]})]})]})}function Eg({children:t,className:e}){return h.jsx("div",{className:q("min-w-0 md:[grid-area:intro]",e),children:h.jsx("div",{className:"max-w-prose text-default-700",children:t})})}function Cg({children:t,className:e}){return h.jsx("aside",{className:q("min-w-0 md:[grid-area:sidebar]",e),children:h.jsx("div",{className:"flex flex-col gap-4",children:t})})}function Sg({children:t,className:e}){return h.jsx("main",{className:q("min-w-0 w-full md:[grid-area:main]",e),children:t})}const Pg=Object.assign(function({children:e,className:n}){return h.jsx("div",{className:q("mx-auto grid w-full max-w-6xl grid-cols-1 gap-x-8 gap-y-8 md:grid-cols-[minmax(0,1fr)_20rem] md:[grid-template-areas:'header_header'_'intro_sidebar'_'main_main']",n),children:e})},{Header:wg,Intro:Eg,Sidebar:Cg,Content:Sg});exports.COLORS=je;exports.Callout=ym;exports.DISPLAY_REGION_ASPECT=Vn;exports.DifficultyBadge=Tc;exports.GuideLayout=Pg;exports.GuideStep=vg;exports.GuideStepList=$g;exports.LinkButton=eg;exports.MIN_REGION_WIDTH=Mo;exports.MediaCropEditor=Vm;exports.MediaFigure=ir;exports.MediaFigureThumbnail=Ic;exports.ToolList=Um;exports.calloutTypeColor=xl;exports.calloutTypeHex=$l;exports.calloutTypeLabel=Cn;exports.centeredDisplayRegion=Rc;exports.clampDisplayRegion=nn;exports.displayRegionHeight=ct;exports.hexToRgba=ot;exports.markerTextColor=Hn;exports.mediaFigureType=Do;
28
+ */var Ui;function Xh(){return Ui||(Ui=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function e(p,g){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=g();if(!f){var y=g();i(v,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=l({inst:{value:v,getSnapshot:g}});var w=y[0].inst,x=y[1];return c(function(){w.value=v,w.getSnapshot=g,n(w)&&x({inst:w})},[p,v,g]),s(function(){return n(w)&&x({inst:w}),p(function(){n(w)&&x({inst:w})})},[p]),u(v),v}function n(p){var g=p.getSnapshot;p=p.value;try{var v=g();return!i(p,v)}catch{return!0}}function r(p,g){return g()}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,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;Cr.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Cr}var Gi;function Zh(){return Gi||(Gi=1,process.env.NODE_ENV==="production"?bn.exports=Yh():bn.exports=Xh()),bn.exports}var Jh=Zh();const $a=a.createContext(!1),Wt=a.createContext(null);function Qh(t){if(a.useContext(Wt))return t.content;let{collection:n,document:r}=rp(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(bf,null,a.createElement(Wt.Provider,{value:r},t.content)),a.createElement(ep,{render:t.children,collection:n}))}function ep({collection:t,render:e}){return e(t)}function tp(t,e,n){let r=Ze(),o=a.useRef(r);o.current=r;let i=a.useCallback(()=>o.current?n():e(),[e,n]);return Jh.useSyncExternalStore(t,i)}const np=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:tp;function rp(t){let[e]=a.useState(()=>new Wh((t==null?void 0:t())||new Gh)),n=a.useCallback(l=>e.subscribe(l),[e]),r=a.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:np(n,r,o),document:e}}const Jr=a.createContext(null);function op(t){var n;return n=class extends St{},n.type=t,n}function wa(t,e,n,r,o,i){typeof t=="string"&&(t=op(t));let l=a.useCallback(c=>{c==null||c.setProps(e,n,t,r,i)},[e,n,r,i,t]),s=a.useContext(Jr);if(s){let c=s.ownerDocument.nodesByProps.get(e);return c||(c=s.ownerDocument.createElement(t.type),c.setProps(e,n,t,r,i),s.appendChild(c),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,c)),o?a.createElement(Jr.Provider,{value:c},o):null}return a.createElement(t.type,{ref:l},o)}function Ea(t,e){let n=({node:o})=>e(o.props,o.props.ref,o),r=a.forwardRef((o,i)=>{let l=a.useContext(Br);if(!a.useContext($a)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return wa(t,o,i,"children"in o?o.children:null,null,c=>a.createElement(Br.Provider,{value:l},a.createElement(n,{node:c})))});return r.displayName=e.name,r}function Ca(t,e,n=Sa){let r=({node:i})=>e(i.props,i.props.ref,i),o=a.forwardRef((i,l)=>{let s=n(i);return wa(t,i,l,null,s,c=>a.createElement(r,{node:c}))??a.createElement(a.Fragment,null)});return o.displayName=e.name,o}function Sa(t){return xa({...t,addIdAndValue:!0})}const Wi=a.createContext(null);function ip(t){let e=a.useContext(Wi),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope??(e==null?void 0:e.idScope),o=Sa({...t,idScope:r,dependencies:n});return a.useContext(Wt)&&(o=a.createElement(lp,null,o)),e=a.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),a.createElement(Wi.Provider,{value:e},o)}function lp({children:t}){let e=a.useContext(Wt),n=a.useMemo(()=>a.createElement(Wt.Provider,{value:null},a.createElement($a.Provider,{value:!0},t)),[t]);return Ze()?a.createElement(Jr.Provider,{value:e},n):Yt.createPortal(n,e)}const sp=a.createContext(null),ap={CollectionRoot({collection:t,renderDropIndicator:e}){return qi(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return qi(t,e,n)}};function qi(t,e,n){return xa({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){if(r.type==="content")return a.createElement(a.Fragment,null);let o=r.render(r);return!n||r.type!=="item"?o:a.createElement(a.Fragment,null,n({type:"item",key:r.key,dropPosition:"before"}),o,cp(t,r,n))}})}function cp(t,e,n){let r=e.key,o=t.getKeyAfter(r),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==null?void 0:c.type)==="item"&&(!i||c.parentKey!==i.parentKey&&i.level<c.level);){let u=n({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 er=a.createContext(ap);function up(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}function Pa(t){let e=fp(Q(t));e!==t&&(e&&dp(e,t),t&&ka(t,e))}function dp(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function ka(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function fp(t){let e=ne(t),n=e==null?void 0:e.getAttribute("aria-activedescendant");return n&&t.getElementById(n)||e}const Yi=a.createContext(null),hp=a.createContext(null),pp=a.createContext({}),bp=a.createContext({}),mp=a.createContext(null);function gp(t){let e=a.useRef({});return a.createElement(mp.Provider,{value:e},t.children)}const yp=a.createContext({isSelected:!1});function vp(t){let e=ae(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const ko=a.createContext({}),Vo=class Vo extends St{filter(e,n){let r=n.getItem(this.prevKey);if(r&&r.type!=="separator"){let o=this.clone();return n.addDescendants(o,e),o}return null}};Vo.type="separator";let Qr=Vo;const xp=Ea(Qr,function(e,n){[e,n]=Me(e,n,ko);let{elementType:r,orientation:o,style:i,className:l,slot:s,...c}=e,u=r||"hr";u==="hr"&&o==="vertical"&&(u="div");let d=pe[u],{separatorProps:f}=vp({...c,elementType:r,orientation:o}),b=ae(e,{global:!0});return a.createElement(d,{render:e.render,...Y(b,f),style:i,className:l??"react-aria-Separator",ref:n,slot:s||void 0})}),Ta=a.createContext({});var Ma={};Ma={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ra={};Ra={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Da={};Da={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Na={};Na={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var Ia={};Ia={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var La={};La={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Ka={};Ka={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Aa={};Aa={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Oa={};Oa={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Fa={};Fa={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var ja={};ja={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var _a={};_a={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Ba={};Ba={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Va={};Va={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var za={};za={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var Ha={};Ha={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Ua={};Ua={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Ga={};Ga={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Wa={};Wa={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var qa={};qa={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Ya={};Ya={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Xa={};Xa={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Za={};Za={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Ja={};Ja={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Qa={};Qa={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var ec={};ec={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var tc={};tc={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var nc={};nc={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var rc={};rc={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var oc={};oc={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var ic={};ic={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var lc={};lc={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var sc={};sc={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var ac={};ac={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var cc={};cc={"ar-AE":Ma,"bg-BG":Ra,"cs-CZ":Da,"da-DK":Na,"de-DE":Ia,"el-GR":La,"en-US":Ka,"es-ES":Aa,"et-EE":Oa,"fi-FI":Fa,"fr-FR":ja,"he-IL":_a,"hr-HR":Ba,"hu-HU":Va,"it-IT":za,"ja-JP":Ha,"ko-KR":Ua,"lt-LT":Ga,"lv-LV":Wa,"nb-NO":qa,"nl-NL":Ya,"pl-PL":Xa,"pt-BR":Za,"pt-PT":Ja,"ro-RO":Qa,"ru-RU":ec,"sk-SK":tc,"sl-SI":nc,"sr-SP":rc,"sv-SE":oc,"tr-TR":ic,"uk-UA":lc,"zh-CN":sc,"zh-TW":ac};const $p=500;function uc(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:o,threshold:i=$p,accessibilityDescription:l}=t;const s=a.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:u}=Wn(),{pressProps:d}=Xe({isDisabled:e,onPressStart(b){if(b.continuePropagation(),(b.pointerType==="mouse"||b.pointerType==="touch")&&(n&&n({...b,type:"longpressstart"}),s.current=setTimeout(()=>{b.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),Q(b.target).activeElement!==b.target&&de(b.target),o&&o({...b,type:"longpress"}),s.current=void 0},i),b.pointerType==="touch")){let p=v=>{v.preventDefault()},g=fe(b.target);c(b.target,"contextmenu",p,{once:!0}),c(g,"pointerup",()=>{setTimeout(()=>{u(b.target,"contextmenu",p)},30)},{once:!0})}},onPressEnd(b){s.current&&clearTimeout(s.current),r&&(b.pointerType==="mouse"||b.pointerType==="touch")&&r({...b,type:"longpressend"})}}),f=qu(o&&!e?l:void 0);return{longPressProps:Y(d,f)}}function dc(t,e,n){let{type:r}=t,{isOpen:o}=e;a.useEffect(()=>{n&&n.current&&Ss.set(n.current,e.close)});let i;r==="menu"?i=!0:r==="listbox"&&(i="listbox");let l=he();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}function wp(t){return t&&t.__esModule?t.default:t}function Ep(t,e,n){let{type:r="menu",isDisabled:o,trigger:i="press"}=t,l=he(),{triggerProps:s,overlayProps:c}=dc({type:r},e,n),u=p=>{if(!o&&!(i==="longPress"&&!p.altKey)&&n&&n.current)switch(p.key){case"Enter":case" ":if(i==="longPress"||p.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("last");break;default:"continuePropagation"in p&&p.continuePropagation()}},d=fa(wp(cc),"@react-aria/menu"),{longPressProps:f}=uc({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),b={preventFocusOnPress:!0,onPressStart(p){p.pointerType!=="touch"&&p.pointerType!=="keyboard"&&!o&&(de(p.target),e.open(p.pointerType==="virtual"?"first":null))},onPress(p){p.pointerType==="touch"&&!o&&(de(p.target),e.toggle())}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?b:f,id:l,onKeyDown:u},menuProps:{...c,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const fc=new WeakMap;function eo(t){return du()?t.altKey:t.ctrlKey}function En(t,e){var o,i;let n=`[data-key="${CSS.escape(String(e))}"]`,r=(o=t.current)==null?void 0:o.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),(i=t.current)==null?void 0:i.querySelector(n)}const hc=new WeakMap;function Cp(t){let e=he();return hc.set(t,e),e}function Sp(t){return hc.get(t)}const Pp=1e3;function kp(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,o=a.useRef({search:"",timeout:void 0}).current,i=l=>{let s=Tp(l.key);if(!(!s||l.ctrlKey||l.metaKey||!H(l.currentTarget,F(l))||o.search.length===0&&s===" ")){if(s===" "&&o.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),o.search+=s,e.getKeyForSearch!=null){let c=e.getKeyForSearch(o.search,n.focusedKey);c==null&&(c=e.getKeyForSearch(o.search)),c!=null&&(n.setFocusedKey(c),r&&r(c))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},Pp)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function Tp(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Mp(t){let{selectionManager:e,keyboardDelegate:n,ref:r,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:b=!1,scrollRef:p=r,linkBehavior:g="action"}=t,{direction:v}=dt(),y=Xt(),w=m=>{var I,C,D,$,P,K,U,G,W,ee,le,Z,be,Ie;if(m.altKey&&m.key==="Tab"&&m.preventDefault(),!r.current||!H(r.current,F(m)))return;const E=(z,$e)=>{if(z!=null){if(e.isLink(z)&&g==="selection"&&u&&!eo(m)){Yt.flushSync(()=>{e.setFocusedKey(z,$e)});let me=En(r,z),et=e.getItemProps(z);me&&y.open(me,m,et.href,et.routerOptions);return}if(e.setFocusedKey(z,$e),e.isLink(z)&&g==="override")return;m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&!eo(m)&&e.replaceSelection(z)}};switch(m.key){case"ArrowDown":if(n.getKeyBelow){let z=e.focusedKey!=null?(I=n.getKeyBelow)==null?void 0:I.call(n,e.focusedKey):(C=n.getFirstKey)==null?void 0:C.call(n);z==null&&i&&(z=(D=n.getFirstKey)==null?void 0:D.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),E(z))}break;case"ArrowUp":if(n.getKeyAbove){let z=e.focusedKey!=null?($=n.getKeyAbove)==null?void 0:$.call(n,e.focusedKey):(P=n.getLastKey)==null?void 0:P.call(n);z==null&&i&&(z=(K=n.getLastKey)==null?void 0:K.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),E(z))}break;case"ArrowLeft":if(n.getKeyLeftOf){let z=e.focusedKey!=null?(U=n.getKeyLeftOf)==null?void 0:U.call(n,e.focusedKey):(G=n.getFirstKey)==null?void 0:G.call(n);z==null&&i&&(z=v==="rtl"?(W=n.getFirstKey)==null?void 0:W.call(n,e.focusedKey):(ee=n.getLastKey)==null?void 0:ee.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),E(z,v==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){let z=e.focusedKey!=null?(le=n.getKeyRightOf)==null?void 0:le.call(n,e.focusedKey):(Z=n.getFirstKey)==null?void 0:Z.call(n);z==null&&i&&(z=v==="rtl"?(be=n.getLastKey)==null?void 0:be.call(n,e.focusedKey):(Ie=n.getFirstKey)==null?void 0:Ie.call(n,e.focusedKey)),z!=null&&(m.preventDefault(),E(z,v==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let z=n.getFirstKey(e.focusedKey,bt(m));e.setFocusedKey(z),z!=null&&(bt(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&e.replaceSelection(z))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&m.shiftKey)return;m.preventDefault();let z=n.getLastKey(e.focusedKey,bt(m));e.setFocusedKey(z),z!=null&&(bt(m)&&m.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(z):u&&e.replaceSelection(z))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let z=n.getKeyPageBelow(e.focusedKey);z!=null&&(m.preventDefault(),E(z))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let z=n.getKeyPageAbove(e.focusedKey);z!=null&&(m.preventDefault(),E(z))}break;case"a":bt(m)&&e.selectionMode==="multiple"&&s!==!0&&(m.preventDefault(),e.selectAll());break;case"Escape":c==="clearSelection"&&!l&&e.selectedKeys.size!==0&&(m.stopPropagation(),m.preventDefault(),e.clearSelection());break;case"Tab":if(!b){if(m.shiftKey)r.current.focus();else{let z=Fe(r.current,{tabbable:!0}),$e,me;do me=z.lastChild(),me&&($e=me);while(me);let et=ne();$e&&(!$t($e)||et&&!_l(et))&&de($e)}break}}},x=a.useRef({top:0,left:0});It(p,"scroll",()=>{var m,E;x.current={top:((m=p.current)==null?void 0:m.scrollTop)??0,left:((E=p.current)==null?void 0:E.scrollLeft)??0}});let S=m=>{var E,I;if(e.isFocused){H(m.currentTarget,F(m))||e.setFocused(!1);return}if(H(m.currentTarget,F(m))){if(e.setFocused(!0),e.focusedKey==null){let C=$=>{$!=null&&(e.setFocusedKey($),u&&!e.isSelected($)&&e.replaceSelection($))},D=m.relatedTarget;D&&m.currentTarget.compareDocumentPosition(D)&Node.DOCUMENT_POSITION_FOLLOWING?C(e.lastSelectedKey??((E=n.getLastKey)==null?void 0:E.call(n))):C(e.firstSelectedKey??((I=n.getFirstKey)==null?void 0:I.call(n)))}else p.current&&(p.current.scrollTop=x.current.top,p.current.scrollLeft=x.current.left);if(e.focusedKey!=null&&p.current){let C=En(r,e.focusedKey);C instanceof HTMLElement&&(!$t(C)&&!f&&de(C),Ht()==="keyboard"&&ni(C,{containingElement:r.current}))}}},T=m=>{H(m.currentTarget,m.relatedTarget)||e.setFocused(!1)},M=a.useRef(!1);It(r,cu,f?m=>{let{detail:E}=m;m.stopPropagation(),e.setFocused(!0),(E==null?void 0:E.focusStrategy)==="first"&&(M.current=!0)}:void 0),ti(()=>{var m;if(M.current){let E=((m=n.getFirstKey)==null?void 0:m.call(n))??null;if(E==null){let I=ne();Pa(r.current),ka(I,null),e.collection.size>0&&(M.current=!1)}else e.setFocusedKey(E),M.current=!1}},[e.collection]),ti(()=>{e.collection.size>0&&(M.current=!1)},[e.focusedKey]),It(r,au,f?m=>{var E;m.stopPropagation(),e.setFocused(!1),(E=m.detail)!=null&&E.clearFocusKey&&e.setFocusedKey(null)}:void 0);const L=a.useRef(o),R=a.useRef(!1);a.useEffect(()=>{var m,E;if(L.current){let I=null;o==="first"&&(I=((m=n.getFirstKey)==null?void 0:m.call(n))??null),o==="last"&&(I=((E=n.getLastKey)==null?void 0:E.call(n))??null);let C=e.selectedKeys;if(C.size){for(let D of C)if(e.canSelectItem(D)){I=D;break}}e.setFocused(!0),e.setFocusedKey(I),I==null&&!f&&r.current&&Ye(r.current),e.collection.size>0&&(L.current=!1,R.current=!0)}});let N=a.useRef(e.focusedKey),O=a.useRef(null);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==N.current||R.current)&&p.current&&r.current){let m=Ht(),E=En(r,e.focusedKey);if(!(E instanceof HTMLElement))return;(m==="keyboard"||R.current)&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(()=>{p.current&&(xn(p.current,E),m!=="virtual"&&ni(E,{containingElement:r.current}))}))}!f&&e.isFocused&&e.focusedKey==null&&N.current!=null&&r.current&&Ye(r.current),N.current=e.focusedKey,R.current=!1}),a.useEffect(()=>()=>{O.current&&cancelAnimationFrame(O.current)},[]),It(r,"react-aria-focus-scope-restore",m=>{m.preventDefault(),e.setFocused(!0)});let k={onKeyDown:w,onFocus:S,onBlur:T,onMouseDown(m){p.current===F(m)&&m.preventDefault()}},{typeSelectProps:A}=kp({keyboardDelegate:n,selectionManager:e});d||(k=Y(A,k));let V;f||(V=e.focusedKey==null?0:-1);let j=Cp(e.collection);return{collectionProps:Y(k,{tabIndex:V,"data-collection":j})}}class Xi{constructor(e){this.ref=e}getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?En(this.ref,e):null;if(!r)return null;let o=n.getBoundingClientRect(),i=r.getBoundingClientRect();return{x:i.left-o.left-n.clientLeft+n.scrollLeft,y:i.top-o.top-n.clientTop+n.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:(e==null?void 0:e.scrollWidth)??0,height:(e==null?void 0:e.scrollHeight)??0}}getVisibleRect(){let e=this.ref.current;return{x:(e==null?void 0:e.scrollLeft)??0,y:(e==null?void 0:e.scrollTop)??0,width:(e==null?void 0:e.clientWidth)??0,height:(e==null?void 0:e.clientHeight)??0}}}class Rp{constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new Xi(n.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){var n,r;return this.disabledBehavior==="all"&&(((n=e.props)==null?void 0:n.isDisabled)||this.disabledKeys.has(e.key))&&((r=e.props)==null?void 0:r.disabledBehavior)!=="selection"}findNextNonDisabled(e,n,r=!1){let o=e;for(;o!=null;){let i=this.collection.getItem(o);if((i==null?void 0:i.type)==="item"&&(r||!this.isDisabled(i)))return o;o=n(o)}return null}getNextKey(e,n){let r=e;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,o=>this.collection.getKeyAfter(o),n==null?void 0:n.includeDisabled)}getPreviousKey(e,n){let r=e;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,o=>this.collection.getKeyBefore(o),n==null?void 0:n.includeDisabled)}findKey(e,n,r){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=n(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&r(l,i)&&o!=null);return o}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}getKeyBelow(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getNextKey(r,n),this.isSameRow):this.getNextKey(e,n)}getKeyAbove(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getPreviousKey(r,n),this.isSameRow):this.getPreviousKey(e,n)}getNextColumn(e,n,r){return n?this.getPreviousKey(e,r):this.getNextKey(e,r)}getKeyRightOf(e,n){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[r](o),n==null?void 0:n.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",n):this.findKey(e,o=>this.getNextColumn(o,this.direction==="rtl",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",n):null}getKeyLeftOf(e,n){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,o=>this.layoutDelegate[r](o),n==null?void 0:n.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",n):this.findKey(e,o=>this.getNextColumn(o,this.direction==="ltr",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",n):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!st(n))return this.getFirstKey();let o=e;if(this.orientation==="horizontal"){let i=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>i&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;if(n&&!st(n))return this.getLastKey();let o=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,r.x-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<i&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,o=n||this.getFirstKey();for(;o!=null;){let i=r.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 Sr=new Map;function Dp(t){let{locale:e}=dt(),n=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(Sr.has(n))return Sr.get(n);let r=new Intl.Collator(e,t);return Sr.set(n,r),r}function Np(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:o,keyboardDelegate:i,layoutDelegate:l,orientation:s}=t,c=Dp({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,d=a.useMemo(()=>i||new Rp({collection:n,disabledKeys:r,disabledBehavior:u,ref:o,collator:c,layoutDelegate:l,orientation:s}),[i,l,n,r,o,c,u,s]),{collectionProps:f}=Mp({...t,ref:o,selectionManager:e,keyboardDelegate:d});return{listProps:f}}function Ip(t,e,n){let{shouldFocusWrap:r=!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=ae(t,{labelable:!0}),{listProps:c}=Np({...l,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return fc.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:Y(s,{onKeyDown:o,onKeyUp:i},{role:"menu",...c,onKeyDown:u=>{var d;(u.key!=="Escape"||t.shouldUseVirtualFocus)&&((d=c.onKeyDown)==null||d.call(c,u))}})}}function Lp(t){let{id:e,selectionManager:n,key:r,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:s,isDisabled:c,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=t,b=Xt();e=he(e);let p=P=>{if(P.pointerType==="keyboard"&&eo(P))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(f==="selection"&&o.current){let K=n.getItemProps(r);b.open(o.current,P,K.href,K.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(f==="override"||f==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):P&&P.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||P&&(bt(P)||P.pointerType==="touch"||P.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};a.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(l?Pa(o.current):s?s():ne()!==o.current&&o.current&&Ye(o.current))},[o,r,n.focusedKey,n.childFocusStrategy,n.isFocused,l]),c=c||n.isDisabled(r);let g={};!l&&!c?g={tabIndex:r===n.focusedKey?0:-1,onFocus(P){F(P)===o.current&&n.setFocusedKey(r)}}:c&&(g.onMouseDown=P=>{P.preventDefault()}),a.useEffect(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let v=n.isLink(r)&&f==="override",y=u&&t.UNSTABLE_itemBehavior==="action",w=n.isLink(r)&&f!=="selection"&&f!=="none",x=!c&&n.canSelectItem(r)&&!v&&!y,S=(u||w)&&!c,T=S&&(n.selectionBehavior==="replace"?!x:!x||n.isEmpty),M=S&&x&&n.selectionBehavior==="replace",L=T||M,R=a.useRef(null),N=L&&x,O=a.useRef(!1),k=a.useRef(!1),A=n.getItemProps(r),V=P=>{var K;u&&(u(),(K=o.current)==null||K.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),w&&o.current&&b.open(o.current,P,A.href,A.routerOptions)},j={ref:o};if(i?(j.onPressStart=P=>{R.current=P.pointerType,O.current=N,P.pointerType==="keyboard"&&(!L||Ji(P.key))&&p(P)},d?(j.onPressUp=T?void 0:P=>{P.pointerType==="mouse"&&x&&p(P)},j.onPress=T?V:P=>{P.pointerType!=="keyboard"&&P.pointerType!=="mouse"&&x&&p(P)}):j.onPress=P=>{if(T||M&&P.pointerType!=="mouse"){if(P.pointerType==="keyboard"&&!Zi(P.key))return;V(P)}else P.pointerType!=="keyboard"&&x&&p(P)}):(j.onPressStart=P=>{R.current=P.pointerType,O.current=N,k.current=T,x&&(P.pointerType==="mouse"&&!T||P.pointerType==="keyboard"&&(!S||Ji(P.key)))&&p(P)},j.onPress=P=>{(P.pointerType==="touch"||P.pointerType==="pen"||P.pointerType==="virtual"||P.pointerType==="keyboard"&&L&&Zi(P.key)||P.pointerType==="mouse"&&k.current)&&(L?V(P):x&&p(P))}),g["data-collection"]=Sp(n.collection),g["data-key"]=r,j.preventFocusOnPress=l,l&&(j=Y(j,{onPressStart(P){P.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(P){P.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}})),A)for(let P of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])A[P]&&(j[P]=Zt(j[P],A[P]));let{pressProps:m,isPressed:E}=Xe(j),I=M?P=>{R.current==="mouse"&&(P.stopPropagation(),P.preventDefault(),V(P))}:void 0,{longPressProps:C}=uc({isDisabled:!N,onLongPress(P){P.pointerType==="touch"&&(p(P),n.setSelectionBehavior("toggle"))}}),D=P=>{R.current==="touch"&&O.current&&P.preventDefault()},$=f!=="none"&&n.isLink(r)?P=>{_e.isOpening||P.preventDefault()}:void 0;return{itemProps:Y(g,x||T||l&&!c?m:{},N?C:{},{onDoubleClick:I,onDragStartCapture:D,onClick:$,id:e},l?{onMouseDown:P=>P.preventDefault()}:void 0),isPressed:E,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:x,hasAction:L}}function Zi(t){return t==="Enter"}function Ji(t){return t===" "}function Kp(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}const Qi=new WeakMap;function Ap(t){let e=Qi.get(t);if(e!=null)return e;let n=0,r=o=>{for(let i of o)i.type==="section"?r(Kp(i,t)):i.type==="item"&&n++};return r(t),Qi.set(t,n),n}function Op(t,e,n){let{id:r,key:o,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":c,onPressStart:u,onPressUp:d,onPress:f,onPressChange:b,onPressEnd:p,onClick:g,onHoverStart:v,onHoverChange:y,onHoverEnd:w,onKeyDown:x,onKeyUp:S,onFocus:T,onFocusChange:M,onBlur:L,selectionManager:R=e.selectionManager}=t,N=!!c,O=N&&t["aria-expanded"]==="true",k=t.isDisabled??R.isDisabled(o),A=t.isSelected??R.isSelected(o),V=fc.get(e),j=e.collection.getItem(o),m=t.onClose||V.onClose,E=Xt(),I=()=>{var te;if(!N&&((te=j==null?void 0:j.props)!=null&&te.onAction?j.props.onAction():t.onAction&&t.onAction(o),V.onAction)){let kt=V.onAction;kt(o)}},C="menuitem";N||(R.selectionMode==="single"?C="menuitemradio":R.selectionMode==="multiple"&&(C="menuitemcheckbox"));let D=vn(),$=vn(),P=vn(),K={id:r,"aria-disabled":k||void 0,role:C,"aria-label":t["aria-label"],"aria-labelledby":D,"aria-describedby":[t["aria-describedby"],$,P].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":c,"aria-expanded":t["aria-expanded"]};if(R.selectionMode!=="none"&&!N&&(K["aria-checked"]=A),s){let te=Number(j==null?void 0:j.index);K["aria-posinset"]=Number.isNaN(te)?void 0:te+1,K["aria-setsize"]=Ap(e.collection)}let U=a.useRef(!1),G=te=>{b==null||b(te),U.current=te},W=a.useRef(null),ee=te=>{te.pointerType!=="keyboard"&&(W.current={pointerType:te.pointerType}),te.pointerType==="mouse"&&(U.current||te.target.click()),d==null||d(te)},le=te=>{var Uo,Go;g==null||g(te),I(),Nl(te,E,j.props.href,j==null?void 0:j.props.routerOptions);let kt=((Uo=W.current)==null?void 0:Uo.pointerType)==="keyboard"?((Go=W.current)==null?void 0:Go.key)==="Enter"||R.selectionMode==="none"||R.isLink(o):R.selectionMode!=="multiple"||R.isLink(o);kt=l??i??kt,m&&!N&&kt&&m(),W.current=null},{itemProps:Z,isFocused:be}=Lp({id:r,selectionManager:R,key:o,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:V.shouldUseVirtualFocus}),{pressProps:Ie,isPressed:z}=Xe({onPressStart:u,onPress:f,onPressUp:ee,onPressChange:G,onPressEnd:p,isDisabled:k}),{hoverProps:$e}=en({isDisabled:k,onHoverStart(te){!zt()&&!(O&&c)&&(R.setFocused(!0),R.setFocusedKey(o)),v==null||v(te)},onHoverChange:y,onHoverEnd:w}),{keyboardProps:me}=vs({onKeyDown:te=>{if(te.repeat){te.continuePropagation();return}switch(te.key){case" ":W.current={pointerType:"keyboard",key:" "},F(te).click(),_r("keyboard");break;case"Enter":W.current={pointerType:"keyboard",key:"Enter"},F(te).tagName!=="A"&&F(te).click(),_r("keyboard");break;default:N||te.continuePropagation(),x==null||x(te);break}},onKeyUp:S}),{focusableProps:et}=Qt({onBlur:L,onFocus:T,onFocusChange:M},n),Ho=ae(j==null?void 0:j.props);delete Ho.id;let eu=Dl(j==null?void 0:j.props);return{menuItemProps:{...K,...Y(Ho,eu,N?{onFocus:Z.onFocus,"data-collection":Z["data-collection"],"data-key":Z["data-key"]}:Z,Ie,$e,me,et,V.shouldUseVirtualFocus||N?{onMouseDown:te=>te.preventDefault()}:void 0,k?void 0:{onClick:le}),tabIndex:Z.tabIndex!=null&&O&&!V.shouldUseVirtualFocus?-1:Z.tabIndex},labelProps:{id:D},descriptionProps:{id:$},keyboardShortcutProps:{id:P},isFocused:be,isFocusVisible:be&&R.isFocused&&zt()&&!O,isSelected:A,isPressed:z,isDisabled:k}}function Fp(t){let{heading:e,"aria-label":n}=t,r=he();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}const mn=2,jp=50,_p=1e3,el=Math.PI/12;function Bp(t){let{menuRef:e,submenuRef:n,isOpen:r,isDisabled:o}=t,i=a.useRef(void 0),l=a.useRef(void 0),s=a.useRef(0),c=a.useRef(void 0),u=a.useRef(void 0),d=a.useRef(void 0),f=a.useRef(2),[b,p]=a.useState(!1);kn({ref:r?n:void 0,onResize:()=>{n.current&&(l.current=n.current.getBoundingClientRect(),d.current=void 0)}});let v=()=>{p(!1),f.current=mn,i.current=void 0},y=Kf(),w=Pe(x=>{b&&x.preventDefault()});a.useEffect(()=>{b&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents=""},[e,b]),J(()=>{let x=n.current,S=e.current;if(o||!x||!r||y!=="pointer"||!S){v();return}l.current=x.getBoundingClientRect();let T=M=>{if(M.pointerType==="touch"||M.pointerType==="pen")return;let L=Date.now();if(L-s.current<jp)return;clearTimeout(c.current),clearTimeout(u.current);let{clientX:R,clientY:N}=M;if(!i.current){i.current={x:R,y:N};return}if(!l.current)return;if(d.current||(d.current=R>l.current.right?"left":"right"),R<S.getBoundingClientRect().left||R>S.getBoundingClientRect().right||N<S.getBoundingClientRect().top||N>S.getBoundingClientRect().bottom){v();return}let O=i.current.x,k=i.current.y,A=d.current==="right"?l.current.left-O:O-l.current.right,V=Math.atan2(k-l.current.top,A)+el,j=Math.atan2(k-l.current.bottom,A)-el,m=Math.atan2(k-N,d.current==="left"?-(R-O):R-O),E=m<V&&m>j;f.current=E?Math.min(f.current+1,mn):Math.max(f.current-1,0),f.current>=mn?p(!0):p(!1),s.current=L,i.current={x:R,y:N},E&&(c.current=setTimeout(()=>{v(),u.current=setTimeout(()=>{let I=document.elementFromPoint(R,N);I&&H(S,I)&&I.dispatchEvent(new PointerEvent("pointerover",{bubbles:!0,cancelable:!0}))},100)},_p))};return window.addEventListener("pointermove",T),process.env.NODE_ENV!=="test"&&window.addEventListener("pointerdown",w,!0),()=>{window.removeEventListener("pointermove",T),process.env.NODE_ENV!=="test"&&window.removeEventListener("pointerdown",w,!0),clearTimeout(c.current),clearTimeout(u.current),f.current=mn}},[o,r,e,y,p,n])}function Vp(t,e,n){let{parentMenuRef:r,submenuRef:o,type:i="menu",isDisabled:l,delay:s=200,shouldUseVirtualFocus:c}=t,u=he(),d=he(),{direction:f}=dt(),b=a.useRef(void 0),p=a.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=void 0)},[b]),g=a.useCallback(R=>{p(),e.open(R)},[e,p]),v=a.useCallback(()=>{p(),e.close()},[e,p]);J(()=>()=>{p()},[p]);let y=R=>{if($t(R.currentTarget))switch(R.key){case"ArrowLeft":f==="ltr"&&H(R.currentTarget,F(R))&&(R.preventDefault(),R.stopPropagation(),v(),!c&&n.current&&de(n.current));break;case"ArrowRight":f==="rtl"&&H(R.currentTarget,F(R))&&(R.preventDefault(),R.stopPropagation(),v(),!c&&n.current&&de(n.current));break;case"Escape":H(o.current,F(R))&&(R.stopPropagation(),v(),!c&&n.current&&de(n.current));break}},w={id:d,"aria-labelledby":u,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:y}},x=R=>{switch(R.key){case"ArrowRight":l||(f==="ltr"?(R.preventDefault(),e.isOpen||g("first"),i==="menu"&&(o!=null&&o.current)&&ne()===(n==null?void 0:n.current)&&de(o.current)):e.isOpen?v():R.continuePropagation());break;case"ArrowLeft":l||(f==="rtl"?(R.preventDefault(),e.isOpen||g("first"),i==="menu"&&(o!=null&&o.current)&&ne()===(n==null?void 0:n.current)&&de(o.current)):e.isOpen?v():R.continuePropagation());break;default:R.continuePropagation();break}},S=R=>{!l&&(R.pointerType==="virtual"||R.pointerType==="keyboard")&&g("first")},T=R=>{!l&&(R.pointerType==="touch"||R.pointerType==="mouse")&&g()},M=R=>{l||(R&&!e.isOpen?b.current||(b.current=setTimeout(()=>{g()},s)):R||p())};It(r,"focusin",R=>{e.isOpen&&H(r.current,F(R))&&F(R)!==n.current&&v()});let L=R=>R!==n.current;return Bp({menuRef:r,submenuRef:o,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:u,"aria-controls":e.isOpen?d:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:S,onPress:T,onHoverChange:M,onKeyDown:x,isOpen:e.isOpen},submenuProps:w,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:L}}}function To(t){let e=Po(t),[n,r]=a.useState(null),[o,i]=a.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:n,...e,open(u=null){r(u),e.open()},toggle(u=null){r(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)}}}function zp(t,e){let{triggerKey:n}=t,{expandedKeysStack:r,openSubmenu:o,closeSubmenu:i,close:l}=e,[s]=a.useState(r==null?void 0:r.length),c=a.useMemo(()=>r[s]===n,[r,n,s]),[u,d]=a.useState(null),f=a.useCallback(g=>{d(g??null),o(n,s)},[o,s,n]),b=a.useCallback(()=>{d(null),i(n,s)},[i,s,n]),p=a.useCallback(g=>{d(g??null),c?b():f(g)},[b,f,c]);return a.useMemo(()=>({focusStrategy:u,isOpen:c,open:f,close:b,closeAll:l,submenuLevel:s,setOpen:()=>{},toggle:p}),[c,f,b,l,u,p,s])}function Hp(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Up(t){return Gp(t)}function Gp(t,e){for(let n of t)return n}function Pr(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...tl(t,e),e],o=[...tl(t,n),n],i=r.slice(0,o.length).findIndex((l,s)=>l!==o[s]);return i!==-1?(e=r[i],n=o[i],e.index-n.index):r.findIndex(l=>l===n)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function tl(t,e){let n=[],r=e;for(;(r==null?void 0:r.parentKey)!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}class Re extends Set{constructor(e,n,r){super(e),e instanceof Re?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}class tr{constructor(e,n,r){this.collection=e,this.state=n,this.allowsCellSelection=(r==null?void 0:r.allowsCellSelection)??!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null,this.fullCollection=(r==null?void 0:r.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,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}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 n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}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(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Pr(this.collection,r,e)<0)&&(e=r)}return(e==null?void 0:e.key)??null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&Pr(this.collection,r,e)>0)&&(e=r)}return(e==null?void 0: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 n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Re([n],n,n);else{let o=this.state.selectedKeys,i=o.anchorKey??n;r=new Re(o,i,n);for(let l of this.getKeyRange(i,o.currentKey??n))r.delete(l);for(let l of this.getKeyRange(n,i))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),o=this.collection.getItem(n);return r&&o?Pr(this.collection,r,o)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var i;if((i=this.layoutDelegate)!=null&&i.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let r=[],o=e;for(;o!=null;){let l=this.collection.getItem(o);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&r.push(o),o===n)return r;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new Re(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new Re([n],n,n):new Re;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Re;for(let r of e){let o=this.getKey(r);if(o!=null&&(n.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=this.fullCollection??this.collection,n=[],r=o=>{var i;for(;o!=null;){if(this.canSelectItemIn(o,e)){let l=e.getItem(o);(l==null?void 0:l.type)==="item"&&n.push(o),l!=null&&l.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&r(((i=Up(Hp(l,e)))==null?void 0:i.key)??null)}o=e.getKeyAfter(o)}};return r(e.getFirstKey()),n}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 Re)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,n){var o;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=n.getItem(e);return!(!r||(o=r==null?void 0:r.props)!=null&&o.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var r,o;let n=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!((r=n==null?void 0:n.props)!=null&&r.isDisabled))&&((o=n==null?void 0:n.props)==null?void 0:o.disabledBehavior)!=="selection"}isLink(e){var n,r;return!!((r=(n=this.collection.getItem(e))==null?void 0:n.props)!=null&&r.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))==null?void 0:n.props}withCollection(e){return new tr(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class Wp{constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&(l.type==="section"||n.has(l.key)))for(let s of l.childNodes)r(s)};for(let l of e)r(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==null?void 0:o.key)??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey??null:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}}class qp{build(e,n){return this.context=n,nl(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(a.isValidElement(n)&&n.type===a.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of r)yield*this.getFullNode({value:i,index:o},{renderer:n}),o++}else{let o=[];a.Children.forEach(n,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,n,r,o){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${o}${n.key}`;let i=n.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}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,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++},n,r,o);return}let i=e.element;if(!i&&e.value&&n&&n.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=n.renderer(e.value)}if(a.isValidElement(i)){let c=i.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let b=i.type;throw new Error(`Unknown element <${b}> in collection.`)}let u=c.getCollectionNode(i.props,this.context),d=e.index??0,f=u.next();for(;!f.done&&f.value;){let b=f.value;e.index=d;let p=b.key??null;p==null&&(p=b.element?null:this.getKey(i,e,n,r));let v=[...this.getFullNode({...b,key:p,index:d,wrapper:Yp(e.wrapper,b.wrapper)},this.getChildState(n,b),r?`${r}${i.key}`:i.key,o)];for(let y of v){if(y.value=b.value??e.value??null,y.value&&this.cache.set(y.value,y),e.type&&y.type!==e.type)throw new Error(`Unsupported type <${kr(y.type)}> in <${kr((o==null?void 0:o.type)??"unknown parent type")}>. Only <${kr(e.type)}> is supported.`);d++,yield y}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==null?void 0:o.level)??0)+((o==null?void 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:nl(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(n,u),s.key,s);for(let f of d)c++,yield f}})};yield s}constructor(){this.cache=new WeakMap}}function nl(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function Yp(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function kr(t){return t[0].toUpperCase()+t.slice(1)}function Xp(t,e,n){let r=a.useMemo(()=>new qp,[]),{children:o,items:i,collection:l}=t;return a.useMemo(()=>{if(l)return l;let c=r.build({children:o,items:i},n);return e(c)},[r,o,i,l,n,e])}function Zp(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function pc(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,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(()=>rl(t.selectedKeys),[t.selectedKeys]),b=a.useMemo(()=>rl(t.defaultSelectedKeys,new Re),[t.defaultSelectedKeys]),[p,g]=Yn(f,b,t.onSelectionChange),v=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[y,w]=a.useState(o);o==="replace"&&y==="toggle"&&typeof p=="object"&&p.size===0&&w("replace");let x=a.useRef(o);return a.useEffect(()=>{o!==x.current&&(w(o),x.current=o)},[o]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:y,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,T="first"){c.current=S,u.current=T,d(S)},selectedKeys:p,setSelectedKeys(S){(r||!Zp(S,p))&&g(S)},disabledKeys:v,disabledBehavior:i}}function rl(t,e){return t?t==="all"?"all":new Re(t):e}function Jp(t){let{onExpandedChange:e}=t,[n,r]=Yn(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),o=pc(t),i=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),l=Xp(t,a.useCallback(c=>new Wp(c,{expandedKeys:n}),[n]),null);return a.useEffect(()=>{o.focusedKey!=null&&!l.getItem(o.focusedKey)&&o.setFocusedKey(null)},[l,o.focusedKey]),{collection:l,expandedKeys:n,disabledKeys:i,toggleKey:c=>{r(Qp(n,c))},setExpandedKeys:r,selectionManager:new tr(l,o)}}function Qp(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const Mo=a.createContext(null),nr=a.createContext(null),qt=a.createContext(null),jn=a.createContext(null);function eb(t){let e=To(t),n=a.useRef(null),{menuTriggerProps:r,menuProps:o}=Ep({...t,type:"menu"},e,n),i=a.useRef(null);return ls()?null:a.createElement(ze,{values:[[Mo,{...o,ref:i}],[Qe,e],[qt,e],[Qn,{trigger:"MenuTrigger",triggerRef:n,scrollRef:i,placement:"bottom start","aria-labelledby":o["aria-labelledby"]}]]},a.createElement(pa,{...r,ref:n,isPressed:e.isOpen},t.children))}const bc=a.createContext(null),zo=class zo extends St{filter(e,n,r){let o=e.getItem(this.firstChildKey);if(o&&r(o.textValue,this)){let i=this.clone();return n.addDescendants(i,e),i}return null}};zo.type="submenutrigger";let to=zo;const tb=Ca(to,(t,e,n)=>{let{CollectionBranch:r}=a.useContext(er),o=a.useContext(nr),i=a.useContext(qt),l=zp({triggerKey:n.key},i),s=a.useRef(null),c=Je(e),{parentMenuRef:u,shouldUseVirtualFocus:d}=a.useContext(bc),{submenuTriggerProps:f,submenuProps:b,popoverProps:p}=Vp({parentMenuRef:u,submenuRef:s,delay:t.delay,shouldUseVirtualFocus:d},l,c);return a.createElement(ze,{values:[[wt,{...f,onAction:void 0,ref:c}],[Mo,{ref:s,...b}],[Qe,l],[Qn,{trigger:"SubmenuTrigger",triggerRef:c,placement:"end top","aria-labelledby":b["aria-labelledby"],...p}]]},a.createElement(r,{collection:o.collection,parent:n}),t.children[1])},t=>t.children[0]),nb=a.forwardRef(function(e,n){return[e,n]=Me(e,n,Mo),a.createElement(Qh,{content:a.createElement(ip,e)},r=>a.createElement(rb,{props:e,collection:r,menuRef:n}))});function rb({props:t,collection:e,menuRef:n}){[t,n]=Me(t,n,Yi);let{filter:r,...o}=t,i=a.useMemo(()=>r?e.filter(r):e,[e,r]),l=Jp({...t,collection:i,children:void 0}),s=a.useContext(qt),{isVirtualized:c,CollectionRoot:u}=a.useContext(er),{menuProps:d}=Ip({...t,isVirtualized:c,onClose:t.onClose||(s==null?void 0:s.close)},l,n),f=Te({...t,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),b=null;l.collection.size===0&&t.renderEmptyState&&(b=a.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState()));let p=ae(t,{global:!0});return a.createElement(Ps,null,a.createElement(pe.div,{...Y(p,f,d),ref:n,slot:t.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:t.onScroll},a.createElement(ze,{values:[[nr,l],[ko,{elementType:"div"}],[sp,{name:"MenuSection",render:mc}],[bc,{parentMenuRef:n,shouldUseVirtualFocus:o==null?void 0:o.shouldUseVirtualFocus}],[wt,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[Yi,null],[hp,null],[jn,l.selectionManager],[qt,s??To({})]]},a.createElement(gp,null,a.createElement(u,{collection:l.collection,persistedKeys:up(l.selectionManager.focusedKey),scrollRef:n}))),b))}class ob extends tr{constructor(e,n){super(e.collection,n),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}}function mc(t,e,n,r="react-aria-MenuSection"){var y,w,x;let o=a.useContext(nr),{CollectionBranch:i}=a.useContext(er),[l,s]=is(),{headingProps:c,groupProps:u}=Fp({heading:s,"aria-label":n.props["aria-label"]??void 0}),d=Te({...t,id:void 0,children:void 0,defaultClassName:r,className:(y=n.props)==null?void 0:y.className,style:(w=n.props)==null?void 0:w.style,values:void 0}),f=a.useContext(jn),b=pc(t),p=t.selectionMode!=null?new ob(f,b):f,g=(x=Jt(wt))==null?void 0:x.shouldCloseOnSelect,v=ae(t,{global:!0});return delete v.id,a.createElement(pe.section,{...Y(v,d,u),ref:e},a.createElement(ze,{values:[[pp,{...c,ref:l}],[jn,p],[wt,{shouldCloseOnSelect:t.shouldCloseOnSelect??g}]]},a.createElement(i,{collection:o.collection,parent:n})))}const ib=Ca(Zr,mc),wt=a.createContext(null),lb=Ea(Xr,function(e,n,r){var S;[e,n]=Me(e,n,wt);let o=(S=Jt(wt))==null?void 0:S.id,i=a.useContext(nr),l=Je(n),s=a.useContext(jn),{isVirtualized:c}=a.useContext(er),{menuItemProps:u,labelProps:d,descriptionProps:f,keyboardShortcutProps:b,...p}=Op({...e,id:o,key:r.key,selectionManager:s,isVirtualized:c},i,l),{hoverProps:g,isHovered:v}=en({isDisabled:p.isDisabled}),y=Te({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...p,isHovered:v,isFocusVisible:p.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),w=e.href?pe.a:pe.div,x=ae(e,{global:!0});return delete x.id,delete x.onClick,a.createElement(w,{...Y(x,y,u,g),ref:l,"data-disabled":p.isDisabled||void 0,"data-hovered":v||void 0,"data-focused":p.isFocused||void 0,"data-focus-visible":p.isFocusVisible||void 0,"data-pressed":p.isPressed||void 0,"data-selected":p.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(ze,{values:[[Ta,{slots:{[Mn]:d,label:d,description:f}}],[bp,b],[yp,{isSelected:p.isSelected}]]},y.children))});function sb(t,e){let{role:n="dialog"}=t,r=vn();r=t["aria-label"]?void 0:r;let o=a.useRef(!1);a.useEffect(()=>{if(e.current&&!$t(e.current)){Ye(e.current);let l=setTimeout(()=>{(ne()===e.current||ne()===document.body)&&(o.current=!0,e.current&&(e.current.blur(),Ye(e.current)),o.current=!1)},500);return()=>{clearTimeout(l)}}},[e]),ma();let i=a.useRef(!1);return a.useEffect(()=>{if(process.env.NODE_ENV!=="production"&&!i.current&&e.current){let l=e.current,s=l.hasAttribute("aria-label"),c=l.hasAttribute("aria-labelledby");!s&&!c&&(console.warn("A dialog must have a title for accessibility. Either provide an aria-label or aria-labelledby prop, or render a heading element inside the dialog."),i.current=!0)}}),{dialogProps:{...ae(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:l=>{o.current&&l.stopPropagation()}},titleProps:{id:r}}}const gc=a.createContext(null),Qe=a.createContext(null);function ab(t){let e=To(t),n=a.useRef(null),{triggerProps:r,overlayProps:o}=dc({type:"dialog"},e,n);return r.id=he(),o["aria-labelledby"]=r.id,a.createElement(ze,{values:[[Qe,e],[qt,e],[gc,o],[Qn,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":o["aria-labelledby"]}]]},a.createElement(pa,{...r,ref:n,isPressed:e.isOpen},t.children))}const cb=a.forwardRef(function(e,n){let r=e["aria-labelledby"];[e,n]=Me(e,n,gc);let{dialogProps:o,titleProps:i}=sb({...e,"aria-labelledby":r},n),l=a.useContext(Qe);!o["aria-label"]&&!o["aria-labelledby"]&&(e["aria-labelledby"]?o["aria-labelledby"]=e["aria-labelledby"]:process.env.NODE_ENV!=="production"&&console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let s=Te({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(l==null?void 0:l.close)||(()=>{})}}),c=ae(e,{global:!0});return a.createElement(pe.section,{...Y(c,s,o),render:e.render,ref:n,slot:e.slot||void 0},a.createElement(ze,{values:[[ws,{slots:{[Mn]:{},title:{...i,level:2}}}],[$s,{slots:{[Mn]:{},close:{onPress:()=>l==null?void 0:l.close()}}}]]},s.children))});function ub(t,e,n){let{overlayProps:r,underlayProps:o}=Ms({...t,isOpen:e.isOpen,onClose:e.close},n);return Rs({isDisabled:!e.isOpen}),ma(),a.useEffect(()=>{if(e.isOpen&&n.current)return Es([n.current],{shouldUseInert:!0})},[e.isOpen,n]),{modalProps:Y(r),underlayProps:o}}const db=a.createContext(null),Ro=a.createContext(null),fb=a.forwardRef(function(e,n){if(a.useContext(Ro)){if(process.env.NODE_ENV!=="production"&&(e.onOpenChange||e.defaultOpen!==void 0||e.isOpen!==void 0)){const v=new Set(["isDismissable","isKeyboardDismissDisabled","isOpen","defaultOpen","onOpenChange","isEntering","isExiting","UNSTABLE_portalContainer","shouldCloseOnInteractOutside"]),y=Object.keys(e).filter(w=>v.has(w));console.warn(`This modal is already wrapped in a ModalOverlay, props [${y.join(", ")}] should be placed on the ModalOverlay instead.`)}return a.createElement(ol,{...e,modalRef:n},e.children)}let{isDismissable:o,isKeyboardDismissDisabled:i,isOpen:l,defaultOpen:s,onOpenChange:c,children:u,isEntering:d,isExiting:f,UNSTABLE_portalContainer:b,shouldCloseOnInteractOutside:p,...g}=e;return a.createElement(yc,{isDismissable:o,isKeyboardDismissDisabled:i,isOpen:l,defaultOpen:s,onOpenChange:c,isEntering:d,isExiting:f,UNSTABLE_portalContainer:b,shouldCloseOnInteractOutside:p},a.createElement(ol,{...g,modalRef:n},u))});function hb(t,e){[t,e]=Me(t,e,db);let n=a.useContext(Qe),r=Po(t),o=t.isOpen!=null||t.defaultOpen!=null||!n?r:n;o===n&&process.env.NODE_ENV!=="production"&&(t.onOpenChange||t.defaultOpen!==void 0||t.isOpen!==void 0)&&console.warn("This modals state is controlled by a trigger, place onOpenChange on the trigger instead.");let i=Je(e),l=a.useRef(null),s=Nr(i,o.isOpen),c=Nr(l,o.isOpen),u=s||c||t.isExiting||!1,d=Ze();return!o.isOpen&&!u||d?null:a.createElement(pb,{...t,state:o,isExiting:u,overlayRef:i,modalRef:l})}const yc=a.forwardRef(hb);function pb({UNSTABLE_portalContainer:t,...e}){let n=e.modalRef,{state:r}=e,{modalProps:o,underlayProps:i}=ub(e,r,n),l=ho(e.overlayRef)||e.isEntering||!1,s=Te({...e,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:l,isExiting:e.isExiting,state:r}}),c=Gu(),u,d;if(typeof document<"u"){let b=st(document.body)?document.body:document.scrollingElement||document.documentElement,p=b.getBoundingClientRect().width%1,g=b.getBoundingClientRect().height%1;u=b.scrollWidth-p,d=b.scrollHeight-g}let f={...s.style,"--visual-viewport-width":c.width+"px","--visual-viewport-height":c.height+"px","--page-width":u!==void 0?u+"px":void 0,"--page-height":d!==void 0?d+"px":void 0};return a.createElement(Yr,{isExiting:e.isExiting,portalContainer:t},a.createElement(pe.div,{...Y(ae(e,{global:!0}),i),...s,style:f,ref:e.overlayRef,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},a.createElement(ze,{values:[[Ro,{modalProps:o,modalRef:n,isExiting:e.isExiting,isDismissable:e.isDismissable}],[Qe,r]]},s.children)))}function ol(t){let{modalProps:e,modalRef:n,isExiting:r,isDismissable:o}=a.useContext(Ro),i=a.useContext(Qe),l=a.useMemo(()=>ut(t.modalRef,n),[t.modalRef,n]),s=Je(l),c=ho(s),u=Te({...t,defaultClassName:"react-aria-Modal",values:{isEntering:c,isExiting:r,state:i}});return a.createElement(pe.div,{...Y(ae(t,{global:!0}),e),...u,ref:s,"data-entering":c||void 0,"data-exiting":r||void 0},o&&a.createElement(qr,{onDismiss:i.close}),u.children)}const bb=a.forwardRef(({children:t,...e},n)=>{n=Je(n);let{pressProps:r}=Xe({...e,ref:n}),{focusableProps:o}=Qt(e,n),i=a.Children.only(t);a.useEffect(()=>{if(process.env.NODE_ENV==="production")return;let s=n.current;if(!s||!(s instanceof fe(s).Element)){console.error("<Pressable> child must forward its ref to a DOM element.");return}if(!e.isDisabled&&!mo(s)){console.warn("<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(s.localName!=="button"&&s.localName!=="input"&&s.localName!=="select"&&s.localName!=="textarea"&&s.localName!=="a"&&s.localName!=="area"&&s.localName!=="summary"){let c=s.getAttribute("role");c?c!=="application"&&c!=="button"&&c!=="checkbox"&&c!=="combobox"&&c!=="gridcell"&&c!=="link"&&c!=="menuitem"&&c!=="menuitemcheckbox"&&c!=="menuitemradio"&&c!=="option"&&c!=="radio"&&c!=="searchbox"&&c!=="separator"&&c!=="slider"&&c!=="spinbutton"&&c!=="switch"&&c!=="tab"&&c!=="textbox"&&c!=="treeitem"&&console.warn(`<Pressable> child must have an interactive ARIA role. Got "${c}".`):console.warn("<Pressable> child must have an interactive ARIA role.")}},[n,e.isDisabled]);let l=parseInt(a.version,10)<19?i.ref:i.props.ref;return a.cloneElement(i,{...Y(r,o,i.props),ref:ut(l,n)})}),il=({children:t,className:e,slot:n,style:r,variant:o,...i})=>{const l=a.useMemo(()=>of({variant:o}),[o]);return h.jsx(Co,{"aria-label":"Close",className:Ee(e,l),"data-slot":"close-button",slot:n,style:r,...i,children:s=>typeof t=="function"?t(s):t??h.jsx(th,{"data-slot":"close-button-icon"})})},mb=Object.assign(il,{Root:il}),gb=a.createContext(null),yb=a.createContext(null);function vb(t,e,n){let{validationBehavior:r,focus:o}=t;J(()=>{if(r==="native"&&(n!=null&&n.current)&&!n.current.disabled){let u=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation($b(n.current))}});let i=a.useRef(!1),l=Pe(()=>{i.current||e.resetValidation()}),s=Pe(u=>{var f,b;e.displayValidation.isInvalid||e.commitValidation();let d=(f=n==null?void 0:n.current)==null?void 0:f.form;!u.defaultPrevented&&n&&d&&wb(d)===n.current&&(o?o():(b=n.current)==null||b.focus(),_r("keyboard")),u.preventDefault()}),c=Pe(()=>{e.commitValidation()});a.useEffect(()=>{let u=n==null?void 0:n.current;if(!u)return;let d=u.form,f=d==null?void 0:d.reset;return d&&(d.reset=()=>{i.current=!window.event||window.event.type==="message"&&F(window.event)instanceof MessagePort,f==null||f.call(d),i.current=!1}),u.addEventListener("invalid",s),u.addEventListener("change",c),d==null||d.addEventListener("reset",l),()=>{u.removeEventListener("invalid",s),u.removeEventListener("change",c),d==null||d.removeEventListener("reset",l),d&&(d.reset=f)}},[n,r])}function xb(t){let e=t.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function $b(t){return{isInvalid:!t.validity.valid,validationDetails:xb(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function wb(t){var e;for(let n=0;n<t.elements.length;n++){let r=t.elements[n];if(((e=r.validity)==null?void 0:e.valid)===!1)return r}return null}function Eb(t,e){let{elementType:n="a",onPress:r,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:s,...c}=t,u={};n!=="a"&&(u={role:"link",tabIndex:s?void 0:0});let{focusableProps:d}=Qt(t,e),{pressProps:f,isPressed:b}=Xe({onPress:r,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:s,ref:e}),p=ae(c,{labelable:!0}),g=Y(d,f),v=Xt(),y=Dl(t);return{isPressed:b,linkProps:Y(p,y,{...g,...u,"aria-disabled":s||void 0,"aria-current":t["aria-current"],onClick:w=>{var x;(x=f.onClick)==null||x.call(f,w),Nl(w,v,t.href,t.routerOptions)}})}}const Cb=a.createContext(null),Sb=a.forwardRef(function(e,n){[e,n]=Me(e,n,Cb);let r=e.href&&!e.isDisabled?"a":"span",{linkProps:o,isPressed:i}=Eb({...e,elementType:r},n),l=pe[r],{hoverProps:s,isHovered:c}=en(e),{focusProps:u,isFocused:d,isFocusVisible:f}=Eo(),b=Te({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:i,isHovered:c,isFocused:d,isFocusVisible:f}}),p=ae(e,{global:!0});return delete p.onClick,a.createElement(l,{ref:n,slot:e.slot||void 0,...Y(p,b,o,s,u),"data-focused":d||void 0,"data-hovered":c||void 0,"data-pressed":i||void 0,"data-focus-visible":f||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},b.children)}),vc=a.createContext({}),ll=({children:t,className:e,...n})=>{const r=a.useMemo(()=>sf(),[]);return h.jsx(vc,{value:{slots:r},children:h.jsx(Sb,{...n,className:Ee(e,r==null?void 0:r.base()),children:o=>h.jsx(h.Fragment,{children:typeof t=="function"?t(o):t})})})},Pb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(vc);return h.jsx(oe.span,{className:ie(r==null?void 0:r.icon,e),"data-default-icon":Jf(!t),"data-slot":"link-icon",...n,children:t??h.jsx(eh,{"data-slot":"link-default-icon"})})},Do=Object.assign(ll,{Root:ll,Icon:Pb});function kb(t={}){let{isReadOnly:e}=t,[n,r]=Yn(t.isSelected,t.defaultSelected||!1,t.onChange),[o]=a.useState(n);function i(s){e||r(s)}function l(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??o,setSelected:i,toggle:l}}const Tb=a.createContext({}),Mb="__button_group_child",sl=({children:t,className:e,fullWidth:n,isDisabled:r,isIconOnly:o,size:i,slot:l,style:s,variant:c,[Mb]:u,...d})=>{const f=a.useContext(Tb),b=u===!0,p=i??(b?f==null?void 0:f.size:void 0),g=c??(b?f==null?void 0:f.variant:void 0),v=r??(b?f==null?void 0:f.isDisabled:void 0),y=n??(b?f==null?void 0:f.fullWidth:void 0),w=qe({fullWidth:y,isIconOnly:o,size:p,variant:g});return h.jsx(Co,{className:Ee(e,w),"data-slot":"button",isDisabled:v,slot:l,style:s,...d,children:x=>typeof t=="function"?t(x):t})},Rb=Object.assign(sl,{Root:sl}),Pt=a.createContext({}),al=({children:t,className:e,variant:n="default",...r})=>{const o=a.useMemo(()=>tf({variant:n}),[n]),i=h.jsx(oe.div,{className:o.base({className:e}),"data-slot":"card",...r,children:t});return h.jsx(Pt,{value:{slots:o},children:n==="transparent"?i:h.jsx(Xn,{value:{variant:n},children:i})})},Db=({className:t,...e})=>{const{slots:n}=a.useContext(Pt);return h.jsx(oe.div,{className:ie(n==null?void 0:n.header,t),"data-slot":"card-header",...e})},Nb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(Pt);return h.jsx(oe.h3,{className:ie(r==null?void 0:r.title,e),"data-slot":"card-title",...n,children:t})},Ib=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(Pt);return h.jsx(oe.p,{className:ie(r==null?void 0:r.description,e),"data-slot":"card-description",...n,children:t})},Lb=({className:t,...e})=>{const{slots:n}=a.useContext(Pt);return h.jsx(oe.div,{className:ie(n==null?void 0:n.content,t),"data-slot":"card-content",...e})},Kb=({className:t,...e})=>{const{slots:n}=a.useContext(Pt);return h.jsx(oe.div,{className:ie(n==null?void 0:n.footer,t),"data-slot":"card-footer",...e})},Ot=Object.assign(al,{Root:al,Header:Db,Title:Nb,Description:Ib,Content:Lb,Footer:Kb}),Ab=new WeakMap;function Ob(t=!0){let[e,n]=a.useState(t),r=a.useRef(!1),o=a.useCallback(i=>{r.current=!0,n(!!i)},[]);return J(()=>{r.current||n(!1)},[]),[o,e]}function cl(t=!0){let e=he(),[n,r]=Ob(t);return{id:r?e:void 0,ref:n}}const xc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},$c={...xc,customError:!0,valid:!1},mt={isInvalid:!1,validationDetails:xc,validationErrors:[]},Fb=a.createContext({}),_n="__reactAriaFormValidationState";function wc(t){if(t[_n]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}=t[_n];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:o,commitValidation:i}}return jb(t)}function jb(t){let{isInvalid:e,validationState:n,name:r,value:o,builtinValidation:i,validate:l,validationBehavior:s="aria"}=t;n&&(e||(e=n==="invalid"));let c=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:$c}:null,u=a.useMemo(()=>{if(!l||o==null)return null;let k=_b(l,o);return ul(k)},[l,o]);i!=null&&i.validationDetails.valid&&(i=void 0);let d=a.useContext(Fb),f=a.useMemo(()=>r?Array.isArray(r)?r.flatMap(k=>no(d[k])):no(d[r]):[],[d,r]),[b,p]=a.useState(d),[g,v]=a.useState(!1);d!==b&&(p(d),v(!1));let y=a.useMemo(()=>ul(g?[]:f),[g,f]),w=a.useRef(mt),[x,S]=a.useState(mt),T=a.useRef(mt),M=()=>{if(!L)return;R(!1);let k=u||i||w.current;Tr(k,T.current)||(T.current=k,S(k))},[L,R]=a.useState(!1);return a.useEffect(M),{realtimeValidation:c||y||u||i||mt,displayValidation:s==="native"?c||y||x:c||y||u||i||x,updateValidation(k){s==="aria"&&!Tr(x,k)?S(k):w.current=k},resetValidation(){let k=mt;Tr(k,T.current)||(T.current=k,S(k)),s==="native"&&R(!1),v(!0)},commitValidation(){s==="native"&&R(!0),v(!0)}}}function no(t){return t?Array.isArray(t)?t:[t]:[]}function _b(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return no(n)}return[]}function ul(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:$c}:null}function Tr(t,e){return t===e?!0:!!t&&!!e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((n,r)=>n===e.validationErrors[r])&&Object.entries(t.validationDetails).every(([n,r])=>e.validationDetails[n]===r)}function Bb(t,e,n){let{isDisabled:r=!1,isReadOnly:o=!1,value:i,name:l,form:s,children:c,isRequired:u,validationBehavior:d="aria","aria-label":f,"aria-labelledby":b,"aria-describedby":p,onPressStart:g,onPressEnd:v,onPressChange:y,onPress:w,onPressUp:x,onClick:S}=t,T=wc({...t,value:e.isSelected}),{isInvalid:M,validationErrors:L,validationDetails:R}=T.displayValidation;vb(t,T,n);let N=K=>{K.stopPropagation(),e.setSelected(F(K).checked)},O=c!=null,k=f!=null||b!=null;!O&&!k&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:A,isPressed:V}=Xe({onPressStart:g,onPressEnd:v,onPressChange:y,onPress:w,onPressUp:x,onClick:S,isDisabled:r}),[j,m]=a.useState(!1),{pressProps:E}=Xe({onPressStart(K){if(K.pointerType==="keyboard"||K.pointerType==="virtual"){K.continuePropagation();return}g==null||g(K),y==null||y(!0),m(!0)},onPressEnd(K){if(K.pointerType==="keyboard"||K.pointerType==="virtual"){K.continuePropagation();return}v==null||v(K),y==null||y(!1),m(!1)},onPressUp(K){if(K.pointerType==="keyboard"||K.pointerType==="virtual"){K.continuePropagation();return}x==null||x(K)},onClick:S,onPress(K){var W;if(K.pointerType==="keyboard"||K.pointerType==="virtual"){K.continuePropagation();return}w==null||w(K),e.toggle(),(W=n.current)==null||W.focus();let{[_n]:U}=t,{commitValidation:G}=U||T;G()},isDisabled:r||o}),{focusableProps:I}=Qt(t,n),C=Y(A,I),D=ae(t,{labelable:!0});Xu(n,e.defaultSelected,e.setSelected);let $=cl(),P=cl();return{labelProps:Y(E,{onClick:K=>K.preventDefault()}),inputProps:Y(D,{checked:e.isSelected,"aria-required":u&&d==="aria"||void 0,required:u&&d==="native","aria-invalid":M||t.validationState==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-controls":t["aria-controls"],"aria-readonly":o||void 0,"aria-describedby":[$.id,P.id,p].filter(Boolean).join(" ")||void 0,onChange:N,disabled:r,...i==null?{}:{value:i},name:l,form:s,type:"checkbox",...C}),descriptionProps:$,errorMessageProps:P,isSelected:e.isSelected,isPressed:V||j,isDisabled:r,isReadOnly:o,isInvalid:M||t.validationState==="invalid",validationErrors:L,validationDetails:R}}function Ec(t,e,n){let{labelProps:r,inputProps:o,descriptionProps:i,errorMessageProps:l,isSelected:s,isPressed:c,isDisabled:u,isReadOnly:d,isInvalid:f,validationErrors:b,validationDetails:p}=Bb(t,e,n),{isIndeterminate:g}=t;return a.useEffect(()=>{n.current&&(n.current.indeterminate=!!g)}),{labelProps:Y(r,a.useMemo(()=>({onMouseDown:v=>v.preventDefault()}),[])),inputProps:o,descriptionProps:i,errorMessageProps:l,isSelected:s,isPressed:c,isDisabled:u,isReadOnly:d,isInvalid:f,validationErrors:b,validationDetails:p}}const Vb=typeof document<"u"?a.useInsertionEffect??a.useLayoutEffect:()=>{};function zb(t,e,n){let[r,o]=a.useState(t||e),i=a.useRef(r),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:r;Vb(()=>{i.current=c});let[,u]=a.useReducer(()=>({}),{}),d=a.useCallback((f,...b)=>{let p=typeof f=="function"?f(i.current):f;Object.is(i.current,p)||(i.current=p,o(p),u(),n==null||n(p,...b))},[n]);return[c,d]}function Hb(t={}){let{isReadOnly:e}=t,[n,r]=zb(t.isSelected,t.defaultSelected||!1,t.onChange),[o]=a.useState(n);function i(s){e||r(s)}function l(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??o,setSelected:i,toggle:l}}function Ub(t,e,n){const r=Hb({isReadOnly:t.isReadOnly||e.isReadOnly,isSelected:e.isSelected(t.value),defaultSelected:e.defaultValue.includes(t.value),onChange(v){v?e.addValue(t.value):e.removeValue(t.value),t.onChange&&t.onChange(v)}});let{name:o,form:i,descriptionId:l,errorMessageId:s,validationBehavior:c}=Ab.get(e);c=t.validationBehavior??c;let{realtimeValidation:u}=wc({...t,value:r.isSelected,name:void 0,validationBehavior:"aria"}),d=a.useRef(mt),f=()=>{e.setInvalid(t.value,u.isInvalid?u:d.current)};a.useEffect(f);let b=e.realtimeValidation.isInvalid?e.realtimeValidation:u,p=c==="native"?e.displayValidation:b,g=Ec({...t,isReadOnly:t.isReadOnly||e.isReadOnly,isDisabled:t.isDisabled||e.isDisabled,name:t.name||o,form:t.form||i,isRequired:t.isRequired??e.isRequired,validationBehavior:c,[_n]:{realtimeValidation:b,displayValidation:p,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(v){d.current=v,f()}}},r,n);return{...g,inputProps:{...g.inputProps,"aria-describedby":[g.inputProps["aria-describedby"],e.isInvalid?s:null,l].filter(Boolean).join(" ")||void 0}}}const Gb=a.createContext(null),Cc=a.createContext(null),Sc=a.createContext(null),Wb=a.forwardRef(function(e,n){let{inputRef:r=null,...o}=e;[e,n]=Me(o,n,Gb);let i=a.useContext(Cc),[l,s]=qb(e,r),{descriptionProps:c,errorMessageProps:u,isSelected:d,isDisabled:f,isReadOnly:b,isInvalid:p,validationDetails:g,validationErrors:v}=l,y=Te({...e,defaultClassName:"react-aria-CheckboxField",values:{isSelected:d,isIndeterminate:e.isIndeterminate||!1,isDisabled:f,isReadOnly:b,isInvalid:p,isRequired:e.isRequired||!1}}),w=ae(e,{global:!0});return delete w.id,delete w.onClick,a.createElement(pe.div,{...Y(w,y),ref:n,slot:e.slot||void 0,"data-selected":d||void 0,"data-indeterminate":e.isIndeterminate||void 0,"data-disabled":f||void 0,"data-readonly":b||void 0,"data-invalid":p||void 0,"data-required":e.isRequired||void 0},a.createElement(ze,{values:[[Sc,{...l,inputRef:s,defaultClassName:"react-aria-CheckboxButton",isIndeterminate:e.isIndeterminate,isRequired:e.isRequired}],[Ta,{slots:{description:c,errorMessage:u}}],[gb,i?null:{isInvalid:p,validationDetails:g,validationErrors:v}]]},y.children))});function qb(t,e){let{validationBehavior:n}=Jt(yb)||{},r=t.validationBehavior??n??"native",o=a.useContext(Cc),i=Je(a.useMemo(()=>ut(e,t.inputRef!==void 0?t.inputRef:null),[e,t.inputRef])),l={...hf(t),children:typeof t.children=="function"?!0:t.children,value:t.value,validationBehavior:r};return[o?Ub(l,o,i):Ec(l,kb(t),i),i]}const Yb=a.forwardRef(function(e,n){let{labelProps:r,inputProps:o,isSelected:i,isDisabled:l,isReadOnly:s,isPressed:c,isInvalid:u,inputRef:d,defaultClassName:f,isIndeterminate:b,isRequired:p}=a.useContext(Sc),{isFocused:g,isFocusVisible:v,focusProps:y}=Eo(),w=l||s,{hoverProps:x,isHovered:S}=en({...e,isDisabled:w}),T=Te({...e,defaultClassName:f,values:{isSelected:i,isIndeterminate:b||!1,isPressed:c,isHovered:S,isFocused:g,isFocusVisible:v,isDisabled:l,isReadOnly:s,isInvalid:u,isRequired:p||!1}}),M=ae(e,{global:!0});return delete M.id,delete M.onClick,a.createElement(pe.label,{...Y(M,r,x,T),ref:n,slot:e.slot||void 0,"data-selected":i||void 0,"data-indeterminate":b||void 0,"data-pressed":c||void 0,"data-hovered":S||void 0,"data-focused":g||void 0,"data-focus-visible":v||void 0,"data-disabled":l||void 0,"data-readonly":s||void 0,"data-invalid":u||void 0,"data-required":p||void 0},a.createElement(ha,{elementType:"span"},a.createElement("input",{...Y(o,y),ref:d})),T.children)}),Xb=a.createContext({}),rr=a.createContext({}),ro=({children:t,className:e,variant:n,...r})=>{const o=a.useContext(Xb),i=n??o.variant,l=a.useMemo(()=>nf({variant:i}),[i]);return h.jsx(Wb,{"data-slot":"checkbox",...r,className:Ee(e,l.base()),children:s=>h.jsx(rr,{value:{slots:l,state:s},children:typeof t=="function"?t(s):t})})};ro.displayName="HeroUI.Checkbox";const Pc=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(rr);return h.jsx(Yb,{"data-slot":"checkbox-content",...n,className:Ee(e,r==null?void 0:r.content()),children:t})};Pc.displayName="HeroUI.Checkbox.Content";const kc=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(rr);return h.jsx(oe.span,{className:ie(r==null?void 0:r.control,e),"data-slot":"checkbox-control",...n,children:t})};kc.displayName="HeroUI.Checkbox.Control";const Tc=({children:t,className:e,...n})=>{const{slots:r,state:o}=a.useContext(rr),i=o==null?void 0:o.isSelected,l=o==null?void 0:o.isIndeterminate,s=typeof t=="function"?t(o??{}):t||(l?h.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--indeterminate",fill:"none",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeWidth:3,viewBox:"0 0 24 24",children:h.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}):h.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:i?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:h.jsx("polyline",{points:"1 9 7 14 15 4"})}));return h.jsx(oe.span,{"aria-hidden":"true",className:ie(r==null?void 0:r.indicator,e),"data-slot":"checkbox-indicator",...n,children:s})};Tc.displayName="HeroUI.Checkbox.Indicator";const gn=Object.assign(ro,{Root:ro,Content:Pc,Control:kc,Indicator:Tc}),Mc=a.createContext({}),dl=({children:t,className:e,color:n,size:r,variant:o,...i})=>{const l=a.useMemo(()=>rf({color:n,size:r,variant:o}),[n,r,o]),s=a.useMemo(()=>typeof t=="string"||typeof t=="number"?h.jsx(Rc,{children:t}):t,[t]);return h.jsx(Mc,{value:{slots:l},children:h.jsx(oe.span,{...i,className:ie(l.base,e),"data-slot":"chip",children:s})})},Rc=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(Mc);return h.jsx(oe.span,{className:ie(r==null?void 0:r.label,e),"data-slot":"chip-label",...n,children:t})},Bn=Object.assign(dl,{Root:dl,Label:Rc}),or=a.createContext({}),oo=({children:t,className:e,color:n,size:r,...o})=>{const i=a.useMemo(()=>af({color:n,size:r}),[n,r]);return h.jsx(Rf,{"data-slot":"progress-bar",...o,className:Ee(e,i.base()),children:l=>h.jsx(or,{value:{slots:i,state:l},children:typeof t=="function"?t(l):t})})};oo.displayName="HeroUI.ProgressBar";const Dc=({children:t,className:e,...n})=>{const{slots:r,state:o}=a.useContext(or);return h.jsx(oe.span,{className:ie(r==null?void 0:r.output,e),"data-slot":"progress-bar-output",...n,children:t??(o==null?void 0:o.valueText)})};Dc.displayName="HeroUI.ProgressBar.Output";const Nc=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(or);return h.jsx(oe.div,{className:ie(r==null?void 0:r.track,e),"data-slot":"progress-bar-track",...n,children:t})};Nc.displayName="HeroUI.ProgressBar.Track";const Ic=({className:t,style:e,...n})=>{const{slots:r,state:o}=a.useContext(or);return h.jsx(oe.div,{className:ie(r==null?void 0:r.fill,t),"data-slot":"progress-bar-fill",style:{...e,width:o!=null&&o.isIndeterminate?void 0:`${(o==null?void 0:o.percentage)??0}%`},...n})};Ic.displayName="HeroUI.ProgressBar.Fill";const yn=Object.assign(oo,{Root:oo,Output:Dc,Track:Nc,Fill:Ic}),fl=({className:t,orientation:e,variant:n,...r})=>{const o=Jt(ko),i=e??(o==null?void 0:o.orientation)??"horizontal";return h.jsx(xp,{"data-orientation":i,"data-slot":"separator",orientation:i,className:df({orientation:i,variant:n,className:t}),...r})},Zb=Object.assign(fl,{Root:fl}),tn=a.createContext({}),hl=({children:t,className:e,status:n,...r})=>{const o=a.useMemo(()=>ef({status:n}),[n]);return h.jsx(tn,{value:{slots:o,status:n},children:h.jsx(Xn,{value:{variant:"default"},children:h.jsx(oe.div,{className:o==null?void 0:o.base({className:e}),"data-slot":"alert-root",...r,children:t})})})},Jb=({children:t,className:e,...n})=>{const{slots:r,status:o}=a.useContext(tn),i=()=>{switch(o){case"accent":return h.jsx(Ci,{"data-slot":"alert-default-icon"});case"success":return h.jsx(oh,{"data-slot":"alert-default-icon"});case"warning":return h.jsx(nh,{"data-slot":"alert-default-icon"});case"danger":return h.jsx(rh,{"data-slot":"alert-default-icon"});default:return h.jsx(Ci,{"data-slot":"alert-default-icon"})}};return h.jsx(oe.div,{className:ie(r==null?void 0:r.indicator,e),"data-slot":"alert-indicator",...n,children:t??i()})},Qb=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(tn);return h.jsx(oe.div,{className:ie(r==null?void 0:r.content,e),"data-slot":"alert-content",...n,children:t})},em=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(tn);return h.jsx(oe.p,{className:ie(r==null?void 0:r.title,e),"data-slot":"alert-title",...n,children:t})},tm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(tn);return h.jsx(oe.span,{className:ie(r==null?void 0:r.description,e),"data-slot":"alert-description",...n,children:t})},Rt=Object.assign(hl,{Root:hl,Indicator:Jb,Content:Qb,Title:em,Description:tm}),No=a.createContext({}),nm=({children:t,className:e,variant:n,...r})=>{const o=a.useMemo(()=>cf({variant:n}),[n]);return h.jsx(lb,{className:Ee(e,o.item()),"data-slot":"menu-item",...r,children:i=>h.jsx(No,{value:{slots:o,state:i},children:typeof t=="function"?t(i):t})})},rm=({children:t,className:e,type:n="checkmark",...r})=>{const{slots:o,state:i}=a.useContext(No),l=i==null?void 0:i.isSelected,s=typeof t=="function"?t(i??{}):t||(n==="dot"?h.jsx("svg",{"aria-hidden":"true","data-slot":"menu-item-indicator--dot",fill:"currentColor",fillRule:"evenodd",role:"presentation",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{clipRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14",fillRule:"evenodd"})}):h.jsx("svg",{"aria-hidden":"true","data-slot":"menu-item-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:l?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:h.jsx("polyline",{points:"1 9 7 14 15 4"})}));return h.jsx(oe.span,{"aria-hidden":"true",className:ie(o==null?void 0:o.indicator,e),"data-slot":"menu-item-indicator","data-type":n,"data-visible":l||void 0,...r,children:s})},om=({children:t,className:e,...n})=>{const{slots:r,state:o}=a.useContext(No);if(!(o==null?void 0:o.hasSubmenu))return null;const s=t??h.jsx(Qf,{});return h.jsx(oe.span,{"aria-hidden":"true",className:ie(r==null?void 0:r.submenuIndicator,e),"data-slot":"submenu-indicator",...n,children:s})},im=({children:t,className:e,...n})=>{const r=a.useMemo(()=>uf({class:typeof e=="string"?e:void 0}),[e]);return h.jsx(ib,{className:r,...n,children:t})},ir=a.createContext({}),pl=({children:t,...e})=>{const n=a.useMemo(()=>lf(),[]);return h.jsx(ir,{value:{slots:n},children:h.jsx(eb,{...e,children:t})})},lm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(ir);return h.jsx(Co,{className:Ee(e,r==null?void 0:r.trigger()),"data-slot":"dropdown-trigger",...n,children:o=>h.jsx(h.Fragment,{children:typeof t=="function"?t(o):t})})},sm=({children:t,className:e,placement:n,...r})=>{const{slots:o}=a.useContext(ir);return h.jsx(Xn,{value:{variant:"default"},children:h.jsx(Hh,{...r,className:Ee(e,o==null?void 0:o.popover()),"data-slot":"dropdown-popover",placement:n,children:t})})};function am({className:t,...e}){const{slots:n}=a.useContext(ir);return h.jsx(nb,{className:Ee(t,n==null?void 0:n.menu()),"data-selection-mode":e.selectionMode,"data-slot":"dropdown-menu",...e})}const cm=t=>h.jsx(nm,{...t}),um=t=>h.jsx(om,{...t}),dm=({children:t,...e})=>h.jsx(tb,{"data-slot":"dropdown-submenu-trigger",...e,children:t}),fm=t=>h.jsx(rm,{...t}),hm=t=>h.jsx(im,{...t}),Dt=Object.assign(pl,{Root:pl,Trigger:lm,Popover:sm,Menu:am,Section:hm,Item:cm,ItemIndicator:fm,SubmenuIndicator:um,SubmenuTrigger:dm}),we=a.createContext({}),bl=({children:t,state:e,...n})=>{const r=a.useMemo(()=>({slots:vo(),placement:void 0}),[]),o=a.useMemo(()=>e?{isOpen:e.isOpen,onOpenChange:e.setOpen}:{},[e]);return h.jsx(we,{value:r,children:h.jsx(ab,{"data-slot":"modal-root",...Y(n,o),children:t})})},pm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(bb,{children:h.jsx(oe.div,{className:ie(r==null?void 0:r.trigger,e),"data-slot":"modal-trigger",role:"button",...n,children:t})})},bm=({children:t,className:e,isDismissable:n=!0,onClick:r,variant:o,...i})=>{const{slots:l}=a.useContext(we),s=a.useMemo(()=>vo({variant:o}),[o]),c=a.useMemo(()=>({slots:{...l,...s}}),[l,s]);return h.jsx(yc,{className:Ee(e,s==null?void 0:s.backdrop()),"data-slot":"modal-backdrop",isDismissable:n,onClick:u=>{u.stopPropagation(),r==null||r(u)},...i,children:u=>h.jsxs(we,{value:c,children:[typeof t=="function"?t(u):t," "]})})},mm=({children:t,className:e,placement:n="auto",scroll:r,size:o,...i})=>{const{slots:l}=a.useContext(we),s=a.useMemo(()=>vo({scroll:r,size:o}),[r,o]),c=a.useMemo(()=>({placement:n,slots:{...l,...s}}),[l,n,s]);return h.jsx(fb,{className:Ee(e,s==null?void 0:s.container()),"data-placement":n,"data-slot":"modal-container",...i,children:u=>h.jsx(we,{value:c,children:typeof t=="function"?t(u):t})})},gm=({children:t,className:e,...n})=>{const{placement:r,slots:o}=a.useContext(we);return h.jsx(Xn,{value:{variant:"default"},children:h.jsx(cb,{className:ie(o==null?void 0:o.dialog,e),"data-placement":r,"data-slot":"modal-dialog",...n,children:t})})},ym=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(oe.div,{className:ie(r==null?void 0:r.header,e),"data-slot":"modal-header",...n,children:t})},vm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(oe.div,{className:ie(r==null?void 0:r.body,e),"data-slot":"modal-body",...n,children:t})},xm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(oe.div,{className:ie(r==null?void 0:r.footer,e),"data-slot":"modal-footer",...n,children:t})},$m=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(Zf,{className:ie(r==null?void 0:r.heading,e),"data-slot":"modal-heading",slot:"title",...n,children:t})},wm=({children:t,className:e,...n})=>{const{slots:r}=a.useContext(we);return h.jsx(oe.div,{className:ie(r==null?void 0:r.icon,e),"data-slot":"modal-icon",...n,children:t})},Em=({className:t,...e})=>{const{slots:n}=a.useContext(we);return h.jsx(mb,{className:Ee(t,n==null?void 0:n.closeTrigger()),"data-slot":"modal-close-trigger",slot:"close",...e})},pt=Object.assign(bl,{Root:bl,Trigger:pm,Backdrop:bm,Container:mm,Dialog:gm,Header:ym,Icon:wm,Heading:$m,Body:vm,Footer:xm,CloseTrigger:Em}),Cm={easy:"GREEN",moderate:"ORANGE",difficult:"RED"},Sm={easy:"Easy",moderate:"Moderate",difficult:"Difficult"};function Pm(){return h.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[1em]",children:[h.jsx("path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),h.jsx("path",{d:"m13.4 10.6 3.6-3.6"}),h.jsx("path",{d:"M3.3 16a9 9 0 1 1 17.4 0"})]})}function Lc({difficulty:t,label:e,showIcon:n=!0,size:r="md",className:o}){const i=je[Cm[t]];return h.jsxs(Bn,{variant:"soft",size:r,className:q(o),style:{backgroundColor:ot(i,.15),color:i},children:[n&&h.jsx(Pm,{}),h.jsx(Bn.Label,{children:e??Sm[t]})]})}const ml=h.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01"}),gl=h.jsxs(h.Fragment,{children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"M12 16v-4M12 8h.01"})]}),km=h.jsxs(h.Fragment,{children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),Tm={note:gl,info:gl,tip:km,caution:ml,danger:ml};function Mm({type:t}){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5",children:Tm[t]})}function Rm({type:t="caution",title:e,icon:n,children:r,className:o}){const i=e===void 0?Sn[t]:e,l=kl(t);return h.jsxs(Rt,{className:q("border",o),style:{backgroundColor:ot(l,.1),borderColor:l},children:[h.jsx(Rt.Indicator,{style:{color:l},children:n??h.jsx(Mm,{type:t})}),h.jsxs(Rt.Content,{children:[i!=null&&h.jsx(Rt.Title,{children:i}),h.jsx(Rt.Description,{children:r})]})]})}const Kc="media-figure-point-marker absolute flex -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full font-semibold shadow ring-2 ring-background",Vn="media-figure-shape-outline";function Dm(t){return t.type==="circle"}function Nm(t){return t.type==="rectangle"}function Im(t,e){const n=t.id??e,r=t.color??"GREY",o=je[r];if(Dm(t))return h.jsx("div",{role:"img","aria-label":t.title,className:q("pointer-events-none absolute rounded-full",Vn),style:{left:`${t.x}%`,top:`${t.y}%`,width:`${t.radius*2}%`,aspectRatio:"1",transform:"translate(-50%, -50%)",borderColor:o,backgroundColor:ot(o,.1)}},n);if(Nm(t)){const i=Math.min(t.x1,t.x2),l=Math.min(t.y1,t.y2),s=Math.abs(t.x2-t.x1),c=Math.abs(t.y2-t.y1);return h.jsx("div",{role:"img","aria-label":t.title,className:q("pointer-events-none absolute",Vn),style:{left:`${i}%`,top:`${l}%`,width:`${s}%`,height:`${c}%`,borderColor:o,backgroundColor:ot(o,.1)}},n)}return h.jsx("span",{role:"img","aria-label":t.title,style:{left:`${t.x}%`,top:`${t.y}%`,backgroundColor:o,color:Un(o)},className:Kc,children:t.label},n)}function io({annotations:t}){return h.jsx(h.Fragment,{children:t.map(Im)})}const zn=4/3,Io=16;function ct(t){return Math.round(t*3/4)}const Mr=(t,e,n)=>Math.min(Math.max(t,e),n);function nn(t,e,n){const r=Math.min(e,Math.floor(n*zn)),o=Mr(Math.round(t.width),Math.min(Io,r),r),i=ct(o);return{width:o,x:Mr(Math.round(t.x),0,e-o),y:Mr(Math.round(t.y),0,n-i)}}function Ac(t,e){const r=t/e<=zn?t:Math.round(e*zn),o=ct(r);return nn({x:(t-r)/2,y:(e-o)/2,width:r},t,e)}function Lm(t,e,n){const{x:r,y:o,width:i}=t;if(i<=0||r<0||o<0)return!1;const l=ct(i);return r+i<=e&&o+l<=n}function Km(t,e,n,r,o){if(r<=0||o<=0||e<=0||n<=0||!Lm(t,e,n))return null;const i=r/t.width;return{position:"absolute",width:i*e,height:i*n,left:-t.x*i,top:-t.y*i,maxWidth:"none"}}function Am(t,e){t(),requestAnimationFrame(()=>{t(),requestAnimationFrame(t)});const n=[];for(let r=50;r<=e;r+=50)n.push(setTimeout(t,r));return()=>{for(const r of n)clearTimeout(r)}}function Oc(t={}){const{settleMs:e=0,observeParent:n=!1,remeasureWhenVisible:r=!1,layoutSettleKey:o}=t,i=a.useRef(null),[l,s]=a.useState(null),c=a.useCallback(()=>{const d=i.current;if(!d)return;const{width:f,height:b}=d.getBoundingClientRect();f<=0||b<=0||s(p=>(p==null?void 0:p.width)===f&&(p==null?void 0:p.height)===b?p:{width:f,height:b})},[]),u=a.useCallback(()=>{c(),requestAnimationFrame(()=>{c(),requestAnimationFrame(()=>{c(),setTimeout(c,0)})})},[c]);return a.useLayoutEffect(()=>{c();const d=i.current;if(!d)return;const f=new ResizeObserver(()=>c());f.observe(d),n&&d.parentElement&&f.observe(d.parentElement);const b=[];let p=d;for(let v=0;p&&v<6;v+=1)b.push(p),p=p.parentElement;const g=()=>u();for(const v of b)v.addEventListener("transitionend",g);return()=>{f.disconnect();for(const v of b)v.removeEventListener("transitionend",g)}},[c,u,n]),a.useEffect(()=>{if(!(e<=0))return Am(c,e)},[o,c,e]),a.useEffect(()=>{if(!r)return;const d=i.current;if(!d)return;const f=new IntersectionObserver(b=>{for(const p of b)p.isIntersecting&&p.intersectionRatio>=.99&&u()},{threshold:[0,.25,.5,.75,.99,1]});return f.observe(d),()=>f.disconnect()},[o,u,r]),a.useEffect(()=>{o!==void 0&&u()},[o,u]),{ref:i,size:l,measure:c,measureAfterLayout:u}}function Om(t){const e=t.split(/[?#]/)[0]??t,n=e.lastIndexOf("/"),r=e.lastIndexOf(".");return r<=n?null:e.slice(r+1).toLowerCase()||null}function Fm({src:t,modelFileName:e}){const n=a.useRef(null);return a.useEffect(()=>{const r=n.current;if(!r)return;let o=!1,i=null,l=null;return import("online-3d-viewer").then(s=>{if(o)return;const c=new s.EmbeddedViewer(r,{projectionMode:s.ProjectionMode.Orthographic,backgroundColor:new s.RGBAColor(219,234,254,255),defaultColor:new s.RGBColor(30,64,175),onModelLoaded:()=>{const d=c.GetViewer();d.SetNavigationMode(s.NavigationMode.FreeOrbit),d.SetUpVector(s.Direction.Z,!1);const f=d.GetBoundingSphere(()=>!0);d.FitSphereToWindow(f,!1)}});l=c,(t.startsWith("blob:")||Om(t)===null&&!!e)&&e?c.LoadModelFromInputFiles([new s.InputFile(e,s.FileSource.Url,t)]):c.LoadModelFromUrlList([t]),typeof ResizeObserver<"u"&&(i=new ResizeObserver(()=>{c.Resize()}),i.observe(r))}),()=>{o=!0,i==null||i.disconnect(),l==null||l.Destroy()}},[t,e]),h.jsx("div",{ref:n,className:"absolute inset-0 [&_canvas]:size-full!","aria-label":"Interactive 3D model",role:"img"})}const jm=400;function Lo({className:t,src:e,type:n="image",displayRegion:r,modelFileName:o,layoutSettleKey:i,remeasureWhenVisible:l=!1,children:s}){const c=!!r,{ref:u,size:d,measureAfterLayout:f}=Oc({settleMs:c?jm:0,observeParent:c,remeasureWhenVisible:c&&l,layoutSettleKey:i}),[b,p]=a.useState(null),g=r&&b&&d&&Km(r,b.width,b.height,d.width,d.height),v=!!g,y=!!(r&&b&&!g),w="size-full object-cover object-center",x=T=>{const M=T.currentTarget;M.naturalWidth>0&&M.naturalHeight>0&&(p({width:M.naturalWidth,height:M.naturalHeight}),f())},S=T=>{const M=T.currentTarget;M.videoWidth>0&&M.videoHeight>0&&(p({width:M.videoWidth,height:M.videoHeight}),f())};return a.useEffect(()=>{p(null)},[e]),n==="model"?h.jsxs("div",{ref:u,className:q("@container relative overflow-hidden",t),children:[h.jsx(Fm,{src:e,modelFileName:o}),s]}):h.jsxs("div",{ref:u,className:q("@container relative overflow-hidden",t),children:[n==="video"?h.jsx("video",{src:e,controls:!0,className:v?"absolute max-w-none":w,style:{...v&&g?g:void 0,opacity:y?0:1},onLoadedMetadata:r?S:void 0}):h.jsx("img",{src:e,alt:"",className:v?"absolute max-w-none":w,style:{...v&&g?g:void 0,opacity:y?0:1},onLoad:r?x:void 0}),s]})}function _m({className:t="absolute inset-0",...e}){return h.jsx(Lo,{className:t,...e})}const Bm=2,yl=3,Hn=(t,e,n)=>Math.min(Math.max(t,e),n),Fc=t=>t.type==="circle",rn=t=>t.type==="rectangle",vl=t=>rn(t)?[t.x1,t.x2]:[t.x],xl=t=>rn(t)?[t.y1,t.y2]:[t.y];function Vm(t,e,n){const r=Hn(e,-Math.min(...vl(t)),100-Math.max(...vl(t))),o=Hn(n,-Math.min(...xl(t)),100-Math.max(...xl(t)));return rn(t)?{...t,x1:t.x1+r,y1:t.y1+o,x2:t.x2+r,y2:t.y2+o}:{...t,x:t.x+r,y:t.y+o}}function $l(t,e,n){return Math.hypot(e.x-t.x,(e.y-t.y)/n)}function jc(t){return{...t,x1:Math.min(t.x1,t.x2),y1:Math.min(t.y1,t.y2),x2:Math.max(t.x1,t.x2),y2:Math.max(t.y1,t.y2)}}function zm(t,e,n){return t==="circle"?{type:"circle",x:e.x,y:e.y,radius:0,color:n}:t==="rectangle"?{type:"rectangle",x1:e.x,y1:e.y,x2:e.x,y2:e.y,color:n}:{type:"point",x:e.x,y:e.y,color:n}}function Hm(t){return t==="circle"?"create-circle":t==="rectangle"?"create-rectangle":"create-point"}function Um(t,e,n){switch(t.mode){case"create-point":return{...t.base,x:e.x,y:e.y};case"move":return Vm(t.base,e.x-t.start.x,e.y-t.start.y);case"create-circle":return{...t.base,radius:$l(t.start,e,n)};case"resize-circle":{const r=t.base;return{...r,radius:$l({x:r.x,y:r.y},e,n)}}case"create-rectangle":return{...t.base,x2:e.x,y2:e.y};case"resize-rect":{const r=t.base,o=t.corner==="nw"||t.corner==="sw",i=t.corner==="nw"||t.corner==="ne";return{...r,x1:o?e.x:r.x1,x2:o?r.x2:e.x,y1:i?e.y:r.y1,y2:i?r.y2:e.y}}}}function wl(t){if(Fc(t))return{...t,radius:Math.max(t.radius,Bm)};if(rn(t)){const e=jc(t);return{...e,x2:Math.max(e.x2,e.x1+yl),y2:Math.max(e.y2,e.y1+yl)}}return t}function El({x:t,y:e,cursor:n,onPointerDown:r}){return h.jsx("span",{onPointerDown:r,className:"annotation-handle pointer-events-auto absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-accent shadow",style:{left:`${t}%`,top:`${e}%`,cursor:n}})}function Gm({annotations:t,editing:e}){const{tool:n,color:r,selectedId:o,onSelect:i,onAdd:l,onChange:s,onRemove:c}=e,u=a.useRef(null),d=a.useRef(!1),[f,b]=a.useState(null),[p,g]=a.useState(null),v=n==="select",y=k=>{const A=u.current.getBoundingClientRect();return{x:Hn((k.clientX-A.left)/A.width*100,0,100),y:Hn((k.clientY-A.top)/A.height*100,0,100)}},w=(k,A)=>{var V;(V=u.current)==null||V.setPointerCapture(k.pointerId),d.current=!1,b(A),g(wl(A.base))},x=k=>{if(v){i==null||i(null);return}const A=y(k);w(k,{mode:Hm(n),id:null,start:A,base:zm(n,A,r)})},S=k=>{if(!f)return;const A=u.current.getBoundingClientRect();d.current=!0,g(wl(Um(f,y(k),A.width/A.height)))},T=k=>{var A;f&&p&&((A=u.current)==null||A.releasePointerCapture(k.pointerId),f.id===null?l==null||l(p):d.current&&(s==null||s(f.id,p))),b(null),g(null)},M=(k,A,V)=>{var j;k.stopPropagation(),(j=u.current)==null||j.focus(),i==null||i(A),w(k,{mode:"move",id:A,start:y(k),base:V})},L=(k,A,V)=>{k.stopPropagation(),w(k,{mode:"resize-circle",id:A,start:y(k),base:V})},R=(k,A,V,j)=>{k.stopPropagation(),w(k,{mode:"resize-rect",id:A,start:y(k),base:jc(V),corner:j})},N=k=>{(k.key==="Delete"||k.key==="Backspace")&&o!=null&&(k.preventDefault(),c==null||c(o))},O=(k,A,V)=>{const j=V&&A===o,m=je[k.color??"GREY"],E=V?"pointer-events-auto cursor-move":"pointer-events-none",I=V?C=>M(C,A,k):void 0;if(Fc(k))return h.jsxs("div",{children:[h.jsx("div",{role:"img","aria-label":k.title,onPointerDown:I,className:q("absolute rounded-full",Vn,E,j&&"outline outline-2 outline-offset-2 outline-accent"),style:{left:`${k.x}%`,top:`${k.y}%`,width:`${k.radius*2}%`,aspectRatio:"1",transform:"translate(-50%, -50%)",borderColor:m,backgroundColor:ot(m,.1)}}),j&&h.jsx(El,{x:k.x+k.radius,y:k.y,cursor:"ew-resize",onPointerDown:C=>L(C,A,k)})]},A);if(rn(k)){const C=Math.min(k.x1,k.x2),D=Math.min(k.y1,k.y2),$=Math.abs(k.x2-k.x1),P=Math.abs(k.y2-k.y1),K=[{corner:"nw",x:C,y:D,cursor:"nwse-resize"},{corner:"ne",x:C+$,y:D,cursor:"nesw-resize"},{corner:"sw",x:C,y:D+P,cursor:"nesw-resize"},{corner:"se",x:C+$,y:D+P,cursor:"nwse-resize"}];return h.jsxs("div",{children:[h.jsx("div",{role:"img","aria-label":k.title,onPointerDown:I,className:q("absolute",Vn,E,j&&"outline outline-2 outline-offset-2 outline-accent"),style:{left:`${C}%`,top:`${D}%`,width:`${$}%`,height:`${P}%`,borderColor:m,backgroundColor:ot(m,.1)}}),j&&K.map(({corner:U,x:G,y:W,cursor:ee})=>h.jsx(El,{x:G,y:W,cursor:ee,onPointerDown:le=>R(le,A,k,U)},U))]},A)}return h.jsx("span",{role:"img","aria-label":k.title,onPointerDown:I,style:{left:`${k.x}%`,top:`${k.y}%`,backgroundColor:m,color:Un(m)},className:q(Kc,E,j&&"outline outline-2 outline-offset-2 outline-accent"),children:k.label},A)};return h.jsxs("div",{ref:u,tabIndex:0,role:"application","aria-label":"Annotation editor",onPointerDown:x,onPointerMove:S,onPointerUp:T,onKeyDown:N,className:q("absolute inset-0 focus:outline-none",v?"cursor-default":"cursor-crosshair"),children:[t.map((k,A)=>{const V=k.id??String(A),j=(f==null?void 0:f.id)===V&&p?p:k;return O(j,V,v)}),(f==null?void 0:f.id)===null&&p&&O(p,"__draft__",!1)]})}function lr({src:t,type:e="image",modelFileName:n,annotations:r=[],displayRegion:o,zoomable:i=!0,annotationEditing:l,layoutSettleKey:s,className:c}){const u="@container relative aspect-[4/3] overflow-hidden rounded-lg border border-default bg-default-soft",d=h.jsxs(h.Fragment,{children:[h.jsx(_m,{src:t,type:e,displayRegion:o,modelFileName:n,layoutSettleKey:s}),l?h.jsx(Gm,{annotations:r,editing:l}):h.jsx(io,{annotations:r})]});return h.jsx("figure",{className:q("flex flex-col gap-2",c),children:i&&e==="image"&&!l?h.jsxs(pt,{children:[h.jsx(pt.Trigger,{"aria-label":"View image full size",className:q(u,"cursor-zoom-in"),children:d}),h.jsx(pt.Backdrop,{variant:"blur",children:h.jsx(pt.Container,{placement:"center",children:h.jsxs(pt.Dialog,{"aria-label":"Full size image",className:"w-auto max-w-[95vw] overflow-hidden bg-transparent p-0 shadow-none",children:[h.jsx(Lo,{className:"aspect-[4/3] max-h-[88vh] w-[min(95vw,calc(88vh*4/3))] rounded-lg border border-default bg-default-soft",src:t,type:"image",displayRegion:o,remeasureWhenVisible:!0,children:h.jsx(io,{annotations:r})}),h.jsx(pt.CloseTrigger,{})]})})})]}):h.jsx("div",{className:u,children:d})})}const Ko=Symbol.for("@openpawlabs/diy-guides-ui/MediaFigure");lr[Ko]=!0;function Wm(){return h.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:"size-2/3",children:h.jsx("path",{d:"M8 5v14l11-7z"})})}const qm={model:{hex:je.BLUE,content:h.jsx("span",{className:"text-lg font-bold",children:"3D"})},video:{hex:je.MAGENTA,content:h.jsx(Wm,{})}};function _c({src:t,type:e="image",annotations:n=[],displayRegion:r,className:o}){if(e==="image")return h.jsx(Lo,{className:q("aspect-[4/3]",o),src:t,type:"image",displayRegion:r,children:h.jsx(io,{annotations:n})});const{hex:i,content:l}=qm[e];return h.jsx("div",{"aria-hidden":"true",className:q("flex aspect-[4/3] items-center justify-center",o),style:{backgroundColor:i,color:Un(i)},children:l})}const Ym=[{corner:"nw",cursor:"nwse-resize"},{corner:"ne",cursor:"nesw-resize"},{corner:"sw",cursor:"nesw-resize"},{corner:"se",cursor:"nwse-resize"}],Xm=(t,e,n)=>Math.min(Math.max(t,e),n);function Zm(t,e,n,r,o){return nn({x:t.x+e,y:t.y+n,width:t.width},r,o)}function Jm(t,e,n,r,o){const i=e==="nw"||e==="sw",l=e==="nw"||e==="ne",s=i?t.x+t.width:t.x,c=l?t.y+ct(t.width):t.y,u=i?s:r-s,d=l?c:o-c,f=Math.min(u,d*(4/3)),b=Xm(Math.abs(n.x-s),Io,f),p=ct(b);return nn({x:i?s-b:s,y:l?c-p:c,width:b},r,o)}function Qm({src:t,region:e,onChange:n,className:r}){const o=a.useRef(null),[i,l]=a.useState(null),[s,c]=a.useState(null),[u,d]=a.useState(null),f=x=>{const S=x.currentTarget;S.naturalWidth>0&&S.naturalHeight>0&&l({width:S.naturalWidth,height:S.naturalHeight})},b=u??(i?e?nn(e,i.width,i.height):Ac(i.width,i.height):null),p=x=>{const S=o.current.getBoundingClientRect();return{x:(x.clientX-S.left)/S.width*i.width,y:(x.clientY-S.top)/S.height*i.height}},g=(x,S)=>{var T;x.stopPropagation(),(T=o.current)==null||T.setPointerCapture(x.pointerId),c(S),d(S.base)},v=x=>{if(!s||!i)return;const S=p(x),T=s.mode==="move"?Zm(s.base,S.x-s.start.x,S.y-s.start.y,i.width,i.height):Jm(s.base,s.corner,S,i.width,i.height);d(T)},y=x=>{var S;s&&u&&((S=o.current)==null||S.releasePointerCapture(x.pointerId),n(u)),c(null),d(null)},w=b&&i?{left:b.x/i.width*100,top:b.y/i.height*100,width:b.width/i.width*100,height:ct(b.width)/i.height*100}:null;return h.jsxs("div",{ref:o,role:"application","aria-label":"Crop editor",className:q("relative inline-block touch-none select-none overflow-hidden leading-none",r),style:i?{"--crop-aspect":i.width/i.height}:void 0,onPointerMove:v,onPointerUp:y,children:[h.jsx("img",{src:t,alt:"",draggable:!1,onLoad:f,className:"block h-auto w-full select-none"}),w&&h.jsx("div",{className:"crop-region absolute cursor-move border-2 border-background",style:{left:`${w.left}%`,top:`${w.top}%`,width:`${w.width}%`,height:`${w.height}%`,boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.5)"},onPointerDown:x=>g(x,{mode:"move",start:p(x),base:b}),children:Ym.map(({corner:x,cursor:S})=>h.jsx("span",{className:"crop-handle pointer-events-auto absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-accent shadow",style:{left:x==="nw"||x==="sw"?"0%":"100%",top:x==="nw"||x==="ne"?"0%":"100%",cursor:S},onPointerDown:T=>g(T,{mode:"resize",corner:x,start:p(T),base:b})},x))})]})}function eg({name:t,thumbnail:e,href:n,quantity:r,price:o,children:i,className:l}){return h.jsxs("li",{className:q("flex items-center gap-3 py-3 first:pt-0 last:pb-0",l),children:[e&&h.jsx("img",{src:e,alt:"",className:"size-12 shrink-0 rounded-md border border-default object-cover"}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[n?h.jsx(Do,{href:n,className:"font-medium",children:t}):h.jsx("span",{className:"font-medium",children:t}),i!=null&&h.jsx("span",{className:"text-sm text-default-500",children:i})]}),r!=null&&h.jsxs("span",{className:"shrink-0 text-sm text-default-500",children:["×",r]}),o!=null&&h.jsx("span",{className:"shrink-0 text-sm font-medium",children:o})]})}function tg({title:t="What you need",children:e,className:n}){return h.jsxs(Ot,{className:q("w-full",n),children:[t!=null&&h.jsx(Ot.Header,{children:h.jsx(Ot.Title,{children:t})}),h.jsx(Ot.Content,{children:h.jsx("ul",{className:"flex flex-col divide-y divide-default",children:e})})]})}const ng=Object.assign(tg,{Item:eg});function Bc(t){return null}function rg(t){return a.isValidElement(t)&&t.type===Bc}function Vc(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"mr-1 size-4 shrink-0",children:h.jsx("path",{d:"m6 9 6 6 6-6"})})}function Cl(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})})}function og(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})}function ig(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:h.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}function lg(){return h.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",className:"size-4",children:[h.jsx("circle",{cx:"9",cy:"6",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"6",r:"1.4"}),h.jsx("circle",{cx:"9",cy:"12",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"12",r:"1.4"}),h.jsx("circle",{cx:"9",cy:"18",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"18",r:"1.4"})]})}function sg(t){var r;if(!t||t==="#"||t.startsWith("blob:"))return;const n=(((r=t.replaceAll("\\","/").split("?")[0])==null?void 0:r.split("#")[0])??"").split("/").pop();if(!(!n||n==="."||n===".."))try{return decodeURIComponent(n)}catch{return n}}function ag(t,e){return e===void 0||e===!1?e:typeof e=="string"?e||void 0:sg(t)??!0}function lo(t){const{href:e,download:n,external:r}=t.props;return{href:e,download:ag(e,n),...r?{target:"_blank",rel:"noreferrer noopener"}:{}}}function cg(t,e,n,r){return q(qe({variant:t,size:e,fullWidth:!0}),"!min-h-0 !justify-center !rounded-none",n&&"!rounded-b-3xl",r&&"border-b border-separator","hover:!bg-[var(--button-bg-hover)] data-[hovered=true]:!bg-[var(--button-bg-hover)]")}function so(){return h.jsx("span",{"aria-hidden":"true",className:yo({orientation:"horizontal"}).separator()})}function ug({variant:t="primary",size:e="md",icon:n,menuLabel:r="More download options",editing:o,children:i,className:l}){const s=a.Children.toArray(i).filter(rg);if(o)return h.jsx(fg,{items:s,variant:t,size:e,icon:n,menuLabel:r,editing:o,className:l});if(s.length===0)return null;const[c,...u]=s;if(u.length===0){const d=qe({variant:"primary",size:e});return h.jsxs(Do,{...lo(c),className:q(d,l),children:[n,c.props.children]})}return h.jsx(dg,{items:s,variant:t,size:e,icon:n,menuLabel:r,className:l})}function dg({items:t,variant:e,size:n,icon:r,menuLabel:o,className:i}){const l=a.useRef(null),[s,c]=a.useState(),[u]=t,d=qe({variant:e,size:n});return a.useLayoutEffect(()=>{const f=l.current;if(!f)return;const b=()=>c(f.offsetWidth);b();const p=new ResizeObserver(b);return p.observe(f),()=>p.disconnect()},[t,e,n]),h.jsxs("div",{ref:l,className:q(yo({orientation:"horizontal"}).base(),i),children:[h.jsxs(Do,{...lo(u),className:d,children:[r,u.props.children]}),h.jsxs(Dt,{children:[h.jsxs(Dt.Trigger,{"aria-label":o,className:q(qe({variant:e,size:n,isIconOnly:!0}),"!inline-flex items-center justify-center"),children:[h.jsx(so,{}),h.jsx(Vc,{})]}),h.jsx(Dt.Popover,{placement:"bottom",offset:0,triggerRef:l,className:"!max-w-none !p-0",style:s?{minWidth:s}:void 0,children:h.jsx(Dt.Menu,{className:"!gap-0 !p-0",children:t.map((f,b)=>h.jsxs(Dt.Item,{...lo(f),className:cg("secondary",n,b===t.length-1,b<t.length-1),children:[b===0?r:null,f.props.children]},b))})})]})]})}function fg({items:t,variant:e,size:n,icon:r,menuLabel:o,editing:i,className:l}){const[s,c]=a.useState(!1),[u,d]=a.useState(null),[f,b]=a.useState(null),{onAddItem:p,onRemoveItem:g,onReorderItem:v,onSelectItem:y}=i,w=t[0],x=t.slice(1),S=qe({variant:e,size:n}),T=v!=null,M=()=>{d(null),b(null)},L=R=>{u!=null&&u!==R&&(v==null||v(u,R)),M()};return h.jsxs("div",{className:q("relative inline-flex flex-col items-start",l),children:[h.jsxs("div",{className:yo({orientation:"horizontal"}).base(),children:[h.jsxs("span",{className:q(S,"cursor-text"),children:[r,w?w.props.children:h.jsx("span",{className:"opacity-60",children:"Add a link"})]}),w&&y&&h.jsxs("button",{type:"button",onClick:()=>y(0),"aria-label":"Edit primary link",className:qe({variant:e,size:n,isIconOnly:!0}),children:[h.jsx(so,{}),h.jsx(Cl,{})]}),h.jsxs("button",{type:"button",onClick:()=>c(R=>!R),"aria-label":o,"aria-expanded":s,className:qe({variant:e,size:n,isIconOnly:!0}),children:[!(w&&y)&&h.jsx(so,{}),h.jsx(Vc,{})]})]}),s&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1),"aria-hidden":"true"}),h.jsxs("div",{className:"absolute left-0 top-full z-50 mt-2 w-64 rounded-lg border border-default-200 bg-background p-2 shadow-lg",children:[x.length>0?h.jsx("ul",{className:"flex flex-col gap-0.5",children:x.map((R,N)=>{const O=N+1;return h.jsxs("li",{draggable:T||void 0,onDragStart:T?()=>d(O):void 0,onDragOver:T?k=>{k.preventDefault(),b(O)}:void 0,onDrop:T?k=>{k.preventDefault(),L(O)}:void 0,onDragEnd:T?M:void 0,className:q("flex items-center gap-1.5 rounded-md px-1.5 py-1 transition",T&&"cursor-grab",u===O&&"opacity-40",f===O&&u!==O&&"ring-2 ring-accent"),children:[T&&h.jsx("span",{className:"shrink-0 text-default-400",children:h.jsx(lg,{})}),h.jsx("span",{className:"min-w-0 flex-1 text-sm",children:R.props.children}),v&&h.jsx("button",{type:"button",onClick:()=>v(O,0),"aria-label":"Make default download",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:h.jsx(og,{})}),y&&h.jsx("button",{type:"button",onClick:()=>y(O),"aria-label":"Edit link",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:h.jsx(Cl,{})}),g&&h.jsx("button",{type:"button",onClick:()=>g(O),"aria-label":"Remove option",className:"shrink-0 rounded p-0.5 text-default-500 transition hover:text-danger focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:h.jsx(ig,{})})]},O)})}):h.jsx("p",{className:"px-1.5 py-1 text-sm text-default-500",children:"No other options yet."}),p&&h.jsx("button",{type:"button",onClick:p,className:"mt-1 w-full rounded-md px-1.5 py-1 text-left text-sm font-medium text-accent transition hover:bg-default-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:"+ Add option"})]})]})]})}const hg=Object.assign(ug,{Item:Bc});function pg(t,e,n){const[r,o]=a.useState(e),i=t!==void 0,l=i?t:r,s=a.useCallback(c=>{i||o(c),n==null||n(c)},[i,n]);return[l,s]}const zc=3,bg="#3ABF84",mg="#34B07A",gg="#0B7A47",yg={caution:Sn.caution,reminder:"Reminder",note:Sn.note};function vg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 shrink-0 text-danger",children:h.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01"})})}function xg(){return h.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 shrink-0 text-default-500",children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"M12 16v-4M12 8h.01"})]})}function $g(){return h.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex size-6 shrink-0 items-center justify-center rounded bg-default-100",children:h.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"size-3.5 text-default-500",children:h.jsx("path",{d:"M16 12V4h1V3H7v1h1v8l-2 2v1h5.2c-.2.6-.3 1.2-.3 1.8 0 2.2 1.8 4 4 4s4-1.8 4-4c0-.6-.1-1.2-.3-1.8H18v-1l-2-2z"})})})}function wg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-7",children:h.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"})})}function Hc(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3",children:h.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})}function Eg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"M12 20h9M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})})}function Cg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"M6 2v14a2 2 0 0 0 2 2h14M2 6h14a2 2 0 0 1 2 2v14"})})}function Sg(){return h.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"currentColor",className:"size-3.5",children:[h.jsx("circle",{cx:"9",cy:"6",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"6",r:"1.4"}),h.jsx("circle",{cx:"9",cy:"12",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"12",r:"1.4"}),h.jsx("circle",{cx:"9",cy:"18",r:"1.4"}),h.jsx("circle",{cx:"15",cy:"18",r:"1.4"})]})}function Pg(t){return a.isValidElement(t)?t.type===lr?!0:typeof t.type=="function"&&t.type[Ko]===!0:!1}function Sl(t,e){return t.type===lr?h.jsx(_c,{src:t.props.src,type:t.props.type,annotations:t.props.annotations,displayRegion:t.props.displayRegion,className:e}):a.cloneElement(t,{thumbnailPreview:!0,className:e})}function Uc(t){return a.isValidElement(t)&&t.type===qc}function kg(t){return a.isValidElement(t)?a.Children.toArray(t.props.children).filter(Uc).length:0}function Tg(t,e=!1){let n=null,r=null;for(const i of a.Children.toArray(t))a.isValidElement(i)&&(i.type===Gc&&(n=i.props.children),i.type===Wc&&(r=i));const o=a.Children.toArray(n).filter(Pg);return kg(r),{figures:o.slice(0,zc),bullets:r}}function Gc(t){return null}function Wc({children:t,className:e,editing:n}){const[r,o]=a.useState(null),[i,l]=a.useState(null);if(!n)return h.jsx("ul",{className:q("flex flex-col gap-2",e),children:t});const{onAddBullet:s,onRemoveBullet:c,onReorderBullet:u}=n,d=a.Children.toArray(t).filter(Uc),f=u!=null&&d.length>1,b=c!=null&&d.length>1,p=()=>{o(null),l(null)},g=v=>{r!=null&&r!==v&&(u==null||u(r,v)),p()};return h.jsxs("ul",{className:q("flex flex-col gap-2",e),children:[d.map((v,y)=>a.cloneElement(v,{key:v.key??y,__edit:{canReorder:f,isDragging:r===y,isOver:i===y&&r!==y,onRemove:b?()=>c==null?void 0:c(y):void 0,onDragStart:()=>o(y),onDragOver:()=>l(y),onDrop:()=>g(y),onDragEnd:p}})),s&&h.jsx("li",{className:"list-none",children:h.jsx("button",{type:"button",onClick:s,className:"rounded-md px-1 py-0.5 text-sm font-medium text-default-500 transition hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:"+ New bullet"})})]})}function qc(t){const{variant:e="dot",color:n="GREY",label:r,hideLabel:o=!1,onMarkerPress:i,markerAriaLabel:l,children:s,className:c}=t,u=t.__edit,[d,f]=a.useState(!1);let b=null,p;if(e==="dot")b=i?h.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"mt-1.5 size-2 shrink-0 cursor-pointer rounded-full outline-none transition hover:ring-2 hover:ring-accent focus-visible:ring-2 focus-visible:ring-accent",style:{backgroundColor:je[n]}}):h.jsx("span",{"aria-hidden":"true",className:"mt-1.5 size-2 shrink-0 rounded-full",style:{backgroundColor:je[n]}}),p=h.jsx("span",{className:"flex-1",children:s});else if(e==="button")b=i?h.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"size-2 shrink-0 cursor-pointer rounded-full bg-default-300 outline-none transition hover:ring-2 hover:ring-accent focus-visible:ring-2 focus-visible:ring-accent"}):null,p=h.jsx("div",{className:"min-w-0 flex-1",children:s});else{const S=r??yg[e],T=e==="caution"?h.jsx(vg,{}):e==="reminder"?h.jsx($g,{}):h.jsx(xg,{});b=i?h.jsx("button",{type:"button",onClick:i,"aria-label":l??"Change bullet style",className:"shrink-0 cursor-pointer rounded outline-none transition hover:opacity-70 focus-visible:ring-2 focus-visible:ring-accent",children:T}):T,p=h.jsxs("span",{className:"flex-1",children:[!o&&h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"font-semibold",children:[S,":"]})," "]}),s]})}const g=q("flex gap-2.5",e==="button"&&"items-center",e==="caution"&&"text-danger",c);if(!u)return h.jsxs("li",{className:g,children:[b,p]});const{canReorder:v,isDragging:y,isOver:w,onRemove:x}=u;return h.jsxs("li",{className:q("group rounded-md",g,y&&"opacity-40",w&&"ring-2 ring-accent"),draggable:v&&d?!0:void 0,onDragStart:v?S=>{S.dataTransfer.effectAllowed="move",u.onDragStart()}:void 0,onDragOver:v?S=>{S.preventDefault(),S.dataTransfer.dropEffect="move",u.onDragOver()}:void 0,onDrop:v?S=>{S.preventDefault(),u.onDrop()}:void 0,onDragEnd:v?()=>{f(!1),u.onDragEnd()}:void 0,children:[v&&h.jsx("span",{"aria-hidden":"true",onPointerDown:()=>f(!0),onPointerUp:()=>f(!1),className:"mt-1 shrink-0 cursor-grab text-default-400 transition hover:text-default-500",children:h.jsx(Sg,{})}),b,p,x&&h.jsx("button",{type:"button",onClick:x,"aria-label":"Remove bullet",className:"mt-1 shrink-0 rounded p-0.5 text-default-400 opacity-0 transition hover:text-danger focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent group-hover:opacity-100",children:h.jsx(Hc,{})})]})}function Mg(){return h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:h.jsx("path",{d:"m5 12 5 5 9-11"})})}function Rg({figures:t,bullets:e,mediaEditing:n}){const r=n!=null,[o,i]=a.useState(0),[l,s]=a.useState(null),[c,u]=a.useState(null),d=(n==null?void 0:n.activeIndex)??o,f=t[d]??t[0],p=((f==null?void 0:f.props.type)??"image")==="image",g=M=>{var L;i(M),(L=n==null?void 0:n.onSelectImage)==null||L.call(n,M)},v=r&&(n==null?void 0:n.onReorderImage)!=null&&t.length>1,y=()=>{s(null),u(null)},w=M=>{var L;l!=null&&l!==M&&((L=n==null?void 0:n.onReorderImage)==null||L.call(n,l,M)),y()},x=r&&((n==null?void 0:n.canAddImage)??!0)&&t.length>=1&&t.length<zc,S=r?t.length>=1:t.length>1,T="aspect-[4/3] w-28 sm:w-26 lg:w-30";return h.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:[h.jsx("div",{className:"min-w-0",children:f?r?h.jsxs("div",{className:"group relative",children:[a.cloneElement(f,{className:q("w-full",f.props.className),zoomable:!1}),h.jsxs("div",{className:"absolute inset-0 flex items-center justify-center gap-2 rounded-lg opacity-0 transition group-hover:bg-foreground/40 group-hover:opacity-100 focus-within:bg-foreground/40 focus-within:opacity-100",children:[p&&h.jsxs("button",{type:"button",onClick:()=>{var M;return(M=n==null?void 0:n.onEditAnnotations)==null?void 0:M.call(n,d)},className:"flex items-center gap-1.5 rounded-md bg-background/90 px-2.5 py-1.5 text-sm font-semibold text-foreground shadow transition hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[h.jsx(Eg,{}),"Edit annotations"]}),p&&(n==null?void 0:n.onEditCrop)&&h.jsxs("button",{type:"button",onClick:()=>{var M;return(M=n==null?void 0:n.onEditCrop)==null?void 0:M.call(n,d)},className:"flex items-center gap-1.5 rounded-md bg-background/90 px-2.5 py-1.5 text-sm font-semibold text-foreground shadow transition hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[h.jsx(Cg,{}),"Adjust crop"]})]})]}):a.cloneElement(f,{className:q("w-full",f.props.className)}):r&&h.jsxs("button",{type:"button",onClick:()=>{var M;return(M=n==null?void 0:n.onAddImage)==null?void 0:M.call(n)},className:"flex aspect-[4/3] w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-default bg-default-soft text-default-500 transition hover:border-accent hover:text-accent focus-visible:border-accent focus-visible:text-accent focus-visible:outline-none",children:[h.jsx(wg,{}),h.jsx("span",{className:"text-sm font-medium",children:"Add image"})]})}),h.jsxs("div",{className:"flex min-w-0 flex-col gap-4",children:[(S||x)&&h.jsxs("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Step images",children:[t.map((M,L)=>r?h.jsxs("div",{className:q("relative rounded-md transition-shadow",v&&"cursor-grab",l===L&&"opacity-40",c===L&&l!==L&&"ring-2 ring-accent ring-offset-2 ring-offset-background"),draggable:v||void 0,onDragStart:v?R=>{R.dataTransfer.effectAllowed="move",s(L)}:void 0,onDragOver:v?R=>{R.preventDefault(),R.dataTransfer.dropEffect="move",u(L)}:void 0,onDrop:v?R=>{R.preventDefault(),w(L)}:void 0,onDragEnd:v?y:void 0,children:[h.jsx("button",{type:"button",className:q("block overflow-hidden rounded-md border-2 transition-[box-shadow,opacity,border-color]",L===d?"border-accent shadow-md":"border-default opacity-80 hover:opacity-100"),onClick:()=>g(L),"aria-label":`Image ${L+1}`,"aria-pressed":L===d,children:Sl(M,T)}),h.jsx("button",{type:"button",onClick:()=>{var R;return(R=n==null?void 0:n.onRemoveImage)==null?void 0:R.call(n,L)},"aria-label":`Remove image ${L+1}`,className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-foreground text-background shadow transition hover:bg-danger focus-visible:bg-danger focus-visible:outline-none",children:h.jsx(Hc,{})})]},M.key??M.props.src??L):h.jsx("button",{type:"button",className:q("overflow-hidden rounded-md border-2 transition-[box-shadow,opacity,border-color]",L===d?"border-accent shadow-md":"border-default opacity-80 hover:opacity-100"),onMouseEnter:()=>g(L),onFocus:()=>g(L),"aria-label":`Image ${L+1}`,"aria-pressed":L===d,children:Sl(M,T)},M.key??M.props.src??L)),x&&h.jsx("button",{type:"button",onClick:()=>{var M;return(M=n==null?void 0:n.onAddImage)==null?void 0:M.call(n)},"aria-label":"Add image",className:q(T,"flex items-center justify-center rounded-md border-2 border-dashed border-default text-default-500 transition hover:border-accent hover:text-accent focus-visible:border-accent focus-visible:text-accent focus-visible:outline-none"),children:h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-6",children:h.jsx("path",{d:"M12 5v14M5 12h14"})})})]}),e]})]})}const Dg=a.forwardRef(function({number:e,title:n,isCompleted:r,defaultCompleted:o=!1,onCompletedChange:i,completable:l=!0,mediaEditing:s,children:c,id:u,scrollMarginTop:d,className:f},b){const[p,g]=pg(r,o,i),v=a.useId(),{figures:y,bullets:w}=Tg(c,s!=null),x=d!=null?{scrollMarginTop:d}:void 0;return h.jsxs("section",{ref:b,id:u,"aria-labelledby":n!=null?v:void 0,"data-step-number":e??void 0,"data-completed":p||void 0,style:x,className:q("flex flex-col gap-4 transition-opacity",d==null&&"scroll-mt-4",p&&"opacity-60",f),children:[h.jsxs("header",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3 sm:flex-1",children:[e!=null&&h.jsx("span",{className:q("flex size-8 shrink-0 items-center justify-center rounded-md text-sm font-bold tabular-nums",p?"bg-success text-success-foreground":"bg-foreground text-background"),children:p?h.jsx(Mg,{}):e}),n!=null&&h.jsx("h3",{id:v,className:"min-w-0 flex-1 text-lg font-semibold leading-tight",children:n})]}),l&&h.jsx(Rb,{variant:p?"primary":"secondary",size:"lg",onPress:()=>g(!p),"aria-pressed":p,className:q("ml-auto shrink-0",p&&"guide-step-complete-button"),style:p?{"--guide-step-complete-bg":bg,"--guide-step-complete-bg-hover":mg,"--guide-step-complete-checkbox":gg}:void 0,children:h.jsx(gn,{isSelected:p,isReadOnly:!0,"aria-hidden":!0,className:"pointer-events-none gap-2 text-inherit",children:h.jsxs(gn.Content,{className:"flex items-center gap-2 whitespace-nowrap",children:[h.jsx(gn.Control,{children:h.jsx(gn.Indicator,{})}),"Mark complete"]})})})]}),h.jsx(Rg,{figures:y,bullets:w,mediaEditing:s})]})}),Ng=Object.assign(Dg,{Media:Gc,Bullets:Wc,Bullet:qc}),Ao=a.createContext(0);function Yc(){return a.useContext(Ao)}const Ig=16,Lg=8;function Xc({siteScrollMarginTop:t=0,progressBarHeight:e=0,includeProgressBar:n=!1,additionalScrollMarginTop:r=0}){const o=n?e+Lg:0;return Ig+t+o+r}function Kg(t,e=window.innerHeight){if(t.height<=0)return 0;const n=Math.max(t.top,0),r=Math.min(t.bottom,e);return Math.max(0,r-n)/t.height}function Ag(t,e,n,r=window.innerHeight){const o=t.flatMap(s=>{const c=n(s);return c==null?[]:[{step:s,visibleRatio:Kg(c,r)}]});if(o.length===0)return null;const i=o.filter(s=>s.visibleRatio>=e);if(i.length>0)return i[0].step;const l=o.filter(s=>s.visibleRatio>0);return l.length>0?l[l.length-1].step:null}const sr="step-",Oo="step";function ar(t,e=sr){return`${e}${t}`}function Zc(t,e=sr){const n=t.replace(/^#/,"");if(!n.startsWith(e))return null;const r=Number.parseInt(n.slice(e.length),10);return Number.isFinite(r)&&r>0?r:null}function Jc(t,e=Oo){const r=new URLSearchParams(t.startsWith("?")?t:`?${t}`).get(e);if(r==null||r==="")return null;const o=Number.parseInt(r,10);return Number.isFinite(o)&&o>0?o:null}function ao(t,e,n=Oo,r=sr){return e==="hash"?Zc(t.hash,r):Jc(t.search,n)}function Qc(t,e,n,r=Oo,o=sr){const i=new URL(t);return n==="hash"?(i.hash=e!=null?ar(e,o):"",i.toString()):(e!=null?i.searchParams.set(r,String(e)):i.searchParams.delete(r),i.toString())}const Og=900;function Fg(t){t.scrollIntoView({behavior:"smooth",block:"start"})}function Cn(t){return document.getElementById(ar(t))}function jg(t,e){return Ag(t,e,n=>{const r=Cn(n);return(r==null?void 0:r.getBoundingClientRect())??null})}function _g({enabled:t,rootRef:e,stepNumbers:n,mode:r="hash",stepUrlKey:o="step",scrollMarginTop:i=0,activeStepMinVisibleRatio:l=.2,onActiveStepChange:s}){const c=a.useRef(null),u=a.useRef(!1),d=a.useRef(!1),f=a.useRef(null),b=a.useCallback(y=>{if(typeof window>"u")return;const w=Qc(window.location.href,y,r,o);w!==window.location.href&&window.history.replaceState(window.history.state,"",w)},[r,o]),p=a.useCallback((y,{updateUrl:w})=>{c.current!==y&&(c.current=y,w&&b(y),s==null||s(y))},[s,b]),g=a.useCallback(y=>{if(typeof window>"u")return;const w=y!=null?Cn(y):e.current;w!=null&&(u.current=!0,f.current!=null&&clearTimeout(f.current),Fg(w),p(y,{updateUrl:!1}),f.current=setTimeout(()=>{u.current=!1,f.current=null},Og))},[e,p]),v=a.useCallback(()=>{if(typeof window>"u")return;const y=ao(window.location,r,o);g(y),p(y,{updateUrl:!1})},[r,g,p,o]);a.useEffect(()=>{if(!t||typeof window>"u"||d.current)return;const y=ao(window.location,r,o);e.current!=null&&(y==null||n.includes(y)||n.length>0)&&(y!=null&&Cn(y)==null||(d.current=!0,v()))},[t,r,e,v,n.join(","),o]),a.useEffect(()=>{if(!t||typeof window>"u")return;const y=()=>{v()};return window.addEventListener("hashchange",y),window.addEventListener("popstate",y),()=>{window.removeEventListener("hashchange",y),window.removeEventListener("popstate",y),f.current!=null&&clearTimeout(f.current)}},[t,v]),a.useEffect(()=>{if(!t||typeof window>"u"||n.length===0)return;const y=()=>{if(u.current)return;const x=jg(n,l);p(x,{updateUrl:!0})},w=new IntersectionObserver(y,{root:null,rootMargin:`-${i}px 0px 0px 0px`,threshold:[0,.05,.1,.2,.25,.5,.75,.8,.9,1]});for(const x of n){const S=Cn(x);S!=null&&w.observe(S)}return y(),()=>{w.disconnect()}},[l,t,i,p,n.join(",")])}function Bg(t){return a.isValidElement(t)}function Vg({children:t,showProgress:e=!0,onProgressChange:n,syncStepUrl:r=!0,stepUrlMode:o="hash",stepUrlKey:i="step",onActiveStepChange:l,scrollMarginTop:s=0,activeStepMinVisibleRatio:c=.2,className:u}){const d=a.Children.toArray(t).filter(Bg),f=d.length,b=a.useRef(null),{ref:p,size:g}=Oc({settleMs:e?250:0,layoutSettleKey:e}),v=Yc(),y=a.useMemo(()=>Xc({siteScrollMarginTop:v,progressBarHeight:(g==null?void 0:g.height)??0,includeProgressBar:e&&f>0,additionalScrollMarginTop:s}),[s,g==null?void 0:g.height,e,v,f]),w=d.map((M,L)=>M.props.number??L+1),[x,S]=a.useState(()=>Object.fromEntries(d.map((M,L)=>[M.props.number??L+1,!!(M.props.defaultCompleted??M.props.isCompleted)]))),T=Object.values(x).filter(Boolean).length;return a.useEffect(()=>{n==null||n({completed:T,total:f})},[T,f,n]),_g({enabled:r,rootRef:b,stepNumbers:w,mode:o,stepUrlKey:i,scrollMarginTop:y,activeStepMinVisibleRatio:c,onActiveStepChange:l}),h.jsxs("div",{ref:b,className:q("flex flex-col gap-8",u),children:[e&&f>0&&h.jsx("div",{ref:p,className:"sticky top-2 mx-2 z-10",children:h.jsx(Ot,{className:"w-full px-6 py-4",children:h.jsxs(yn,{value:T,maxValue:f,"aria-label":"Guide progress",className:"flex flex-col gap-1.5",children:[h.jsxs("div",{className:"flex items-center justify-between text-sm text-default-500",children:[h.jsx("span",{children:"Guide Progress"}),h.jsxs(yn.Output,{children:[T," / ",f," steps"]})]}),h.jsx(yn.Track,{className:"h-2 overflow-hidden rounded-full bg-default-soft",children:h.jsx(yn.Fill,{className:"h-full rounded-full bg-success transition-[width]"})})]})})}),h.jsx("ol",{className:"flex flex-col",children:d.map((M,L)=>{const R=M.props.number??L+1,N=r?ar(R):M.props.id;return h.jsxs("li",{children:[a.cloneElement(M,{number:R,id:M.props.id??N,scrollMarginTop:r?y:void 0,isCompleted:x[R]??!1,onCompletedChange:O=>{var k,A;S(V=>({...V,[R]:O})),(A=(k=M.props).onCompletedChange)==null||A.call(k,O)}}),L<d.length-1&&h.jsx(Zb,{className:"my-8"})]},M.key??R)})})]})}function zg({title:t,heroImage:e,heroImageAlt:n,difficulty:r,timeEstimate:o,meta:i,className:l}){const s=r!=null||o!=null,c=e!=null;return h.jsxs("header",{className:q("flex flex-col gap-4 border-b border-default pb-6 md:[grid-area:header]",c&&"sm:flex-row sm:items-center sm:gap-6",l),children:[c&&h.jsx("div",{className:"aspect-[4/3] h-32 shrink-0 overflow-hidden rounded-lg border border-default bg-default-100",children:h.jsx("img",{src:e,alt:n??"",className:"size-full object-cover"})}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4",children:[h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:t}),i!=null&&h.jsx("div",{className:"text-sm text-default-500",children:i})]}),s&&h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r!=null&&h.jsx(Lc,{difficulty:r}),o!=null&&h.jsx(Bn,{variant:"soft",color:"default",children:h.jsx(Bn.Label,{children:o})})]})]})]})}function Hg({children:t,className:e}){return h.jsx("div",{className:q("min-w-0 md:[grid-area:intro]",e),children:h.jsx("div",{className:"max-w-prose text-default-700",children:t})})}function Ug({children:t,className:e}){return h.jsx("aside",{className:q("min-w-0 md:[grid-area:sidebar]",e),children:h.jsx("div",{className:"flex flex-col gap-4",children:t})})}function Gg({children:t,className:e}){return h.jsx("main",{className:q("min-w-0 w-full md:[grid-area:main]",e),children:t})}const Wg=Object.assign(function({children:e,stepScrollMarginTop:n=0,className:r}){return h.jsx(Ao.Provider,{value:n,children:h.jsx("div",{className:q("mx-auto grid w-full max-w-6xl grid-cols-1 gap-x-8 gap-y-8 md:grid-cols-[minmax(0,1fr)_20rem] md:[grid-template-areas:'header_header'_'intro_sidebar'_'main_main']",r),children:e})})},{Header:zg,Intro:Hg,Sidebar:Ug,Content:Gg});exports.COLORS=je;exports.Callout=Rm;exports.DISPLAY_REGION_ASPECT=zn;exports.DifficultyBadge=Lc;exports.GuideLayout=Wg;exports.GuideScrollMarginContext=Ao;exports.GuideStep=Ng;exports.GuideStepList=Vg;exports.LinkButton=hg;exports.MIN_REGION_WIDTH=Io;exports.MediaCropEditor=Qm;exports.MediaFigure=lr;exports.MediaFigureThumbnail=_c;exports.ToolList=ng;exports.buildGuideStepUrl=Qc;exports.calloutTypeColor=Pl;exports.calloutTypeHex=kl;exports.calloutTypeLabel=Sn;exports.centeredDisplayRegion=Ac;exports.clampDisplayRegion=nn;exports.computeGuideStepScrollMarginTop=Xc;exports.displayRegionHeight=ct;exports.guideStepUrlId=ar;exports.hexToRgba=ot;exports.markerTextColor=Un;exports.mediaFigureType=Ko;exports.parseGuideStepFromHash=Zc;exports.parseGuideStepFromSearch=Jc;exports.readGuideStepFromLocation=ao;exports.useGuideScrollMargin=Yc;
29
29
  //# sourceMappingURL=diy-guides-ui.cjs.map