1import{_ as C}from"./vendor-babel-runtime-BQtywwwd.js";import{r as n,$ as Y}from"./vendor-react-BxcIUS9o.js";import{$ as j}from"./vendor-radix-ui-react-collection-CX9RwUKm.js";import{$ as z}from"./vendor-radix-ui-react-direction-C2KetImH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"[email protected]+914"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cbb99038-607b-4751-a3fa-8e2ddc3e3a1e",e._sentryDebugIdIdentifier="sentry-dbid-cbb99038-607b-4751-a3fa-8e2ddc3e3a1e")})()}catch{}function I(e,t,{checkForDefaultPrevented:o=!0}={}){return function(c){if(e==null||e(c),o===!1||!c.defaultPrevented)return t==null?void 0:t(c)}}function Z(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function D(...e){return t=>e.forEach(o=>Z(o,t))}function q(...e){return n.useCallback(D(...e),e)}function H(e,t=[]){let o=[];function r(s,f){const u=n.createContext(f),d=o.length;o=[...o,f];function a(l){const{scope:$,children:g,...i}=l,p=($==null?void 0:$[e][d])||u,S=n.useMemo(()=>i,Object.values(i));return n.createElement(p.Provider,{value:S},g)}function E(l,$){const g=($==null?void 0:$[e][d])||u,i=n.useContext(g);if(i)return i;if(f!==void 0)return f;throw new Error(`\`${l}\` must be used within \`${s}\``)}return a.displayName=s+"Provider",[a,E]}const c=()=>{const s=o.map(f=>n.createContext(f));return function(u){const d=(u==null?void 0:u[e])||s;return n.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return c.scopeName=e,[r,J(c,...t)]}function J(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const r=e.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(s){const f=r.reduce((u,{useScope:d,scopeName:a})=>{const l=d(s)[`__scope${a}`];return{...u,...l}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:f}),[f])}};return o.scopeName=t.scopeName,o}const Q=globalThis!=null&&globalThis.document?n.useLayoutEffect:()=>{},W=Y.useId||(()=>{});let X=0;function ee(e){const[t,o]=n.useState(W());return Q(()=>{o(r=>r??String(X++))},[e]),t?`radix-${t}`:""}const N=n.forwardRef((e,t)=>{const{children:o,...r}=e,c=n.Children.toArray(o),s=c.find(ne);if(s){const f=s.props.children,u=c.map(d=>d===s?n.Children.count(f)>1?n.Children.only(null):n.isValidElement(f)?f.props.children:null:d);return n.createElement(F,C({},r,{ref:t}),n.isValidElement(f)?n.cloneElement(f,void 0,u):null)}return n.createElement(F,C({},r,{ref:t}),o)});N.displayName="Slot";const F=n.forwardRef((e,t)=>{const{children:o,...r}=e;return n.isValidElement(o)?n.cloneElement(o,{...oe(r,o.props),ref:D(t,o.ref)}):n.Children.count(o)>1?n.Children.only(null):null});F.displayName="SlotClone";const te=({children:e})=>n.createElement(n.Fragment,null,e);function ne(e){return n.isValidElement(e)&&e.type===te}function oe(e,t){const o={...t};for(const r in t){const c=e[r],s=t[r];/^on[A-Z]/.test(r)?c&&s?o[r]=(...u)=>{s(...u),c(...u)}:c&&(o[r]=c):r==="style"?o[r]={...c,...s}:r==="className"&&(o[r]=[c,s].filter(Boolean).join(" "))}return{...e,...o}}const re=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],O=re.reduce((e,t)=>{const o=n.forwardRef((r,c)=>{const{asChild:s,...f}=r,u=s?N:t;return n.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),n.createElement(u,C({},f,{ref:c}))});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function T(e){const t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...o)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...o)},[])}function ce({prop:e,defaultProp:t,onChange:o=()=>{}}){const[r,c]=se({defaultProp:t,onChange:o}),s=e!==void 0,f=s?e:r,u=T(o),d=n.useCallback(a=>
vendor: 2,372 bytes, line 1
1{if(s){const l=typeof a=="function"?a(e):a;l!==e&&u(l)}else c(a)},[s,e,c,u]);return[f,d]}function se({defaultProp:e,onChange:t}){const o=n.useState(e),[r]=o,c=n.useRef(r),s=T(t);return n.useEffect(()=>{c.current!==r&&(s(r),c.current=r)},[r,c,s]),o}const y="rovingFocusGroup.onEntryFocus",fe={bubbles:!1,cancelable:!0},_="RovingFocusGroup",[R,k,ue]=j(_),[ae,xe]=H(_,[ue]),[de,ie]=ae(_),le=n.forwardRef((e,t)=>n.createElement(R.Provider,{scope:e.__scopeRovingFocusGroup},n.createElement(R.Slot,{scope:e.__scopeRovingFocusGroup},n.createElement(be,C({},e,{ref:t}))))),be=n.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:c=!1,dir:s,currentTabStopId:f,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:a,...E}=e,l=n.useRef(null),$=q(t,l),g=z(s),[i=null,p]=ce({prop:f,defaultProp:u,onChange:d}),[S,m]=n.useState(!1),v=T(a),G=k(o),w=n.useRef(!1),[L,P]=n.useState(0);return n.useEffect(()=>{const b=l.current;if(b)return b.addEventListener(y,v),()=>b.removeEventListener(y,v)},[v]),n.createElement(de,{scope:o,orientation:r,dir:g,loop:c,currentTabStopId:i,onItemFocus:n.useCallback(b=>p(b),[p]),onItemShiftTab:n.useCallback(()=>m(!0),[]),onFocusableItemAdd:n.useCallback(()=>P(b=>b+1),[]),onFocusableItemRemove:n.useCallback(()=>P(b=>b-1),[])},n.createElement(O.div,C({tabIndex:S||L===0?-1:0,"data-orientation":r},E,{ref:$,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{w.current=!0}),onFocus:I(e.onFocus,b=>{const U=!w.current;if(b.target===b.currentTarget&&U&&!S){const A=new CustomEvent(y,fe);if(b.currentTarget.dispatchEvent(A),!A.defaultPrevented){const x=G().filter(h=>h.focusable),B=x.find(h=>h.active),V=x.find(h=>h.id===i),K=[B,V,...x].filter(Boolean).map(h=>h.ref.current);M(K)}}w.current=!1}),onBlur:I(e.onBlur,()=>m(!1))})))}),$e="RovingFocusGroupItem",pe=n.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:c=!1,tabStopId:s,...f}=e,u=ee(),d=s||u,a=ie($e,o),E=a.currentTabStopId===d,l=k(o),{onFocusableItemAdd:$,onFocusableItemRemove:g}=a;return n.useEffect(()=>{if(r)return $(),()=>g()},[r,$,g]),n.createElement(R.ItemSlot,{scope:o,id:d,focusable:r,active:c},n.createElement(O.span,C({tabIndex:E?0:-1,"data-orientation":a.orientation},f,{ref:t,onMouseDown:I(e.onMouseDown,i=>{r?a.onItemFocus(d):i.preventDefault()}),onFocus:I(e.onFocus,()=>a.onItemFocus(d)),onKeyDown:I(e.onKeyDown,i=>
vendor: 1,087 bytes, lines 1-2
1{if(i.key==="Tab"&&i.shiftKey){a.onItemShiftTab();return}if(i.target!==i.currentTarget)return;const p=ge(i,a.orientation,a.dir);if(p!==void 0){i.preventDefault();let m=l().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")m.reverse();else if(p==="prev"||p==="next"){p==="prev"&&m.reverse();const v=m.indexOf(i.currentTarget);m=a.loop?Ee(m,v+1):m.slice(v+1)}setTimeout(()=>M(m))}})})))}),me={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ve(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ge(e,t,o){const r=ve(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return me[r]}function M(e){const t=document.activeElement;for(const o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function Ee(e,t){return e.map((o,r)=>e[(t+r)%e.length])}const ye=le,Fe=pe;export{xe as $,ye as a,Fe as b}; 2//# sourceMappingURL=vendor-radix-ui-react-roving-focus-C9cJnRSo.js.map
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.