1import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{t as n}from"./react-dom.CbzydqoA.js";import{$ as r,Bt as i,G as a,Gt as o,Kt as s,N as c,Ot as l,Q as u,St as d,Ut as f,W as p,Wt as m,_t as h,bt as g,dt as _,ft as v,ht as y,kt as b,mt as x,nt as S,ot as ee,rt as te,tt as ne,wt as C,xt as w,yt as T}from"./styled-components.A6uh_43m.js";import{n as E,o as D,r as O,t as k}from"./useDescription.CBv5oa1i.js";import{i as A}from"./Text.D5GLNKPX.js";import{t as j}from"./shim.BbyJgaa_.js";var M=e(t(),1),N=e(n(),1),re=`react-aria-clear-focus`,P=`react-aria-focus`;function ie(e){let t=L(l(e));t!==e&&(t&&F(t,e),e&&I(e,t))}function F(e,t){e.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:t}))}function I(e,t){e.dispatchEvent(new FocusEvent(`focus`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusin`,{bubbles:!0,relatedTarget:t}))}function L(e){let t=d(e),n=t?.getAttribute(`aria-activedescendant`);return n&&e.getElementById(n)||t}function R(e){return x()?e.metaKey:e.ctrlKey}var ae=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function oe(e){return e instanceof HTMLInputElement&&!ae.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var z=class{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}},B=class extends z{filter(e,t,n){let[r,i]=H(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}};(class extends z{static{this.type=`header`}});var se=class extends z{static{this.type=`loader`}},ce=class extends B{static{this.type=`item`}filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};(class extends B{static{this.type=`section`}filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}});var V=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=H(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};
1function H(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey==null?null:e.getItem(o.nextKey)}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e==null?a=null:(a=t.getItem(e),a.nextKey=null)}return[i?.key??null,a?.key??null]}var U=class{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}},W=class e extends U{constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.parentNode.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,
1n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}},le=class extends U{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new W(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof W&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof W?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),this.queuedRender&&e(),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}};function G(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,M.useMemo)(()=>void 0,[t]),s=(0,M.useMemo)(()=>new WeakMap,[...a,o]);return(0,M.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=ue(a)?a:null,o=n?s.get(n):null;if(!o){o=t(a);let c=o.props.id??a?.key??a?.id;r!=null&&o.props.id==null&&c!=null&&(c=r+`:`+c);let l=c??e.length;o=(0,M.cloneElement)(o,i?{key:l,id:c,value:a}:{key:l}),n&&s.set(n,o)}e.push(o)}return e}if(typeof t!=`function`)return t},[t,n,s,r,i])}function ue(e){switch(typeof e){case`object`:return e!=null;case`function`:case`symbol`:return!0;default:return!1}}var de=j(),K=(0,M.createContext)(!1),q=(0,M.createContext)(null);function fe(e){if((0,M.useContext)(q))return e.content;let{collection:t,document:n}=X(e.createCollection);return M.createElement(M.Fragment,null,M.createElement(A,null,M.createElement(q.Provider,{value:n},e.content)),M.createElement(J,{render:e.children,collection:t}))}function J({collection:e,render:t}){return t(e)}function Y(e,t,n){let r=m(),i=(0,M.useRef)(r);i.current=r;let a=(0,M.useCallback)(()=>i.current?n():t(),[t,n]);return(0,de.useSyncExternalStore)(e,a)}var pe=typeof M.useSyncExternalStore==`function`?M.useSyncExternalStore:Y;function X(e){let[t]=(0,M.useState)(()=>new le(e?.()||new V));return{collection:pe((0,M.useCallback)(e=>t.subscribe(e),[t]),(0,M.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,M.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t])),document:t}}var Z=(0,M.createContext)(null);function Q(e){return class extends z{static{this.type=e}}}function me(e,t,n,r,i,a){typeof e==`string`&&(e=Q(e));let o=(0,M.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,M.useContext)(Z);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?M.createElement(Z.Provider,{value:o},i):null}return M.createElement(e.type,{ref:o},i)}function he(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,M.forwardRef)((r,i)=>{let a=(0,M.useContext)(u);if(!(0,M.useContext)(K)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return me(e,r,i,`children`in r?r.children:null,null,e=>M.createElement(u.Provider,{value:a},M.createElement(n,{node:e})))});return r.displayName=t.name,r}function ge(e){return G({...e,addIdAndValue:!0})}var _e=(0,M.createContext)(null);function ve(e){let t=(0,M.useContext)(_e),n=(t?.dependencies||[]).concat(e.depen
1dencies),r=e.idScope??t?.idScope,i=ge({...e,idScope:r,dependencies:n});return(0,M.useContext)(q)&&(i=M.createElement(ye,null,i)),t=(0,M.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),M.createElement(_e.Provider,{value:t},i)}function ye({children:e}){let t=(0,M.useContext)(q),n=(0,M.useMemo)(()=>M.createElement(q.Provider,{value:null},M.createElement(K.Provider,{value:!0},e)),[e]);return m()?M.createElement(Z.Provider,{value:t},n):(0,N.createPortal)(n,t)}var be=(0,M.createContext)(null),xe={CollectionRoot({collection:e,renderDropIndicator:t}){return Se(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return Se(e,t,n)}};function Se(e,t,n){return G({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){if(t.type===`content`)return M.createElement(M.Fragment,null);let r=t.render(t);return!n||t.type!==`item`?r:M.createElement(M.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,Ce(e,t,n))}})}function Ce(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r?.type===`item`&&(!a||r.parentKey!==a.parentKey&&a.level<r.level);){let t=n({type:`item`,key:r.key,dropPosition:`after`});(0,M.isValidElement)(t)&&s.push((0,M.cloneElement)(t,{key:`${r.key}-after`})),r=r.parentKey==null?null:e.getItem(r.parentKey)}}return s}var we=(0,M.createContext)(xe);function Te(e){return(0,M.useMemo)(()=>e==null?null:new Set([e]),[e])}function Ee(e){return y()?e.altKey:e.ctrlKey}function De(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var Oe=new WeakMap;function ke(e){let t=f();return Oe.set(e,t),t}function Ae(e){return Oe.get(e)}var je=1e3;function Me(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,M.useRef)({search:``,timeout:void 0});return(0,M.useEffect)(()=>{let e=i.current.timeout;return()=>{clearTimeout(e)}},[i]),{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{if(i.current.search.length>0&&e.key===` `){if(e.preventDefault(),(!(`continuePropagation`in e)||`continuePropagation`in e&&!e.isPropagationStopped())&&e.stopPropagation(),i.current.search+=` `,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.current.search,n.focusedKey);e??=t.getKeyForSearch(i.current.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=``},je)}}:void 0,onKeyDown:t.getKeyForSearch?e=>{let a=Ne(e.key);if(!(!a||e.ctrlKey||e.metaKey||e.altKey||!g(e.currentTarget,C(e))||i.current.search.length===0&&a===` `)){if(i.current.search+=a,t.getKeyForSearch!=null){let a=t.getKeyForSearch(i.current.search,n.focusedKey);if(a??=t.getKeyForSearch(i.current.search),a!=null)n.setFocusedKey(a),r&&r(a),e.preventDefault(),`continuePropagation`in e||e.stopPropagation();else{i.current.search=``,clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=``},je)}}:void 0}}}function Ne(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function Pe(e,t){let n=(0,M.useRef)(!0),r=(0,M.useRef)(null);o(()=>(n.current=!0,()=>{n.current=!1}),[]),o(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function Fe(e){let{selectionManager:t,keyboardDelegate:n,ref:a,autoFocus:o=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:u=!1,escapeKeyBehavior:f=`clearSelection`,selectOnFocus:p=t.selectionBehavior===`replace`,disallowTypeAhead:m=!1,shouldUseVirtualFocus:_,allowsTabNavigation:y=!1,scrollRef:b=a,linkBehavior:S=`action`,UNSTABLE_focusOnEntry:k}=e,{direction:A}=te(),j=v(),F=(e,n,r)=>{if(n!=null){if(t.isLink(n)&&S===`selection`&&p&&!Ee(e)){(0,N.flushSync)(()=>{t.setFocusedKey(n,r)});let i=De(a,n),o=t.getItemProps(n);if(i){j.open(i,e,o.href,o.routerOptions);return}return!1}if(t.setFocusedKey(n,r),t.isLink(n)&&S===`override`)return!1;if(e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(n);return}if(p&&!Ee(e)){t.replaceSelection(n);return}}return!1},L=e=>{if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyBelow?.(t.focusedKey);if(r==null&&s&&(r=n.getFirstKey?.(t.focusedKey)),r!=null){F(e,r);return}}return!1},ae=e=>{if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.():n.getKeyAbove?.(t.focusedKey);if(r==null&&s&&(r=n.getLastKey?.(t.focusedKey)),r!=null){F(e,r);return}}return!1},oe=e=>{if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return!1;let r=n.getFirstKey(t.focusedKey,R(e));if(t.setFocusedKey(r),r!=null){if(R(e)&&e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(r);return}if(p){t.replaceSelection(r);return}}}return!1},z=e=>{if(n.getKeyLeftOf){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyLeftOf?.(t.focusedKey);if(r==null&&s&&(r=A===`rtl`?n.getFirstKey?.(t.focusedKey):n.getLastKey?.(t.focusedKey)),r!=null){F(e,r,A===`rtl`?`first`:`last`);return}}return!1},B=e=>{if(n.getKeyRightOf){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyRightOf?.(t.focusedKey);if(r==null&&s&&(r=A===`rtl`?n.getLastKey?.(t.focusedKey):n.getFirstKey?.(t.focusedKey)),r!=null){F(e,r,A===`rtl`?`last`:`first`);return}}return!1},se=e=>{if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return!1;let r=n.getLastKey(t.focusedKey,R(e));if(t.setFocusedKey(r),r!=null){if(R(e)&&e.shiftKey&&t.selectionMode===`multiple`){t.extendSelection(r);return}if(p){t.replaceSelection(r);return}}}return!1},ce=e=>
1{if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);if(r!=null)return F(e,r)}return!1},V=e=>{if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);if(r!=null)return F(e,r)}return!1},H=()=>{if(t.selectionMode===`multiple`&&u!==!0){t.selectAll();return}return!1},U=()=>{if(f===`clearSelection`&&!l&&t.selectedKeys.size!==0){t.clearSelection();return}return!1},W=()=>{if(!y&&a.current){let e=c(a.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);let r=d();t&&(!w(t)||r&&!h(r))&&T(t)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},le=()=>(!y&&a.current&&a.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),G=(e,t)=>({[x()?e+`+Shift+Alt`:e+`+Shift+Control`]:t,[e+`+Shift`]:t,[x()?e+`+Alt`:e+`+Control`]:t,[e]:t}),{keyboardProps:ue}=r({shortcuts:{...G(`ArrowDown`,L),...G(`ArrowUp`,ae),...G(`ArrowLeft`,z),...G(`ArrowRight`,B),...G(`PageDown`,ce),...G(`PageUp`,V)},allowRepeats:!0}),{keyboardProps:de}=r({shortcuts:{...G(`Home`,oe),...G(`End`,se),"Mod+A":H,Escape:U,Tab:W,"Tab+Shift":le}}),K=(0,M.useRef)({top:0,left:0});D(b,`scroll`,()=>{K.current={top:b.current?.scrollTop??0,left:b.current?.scrollLeft??0}});let q=e=>{if(t.isFocused){g(e.currentTarget,C(e))||t.setFocused(!1);return}if(!g(e.currentTarget,C(e)))return;let r=ee();t.setFocused(!0);let i=e=>{e!=null&&(t.setFocusedKey(e),p&&!t.isSelected(e)&&t.replaceSelection(e))};if(k&&(r===`keyboard`||r===`virtual`))i(k===`first`?n.getFirstKey?.():n.getLastKey?.());else if(t.focusedKey==null){let r=e.relatedTarget;r&&e.currentTarget.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING?i(t.lastSelectedKey??n.getLastKey?.()):i(t.firstSelectedKey??n.getFirstKey?.())}else b.current&&(b.current.scrollTop=K.current.top,b.current.scrollLeft=K.current.left);if(t.focusedKey!=null&&b.current){let e=De(a,t.focusedKey);e instanceof HTMLElement&&(!w(e)&&!_&&T(e),(r===`keyboard`||k&&r===`virtual`)&&O(e,{containingElement:a.current}))}},fe=e=>{g(e.currentTarget,e.relatedTarget)||t.setFocused(!1)},J=(0,M.useRef)(!1);D(a,P,_?e=>{let{detail:n}=e;
1e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(J.current=!0)}:void 0);let Y=n.getFirstKey?.()??null;Pe(()=>{if(J.current){if(Y==null){let e=d();ie(a.current),I(e,null),t.collection.size>0&&(J.current=!1)}else t.setFocusedKey(Y),J.current=!1}},[Y,t.collection.size]),Pe(()=>{t.collection.size>0&&(J.current=!1)},[t.focusedKey]),D(a,re,_?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let pe=(0,M.useRef)(o),X=(0,M.useRef)(!1);(0,M.useEffect)(()=>{if(pe.current){let e=null;o===`first`&&(e=n.getFirstKey?.()??null),o===`last`&&(e=n.getLastKey?.()??null);let r=t.selectedKeys;if(r.size){for(let n of r)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e!=null&&p&&!r.size&&t.canSelectItem(e)&&t.replaceSelection(e),e==null&&!_&&a.current&&ne(a.current),t.collection.size>0&&(pe.current=!1,X.current=!0)}});let Z=(0,M.useRef)(t.focusedKey),Q=(0,M.useRef)(null);(0,M.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==Z.current||X.current)&&b.current&&a.current){let e=ee(),n=De(a,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||X.current)&&(Q.current&&cancelAnimationFrame(Q.current),Q.current=requestAnimationFrame(()=>{b.current&&(E(b.current,n),e!==`virtual`&&O(n,{containingElement:a.current}))}))}
1!_&&t.isFocused&&t.focusedKey==null&&Z.current!=null&&a.current&&ne(a.current),Z.current=t.focusedKey,X.current=!1}),(0,M.useEffect)(()=>()=>{Q.current&&cancelAnimationFrame(Q.current)},[]),D(a,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let me={...i(de,ue),onFocus:q,onBlur:fe,onMouseDown(e){b.current===C(e)&&e.preventDefault()}},{typeSelectProps:he}=Me({keyboardDelegate:n,selectionManager:t});m||(me=i(he,me));let ge;_||(ge=t.focusedKey==null?0:-1);let _e=ke(t.collection);return{collectionProps:i(me,{tabIndex:ge,"data-collection":_e})}}var Ie=500;function Le(e){let{isDisabled:t,pointerType:n,onLongPressStart:r,onLongPressEnd:o,onLongPress:s,threshold:c=Ie,accessibilityDescription:u}=e,d=(0,M.useRef)(void 0),{addGlobalListener:f,removeAllGlobalListeners:m}=a(),h=e=>n?e.pointerType===n:e.pointerType===`mouse`||e.pointerType===`touch`,{pressProps:g}=p({isDisabled:t,onPressStart(e){if(e.continuePropagation(),h(e)){r&&r({...e,type:`longpressstart`}),d.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),f(e.target,`click`,e=>e.preventDefault(),{once:!0}),l(e.target).activeElement!==e.target&&T(e.target),s&&s({...e,type:`longpress`}),d.current=void 0},c),e.pointerType===`touch`&&f(e.target,`contextmenu`,e=>e.preventDefault(),{once:!0});let t=b(e.target);f(t,`pointerup`,()=>{setTimeout(()=>{m()},100)},{once:!0})}},onPressEnd(e){d.current&&clearTimeout(d.current),o&&h(e)&&o({...e,type:`longpressend`})}}),_=k(s&&!t?u:void 0);return{longPressProps:i(g,_)}}function Re(e){let{id:t,selectionManager:n,key:r,ref:a,shouldSelectOnPressUp:o,shouldUseVirtualFocus:c,focus:l,isDisabled:u,onAction:m,allowsDifferentPressOrigin:g,linkBehavior:y=`action`}=e,b=v();t=f(t);let x=e=>{if(e.pointerType===`keyboard`&&Ee(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(y===`selection`&&a.current){let t=n.getItemProps(r);b.open(a.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}if(y===`override`||y===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(R(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,M.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(c?ie(a.current):l?l():d()!==a.current&&a.current&&ne(a.current))},[a,r,n.focusedKey,n.childFocusStrategy,n.isFocused,c]),u||=n.isDisabled(r);let S={};!c&&!u?S={tabIndex:r===n.focusedKey?0:-1,onFocus(e){C(e)===a.current&&n.setFocusedKey(r)}}:u&&(S.onMouseDown=e=>{e.preventDefault()}),(0,M.useEffect)(()=>{u&&n.focusedKey===r&&n.setFocusedKey(null)},[n,u,r]);let ee=n.isLink(r)&&y===`override`,te=m&&e.UNSTABLE_itemBehavior===`action`,w=n.isLink(r)&&y!==`selection`&&y!==`none`,T=!u&&n.canSelectItem(r)&&!ee&&!te,E=(m||w)&&!u,D=E&&(n.selectionBehavior===`replace`?!T:!T||n.isEmpty),O=E&&T&&n.selectionBehavior===`replace`,k=D||O,A=(0,M.useRef)(null),j=k&&T,N=(0,M.useRef)(!1),re=(0,M.useRef)(!1),P=n.getItemProps(r),F=e=>{m&&(m(),a.current?.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))),w&&a.current&&b.open(a.current,e,P.href,P.routerOptions)},I={ref:a};o?(I.onPressStart=e=>{A.current=e.pointerType,N.current=j,e.pointerType===`keyboard`&&(!k||Be(e.key))&&x(e)},g?(I.onPressUp=D?void 0:e=>{e.pointerType===`mouse`&&T&&x(e)},I.onPress=D?F:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&T&&x(e)}):I.onPress=e=>{if(D||O&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!ze(e.key))return;F(e)}else e.pointerType!==`keyboard`&&T&&x(e)}):(I.onPressStart=e=>{A.current=e.pointerType,N.current=j,re.current=D,T&&(e.pointerType===`mouse`&&!D||e.pointerType===`keyboard`&&(!E||Be(e.key)))&&x(e)},I.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&k&&ze(e.key)||e.pointerType===`mouse`&&re.current)&&(k?F(e):T&&x(e))});let L=Ae(n.collection);if(S[`data-collection`]=L,S[`data-key`]=r,I.preventFocusOnPress=c,c&&(I=i(I,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),P)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])P[e]&&(I[e]=s(I[e],P[e]));let{pressProps:ae,isPressed:oe}=p(I),z=O?e=>{A.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),F(e))}:void 0,{longPressProps:B}=Le({isDisabled:!j,onLongPress(e){e.pointerType===`touch`&&(x(e),n.setSelectionBehavior(`toggle`))}}),se=e=>{A.current===`touch`&&N.current&&e.preventDefault()},ce=y!==`none`&&n.isLink(r)?e=>{_.isOpening||e.preventDefault()}:void 0,V=i(S,T||D||c&&!u?ae:{},j?B:{},{onDoubleClick:z,onDragStartCapture:se,onClick:ce,id:t},c?{onMouseDown:e=>e.preventDefault()}:void 0),H=e=>{let t=e;for(;t&&t!==a.current;){let e=t.getAttribute(`data-collection`);if(e!=null)return e!==L;t=t.parentElement}return h(e)},U=V.onPointerDown;V.onPointerDown=e=>{let t=C(e);if(t&&t!==a.current&&H(t)){e.stopPropagation();return}U?.(e)};let W=V.onMouseDown;return V.onMouseDown=e=>{let t=C(e);if(t&&t!==a.current&&H(t)){e.stopPropagation();return}W?.(e)},{itemProps:V,isPressed:oe,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:u,allowsSelection:T,hasAction:k}}function ze(e){return e===`Enter`}function Be(e){return e===` `}function Ve(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function He(e){return Ue(e,0)}function Ue(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}
vendor: 5,081 bytes, line 1
1}function We(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Ge(e,t),t],i=[...Ge(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function Ge(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}function Ke(e){let t=M.version.split(`.`);return parseInt(t[0],10)>=19?e:e?`true`:void 0}var $=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function qe(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Je(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,M.useRef)(!1),[,s]=(0,M.useState)(!1),c=(0,M.useRef)(null),l=(0,M.useRef)(null),[,u]=(0,M.useState)(null),d=(0,M.useMemo)(()=>Ye(e.selectedKeys),[e.selectedKeys]),f=(0,M.useMemo)(()=>Ye(e.defaultSelectedKeys,new $),[e.defaultSelectedKeys]),[p,m]=S(d,f,e.onSelectionChange),h=(0,M.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[g,_]=(0,M.useState)(i);i===`replace`&&g===`toggle`&&typeof p==`object`&&p.size===0&&_(`replace`);let v=(0,M.useRef)(i);return(0,M.useEffect)(()=>{i!==v.current&&(_(i),v.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:g,setSelectionBehavior:_,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:p,setSelectedKeys(e){(r||!qe(e,p))&&m(e)},disabledKeys:h,disabledBehavior:a}}function Ye(e,t){return e?e===`all`?`all`:new $(e):t}var Xe=class e{constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}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 t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}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(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&We(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&We(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new $([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new $(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?We(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;
1let n=new $(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new $([t],t,t):new $;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new $;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],n=r=>{for(;r!=null;){if(this.canSelectItemIn(r,e)){let i=e.getItem(r);i?.type===`item`&&t.push(r),i?.hasChildNodes&&(this.allowsCellSelection||i.type!==`item`)&&n(He(Ve(i,e))?.key??null)}r=e.getKeyAfter(r)}};return n(e.getFirstKey()),t}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 $)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=t.getItem(e);return!(!n||n?.props?.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){let t=this.collection.getItem(e);return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!t?.props?.isDisabled)&&t?.props?.disabledBehavior!==`selection`}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}},Ze=class{build(e,t){return this.context=t,Qe(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(M.isValidElement(t)&&t.type===M.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];M.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}
vendor: 2,745 bytes, line 1
1getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(M.isValidElement(e.element)&&e.element.type===M.Fragment){let i=[];M.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(M.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:$e(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${et(t.type)}> in <${et(r?.type??`unknown parent type`)}>. Only <${et(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:(r?.level??0)+ +(r?.type===`item`),index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Qe(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Qe(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function $e(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function et(e){return e[0].toUpperCase()+e.slice(1)}function tt(e,t,n){let r=(0,M.useMemo)(()=>new Ze,[]),{children:i,items:a,collection:o}=e;return(0,M.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}export{I as C,oe as S,fe as _,Ve as a,z as b,Fe as c,Ce as d,we as f,he as g,be as h,Ke as i,Me as l,xe as m,Xe as n,Re as o,Te as p,Je as r,Le as s,tt as t,De as u,ve as v,ce as x,se as y};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.