@sps-woodland/tabs 8.23.17 → 8.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1281 -1190
- package/lib/index.umd.cjs +3 -3
- package/lib/style.css +1 -1
- package/package.json +5 -5
package/lib/index.umd.cjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
(function(O,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react"),require("@react-stately/collections"),require("react-dom"),require("@sps-woodland/core"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","react","@react-stately/collections","react-dom","@sps-woodland/core","@spscommerce/utils"],u):(O=typeof globalThis<"u"?globalThis:O||self,u(O.Tabs={},O.$670gB$react,O.collections,O.reactDom,O.core,O.utils))})(this,function(O,u,ee,jt,N,Ge){"use strict";function Ht(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const U=Ht(u);class Xe{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let a of o.childNodes)n(a)};for(let o of e)n(o);let r=null,i=0;for(let[o,a]of this.keyMap)r?(r.nextKey=o,a.prevKey=r.key):(this.firstKey=o,a.prevKey=void 0),a.type==="item"&&(a.index=i++),r=a,r.nextKey=void 0;var s;this.lastKey=(s=r==null?void 0:r.key)!==null&&s!==void 0?s:null}}class R extends Set{constructor(e,n,r){super(e),e instanceof R?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n,this.currentKey=r)}}function Ye(t,e,n){let[r,i]=u.useState(t||e),s=u.useRef(t!==void 0),o=t!==void 0;u.useEffect(()=>{let h=s.current;h!==o&&console.warn(`WARN: A component changed from ${h?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),s.current=o},[o]);let a=o?t:r,v=u.useCallback((h,...b)=>{let P=($,...S)=>{n&&(Object.is(a,$)||n($,...S)),o||(a=$)};typeof h=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((S,...L)=>{let x=h(o?a:S,...L);return P(x,...b),o?S:x})):(o||i(h),P(h,...b))},[o,a,n]);return[a,v]}function Wt(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Vt(t){let{selectionMode:e="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=t,o=u.useRef(!1),[,a]=u.useState(!1),v=u.useRef(null),h=u.useRef(null),[,b]=u.useState(null),P=u.useMemo(()=>qe(t.selectedKeys),[t.selectedKeys]),$=u.useMemo(()=>qe(t.defaultSelectedKeys,new R),[t.defaultSelectedKeys]),[S,L]=Ye(P,$,t.onSelectionChange),x=u.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[E,k]=u.useState(i);i==="replace"&&E==="toggle"&&typeof S=="object"&&S.size===0&&k("replace");let _=u.useRef(i);return u.useEffect(()=>{i!==_.current&&(k(i),_.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:E,setSelectionBehavior:k,get isFocused(){return o.current},setFocused(K){o.current=K,a(K)},get focusedKey(){return v.current},get childFocusStrategy(){return h.current},setFocusedKey(K,D="first"){v.current=K,h.current=D,b(K)},selectedKeys:S,setSelectedKeys(K){(r||!Wt(K,S))&&L(K)},disabledKeys:x,disabledBehavior:s}}function qe(t,e){return t?t==="all"?"all":new R(t):e}class Gt{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){return this.state.selectionMode==="none"?!1:(e=this.getKey(e),this.state.selectedKeys==="all"?this.canSelectItem(e):this.state.selectedKeys.has(e))}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&&ee.compareNodeOrder(this.collection,r,e)<0)&&(e=r)}return e==null?void 0:e.key}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&ee.compareNodeOrder(this.collection,r,e)>0)&&(e=r)}return e==null?void 0:e.key}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}e=this.getKey(e);let n;if(this.state.selectedKeys==="all")n=new R([e],e,e);else{let s=this.state.selectedKeys;var r;let o=(r=s.anchorKey)!==null&&r!==void 0?r:e;n=new R(s,o,e);var i;for(let a of this.getKeyRange(o,(i=s.currentKey)!==null&&i!==void 0?i:e))n.delete(a);for(let a of this.getKeyRange(e,o))this.canSelectItem(a)&&n.add(a)}this.state.setSelectedKeys(n)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?ee.compareNodeOrder(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],s=e;for(;s!=null;){let o=this.collection.getItem(s);if((o&&o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;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}if(e=this.getKey(e),e==null)return;let n=new R(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(e)?n.delete(e):this.canSelectItem(e)&&(n.add(e),n.anchorKey=e,n.currentKey=e),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none"||(e=this.getKey(e),e==null))return;let n=this.canSelectItem(e)?new R([e],e,e):new R;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new R;for(let r of e)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){let i=this.collection.getItem(r);i.type==="item"&&e.push(r),i.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(ee.getFirstItem(ee.getChildNodes(i,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}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 R)}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){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function Xt(t){let{filter:e,layoutDelegate:n}=t,r=Vt(t),i=u.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),s=u.useCallback(b=>e?new Xe(e(b)):new Xe(b),[e]),o=u.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),a=ee.useCollection(t,s,o),v=u.useMemo(()=>new Gt(a,r,{layoutDelegate:n}),[a,r,n]);const h=u.useRef(null);return u.useEffect(()=>{if(r.focusedKey!=null&&!a.getItem(r.focusedKey)&&h.current){const k=h.current.getItem(r.focusedKey),_=[...h.current.getKeys()].map(l=>{const g=h.current.getItem(l);return(g==null?void 0:g.type)==="item"?g:null}).filter(l=>l!==null),K=[...a.getKeys()].map(l=>{const g=a.getItem(l);return(g==null?void 0:g.type)==="item"?g:null}).filter(l=>l!==null);var b,P;const D=((b=_==null?void 0:_.length)!==null&&b!==void 0?b:0)-((P=K==null?void 0:K.length)!==null&&P!==void 0?P:0);var $,S,L;let M=Math.min(D>1?Math.max((($=k==null?void 0:k.index)!==null&&$!==void 0?$:0)-D+1,0):(S=k==null?void 0:k.index)!==null&&S!==void 0?S:0,((L=K==null?void 0:K.length)!==null&&L!==void 0?L:0)-1),C=null,z=!1;for(;M>=0;){if(!v.isDisabled(K[M].key)){C=K[M];break}if(M<K.length-1&&!z)M++;else{z=!0;var x,E;M>((x=k==null?void 0:k.index)!==null&&x!==void 0?x:0)&&(M=(E=k==null?void 0:k.index)!==null&&E!==void 0?E:0),M--}}r.setFocusedKey(C?C.key:null)}h.current=a},[a,v,r,r.focusedKey]),{collection:a,disabledKeys:i,selectionManager:v}}function Yt(t){var e;let[n,r]=Ye(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=u.useMemo(()=>n!=null?[n]:[],[n]),{collection:s,disabledKeys:o,selectionManager:a}=Xt({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:h=>{if(h==="all")return;var b;let P=(b=h.values().next().value)!==null&&b!==void 0?b:null;P===n&&t.onSelectionChange&&t.onSelectionChange(P),r(P)}}),v=n!=null?s.getItem(n):null;return{collection:s,disabledKeys:o,selectionManager:a,selectedKey:n,setSelectedKey:r,selectedItem:v}}function qt(t){var e;let n=Yt({...t,suppressTextValueWarning:!0,defaultSelectedKey:(e=t.defaultSelectedKey)!==null&&e!==void 0?e:Je(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)}),{selectionManager:r,collection:i,selectedKey:s}=n,o=u.useRef(s);return u.useEffect(()=>{let a=s;(r.isEmpty||!i.getItem(a))&&(a=Je(i,n.disabledKeys),a!=null&&r.setSelectedKeys([a])),(a!=null&&r.focusedKey==null||!r.isFocused&&a!==o.current)&&r.setFocusedKey(a),o.current=a}),{...n,isDisabled:t.isDisabled||!1}}function Je(t,e){let n=null;if(t){var r,i,s,o;for(n=t.getFirstKey();(e.has(n)||!((i=t.getItem(n))===null||i===void 0||(r=i.props)===null||r===void 0)&&r.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);(e.has(n)||!((o=t.getItem(n))===null||o===void 0||(s=o.props)===null||s===void 0)&&s.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}const Ze=new WeakMap;function de(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${Ze.get(t)}-${n}-${e}`):""}const se=typeof document<"u"?u.useLayoutEffect:()=>{};function te(t){const e=u.useRef(null);return se(()=>{e.current=t},[t]),u.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const fe={prefix:String(Math.round(Math.random()*1e10)),current:0},Qe=u.createContext(fe),Jt=u.createContext(!1);let Zt=!!(typeof window<"u"&&window.document&&window.document.createElement),$e=new WeakMap;function Qt(t=!1){let e=u.useContext(Qe),n=u.useRef(null);if(n.current===null&&!t){var r,i;let s=(i=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let o=$e.get(s);o==null?$e.set(s,{id:e.current,state:s.memoizedState}):s.memoizedState!==o.state&&(e.current=o.id,$e.delete(s))}n.current=++e.current}return n.current}function Bt(t){let e=u.useContext(Qe);e===fe&&!Zt&&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=Qt(!!t),r=e===fe&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function en(t){let e=u.useId(),[n]=u.useState(Be()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${fe.prefix}`;return t||`${r}-${e}`}const tn=typeof u.useId=="function"?en:Bt;function nn(){return!1}function rn(){return!0}function ln(t){return()=>{}}function Be(){return typeof u.useSyncExternalStore=="function"?u.useSyncExternalStore(ln,nn,rn):u.useContext(Jt)}let on=!!(typeof window<"u"&&window.document&&window.document.createElement),G=new Map;function et(t){let[e,n]=u.useState(t),r=u.useRef(null),i=tn(e),s=u.useCallback(o=>{r.current=o},[]);return on&&(G.has(i)&&!G.get(i).includes(s)?G.set(i,[...G.get(i),s]):G.set(i,[s])),se(()=>{let o=i;return()=>{G.delete(o)}},[i]),u.useEffect(()=>{let o=r.current;o&&(r.current=null,n(o))}),i}function sn(t,e){if(t===e)return t;let n=G.get(t);if(n)return n.forEach(i=>i(e)),e;let r=G.get(e);return r?(r.forEach(i=>i(t)),t):e}function tt(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const A=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},q=t=>t&&"window"in t&&t.window===t?t:A(t).defaultView||window;function nt(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=nt(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function an(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=nt(t))&&(r&&(r+=" "),r+=e);return r}function X(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let s=e[i],o=r[i];typeof s=="function"&&typeof o=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=tt(s,o):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof o=="string"?e[i]=an(s,o):i==="id"&&s&&o?e.id=sn(s,o):e[i]=o!==void 0?o:s}}return e}const cn=new Set(["id"]),un=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),dn=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),fn=/^(data-.*)$/;function pn(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,s={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(cn.has(o)||n&&un.has(o)||r&&dn.has(o)||i!=null&&i.has(o)||fn.test(o))&&(s[o]=t[o]);return s}function j(t){if(vn())t.focus({preventScroll:!0});else{let e=bn(t);t.focus(),yn(e)}}let pe=null;function vn(){if(pe==null){pe=!1;try{document.createElement("div").focus({get preventScroll(){return pe=!0,!0}})}catch{}}return pe}function bn(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 yn(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ve(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function Se(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function H(t){let e=null;return()=>(e==null&&(e=t()),e)}const J=H(function(){return Se(/^Mac/i)}),hn=H(function(){return Se(/^iPhone/i)}),rt=H(function(){return Se(/^iPad/i)||J()&&navigator.maxTouchPoints>1}),Ke=H(function(){return hn()||rt()}),gn=H(function(){return J()||Ke()}),mn=H(function(){return ve(/AppleWebKit/i)&&!$n()}),$n=H(function(){return ve(/Chrome/i)}),it=H(function(){return ve(/Android/i)}),Sn=H(function(){return ve(/Firefox/i)}),Kn=u.createContext({isNative:!0,open:wn,useHref:t=>t});function Te(){return u.useContext(Kn)}function Z(t,e,n=!0){var r,i;let{metaKey:s,ctrlKey:o,altKey:a,shiftKey:v}=e;Sn()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(J()?s=!0:o=!0);let h=mn()&&J()&&!rt()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:o,altKey:a,shiftKey:v}):new MouseEvent("click",{metaKey:s,ctrlKey:o,altKey:a,shiftKey:v,bubbles:!0,cancelable:!0});Z.isOpening=n,j(t),t.dispatchEvent(h),Z.isOpening=!1}Z.isOpening=!1;function Tn(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 wn(t,e){Tn(t,n=>Z(n,e))}function Pn(t){let e=Te();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let ne=new Map,we=new Set;function lt(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=ne.get(r.target);i||(i=new Set,ne.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=ne.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),ne.delete(r.target)),ne.size===0)){for(let s of we)s();we.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?lt():document.addEventListener("DOMContentLoaded",lt));function ot(t){requestAnimationFrame(()=>{ne.size===0?t():we.add(t)})}function st(){let t=u.useRef(new Map),e=u.useCallback((i,s,o,a)=>{let v=a!=null&&a.once?(...h)=>{t.current.delete(o),o(...h)}:o;t.current.set(o,{type:s,eventTarget:i,fn:v,options:a}),i.addEventListener(s,o,a)},[]),n=u.useCallback((i,s,o,a)=>{var v;let h=((v=t.current.get(o))===null||v===void 0?void 0:v.fn)||o;i.removeEventListener(s,h,a),t.current.delete(o)},[]),r=u.useCallback(()=>{t.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return u.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function at(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=et(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function En(t,e){se(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function kn(t,e){let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function xn(t,e){const n=[];for(;t&&t!==document.documentElement;)kn(t,e)&&n.push(t),t=t.parentElement;return n}let _n=0;const Pe=new Map;function Mn(t){let[e,n]=u.useState();return se(()=>{if(!t)return;let r=Pe.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${_n++}`;n(i);let s=document.createElement("div");s.id=i,s.style.display="none",s.textContent=t,document.body.appendChild(s),r={refCount:0,element:s},Pe.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Pe.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function ct(t,e,n,r){let i=te(n),s=n==null;u.useEffect(()=>{if(s||!t.current)return;let o=t.current;return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}},[t,e,r,s,i])}function ut(t,e){let n=dt(t,e,"left"),r=dt(t,e,"top"),i=e.offsetWidth,s=e.offsetHeight,o=t.scrollLeft,a=t.scrollTop,{borderTopWidth:v,borderLeftWidth:h}=getComputedStyle(t),b=t.scrollLeft+parseInt(h,10),P=t.scrollTop+parseInt(v,10),$=b+t.clientWidth,S=P+t.clientHeight;n<=o?o=n-parseInt(h,10):n+i>$&&(o+=n+i-$),r<=P?a=r-parseInt(v,10):r+s>S&&(a+=r+s-S),t.scrollLeft=o,t.scrollTop=a}function dt(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function ft(t,e){if(document.contains(t)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let v=xn(t);for(let h of v)ut(h,t)}else{var n;let{left:v,top:h}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:b,top:P}=t.getBoundingClientRect();if(Math.abs(v-b)>1||Math.abs(h-P)>1){var r,i,s;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(s=t.scrollIntoView)===null||s===void 0||s.call(t,{block:"nearest"})}}}}function Ee(t){return t.mozInputSource===0&&t.isTrusted?!0:it()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Ln(t){return!it()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function ke(t){return gn()?t.altKey:t.ctrlKey}function re(t){return J()?t.metaKey:t.ctrlKey}const Dn=1e3;function Cn(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=u.useRef({search:"",timeout:null}).current,s=o=>{let a=In(o.key);if(!a||o.ctrlKey||o.metaKey||!o.currentTarget.contains(o.target))return;a===" "&&i.search.trim().length>0&&(o.preventDefault(),"continuePropagation"in o||o.stopPropagation()),i.search+=a;let v=e.getKeyForSearch(i.search,n.focusedKey);v==null&&(v=e.getKeyForSearch(i.search)),v!=null&&(n.setFocusedKey(v),r&&r(v)),clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},Dn)};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?s:null}}}function In(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}let ie="default",xe="",be=new WeakMap;function pt(t){if(Ke()){if(ie==="default"){const e=A(t);xe=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}ie="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(be.set(t,t.style.userSelect),t.style.userSelect="none")}function ye(t){if(Ke()){if(ie!=="disabled")return;ie="restoring",setTimeout(()=>{ot(()=>{if(ie==="restoring"){const e=A(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=xe||""),xe="",ie="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&be.has(t)){let e=be.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),be.delete(t)}}const vt=u.createContext({register:()=>{}});vt.displayName="PressResponderContext";function An(t,e){return e.get?e.get.call(t):e.value}function bt(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function On(t,e){var n=bt(t,e,"get");return An(t,n)}function Fn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zn(t,e,n){Fn(t,e),e.set(t,n)}function Rn(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function yt(t,e,n){var r=bt(t,e,"set");return Rn(t,r,n),n}function Nn(t){let e=u.useContext(vt);if(e){let{register:n,...r}=e;t=X(r,t),n()}return En(e,t.ref),t}var he=new WeakMap;class ge{continuePropagation(){yt(this,he,!1)}get shouldStopPropagation(){return On(this,he)}constructor(e,n,r,i){zn(this,he,{writable:!0,value:void 0}),yt(this,he,!0);var s;let o=(s=i==null?void 0:i.target)!==null&&s!==void 0?s:r.currentTarget;const a=o==null?void 0:o.getBoundingClientRect();let v,h=0,b,P=null;r.clientX!=null&&r.clientY!=null&&(b=r.clientX,P=r.clientY),a&&(b!=null&&P!=null?(v=b-a.left,h=P-a.top):(v=a.width/2,h=a.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=v,this.y=h}}const ht=Symbol("linkClicked");function gt(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:s,isDisabled:o,isPressed:a,preventFocusOnPress:v,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:b,ref:P,...$}=Nn(t),[S,L]=u.useState(!1),x=u.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:E,removeAllGlobalListeners:k}=st(),_=te((l,g)=>{let p=x.current;if(o||p.didFirePressStart)return!1;let f=!0;if(p.isTriggeringEvent=!0,r){let w=new ge("pressstart",g,l);r(w),f=w.shouldStopPropagation}return n&&n(!0),p.isTriggeringEvent=!1,p.didFirePressStart=!0,L(!0),f}),K=te((l,g,p=!0)=>{let f=x.current;if(!f.didFirePressStart)return!1;f.ignoreClickAfterPress=!0,f.didFirePressStart=!1,f.isTriggeringEvent=!0;let w=!0;if(i){let c=new ge("pressend",g,l);i(c),w=c.shouldStopPropagation}if(n&&n(!1),L(!1),e&&p&&!o){let c=new ge("press",g,l);e(c),w&&(w=c.shouldStopPropagation)}return f.isTriggeringEvent=!1,w}),D=te((l,g)=>{let p=x.current;if(o)return!1;if(s){p.isTriggeringEvent=!0;let f=new ge("pressup",g,l);return s(f),p.isTriggeringEvent=!1,f.shouldStopPropagation}return!0}),M=te(l=>{let g=x.current;g.isPressed&&g.target&&(g.isOverTarget&&g.pointerType!=null&&K(W(g.target,l),g.pointerType,!1),g.isPressed=!1,g.isOverTarget=!1,g.activePointerId=null,g.pointerType=null,k(),b||ye(g.target))}),C=te(l=>{h&&M(l)}),z=u.useMemo(()=>{let l=x.current,g={onKeyDown(f){if(Me(f.nativeEvent,f.currentTarget)&&f.currentTarget.contains(f.target)){var w;St(f.target,f.key)&&f.preventDefault();let c=!0;if(!l.isPressed&&!f.repeat){l.target=f.currentTarget,l.isPressed=!0,c=_(f,"keyboard");let T=f.currentTarget,d=I=>{Me(I,T)&&!I.repeat&&T.contains(I.target)&&l.target&&D(W(l.target,I),"keyboard")};E(A(f.currentTarget),"keyup",tt(d,p),!0)}c&&f.stopPropagation(),f.metaKey&&J()&&((w=l.metaKeyEvents)===null||w===void 0||w.set(f.key,f.nativeEvent))}else f.key==="Meta"&&(l.metaKeyEvents=new Map)},onClick(f){if(!(f&&!f.currentTarget.contains(f.target))&&f&&f.button===0&&!l.isTriggeringEvent&&!Z.isOpening){let w=!0;if(o&&f.preventDefault(),!l.ignoreClickAfterPress&&!l.ignoreEmulatedMouseEvents&&!l.isPressed&&(l.pointerType==="virtual"||Ee(f.nativeEvent))){!o&&!v&&j(f.currentTarget);let c=_(f,"virtual"),T=D(f,"virtual"),d=K(f,"virtual");w=c&&T&&d}l.ignoreEmulatedMouseEvents=!1,l.ignoreClickAfterPress=!1,w&&f.stopPropagation()}}},p=f=>{var w;if(l.isPressed&&l.target&&Me(f,l.target)){var c;St(f.target,f.key)&&f.preventDefault();let d=f.target;K(W(l.target,f),"keyboard",l.target.contains(d)),k(),f.key!=="Enter"&&_e(l.target)&&l.target.contains(d)&&!f[ht]&&(f[ht]=!0,Z(l.target,f,!1)),l.isPressed=!1,(c=l.metaKeyEvents)===null||c===void 0||c.delete(f.key)}else if(f.key==="Meta"&&(!((w=l.metaKeyEvents)===null||w===void 0)&&w.size)){var T;let d=l.metaKeyEvents;l.metaKeyEvents=void 0;for(let I of d.values())(T=l.target)===null||T===void 0||T.dispatchEvent(new KeyboardEvent("keyup",I))}};if(typeof PointerEvent<"u"){g.onPointerDown=d=>{if(d.button!==0||!d.currentTarget.contains(d.target))return;if(Ln(d.nativeEvent)){l.pointerType="virtual";return}Le(d.currentTarget)&&d.preventDefault(),l.pointerType=d.pointerType;let I=!0;l.isPressed||(l.isPressed=!0,l.isOverTarget=!0,l.activePointerId=d.pointerId,l.target=d.currentTarget,!o&&!v&&j(d.currentTarget),b||pt(l.target),I=_(d,l.pointerType),E(A(d.currentTarget),"pointermove",f,!1),E(A(d.currentTarget),"pointerup",w,!1),E(A(d.currentTarget),"pointercancel",T,!1)),I&&d.stopPropagation()},g.onMouseDown=d=>{d.currentTarget.contains(d.target)&&d.button===0&&(Le(d.currentTarget)&&d.preventDefault(),d.stopPropagation())},g.onPointerUp=d=>{!d.currentTarget.contains(d.target)||l.pointerType==="virtual"||d.button===0&&le(d,d.currentTarget)&&D(d,l.pointerType||d.pointerType)};let f=d=>{d.pointerId===l.activePointerId&&(l.target&&le(d,l.target)?!l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!0,_(W(l.target,d),l.pointerType)):l.target&&l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!1,K(W(l.target,d),l.pointerType,!1),C(d)))},w=d=>{d.pointerId===l.activePointerId&&l.isPressed&&d.button===0&&l.target&&(le(d,l.target)&&l.pointerType!=null?K(W(l.target,d),l.pointerType):l.isOverTarget&&l.pointerType!=null&&K(W(l.target,d),l.pointerType,!1),l.isPressed=!1,l.isOverTarget=!1,l.activePointerId=null,l.pointerType=null,k(),b||ye(l.target),"ontouchend"in l.target&&d.pointerType!=="mouse"&&E(l.target,"touchend",c,{once:!0}))},c=d=>{$t(d.target)&&d.preventDefault()},T=d=>{M(d)};g.onDragStart=d=>{d.currentTarget.contains(d.target)&&M(d)}}else{g.onMouseDown=c=>{if(c.button!==0||!c.currentTarget.contains(c.target))return;if(Le(c.currentTarget)&&c.preventDefault(),l.ignoreEmulatedMouseEvents){c.stopPropagation();return}l.isPressed=!0,l.isOverTarget=!0,l.target=c.currentTarget,l.pointerType=Ee(c.nativeEvent)?"virtual":"mouse",!o&&!v&&j(c.currentTarget),_(c,l.pointerType)&&c.stopPropagation(),E(A(c.currentTarget),"mouseup",f,!1)},g.onMouseEnter=c=>{if(!c.currentTarget.contains(c.target))return;let T=!0;l.isPressed&&!l.ignoreEmulatedMouseEvents&&l.pointerType!=null&&(l.isOverTarget=!0,T=_(c,l.pointerType)),T&&c.stopPropagation()},g.onMouseLeave=c=>{if(!c.currentTarget.contains(c.target))return;let T=!0;l.isPressed&&!l.ignoreEmulatedMouseEvents&&l.pointerType!=null&&(l.isOverTarget=!1,T=K(c,l.pointerType,!1),C(c)),T&&c.stopPropagation()},g.onMouseUp=c=>{c.currentTarget.contains(c.target)&&!l.ignoreEmulatedMouseEvents&&c.button===0&&D(c,l.pointerType||"mouse")};let f=c=>{if(c.button===0){if(l.isPressed=!1,k(),l.ignoreEmulatedMouseEvents){l.ignoreEmulatedMouseEvents=!1;return}l.target&&le(c,l.target)&&l.pointerType!=null?K(W(l.target,c),l.pointerType):l.target&&l.isOverTarget&&l.pointerType!=null&&K(W(l.target,c),l.pointerType,!1),l.isOverTarget=!1}};g.onTouchStart=c=>{if(!c.currentTarget.contains(c.target))return;let T=Un(c.nativeEvent);if(!T)return;l.activePointerId=T.identifier,l.ignoreEmulatedMouseEvents=!0,l.isOverTarget=!0,l.isPressed=!0,l.target=c.currentTarget,l.pointerType="touch",!o&&!v&&j(c.currentTarget),b||pt(l.target),_(Y(l.target,c),l.pointerType)&&c.stopPropagation(),E(q(c.currentTarget),"scroll",w,!0)},g.onTouchMove=c=>{if(!c.currentTarget.contains(c.target))return;if(!l.isPressed){c.stopPropagation();return}let T=mt(c.nativeEvent,l.activePointerId),d=!0;T&&le(T,c.currentTarget)?!l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!0,d=_(Y(l.target,c),l.pointerType)):l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!1,d=K(Y(l.target,c),l.pointerType,!1),C(Y(l.target,c))),d&&c.stopPropagation()},g.onTouchEnd=c=>{if(!c.currentTarget.contains(c.target))return;if(!l.isPressed){c.stopPropagation();return}let T=mt(c.nativeEvent,l.activePointerId),d=!0;T&&le(T,c.currentTarget)&&l.pointerType!=null?(D(Y(l.target,c),l.pointerType),d=K(Y(l.target,c),l.pointerType)):l.isOverTarget&&l.pointerType!=null&&(d=K(Y(l.target,c),l.pointerType,!1)),d&&c.stopPropagation(),l.isPressed=!1,l.activePointerId=null,l.isOverTarget=!1,l.ignoreEmulatedMouseEvents=!0,l.target&&!b&&ye(l.target),k()},g.onTouchCancel=c=>{c.currentTarget.contains(c.target)&&(c.stopPropagation(),l.isPressed&&M(Y(l.target,c)))};let w=c=>{l.isPressed&&c.target.contains(l.target)&&M({currentTarget:l.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};g.onDragStart=c=>{c.currentTarget.contains(c.target)&&M(c)}}return g},[E,o,v,k,b,M,C,K,_,D]);return u.useEffect(()=>()=>{var l;b||ye((l=x.current.target)!==null&&l!==void 0?l:void 0)},[b]),{isPressed:a||S,pressProps:X($,z)}}function _e(t){return t.tagName==="A"&&t.hasAttribute("href")}function Me(t,e){const{key:n,code:r}=t,i=e,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof q(i).HTMLInputElement&&!Kt(i,n)||i instanceof q(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&_e(i))&&n!=="Enter")}function Un(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function mt(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function Y(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 W(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}}function jn(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 Hn(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function le(t,e){let n=e.getBoundingClientRect(),r=jn(t);return Hn(n,r)}function Le(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function $t(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!_e(t)}function St(t,e){return t instanceof HTMLInputElement?!Kt(t,e):$t(t)}const Wn=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Kt(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Wn.has(t.type)}let ae=null,Vn=new Set,ce=new Map,Q=!1,De=!1;function Ce(t,e){for(let n of Vn)n(t,e)}function Gn(t){return!(t.metaKey||!J()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function me(t){Q=!0,Gn(t)&&(ae="keyboard",Ce("keyboard",t))}function F(t){ae="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Q=!0,Ce("pointer",t))}function Tt(t){Ee(t)&&(Q=!0,ae="virtual")}function wt(t){t.target===window||t.target===document||(!Q&&!De&&(ae="virtual",Ce("virtual",t)),Q=!1,De=!1)}function Pt(){Q=!1,De=!0}function Et(t){if(typeof window>"u"||ce.get(q(t)))return;const e=q(t),n=A(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Q=!0,r.apply(this,arguments)},n.addEventListener("keydown",me,!0),n.addEventListener("keyup",me,!0),n.addEventListener("click",Tt,!0),e.addEventListener("focus",wt,!0),e.addEventListener("blur",Pt,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",F,!0),n.addEventListener("pointermove",F,!0),n.addEventListener("pointerup",F,!0)):(n.addEventListener("mousedown",F,!0),n.addEventListener("mousemove",F,!0),n.addEventListener("mouseup",F,!0)),e.addEventListener("beforeunload",()=>{kt(t)},{once:!0}),ce.set(e,{focus:r})}const kt=(t,e)=>{const n=q(t),r=A(t);e&&r.removeEventListener("DOMContentLoaded",e),ce.has(n)&&(n.HTMLElement.prototype.focus=ce.get(n).focus,r.removeEventListener("keydown",me,!0),r.removeEventListener("keyup",me,!0),r.removeEventListener("click",Tt,!0),n.removeEventListener("focus",wt,!0),n.removeEventListener("blur",Pt,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",F,!0),r.removeEventListener("pointermove",F,!0),r.removeEventListener("pointerup",F,!0)):(r.removeEventListener("mousedown",F,!0),r.removeEventListener("mousemove",F,!0),r.removeEventListener("mouseup",F,!0)),ce.delete(n))};function Xn(t){const e=A(t);let n;return e.readyState!=="loading"?Et(t):(n=()=>{Et(t)},e.addEventListener("DOMContentLoaded",n)),()=>kt(t,n)}typeof document<"u"&&Xn();function Ie(){return ae}const Yn=500;function qn(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:s=Yn,accessibilityDescription:o}=t;const a=u.useRef(void 0);let{addGlobalListener:v,removeGlobalListener:h}=st(),{pressProps:b}=gt({isDisabled:e,onPressStart($){if($.continuePropagation(),($.pointerType==="mouse"||$.pointerType==="touch")&&(n&&n({...$,type:"longpressstart"}),a.current=setTimeout(()=>{$.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...$,type:"longpress"}),a.current=void 0},s),$.pointerType==="touch")){let S=L=>{L.preventDefault()};v($.target,"contextmenu",S,{once:!0}),v(window,"pointerup",()=>{setTimeout(()=>{h($.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd($){a.current&&clearTimeout(a.current),r&&($.pointerType==="mouse"||$.pointerType==="touch")&&r({...$,type:"longpressend"})}}),P=Mn(i&&!e?o:void 0);return{longPressProps:X(b,P)}}function Ae(t){const e=A(t);if(Ie()==="virtual"){let n=e.activeElement;ot(()=>{e.activeElement===n&&t.isConnected&&j(t)})}else j(t)}function Jn(t){const e=q(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:s}=t.ownerDocument.defaultView;let{display:o,visibility:a}=s(t);i=o!=="none"&&a!=="hidden"&&a!=="collapse"}return i}function Zn(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 xt(t,e){return t.nodeName!=="#comment"&&Jn(t)&&Zn(t,e)&&(!t.parentElement||xt(t.parentElement,t))}const Oe=["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]"],Qn=Oe.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Oe.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Bn=Oe.join(':not([hidden]):not([tabindex="-1"]),');function _t(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function Mt(t,e,n){let r=e!=null&&e.tabbable?Bn:Qn,i=A(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var o;return!(e==null||(o=e.from)===null||o===void 0)&&o.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&xt(s)&&(!n||_t(s,n))&&(!(e!=null&&e.accept)||e.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class Fe{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new Lt({scopeRef:e});i.addChild(s),s.parent=i,this.fastMap.set(e,s),r&&(s.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 s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&_t(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),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 e;let n=new Fe;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Lt({scopeRef:null}),this.fastMap.set(null,this.root)}}class Lt{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new Fe;function er(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=u.useState(!1);return se(()=>{if(t!=null&&t.current&&!n){let s=()=>{if(t.current){let a=Mt(t.current,{tabbable:!0});i(!!a.nextNode())}};s();let o=new MutationObserver(s);return o.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{o.disconnect()}}}),n?!1:r}const tr=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),nr=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function rr(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 tr.has(n.script)}let e=t.split("-")[0];return nr.has(e)}const ir=Symbol.for("react-aria.i18n.locale");function Dt(){let t=typeof window<"u"&&window[ir]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:rr(t)?"rtl":"ltr"}}let ze=Dt(),ue=new Set;function Ct(){ze=Dt();for(let t of ue)t(ze)}function lr(){let t=Be(),[e,n]=u.useState(ze);return u.useEffect(()=>(ue.size===0&&window.addEventListener("languagechange",Ct),ue.add(n),()=>{ue.delete(n),ue.size===0&&window.removeEventListener("languagechange",Ct)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const or=u.createContext(null);function It(){let t=lr();return u.useContext(or)||t}function sr(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:o=!1,disallowSelectAll:a=!1,selectOnFocus:v=e.selectionBehavior==="replace",disallowTypeAhead:h=!1,shouldUseVirtualFocus:b,allowsTabNavigation:P=!1,isVirtualized:$,scrollRef:S=r,linkBehavior:L="action"}=t,{direction:x}=It(),E=Te(),k=p=>{if(p.altKey&&p.key==="Tab"&&p.preventDefault(),!r.current.contains(p.target))return;const f=(m,B)=>{if(m!=null){if(e.isLink(m)&&L==="selection"&&v&&!ke(p)){jt.flushSync(()=>{e.setFocusedKey(m,B)});let oe=S.current.querySelector(`[data-key="${CSS.escape(m.toString())}"]`),Ut=e.getItemProps(m);E.open(oe,p,Ut.href,Ut.routerOptions);return}if(e.setFocusedKey(m,B),e.isLink(m)&&L==="override")return;p.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(m):v&&!ke(p)&&e.replaceSelection(m)}};switch(p.key){case"ArrowDown":if(n.getKeyBelow){var w,c,T;let m=e.focusedKey!=null?(w=n.getKeyBelow)===null||w===void 0?void 0:w.call(n,e.focusedKey):(c=n.getFirstKey)===null||c===void 0?void 0:c.call(n);m==null&&s&&(m=(T=n.getFirstKey)===null||T===void 0?void 0:T.call(n,e.focusedKey)),m!=null&&(p.preventDefault(),f(m))}break;case"ArrowUp":if(n.getKeyAbove){var d,I,y;let m=e.focusedKey!=null?(d=n.getKeyAbove)===null||d===void 0?void 0:d.call(n,e.focusedKey):(I=n.getLastKey)===null||I===void 0?void 0:I.call(n);m==null&&s&&(m=(y=n.getLastKey)===null||y===void 0?void 0:y.call(n,e.focusedKey)),m!=null&&(p.preventDefault(),f(m))}break;case"ArrowLeft":if(n.getKeyLeftOf){var V,Ue,je;let m=(V=n.getKeyLeftOf)===null||V===void 0?void 0:V.call(n,e.focusedKey);m==null&&s&&(m=x==="rtl"?(Ue=n.getFirstKey)===null||Ue===void 0?void 0:Ue.call(n,e.focusedKey):(je=n.getLastKey)===null||je===void 0?void 0:je.call(n,e.focusedKey)),m!=null&&(p.preventDefault(),f(m,x==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var He,We,Ve;let m=(He=n.getKeyRightOf)===null||He===void 0?void 0:He.call(n,e.focusedKey);m==null&&s&&(m=x==="rtl"?(We=n.getLastKey)===null||We===void 0?void 0:We.call(n,e.focusedKey):(Ve=n.getFirstKey)===null||Ve===void 0?void 0:Ve.call(n,e.focusedKey)),m!=null&&(p.preventDefault(),f(m,x==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){p.preventDefault();let m=n.getFirstKey(e.focusedKey,re(p));e.setFocusedKey(m),re(p)&&p.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(m):v&&e.replaceSelection(m)}break;case"End":if(n.getLastKey){p.preventDefault();let m=n.getLastKey(e.focusedKey,re(p));e.setFocusedKey(m),re(p)&&p.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(m):v&&e.replaceSelection(m)}break;case"PageDown":if(n.getKeyPageBelow){let m=n.getKeyPageBelow(e.focusedKey);m!=null&&(p.preventDefault(),f(m))}break;case"PageUp":if(n.getKeyPageAbove){let m=n.getKeyPageAbove(e.focusedKey);m!=null&&(p.preventDefault(),f(m))}break;case"a":re(p)&&e.selectionMode==="multiple"&&a!==!0&&(p.preventDefault(),e.selectAll());break;case"Escape":!o&&e.selectedKeys.size!==0&&(p.stopPropagation(),p.preventDefault(),e.clearSelection());break;case"Tab":if(!P){if(p.shiftKey)r.current.focus();else{let m=Mt(r.current,{tabbable:!0}),B,oe;do oe=m.lastChild(),oe&&(B=oe);while(oe);B&&!B.contains(document.activeElement)&&j(B)}break}}},_=u.useRef({top:0,left:0});ct(S,"scroll",$?null:()=>{_.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let K=p=>{if(e.isFocused){p.currentTarget.contains(p.target)||e.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(e.setFocused(!0),e.focusedKey==null){let c=d=>{d!=null&&(e.setFocusedKey(d),v&&e.replaceSelection(d))},T=p.relatedTarget;var f,w;T&&p.currentTarget.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?c((f=e.lastSelectedKey)!==null&&f!==void 0?f:n.getLastKey()):c((w=e.firstSelectedKey)!==null&&w!==void 0?w:n.getFirstKey())}else $||(S.current.scrollTop=_.current.top,S.current.scrollLeft=_.current.left);if(e.focusedKey!=null){let c=S.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);c&&(c.contains(document.activeElement)||j(c),Ie()==="keyboard"&&ft(c,{containingElement:r.current}))}}},D=p=>{p.currentTarget.contains(p.relatedTarget)||e.setFocused(!1)};const M=u.useRef(i);u.useEffect(()=>{if(M.current){let p=null;i==="first"&&(p=n.getFirstKey()),i==="last"&&(p=n.getLastKey());let f=e.selectedKeys;if(f.size){for(let w of f)if(e.canSelectItem(w)){p=w;break}}e.setFocused(!0),e.setFocusedKey(p),p==null&&!b&&Ae(r.current)}},[]);let C=u.useRef(e.focusedKey);u.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==C.current||M.current)&&(S!=null&&S.current)){let p=Ie(),f=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!f)return;(p==="keyboard"||M.current)&&(ut(S.current,f),p!=="virtual"&&ft(f,{containingElement:r.current}))}!b&&e.isFocused&&e.focusedKey==null&&C.current!=null&&Ae(r.current),C.current=e.focusedKey,M.current=!1}),ct(r,"react-aria-focus-scope-restore",p=>{p.preventDefault(),e.setFocused(!0)});let z={onKeyDown:k,onFocus:K,onBlur:D,onMouseDown(p){S.current===p.target&&p.preventDefault()}},{typeSelectProps:l}=Cn({keyboardDelegate:n,selectionManager:e});h||(z=X(l,z));let g;return b||(g=e.focusedKey==null?0:-1),{collectionProps:{...z,tabIndex:g}}}function ar(t){let{selectionManager:e,key:n,ref:r,shouldSelectOnPressUp:i,shouldUseVirtualFocus:s,focus:o,isDisabled:a,onAction:v,allowsDifferentPressOrigin:h,linkBehavior:b="action"}=t,P=Te(),$=y=>{if(y.pointerType==="keyboard"&&ke(y))e.toggleSelection(n);else{if(e.selectionMode==="none")return;if(e.isLink(n)){if(b==="selection"){let V=e.getItemProps(n);P.open(r.current,y,V.href,V.routerOptions),e.setSelectedKeys(e.selectedKeys);return}else if(b==="override"||b==="none")return}e.selectionMode==="single"?e.isSelected(n)&&!e.disallowEmptySelection?e.toggleSelection(n):e.replaceSelection(n):y&&y.shiftKey?e.extendSelection(n):e.selectionBehavior==="toggle"||y&&(re(y)||y.pointerType==="touch"||y.pointerType==="virtual")?e.toggleSelection(n):e.replaceSelection(n)}};u.useEffect(()=>{n===e.focusedKey&&e.isFocused&&!s&&(o?o():document.activeElement!==r.current&&Ae(r.current))},[r,n,e.focusedKey,e.childFocusStrategy,e.isFocused,s]),a=a||e.isDisabled(n);let S={};!s&&!a?S={tabIndex:n===e.focusedKey?0:-1,onFocus(y){y.target===r.current&&e.setFocusedKey(n)}}:a&&(S.onMouseDown=y=>{y.preventDefault()});let L=e.isLink(n)&&b==="override",x=e.isLink(n)&&b!=="selection"&&b!=="none",E=!a&&e.canSelectItem(n)&&!L,k=(v||x)&&!a,_=k&&(e.selectionBehavior==="replace"?!E:!E||e.isEmpty),K=k&&E&&e.selectionBehavior==="replace",D=_||K,M=u.useRef(null),C=D&&E,z=u.useRef(!1),l=u.useRef(!1),g=y=>{if(v&&v(),x){let V=e.getItemProps(n);P.open(r.current,y,V.href,V.routerOptions)}},p={};i?(p.onPressStart=y=>{M.current=y.pointerType,z.current=C,y.pointerType==="keyboard"&&(!D||Ot())&&$(y)},h?(p.onPressUp=_?null:y=>{y.pointerType!=="keyboard"&&E&&$(y)},p.onPress=_?g:null):p.onPress=y=>{if(_||K&&y.pointerType!=="mouse"){if(y.pointerType==="keyboard"&&!At())return;g(y)}else y.pointerType!=="keyboard"&&E&&$(y)}):(p.onPressStart=y=>{M.current=y.pointerType,z.current=C,l.current=_,E&&(y.pointerType==="mouse"&&!_||y.pointerType==="keyboard"&&(!k||Ot()))&&$(y)},p.onPress=y=>{(y.pointerType==="touch"||y.pointerType==="pen"||y.pointerType==="virtual"||y.pointerType==="keyboard"&&D&&At()||y.pointerType==="mouse"&&l.current)&&(D?g(y):E&&$(y))}),S["data-key"]=n,p.preventFocusOnPress=s;let{pressProps:f,isPressed:w}=gt(p),c=K?y=>{M.current==="mouse"&&(y.stopPropagation(),y.preventDefault(),g(y))}:void 0,{longPressProps:T}=qn({isDisabled:!C,onLongPress(y){y.pointerType==="touch"&&($(y),e.setSelectionBehavior("toggle"))}}),d=y=>{M.current==="touch"&&z.current&&y.preventDefault()},I=e.isLink(n)?y=>{Z.isOpening||y.preventDefault()}:void 0;return{itemProps:X(S,E||_?f:{},C?T:{},{onDoubleClick:c,onDragStartCapture:d,onClick:I}),isPressed:w,isSelected:e.isSelected(n),isFocused:e.isFocused&&e.focusedKey===n,isDisabled:a,allowsSelection:E,hasAction:D}}function At(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Ot(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}function cr(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:s}=t,{selectionManager:o,selectedKey:a}=e,v=r===a,h=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:b,isPressed:P}=ar({selectionManager:o,key:r,ref:n,isDisabled:h,shouldSelectOnPressUp:s,linkBehavior:"selection"}),$=de(e,r,"tab"),S=de(e,r,"tabpanel"),{tabIndex:L}=b,x=e.collection.getItem(r),E=pn(x==null?void 0:x.props,{labelable:!0});delete E.id;let k=Pn(x==null?void 0:x.props);return{tabProps:X(E,k,b,{id:$,"aria-selected":v,"aria-disabled":h||void 0,"aria-controls":v?S:void 0,tabIndex:h?void 0:L,role:"tab"}),isSelected:v,isDisabled:h,isPressed:P}}function ur(t,e,n){let r=er(n)?void 0:0;var i;const s=de(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),o=at({...t,id:s,"aria-labelledby":de(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:X(o,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class dr{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,r;return this.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}}function fr(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:s,selectionManager:o,disabledKeys:a}=e,{direction:v}=It(),h=u.useMemo(()=>new dr(s,v,r,a),[s,a,r,v]),{collectionProps:b}=sr({ref:n,selectionManager:o,keyboardDelegate:h,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),P=et();Ze.set(e,P);let $=at({...t,id:P});return{tabListProps:{...X(b,$),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function pr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ft(Object(n),!0).forEach(function(r){pr(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var vr=(t,e,n)=>{for(var r of Object.keys(t)){var i;if(t[r]!==((i=e[r])!==null&&i!==void 0?i:n[r]))return!1}return!0},Re=t=>e=>{var n=t.defaultClassName,r=zt(zt({},t.defaultVariants),e);for(var i in r){var s,o=(s=r[i])!==null&&s!==void 0?s:t.defaultVariants[i];if(o!=null){var a=o;typeof a=="boolean"&&(a=a===!0?"true":"false");var v=t.variantClassNames[i][a];v&&(n+=" "+v)}}for(var[h,b]of t.compoundVariants)vr(h,r,t.defaultVariants)&&(n+=" "+b);return n},br=Re({defaultClassName:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz0",variantClassNames:{context:{container:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz1",navigation:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz2"},active:{true:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz3",false:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz4"},disabled:{true:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz5",false:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz6"}},defaultVariants:{},compoundVariants:[[{context:"container",active:!0},"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz7"],[{context:"container",active:!1},"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz8"],[{context:"container",active:!1,disabled:!1},"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzz9"],[{context:"navigation",active:!0},"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzza"],[{context:"navigation",active:!1},"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzb"],[{context:"navigation",active:!1,disabled:!1},"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzc"],[{context:"navigation",active:!1,disabled:!0},"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzd"]]}),yr=Re({defaultClassName:"",variantClassNames:{active:{true:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzze",false:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzf"},disabled:{true:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzg",false:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzh"},context:{navigation:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzi",container:"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzj"}},defaultVariants:{},compoundVariants:[[{context:"navigation",active:!0},"pkg_sps-woodland_tabs__version_8_23_17__hash_kz6kzzk"]]});function Rt({context:t,item:e,state:n,...r}){const{key:i}=e,s=U.useRef(null),{tabProps:o}=cr({key:i},n,s),a=n.selectedKey===i,v=n.disabledKeys.has(i),h=N.modChildren(e.rendered,b=>b.type.displayName==="SpsTag"||N.Metadata.isWoodlandComponent(b.type)&&N.Metadata.get(b.type).name==="Tag"?[{className:N.cl(b.props.className,yr({active:a,disabled:v,context:t}))}]:[{}]);return U.createElement("div",{...o,ref:s,className:br({active:a,disabled:v,context:t}),...r},h)}N.Metadata.set(Rt,{name:"Tab"});function Nt({context:t,"data-testid":e,state:n,...r}){const i=U.useRef(null),{tabPanelProps:s}=ur(r,n,i),o=t==="container"?N.Content:"div";return U.createElement(o,{...s,ref:i,"data-testid":e},n.selectedItem?n.selectedItem.props.children:null)}N.Metadata.set(Nt,{name:"TabPanel"});var hr=Re({defaultClassName:"pkg_sps-woodland_tabs__version_8_23_17__hash_fy26er0",variantClassNames:{context:{container:"pkg_sps-woodland_tabs__version_8_23_17__hash_fy26er1",navigation:"pkg_sps-woodland_tabs__version_8_23_17__hash_fy26er2"}},defaultVariants:{},compoundVariants:[]});function Ne({className:t,context:e="navigation","data-testid":n,...r}){const i=qt(r),s=U.useRef(null),{tabListProps:o}=fr(r,i,s),a=N.useChildTestIdAttrBuilder({"data-testid":n});return U.createElement(U.Fragment,null,U.createElement("div",{...o,ref:s,className:N.cl(hr({context:e}),t),"data-testid":n},[...i.collection].map(v=>U.createElement(Rt,{key:v.key,item:v,state:i,context:e,...a(`tab-${String(v.key)}`)}))),U.createElement(Nt,{key:i.selectedItem?i.selectedItem.key:null,state:i,context:e,...a("tab-panel")}))}N.Metadata.set(Ne,{name:"Tabs"});const gr={"Tabbed Navigation":{components:[Ne],examples:{basic:{label:"Basic Navigation Tabs",description:Ge.code`
|
1
|
+
(function(O,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("@react-stately/collections"),require("react-dom"),require("@sps-woodland/core"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","react","@react-stately/collections","react-dom","@sps-woodland/core","@spscommerce/utils"],f):(O=typeof globalThis<"u"?globalThis:O||self,f(O.Tabs={},O.$670gB$react,O.collections,O.reactDom,O.core,O.utils))})(this,function(O,f,le,qt,U,Qe){"use strict";function Jt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const H=Jt(f);class Be{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&s.type==="section")for(let d of s.childNodes)n(d)};for(let s of e)n(s);let r=null,i=0;for(let[s,d]of this.keyMap)r?(r.nextKey=s,d.prevKey=r.key):(this.firstKey=s,d.prevKey=void 0),d.type==="item"&&(d.index=i++),r=d,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}class j extends Set{constructor(e,n,r){super(e),e instanceof j?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function et(t,e,n){let[r,i]=f.useState(t||e),o=f.useRef(t!==void 0),s=t!==void 0;f.useEffect(()=>{let y=o.current;y!==s&&console.warn(`WARN: A component changed from ${y?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),o.current=s},[s]);let d=s?t:r,c=f.useCallback((y,...h)=>{let w=(T,...S)=>{n&&(Object.is(d,T)||n(T,...S)),s||(d=T)};typeof y=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((S,...L)=>{let P=y(s?d:S,...L);return w(P,...h),s?S:P})):(s||i(y),w(y,...h))},[s,d,n]);return[d,c]}function Zt(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Qt(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,s=f.useRef(!1),[,d]=f.useState(!1),c=f.useRef(null),y=f.useRef(null),[,h]=f.useState(null),w=f.useMemo(()=>tt(t.selectedKeys),[t.selectedKeys]),T=f.useMemo(()=>tt(t.defaultSelectedKeys,new j),[t.defaultSelectedKeys]),[S,L]=et(w,T,t.onSelectionChange),P=f.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[M,K]=f.useState(i);i==="replace"&&M==="toggle"&&typeof S=="object"&&S.size===0&&K("replace");let _=f.useRef(i);return f.useEffect(()=>{i!==_.current&&(K(i),_.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:M,setSelectionBehavior:K,get isFocused(){return s.current},setFocused(m){s.current=m,d(m)},get focusedKey(){return c.current},get childFocusStrategy(){return y.current},setFocusedKey(m,D="first"){c.current=m,y.current=D,h(m)},selectedKeys:S,setSelectedKeys(m){(r||!Zt(m,S))&&L(m)},disabledKeys:P,disabledBehavior:o}}function tt(t,e){return t?t==="all"?"all":new j(t):e}class Bt{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 r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&le.compareNodeOrder(this.collection,i,e)<0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!e||i&&le.compareNodeOrder(this.collection,i,e)>0)&&(e=i)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n: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 j([n],n,n);else{let s=this.state.selectedKeys;var i;let d=(i=s.anchorKey)!==null&&i!==void 0?i:n;r=new j(s,d,n);var o;for(let c of this.getKeyRange(d,(o=s.currentKey)!==null&&o!==void 0?o:n))r.delete(c);for(let c of this.getKeyRange(n,d))this.canSelectItem(c)&&r.add(c)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?le.compareNodeOrder(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let i=[],o=e;for(;o!=null;){let s=this.collection.getItem(o);if(s&&(s.type==="item"||s.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;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 j(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 j([n],n,n):new j;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new j;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let s=this.collection.getItem(r);(s==null?void 0:s.type)==="item"&&e.push(r);var o;s!=null&&s.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&n((o=(i=le.getFirstItem(le.getChildNodes(s,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}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 j)}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){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function en(t){let{filter:e,layoutDelegate:n}=t,r=Qt(t),i=f.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=f.useCallback(h=>e?new Be(e(h)):new Be(h),[e]),s=f.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),d=le.useCollection(t,o,s),c=f.useMemo(()=>new Bt(d,r,{layoutDelegate:n}),[d,r,n]);const y=f.useRef(null);return f.useEffect(()=>{if(r.focusedKey!=null&&!d.getItem(r.focusedKey)&&y.current){const K=y.current.getItem(r.focusedKey),_=[...y.current.getKeys()].map(l=>{const g=y.current.getItem(l);return(g==null?void 0:g.type)==="item"?g:null}).filter(l=>l!==null),m=[...d.getKeys()].map(l=>{const g=d.getItem(l);return(g==null?void 0:g.type)==="item"?g:null}).filter(l=>l!==null);var h,w;const D=((h=_==null?void 0:_.length)!==null&&h!==void 0?h:0)-((w=m==null?void 0:m.length)!==null&&w!==void 0?w:0);var T,S,L;let E=Math.min(D>1?Math.max(((T=K==null?void 0:K.index)!==null&&T!==void 0?T:0)-D+1,0):(S=K==null?void 0:K.index)!==null&&S!==void 0?S:0,((L=m==null?void 0:m.length)!==null&&L!==void 0?L:0)-1),A=null,N=!1;for(;E>=0;){if(!c.isDisabled(m[E].key)){A=m[E];break}if(E<m.length-1&&!N)E++;else{N=!0;var P,M;E>((P=K==null?void 0:K.index)!==null&&P!==void 0?P:0)&&(E=(M=K==null?void 0:K.index)!==null&&M!==void 0?M:0),E--}}r.setFocusedKey(A?A.key:null)}y.current=d},[d,c,r,r.focusedKey]),{collection:d,disabledKeys:i,selectionManager:c}}function tn(t){var e;let[n,r]=et(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=f.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:s,selectionManager:d}=en({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:y=>{if(y==="all")return;var h;let w=(h=y.values().next().value)!==null&&h!==void 0?h:null;w===n&&t.onSelectionChange&&t.onSelectionChange(w),r(w)}}),c=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:s,selectionManager:d,selectedKey:n,setSelectedKey:r,selectedItem:c}}function nn(t){var e,n;let r=tn({...t,suppressTextValueWarning:!0,defaultSelectedKey:(n=(e=t.defaultSelectedKey)!==null&&e!==void 0?e:nt(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set))!==null&&n!==void 0?n:void 0}),{selectionManager:i,collection:o,selectedKey:s}=r,d=f.useRef(s);return f.useEffect(()=>{let c=s;(i.isEmpty||c==null||!o.getItem(c))&&(c=nt(o,r.disabledKeys),c!=null&&i.setSelectedKeys([c])),(c!=null&&i.focusedKey==null||!i.isFocused&&c!==d.current)&&i.setFocusedKey(c),d.current=c}),{...r,isDisabled:t.isDisabled||!1}}function nt(t,e){let n=null;if(t){var r,i,o,s;for(n=t.getFirstKey();n!=null&&(e.has(n)||!((i=t.getItem(n))===null||i===void 0||(r=i.props)===null||r===void 0)&&r.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);n!=null&&(e.has(n)||!((s=t.getItem(n))===null||s===void 0||(o=s.props)===null||o===void 0)&&o.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}const rt=new WeakMap;function fe(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${rt.get(t)}-${n}-${e}`):""}const B=typeof document<"u"?f.useLayoutEffect:()=>{};function Y(t){const e=f.useRef(null);return B(()=>{e.current=t},[t]),f.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const pe={prefix:String(Math.round(Math.random()*1e10)),current:0},it=f.createContext(pe),rn=f.createContext(!1);let ln=!!(typeof window<"u"&&window.document&&window.document.createElement),Ke=new WeakMap;function sn(t=!1){let e=f.useContext(it),n=f.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let s=Ke.get(o);s==null?Ke.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==s.state&&(e.current=s.id,Ke.delete(o))}n.current=++e.current}return n.current}function an(t){let e=f.useContext(it);e===pe&&!ln&&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=sn(!!t),r=e===pe&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function on(t){let e=f.useId(),[n]=f.useState(lt()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${pe.prefix}`;return t||`${r}-${e}`}const un=typeof f.useId=="function"?on:an;function dn(){return!1}function cn(){return!0}function fn(t){return()=>{}}function lt(){return typeof f.useSyncExternalStore=="function"?f.useSyncExternalStore(fn,dn,cn):f.useContext(rn)}let pn=!!(typeof window<"u"&&window.document&&window.document.createElement),q=new Map;function Te(t){let[e,n]=f.useState(t),r=f.useRef(null),i=un(e),o=f.useCallback(s=>{r.current=s},[]);return pn&&(q.has(i)&&!q.get(i).includes(o)?q.set(i,[...q.get(i),o]):q.set(i,[o])),B(()=>{let s=i;return()=>{q.delete(s)}},[i]),f.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function bn(t,e){if(t===e)return t;let n=q.get(t);if(n)return n.forEach(i=>i(e)),e;let r=q.get(e);return r?(r.forEach(i=>i(t)),t):e}function st(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const z=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},ee=t=>t&&"window"in t&&t.window===t?t:z(t).defaultView||window;function at(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=at(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function yn(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=at(t))&&(r&&(r+=" "),r+=e);return r}function J(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],s=r[i];typeof o=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=st(o,s):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof s=="string"?e[i]=yn(o,s):i==="id"&&o&&s?e.id=bn(o,s):e[i]=s!==void 0?s:o}}return e}const hn=new Set(["id"]),gn=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),vn=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mn=/^(data-.*)$/;function $n(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(hn.has(s)||n&&gn.has(s)||r&&vn.has(s)||i!=null&&i.has(s)||mn.test(s))&&(o[s]=t[s]);return o}function V(t){if(Sn())t.focus({preventScroll:!0});else{let e=Kn(t);t.focus(),Tn(e)}}let be=null;function Sn(){if(be==null){be=!1;try{document.createElement("div").focus({get preventScroll(){return be=!0,!0}})}catch{}}return be}function Kn(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 Tn(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ye(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function we(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function W(t){let e=null;return()=>(e==null&&(e=t()),e)}const te=W(function(){return we(/^Mac/i)}),wn=W(function(){return we(/^iPhone/i)}),ot=W(function(){return we(/^iPad/i)||te()&&navigator.maxTouchPoints>1}),Pe=W(function(){return wn()||ot()}),Pn=W(function(){return te()||Pe()}),En=W(function(){return ye(/AppleWebKit/i)&&!kn()}),kn=W(function(){return ye(/Chrome/i)}),ut=W(function(){return ye(/Android/i)}),xn=W(function(){return ye(/Firefox/i)}),_n=f.createContext({isNative:!0,open:Ln,useHref:t=>t});function Ee(){return f.useContext(_n)}function ne(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:s,altKey:d,shiftKey:c}=e;xn()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(te()?o=!0:s=!0);let y=En()&&te()&&!ot()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:d,shiftKey:c}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:d,shiftKey:c,bubbles:!0,cancelable:!0});ne.isOpening=n,V(t),t.dispatchEvent(y),ne.isOpening=!1}ne.isOpening=!1;function Mn(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 Ln(t,e){Mn(t,n=>ne(n,e))}function Dn(t){let e=Ee();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let se=new Map,ke=new Set;function dt(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=se.get(r.target);i||(i=new Set,se.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=se.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),se.delete(r.target)),se.size===0)){for(let o of ke)o();ke.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?dt():document.addEventListener("DOMContentLoaded",dt));function ct(t){requestAnimationFrame(()=>{se.size===0?t():ke.add(t)})}function ft(){let t=f.useRef(new Map),e=f.useCallback((i,o,s,d)=>{let c=d!=null&&d.once?(...y)=>{t.current.delete(s),s(...y)}:s;t.current.set(s,{type:o,eventTarget:i,fn:c,options:d}),i.addEventListener(o,c,d)},[]),n=f.useCallback((i,o,s,d)=>{var c;let y=((c=t.current.get(s))===null||c===void 0?void 0:c.fn)||s;i.removeEventListener(o,y,d),t.current.delete(s)},[]),r=f.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return f.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function pt(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=Te(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function bt(t,e){const n=f.useRef(!0),r=f.useRef(null);B(()=>(n.current=!0,()=>{n.current=!1}),[]),B(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function Cn(t,e){B(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function In(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function An(t,e){const n=[];for(;t&&t!==document.documentElement;)In(t,e)&&n.push(t),t=t.parentElement;return n}let Fn=0;const xe=new Map;function On(t){let[e,n]=f.useState();return B(()=>{if(!t)return;let r=xe.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${Fn++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},xe.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),xe.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function he(t,e,n,r){let i=Y(n),o=n==null;f.useEffect(()=>{if(o||!t.current)return;let s=t.current;return s.addEventListener(e,i,r),()=>{s.removeEventListener(e,i,r)}},[t,e,r,o,i])}function yt(t,e){let n=ht(t,e,"left"),r=ht(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,s=t.scrollLeft,d=t.scrollTop,{borderTopWidth:c,borderLeftWidth:y,scrollPaddingTop:h,scrollPaddingRight:w,scrollPaddingBottom:T,scrollPaddingLeft:S}=getComputedStyle(t),L=s+parseInt(y,10),P=d+parseInt(c,10),M=L+t.clientWidth,K=P+t.clientHeight,_=parseInt(h,10)||0,m=parseInt(T,10)||0,D=parseInt(w,10)||0,E=parseInt(S,10)||0;n<=s+E?s=n-parseInt(y,10)-E:n+i>M-D&&(s+=n+i-M+D),r<=P+_?d=r-parseInt(c,10)-_:r+o>K-m&&(d+=r+o-K+m),t.scrollLeft=s,t.scrollTop=d}function ht(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function gt(t,e){if(t&&document.contains(t)){let s=document.scrollingElement||document.documentElement;if(window.getComputedStyle(s).overflow==="hidden"){let c=An(t);for(let y of c)yt(y,t)}else{var n;let{left:c,top:y}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:h,top:w}=t.getBoundingClientRect();if(Math.abs(c-h)>1||Math.abs(y-w)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function _e(t){return t.mozInputSource===0&&t.isTrusted?!0:ut()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function zn(t){return!ut()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const Rn="react-aria-clear-focus",Nn="react-aria-focus",vt="react-aria-update-activedescendant";function ae(t){return te()?t.metaKey:t.ctrlKey}function Me(t){return Pn()?t.altKey:t.ctrlKey}const jn=1e3;function Un(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=f.useRef({search:"",timeout:void 0}).current,o=s=>{let d=Hn(s.key);if(!(!d||s.ctrlKey||s.metaKey||!s.currentTarget.contains(s.target))){if(d===" "&&i.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),i.search+=d,e.getKeyForSearch!=null){let c=e.getKeyForSearch(i.search,n.focusedKey);c==null&&(c=e.getKeyForSearch(i.search)),c!=null&&(n.setFocusedKey(c),r&&r(c))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},jn)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0}}}function Hn(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}let oe="default",Le="",ge=new WeakMap;function mt(t){if(Pe()){if(oe==="default"){const e=z(t);Le=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}oe="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(ge.set(t,t.style.userSelect),t.style.userSelect="none")}function ve(t){if(Pe()){if(oe!=="disabled")return;oe="restoring",setTimeout(()=>{ct(()=>{if(oe==="restoring"){const e=z(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Le||""),Le="",oe="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&ge.has(t)){let e=ge.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),ge.delete(t)}}const $t=f.createContext({register:()=>{}});$t.displayName="PressResponderContext";function Vn(t,e){return e.get?e.get.call(t):e.value}function St(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Wn(t,e){var n=St(t,e,"get");return Vn(t,n)}function Gn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xn(t,e,n){Gn(t,e),e.set(t,n)}function Yn(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function Kt(t,e,n){var r=St(t,e,"set");return Yn(t,r,n),n}function qn(t){let e=f.useContext($t);if(e){let{register:n,...r}=e;t=J(r,t),n()}return Cn(e,t.ref),t}var me=new WeakMap;class $e{continuePropagation(){Kt(this,me,!1)}get shouldStopPropagation(){return Wn(this,me)}constructor(e,n,r,i){Xn(this,me,{writable:!0,value:void 0}),Kt(this,me,!0);var o;let s=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const d=s==null?void 0:s.getBoundingClientRect();let c,y=0,h,w=null;r.clientX!=null&&r.clientY!=null&&(h=r.clientX,w=r.clientY),d&&(h!=null&&w!=null?(c=h-d.left,y=w-d.top):(c=d.width/2,y=d.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=c,this.y=y}}const Tt=Symbol("linkClicked");function wt(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:s,isPressed:d,preventFocusOnPress:c,shouldCancelOnPointerExit:y,allowTextSelectionOnPress:h,ref:w,...T}=qn(t),[S,L]=f.useState(!1),P=f.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:M,removeAllGlobalListeners:K}=ft(),_=Y((l,g)=>{let C=P.current;if(s||C.didFirePressStart)return!1;let b=!0;if(C.isTriggeringEvent=!0,r){let x=new $e("pressstart",g,l);r(x),b=x.shouldStopPropagation}return n&&n(!0),C.isTriggeringEvent=!1,C.didFirePressStart=!0,L(!0),b}),m=Y((l,g,C=!0)=>{let b=P.current;if(!b.didFirePressStart)return!1;b.ignoreClickAfterPress=!0,b.didFirePressStart=!1,b.isTriggeringEvent=!0;let x=!0;if(i){let a=new $e("pressend",g,l);i(a),x=a.shouldStopPropagation}if(n&&n(!1),L(!1),e&&C&&!s){let a=new $e("press",g,l);e(a),x&&(x=a.shouldStopPropagation)}return b.isTriggeringEvent=!1,x}),D=Y((l,g)=>{let C=P.current;if(s)return!1;if(o){C.isTriggeringEvent=!0;let b=new $e("pressup",g,l);return o(b),C.isTriggeringEvent=!1,b.shouldStopPropagation}return!0}),E=Y(l=>{let g=P.current;g.isPressed&&g.target&&(g.isOverTarget&&g.pointerType!=null&&m(G(g.target,l),g.pointerType,!1),g.isPressed=!1,g.isOverTarget=!1,g.activePointerId=null,g.pointerType=null,K(),h||ve(g.target))}),A=Y(l=>{y&&E(l)}),N=f.useMemo(()=>{let l=P.current,g={onKeyDown(b){if(Ce(b.nativeEvent,b.currentTarget)&&b.currentTarget.contains(b.target)){var x;kt(b.target,b.key)&&b.preventDefault();let a=!0;if(!l.isPressed&&!b.repeat){l.target=b.currentTarget,l.isPressed=!0,a=_(b,"keyboard");let u=b.currentTarget,$=k=>{Ce(k,u)&&!k.repeat&&u.contains(k.target)&&l.target&&D(G(l.target,k),"keyboard")};M(z(b.currentTarget),"keyup",st($,C),!0)}a&&b.stopPropagation(),b.metaKey&&te()&&((x=l.metaKeyEvents)===null||x===void 0||x.set(b.key,b.nativeEvent))}else b.key==="Meta"&&(l.metaKeyEvents=new Map)},onClick(b){if(!(b&&!b.currentTarget.contains(b.target))&&b&&b.button===0&&!l.isTriggeringEvent&&!ne.isOpening){let x=!0;if(s&&b.preventDefault(),!l.ignoreClickAfterPress&&!l.ignoreEmulatedMouseEvents&&!l.isPressed&&(l.pointerType==="virtual"||_e(b.nativeEvent))){!s&&!c&&V(b.currentTarget);let a=_(b,"virtual"),u=D(b,"virtual"),$=m(b,"virtual");x=a&&u&&$}l.ignoreEmulatedMouseEvents=!1,l.ignoreClickAfterPress=!1,x&&b.stopPropagation()}}},C=b=>{var x;if(l.isPressed&&l.target&&Ce(b,l.target)){var a;kt(b.target,b.key)&&b.preventDefault();let $=b.target;m(G(l.target,b),"keyboard",l.target.contains($)),K(),b.key!=="Enter"&&De(l.target)&&l.target.contains($)&&!b[Tt]&&(b[Tt]=!0,ne(l.target,b,!1)),l.isPressed=!1,(a=l.metaKeyEvents)===null||a===void 0||a.delete(b.key)}else if(b.key==="Meta"&&(!((x=l.metaKeyEvents)===null||x===void 0)&&x.size)){var u;let $=l.metaKeyEvents;l.metaKeyEvents=void 0;for(let k of $.values())(u=l.target)===null||u===void 0||u.dispatchEvent(new KeyboardEvent("keyup",k))}};if(typeof PointerEvent<"u"){g.onPointerDown=u=>{if(u.button!==0||!u.currentTarget.contains(u.target))return;if(zn(u.nativeEvent)){l.pointerType="virtual";return}Ae(u.currentTarget)&&u.preventDefault(),l.pointerType=u.pointerType;let $=!0;if(!l.isPressed){l.isPressed=!0,l.isOverTarget=!0,l.activePointerId=u.pointerId,l.target=u.currentTarget,!s&&!c&&V(u.currentTarget),h||mt(l.target),$=_(u,l.pointerType);let k=u.target;"releasePointerCapture"in k&&k.releasePointerCapture(u.pointerId),M(z(u.currentTarget),"pointerup",b,!1),M(z(u.currentTarget),"pointercancel",a,!1)}$&&u.stopPropagation()},g.onMouseDown=u=>{u.currentTarget.contains(u.target)&&u.button===0&&(Ae(u.currentTarget)&&u.preventDefault(),u.stopPropagation())},g.onPointerUp=u=>{!u.currentTarget.contains(u.target)||l.pointerType==="virtual"||u.button===0&&D(u,l.pointerType||u.pointerType)},g.onPointerEnter=u=>{u.pointerId===l.activePointerId&&l.target&&!l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!0,_(G(l.target,u),l.pointerType))},g.onPointerLeave=u=>{u.pointerId===l.activePointerId&&l.target&&l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!1,m(G(l.target,u),l.pointerType,!1),A(u))};let b=u=>{u.pointerId===l.activePointerId&&l.isPressed&&u.button===0&&l.target&&(l.target.contains(u.target)&&l.pointerType!=null?m(G(l.target,u),l.pointerType):l.isOverTarget&&l.pointerType!=null&&m(G(l.target,u),l.pointerType,!1),l.isPressed=!1,l.isOverTarget=!1,l.activePointerId=null,l.pointerType=null,K(),h||ve(l.target),"ontouchend"in l.target&&u.pointerType!=="mouse"&&M(l.target,"touchend",x,{once:!0}))},x=u=>{Et(u.currentTarget)&&u.preventDefault()},a=u=>{E(u)};g.onDragStart=u=>{u.currentTarget.contains(u.target)&&E(u)}}else{g.onMouseDown=a=>{if(a.button!==0||!a.currentTarget.contains(a.target))return;if(Ae(a.currentTarget)&&a.preventDefault(),l.ignoreEmulatedMouseEvents){a.stopPropagation();return}l.isPressed=!0,l.isOverTarget=!0,l.target=a.currentTarget,l.pointerType=_e(a.nativeEvent)?"virtual":"mouse",!s&&!c&&V(a.currentTarget),_(a,l.pointerType)&&a.stopPropagation(),M(z(a.currentTarget),"mouseup",b,!1)},g.onMouseEnter=a=>{if(!a.currentTarget.contains(a.target))return;let u=!0;l.isPressed&&!l.ignoreEmulatedMouseEvents&&l.pointerType!=null&&(l.isOverTarget=!0,u=_(a,l.pointerType)),u&&a.stopPropagation()},g.onMouseLeave=a=>{if(!a.currentTarget.contains(a.target))return;let u=!0;l.isPressed&&!l.ignoreEmulatedMouseEvents&&l.pointerType!=null&&(l.isOverTarget=!1,u=m(a,l.pointerType,!1),A(a)),u&&a.stopPropagation()},g.onMouseUp=a=>{a.currentTarget.contains(a.target)&&!l.ignoreEmulatedMouseEvents&&a.button===0&&D(a,l.pointerType||"mouse")};let b=a=>{if(a.button===0){if(l.isPressed=!1,K(),l.ignoreEmulatedMouseEvents){l.ignoreEmulatedMouseEvents=!1;return}l.target&&Ie(a,l.target)&&l.pointerType!=null?m(G(l.target,a),l.pointerType):l.target&&l.isOverTarget&&l.pointerType!=null&&m(G(l.target,a),l.pointerType,!1),l.isOverTarget=!1}};g.onTouchStart=a=>{if(!a.currentTarget.contains(a.target))return;let u=Jn(a.nativeEvent);if(!u)return;l.activePointerId=u.identifier,l.ignoreEmulatedMouseEvents=!0,l.isOverTarget=!0,l.isPressed=!0,l.target=a.currentTarget,l.pointerType="touch",!s&&!c&&V(a.currentTarget),h||mt(l.target),_(Z(l.target,a),l.pointerType)&&a.stopPropagation(),M(ee(a.currentTarget),"scroll",x,!0)},g.onTouchMove=a=>{if(!a.currentTarget.contains(a.target))return;if(!l.isPressed){a.stopPropagation();return}let u=Pt(a.nativeEvent,l.activePointerId),$=!0;u&&Ie(u,a.currentTarget)?!l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!0,$=_(Z(l.target,a),l.pointerType)):l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!1,$=m(Z(l.target,a),l.pointerType,!1),A(Z(l.target,a))),$&&a.stopPropagation()},g.onTouchEnd=a=>{if(!a.currentTarget.contains(a.target))return;if(!l.isPressed){a.stopPropagation();return}let u=Pt(a.nativeEvent,l.activePointerId),$=!0;u&&Ie(u,a.currentTarget)&&l.pointerType!=null?(D(Z(l.target,a),l.pointerType),$=m(Z(l.target,a),l.pointerType)):l.isOverTarget&&l.pointerType!=null&&($=m(Z(l.target,a),l.pointerType,!1)),$&&a.stopPropagation(),l.isPressed=!1,l.activePointerId=null,l.isOverTarget=!1,l.ignoreEmulatedMouseEvents=!0,l.target&&!h&&ve(l.target),K()},g.onTouchCancel=a=>{a.currentTarget.contains(a.target)&&(a.stopPropagation(),l.isPressed&&E(Z(l.target,a)))};let x=a=>{l.isPressed&&a.target.contains(l.target)&&E({currentTarget:l.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};g.onDragStart=a=>{a.currentTarget.contains(a.target)&&E(a)}}return g},[M,s,c,K,h,E,A,m,_,D]);return f.useEffect(()=>()=>{var l;h||ve((l=P.current.target)!==null&&l!==void 0?l:void 0)},[h]),{isPressed:d||S,pressProps:J(T,N)}}function De(t){return t.tagName==="A"&&t.hasAttribute("href")}function Ce(t,e){const{key:n,code:r}=t,i=e,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof ee(i).HTMLInputElement&&!xt(i,n)||i instanceof ee(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&De(i))&&n!=="Enter")}function Jn(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function Pt(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function Z(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 G(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}}function Zn(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 Qn(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ie(t,e){let n=e.getBoundingClientRect(),r=Zn(t);return Qn(n,r)}function Ae(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function Et(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!De(t)}function kt(t,e){return t instanceof HTMLInputElement?!xt(t,e):Et(t)}const Bn=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xt(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Bn.has(t.type)}let ue=null,er=new Set,de=new Map,re=!1,Fe=!1;function Oe(t,e){for(let n of er)n(t,e)}function tr(t){return!(t.metaKey||!te()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Se(t){re=!0,tr(t)&&(ue="keyboard",Oe("keyboard",t))}function R(t){ue="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(re=!0,Oe("pointer",t))}function _t(t){_e(t)&&(re=!0,ue="virtual")}function Mt(t){t.target===window||t.target===document||(!re&&!Fe&&(ue="virtual",Oe("virtual",t)),re=!1,Fe=!1)}function Lt(){re=!1,Fe=!0}function Dt(t){if(typeof window>"u"||de.get(ee(t)))return;const e=ee(t),n=z(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){re=!0,r.apply(this,arguments)},n.addEventListener("keydown",Se,!0),n.addEventListener("keyup",Se,!0),n.addEventListener("click",_t,!0),e.addEventListener("focus",Mt,!0),e.addEventListener("blur",Lt,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",R,!0),n.addEventListener("pointermove",R,!0),n.addEventListener("pointerup",R,!0)):(n.addEventListener("mousedown",R,!0),n.addEventListener("mousemove",R,!0),n.addEventListener("mouseup",R,!0)),e.addEventListener("beforeunload",()=>{Ct(t)},{once:!0}),de.set(e,{focus:r})}const Ct=(t,e)=>{const n=ee(t),r=z(t);e&&r.removeEventListener("DOMContentLoaded",e),de.has(n)&&(n.HTMLElement.prototype.focus=de.get(n).focus,r.removeEventListener("keydown",Se,!0),r.removeEventListener("keyup",Se,!0),r.removeEventListener("click",_t,!0),n.removeEventListener("focus",Mt,!0),n.removeEventListener("blur",Lt,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",R,!0),r.removeEventListener("pointermove",R,!0),r.removeEventListener("pointerup",R,!0)):(r.removeEventListener("mousedown",R,!0),r.removeEventListener("mousemove",R,!0),r.removeEventListener("mouseup",R,!0)),de.delete(n))};function nr(t){const e=z(t);let n;return e.readyState!=="loading"?Dt(t):(n=()=>{Dt(t)},e.addEventListener("DOMContentLoaded",n)),()=>Ct(t,n)}typeof document<"u"&&nr();function ze(){return ue}const rr=500;function ir(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=rr,accessibilityDescription:s}=t;const d=f.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:y}=ft(),{pressProps:h}=wt({isDisabled:e,onPressStart(T){if(T.continuePropagation(),(T.pointerType==="mouse"||T.pointerType==="touch")&&(n&&n({...T,type:"longpressstart"}),d.current=setTimeout(()=>{T.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...T,type:"longpress"}),d.current=void 0},o),T.pointerType==="touch")){let S=L=>{L.preventDefault()};c(T.target,"contextmenu",S,{once:!0}),c(window,"pointerup",()=>{setTimeout(()=>{y(T.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd(T){d.current&&clearTimeout(d.current),r&&(T.pointerType==="mouse"||T.pointerType==="touch")&&r({...T,type:"longpressend"})}}),w=On(i&&!e?s:void 0);return{longPressProps:J(h,w)}}function Re(t){const e=z(t);if(ze()==="virtual"){let n=e.activeElement;ct(()=>{e.activeElement===n&&t.isConnected&&V(t)})}else V(t)}function lr(t){const e=ee(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=t.ownerDocument.defaultView;let{display:s,visibility:d}=o(t);i=s!=="none"&&d!=="hidden"&&d!=="collapse"}return i}function sr(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 It(t,e){return t.nodeName!=="#comment"&&lr(t)&&sr(t,e)&&(!t.parentElement||It(t.parentElement,t))}const Ne=["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"])'],ar=Ne.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Ne.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const or=Ne.join(':not([hidden]):not([tabindex="-1"]),');function At(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function Ft(t,e,n){let r=e!=null&&e.tabbable?or:ar,i=z(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var s;return!(e==null||(s=e.from)===null||s===void 0)&&s.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&It(o)&&(!n||At(o,n))&&(!(e!=null&&e.accept)||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class je{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new Ot({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),r&&(o.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 o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&At(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),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 e;let n=new je;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Ot({scopeRef:null}),this.fastMap.set(null,this.root)}}class Ot{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new je;function ur(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=f.useState(!1);return B(()=>{if(t!=null&&t.current&&!n){let o=()=>{if(t.current){let d=Ft(t.current,{tabbable:!0});i(!!d.nextNode())}};o();let s=new MutationObserver(o);return s.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{s.disconnect()}}}),n?!1:r}const dr=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),cr=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function fr(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 dr.has(n.script)}let e=t.split("-")[0];return cr.has(e)}const pr=Symbol.for("react-aria.i18n.locale");function zt(){let t=typeof window<"u"&&window[pr]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:fr(t)?"rtl":"ltr"}}let Ue=zt(),ce=new Set;function Rt(){Ue=zt();for(let t of ce)t(Ue)}function br(){let t=lt(),[e,n]=f.useState(Ue);return f.useEffect(()=>(ce.size===0&&window.addEventListener("languagechange",Rt),ce.add(n),()=>{ce.delete(n),ce.size===0&&window.removeEventListener("languagechange",Rt)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const yr=f.createContext(null);function Nt(){let t=br();return f.useContext(yr)||t}function hr(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:s=!1,disallowSelectAll:d=!1,selectOnFocus:c=e.selectionBehavior==="replace",disallowTypeAhead:y=!1,shouldUseVirtualFocus:h,allowsTabNavigation:w=!1,isVirtualized:T,scrollRef:S=r,linkBehavior:L="action"}=t,{direction:P}=Nt(),M=Ee(),K=a=>{var u;if(a.altKey&&a.key==="Tab"&&a.preventDefault(),!(!((u=r.current)===null||u===void 0)&&u.contains(a.target)))return;const $=(v,ie)=>{if(v!=null){if(e.isLink(v)&&L==="selection"&&c&&!Me(a)){var Q;qt.flushSync(()=>{e.setFocusedKey(v,ie)});let Xt=(Q=S.current)===null||Q===void 0?void 0:Q.querySelector(`[data-key="${CSS.escape(v.toString())}"]`),Yt=e.getItemProps(v);Xt&&M.open(Xt,a,Yt.href,Yt.routerOptions);return}if(e.setFocusedKey(v,ie),e.isLink(v)&&L==="override")return;a.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(v):c&&!Me(a)&&e.replaceSelection(v)}};switch(a.key){case"ArrowDown":if(n.getKeyBelow){var k,F,p;let v=e.focusedKey!=null?(k=n.getKeyBelow)===null||k===void 0?void 0:k.call(n,e.focusedKey):(F=n.getFirstKey)===null||F===void 0?void 0:F.call(n);v==null&&o&&(v=(p=n.getFirstKey)===null||p===void 0?void 0:p.call(n,e.focusedKey)),v!=null&&(a.preventDefault(),$(v))}break;case"ArrowUp":if(n.getKeyAbove){var I,X,We;let v=e.focusedKey!=null?(I=n.getKeyAbove)===null||I===void 0?void 0:I.call(n,e.focusedKey):(X=n.getLastKey)===null||X===void 0?void 0:X.call(n);v==null&&o&&(v=(We=n.getLastKey)===null||We===void 0?void 0:We.call(n,e.focusedKey)),v!=null&&(a.preventDefault(),$(v))}break;case"ArrowLeft":if(n.getKeyLeftOf){var Ge,Xe,Ye;let v=e.focusedKey!=null?(Ge=n.getKeyLeftOf)===null||Ge===void 0?void 0:Ge.call(n,e.focusedKey):null;v==null&&o&&(v=P==="rtl"?(Xe=n.getFirstKey)===null||Xe===void 0?void 0:Xe.call(n,e.focusedKey):(Ye=n.getLastKey)===null||Ye===void 0?void 0:Ye.call(n,e.focusedKey)),v!=null&&(a.preventDefault(),$(v,P==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var qe,Je,Ze;let v=e.focusedKey!=null?(qe=n.getKeyRightOf)===null||qe===void 0?void 0:qe.call(n,e.focusedKey):null;v==null&&o&&(v=P==="rtl"?(Je=n.getLastKey)===null||Je===void 0?void 0:Je.call(n,e.focusedKey):(Ze=n.getFirstKey)===null||Ze===void 0?void 0:Ze.call(n,e.focusedKey)),v!=null&&(a.preventDefault(),$(v,P==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&a.shiftKey)return;a.preventDefault();let v=n.getFirstKey(e.focusedKey,ae(a));e.setFocusedKey(v),v!=null&&(ae(a)&&a.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(v):c&&e.replaceSelection(v))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&a.shiftKey)return;a.preventDefault();let v=n.getLastKey(e.focusedKey,ae(a));e.setFocusedKey(v),v!=null&&(ae(a)&&a.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(v):c&&e.replaceSelection(v))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let v=n.getKeyPageBelow(e.focusedKey);v!=null&&(a.preventDefault(),$(v))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let v=n.getKeyPageAbove(e.focusedKey);v!=null&&(a.preventDefault(),$(v))}break;case"a":ae(a)&&e.selectionMode==="multiple"&&d!==!0&&(a.preventDefault(),e.selectAll());break;case"Escape":!s&&e.selectedKeys.size!==0&&(a.stopPropagation(),a.preventDefault(),e.clearSelection());break;case"Tab":if(!w){if(a.shiftKey)r.current.focus();else{let v=Ft(r.current,{tabbable:!0}),ie,Q;do Q=v.lastChild(),Q&&(ie=Q);while(Q);ie&&!ie.contains(document.activeElement)&&V(ie)}break}}},_=f.useRef({top:0,left:0});he(S,"scroll",T?void 0:()=>{var a,u,$,k;_.current={top:($=(a=S.current)===null||a===void 0?void 0:a.scrollTop)!==null&&$!==void 0?$:0,left:(k=(u=S.current)===null||u===void 0?void 0:u.scrollLeft)!==null&&k!==void 0?k:0}});let m=a=>{if(e.isFocused){a.currentTarget.contains(a.target)||e.setFocused(!1);return}if(a.currentTarget.contains(a.target)){if(e.setFocused(!0),e.focusedKey==null){var u,$;let p=X=>{X!=null&&(e.setFocusedKey(X),c&&e.replaceSelection(X))},I=a.relatedTarget;var k,F;I&&a.currentTarget.compareDocumentPosition(I)&Node.DOCUMENT_POSITION_FOLLOWING?p((k=e.lastSelectedKey)!==null&&k!==void 0?k:(u=n.getLastKey)===null||u===void 0?void 0:u.call(n)):p((F=e.firstSelectedKey)!==null&&F!==void 0?F:($=n.getFirstKey)===null||$===void 0?void 0:$.call(n))}else!T&&S.current&&(S.current.scrollTop=_.current.top,S.current.scrollLeft=_.current.left);if(e.focusedKey!=null&&S.current){let p=S.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);p&&(p.contains(document.activeElement)||V(p),ze()==="keyboard"&>(p,{containingElement:r.current}))}}},D=a=>{a.currentTarget.contains(a.relatedTarget)||e.setFocused(!1)},E=f.useRef(!1);he(r,Nn,h?a=>{let{detail:u}=a;a.stopPropagation(),e.setFocused(!0),(u==null?void 0:u.focusStrategy)==="first"&&(E.current=!0)}:void 0);let A=Y(()=>{var a,u;let $=(u=(a=n.getFirstKey)===null||a===void 0?void 0:a.call(n))!==null&&u!==void 0?u:null;if($==null){var k;(k=r.current)===null||k===void 0||k.dispatchEvent(new CustomEvent(vt,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(E.current=!1)}else e.setFocusedKey($),E.current=!1});bt(()=>{E.current&&A()},[e.collection,A]);let N=Y(()=>{e.collection.size>0&&(E.current=!1)});bt(()=>{N()},[e.focusedKey,N]),he(r,Rn,h?a=>{a.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const l=f.useRef(i);f.useEffect(()=>{if(l.current){var a,u;let F=null;var $;i==="first"&&(F=($=(a=n.getFirstKey)===null||a===void 0?void 0:a.call(n))!==null&&$!==void 0?$:null);var k;i==="last"&&(F=(k=(u=n.getLastKey)===null||u===void 0?void 0:u.call(n))!==null&&k!==void 0?k:null);let p=e.selectedKeys;if(p.size){for(let I of p)if(e.canSelectItem(I)){F=I;break}}e.setFocused(!0),e.setFocusedKey(F),F==null&&!h&&r.current&&Re(r.current)}},[]);let g=f.useRef(e.focusedKey);f.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==g.current||l.current)&&S.current&&r.current){let a=ze(),u=r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!u)return;(a==="keyboard"||l.current)&&(yt(S.current,u),a!=="virtual"&>(u,{containingElement:r.current}))}!h&&e.isFocused&&e.focusedKey==null&&g.current!=null&&r.current&&Re(r.current),g.current=e.focusedKey,l.current=!1}),he(r,"react-aria-focus-scope-restore",a=>{a.preventDefault(),e.setFocused(!0)});let C={onKeyDown:K,onFocus:m,onBlur:D,onMouseDown(a){S.current===a.target&&a.preventDefault()}},{typeSelectProps:b}=Un({keyboardDelegate:n,selectionManager:e});y||(C=J(b,C));let x;return h?x=-1:x=e.focusedKey==null?0:-1,{collectionProps:{...C,tabIndex:x}}}function gr(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:s,focus:d,isDisabled:c,onAction:y,allowsDifferentPressOrigin:h,linkBehavior:w="action"}=t,T=Ee();e=Te(e);let S=p=>{if(p.pointerType==="keyboard"&&Me(p))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(w==="selection"&&i.current){let I=n.getItemProps(r);T.open(i.current,p,I.href,I.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(w==="override"||w==="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&&(ae(p)||p.pointerType==="touch"||p.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};f.useEffect(()=>{if(r===n.focusedKey&&n.isFocused)if(!s)d?d():document.activeElement!==i.current&&i.current&&Re(i.current);else{var I;let X=new CustomEvent(vt,{cancelable:!0,bubbles:!0});(I=i.current)===null||I===void 0||I.dispatchEvent(X)}},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,s]),c=c||n.isDisabled(r);let L={};!s&&!c?L={tabIndex:r===n.focusedKey?0:-1,onFocus(p){p.target===i.current&&n.setFocusedKey(r)}}:c&&(L.onMouseDown=p=>{p.preventDefault()});let P=n.isLink(r)&&w==="override",M=n.isLink(r)&&w!=="selection"&&w!=="none",K=!c&&n.canSelectItem(r)&&!P,_=(y||M)&&!c,m=_&&(n.selectionBehavior==="replace"?!K:!K||n.isEmpty),D=_&&K&&n.selectionBehavior==="replace",E=m||D,A=f.useRef(null),N=E&&K,l=f.useRef(!1),g=f.useRef(!1),C=p=>{if(y&&y(),M&&i.current){let I=n.getItemProps(r);T.open(i.current,p,I.href,I.routerOptions)}},b={};o?(b.onPressStart=p=>{A.current=p.pointerType,l.current=N,p.pointerType==="keyboard"&&(!E||Ut())&&S(p)},h?(b.onPressUp=m?void 0:p=>{p.pointerType==="mouse"&&K&&S(p)},b.onPress=m?C:p=>{p.pointerType!=="keyboard"&&p.pointerType!=="mouse"&&K&&S(p)}):b.onPress=p=>{if(m||D&&p.pointerType!=="mouse"){if(p.pointerType==="keyboard"&&!jt())return;C(p)}else p.pointerType!=="keyboard"&&K&&S(p)}):(b.onPressStart=p=>{A.current=p.pointerType,l.current=N,g.current=m,K&&(p.pointerType==="mouse"&&!m||p.pointerType==="keyboard"&&(!_||Ut()))&&S(p)},b.onPress=p=>{(p.pointerType==="touch"||p.pointerType==="pen"||p.pointerType==="virtual"||p.pointerType==="keyboard"&&E&&jt()||p.pointerType==="mouse"&&g.current)&&(E?C(p):K&&S(p))}),L["data-key"]=r,b.preventFocusOnPress=s;let{pressProps:x,isPressed:a}=wt(b),u=D?p=>{A.current==="mouse"&&(p.stopPropagation(),p.preventDefault(),C(p))}:void 0,{longPressProps:$}=ir({isDisabled:!N,onLongPress(p){p.pointerType==="touch"&&(S(p),n.setSelectionBehavior("toggle"))}}),k=p=>{A.current==="touch"&&l.current&&p.preventDefault()},F=n.isLink(r)?p=>{ne.isOpening||p.preventDefault()}:void 0;return{itemProps:J(L,K||m?x:{},N?$:{},{onDoubleClick:u,onDragStartCapture:k,onClick:F,id:e}),isPressed:a,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:K,hasAction:E}}function jt(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Ut(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}function vr(t,e,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:o}=t,{selectionManager:s,selectedKey:d}=e,c=r===d,y=i||e.isDisabled||e.selectionManager.isDisabled(r),{itemProps:h,isPressed:w}=gr({selectionManager:s,key:r,ref:n,isDisabled:y,shouldSelectOnPressUp:o,linkBehavior:"selection"}),T=fe(e,r,"tab"),S=fe(e,r,"tabpanel"),{tabIndex:L}=h,P=e.collection.getItem(r),M=$n(P==null?void 0:P.props,{labelable:!0});delete M.id;let K=Dn(P==null?void 0:P.props);return{tabProps:J(M,K,h,{id:T,"aria-selected":c,"aria-disabled":y||void 0,"aria-controls":c?S:void 0,tabIndex:y?void 0:L,role:"tab"}),isSelected:c,isDisabled:y,isPressed:w}}function mr(t,e,n){let r=ur(n)?void 0:0;var i;const o=fe(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),s=pt({...t,id:o,"aria-labelledby":fe(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:J(s,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class $r{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,r;return this.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}}function Sr(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:s,disabledKeys:d}=e,{direction:c}=Nt(),y=f.useMemo(()=>new $r(o,c,r,d),[o,d,r,c]),{collectionProps:h}=hr({ref:n,selectionManager:s,keyboardDelegate:y,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),w=Te();rt.set(e,w);let T=pt({...t,id:w});return{tabListProps:{...J(h,T),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function Kr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ht(Object(n),!0).forEach(function(r){Kr(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Tr=(t,e,n)=>{for(var r of Object.keys(t)){var i;if(t[r]!==((i=e[r])!==null&&i!==void 0?i:n[r]))return!1}return!0},He=t=>e=>{var n=t.defaultClassName,r=Vt(Vt({},t.defaultVariants),e);for(var i in r){var o,s=(o=r[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(s!=null){var d=s;typeof d=="boolean"&&(d=d===!0?"true":"false");var c=t.variantClassNames[i][d];c&&(n+=" "+c)}}for(var[y,h]of t.compoundVariants)Tr(y,r,t.defaultVariants)&&(n+=" "+h);return n},wr=He({defaultClassName:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz0",variantClassNames:{context:{container:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz1",navigation:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz2"},active:{true:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz3",false:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz4"},disabled:{true:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz5",false:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz6"}},defaultVariants:{},compoundVariants:[[{context:"container",active:!0},"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz7"],[{context:"container",active:!1},"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz8"],[{context:"container",active:!1,disabled:!1},"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz9"],[{context:"navigation",active:!0},"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzza"],[{context:"navigation",active:!1},"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzb"],[{context:"navigation",active:!1,disabled:!1},"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzc"],[{context:"navigation",active:!1,disabled:!0},"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzd"]]}),Pr=He({defaultClassName:"",variantClassNames:{active:{true:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzze",false:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzf"},disabled:{true:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzg",false:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzh"},context:{navigation:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzi",container:"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzj"}},defaultVariants:{},compoundVariants:[[{context:"navigation",active:!0},"pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzk"]]});function Wt({context:t,item:e,state:n,...r}){const{key:i}=e,o=H.useRef(null),{tabProps:s}=vr({key:i},n,o),d=n.selectedKey===i,c=n.disabledKeys.has(i),y=U.modChildren(e.rendered,h=>h.type.displayName==="SpsTag"||U.Metadata.isWoodlandComponent(h.type)&&U.Metadata.get(h.type).name==="Tag"?[{className:U.cl(h.props.className,Pr({active:d,disabled:c,context:t}))}]:[{}]);return H.createElement("div",{...s,ref:o,className:wr({active:d,disabled:c,context:t}),...r},y)}U.Metadata.set(Wt,{name:"Tab"});function Gt({context:t,"data-testid":e,state:n,...r}){const i=H.useRef(null),{tabPanelProps:o}=mr(r,n,i),s=t==="container"?U.Content:"div";return H.createElement(s,{...o,ref:i,"data-testid":e},n.selectedItem?n.selectedItem.props.children:null)}U.Metadata.set(Gt,{name:"TabPanel"});var Er=He({defaultClassName:"pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er0",variantClassNames:{context:{container:"pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er1",navigation:"pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er2"}},defaultVariants:{},compoundVariants:[]});function Ve({className:t,context:e="navigation","data-testid":n,...r}){const i=nn(r),o=H.useRef(null),{tabListProps:s}=Sr(r,i,o),d=U.useChildTestIdAttrBuilder({"data-testid":n});return H.createElement(H.Fragment,null,H.createElement("div",{...s,ref:o,className:U.cl(Er({context:e}),t),"data-testid":n},[...i.collection].map(c=>H.createElement(Wt,{key:c.key,item:c,state:i,context:e,...d(`tab-${String(c.key)}`)}))),H.createElement(Gt,{key:i.selectedItem?i.selectedItem.key:null,state:i,context:e,...d("tab-panel")}))}U.Metadata.set(Ve,{name:"Tabs"});const kr={"Tabbed Navigation":{components:[Ve],examples:{basic:{label:"Basic Navigation Tabs",description:Qe.code`
|
2
2
|
<p>Navigation tabs</p>
|
3
|
-
`,examples:{basic:{react:
|
3
|
+
`,examples:{basic:{react:Qe.code`
|
4
4
|
import { Item } from "@react-stately/collections";
|
5
5
|
import { Box, Icon } from "@sps-woodland/core";
|
6
6
|
import { Tabs } from "@sps-woodland/tabs";
|
@@ -61,4 +61,4 @@
|
|
61
61
|
</Tabs>
|
62
62
|
)
|
63
63
|
}
|
64
|
-
`}}}}}};O.MANIFEST=
|
64
|
+
`}}}}}};O.MANIFEST=kr,O.Tabs=Ve,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
package/lib/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.pkg_sps-
|
1
|
+
.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz0{align-items:center;border-top-width:.0625rem;border-right-width:.0625rem;border-style:solid;cursor:pointer;display:flex;font-size:.75rem;font-weight:600;line-height:.875rem;padding:.5rem 1rem}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz1{border-bottom-width:0;border-left-width:.0625rem;border-top-left-radius:.25rem;border-top-right-radius:.25rem;color:#717779;margin-bottom:-1px}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz2{border-bottom-width:.0625rem;border-left-width:0}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz2:first-child{border-left-width:.0625rem;border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz2:last-child{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz5{cursor:not-allowed}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz7{background-color:#fff;border-color:#d2d4d4;color:#1f282c}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz8{border-color:transparent}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz9:hover{background-color:#f3f4f4;border-color:#d2d4d4;box-shadow:0 -.0625rem #d2d4d4 inset}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzza{background-color:#027db8;border-color:#027db8;color:#fff}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzb{background-color:#fff;border-color:#d2d4d4;color:#4b5356}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzc:hover{background-color:#f3f4f4}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzd{color:#717779}.pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzk{background-color:#fff!important;color:#4b5356!important}.pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er0{display:flex;flex-wrap:wrap}.pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er1{background-color:#e9e9ea;border-bottom-color:#d2d4d4;border-bottom-style:solid;border-bottom-width:.0625rem;border-top-left-radius:.25rem;border-top-right-radius:.25rem;padding-top:1rem;padding-left:1rem;padding-right:1rem}.pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er2{margin-bottom:1rem}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sps-woodland/tabs",
|
3
3
|
"description": "SPS Woodland Design System tabs component",
|
4
|
-
"version": "8.
|
4
|
+
"version": "8.24.0",
|
5
5
|
"author": "SPS Commerce",
|
6
6
|
"license": "UNLICENSED",
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/tabs",
|
@@ -30,8 +30,8 @@
|
|
30
30
|
"@spscommerce/utils": "^7.0.0",
|
31
31
|
"react": "^16.14.0",
|
32
32
|
"react-dom": "^16.14.0",
|
33
|
-
"@sps-woodland/core": "8.
|
34
|
-
"@sps-woodland/tokens": "8.
|
33
|
+
"@sps-woodland/core": "8.24.0",
|
34
|
+
"@sps-woodland/tokens": "8.24.0"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
37
|
"@react-stately/collections": "^3.6.0",
|
@@ -45,8 +45,8 @@
|
|
45
45
|
"@vanilla-extract/vite-plugin": "^3.7.1",
|
46
46
|
"react": "^16.14.0",
|
47
47
|
"react-dom": "^16.14.0",
|
48
|
-
"@sps-woodland/core": "8.
|
49
|
-
"@sps-woodland/tokens": "8.
|
48
|
+
"@sps-woodland/core": "8.24.0",
|
49
|
+
"@sps-woodland/tokens": "8.24.0"
|
50
50
|
},
|
51
51
|
"dependencies": {
|
52
52
|
"@react-aria/tabs": "^3.3.4",
|