1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{a as n,c as r}from"./react-intl-DlKP8ATg.js";import{t as i}from"./jsx-runtime-BdxMnOeJ.js";import{t as a}from"./classnames-CfLRLWYq.js";import{t as o}from"./close-DIPoUQpY.js";import{t as s}from"./icon_button-DfNtv8BJ.js";import{t as c}from"./popover-CMoU7E4P.js";import{t as l}from"./useSelectableClick-JYr_1CvO.js";var u=e(t()),d=e(a()),f={closeButton:`_comp_alt_text_badge__closeButton`},p=i(),m=({description:e,className:t})=>{let i=r(),a=(0,u.useId)(),m=`${a}-popover`,h=`${a}-title`,[g,_]=(0,u.useState)(null),v=(0,u.useRef)(null),[y,b]=(0,u.useState)(!1),x=(0,u.useCallback)(()=>{b(e=>!e),setTimeout(()=>{v.current?.focus()},0)},[b]),S=(0,u.useCallback)(()=>{b(!1),g?.focus()},[g]),[C,w]=l(S);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`button`,{type:`button`,ref:_,className:(0,d.default)(`media-gallery__alt__label`,t),onClick:x,"aria-expanded":y,"aria-controls":m,"aria-haspopup":`dialog`,children:`ALT`}),(0,p.jsx)(c,{isOpen:y,onClose:S,reference:g,placement:`top-end`,offset:4,children:({props:t})=>(0,p.jsx)(`div`,{...t,className:`hover-card-controller`,children:(0,p.jsxs)(`div`,{className:`info-tooltip dropdown-animation`,role:`dialog`,"aria-labelledby":h,ref:v,id:m,onMouseDown:C,onMouseUp:w,tabIndex:0,children:[(0,p.jsx)(`h4`,{id:h,children:(0,p.jsx)(n,{id:`alt_text_badge.title`,defaultMessage:`Alt text`})}),(0,p.jsx)(s,{title:i.formatMessage({id:`lightbox.close`,defaultMessage:`Close`}),icon:`close`,iconComponent:o,onClick:S,className:f.closeButton}),(0,p.jsx)(`p`,{children:e})]})})})]})};export{m as t}; 2//# sourceMappingURL=alt_text_badge-DgGj3HLf.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.