1import{r as d,j as v}from"./chunk-QFMPRPBF-CW8PFO20.js";import{a as x}from"./button-S5-rnyuX.js";const p=d.createContext(void 0);function g(){const n=d.useContext(p);if(!n)throw new Error("Tabs components must be used within a Tabs provider");return n}function h({defaultValue:n,value:s,onValueChange:o,orientation:i="horizontal",className:c,children:t}){const[e,a]=d.useState(n??""),r=s!==void 0,b={activeValue:r?s:e,setActiveValue:l=>{r||a(l),o==null||o(l)},orientation:i};return v.jsx(p.Provider,{value:b,children:v.jsx("div",{"data-slot":"tabs",className:x("flex flex-col gap-2",c),children:t})})}function y({className:n,children:s}){const{orientation:o}=g(),i=d.useRef(null),c=t=>{var u,f;const e=Array.from(((u=i.current)==null?void 0:u.querySelectorAll('[role="tab"]:not([disabled])'))??[]);if(e.length===0)return;const a=e.findIndex(b=>b===document.activeElement);if(a===-1)return;let r=a;switch(t.key){case"ArrowRight":case"ArrowDown":t.preventDefault(),r=(a+1)%e.length;break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),r=(a-1+e.length)%e.length;break;case"Home":t.preventDefault(),r=0;break;case"End":t.preventDefault(),r=e.length-1;break;default:return}(f=e[r])==null||f.focus()};return v.jsx("div",{ref:i,"data-slot":"tabs-list",role:"tablist","aria-orientation":o,tabIndex:-1,onKeyDown:c,className:x("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[0.1875rem]",n),children:s})}function I({value:n,disabled:s=!1,className:o,children:i}){const{activeValue:c,setActiveValue:t}=g(),e=c===n,a=d.useId(),r=`${a}-trigger`,u=`${a}-panel`,f=()=>{s||t(n)},b=l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),s||t(n))};return v.jsx("button",{id:r,type:"button",role:"tab","aria-selected":e,"aria-controls":u,"aria-disabled":s,tabIndex:e?0:-1,disabled:s,"data-slot":"tabs-trigger","data-state":e?"active":"inactive","data-disabled":s?"true":void 0,onClick:f,onKeyDown:b,className:x("data-[state=active]:bg-background focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-0.0625rem)] flex-1 select-none items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[0.1875rem] focus-visible:outline-1 cursor-pointer disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:i})}function k({value:n,className:s,children:o}){const{activeValue:i}=g(),c=i===n,t=d.useId(),e=`${t}-trigger`,a=`${t}-panel`;return c?v.jsx("div",{id:a,role:"tabpanel","aria-labelledby":e,tabIndex:0,"data-slot":"tabs-content","data-state":c?"active":"inactive",className:x("flex-1 outline-none",s),children:o}):null}export{h as T,y as a,I as b,k as c};
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.