1import{a as e,n as t,t as n}from"./jsx-runtime-C27Mmbu5.js";import{n as r,t as i}from"./utils-BVu9C6Q1.js";function a(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var o={};function s(e,t,n,r,i){let a={...p(e,o)};return t&&(a=l(a,t)),n&&(a=l(a,n)),r&&(a=l(a,r)),i&&(a=l(a,i)),a}function c(e){if(e.length===0)return o;if(e.length===1)return p(e[0],o);let t={...p(e[0],o)};for(let n=1;n<e.length;n+=1)t=l(t,e[n]);return t}function l(e,t){return f(t)?t(e):u(e,t)}function u(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=a(e.style,r);break;case`className`:e[n]=g(e.className,r);break;default:d(n,r)?e[n]=m(e[n],r):e[n]=r}}return e}function d(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function f(e){return typeof e==`function`}function p(e,t){return f(e)?e(t):e??o}function m(e,t){return t?e?n=>{if(ee(n)){let r=n;h(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function h(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function g(e,t){return t?e?t+` `+e:t:e}function ee(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}var _=e(t());function te(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var v=te(`https://base-ui.com/production-error`,`Base UI`),y={};function b(e,t){let n=_.useRef(y);return n.current===y&&(n.current=e(t)),n}function x(e,t,n,r){let i=b(S).current;return re(i,e,t,n,r)&&C(i,[e,t,n,r]),i.callback}function ne(e){let t=b(S).current;return ie(t,e)&&C(t,e),t.callback}function S(){return{callback:null,cleanup:null,refs:[]}}function re(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function ie(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function C(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var ae=19;function w(e){return ae>=e}function T(e){if(!_.isValidElement(e))return null;let t=e,n=t.props;return(w(19)?n?.ref:t.ref)??null}function oe(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function se(e,t){return typeof e==`function`?e(t):e}function ce(e,t){return typeof e==`function`?e(t):e}function le(){}var ue=Object.freeze([]),E=Object.freeze({}),de={style:{transition:`none`}},fe=`data-base-ui-click-trigger`,pe={fallbackAxisSide:`none`},me={fallbackAxisSide:`end`},he={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function D(e,t,n={}){let r=t.render,i=ge(t,n);return n.enabled===!1?null:ve(e,r,i,n.state??E)}function ge(e,t={}){let{className:n,style:r,render:i}=e,{state:o=E,ref:s,props:l,stateAttributesMapping:u,enabled:d=!0}=t,f=d?se(n,o):void 0,p=d?ce(r,o):void 0,m=d?oe(o,u):E,h=d?a(m,Array.isArray(l)?c(l):l)??E:E;return typeof document<`u`&&(d?Array.isArray(s)?h.ref=ne([h.ref,T(i),...s]):h.ref=x(h.ref,T(i),s):x(null,null)),d?(f!==void 0&&(h.className=g(h.className,f)),p!==void 0&&(h.style=a(h.style,p)),h):E}var _e=Symbol.for(`react.lazy`);function ve(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=s(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===_e&&(i=_.Children.toArray(t)[0]),_.cloneElement(i,e)}if(e&&typeof e==`string`)return ye(e,n);throw Error(v(8))}function ye(e,t){return e===`button`?(0,_.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,_.createElement)(`img`,{alt:``,...t,key:t.key}):_.createElement(e,t)}var O=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,k=r,A=(e,t)=>
1n=>{if(t?.variants==null)return k(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=O(t)||O(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return k(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function j(){return typeof window<`u`}function M(e){return F(e)?(e.nodeName||``).toLowerCase():`#document`}function N(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function P(e){return((F(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function F(e){return j()?e instanceof Node||e instanceof N(e).Node:!1}function I(e){return j()?e instanceof Element||e instanceof N(e).Element:!1}function L(e){return j()?e instanceof HTMLElement||e instanceof N(e).HTMLElement:!1}function R(e){return!j()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof N(e).ShadowRoot}function z(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function be(e){return/^(table|td|th)$/.test(M(e))}function B(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xe=/transform|translate|scale|rotate|perspective|filter/,Se=/paint|layout|strict|content/,V=e=>!!e&&e!==`none`,Ce;function H(e){let t=I(e)?G(e):e;return V(t.transform)||V(t.translate)||V(t.scale)||V(t.rotate)||V(t.perspective)||!U()&&(V(t.backdropFilter)||V(t.filter))||xe.test(t.willChange||``)||Se.test(t.contain||``)}function we(e){let t=K(e);for(;L(t)&&!W(t);){if(H(t))return t;if(B(t))return null;t=K(t)}return null}function U(){return Ce??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ce}function W(e){return/^(html|body|#document)$/.test(M(e))}function G(e){return N(e).getComputedStyle(e)}function Te(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if(M(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||R(e)&&e.host||P(e);return R(t)?t.host:t}function q(e){let t=K(e);return W(t)?e.ownerDocument?e.ownerDocument.body:e.body:L(t)&&z(t)?t:q(t)}function J(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=q(e),i=r===e.ownerDocument?.body,a=N(r);if(i){let e=Y(a);return t.concat(a,a.visualViewport||[],z(r)?r:[],e&&n?J(e):[])}else return t.concat(r,J(r,[],n))}function Y(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var X=_[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Ee=X&&X!==_.useLayoutEffect?X:e=>e();function Z(e){let t=b(De).current;return t.next=e,Ee(t.effect),t.trampoline}function De(){let e={next:void 0,callback:Oe,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Oe(){}var ke={..._},Ae=typeof document<`u`?_.useLayoutEffect:()=>{},je=_.createContext(void 0);function Me(e=!1){let t=_.useContext(je);if(t===void 0&&!e)throw Error(v(16));return t}function Ne(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:_.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Pe(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=_.useRef(null),c=Me(!0),l=a??c!==void 0,{props:u}=Ne({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),d=_.useCallback(()=>{let e=o.current;Q(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return Ae(d,[d]),{getButtonProps:_.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:c,...d}=e;return s({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(h(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=Q(a),c=!i&&Fe(a),u=r&&(i?s:!c),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&l&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),c||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(h(e),a?.(e),e.target===e.currentTarget&&i&&l&&Q(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!l&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}c?.(e)}},i?void 0:{role:`button`},u,d)},[t,u,l,i]),buttonRef:Z(e=>{o.current=e,d()})}}function Q(e){return L(e)&&e.tagName===`BUTTON`}function Fe(e){return!!(e?.tagName===`A`&&e?.href)}var Ie=_.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,...s}=e,{getButtonProps:c,buttonRef:l}=Pe({disabled:i,focusableWhenDisabled:a,native:o});return D(`button`,e,{state:{disabled:i},ref:[t,l],props:[s,c]})}),Le=n(),$=A(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-
1px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function Re({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,Le.jsx)(Ie,{"data-slot":`button`,className:i($({variant:t,size:n,className:e})),...r})}export{fe as A,b as B,z as C,U as D,B as E,ue as F,s as H,E as I,le as L,pe as M,me as N,A as O,he as P,w as R,F as S,be as T,v as V,N as _,Me as a,L as b,Z as c,P as d,Y as f,K as g,J as h,je as i,de as j,D as k,G as l,Te as m,$ as n,Ae as o,M as p,Pe as r,ke as s,Re as t,we as u,H as v,R as w,W as x,I as y,x as z};
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.