1import{Lg as e,Ug as t,zg as n}from"./messages-B7vy2gX4.js";import{n as r,t as i}from"./utils-DXalBF5w.js";var a=t(n()),o=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,s=r,c=(e,t)=>n=>{if(t?.variants==null)return s(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 s=o(t)||o(a);return r[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return s(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,...c}[t]):{...i,...c}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function l(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 u=l(`https://base-ui.com/production-error`,`Base UI`),d={};function f(e,t){let n=a.useRef(d);return n.current===d&&(n.current=e(t)),n}function p(e,t,n,r){let i=f(h).current;return ee(i,e,t,n,r)&&g(i,[e,t,n,r]),i.callback}function m(e){let t=f(h).current;return te(t,e)&&g(t,e),t.callback}function h(){return{callback:null,cleanup:null,refs:[]}}function ee(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function te(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function g(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 ne=19;function _(e){return ne>=e}function v(e){if(!a.isValidElement(e))return null;let t=e,n=t.props;return(_(19)?n?.ref:t.ref)??null}function y(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function re(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 ie(e,t){return typeof e==`function`?e(t):e}function ae(e,t){return typeof e==`function`?e(t):e}var b={};function x(e,t,n,r,i){let a={...w(e,b)};return t&&(a=S(a,t)),n&&(a=S(a,n)),r&&(a=S(a,r)),i&&(a=S(a,i)),a}function oe(e){if(e.length===0)return b;if(e.length===1)return w(e[0],b);let t={...w(e[0],b)};for(let n=1;n<e.length;n+=1)t=S(t,e[n]);return t}function S(e,t){return C(t)?t(e):se(e,t)}function se(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=y(e.style,r);break;case`className`:e[n]=E(e.className,r);break;default:ce(n,r)?e[n]=le(e[n],r):e[n]=r}}return e}function ce(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 C(e){return typeof e==`function`}function w(e,t){return C(e)?e(t):e??b}function le(e,t){return t?e?n=>{if(ue(n)){let r=n;T(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:t:e}function T(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function E(e,t){return t?e?t+` `+e:t:e}function ue(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function de(){}var fe=Object.freeze([]),D=Object.freeze({}),pe={style:{transition:`none`}},me=`data-base-ui-click-trigger`,he={fallbackAxisSide:`none`},ge={fallbackAxisSide:`end`},_e={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0};function O(e,t,n={}){let r=t.render,i=ve(t,n);return n.enabled===!1?null:be(e,r,i,n.state??D)}function ve(e,t={}){let{className:n,style:r,render:i}=e,{state:a=D,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?ie(n,a):void 0,d=l?ae(r,a):void 0,f=l?re(a,c):D,h=l?y(f,Array.isArray(s)?oe(s):s)??D:D;return typeof document<`u`&&(l?Array.isArray(o)?h.ref=m([h.ref,v(i),...o]):h.ref=p(h.ref,v(i),o):p(null,null)),l?(u!==void 0&&(h.className=E(h.className,u)),d!==void 0&&(h.style=y(h.style,d)),h):D}var ye=Symbol.for(`react.lazy`);function be(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=x(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===ye&&(i=a.Children.toArray(t)[0]),a.cloneElement(i,e)}if(e&&typeof e==`string`)return xe(e,n);throw Error(u(8))}function xe(e,t){return e===`button`?(0,a.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,a.createElement)(`img`,{alt:``,...t,key:t.key}):a.createElement(e,t)}var k=a[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Se=k&&k!==a.useLayoutEffect?k:e=>e();function A(e){let t=f(Ce).current;return t.next=e,Se(t.effect),t.trampoline}function Ce(){let e={next:void 0,callback:we,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function we(){}var Te={...a};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}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ee(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 De=/transform|translate|scale|rotate|perspective|filter/,Oe=/paint|layout|strict|content/,V=e=>!!e&&e!==`none`,H;function U(e){let t=I(e)?K(e):e;return V(t.transform)||V(t.translate)||V(t.scale)||V(t.rotate)||V(t.perspective)||!W()&&
1(V(t.backdropFilter)||V(t.filter))||De.test(t.willChange||``)||Oe.test(t.contain||``)}function ke(e){let t=q(e);for(;L(t)&&!G(t);){if(U(t))return t;if(B(t))return null;t=q(t)}return null}function W(){return H??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),H}function G(e){return/^(html|body|#document)$/.test(M(e))}function K(e){return N(e).getComputedStyle(e)}function Ae(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(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 J(e){let t=q(e);return G(t)?e.ownerDocument?e.ownerDocument.body:e.body:L(t)&&z(t)?t:J(t)}function Y(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=J(e),i=r===e.ownerDocument?.body,a=N(r);if(i){let e=X(a);return t.concat(a,a.visualViewport||[],z(r)?r:[],e&&n?Y(e):[])}else return t.concat(r,Y(r,[],n))}function X(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Z=typeof document<`u`?a.useLayoutEffect:()=>{},je=a.createContext(void 0);function Me(e=!1){let t=a.useContext(je);if(t===void 0&&!e)throw Error(u(16));return t}function Ne(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,s=r&&t!==!1,c=r&&t===!1;return{props:a.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!o&&n&&(e.tabIndex=t?i:-1)),(o&&(t||s)||!o&&n)&&(e[`aria-disabled`]=n),o&&(!t||c)&&(e.disabled=n),e},[r,n,t,s,c,o,i])}}function Pe(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:o}=e,s=a.useRef(null),c=Me(!0),l=o??c!==void 0,{props:u}=Ne({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),d=a.useCallback(()=>{let e=s.current;Q(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return Z(d,[d]),{getButtonProps:a.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...c}=e;return x({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(T(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(T(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}s?.(e)}},i?void 0:{role:`button`},u,c)},[t,u,l,i]),buttonRef:A(e=>{s.current=e,d()})}}function Q(e){return L(e)&&e.tagName===`BUTTON`}function Fe(e){return!!(e?.tagName===`A`&&e?.href)}var Ie=a.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 O(`button`,e,{state:{disabled:i},ref:[t,l],props:[s,c]})}),Le=e(),$=c(`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-px 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 focu
1s-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{he as A,u as B,B as C,O as D,A as E,de as F,x as I,_ as L,_e as M,fe as N,me as O,D as P,p as R,Ee as S,Te as T,c as V,L as _,Z as a,z as b,P as c,Ae as d,Y as f,I as g,U as h,Me as i,ge as j,pe as k,X as l,N as m,$ as n,K as o,q as p,Pe as r,ke as s,Re as t,M as u,G as v,W as w,R as x,F as y,f 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.