@ahmetilhn/hanui 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.cjs +3 -3
- package/build/index.cjs.map +1 -1
- package/build/index.js +420 -420
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),z=require("@ahmetilhn/handy-utils"),I=require("react-bootstrap-icons"),yt=require("react-dom"),E={n0:"#ffffff",n25:"#fafbfc",n50:"#f6f7f9",n100:"#eef0f4",n150:"#e7eaef",n200:"#e2e6ec",n250:"#d6dce4",n300:"#c9d0da",n550:"#626c7a",n600:"#5a6472",n700:"#3a424f",n900:"#11151b"},ce={base:"#1f2937",two:"#2b3646",three:"#3a4658",ink:"#12161d",inkTwo:"#1c222b"},_e={base:"#f59e0b",hover:"#d98706",active:"#b87205",soft:"#f8cd80",dark:"#fbbf24",darkHover:"#f0af12",on:"#291500"},U={base:"#2f6fed",hover:"#1d54c4",active:"#17439c",text:"#1d54c4",tint:"#eaf1fe",line:"#bcd2fb",dark:"#5b93ff",darkHover:"#7aa8ff",darkTint:"#16243c",darkLine:"#2a3f63"},F={okBg:"#e8f4eb",okFg:"#1d6e31",okLine:"#a8dcb7",okBgDark:"#122817",okFgDark:"#34c759",okLineDark:"#22542f",warnBg:"#fdf0dd",warnFg:"#7a3e02",warnLine:"#ebc687",warnBgDark:"#2c2008",warnFgDark:"#f5c86b",warnLineDark:"#55401a",offBg:"#f1f2f5",offFg:"#3a424f",offLine:"#ccd2db",offBgDark:"#212630",offFgDark:"#a3adbb",offLineDark:"#333b47",badBg:"#f8ebeb",badFg:"#bb1e1e",badLine:"#e6a6a6",badBgDark:"#310f0f",badFgDark:"#e97575",badLineDark:"#621b1b",oemBg:"#eaf1fe",oemFg:"#16305c",oemLine:"#a9c6f9",oemBgDark:"#152139",oemFgDark:"#9dc0ff",oemLineDark:"#27395c",altBg:"#eeebfa",altFg:"#2e2661",altLine:"#c0b6ea",altBgDark:"#1d1a33",altFgDark:"#bfb3f5",altLineDark:"#332d56"},qe={base:"#dc2626",hover:"#bb1e1e",dark:"#e45b5b",darkHover:"#ef7a72",onDark:"#1a0b0a"},Re={red:"#dc2626",redDark:"#e35252",green:"#299d46",greenDark:"#4cd76c",greenHover:"#23883c",greenHoverDark:"#63e084",onGreen:"#06280f"},Dt={bg:"#e8f4eb",fg:"#1d6e31",bgDark:"#122817",fgDark:"#34c759"},ga={light:"#9a5f04",dark:"#f0b429"},L=(e,a)=>{const n=e.replace("#",""),r=n.length===3?n.split("").map(_=>_+_).join(""):n,o=parseInt(r.slice(0,2),16),c=parseInt(r.slice(2,4),16),i=parseInt(r.slice(4,6),16);return`rgba(${o}, ${c}, ${i}, ${a})`},ae="#000000",fa={page:E.n50,surface:E.n0,"surface-2":E.n100,"surface-3":E.n150,"surface-inset":E.n25,border:E.n250,"border-strong":E.n300,text:E.n900,"text-2":E.n600,"text-3":E.n550,graphite:ce.base,"graphite-2":ce.two,"graphite-3":ce.three,action:ce.base,"action-hover":ce.two,"action-active":ce.three,"on-action":E.n0,"action-soft":E.n300,"on-action-soft":E.n700,amber:_e.base,"amber-hover":_e.hover,"amber-active":_e.active,"amber-soft":_e.soft,"on-amber":_e.on,blue:U.base,"blue-hover":U.hover,"blue-active":U.active,"blue-text":U.text,"blue-tint":U.tint,"blue-line":U.line,"ok-bg":F.okBg,"ok-fg":F.okFg,"ok-line":F.okLine,"warn-bg":F.warnBg,"warn-fg":F.warnFg,"warn-line":F.warnLine,"off-bg":F.offBg,"off-fg":F.offFg,"off-line":F.offLine,"bad-bg":F.badBg,"bad-fg":F.badFg,"bad-line":F.badLine,"oem-bg":F.oemBg,"oem-fg":F.oemFg,"oem-line":F.oemLine,"alt-bg":F.altBg,"alt-fg":F.altFg,"alt-line":F.altLine,"sale-bg":Dt.bg,"sale-fg":Dt.fg,"red-accent":Re.red,"green-accent":Re.green,"green-accent-hover":Re.greenHover,"on-green":Re.onGreen,star:ga.light,"danger-solid":qe.base,"danger-solid-hover":qe.hover,"on-danger":E.n0,"nav-bg":E.n0,"nav-bg-2":E.n100,"nav-fg":E.n900,"nav-fg-2":E.n600,"nav-fg-3":E.n550,"nav-line":E.n200,"nav-line-strong":E.n300,"nav-hover":E.n100,"footer-bg":E.n100,"shadow-xs":`0 1px 2px ${L(E.n900,.05)}`,"shadow-sm":`0 1px 2px ${L(E.n900,.05)}, 0 1px 3px ${L(E.n900,.04)}`,"shadow-md":`0 2px 4px ${L(E.n900,.04)}, 0 6px 16px ${L(E.n900,.07)}`,"shadow-lg":`0 4px 8px ${L(E.n900,.05)}, 0 16px 32px ${L(E.n900,.1)}`,"shadow-xl":`0 8px 16px ${L(E.n900,.06)}, 0 28px 56px ${L(E.n900,.13)}`,"shadow-up":`0 -2px 4px ${L(E.n900,.03)}, 0 -8px 24px ${L(E.n900,.08)}`,ring:`0 0 0 3px ${L(U.base,.28)}`,"ring-color":U.base,"ring-danger":`0 0 0 3px ${L(qe.base,.24)}`,"ring-ok":`0 0 0 4px ${L(F.okFg,.16)}`,scrim:L(E.n900,.6),"scrim-soft":L(E.n900,.32),glass:L(E.n0,.92),"glass-solid":E.n0,"on-scrim":E.n0,"skeleton-a":E.n100,"skeleton-b":E.n25,track:L(E.n900,.12),"media-bg":E.n100,"glow-1":L(U.base,.1),"glow-2":L(U.base,.06),"glow-amber":L(_e.base,.09)},xa={page:"#0e1116",surface:"#171b22","surface-2":"#1f242d","surface-3":"#262c36","surface-inset":"#13171d",border:"#262c36","border-strong":"#363e4a",text:"#e7eaee","text-2":"#9aa4b2","text-3":"#818b99",graphite:ce.ink,"graphite-2":ce.inkTwo,"graphite-3":ce.two,action:E.n150,"action-hover":E.n0,"action-active":E.n300,"on-action":E.n900,"action-soft":"#414a58","on-action-soft":E.n300,amber:_e.dark,"amber-hover":_e.darkHover,"amber-active":_e.base,"amber-soft":"#6d5316","on-amber":_e.on,blue:U.dark,"blue-hover":U.darkHover,"blue-active":U.base,"blue-text":U.dark,"blue-tint":U.darkTint,"blue-line":U.darkLine,"ok-bg":F.okBgDark,"ok-fg":F.okFgDark,"ok-line":F.okLineDark,"warn-bg":F.warnBgDark,"warn-fg":F.warnFgDark,"warn-line":F.warnLineDark,"off-bg":F.offBgDark,"off-fg":F.offFgDark,"off-line":F.offLineDark,"bad-bg":F.badBgDark,"bad-fg":F.badFgDark,"bad-line":F.badLineDark,"oem-bg":F.oemBgDark,"oem-fg":F.oemFgDark,"oem-line":F.oemLineDark,"alt-bg":F.altBgDark,"alt-fg":F.altFgDark,"alt-line":F.altLineDark,"sale-bg":Dt.bgDark,"sale-fg":Dt.fgDark,"red-accent":Re.redDark,"green-accent":Re.greenDark,"green-accent-hover":Re.greenHoverDark,"on-green":Re.onGreen,star:ga.dark,"danger-solid":qe.dark,"danger-solid-hover":qe.darkHover,"on-danger":qe.onDark,"nav-bg":ce.ink,"nav-bg-2":ce.inkTwo,"nav-fg":"#e7eaee","nav-fg-2":"#9aa4b2","nav-fg-3":"#818b99","nav-line":"#262c36","nav-line-strong":"#363e4a","nav-hover":L(E.n0,.07),"footer-bg":ce.ink,"shadow-xs":`0 1px 2px ${L(ae,.4)}`,"shadow-sm":`0 1px 2px ${L(ae,.4)}, 0 1px 3px ${L(ae,.3)}`,"shadow-md":`0 2px 4px ${L(ae,.35)}, 0 6px 16px ${L(ae,.45)}`,"shadow-lg":`0 4px 8px ${L(ae,.4)}, 0 16px 32px ${L(ae,.55)}`,"shadow-xl":`0 8px 16px ${L(ae,.45)}, 0 28px 56px ${L(ae,.6)}`,"shadow-up":`0 -2px 4px ${L(ae,.3)}, 0 -8px 24px ${L(ae,.45)}`,ring:`0 0 0 3px ${L(U.dark,.36)}`,"ring-color":U.dark,"ring-danger":`0 0 0 3px ${L(qe.dark,.32)}`,"ring-ok":`0 0 0 4px ${L(F.okFgDark,.2)}`,scrim:L(ae,.68),"scrim-soft":L(ae,.45),glass:L("#1f242d",.92),"glass-solid":"#1f242d","on-scrim":E.n0,"skeleton-a":"#1f242d","skeleton-b":"#262c36",track:L(E.n0,.14),"media-bg":"#1f242d","glow-1":L(U.base,.2),"glow-2":L(U.dark,.1),"glow-amber":L(_e.dark,.12)},Xa={"radius-xs":"4px","radius-sm":"6px","radius-md":"8px","radius-lg":"12px","radius-xl":"16px","radius-pill":"999px","space-0":"0","space-1":"4px","space-2":"8px","space-3":"12px","space-4":"16px","space-5":"24px","space-6":"32px","space-7":"48px","space-8":"64px","space-9":"96px","font-size-2xs":"12px","font-size-xs":"13px","font-size-sm":"15px","font-size-base":"16px","font-size-body":"17px","font-size-lg":"19px","font-size-xl":"23px","font-size-2xl":"29px","font-size-3xl":"37px","font-size-4xl":"47px","leading-none":"1","leading-tight":"1.16","leading-snug":"1.35","leading-normal":"1.62","leading-relaxed":"1.75","icon-xs":"14px","icon-sm":"16px","icon-md":"18px","icon-lg":"20px","icon-xl":"24px","duration-instant":"80ms","duration-fast":"140ms","duration-normal":"200ms","duration-slow":"320ms","ease-out":"cubic-bezier(0.22, 1, 0.36, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)","ease-spring":"cubic-bezier(0.34, 1.4, 0.64, 1)","duration-spin":"700ms","duration-shimmer":"1400ms"},Ga={"space-2":"6px","space-3":"8px","space-4":"12px","space-5":"16px","space-6":"24px","space-7":"32px","font-size-2xs":"11px","font-size-xs":"12px","font-size-sm":"13px","font-size-base":"15px","font-size-body":"16px","font-size-lg":"18px","font-size-xl":"21px","font-size-2xl":"25px","font-size-3xl":"31px","font-size-4xl":"39px","leading-normal":"1.5","leading-relaxed":"1.6"},Qa={heading:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",body:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",mono:"ui-monospace, 'SF Mono', Menlo, Consolas, monospace"},sa="--hanui-",ra="hanui-theme-overrides",Ye="data-hanui-theme",va="data-hanui-density",oa="hanui-theme-switching",Ja=(e,a)=>{const n=e==="dark"?xa:fa,r=(e==="dark"?a==null?void 0:a.dark:a==null?void 0:a.light)??{};return{...n,...r}},ya=e=>{const a=[],n=(i,_=" ")=>Object.entries(i).map(([h,u])=>`${_}${sa}${h}: ${u};`).join(`
|
|
2
2
|
`),r=e.fonts??{},o=Object.entries(r).filter(([,i])=>!!i);o.length>0&&a.push(`:root {
|
|
3
|
-
${o.map(([i,
|
|
3
|
+
${o.map(([i,_])=>` ${sa}font-${i}: ${_};`).join(`
|
|
4
4
|
`)}
|
|
5
5
|
}`);const c=e.metrics??{};if(Object.keys(c).length>0){const i=n(c);a.push(`:root {
|
|
6
6
|
${i}
|
|
@@ -18,5 +18,5 @@ ${n(e.dark," ")}
|
|
|
18
18
|
}
|
|
19
19
|
}`)}return a.join(`
|
|
20
20
|
|
|
21
|
-
`)},wa=e=>{if(!H.isClient())return;const a=e?ya(e):"",n=document.getElementById(ra);if(a===""){n==null||n.remove();return}const r=n??document.createElement("style");r.id=ra,r.textContent=a,n||document.head.appendChild(r)},ka=s.createContext({}),z=()=>s.useContext(ka),Wa=({children:e,theme:a,linkComponent:n,labels:r})=>{const o=s.useMemo(()=>a?JSON.stringify(a):"",[a]);s.useEffect(()=>{wa(a)},[o]);const c=s.useRef(a);c.current=a;const i=s.useMemo(()=>({theme:c.current,linkComponent:n,labels:r}),[o,n,r]);return t.jsx(ka.Provider,{value:i,children:e})},Za=(e={})=>{wa(e.theme),H.isClient()&&(e.colorScheme&&document.documentElement.setAttribute(Ye,e.colorScheme),e.density&&document.documentElement.setAttribute(va,e.density))},Va="hanui-live-region",en=e=>{if(!H.isClient())return null;const a=`${Va}-${e}`,n=document.getElementById(a);if(n)return n;const r=document.createElement("div");return r.id=a,r.setAttribute("aria-live",e),r.setAttribute("aria-atomic","true"),r.className="hanui-visually-hidden",document.body.appendChild(r),r},tn=(e,a)=>{e.textContent="",window.requestAnimationFrame(()=>{e.textContent=a})},Rt=()=>s.useCallback((e,a="polite")=>{const n=e.trim();if(n==="")return;const r=en(a);r&&tn(r,n)},[]),ia=()=>{var e;return H.isClient()&&((e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"},an=()=>{if(!H.isClient())return"system";const e=document.documentElement.getAttribute(Ye);return e==="dark"||e==="light"?e:"system"},nn=()=>{const[e,a]=s.useState("light"),[n,r]=s.useState("light"),[o,c]=s.useState(!1);s.useEffect(()=>{a(an()),r(ia()),c(!0)},[]),s.useEffect(()=>{if(!H.isClient()||!window.matchMedia)return;const d=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>r(ia());return d.addEventListener("change",l),()=>d.removeEventListener("change",l)},[]);const i=e==="system"?n:e,u=s.useCallback(d=>{if(!H.isClient())return;const l=document.documentElement;l.classList.add(oa),d==="system"?l.removeAttribute(Ye):l.setAttribute(Ye,d),a(d),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>l.classList.remove(oa))})},[]),h=s.useCallback(()=>u(i==="dark"?"light":"dark"),[i,u]);return{scheme:i,preference:e,setScheme:u,toggle:h,isReady:o}},Gt=(e,a)=>{typeof(e==null?void 0:e.scrollIntoView)=="function"&&e.scrollIntoView(a)},Qt=({count:e,isOpen:a,initialIndex:n=0,onSelect:r,onClose:o},{hasSpaceSelect:c=!1}={})=>{const[i,u]=s.useState(n),h=s.useRef(null);s.useEffect(()=>{a&&u(n)},[a,n]),s.useEffect(()=>{u(l=>l>=e?Math.max(0,e-1):l)},[e]),s.useEffect(()=>{var l;a&&Gt((l=h.current)==null?void 0:l.querySelector(`[data-index="${i}"]`),{block:"nearest"})},[i,a,e]);const d=s.useCallback(l=>{const _=e-1;switch(l.key){case"ArrowDown":l.preventDefault(),u(p=>p>=_?0:p+1);break;case"ArrowUp":l.preventDefault(),u(p=>p<=0?_:p-1);break;case"Home":l.preventDefault(),u(0);break;case"End":l.preventDefault(),u(_);break;case" ":case"Enter":{if(l.key===" "&&!c)break;l.preventDefault(),e>0&&r(i);break}case"Escape":l.preventDefault(),o();break;case"Tab":o();break}},[i,e,c,o,r]);return{activeIndex:i,setActiveIndex:u,listRef:h,handleKeyDown:d}},Pt={top:"bottom",bottom:"top",left:"right",right:"left"},ca=(e,a,n)=>Math.min(Math.max(e,a),n),Ot=(e,a,n,r,o)=>{const c=n==="top"||n==="bottom",i={top:e.top-a.height-o,bottom:e.top+e.height+o,left:e.left-a.width-o,right:e.left+e.width+o}[n],u=c?e.left:e.top,h=c?e.width:e.height,d=c?a.width:a.height,l={start:u,center:u+h/2-d/2,end:u+h-d}[r];return c?{top:i,left:l}:{top:l,left:i}},la=(e,a,n,r,o)=>({top:e.top>=r,bottom:e.top+a.height<=o.height-r,left:e.left>=r,right:e.left+a.width<=o.width-r})[n],wt=(e,a,{side:n="top",align:r="center",offset:o=8,padding:c=8,isOpen:i})=>{const[u,h]=s.useState({style:{position:"fixed",top:0,left:0},side:n,isPositioned:!1}),d=s.useRef(0),l=s.useCallback(()=>{const b=e.current,w=a.current;if(!b||!w)return;const g=b.getBoundingClientRect(),m=w.getBoundingClientRect(),v={width:window.innerWidth,height:window.innerHeight},$=Ot(g,m,n,r,o),j=la($,m,n,c,v)?n:la(Ot(g,m,Pt[n],r,o),m,Pt[n],c,v)?Pt[n]:n,x=Ot(g,m,j,r,o);h({style:{position:"fixed",top:Math.round(ca(x.top,c,v.height-m.height-c)),left:Math.round(ca(x.left,c,v.width-m.width-c))},side:j,isPositioned:!0})},[e,a,n,r,o,c]),_=s.useCallback(()=>{d.current||(d.current=window.requestAnimationFrame(()=>{d.current=0,l()}))},[l]);return(H.isClient()?s.useLayoutEffect:s.useEffect)(()=>{if(!i){h(w=>w.isPositioned?{...w,isPositioned:!1}:w);return}l(),window.addEventListener("resize",_),document.addEventListener("scroll",_,!0);const b=typeof ResizeObserver>"u"?null:new ResizeObserver(_);return b&&a.current&&b.observe(a.current),b&&e.current&&b.observe(e.current),()=>{window.removeEventListener("resize",_),document.removeEventListener("scroll",_,!0),b==null||b.disconnect(),d.current&&(window.cancelAnimationFrame(d.current),d.current=0)}},[i,l,_,e,a]),u},ja=(e,{rowHeight:a=40,overscan:n=6,isEnabled:r=!0}={})=>{const o=s.useRef(null),[c,i]=s.useState({start:0,end:e,totalHeight:e*a,offset:0}),u=s.useCallback(()=>{const d=o.current;if(!r||!d||d.clientHeight===0){i({start:0,end:e,totalHeight:e*a,offset:0});return}const l=Math.ceil(d.clientHeight/a),_=Math.floor(d.scrollTop/a),p=Math.max(0,_-n),b=Math.min(e,_+l+n);i({start:p,end:b,totalHeight:e*a,offset:p*a})},[e,r,n,a]);s.useEffect(()=>{const d=o.current;if(!d)return;u(),d.addEventListener("scroll",u,{passive:!0});const l=typeof ResizeObserver>"u"?null:new ResizeObserver(u);return l==null||l.observe(d),()=>{d.removeEventListener("scroll",u),l==null||l.disconnect()}},[u]);const h=s.useCallback(d=>{const l=o.current;if(!l||!r)return;const _=d*a,p=_+a;_<l.scrollTop?l.scrollTop=_:p>l.scrollTop+l.clientHeight&&(l.scrollTop=p-l.clientHeight)},[r,a]);return{scrollRef:o,range:c,scrollToIndex:h,measure:u}};let gt=0,Ne=null;const sn=()=>/iP(hone|ad|od)/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,rn=()=>{if(gt+=1,gt>1)return;const{body:e,style:a}={body:document.body,style:document.documentElement.style},n=window.scrollY;Ne={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:n};const r=window.innerWidth-document.documentElement.clientWidth;r>0&&(e.style.paddingRight=`${r}px`),a.setProperty("scrollbar-gutter","stable"),e.style.overflow="hidden",sn()&&(e.style.position="fixed",e.style.top=`${-n}px`,e.style.width="100%")},on=()=>{if(gt=Math.max(0,gt-1),gt>0||!Ne)return;const{body:e}=document,{scrollY:a}=Ne;e.style.overflow=Ne.overflow,e.style.position=Ne.position,e.style.top=Ne.top,e.style.width=Ne.width,e.style.paddingRight=Ne.paddingRight,document.documentElement.style.removeProperty("scrollbar-gutter"),Ne=null,window.scrollTo(0,a)},kt=(e=!0)=>{s.useEffect(()=>{if(e)return rn(),on},[e])},Na="--hanui-sheet-height",$a="--hanui-sheet-inset-bottom";let Nt=0,st=0;const cn=240,Ea=()=>{const e=window.visualViewport;if(!e||e.height<cn)return;const a=window.innerHeight-e.height-e.offsetTop,n=document.documentElement;n.style.setProperty($a,`${Math.max(0,Math.round(a))}px`),n.style.setProperty(Na,`${Math.round(e.height)}px`)},Je=()=>{st||(st=window.requestAnimationFrame(()=>{st=0,Ea()}))},da=()=>{st&&(window.cancelAnimationFrame(st),st=0)},Ca=(e=!0)=>{s.useEffect(()=>{if(!e)return;const a=window.visualViewport;if(a)return Nt+=1,Nt===1&&(a.addEventListener("resize",Je),a.addEventListener("scroll",Je),window.addEventListener("orientationchange",Je)),da(),Ea(),()=>{Nt-=1,!(Nt>0)&&(a.removeEventListener("resize",Je),a.removeEventListener("scroll",Je),window.removeEventListener("orientationchange",Je),da(),document.documentElement.style.removeProperty($a),document.documentElement.style.removeProperty(Na))}},[e])};var be=(e=>(e.PRIMARY="PRIMARY",e.CART="CART",e.SECONDARY="SECONDARY",e.OUTLINE="OUTLINE",e.DARK="DARK",e.LIGHT="LIGHT",e.GHOST="GHOST",e.DANGER="DANGER",e))(be||{}),Le=(e=>(e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e))(Le||{});const Ia=640,ln=768,Da=1024,dn=`(min-width: ${Da+1}px)`,St=`(min-width: ${Ia+1}px)`,Ut=e=>e.replace(/İ/g,"i").replace(/I/g,"i").replace(/ı/g,"i").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ş/g,"s").replace(/ğ/g,"g").replace(/ç/g,"c").replace(/ø/g,"o").replace(/æ/g,"ae").replace(/ß/g,"ss").replace(/đ/g,"d").replace(/ł/g,"l").replace(/\s+/g," ").trim(),vt=(e,a)=>Ut(e).includes(Ut(a)),un=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Ta=e=>{if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const a=e.getAttribute("contenteditable");if(a===""||a==="true"||a==="plaintext-only")return!0;const n=e.tagName;return n==="TEXTAREA"?!0:n!=="INPUT"?!1:!un.has(e.type)},Lt=e=>{const a=e.ownerDocument.activeElement;!e.contains(a)||!Ta(a)||(a.blur(),e.tabIndex=-1,e.focus({preventScroll:!0}))},ot=()=>{const e=typeof document>"u"?null:document.activeElement;return()=>{e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0})}},_n=["a[href]","button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"])'].map(e=>`${e}:not([inert]):not([aria-hidden="true"])`).join(", "),At=(e,a="[data-hanui-close]")=>{const n=e.querySelector("[data-hanui-autofocus]");if(n){n.focus({preventScroll:!0});return}const r=[...e.querySelectorAll(_n)],o=r.find(c=>!c.matches(a))??r[0];if(o){o.focus({preventScroll:!0});return}e.tabIndex=-1,e.focus({preventScroll:!0})},ft=[],Ft=()=>{const e=Symbol("hanui-modal");return ft.push(e),{token:e,pop:()=>{const a=ft.indexOf(e);a>=0&&ft.splice(a,1)}}},Mt=e=>ft[ft.length-1]===e,f=(...e)=>{let a="";for(const n of e)n&&(a=a===""?n:`${a} ${n}`);return a},A=(e,a)=>Object.assign(e,{displayName:a}),fe=({children:e,...a})=>{const{linkComponent:n}=z();return n?t.jsx(n,{...a,children:e}):t.jsx("a",{...a,children:e})},ua=new Set,M=(e,...a)=>{for(const n of a)if(n!==void 0)return n;return process.env.NODE_ENV!=="production"&&!ua.has(e)&&(ua.add(e),console.error(`[hanui] Eksik metin: ${e}. Prop olarak geçin ya da <HanuiProvider labels={…}> içinde bir kez tanımlayın. Metinsiz bırakılan öğe ekran okuyucuda adsız kalır.`)),""},Tt=(e,a,...n)=>a?a(...n):M(e),hn="hanui-spinner-7pXwf",pn="hanui-spinner__label-sZvSq",zt={spinner:hn,"hanui-spin":"hanui-hanui-spin-wTV0a",spinner__label:pn,"spinner--sm":"hanui-spinner--sm-uI0wH","spinner--md":"hanui-spinner--md--VmFK","spinner--lg":"hanui-spinner--lg-K9k-Z"},mn=({size:e="md",label:a,className:n})=>{const{labels:r}=z();return t.jsx("span",{className:f(zt.spinner,zt[`spinner--${e}`],n),role:"status",children:t.jsx("span",{className:zt.spinner__label,children:a??M("Spinner.label",r==null?void 0:r.loading)})})},Jt=s.memo(mn),bn="hanui-button-SRu4R",gn="hanui-button__icon-giom6",fn="hanui-button__spinner-vexVG",xn="hanui-button__label-qiMHm",ve={button:bn,button__icon:gn,button__spinner:fn,button__label:xn,"button--full":"hanui-button--full-CwPHR","button--loading":"hanui-button--loading-O-naJ","button--small":"hanui-button--small-TF9Hz","button--medium":"hanui-button--medium-JDjkH","button--large":"hanui-button--large-btadu","button--primary":"hanui-button--primary-ym7RJ","button--cart":"hanui-button--cart-5DVmR","button--secondary":"hanui-button--secondary-56m1d","button--outline":"hanui-button--outline-ZI8sw","button--dark":"hanui-button--dark-FGZgn","button--light":"hanui-button--light-YzEPs","button--ghost":"hanui-button--ghost-rijnZ","button--danger":"hanui-button--danger-TNGd2"},vn=s.forwardRef(({variant:e=be.PRIMARY,size:a=Le.MEDIUM,isLoading:n,isFullWidth:r,startIcon:o,endIcon:c,className:i,children:u,disabled:h,href:d,isExternal:l,linkProps:_,testId:p,...b},w)=>{const g=f(ve.button,ve[`button--${e.toLowerCase()}`],ve[`button--${a.toLowerCase()}`],r&&ve["button--full"],n&&ve["button--loading"],i),m=t.jsxs(t.Fragment,{children:[n&&t.jsx(Jt,{size:"sm",className:ve.button__spinner,label:""}),!n&&o&&t.jsx("span",{className:ve.button__icon,children:o}),t.jsx("span",{className:ve.button__label,children:u}),c&&t.jsx("span",{className:ve.button__icon,children:c})]});return d&&l?t.jsx("a",{href:d,className:g,target:"_blank",rel:"noopener noreferrer","aria-label":b["aria-label"],"data-testid":p,children:m}):d?t.jsx(fe,{href:d,className:g,"data-testid":p,..._,children:m}):t.jsx("button",{ref:w,className:g,disabled:h||n,"aria-busy":n,"data-testid":p,...b,children:m})}),rt=s.memo(A(vn,"Button")),yn="hanui-iconButton-JdtwM",Ht={iconButton:yn,"iconButton--sm":"hanui-iconButton--sm-wE6zE","iconButton--md":"hanui-iconButton--md-iTNNS","iconButton--ghost":"hanui-iconButton--ghost-w-8K3","iconButton--outline":"hanui-iconButton--outline-vEhcY","iconButton--solid":"hanui-iconButton--solid-NUszP","iconButton--cart":"hanui-iconButton--cart-nVsH-","iconButton--danger":"hanui-iconButton--danger-xKkEA"},wn=s.forwardRef(({icon:e,label:a,variant:n="ghost",size:r="md",className:o,type:c="button",href:i,linkProps:u,testId:h,...d},l)=>{const _=f(Ht.iconButton,Ht[`iconButton--${n}`],Ht[`iconButton--${r}`],o);return i?t.jsx(fe,{href:i,className:_,"aria-label":a,title:d.title,"data-testid":h,...u,children:e}):t.jsx("button",{ref:l,type:c,className:_,"aria-label":a,"data-testid":h,...d,children:e})}),ge=s.memo(A(wn,"IconButton")),kn="hanui-link-WBmXY",jn="hanui-link__label--OEu-",Nn="hanui-link__arrow-JKXm-",lt={link:kn,link__label:jn,link__arrow:Nn,"link--sm":"hanui-link--sm-a-3Dz","link--md":"hanui-link--md-lZdYP","link--brand":"hanui-link--brand-vr8sW","link--muted":"hanui-link--muted-EeN6l"},$n=({href:e,children:a,hasArrow:n,tone:r="brand",size:o="md",className:c,linkProps:i,...u})=>t.jsxs(fe,{href:e,className:f(lt.link,lt[`link--${r}`],lt[`link--${o}`],c),...i,...u,children:[t.jsx("span",{className:lt.link__label,children:a}),n&&t.jsx(I.ArrowRight,{"aria-hidden":!0,className:lt.link__arrow})]}),En=s.memo($n),Cn="hanui-tooltip-RG1g1",In="hanui-tooltip__trigger-nWZtO",Dn="hanui-bubble-bcBNk",$t={tooltip:Cn,tooltip__trigger:In,bubble:Dn,"bubble--top":"hanui-bubble--top-uWSZy","hanui-fade-in-up":"hanui-hanui-fade-in-up-Fwj3A","bubble--bottom":"hanui-bubble--bottom-jKokL","hanui-fade-in-down":"hanui-hanui-fade-in-down-5UfIc","bubble--left":"hanui-bubble--left-WK4EM","bubble--right":"hanui-bubble--right-EQjUT","hanui-fade-in":"hanui-hanui-fade-in-wwrDx"},Tn=120,Rn=500,Sn=({content:e,children:a,side:n,position:r,openDelay:o=300,className:c})=>{const[i,u]=s.useState(!1),h=s.useId(),d=n??r??"top",l=s.useRef(null),_=s.useRef(null),p=s.useRef(0),b=s.useRef(0),w=wt(l,_,{side:d,align:"center",isOpen:i}),g=s.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=0},[]),m=s.useCallback(x=>{g(),p.current=window.setTimeout(()=>u(!0),x)},[g]),v=s.useCallback((x=Tn)=>{g(),p.current=window.setTimeout(()=>u(!1),x)},[g]);s.useEffect(()=>g,[g]),s.useEffect(()=>{if(!i)return;const x=N=>{N.key==="Escape"&&v(0)};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i,v]),s.useEffect(()=>{if(!i)return;const x=N=>{var k;N.pointerType!=="mouse"&&((k=l.current)!=null&&k.contains(N.target)||v(0))};return document.addEventListener("pointerdown",x),()=>document.removeEventListener("pointerdown",x)},[i,v]);const $=()=>{b.current&&window.clearTimeout(b.current),b.current=0},j=x=>{x.pointerType!=="mouse"&&(b.current=window.setTimeout(()=>u(!0),Rn))};return t.jsxs(t.Fragment,{children:[t.jsx("span",{ref:l,className:f($t.tooltip,c),onPointerEnter:x=>x.pointerType==="mouse"&&m(o),onPointerLeave:x=>{$(),x.pointerType==="mouse"&&v()},onPointerDown:j,onPointerUp:$,onPointerCancel:$,onFocus:()=>m(0),onBlur:()=>v(0),onContextMenu:x=>{(i||b.current)&&x.preventDefault()},children:t.jsx("span",{"aria-describedby":i?h:void 0,className:$t.tooltip__trigger,children:a})}),i&&H.isClient()&&yt.createPortal(t.jsx("span",{ref:_,id:h,role:"tooltip",className:f($t.bubble,$t[`bubble--${w.side}`]),style:{...w.style,visibility:w.isPositioned?"visible":"hidden"},onPointerEnter:g,onPointerLeave:()=>v(),children:e}),document.body)]})},Ln=s.memo(A(Sn,"Tooltip")),An="hanui-menu-1x-FU",Fn="hanui-menu__item-d1iil",Mn="hanui-menu__icon-kzLV2",dt={menu:An,"menu--top":"hanui-menu--top-gpo39","hanui-fade-in-up":"hanui-hanui-fade-in-up-7YdDa","menu--bottom":"hanui-menu--bottom-6sL7b","hanui-fade-in-down":"hanui-hanui-fade-in-down-gZjPq","menu--left":"hanui-menu--left-4w-O8","menu--right":"hanui-menu--right-XmM8G","hanui-fade-in":"hanui-hanui-fade-in-vivgk",menu__item:Fn,"menu__item--danger":"hanui-menu__item--danger-lIINY",menu__icon:Mn},Bn=e=>e.map((a,n)=>a.isDisabled?-1:n).filter(a=>a>=0),Pn=({trigger:e,items:a,label:n,side:r="bottom",align:o="start",className:c,testId:i})=>{const u=s.useId(),h=s.useRef(null),d=s.useRef(null),l=s.useRef(null),_=s.useRef({text:"",at:0}),[p,b]=s.useState(!1),[w,g]=s.useState(0),m=wt(h,d,{side:r,align:o,isOpen:p}),v=Bn(a),$=s.useCallback(y=>{v.length!==0&&(l.current=ot(),g(y==="first"?v[0]:v[v.length-1]),b(!0))},[v]),j=s.useCallback(()=>{var y;b(!1),(y=l.current)==null||y.call(l),l.current=null},[]);s.useEffect(()=>{var y,S;p&&((S=(y=d.current)==null?void 0:y.querySelector(`[data-index="${w}"]`))==null||S.focus({preventScroll:!0}))},[p,w]),s.useEffect(()=>{if(!p)return;const y=S=>{var X,G;const P=S.target;(X=d.current)!=null&&X.contains(P)||(G=h.current)!=null&&G.contains(P)||j()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[p,j]);const x=y=>{const P=(v.indexOf(w)+y+v.length)%v.length;g(v[P])},N=y=>{const S=Date.now(),P=S-_.current.at>500?y:_.current.text+y;_.current={text:P,at:S};const X=v.find(G=>a[G].label.toLocaleLowerCase("tr").startsWith(P.toLocaleLowerCase("tr")));X!==void 0&&g(X)},k=y=>{switch(y.key){case"ArrowDown":y.preventDefault(),x(1);break;case"ArrowUp":y.preventDefault(),x(-1);break;case"Home":y.preventDefault(),g(v[0]);break;case"End":y.preventDefault(),g(v[v.length-1]);break;case"Escape":y.preventDefault(),j();break;case"Tab":j();break;default:y.key.length===1&&!y.metaKey&&!y.ctrlKey&&N(y.key)}},T=y=>{if(y.key==="ArrowUp"){y.preventDefault(),$("last");return}["ArrowDown","Enter"," "].includes(y.key)&&(y.preventDefault(),$("first"))};if(!s.isValidElement(e))return null;const C=e.props,D=s.cloneElement(e,{ref:h,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?u:void 0,onClick:y=>{var S;(S=C.onClick)==null||S.call(C,y),p?j():$("first")},onKeyDown:y=>{var S;(S=C.onKeyDown)==null||S.call(C,y),p||T(y)}});return t.jsxs(t.Fragment,{children:[D,p&&H.isClient()&&yt.createPortal(t.jsx("div",{ref:d,id:u,role:"menu","aria-label":n,className:f(dt.menu,dt[`menu--${m.side}`],c),style:{...m.style,visibility:m.isPositioned?"visible":"hidden"},"data-testid":i,onKeyDown:k,children:a.map((y,S)=>t.jsxs("button",{type:"button",role:"menuitem","data-index":S,tabIndex:S===w?0:-1,disabled:y.isDisabled,className:f(dt.menu__item,y.isDanger&&dt["menu__item--danger"]),onClick:()=>{y.onSelect(),j()},onMouseEnter:()=>!y.isDisabled&&g(S),children:[y.icon&&t.jsx("span",{className:dt.menu__icon,"aria-hidden":!0,children:y.icon}),y.label]},y.id))}),document.body)]})},On=s.memo(A(Pn,"Menu")),zn="hanui-popover-VxgiK",_a={popover:zn,"popover--top":"hanui-popover--top-OUYwo","hanui-fade-in-up":"hanui-hanui-fade-in-up-it2wl","popover--bottom":"hanui-popover--bottom-Q1K4X","hanui-fade-in-down":"hanui-hanui-fade-in-down-E-AGy","popover--left":"hanui-popover--left-9Rsjx","popover--right":"hanui-popover--right-0TJeo","hanui-fade-in":"hanui-hanui-fade-in-zsza4"},Hn=({trigger:e,children:a,label:n,side:r="bottom",align:o="start",isOpen:c,onOpenChange:i,className:u,testId:h})=>{const d=s.useId(),l=s.useRef(null),_=s.useRef(null),p=s.useRef(null),[b,w]=s.useState(!1),g=c!==void 0,m=g?c:b,v=wt(l,_,{side:r,align:o,isOpen:m}),$=s.useCallback(N=>{g||w(N),i==null||i(N)},[g,i]);if(s.useEffect(()=>{if(!m)return;p.current=ot();const N=_.current;return N&&At(N),()=>{var k;(k=p.current)==null||k.call(p),p.current=null}},[m]),s.useEffect(()=>{if(!m)return;const N=T=>{T.key==="Escape"&&$(!1)},k=T=>{var D,y;const C=T.target;(D=_.current)!=null&&D.contains(C)||(y=l.current)!=null&&y.contains(C)||$(!1)};return document.addEventListener("keydown",N),document.addEventListener("mousedown",k),()=>{document.removeEventListener("keydown",N),document.removeEventListener("mousedown",k)}},[m,$]),!s.isValidElement(e))return null;const j=e.props,x=s.cloneElement(e,{ref:l,"aria-expanded":m,"aria-haspopup":"dialog","aria-controls":m?d:void 0,onClick:N=>{var k;(k=j.onClick)==null||k.call(j,N),$(!m)}});return t.jsxs(t.Fragment,{children:[x,m&&H.isClient()&&yt.createPortal(t.jsx("div",{ref:_,id:d,role:"dialog","aria-label":n,className:f(_a.popover,_a[`popover--${v.side}`],u),style:{...v.style,visibility:v.isPositioned?"visible":"hidden"},"data-testid":h,onBlur:N=>{var k;N.currentTarget.contains(N.relatedTarget)||(k=l.current)!=null&&k.contains(N.relatedTarget)||$(!1)},children:a}),document.body)]})},Kn=s.memo(A(Hn,"Popover")),Un="hanui-chip--NLgU",qn="hanui-chip__icon-IjjSb",Yn="hanui-chip__label-cT4hw",Xn="hanui-chip__count-MBGO3",Ce={chip:Un,chip__icon:qn,chip__label:Yn,chip__count:Xn,"chip--sm":"hanui-chip--sm-60H-S","chip--md":"hanui-chip--md--yAlm","chip--iconOnly":"hanui-chip--iconOnly-5LT1h","chip--selected":"hanui-chip--selected-FdpCr"},Gn=s.forwardRef(({children:e,icon:a,endIcon:n,count:r,isSelected:o,size:c="md",label:i,href:u,linkProps:h,className:d,type:l="button",role:_,testId:p,...b},w)=>{const g=f(Ce.chip,Ce[`chip--${c}`],o&&Ce["chip--selected"],!e&&Ce["chip--iconOnly"],d),m=t.jsxs(t.Fragment,{children:[a&&t.jsx("span",{className:Ce.chip__icon,"aria-hidden":!0,children:a}),e&&t.jsx("span",{className:Ce.chip__label,children:e}),H.isDefined(r)&&t.jsx("span",{className:Ce.chip__count,children:r}),n&&t.jsx("span",{className:Ce.chip__icon,"aria-hidden":!0,children:n})]});return u?t.jsx(fe,{href:u,className:g,"aria-label":e?void 0:i,"aria-current":o?"page":void 0,"data-testid":p,...h,children:m}):t.jsx("button",{ref:w,type:l,role:_,className:g,"aria-label":e?void 0:i,"data-testid":p,..._==="radio"?{"aria-checked":!!o}:{"aria-pressed":!!o},...b,children:m})}),Ra=s.memo(A(Gn,"Chip")),Qn="hanui-group-0tnVf",ha={group:Qn,"group--scrollable":"hanui-group--scrollable-PMu6V"},Jn=({options:e,label:a,size:n="md",isScrollable:r,className:o,...c})=>{var _;const i=s.useRef(null),u=p=>c.isMultiple?c.value.includes(p):c.value===p,h=p=>{if(c.isMultiple){const b=c.value.includes(p)?c.value.filter(w=>w!==p):[...c.value,p];c.onChange(b);return}c.onChange(c.value===p?null:p)},d=p=>{var v,$;if(c.isMultiple)return;const b=p.key==="ArrowRight"||p.key==="ArrowDown"?1:p.key==="ArrowLeft"||p.key==="ArrowUp"?-1:0;if(b===0)return;p.preventDefault();const w=e.filter(j=>!j.isDisabled);if(w.length===0)return;const g=w.findIndex(j=>j.value===c.value),m=w[(g+b+w.length)%w.length];c.onChange(m.value),($=(v=i.current)==null?void 0:v.querySelector(`[data-chip-value="${m.value}"]`))==null||$.focus()},l=c.isMultiple?null:c.value??((_=e.find(p=>!p.isDisabled))==null?void 0:_.value)??null;return t.jsx("div",{ref:i,className:f(ha.group,r&&ha["group--scrollable"],o),role:c.isMultiple?"group":"radiogroup","aria-label":a,onKeyDown:d,children:e.map(p=>t.jsx(Ra,{size:n,icon:p.icon,count:p.count,isSelected:u(p.value),disabled:p.isDisabled,role:c.isMultiple?void 0:"radio",tabIndex:c.isMultiple||p.value===l?0:-1,"data-chip-value":p.value,onClick:()=>h(p.value),children:p.label},p.value))})},Wn=s.memo(Jn),Zn="hanui-sheet-GEvdE",Vn="hanui-sheet__header-NJgw-",es="hanui-sheet__title-f-b07",ts="hanui-sheet__toolbar-eyhmW",as="hanui-sheet__body-eJ2KB",ns="hanui-sheet__footer-NpsY5",Me={sheet:Zn,sheet__header:Vn,sheet__title:es,sheet__toolbar:ts,sheet__body:as,sheet__footer:ns},ss=({title:e,closeLabel:a,onClose:n,children:r,toolbar:o,footer:c,closeAbove:i=St,className:u,testId:h})=>{const{labels:d}=z(),l=s.useId(),_=s.useRef(null);Ca(),kt(),s.useEffect(()=>{const w=ot(),{token:g,pop:m}=Ft();return _.current=g,()=>{m(),_.current=null,w()}},[]),s.useEffect(()=>{const w=window.matchMedia(i);return w.addEventListener("change",n),()=>w.removeEventListener("change",n)},[i,n]);const p=s.useCallback(w=>{!w||w.open||(w.showModal(),At(w,`.${Me.sheet__header} button`),Lt(w))},[]),b=s.useCallback(w=>{w.target===w.currentTarget&&n()},[n]);return H.isClient()?yt.createPortal(t.jsxs("dialog",{ref:p,className:f(Me.sheet,u),"aria-labelledby":l,"data-testid":h,onCancel:w=>{w.preventDefault(),!(_.current&&!Mt(_.current))&&n()},onClick:b,children:[t.jsxs("header",{className:Me.sheet__header,children:[t.jsx("h2",{id:l,className:Me.sheet__title,children:e}),t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:M("BottomSheet.closeLabel",a,d==null?void 0:d.close),variant:"ghost",size:"sm",onClick:n})]}),o&&t.jsx("div",{className:Me.sheet__toolbar,children:o}),t.jsx("div",{className:Me.sheet__body,children:r}),c&&t.jsx("div",{className:Me.sheet__footer,children:c})]}),document.body):null},Wt=s.memo(ss),rs="hanui-combobox-NtZoV",os="hanui-combobox__trigger-2riRR",is="hanui-combobox__leadingIcon-it2xz",cs="hanui-combobox__value-acDlr",ls="hanui-combobox__clear-EXOsc",ds="hanui-combobox__chevron-g-QzQ",us="hanui-combobox__panel-srBxl",_s="hanui-combobox__search-THjer",hs="hanui-combobox__searchIcon-vr4Bg",ps="hanui-combobox__searchInput-JPp5h",ms="hanui-combobox__list-p-eCs",bs="hanui-combobox__option-CLWh-",gs="hanui-combobox__optionText-Zm0D6",fs="hanui-combobox__optionLabel-WvT4W",xs="hanui-combobox__optionDescription-8OEzi",vs="hanui-combobox__check-MKlLz",ys="hanui-combobox__empty-mZwBq",O={combobox:rs,combobox__trigger:os,"combobox__trigger--empty":"hanui-combobox__trigger--empty-RxwCq","combobox__trigger--open":"hanui-combobox__trigger--open-rw1ZS","combobox__trigger--invalid":"hanui-combobox__trigger--invalid-iZgiN","combobox__trigger--clearable":"hanui-combobox__trigger--clearable-shq9I",combobox__leadingIcon:is,combobox__value:cs,combobox__clear:ls,combobox__chevron:ds,"combobox__chevron--open":"hanui-combobox__chevron--open-9kj1j",combobox__panel:us,combobox__search:_s,combobox__searchIcon:hs,combobox__searchInput:ps,combobox__list:ms,"combobox__list--sheet":"hanui-combobox__list--sheet-r3MzB",combobox__option:bs,"combobox__option--active":"hanui-combobox__option--active--75Vq","combobox__option--selected":"hanui-combobox__option--selected-DVFGy","combobox__option--disabled":"hanui-combobox__option--disabled-e6VjI",combobox__optionText:gs,combobox__optionLabel:fs,combobox__optionDescription:xs,combobox__check:vs,combobox__empty:ys},ws=80,pa=40,ks=({options:e,value:a,onChange:n,labels:r,isSearchHidden:o,onSearch:c,isLoading:i,isDisabled:u,isClearable:h,icon:d,id:l,className:_,testId:p,"aria-describedby":b,"aria-invalid":w})=>{var na;const{labels:g}=z(),m={get search(){var R;return M("Combobox.searchPlaceholder",r.searchPlaceholder,(R=g==null?void 0:g.combobox)==null?void 0:R.searchPlaceholder)},get empty(){var R;return M("Combobox.emptyMessage",r.emptyMessage,(R=g==null?void 0:g.combobox)==null?void 0:R.emptyMessage)},get loading(){var R;return M("Combobox.loadingMessage",r.loadingMessage,(R=g==null?void 0:g.combobox)==null?void 0:R.loadingMessage)},get clear(){var R;return M("Combobox.clearLabel",r.clearLabel,(R=g==null?void 0:g.combobox)==null?void 0:R.clearLabel)}},v=s.useId(),$=l??v,j=`${$}-listbox`,x=s.useRef(null),N=s.useRef(null),k=s.useRef(null),T=s.useRef(null),[C,D]=s.useState(null),y=C!==null,[S,P]=s.useState(""),[X,G]=s.useState(null),K=s.useMemo(()=>{if(c||S.trim()==="")return e;const R=S.trim();return e.filter(te=>vt(te.label,R)||(te.description?vt(te.description,R):!1))},[e,S,c]),oe=e.find(R=>R.value===a)??null;s.useEffect(()=>{oe?G(oe.label):a===null&&G(null)},[oe,a]);const Ge=(oe==null?void 0:oe.label)??X,xe=s.useRef(c);xe.current=c,s.useEffect(()=>{if(!y||!xe.current)return;const R=window.setTimeout(()=>{var te;return(te=xe.current)==null?void 0:te.call(xe,S.trim())},300);return()=>window.clearTimeout(R)},[S,y]);const Ee=s.useCallback(()=>{D(null),P("")},[]),jt=s.useCallback(()=>{u||(D(window.matchMedia(St).matches?"popover":"sheet"),P(""))},[u]);s.useEffect(()=>{if(C!=="popover")return;const R=te=>{var le;(le=x.current)!=null&&le.contains(te.target)||Ee()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[C,Ee]),s.useEffect(()=>{var R;C==="popover"&&((R=T.current)==null||R.focus({preventScroll:!0}))},[C]);const it=R=>{R.isDisabled||(G(R.label),n(R.value),Ee())},B=s.useRef(!1);s.useEffect(()=>{var R;B.current&&!y&&((R=N.current)==null||R.focus()),B.current=y},[y]);const J=wt(N,k,{side:"bottom",align:"start",isOpen:y&&C==="popover"}),{activeIndex:ee,setActiveIndex:Qe,listRef:Ba,handleKeyDown:Pa}=Qt({count:K.length,isOpen:y,initialIndex:Math.max(e.findIndex(R=>R.value===a),0),onSelect:R=>{const te=K[R];te&&it(te)},onClose:Ee}),Oa=K.some(R=>!!R.description),Ae=C==="popover"&&!Oa&&K.length>ws,{scrollRef:za,range:Fe,scrollToIndex:ea}=ja(K.length,{rowHeight:pa,isEnabled:Ae});s.useEffect(()=>{Ae&&ea(ee)},[ee,Ae,ea]);const Ha=R=>{Ba.current=R,za.current=R},Ka=Pa,Ua=()=>{n(null),G(null)},ta=o?null:t.jsxs("div",{className:O.combobox__search,children:[t.jsx(I.Search,{"aria-hidden":!0,className:O.combobox__searchIcon}),t.jsx("input",{ref:T,type:"text",role:"combobox",className:O.combobox__searchInput,value:S,placeholder:m.search,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":j,"aria-activedescendant":K[ee]?`${$}-option-${ee}`:void 0,"aria-label":m.search,onChange:R=>{P(R.target.value),Qe(0)},onKeyDown:Ka}),i&&t.jsx(Jt,{size:"sm",label:""})]}),aa=R=>{const te=K.slice(Fe.start,Fe.end);return t.jsxs("ul",{ref:Ha,id:j,role:"listbox",className:f(O.combobox__list,R&&O["combobox__list--sheet"]),children:[Ae&&Fe.offset>0&&t.jsx("li",{"aria-hidden":!0,style:{height:Fe.offset}}),te.map((le,qa)=>{const ct=Fe.start+qa,Ya=ct===ee,Bt=le.value===a;return t.jsx("li",{children:t.jsxs("div",{id:`${$}-option-${ct}`,role:"option","data-index":ct,"aria-setsize":Ae?K.length:void 0,"aria-posinset":Ae?ct+1:void 0,"aria-selected":Bt,"aria-disabled":le.isDisabled,className:f(O.combobox__option,Ya&&O["combobox__option--active"],Bt&&O["combobox__option--selected"],le.isDisabled&&O["combobox__option--disabled"]),onMouseEnter:()=>Qe(ct),onClick:()=>it(le),children:[t.jsxs("span",{className:O.combobox__optionText,children:[t.jsx("span",{className:O.combobox__optionLabel,children:le.label}),le.description&&t.jsx("span",{className:O.combobox__optionDescription,children:le.description})]}),Bt&&t.jsx(I.CheckLg,{"aria-hidden":!0,className:O.combobox__check})]})},le.value)}),Ae&&Fe.end<K.length&&t.jsx("li",{"aria-hidden":!0,style:{height:(K.length-Fe.end)*pa}}),K.length===0&&t.jsx("li",{className:O.combobox__empty,children:i?m.loading:m.empty})]})};return t.jsxs("div",{ref:x,className:f(O.combobox,_),"data-testid":p,children:[t.jsxs("button",{ref:N,id:$,type:"button",className:f(O.combobox__trigger,!Ge&&O["combobox__trigger--empty"],y&&O["combobox__trigger--open"],w&&O["combobox__trigger--invalid"],h&&Ge&&!u&&O["combobox__trigger--clearable"]),disabled:u,"aria-haspopup":"listbox","aria-expanded":y,"aria-controls":y?j:void 0,"aria-label":r.placeholder,"aria-describedby":b,onClick:()=>y?Ee():jt(),children:[d&&t.jsx("span",{className:O.combobox__leadingIcon,"aria-hidden":!0,children:d}),t.jsx("span",{className:O.combobox__value,children:Ge??r.placeholder}),t.jsx(I.CaretDownFill,{"aria-hidden":!0,className:f(O.combobox__chevron,y&&O["combobox__chevron--open"])})]}),h&&Ge&&!u&&t.jsx("button",{type:"button",className:O.combobox__clear,"aria-label":m.clear,onClick:Ua,children:t.jsx(I.XLg,{"aria-hidden":!0})}),C==="popover"&&t.jsxs("div",{ref:k,className:O.combobox__panel,style:{...J.style,width:(na=N.current)==null?void 0:na.offsetWidth,visibility:J.isPositioned?void 0:"hidden"},children:[ta,aa(!1)]}),C==="sheet"&&t.jsx(Wt,{title:r.placeholder,closeLabel:r.closeLabel??(g==null?void 0:g.close),onClose:Ee,toolbar:ta??void 0,children:aa(!0)})]})},js=s.memo(ks),Ns="hanui-segmented-qo2Bw",$s="hanui-segmented__item-mqRNZ",Es="hanui-segmented__icon-C9CT-",Cs="hanui-segmented__label-NVXBv",We={segmented:Ns,"segmented--sm":"hanui-segmented--sm-7tUry","segmented--md":"hanui-segmented--md-PiSqt",segmented__item:$s,"segmented__item--selected":"hanui-segmented__item--selected-r7CLj",segmented__icon:Es,segmented__label:Cs},Is=({options:e,value:a,onChange:n,label:r,isIconOnly:o,size:c="md",className:i,testId:u})=>{const h=s.useRef(null),d=l=>{var g,m;const _=l.key==="ArrowRight"||l.key==="ArrowDown"?1:l.key==="ArrowLeft"||l.key==="ArrowUp"?-1:0;if(_===0)return;l.preventDefault();const p=e.filter(v=>!v.isDisabled);if(p.length===0)return;const b=p.findIndex(v=>v.value===a),w=p[(b+_+p.length)%p.length];n(w.value),(m=(g=h.current)==null?void 0:g.querySelector(`[data-value="${w.value}"]`))==null||m.focus({preventScroll:!0})};return t.jsx("div",{ref:h,role:"radiogroup","aria-label":r,className:f(We.segmented,We[`segmented--${c}`],i),"data-testid":u,onKeyDown:d,children:e.map(l=>{const _=l.value===a;return t.jsxs("button",{type:"button",role:"radio","aria-checked":_,"aria-label":o?l.label:void 0,"data-value":l.value,disabled:l.isDisabled,tabIndex:_?0:-1,className:f(We.segmented__item,_&&We["segmented__item--selected"]),onClick:()=>!_&&n(l.value),children:[l.icon&&t.jsx("span",{className:We.segmented__icon,"aria-hidden":!0,children:l.icon}),!o&&t.jsx("span",{className:We.segmented__label,children:l.label})]},l.value)})})},Ds=s.memo(A(Is,"SegmentedControl")),Ts="hanui-select-tiiPL",Rs="hanui-trigger-rHQJz",Ss="hanui-trigger__icon-apCcx",Ls="hanui-trigger__value-ioH7K",As="hanui-trigger__chevron-FtsIZ",Fs="hanui-panel-rGOOd",Ms="hanui-list-SOKf8",Bs="hanui-option-ZDPef",Ps="hanui-option__label-SsoYB",Os="hanui-option__check-8CPSG",q={select:Ts,trigger:Rs,"trigger--empty":"hanui-trigger--empty-cuinb","trigger--open":"hanui-trigger--open-1nsvu","trigger--sm":"hanui-trigger--sm-Xnu1C",trigger__icon:Ss,trigger__value:Ls,trigger__chevron:As,"trigger__chevron--open":"hanui-trigger__chevron--open-1P2P-",panel:Fs,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Lt0Bt","panel--start":"hanui-panel--start-Fotwa","panel--end":"hanui-panel--end-ClVl2",list:Ms,"list--sheet":"hanui-list--sheet-BIjCb",option:Bs,"option--active":"hanui-option--active-R4lLF","option--selected":"hanui-option--selected-glQMj","option--disabled":"hanui-option--disabled-h4rdd",option__label:Ps,option__check:Os},zs=({options:e,value:a,onChange:n,label:r,placeholder:o,closeLabel:c,icon:i,size:u="md",align:h="start",isDisabled:d,id:l,className:_,testId:p,"aria-describedby":b,"aria-invalid":w})=>{const{labels:g}=z(),m=M("Select.placeholder",o,g==null?void 0:g.selectPlaceholder),v=s.useId(),$=l??v,j=`${$}-listbox`,x=B=>`${$}-option-${B}`,N=s.useRef(null),k=s.useRef(null),[T,C]=s.useState(null),D=T!==null,y=e.findIndex(B=>B.value===a),S=y>=0?e[y]:null,P=s.useCallback(()=>C(null),[]),X=s.useCallback(()=>{d||e.length===0||C(window.matchMedia(St).matches?"popover":"sheet")},[d,e.length]),G=B=>{B.isDisabled||(n(B.value),P())},K=s.useRef(!1);s.useEffect(()=>{var B;K.current&&!D&&((B=k.current)==null||B.focus()),K.current=D},[D]),s.useEffect(()=>{if(T!=="popover")return;const B=J=>{var ee;(ee=N.current)!=null&&ee.contains(J.target)||P()};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[T,P]);const{activeIndex:oe,setActiveIndex:Ge,listRef:xe,handleKeyDown:Ee}=Qt({count:e.length,isOpen:D,initialIndex:y>=0?y:0,onSelect:B=>{const J=e[B];J&&G(J)},onClose:P});s.useEffect(()=>{var B;T==="sheet"&&((B=xe.current)==null||B.focus({preventScroll:!0}))},[T,xe]);const jt=B=>{if(!D){["ArrowDown","ArrowUp","Enter"," "].includes(B.key)&&(B.preventDefault(),X());return}Ee(B)},it=B=>t.jsx("ul",{ref:xe,id:j,role:"listbox","aria-label":r,"aria-activedescendant":B&&e[oe]?x(oe):void 0,tabIndex:B?0:-1,className:f(q.list,B&&q["list--sheet"]),onKeyDown:B?jt:void 0,children:e.map((J,ee)=>{const Qe=J.value===a;return t.jsxs("li",{id:x(ee),role:"option","data-index":ee,"aria-selected":Qe,"aria-disabled":J.isDisabled,className:f(q.option,ee===oe&&q["option--active"],Qe&&q["option--selected"],J.isDisabled&&q["option--disabled"]),onMouseEnter:()=>Ge(ee),onClick:()=>G(J),children:[t.jsx("span",{className:q.option__label,children:J.label}),Qe&&t.jsx(I.CheckLg,{"aria-hidden":!0,className:q.option__check})]},J.value)})});return t.jsxs("span",{ref:N,className:f(q.select,_),"data-testid":p,children:[t.jsxs("button",{ref:k,id:$,type:"button",role:"combobox",className:f(q.trigger,q[`trigger--${u}`],!S&&q["trigger--empty"],D&&q["trigger--open"]),disabled:d,"aria-haspopup":"listbox","aria-expanded":D,"aria-controls":D?j:void 0,"aria-activedescendant":T==="popover"&&e[oe]?x(oe):void 0,"aria-label":r,"aria-describedby":b,"aria-invalid":w,onClick:()=>D?P():X(),onKeyDown:jt,children:[i&&t.jsx("span",{className:q.trigger__icon,"aria-hidden":!0,children:i}),t.jsx("span",{className:q.trigger__value,children:(S==null?void 0:S.label)??m}),t.jsx(I.CaretDownFill,{"aria-hidden":!0,className:f(q.trigger__chevron,D&&q["trigger__chevron--open"])})]}),T==="popover"&&t.jsx("div",{className:f(q.panel,q[`panel--${h}`]),children:it(!1)}),T==="sheet"&&t.jsx(Wt,{title:r,closeLabel:c??(g==null?void 0:g.close),onClose:P,children:it(!0)})]})},Hs=s.memo(zs),Ks="hanui-checkbox-FaFCj",Us="hanui-checkbox__input-nTHne",qs="hanui-checkbox__body-VAEW2",Ys="hanui-checkbox__label-sSNZY",Xs="hanui-checkbox__hint-ish-J",ut={checkbox:Ks,checkbox__input:Us,checkbox__body:qs,checkbox__label:Ys,checkbox__hint:Xs},Gs=s.forwardRef(({label:e,hint:a,className:n,testId:r,...o},c)=>t.jsxs("label",{className:f(ut.checkbox,n),"data-testid":r,children:[t.jsx("input",{ref:c,type:"checkbox",className:ut.checkbox__input,...o}),t.jsxs("span",{className:ut.checkbox__body,children:[t.jsx("span",{className:ut.checkbox__label,children:e}),a&&t.jsx("span",{className:ut.checkbox__hint,children:a})]})]})),Qs=s.memo(A(Gs,"Checkbox")),Js="hanui-switch__input-Q2UQ4",Ws="hanui-switch__label-gPZuO",Zs="hanui-switch__hint-NRuzC",Vs="hanui-switch__track-3417m",er="hanui-switch__thumb-1LHta",tr="hanui-switch__text-32uMY",Ie={switch:"hanui-switch-KLH29",switch__input:Js,"switch--labelFirst":"hanui-switch--labelFirst-Grirk",switch__label:Ws,switch__hint:Zs,switch__track:Vs,switch__thumb:er,switch__text:tr},ar=s.forwardRef(({label:e,hint:a,isLabelFirst:n,className:r,id:o,testId:c,...i},u)=>t.jsxs("label",{className:f(Ie.switch,n&&Ie["switch--labelFirst"],r),"data-testid":c,children:[t.jsx("input",{ref:u,type:"checkbox",role:"switch",id:o,className:Ie.switch__input,...i}),t.jsx("span",{className:Ie.switch__track,"aria-hidden":!0,children:t.jsx("span",{className:Ie.switch__thumb})}),t.jsxs("span",{className:Ie.switch__text,children:[t.jsx("span",{className:Ie.switch__label,children:e}),a&&t.jsx("span",{className:Ie.switch__hint,children:a})]})]})),nr=s.memo(A(ar,"Switch")),sr="hanui-radio-KoZak",rr="hanui-radio__input-gVMgh",or="hanui-radio__body-oZWg6",ir="hanui-radio__label-d-5ce",cr="hanui-radio__hint-baVbs",lr="hanui-radio__count-OtkUM",Ze={radio:sr,radio__input:rr,radio__body:or,radio__label:ir,radio__hint:cr,radio__count:lr},dr=s.forwardRef(({label:e,hint:a,count:n,className:r,testId:o,...c},i)=>t.jsxs("label",{className:f(Ze.radio,r),"data-testid":o,children:[t.jsx("input",{ref:i,type:"radio",className:Ze.radio__input,...c}),t.jsxs("span",{className:Ze.radio__body,children:[t.jsx("span",{className:Ze.radio__label,children:e}),a&&t.jsx("span",{className:Ze.radio__hint,children:a})]}),H.isDefined(n)&&t.jsx("span",{className:Ze.radio__count,children:n})]})),ur=s.memo(A(dr,"Radio")),_r="hanui-radioCard-sndiC",hr="hanui-radioCard__input-6vuoD",pr="hanui-radioCard__indicator--x9LT",mr="hanui-radioCard__body-CFqoi",Ve={radioCard:_r,radioCard__input:hr,"radioCard--selected":"hanui-radioCard--selected-Mi7ee",radioCard__indicator:pr,"radioCard--disabled":"hanui-radioCard--disabled-YlYee",radioCard__body:mr},br=({name:e,value:a,isSelected:n,isDisabled:r,onChange:o,children:c,className:i,id:u,testId:h})=>t.jsxs("label",{className:f(Ve.radioCard,n&&Ve["radioCard--selected"],r&&Ve["radioCard--disabled"],i),"data-testid":h,children:[t.jsx("input",{type:"radio",id:u,name:e,value:a,checked:n,disabled:r,onChange:()=>o(a),className:Ve.radioCard__input}),t.jsx("span",{className:Ve.radioCard__indicator,"aria-hidden":!0}),t.jsx("span",{className:Ve.radioCard__body,children:c})]}),gr=s.memo(br),fr="hanui-range-RpDPh",xr="hanui-range__readout-itDMd",vr="hanui-range__separator-u-ZJX",yr="hanui-range__track-bCh5Y",wr="hanui-range__fill-VXMCE",kr="hanui-range__input-TAN2I",jr="hanui-range__bounds-GIhFd",de={range:fr,"range--disabled":"hanui-range--disabled-13hlc",range__readout:xr,range__separator:vr,range__track:yr,range__fill:wr,range__input:kr,range__bounds:jr},Nr=({min:e,max:a,step:n=1,value:r,onChange:o,onCommit:c,formatValue:i=String,label:u,minLabel:h,maxLabel:d,isDisabled:l,className:_,testId:p})=>{var D,y;const{labels:b}=z(),w=M("RangeSlider.minLabel",h,(D=b==null?void 0:b.range)==null?void 0:D.min),g=M("RangeSlider.maxLabel",d,(y=b==null?void 0:b.range)==null?void 0:y.max),[m,v]=r,$=s.useCallback(S=>o([Math.min(S,v),v]),[v,o]),j=s.useCallback(S=>o([m,Math.max(S,m)]),[m,o]),x=s.useCallback(()=>c==null?void 0:c([m,v]),[m,v,c]),N=a-e,k=N===0?0:H.normalize(m-e,N),T=N===0?0:H.normalize(v-e,N),C=k>50;return t.jsxs("div",{className:f(de.range,l&&de["range--disabled"],_),role:"group","aria-label":u,"data-testid":p,children:[t.jsxs("div",{className:de.range__readout,children:[t.jsx("span",{className:de.range__value,children:i(m)}),t.jsx("span",{className:de.range__separator,"aria-hidden":!0,children:"—"}),t.jsx("span",{className:de.range__value,children:i(v)})]}),t.jsxs("div",{className:de.range__track,children:[t.jsx("span",{className:de.range__fill,style:{left:`${k}%`,right:`${100-T}%`},"aria-hidden":!0}),t.jsx("input",{type:"range",className:de.range__input,style:{zIndex:C?4:3},min:e,max:a,step:n,value:m,disabled:l,"aria-label":`${u} — ${w}`,"aria-valuetext":i(m),onChange:S=>$(Number(S.target.value)),onPointerUp:x,onKeyUp:x}),t.jsx("input",{type:"range",className:de.range__input,style:{zIndex:C?3:4},min:e,max:a,step:n,value:v,disabled:l,"aria-label":`${u} — ${g}`,"aria-valuetext":i(v),onChange:S=>j(Number(S.target.value)),onPointerUp:x,onKeyUp:x})]}),t.jsxs("div",{className:de.range__bounds,"aria-hidden":!0,children:[t.jsx("span",{children:i(e)}),t.jsx("span",{children:i(a)})]})]})},$r=s.memo(Nr),Er="hanui-rating-neNnF",Cr="hanui-rating__legend-uYvFS",Ir="hanui-rating__stars-vJFLk",Dr="hanui-rating__star-BANFJ",Tr="hanui-rating__input-s2iiO",Rr="hanui-rating__srOnly-iSCoz",Sr="hanui-rating__caption-13KFX",ye={rating:Er,"rating--disabled":"hanui-rating--disabled-ZKjHa",rating__legend:Cr,rating__stars:Ir,rating__star:Dr,"rating__star--filled":"hanui-rating__star--filled-L3AkT",rating__input:Tr,rating__srOnly:Rr,rating__caption:Sr},Lr=[1,2,3,4,5],Ar=({value:e,onChange:a,label:n,ratingLabels:r,formatStarCount:o,isDisabled:c,className:i,testId:u})=>{var w;const{labels:h}=z(),d=r??((w=h==null?void 0:h.rating)==null?void 0:w.scale),l=s.useId(),[_,p]=s.useState(null),b=_??e;return t.jsxs("fieldset",{className:f(ye.rating,c&&ye["rating--disabled"],i),disabled:c,"data-testid":u,children:[t.jsx("legend",{className:ye.rating__legend,children:n}),t.jsx("div",{className:ye.rating__stars,onMouseLeave:()=>p(null),children:Lr.map(g=>{var m;return t.jsxs("label",{className:f(ye.rating__star,b!==null&&g<=b&&ye["rating__star--filled"]),onMouseEnter:()=>p(g),children:[t.jsx("input",{type:"radio",name:l,value:g,checked:e===g,onChange:()=>a(g),className:ye.rating__input}),t.jsx(I.StarFill,{"aria-hidden":!0}),t.jsxs("span",{className:ye.rating__srOnly,children:[Tt("RatingInput.formatStarCount",o??((m=h==null?void 0:h.rating)==null?void 0:m.starCount),g)," ","— ",(d==null?void 0:d[g])??""]})]},g)})}),b!==null&&t.jsx("span",{className:ye.rating__caption,"aria-hidden":!0,children:(d==null?void 0:d[b])??""})]})},Fr=s.memo(Ar),Mr="hanui-stepper-8s5Ih",Br="hanui-stepper__button-h6g7d",Pr="hanui-stepper__input-OQh5v",_t={stepper:Mr,stepper__button:Br,stepper__input:Pr,"stepper--sm":"hanui-stepper--sm-RvrBP","stepper--md":"hanui-stepper--md-Cnjei"},Or=({value:e,onChange:a,label:n,decreaseLabel:r,increaseLabel:o,min:c=1,max:i=99,isDisabled:u,size:h="md",className:d,testId:l})=>{var m,v,$;const{labels:_}=z(),p=M("QuantityStepper.label",n,(m=_==null?void 0:_.quantity)==null?void 0:m.label),[b,w]=s.useState(null),g=j=>{w(null);const x=Number(j.replace(/\D/g,""));x&&a(Math.min(Math.max(x,c),i))};return t.jsxs("div",{className:f(_t.stepper,_t[`stepper--${h}`],d),role:"group","aria-label":p,"data-testid":l,children:[t.jsx("button",{type:"button",className:_t.stepper__button,onClick:()=>a(Math.max(e-1,c)),disabled:u||e<=c,"aria-label":M("QuantityStepper.decreaseLabel",r,(v=_==null?void 0:_.quantity)==null?void 0:v.decrease),children:t.jsx(I.DashLg,{"aria-hidden":!0})}),t.jsx("input",{className:_t.stepper__input,value:b??String(e),onChange:j=>w(j.target.value.replace(/\D/g,"").slice(0,2)),onBlur:j=>g(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),g(j.target.value))},inputMode:"numeric",disabled:u,"aria-label":`${p} (${c}-${i})`}),t.jsx("button",{type:"button",className:_t.stepper__button,onClick:()=>a(Math.min(e+1,i)),disabled:u||e>=i,"aria-label":M("QuantityStepper.increaseLabel",o,($=_==null?void 0:_.quantity)==null?void 0:$.increase),children:t.jsx(I.PlusLg,{"aria-hidden":!0})})]})},zr=s.memo(Or),Hr="hanui-checkbox--dvpB",Kr={checkbox:Hr},Ur=s.forwardRef(({label:e,className:a,testId:n,...r},o)=>t.jsx("input",{ref:o,type:"checkbox","aria-label":e,className:f(Kr.checkbox,a),"data-testid":n,...r})),qr=s.memo(A(Ur,"TableCheckbox")),Yr="hanui-wrapper-IAI4E",Xr="hanui-wrapper__prefix-XKDlV",Gr="hanui-wrapper__suffix-lT35q",Qr="hanui-input-pIS2u",Be={wrapper:Yr,wrapper__prefix:Xr,wrapper__suffix:Gr,input:Qr,"input--hasPrefix":"hanui-input--hasPrefix-nsrWh","input--hasSuffix":"hanui-input--hasSuffix-OrE5A","input--technical":"hanui-input--technical---DCD"},Jr=s.forwardRef(({prefix:e,suffix:a,isTechnical:n,className:r,testId:o,...c},i)=>t.jsxs("span",{className:f(Be.wrapper,r),children:[e&&t.jsx("span",{className:Be.wrapper__prefix,"aria-hidden":!0,children:e}),t.jsx("input",{ref:i,className:f(Be.input,!!e&&Be["input--hasPrefix"],!!a&&Be["input--hasSuffix"],n&&Be["input--technical"]),"data-testid":o,...c}),a&&t.jsx("span",{className:Be.wrapper__suffix,"aria-hidden":!0,children:a})]})),Sa=s.memo(A(Jr,"Input")),Wr="hanui-tagInput-QraZR",Zr="hanui-tagInput__field-HeWrC",Vr="hanui-tagInput__tag-D-ZWB",eo="hanui-tagInput__remove-bpjGG",Pe={tagInput:Wr,tagInput__field:Zr,"tagInput--invalid":"hanui-tagInput--invalid-NQogL","tagInput--disabled":"hanui-tagInput--disabled--AJFF",tagInput__tag:Vr,"tagInput__tag--duplicate":"hanui-tagInput__tag--duplicate-3-FMF",tagInput__remove:eo},to=({values:e,onChange:a,label:n,placeholder:r,removeLabel:o,separators:c=["Enter",","],maxTags:i,isDisabled:u,id:h,className:d,testId:l,"aria-describedby":_,"aria-invalid":p})=>{const b=s.useId(),w=h??b,g=s.useRef(null),m=Rt(),[v,$]=s.useState(""),[j,x]=s.useState(null),N=i!==void 0&&e.length>=i,k=D=>{const y=D.trim();if(y!==""){if(e.includes(y)){x(y),window.setTimeout(()=>x(null),1e3),m(`${y} zaten ekli`,"assertive"),$("");return}N||(a([...e,y]),$(""),m(`${y} eklendi`))}},T=D=>{a(e.filter(y=>y!==D)),m(`${D} kaldırıldı`)},C=D=>{if(c.includes(D.key)){D.preventDefault(),k(v);return}D.key==="Backspace"&&v===""&&e.length>0&&T(e[e.length-1])};return t.jsxs("div",{className:f(Pe.tagInput,u&&Pe["tagInput--disabled"],p&&Pe["tagInput--invalid"],d),"data-testid":l,onClick:()=>{var D;return(D=g.current)==null?void 0:D.focus()},children:[e.map(D=>t.jsxs("span",{className:f(Pe.tagInput__tag,j===D&&Pe["tagInput__tag--duplicate"]),children:[D,t.jsx("button",{type:"button",className:Pe.tagInput__remove,"aria-label":`${D} — ${o}`,disabled:u,onClick:y=>{y.stopPropagation(),T(D)},children:t.jsx(I.XLg,{"aria-hidden":!0})})]},D)),t.jsx("input",{ref:g,id:w,type:"text",className:Pe.tagInput__field,value:v,placeholder:e.length===0?r:void 0,"aria-label":n,"aria-describedby":_,"aria-invalid":p,disabled:u||N,onChange:D=>$(D.target.value),onKeyDown:C,onBlur:()=>k(v)})]})},ao=s.memo(A(to,"TagInput")),no="hanui-textarea-zwJcB",so="hanui-wrapper-O8aJA",ro="hanui-counter-bHVh3",ht={textarea:no,wrapper:so,"textarea--autoSize":"hanui-textarea--autoSize--F8yj",counter:ro,"counter--near":"hanui-counter--near-AZAQm"},oo=s.forwardRef(({className:e,rows:a=4,isAutoSize:n,maxRows:r=12,hasCounter:o,maxLength:c,value:i,defaultValue:u,onChange:h,testId:d,...l},_)=>{const p=s.useRef(null),[b,w]=s.useState(String(u??"").length),g=i===void 0?b:String(i).length,m=s.useCallback($=>{p.current=$,typeof _=="function"?_($):_&&(_.current=$)},[_]);s.useLayoutEffect(()=>{const $=p.current;if(!n||!$)return;$.style.height="auto";const x=(Number.parseFloat(getComputedStyle($).lineHeight)||20)*r;$.style.height=`${Math.min($.scrollHeight,x)}px`,$.style.overflowY=$.scrollHeight>x?"auto":"hidden"},[n,r,i,g]);const v=c!==void 0&&g>=c*.9;return t.jsxs("div",{className:f(ht.wrapper,e),"data-testid":d,children:[t.jsx("textarea",{ref:m,rows:a,className:f(ht.textarea,n&&ht["textarea--autoSize"]),maxLength:c,value:i,defaultValue:u,onChange:$=>{w($.target.value.length),h==null||h($)},...l}),o&&c!==void 0&&t.jsxs("span",{className:f(ht.counter,v&&ht["counter--near"]),"aria-hidden":!0,children:[g," / ",c]})]})}),La=s.memo(A(oo,"Textarea")),io="hanui-dateField-UnUwe",co="hanui-range-nGuRH",lo="hanui-range__row--debA",uo="hanui-range__separator-fEqqr",_o="hanui-range__field-tmoNH",ho="hanui-range__summary-L6v1T",Ue={dateField:io,range:co,range__row:lo,range__separator:uo,range__field:_o,range__summary:ho},qt=s.forwardRef(({type:e="date",className:a,testId:n,...r},o)=>t.jsx("input",{ref:o,type:e,className:f(Ue.dateField,a),"data-testid":n,...r})),po=s.memo(A(qt,"DateField")),mo=({value:e,onChange:a,startLabel:n,endLabel:r,separator:o="–",min:c,max:i,isSummaryVisible:u,isDisabled:h,className:d,testId:l})=>{const{labels:_}=z(),p=(()=>{if(!u||!(_!=null&&_.locale)||e.start===""||e.end==="")return null;try{const b=new Intl.DateTimeFormat(_.locale,{dateStyle:"medium"});return`${b.format(new Date(e.start))} ${o} ${b.format(new Date(e.end))}`}catch{return null}})();return t.jsxs("div",{className:f(Ue.range,d),"data-testid":l,children:[t.jsxs("div",{className:Ue.range__row,children:[t.jsx(qt,{className:Ue.range__field,"aria-label":n,value:e.start,min:c,max:e.end||i,disabled:h,onChange:b=>a({...e,start:b.target.value})}),t.jsx("span",{className:Ue.range__separator,"aria-hidden":!0,children:o}),t.jsx(qt,{className:Ue.range__field,"aria-label":r,value:e.end,min:e.start||c,max:i,disabled:h,onChange:b=>a({...e,end:b.target.value})})]}),p&&t.jsx("span",{className:Ue.range__summary,children:p})]})},bo=A(s.memo(mo),"DateRange"),go="hanui-field-KKvre",fo="hanui-field__label-9dlYd",xo="hanui-field__required-hbDJk",vo="hanui-field__srOnly-2WQFH",yo="hanui-field__hint-SQPiL",wo="hanui-field__error-gLlZ-",ko="hanui-field__errorIcon-uA3o8",De={field:go,field__label:fo,"field__label--hidden":"hanui-field__label--hidden-ufuVt",field__required:xo,field__srOnly:vo,field__hint:yo,field__error:wo,field__errorIcon:ko},jo=({label:e,children:a,hint:n,error:r,isRequired:o,requiredLabel:c,isLabelHidden:i,className:u})=>{const{labels:h}=z(),d=s.useId(),l=`${d}-error`,_=`${d}-hint`;return t.jsxs("div",{className:f(De.field,u),children:[t.jsxs("label",{htmlFor:d,className:f(De.field__label,i&&De["field__label--hidden"]),children:[e,o&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:De.field__required,"aria-hidden":!0,children:"*"}),t.jsx("span",{className:De.field__srOnly,children:M("Field.requiredLabel",c,h==null?void 0:h.required)})]})]}),a({id:d,required:o||void 0,"aria-invalid":r?!0:void 0,"aria-describedby":[r&&l,n&&_].filter(Boolean).join(" ")||void 0}),r&&t.jsxs("p",{id:l,className:De.field__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0,className:De.field__errorIcon}),r]}),n&&t.jsx("p",{id:_,className:De.field__hint,children:n})]})},Aa=s.memo(jo),No="hanui-progress-99MrX",$o="hanui-progress__track-Qbp9t",Eo="hanui-progress__fill-Bam55",Co="hanui-progress__value-3FYxj",Io="hanui-circle-9cn2w",Do="hanui-circle__svg-0IwkR",To="hanui-circle__track-zY2qc",Ro="hanui-circle__fill-Jbde6",So="hanui-circle__label-A3nJB",V={progress:No,progress__track:$o,"progress__track--sm":"hanui-progress__track--sm-dbHZq","progress__track--md":"hanui-progress__track--md-v1GdW","progress__track--indeterminate":"hanui-progress__track--indeterminate-8fMxl",progress__fill:Eo,"hanui-progress-slide":"hanui-hanui-progress-slide-DQi2w","progress__fill--success":"hanui-progress__fill--success-IFuI5","progress__fill--warning":"hanui-progress__fill--warning-wIhgi","progress__fill--danger":"hanui-progress__fill--danger-cuqj0",progress__value:Co,circle:Io,circle__svg:Do,circle__track:To,circle__fill:Ro,"circle__fill--success":"hanui-circle__fill--success-HTr0m","circle__fill--warning":"hanui-circle__fill--warning-Fkgj2","circle__fill--danger":"hanui-circle__fill--danger-4E3Z8","circle--indeterminate":"hanui-circle--indeterminate-cITY6","hanui-spin":"hanui-hanui-spin-ez3g8",circle__label:So},Fa=(e,a)=>!Number.isFinite(e)||!Number.isFinite(a)||a<=0?0:Math.min(100,Math.max(0,e/a*100)),Lo=({value:e,max:a=100,label:n,valueText:r,isValueVisible:o,tone:c="brand",size:i="md",className:u,testId:h})=>{const d=e===void 0,l=d?0:Fa(e,a);return t.jsxs("div",{className:f(V.progress,u),"data-testid":h,children:[t.jsx("div",{role:"progressbar","aria-label":n,"aria-valuenow":d?void 0:Math.round(l),"aria-valuemin":d?void 0:0,"aria-valuemax":d?void 0:100,"aria-valuetext":d?void 0:r,className:f(V.progress__track,V[`progress__track--${i}`],d&&V["progress__track--indeterminate"]),children:t.jsx("span",{className:f(V.progress__fill,V[`progress__fill--${c}`]),style:d?void 0:{inlineSize:`${l}%`}})}),o&&!d&&t.jsx("span",{className:V.progress__value,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},Ma=s.memo(A(Lo,"Progress")),Ao=({value:e,max:a=100,label:n,valueText:r,isValueVisible:o,tone:c="brand",size:i=44,className:u,testId:h})=>{const d=e===void 0,l=d?25:Fa(e,a),_=Math.max(3,Math.round(i*.1)),p=(i-_)/2,b=2*Math.PI*p;return t.jsxs("div",{className:f(V.circle,d&&V["circle--indeterminate"],u),style:{width:i,height:i},"data-testid":h,children:[t.jsxs("svg",{className:V.circle__svg,width:i,height:i,viewBox:`0 0 ${i} ${i}`,role:"progressbar","aria-label":n,"aria-valuenow":d?void 0:Math.round(l),"aria-valuemin":d?void 0:0,"aria-valuemax":d?void 0:100,"aria-valuetext":d?void 0:r,children:[t.jsx("circle",{className:V.circle__track,cx:i/2,cy:i/2,r:p,fill:"none",strokeWidth:_}),t.jsx("circle",{className:f(V.circle__fill,V[`circle__fill--${c}`]),cx:i/2,cy:i/2,r:p,fill:"none",strokeWidth:_,strokeDasharray:b,strokeDashoffset:b*(1-l/100)})]}),o&&!d&&t.jsx("span",{className:V.circle__label,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},Fo=A(s.memo(Ao),"ProgressCircle"),Mo="hanui-upload-v1pRY",Bo="hanui-upload__drop-OpNbO",Po="hanui-upload__input-Tcg9-",Oo="hanui-upload__icon-KpMkq",zo="hanui-upload__label-M4HJb",Ho="hanui-upload__drag-ewSQw",Ko="hanui-upload__hint-MZRJ6",Uo="hanui-upload__error-7GkCC",qo="hanui-upload__list-lbViQ",Yo="hanui-upload__file-Znp1Q",Xo="hanui-upload__fileText-EtJcs",Go="hanui-upload__fileName-ArF8-",Qo="hanui-upload__fileMeta-i6sO1",Jo="hanui-upload__progress-JY2a5",Y={upload:Mo,upload__drop:Bo,upload__input:Po,"upload__drop--dragging":"hanui-upload__drop--dragging-YztUx","upload__drop--invalid":"hanui-upload__drop--invalid-JhwnL","upload__drop--disabled":"hanui-upload__drop--disabled-zyfUv",upload__icon:Oo,upload__label:zo,upload__drag:Ho,upload__hint:Ko,upload__error:Uo,upload__list:qo,upload__file:Yo,"upload__file--error":"hanui-upload__file--error-wpbtA",upload__fileText:Xo,upload__fileName:Go,upload__fileMeta:Qo,upload__progress:Jo},ma=e=>e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`,Wo=({files:e,onSelect:a,onRemove:n,label:r,hint:o,accept:c,isMultiple:i,maxSize:u,removeLabel:h,dropLabel:d,sizeErrorText:l="{name} çok büyük (en fazla {max}).",isDisabled:_,error:p,children:b,className:w,testId:g})=>{const m=s.useId(),v=s.useId(),$=s.useRef(null),j=Rt(),[x,N]=s.useState(!1),[k,T]=s.useState([]),C=y=>{if(!y||y.length===0)return;const S=[...y],P=u===void 0?[]:S.filter(K=>K.size>u),X=S.filter(K=>!P.includes(K)),G=P.map(K=>l.replace("{name}",K.name).replace("{max}",ma(u??0)));T(G),X.length>0&&(a(X),j(`${X.length} dosya eklendi`)),G.length>0&&j(G.join(" "),"assertive")},D=y=>{y.preventDefault(),N(!1),!_&&C(y.dataTransfer.files)};return t.jsxs("div",{className:f(Y.upload,w),"data-testid":g,children:[t.jsxs("label",{htmlFor:m,className:f(Y.upload__drop,x&&Y["upload__drop--dragging"],_&&Y["upload__drop--disabled"],p&&Y["upload__drop--invalid"]),onDragOver:y=>{y.preventDefault(),_||N(!0)},onDragLeave:()=>N(!1),onDrop:D,children:[t.jsx(I.CloudArrowUpFill,{"aria-hidden":!0,className:Y.upload__icon}),t.jsx("span",{className:Y.upload__label,children:r}),t.jsx("span",{className:Y.upload__drag,children:d}),o&&t.jsx("span",{id:v,className:Y.upload__hint,children:o}),t.jsx("input",{ref:$,id:m,type:"file",className:Y.upload__input,accept:c,multiple:i,disabled:_,"aria-describedby":o?v:void 0,"aria-invalid":p?!0:void 0,onChange:y=>{C(y.target.files),y.target.value=""}})]}),p&&t.jsxs("p",{className:Y.upload__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),p]}),k.map(y=>t.jsxs("p",{className:Y.upload__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),y]},y)),e.length>0&&t.jsx("ul",{className:Y.upload__list,children:e.map(y=>t.jsxs("li",{className:f(Y.upload__file,y.error&&Y["upload__file--error"]),children:[t.jsxs("span",{className:Y.upload__fileText,children:[t.jsx("span",{className:Y.upload__fileName,children:y.name}),t.jsx("span",{className:Y.upload__fileMeta,children:y.error??ma(y.size)})]}),y.progress!==void 0&&t.jsx(Ma,{value:y.progress,label:`${y.name} yükleniyor`,size:"sm",className:Y.upload__progress}),t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:`${y.name} — ${h}`,variant:"ghost",size:"sm",onClick:()=>n(y.id)})]},y.id))}),b]})},Zo=s.memo(A(Wo,"FileUpload")),Vo="hanui-alert-gHI-9",ei="hanui-alert__icon-DhiCT",ti="hanui-alert__body-52-z2",ai="hanui-alert__title-I8BAh",ni="hanui-alert__content-lhBEo",si="hanui-alert__action-1mTje",Oe={alert:Vo,alert__icon:ei,alert__body:ti,alert__title:ai,alert__content:ni,alert__action:si,"alert--info":"hanui-alert--info-lsAVw","alert--success":"hanui-alert--success-RMJR6","alert--warning":"hanui-alert--warning-Rkgln","alert--danger":"hanui-alert--danger-9ei0Y"},ri={info:t.jsx(I.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(I.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(I.XCircleFill,{"aria-hidden":!0})},oi=({children:e,tone:a="info",title:n,action:r,className:o,testId:c})=>t.jsxs("div",{className:f(Oe.alert,Oe[`alert--${a}`],o),role:a==="danger"||a==="warning"?"alert":void 0,"data-testid":c,children:[t.jsx("span",{className:Oe.alert__icon,children:ri[a]}),t.jsxs("div",{className:Oe.alert__body,children:[n&&t.jsx("strong",{className:Oe.alert__title,children:n}),t.jsx("div",{className:Oe.alert__content,children:e})]}),r&&t.jsx("div",{className:Oe.alert__action,children:r})]}),ii=s.memo(oi),ci="hanui-avatar-qoh3P",li="hanui-avatar__image-uAyAX",Et={avatar:ci,avatar__image:li,"avatar--sm":"hanui-avatar--sm-GGjU4","avatar--md":"hanui-avatar--md-xhXnK","avatar--lg":"hanui-avatar--lg-ULP-r","avatar--tone-0":"hanui-avatar--tone-0-mvjdw","avatar--tone-1":"hanui-avatar--tone-1-RYZOX","avatar--tone-2":"hanui-avatar--tone-2-vP-CS","avatar--tone-3":"hanui-avatar--tone-3-ivgnI","avatar--tone-4":"hanui-avatar--tone-4-V57r3","avatar--tone-5":"hanui-avatar--tone-5-65aPg"},di=(e,a)=>{const n=e.trim().split(/\s+/).filter(Boolean);if(n.length===0)return"?";const r=n.length===1?n[0].slice(0,2):`${n[0][0]}${n[n.length-1][0]}`;return a?r.toLocaleUpperCase(a):r.toLocaleUpperCase()},ui=(e,a)=>{let n=5381;for(let r=0;r<e.length;r+=1)n=n*33^e.charCodeAt(r);return Math.abs(n)%a},_i=6,hi=({name:e,imageUrl:a,locale:n,size:r="md",className:o,testId:c})=>{const{labels:i}=z();return t.jsx("span",{className:f(Et.avatar,Et[`avatar--${r}`],!a&&Et[`avatar--tone-${ui(e,_i)}`],o),"aria-hidden":!0,"data-testid":c,children:a?t.jsx("img",{className:Et.avatar__image,src:a,alt:""}):di(e,n??(i==null?void 0:i.locale))})},pi=s.memo(hi),mi="hanui-badge-uLAaI",bi="hanui-badge__icon-R2goZ",Ct={badge:mi,badge__icon:bi,"badge--neutral":"hanui-badge--neutral-6kddt","badge--soft":"hanui-badge--soft-gFeRF","badge--solid":"hanui-badge--solid-rtdHI","badge--outline":"hanui-badge--outline-QiAAz","badge--success":"hanui-badge--success-Oj11F","badge--danger":"hanui-badge--danger-X3nV0","badge--warning":"hanui-badge--warning-vAsx2","badge--info":"hanui-badge--info-mHOwk","badge--oem":"hanui-badge--oem-Nl-VX","badge--alt":"hanui-badge--alt-gQkww","badge--sale":"hanui-badge--sale-Li1tG","badge--action":"hanui-badge--action-7pUio","badge--link":"hanui-badge--link-zcNJZ"},gi=({children:e,tone:a="neutral",variant:n="soft",icon:r,className:o,testId:c})=>t.jsxs("span",{className:f(Ct.badge,Ct[`badge--${a}`],Ct[`badge--${n}`],o),"data-testid":c,children:[r&&t.jsx("span",{className:Ct.badge__icon,children:r}),e]}),fi=s.memo(gi),xi="hanui-breadcrumb-amB9n",vi="hanui-breadcrumb__item-Icv1S",yi="hanui-breadcrumb__link-eVkPq",wi="hanui-breadcrumb__current-8XjhU",ki="hanui-breadcrumb__separator-vvaUi",pt={breadcrumb:xi,breadcrumb__item:vi,breadcrumb__link:yi,breadcrumb__current:wi,breadcrumb__separator:ki},ji=({items:e,label:a,linkProps:n,className:r,testId:o})=>{const{labels:c}=z();return t.jsx("nav",{className:r,"aria-label":M("Breadcrumb.label",a,c==null?void 0:c.breadcrumb),"data-testid":o,children:t.jsx("ol",{className:f(pt.breadcrumb),children:e.map((i,u)=>{const h=u===e.length-1;return t.jsxs("li",{className:pt.breadcrumb__item,children:[i.href&&!h?t.jsx(fe,{href:i.href,className:pt.breadcrumb__link,...n,children:i.label}):t.jsx("span",{className:pt.breadcrumb__current,"aria-current":"page",children:i.label}),!h&&t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:pt.breadcrumb__separator})]},`${i.label}-${u}`)})})})},Ni=s.memo(ji),$i="hanui-card-CaHUG",Ei="hanui-media__frame-eBv-s",Ci="hanui-media-eggk5",Ii="hanui-media__link-ujyVV",Di="hanui-overlay-AVMTX",Ti="hanui-body-DyI-6",Ri="hanui-footer-2WNCZ",me={card:$i,"card--interactive":"hanui-card--interactive-C1pXZ",media__frame:Ei,media:Ci,media__link:Ii,"media__frame--contained":"hanui-media__frame--contained-Nv9gh",overlay:Di,"overlay--top-left":"hanui-overlay--top-left-td1xA","overlay--top-right":"hanui-overlay--top-right-GqD9H","overlay--bottom-left":"hanui-overlay--bottom-left-T5Quw","overlay--bottom-right":"hanui-overlay--bottom-right-za3z3",body:Ti,footer:Ri},Si=({children:e,isInteractive:a,as:n="div",className:r,testId:o})=>t.jsx(n,{className:f(me.card,a&&me["card--interactive"],r),"data-testid":o,children:e}),Li=A(s.memo(({children:e,ratio:a=1,href:n,linkProps:r,isContained:o=!0,className:c})=>{const i=t.jsx("span",{className:f(me.media__frame,o&&me["media__frame--contained"]),style:{aspectRatio:a},children:e});return t.jsx("div",{className:f(me.media,c),children:n?t.jsx(fe,{href:n,className:me.media__link,tabIndex:-1,"aria-hidden":!0,...r,children:i}):i})}),"CardMedia"),Ai=A(s.memo(({children:e,position:a="top-left",className:n})=>t.jsx("div",{className:f(me.overlay,me[`overlay--${a}`],n),children:e})),"CardOverlay"),Fi=A(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(me.body,a),children:e})),"CardBody"),Mi=A(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(me.footer,a),children:e})),"CardFooter"),Bi=s.memo(Si),Pi="hanui-carousel-GJXkW",Oi="hanui-carousel__controls-hm5ij",zi="hanui-carousel__arrowIcon-adFey",Hi="hanui-carousel__track-mAux5",Ki="hanui-carousel__dots-iU8RJ",Ui="hanui-carousel__dot-JTLCB",Te={carousel:Pi,carousel__controls:Oi,carousel__arrowIcon:zi,carousel__track:Hi,carousel__dots:Ki,carousel__dot:Ui,"carousel__dot--active":"hanui-carousel__dot--active-riNMm"},qi=({children:e,label:a,previousLabel:n,nextLabel:r,formatDotLabel:o,itemMinWidth:c=240,className:i,testId:u})=>{const h=s.useRef(null),[d,l]=s.useState(!1),[_,p]=s.useState(!1),[b,w]=s.useState(0),[g,m]=s.useState(1),[v,$]=s.useState(!1),j=s.useCallback(()=>{const N=h.current;if(!N)return;const{scrollLeft:k,scrollWidth:T,clientWidth:C}=N;l(k>1),p(k+C<T-1),w(C>0?Math.round(k/C):0),m(C>0?Math.max(1,Math.ceil(T/C)):1),$(T>C&&N.querySelector("a, button, input, select, textarea, [tabindex]")===null)},[]);s.useEffect(()=>{const N=h.current;if(!N)return;j(),N.addEventListener("scroll",j,{passive:!0});const k=typeof ResizeObserver>"u"?null:new ResizeObserver(j);return k==null||k.observe(N),()=>{N.removeEventListener("scroll",j),k==null||k.disconnect()}},[j,e]);const x=N=>{var k;return(k=h.current)==null?void 0:k.scrollBy({left:N*h.current.clientWidth,behavior:"smooth"})};return t.jsxs("section",{className:f(Te.carousel,i),"aria-label":a,"data-testid":u,children:[t.jsxs("div",{className:Te.carousel__controls,children:[t.jsx(ge,{icon:t.jsx(I.CaretLeftFill,{"aria-hidden":!0,className:Te.carousel__arrowIcon}),label:n,variant:"outline",size:"sm",disabled:!d,onClick:()=>x(-1)}),t.jsx(ge,{icon:t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:Te.carousel__arrowIcon}),label:r,variant:"outline",size:"sm",disabled:!_,onClick:()=>x(1)})]}),t.jsx("div",{ref:h,className:Te.carousel__track,style:{"--hanui-carousel-item":`${c}px`},tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?a:void 0,children:e}),o&&g>1&&t.jsx("div",{className:Te.carousel__dots,children:Array.from({length:g},(N,k)=>t.jsx("button",{type:"button",className:f(Te.carousel__dot,k===b&&Te["carousel__dot--active"]),"aria-label":o(k+1,g),"aria-current":k===b?"true":void 0,onClick:()=>{var T;return(T=h.current)==null?void 0:T.scrollTo({left:k*h.current.clientWidth,behavior:"smooth"})}},k))})]})},Yi=s.memo(A(qi,"Carousel")),Xi="hanui-copy-Yht5s",Gi="hanui-copy__code-CYlCA",Qi="hanui-copy__button-GDdH6",Ji="hanui-copy__srOnly-WMTNN",et={copy:Xi,"copy--sm":"hanui-copy--sm-Tjqws",copy__code:Gi,"copy--md":"hanui-copy--md-00rhU",copy__button:Qi,"copy__button--done":"hanui-copy__button--done-MujUR",copy__srOnly:Ji},Wi=1600,Zi=({value:e,copyLabel:a,copiedLabel:n,copiedAnnouncement:r,size:o="sm",isReadOnly:c,className:i,testId:u})=>{var g,m,v;const{labels:h}=z(),[d,l]=s.useState(!1),_=s.useRef(null),p=s.useRef(void 0);s.useEffect(()=>()=>window.clearTimeout(p.current),[]);const b=s.useCallback(()=>{const $=_.current;if(!$)return;const j=document.createRange();j.selectNodeContents($);const x=window.getSelection();x==null||x.removeAllRanges(),x==null||x.addRange(j)},[]),w=s.useCallback(async()=>{try{await navigator.clipboard.writeText(e),l(!0),p.current=window.setTimeout(()=>l(!1),Wi)}catch{b()}},[e,b]);return t.jsxs("span",{className:f(et.copy,et[`copy--${o}`],i),"data-testid":u,children:[t.jsx("span",{className:et.copy__code,ref:_,children:e}),!c&&t.jsx("button",{type:"button",className:f(et.copy__button,d&&et["copy__button--done"]),onClick:w,"aria-label":d?n??Tt("CopyField.copiedLabel",(g=h==null?void 0:h.copyField)==null?void 0:g.copied,e):a??Tt("CopyField.copyLabel",(m=h==null?void 0:h.copyField)==null?void 0:m.copy,e),children:d?t.jsx(I.ClipboardCheckFill,{"aria-hidden":!0}):t.jsx(I.ClipboardFill,{"aria-hidden":!0})}),t.jsx("span",{"aria-live":"polite",className:et.copy__srOnly,children:d?M("CopyField.copiedAnnouncement",r,(v=h==null?void 0:h.copyField)==null?void 0:v.announcement):""})]})},Vi=s.memo(Zi),ec="hanui-divider-RJqCw",tc="hanui-divider__label-M8sBA",It={divider:ec,"divider--labelled":"hanui-divider--labelled-jZH1-",divider__label:tc},ac=({label:e,className:a})=>e?t.jsx("div",{className:f(It.divider,It["divider--labelled"],a),children:t.jsx("span",{className:It.divider__label,children:e})}):t.jsx("hr",{className:f(It.divider,a)}),nc=s.memo(ac),sc="hanui-directory-badEd",rc="hanui-group-i6An9",oc="hanui-group__header-rc19c",ic="hanui-group__label-vQTcs",cc="hanui-group__link-es5V7",lc="hanui-group__meta-LtC-u",dc="hanui-group__list-YxBCG",uc="hanui-row-3LH7X",_c="hanui-row__name-75Wbq",hc="hanui-row__media-AxZEh",pc="hanui-row__marker-RYHb-",mc="hanui-jump-vpGwB",bc="hanui-jump__link-rRnT6",se={directory:sc,group:rc,group__header:oc,group__label:ic,group__link:cc,group__meta:lc,group__list:dc,row:uc,row__name:_c,row__media:hc,row__marker:pc,jump:mc,jump__link:bc},gc=({children:e,className:a})=>t.jsx("div",{className:f(se.directory,a),children:e}),fc=A(s.memo(({label:e,href:a,linkProps:n,meta:r,children:o,id:c})=>t.jsxs("section",{className:se.group,id:c,children:[t.jsxs("header",{className:se.group__header,children:[t.jsx("h2",{className:se.group__label,children:a?t.jsx(fe,{href:a,className:se.group__link,...n,children:e}):e}),r&&t.jsx("span",{className:se.group__meta,children:r})]}),t.jsx("ul",{className:se.group__list,children:o})]})),"DirectoryGroup"),xc=A(s.memo(({href:e,name:a,media:n,marker:r,linkProps:o,className:c})=>t.jsx("li",{children:t.jsxs(fe,{href:e,className:f(se.row,c),...o,children:[n&&t.jsx("span",{className:se.row__media,children:n}),t.jsx("span",{className:se.row__name,children:a}),r&&t.jsx("span",{className:se.row__marker,children:r})]})})),"DirectoryRow"),vc=A(s.memo(({labels:e,toId:a,label:n})=>{const{labels:r}=z();return t.jsx("nav",{className:se.jump,"aria-label":M("DirectoryJump.label",n,r==null?void 0:r.directoryJump),children:e.map(o=>t.jsx("a",{href:`#${a(o)}`,className:se.jump__link,children:o},o))})}),"DirectoryJump"),yc=s.memo(gc),wc="hanui-empty-47qZR",kc="hanui-empty__icon-okfEc",jc="hanui-empty__title-Z7Dzd",Nc="hanui-empty__description-6BoCk",$c="hanui-empty__actions-ARk-k",ze={empty:wc,empty__icon:kc,empty__title:jc,empty__description:Nc,empty__actions:$c,"empty--sm":"hanui-empty--sm-QXaXx","empty--error":"hanui-empty--error-4BBgp"},Ec=({title:e,description:a,icon:n,action:r,secondaryAction:o,tone:c="empty",size:i="md",className:u,testId:h})=>t.jsxs("div",{className:f(ze.empty,ze[`empty--${i}`],ze[`empty--${c}`],u),role:c==="error"?"alert":void 0,"data-testid":h,children:[n&&t.jsx("span",{className:ze.empty__icon,children:n}),t.jsx("h3",{className:ze.empty__title,children:e}),a&&t.jsx("p",{className:ze.empty__description,children:a}),(r||o)&&t.jsxs("div",{className:ze.empty__actions,children:[r,o]})]}),Cc=s.memo(Ec),Ic="hanui-header-yJwus",Dc="hanui-header__top-UK4si",Tc="hanui-header__breadcrumb-A2j0i",Rc="hanui-header__text-HIo8U",Sc="hanui-header__eyebrow-dZ9Zc",Lc="hanui-header__titleRow-KgDZj",Ac="hanui-header__title-s1giF",Fc="hanui-header__meta-UxuaD",Mc="hanui-header__description-NXbbC",Bc="hanui-header__actions-aShpt",he={header:Ic,header__top:Dc,header__breadcrumb:Tc,header__text:Rc,header__eyebrow:Sc,header__titleRow:Lc,header__title:Ac,header__meta:Fc,header__description:Mc,header__actions:Bc},Pc=({title:e,eyebrow:a,description:n,actions:r,breadcrumb:o,meta:c,children:i,as:u="h1",className:h,testId:d})=>t.jsxs("header",{className:f(he.header,h),"data-testid":d,children:[o&&t.jsx("div",{className:he.header__breadcrumb,children:o}),t.jsxs("div",{className:he.header__top,children:[t.jsxs("div",{className:he.header__text,children:[a&&t.jsx("span",{className:he.header__eyebrow,children:a}),t.jsxs("div",{className:he.header__titleRow,children:[t.jsx(u,{className:he.header__title,children:e}),c&&t.jsx("span",{className:he.header__meta,children:c})]}),n&&t.jsx("p",{className:he.header__description,children:n})]}),r&&t.jsx("div",{className:he.header__actions,children:r})]}),i]}),Oc=s.memo(Pc),zc="hanui-panel-Sv-1m",Hc="hanui-panel__header-ysexh",Kc="hanui-panel__heading-xLCsB",Uc="hanui-panel__icon--yPQT",qc="hanui-panel__headingText--XqxW",Yc="hanui-panel__title-6-6uC",Xc="hanui-panel__description-qXTSM",Gc="hanui-panel__actions-Ra-zy",Qc="hanui-panel__body-lo5aX",Jc="hanui-panel__footer-qLpR1",Wc="hanui-panel__footerInner-r6VQI",Zc="hanui-form-o9UqJ",Vc="hanui-row-vUGpa",Q={panel:zc,panel__header:Hc,panel__heading:Kc,panel__icon:Uc,panel__headingText:qc,panel__title:Yc,panel__description:Xc,panel__actions:Gc,panel__body:Qc,"panel__body--sm":"hanui-panel__body--sm-6XP6W","panel__body--lg":"hanui-panel__body--lg-RTK5B","panel__body--flush":"hanui-panel__body--flush-iK75R",panel__footer:Jc,panel__footerInner:Wc,form:Zc,"form--2":"hanui-form--2-HdwDc",row:Vc},el=({children:e,title:a,description:n,actions:r,icon:o,isFlush:c,gap:i="md",footer:u,as:h="section",className:d,bodyClassName:l,testId:_})=>t.jsxs(h,{className:f(Q.panel,d),"data-testid":_,children:[(a||r)&&t.jsxs("div",{className:Q.panel__header,children:[t.jsxs("div",{className:Q.panel__heading,children:[o&&t.jsx("span",{className:Q.panel__icon,children:o}),t.jsxs("div",{className:Q.panel__headingText,children:[a&&t.jsx("h2",{className:Q.panel__title,children:a}),n&&t.jsx("p",{className:Q.panel__description,children:n})]})]}),r&&t.jsx("div",{className:Q.panel__actions,children:r})]}),t.jsx("div",{className:f(Q.panel__body,Q[`panel__body--${i}`],c&&Q["panel__body--flush"],l),children:e}),u&&t.jsx("div",{className:Q.panel__footer,children:t.jsx("div",{className:Q.panel__footerInner,children:u})})]}),tl=A(s.memo(({children:e,columns:a=1,className:n})=>t.jsx("div",{className:f(Q.form,Q[`form--${a}`],n),children:e})),"PanelForm"),al=A(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(Q.row,a),children:e})),"PanelRow"),nl=s.memo(el),sl="hanui-price-Oc5Nr",rl="hanui-price__current-2Xup2",ol="hanui-price__currency-32NLN",il="hanui-price__list-MlQgT",cl="hanui-price__discount-5Yc6W",He={price:sl,price__current:rl,price__currency:ol,price__list:il,price__discount:cl,"price--sm":"hanui-price--sm-Hd8Oe","price--md":"hanui-price--md-JMxlK","price--lg":"hanui-price--lg-TFqIF","price--xl":"hanui-price--xl-EJBYq"},ll=({value:e,currency:a,listValue:n,discountPercent:r,formatDiscount:o=d=>`%${d}`,isFormatted:c,size:i="md",className:u,testId:h})=>{const{labels:d}=z(),l=M("Price.currency",a,d==null?void 0:d.currency),_=p=>{if(!c||!(d!=null&&d.locale)||!/\d/.test(p))return p;const b=Number(p.replace(/[^\d.,-]/g,"").replace(/\.(?=\d{3}\b)/g,"").replace(",","."));if(!Number.isFinite(b))return p;try{return new Intl.NumberFormat(d.locale).format(b)}catch{return p}};return t.jsxs("span",{className:f(He.price,He[`price--${i}`],u),"data-testid":h,children:[t.jsxs("span",{className:He.price__current,children:[_(e),t.jsx("span",{className:He.price__currency,children:l})]}),n&&t.jsxs("s",{className:He.price__list,children:[_(n),t.jsx("span",{className:He.price__currency,children:l})]}),r!==void 0&&r>0&&t.jsx("span",{className:He.price__discount,children:o(r)})]})},dl=s.memo(ll),ul="hanui-rating-94dke",_l="hanui-rating__stars-QkpVU",hl="hanui-rating__empty-Wf6-K",pl="hanui-rating__count-pIoEs",ml="hanui-rating__srOnly-E9h0d",tt={rating:ul,rating__stars:_l,rating__empty:hl,rating__count:pl,rating__srOnly:ml,"rating--sm":"hanui-rating--sm-AtY7U","rating--md":"hanui-rating--md-Q0nxN"},bl=({value:e,count:a,srLabel:n,size:r="sm",className:o,testId:c})=>{var h;const{labels:i}=z(),u=Math.round(e*2)/2;return t.jsxs("span",{className:f(tt.rating,tt[`rating--${r}`],o),"data-testid":c,children:[t.jsx("span",{className:tt.rating__stars,"aria-hidden":!0,children:Array.from({length:5},(d,l)=>{const _=l+1;return u>=_?t.jsx(I.StarFill,{},l):u>=_-.5?t.jsx(I.StarHalf,{},l):t.jsx(I.StarFill,{className:tt.rating__empty},l)})}),t.jsx("span",{className:tt.rating__srOnly,children:n??Tt("Rating.srLabel",(h=i==null?void 0:i.rating)==null?void 0:h.srLabel,e,a)}),H.isDefined(a)&&t.jsxs("span",{className:tt.rating__count,"aria-hidden":!0,children:["(",a,")"]})]})},gl=s.memo(bl),fl="hanui-header-a08Jh",xl="hanui-header__text-ArJkA",vl="hanui-header__overline-X5Epo",yl="hanui-header__title-nQQQJ",wl="hanui-header__description-08oCr",kl="hanui-header__action-xsxQF",Ke={header:fl,header__text:xl,header__overline:vl,header__title:yl,header__description:wl,header__action:kl,"header--sm":"hanui-header--sm-mIJWZ","header--lg":"hanui-header--lg-QBLIz"},jl=({title:e,description:a,overline:n,action:r,as:o="h2",size:c="md",className:i,testId:u})=>t.jsxs("header",{className:f(Ke.header,Ke[`header--${c}`],i),"data-testid":u,children:[t.jsxs("div",{className:Ke.header__text,children:[n&&t.jsx("span",{className:Ke.header__overline,children:n}),t.jsx(o,{className:Ke.header__title,children:e}),a&&t.jsx("p",{className:Ke.header__description,children:a})]}),r&&t.jsx("div",{className:Ke.header__action,children:r})]}),Nl=s.memo(jl),$l="hanui-scrollArea-Ly-yT",Kt={scrollArea:$l,"scrollArea--vertical":"hanui-scrollArea--vertical-2ujC7","scrollArea--horizontal":"hanui-scrollArea--horizontal-e9pu-","scrollArea--both":"hanui-scrollArea--both-lv-8W","scrollArea--fade":"hanui-scrollArea--fade-01Bbm"},El=({children:e,label:a,axis:n="vertical",maxHeight:r,hasFade:o,className:c,testId:i})=>{const u=s.useRef(null),[h,d]=s.useState(!1);return s.useEffect(()=>{const l=u.current;if(!l||typeof ResizeObserver>"u")return;const _=()=>{const b=l.scrollHeight>l.clientHeight,w=l.scrollWidth>l.clientWidth;d(n==="horizontal"?w:n==="vertical"?b:b||w)};_();const p=new ResizeObserver(_);p.observe(l);for(const b of l.children)p.observe(b);return()=>p.disconnect()},[n,e]),t.jsx("div",{ref:u,className:f(Kt.scrollArea,Kt[`scrollArea--${n}`],o&&Kt["scrollArea--fade"],c),style:r===void 0?void 0:{maxBlockSize:r},tabIndex:h?0:void 0,role:h?"region":void 0,"aria-label":h?a:void 0,"data-testid":i,children:e})},Cl=s.memo(A(El,"ScrollArea")),Il="hanui-skeleton-n92if",Dl="hanui-group-YMfwa",Tl="hanui-card-XQs-Q",Rl="hanui-card__media-YLJDv",Sl="hanui-card__body-msRvB",Ll="hanui-rows-EZ9Am",Al="hanui-row-se56N",Fl="hanui-row__text-TD4iS",Ml="hanui-table-L328g",Bl="hanui-table__row-rSJTK",re={skeleton:Il,"hanui-shimmer":"hanui-hanui-shimmer-6yd48","skeleton--block":"hanui-skeleton--block-tOZ-a","skeleton--text":"hanui-skeleton--text-k-ROi","skeleton--circle":"hanui-skeleton--circle-x-mX3",group:Dl,card:Tl,card__media:Rl,card__body:Sl,rows:Ll,row:Al,row__text:Fl,table:Ml,table__row:Bl},Se=({width:e,height:a,variant:n="block",lines:r=1,className:o})=>{const c={width:H.isNumber(e)?`${e}px`:e,height:H.isNumber(a)?`${a}px`:a};return n==="text"&&r>1?t.jsx("span",{className:f(re.group,o),"aria-hidden":!0,children:Array.from({length:r},(i,u)=>t.jsx("span",{className:f(re.skeleton,re["skeleton--text"]),style:u===r-1?{width:"60%"}:void 0},u))}):t.jsx("span",{className:f(re.skeleton,re[`skeleton--${n}`],o),style:c,"aria-hidden":!0})},Pl=s.memo(Se),Ol=({count:e=1,className:a})=>t.jsx(t.Fragment,{children:Array.from({length:e},(n,r)=>t.jsxs("div",{className:f(re.card,a),"aria-hidden":!0,children:[t.jsx(Se,{className:re.card__media}),t.jsxs("div",{className:re.card__body,children:[t.jsx(Se,{variant:"text",width:"70%"}),t.jsx(Se,{variant:"text",width:"40%"})]})]},r))}),zl=({count:e=3,className:a})=>t.jsx("div",{className:f(re.rows,a),"aria-hidden":!0,children:Array.from({length:e},(n,r)=>t.jsxs("div",{className:re.row,children:[t.jsx(Se,{variant:"circle",width:36,height:36}),t.jsxs("div",{className:re.row__text,children:[t.jsx(Se,{variant:"text",width:"45%"}),t.jsx(Se,{variant:"text",width:"25%"})]})]},r))}),Hl=({count:e=5,columns:a=4,className:n})=>t.jsx("div",{className:f(re.table,n),"aria-hidden":!0,children:Array.from({length:e},(r,o)=>t.jsx("div",{className:re.table__row,children:Array.from({length:a},(c,i)=>t.jsx(Se,{variant:"text"},i))},o))}),Kl=A(s.memo(Ol),"SkeletonCard"),Ul=A(s.memo(zl),"SkeletonRows"),ql=A(s.memo(Hl),"SkeletonTable"),Yl="hanui-stat-Xb7wp",Xl="hanui-stat__icon-MB8NU",Gl="hanui-stat__label-kUX2m",Ql="hanui-stat__value--6p13",Jl="hanui-stat__unit-mjHVk",Wl="hanui-stat__delta-YKpOu",Zl="hanui-stat__description-Yvw6J",Vl="hanui-stat__srOnly-YKebA",ie={stat:Yl,"stat--sm":"hanui-stat--sm-XnK8p","stat--plain":"hanui-stat--plain-N-3RC",stat__icon:Xl,stat__label:Gl,stat__value:Ql,stat__unit:Jl,stat__delta:Wl,"stat__delta--positive":"hanui-stat__delta--positive-1AUAM","stat__delta--negative":"hanui-stat__delta--negative--WWEP",stat__description:Zl,stat__srOnly:Vl},ed={up:t.jsx(I.ArrowUpShort,{"aria-hidden":!0}),down:t.jsx(I.ArrowDownShort,{"aria-hidden":!0}),flat:t.jsx(I.DashLg,{"aria-hidden":!0})},td={up:"artış",down:"azalış",flat:"değişim yok"},ad=({label:e,value:a,unit:n,delta:r,trend:o,isUpPositive:c=!0,description:i,icon:u,variant:h="card",size:d="md",className:l,testId:_})=>{const p=o==="flat"?void 0:o==="up"===c;return t.jsxs("div",{className:f(ie.stat,ie[`stat--${d}`],ie[`stat--${h}`],l),"data-testid":_,children:[u&&t.jsx("span",{className:ie.stat__icon,"aria-hidden":!0,children:u}),t.jsx("span",{className:ie.stat__label,children:e}),t.jsxs("span",{className:ie.stat__value,children:[a,n&&t.jsx("span",{className:ie.stat__unit,children:n})]}),r&&o&&t.jsxs("span",{className:f(ie.stat__delta,p===!0&&ie["stat__delta--positive"],p===!1&&ie["stat__delta--negative"]),children:[ed[o],r,t.jsx("span",{className:ie.stat__srOnly,children:td[o]})]}),i&&t.jsx("span",{className:ie.stat__description,children:i})]})},nd=s.memo(A(ad,"Stat")),sd="hanui-hub-JoqOf",rd="hanui-toast-U27Of",od="hanui-toast__icon-p-rgI",id="hanui-toast__text-rG4ji",cd="hanui-toast__message-s6S2-",ld="hanui-toast__description-0cYTx",dd="hanui-toast__action-fOXU5",ud="hanui-toast__close-QxSNP",$e={hub:sd,toast:rd,"hanui-fade-in-up":"hanui-hanui-fade-in-up-hhv43","toast--info":"hanui-toast--info-S1QJr","toast--success":"hanui-toast--success-NUso7","toast--warning":"hanui-toast--warning-7mi-S","toast--danger":"hanui-toast--danger-IhFSz",toast__icon:od,toast__text:id,toast__message:cd,toast__description:ld,toast__action:dd,toast__close:ud},_d={info:t.jsx(I.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(I.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(I.XCircleFill,{"aria-hidden":!0})},hd={info:4e3,success:4e3,warning:6e3,danger:8e3};let ba=0;const Yt=new Set;let Xe=[];const Zt=()=>Yt.forEach(e=>e(Xe)),Xt=e=>{Xe=Xe.filter(a=>a.id!==e),Zt()},mt=(e,a={})=>{ba+=1;const n=ba;return Xe=[...Xe,{...a,id:n,message:e}].slice(-3),Zt(),n},pd={show:mt,info:(e,a)=>mt(e,{...a,tone:"info"}),success:(e,a)=>mt(e,{...a,tone:"success"}),warning:(e,a)=>mt(e,{...a,tone:"warning"}),error:(e,a)=>mt(e,{...a,tone:"danger"}),dismiss:Xt,clear:()=>{Xe=[],Zt()}},md=({toast:e,closeLabel:a,onDismiss:n})=>{const r=e.tone??"info",o=e.duration??hd[r],[c,i]=s.useState(!1),u=s.useRef(o),h=s.useRef(0);return s.useEffect(()=>{if(o===0||c)return;h.current=Date.now();const d=window.setTimeout(()=>n(e.id),u.current);return()=>{window.clearTimeout(d),u.current=Math.max(0,u.current-(Date.now()-h.current))}},[o,c,n,e.id]),t.jsxs("div",{className:f($e.toast,$e[`toast--${r}`]),role:r==="danger"?"alert":"status",onPointerEnter:()=>i(!0),onPointerLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t.jsx("span",{className:$e.toast__icon,"aria-hidden":!0,children:_d[r]}),t.jsxs("div",{className:$e.toast__text,children:[t.jsx("span",{className:$e.toast__message,children:e.message}),e.description&&t.jsx("span",{className:$e.toast__description,children:e.description})]}),e.action&&t.jsx("button",{type:"button",className:$e.toast__action,onClick:()=>{var d;(d=e.action)==null||d.onClick(),n(e.id)},children:e.action.label}),t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:a,variant:"ghost",size:"sm",className:$e.toast__close,onClick:()=>n(e.id)})]})},bd=({closeLabel:e,className:a})=>{const{labels:n}=z(),[r,o]=s.useState([]);s.useEffect(()=>(Yt.add(o),o(Xe),()=>{Yt.delete(o)}),[]);const c=s.useCallback(h=>Xt(h),[]);s.useEffect(()=>{if(r.length===0)return;const h=d=>{d.key==="Escape"&&Xt(r[r.length-1].id)};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]);const[i,u]=s.useState(!1);return s.useEffect(()=>u(!0),[]),i?yt.createPortal(t.jsx("div",{className:f($e.hub,a),children:r.map(h=>t.jsx(md,{toast:h,closeLabel:M("ToastHub.closeLabel",e,n==null?void 0:n.close),onDismiss:c},h.id))}),document.body):null},gd=s.memo(A(bd,"ToastHub")),fd="hanui-accordion-h9jLC",xd="hanui-accordion__item--YvzK",vd="hanui-accordion__title-qZOLY",yd="hanui-accordion__meta-PSlsO",wd="hanui-accordion__marker-QcWcI",kd="hanui-accordion__summary-QUhWh",jd="hanui-accordion__panel--3EXE",Nd="hanui-accordion__content-fO64s",we={accordion:fd,accordion__item:xd,"accordion__item--disabled":"hanui-accordion__item--disabled-x1erZ",accordion__title:vd,accordion__meta:yd,accordion__marker:wd,accordion__summary:kd,accordion__panel:jd,accordion__content:Nd},$d=({items:e,isSingle:a,defaultOpenIds:n,openIds:r,onChange:o,className:c,testId:i})=>{const u=s.useId(),[h,d]=s.useState(n??[]),l=r!==void 0,_=l?r:h,p=s.useCallback((b,w)=>{const g=w?a?[b]:[..._.filter(m=>m!==b),b]:_.filter(m=>m!==b);l||d(g),o==null||o(g)},[l,a,o,_]);return t.jsx("div",{className:f(we.accordion,c),"data-testid":i,children:e.map(b=>{const w=_.includes(b.id);return t.jsxs("details",{className:f(we.accordion__item,b.isDisabled&&we["accordion__item--disabled"]),open:w,onToggle:g=>{const m=g.currentTarget.open;m!==w&&p(b.id,m)},children:[t.jsxs("summary",{id:`${u}-${b.id}`,className:we.accordion__summary,"aria-disabled":b.isDisabled,tabIndex:b.isDisabled?-1:void 0,onClick:g=>b.isDisabled&&g.preventDefault(),children:[t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:we.accordion__marker}),t.jsx("span",{className:we.accordion__title,children:b.title}),b.meta&&t.jsx("span",{className:we.accordion__meta,children:b.meta})]}),t.jsx("div",{className:we.accordion__panel,children:t.jsx("div",{className:we.accordion__content,children:b.content})})]},b.id)})})},Ed=s.memo(A($d,"Accordion")),Cd="hanui-steps-ntge1",Id="hanui-steps__item-GrU1x",Dd="hanui-steps__button-XBsnS",Td="hanui-steps__marker-g-GLE",Rd="hanui-steps__text-Mkpkh",Sd="hanui-steps__label-NSeFM",Ld="hanui-steps__description-bQuNT",Ad="hanui-steps__status-wWJfP",ue={steps:Cd,"steps--horizontal":"hanui-steps--horizontal-O-mkx","steps--vertical":"hanui-steps--vertical-agfwo",steps__item:Id,steps__button:Dd,steps__marker:Td,"steps__item--done":"hanui-steps__item--done-mvOuN","steps__item--current":"hanui-steps__item--current-Qzlal",steps__text:Rd,steps__label:Sd,steps__description:Ld,steps__status:Ad},Fd=(e,a)=>e<a?"done":e===a?"current":"upcoming",Md={done:"tamamlandı",current:"şu anki adım",upcoming:"sıradaki"},Bd=({steps:e,currentIndex:a,onStepClick:n,label:r,orientation:o="horizontal",className:c,testId:i})=>t.jsx("ol",{className:f(ue.steps,ue[`steps--${o}`],c),"aria-label":r,"data-testid":i,children:e.map((u,h)=>{const d=Fd(h,a),l=!!n&&d==="done",_=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:ue.steps__marker,"aria-hidden":!0,children:d==="done"?t.jsx(I.CheckLg,{}):h+1}),t.jsxs("span",{className:ue.steps__text,children:[t.jsx("span",{className:ue.steps__label,children:u.label}),u.description&&t.jsx("span",{className:ue.steps__description,children:u.description})]}),t.jsx("span",{className:ue.steps__status,children:Md[d]})]});return t.jsx("li",{className:f(ue.steps__item,ue[`steps__item--${d}`]),"aria-current":d==="current"?"step":void 0,children:l?t.jsx("button",{type:"button",className:ue.steps__button,onClick:()=>n==null?void 0:n(h),children:_}):t.jsx("span",{className:ue.steps__button,children:_})},u.id)})}),Pd=s.memo(A(Bd,"Steps")),Od="hanui-tabs-l4dFE",zd="hanui-tabs__list-HJvR8",Hd="hanui-tabs__tab-7gDW7",Kd="hanui-tabs__count-8JX8s",Ud="hanui-tabs__panel-CPklY",at={tabs:Od,tabs__list:zd,tabs__tab:Hd,"tabs__tab--active":"hanui-tabs__tab--active-riqNp",tabs__count:Kd,tabs__panel:Ud},qd=({items:e,defaultTabId:a,activeId:n,onChange:r,ariaLabel:o,isManualActivation:c,className:i,testId:u})=>{var N;const h=s.useId(),[d,l]=s.useState(a??((N=e[0])==null?void 0:N.id)),_=H.isDefined(n),p=_?n:d,b=e.findIndex(k=>k.id===p),[w,g]=s.useState(b<0?0:b),m=s.useRef(null),v=e[b]??e[0];s.useEffect(()=>{var k;Gt((k=m.current)==null?void 0:k.querySelector('[aria-selected="true"]'),{block:"nearest",inline:"nearest"})},[p]);const $=k=>{_||l(k),r==null||r(k)},j=k=>{var D;if(c&&(k.key==="Enter"||k.key===" ")){k.preventDefault(),$(e[w].id);return}const T=k.key==="ArrowRight"?1:k.key==="ArrowLeft"?-1:0;if(T===0)return;k.preventDefault();const C=((c?w:b)+T+e.length)%e.length;g(C),c||$(e[C].id),(D=document.getElementById(`${h}-tab-${e[C].id}`))==null||D.focus()};if(e.length===0)return null;const x=H.isDefined(v==null?void 0:v.content);return t.jsxs("div",{className:f(at.tabs,i),"data-testid":u,children:[t.jsx("div",{ref:m,className:at.tabs__list,role:"tablist","aria-label":o,onKeyDown:j,children:e.map(k=>{var C;const T=k.id===v.id;return t.jsxs("button",{id:`${h}-tab-${k.id}`,type:"button",role:"tab","aria-selected":T,"aria-controls":x?`${h}-panel-${k.id}`:void 0,tabIndex:(c?((C=e[w])==null?void 0:C.id)===k.id:T)?0:-1,className:f(at.tabs__tab,T&&at["tabs__tab--active"]),onClick:()=>$(k.id),children:[k.label,H.isDefined(k.count)&&t.jsx("span",{className:at.tabs__count,children:k.count})]},k.id)})}),x&&t.jsx("div",{id:`${h}-panel-${v.id}`,role:"tabpanel","aria-labelledby":`${h}-tab-${v.id}`,className:at.tabs__panel,tabIndex:0,children:v.content})]})},Yd=s.memo(qd),Xd="hanui-tile-TGur-",Gd="hanui-tile__medallion--Y0pz",Qd="hanui-tile__label-mI1OQ",Jd="hanui-tile__meta-22qnR",bt={tile:Xd,tile__medallion:Gd,tile__label:Qd,tile__meta:Jd,"tile--active":"hanui-tile--active-z0F2M"},Wd=({label:e,icon:a,href:n,meta:r,isActive:o,linkProps:c,className:i,testId:u})=>t.jsxs(fe,{href:n,className:f(bt.tile,o&&bt["tile--active"],i),"aria-current":o?"page":void 0,"data-testid":u,...c,children:[t.jsx("span",{className:bt.tile__medallion,"aria-hidden":!0,children:a}),t.jsx("span",{className:bt.tile__label,children:e}),r&&t.jsx("span",{className:bt.tile__meta,children:r})]}),Zd=s.memo(Wd),Vd="hanui-timeline-GxubZ",eu="hanui-timeline__item-qMpF2",tu="hanui-timeline__marker-MDk07",au="hanui-timeline__body-xJi7t",nu="hanui-timeline__title-pKxZJ",su="hanui-timeline__time-ITWYy",ru="hanui-timeline__description-4vrEy",ou="hanui-timeline__srOnly-7K2We",ke={timeline:Vd,timeline__item:eu,timeline__marker:tu,"timeline__item--done":"hanui-timeline__item--done-dqiOQ","timeline__item--current":"hanui-timeline__item--current-TGV5f","timeline__item--pending":"hanui-timeline__item--pending-VMZTS","timeline__item--failed":"hanui-timeline__item--failed-2BbfX",timeline__body:au,timeline__title:nu,timeline__time:su,timeline__description:ru,timeline__srOnly:ou},iu={done:t.jsx(I.CheckLg,{}),failed:t.jsx(I.XLg,{}),current:null,pending:null},cu={done:"tamamlandı",current:"şu an",pending:"bekliyor",failed:"başarısız"},lu=({events:e,label:a,className:n,testId:r})=>t.jsx("ol",{className:f(ke.timeline,n),"aria-label":a,"data-testid":r,children:e.map(o=>{const c=o.status??"done";return t.jsxs("li",{className:f(ke.timeline__item,ke[`timeline__item--${c}`]),"aria-current":c==="current"?"step":void 0,children:[t.jsx("span",{className:ke.timeline__marker,"aria-hidden":!0,children:o.icon??iu[c]}),t.jsxs("div",{className:ke.timeline__body,children:[t.jsxs("span",{className:ke.timeline__title,children:[o.title,t.jsx("span",{className:ke.timeline__srOnly,children:cu[c]})]}),o.time&&t.jsx("span",{className:ke.timeline__time,children:o.time}),o.description&&t.jsx("span",{className:ke.timeline__description,children:o.description})]})]},o.id)})}),du=s.memo(A(lu,"Timeline")),uu="hanui-modal-3IDi9",_u="hanui-modal__panel--qLSz",hu="hanui-modal__header-meWm6",pu="hanui-modal__icon-df2dd",mu="hanui-modal__heading-PwDS8",bu="hanui-modal__title-80Sh6",gu="hanui-modal__description-fsCHI",fu="hanui-modal__close-vFPbw",xu="hanui-modal__body-PDF12",vu="hanui-modal__footer-CCCkx",ne={modal:uu,"modal--sm":"hanui-modal--sm-A7WsS","modal--lg":"hanui-modal--lg-z99Em",modal__panel:_u,modal__header:hu,modal__icon:pu,"modal__icon--neutral":"hanui-modal__icon--neutral-QSL7c","modal__icon--danger":"hanui-modal__icon--danger-6V90a","modal__icon--warning":"hanui-modal__icon--warning-a--FX","modal__icon--success":"hanui-modal__icon--success-YWxZs","modal__icon--info":"hanui-modal__icon--info-WRLah",modal__heading:mu,modal__title:bu,modal__description:gu,modal__close:fu,modal__body:xu,modal__footer:vu},yu=({isOpen:e,onClose:a,title:n,closeLabel:r,children:o,description:c,footer:i,icon:u,tone:h="neutral",size:d="md",isDismissable:l=!0,className:_,testId:p})=>{const{labels:b}=z(),w=s.useRef(null),g=s.useRef(null),m=s.useId(),v=s.useId();s.useEffect(()=>{const j=w.current;if(!j)return;if(!e){j.open&&j.close();return}const x=ot();j.open||j.showModal(),At(j,`.${ne.modal__close}`),Lt(j);const{token:N,pop:k}=Ft();return g.current=N,()=>{k(),g.current=null,x()}},[e]),kt(e),s.useEffect(()=>{const j=w.current;if(!j)return;const x=N=>{N.preventDefault(),l&&(g.current&&!Mt(g.current)||a())};return j.addEventListener("cancel",x),()=>j.removeEventListener("cancel",x)},[a,l]);const $=s.useCallback(j=>{l&&j.target===w.current&&a()},[l,a]);return t.jsx("dialog",{ref:w,className:f(ne.modal,ne[`modal--${d}`],_),"aria-labelledby":m,"aria-describedby":c?v:void 0,"data-testid":p,onClick:$,children:t.jsxs("div",{className:ne.modal__panel,children:[t.jsxs("header",{className:ne.modal__header,children:[u&&t.jsx("span",{className:f(ne.modal__icon,ne[`modal__icon--${h}`]),children:u}),t.jsxs("div",{className:ne.modal__heading,children:[t.jsx("h2",{id:m,className:ne.modal__title,children:n}),c&&t.jsx("p",{id:v,className:ne.modal__description,children:c})]}),l&&t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:M("Modal.closeLabel",r,b==null?void 0:b.close),variant:"ghost",size:"sm",className:ne.modal__close,onClick:a})]}),o&&t.jsx("div",{className:ne.modal__body,children:o}),i&&t.jsx("footer",{className:ne.modal__footer,children:i})]})})},Vt=s.memo(yu),wu="hanui-palette-ag-P9",ku="hanui-palette__search-G3aYv",ju="hanui-palette__searchIcon-2UYj-",Nu="hanui-palette__input-vvLvt",$u="hanui-palette__list--KWiH",Eu="hanui-palette__group-KPj5Q",Cu="hanui-palette__item-UZzkp",Iu="hanui-palette__icon-Fg0Lt",Du="hanui-palette__text-flfN9",Tu="hanui-palette__label-8-UHe",Ru="hanui-palette__description-eRlk9",Su="hanui-palette__shortcut-DwYKX",Lu="hanui-palette__empty-vg-I3",W={palette:wu,palette__search:ku,palette__searchIcon:ju,palette__input:Nu,palette__list:$u,palette__group:Eu,palette__item:Cu,"palette__item--active":"hanui-palette__item--active-XHcka",palette__icon:Iu,palette__text:Du,palette__label:Tu,palette__description:Ru,palette__shortcut:Su,palette__empty:Lu},Au=({isOpen:e,onClose:a,items:n,label:r,searchPlaceholder:o,emptyMessage:c,className:i,testId:u})=>{const h=s.useId(),d=`${h}-listbox`,l=s.useRef(null),_=s.useRef(null),p=s.useRef(null),[b,w]=s.useState(""),[g,m]=s.useState(0),v=s.useMemo(()=>{if(b.trim()==="")return n;const x=b.trim();return n.filter(N=>vt(N.label,x)||(N.description?vt(N.description,x):!1))},[n,b]);kt(e),s.useEffect(()=>{var C;const x=l.current;if(!x)return;if(!e){x.open&&x.close();return}const N=ot();x.open||x.showModal(),(C=_.current)==null||C.focus({preventScroll:!0}),w(""),m(0);const{token:k,pop:T}=Ft();return p.current=k,()=>{T(),p.current=null,N()}},[e]),s.useEffect(()=>{const x=l.current;if(!x)return;const N=k=>{k.preventDefault(),!(p.current&&!Mt(p.current))&&a()};return x.addEventListener("cancel",N),()=>x.removeEventListener("cancel",N)},[a]),s.useEffect(()=>{var x;Gt((x=l.current)==null?void 0:x.querySelector(`[data-index="${g}"]`),{block:"nearest"})},[g]);const $=x=>{x.onSelect(),a()},j=x=>{const N=v.length-1;switch(x.key){case"ArrowDown":x.preventDefault(),m(k=>k>=N?0:k+1);break;case"ArrowUp":x.preventDefault(),m(k=>k<=0?N:k-1);break;case"Home":x.preventDefault(),m(0);break;case"End":x.preventDefault(),m(N);break;case"Enter":{x.preventDefault();const k=v[g];k&&$(k);break}}};return t.jsxs("dialog",{ref:l,className:f(W.palette,i),"aria-label":r,"data-testid":u,onClick:x=>x.target===l.current&&a(),children:[t.jsxs("div",{className:W.palette__search,children:[t.jsx(I.Search,{"aria-hidden":!0,className:W.palette__searchIcon}),t.jsx("input",{ref:_,type:"text",role:"combobox",className:W.palette__input,value:b,placeholder:o,"aria-label":o,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":d,"aria-activedescendant":v[g]?`${h}-option-${g}`:void 0,onChange:x=>{w(x.target.value),m(0)},onKeyDown:j})]}),t.jsxs("ul",{id:d,role:"listbox","aria-label":r,className:W.palette__list,children:[v.map((x,N)=>{var T;const k=x.group!==void 0&&x.group!==((T=v[N-1])==null?void 0:T.group);return t.jsxs("li",{children:[k&&t.jsx("span",{className:W.palette__group,"aria-hidden":!0,children:x.group}),t.jsxs("div",{id:`${h}-option-${N}`,role:"option","data-index":N,"aria-selected":N===g,className:f(W.palette__item,N===g&&W["palette__item--active"]),onMouseEnter:()=>m(N),onClick:()=>$(x),children:[x.icon&&t.jsx("span",{className:W.palette__icon,"aria-hidden":!0,children:x.icon}),t.jsxs("span",{className:W.palette__text,children:[t.jsx("span",{className:W.palette__label,children:x.label}),x.description&&t.jsx("span",{className:W.palette__description,children:x.description})]}),x.shortcut&&t.jsx("kbd",{className:W.palette__shortcut,"aria-hidden":!0,children:x.shortcut})]})]},x.id)}),v.length===0&&t.jsx("li",{className:W.palette__empty,children:c})]})]})},Fu=s.memo(A(Au,"CommandPalette")),Mu={destructive:t.jsx(I.TrashFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),neutral:t.jsx(I.QuestionCircleFill,{"aria-hidden":!0})},Bu={destructive:"danger",warning:"warning",neutral:"info"},Pu={destructive:be.DANGER,warning:be.PRIMARY,neutral:be.PRIMARY},Ou=({isOpen:e,onClose:a,onConfirm:n,title:r,description:o,confirmLabel:c,cancelLabel:i,closeLabel:u,variant:h,kind:d,children:l})=>{const{labels:_}=z(),[p,b]=s.useState(!1),w=h??d??"neutral",g=async()=>{b(!0);try{await n()}finally{b(!1)}};return t.jsx(Vt,{isOpen:e,onClose:a,title:r,closeLabel:u??(_==null?void 0:_.close),description:o,icon:Mu[w],tone:Bu[w],size:"sm",isDismissable:!p,footer:t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:be.SECONDARY,size:Le.MEDIUM,onClick:a,disabled:p,children:M("ConfirmDialog.cancelLabel",i,_==null?void 0:_.cancel)}),t.jsx(rt,{variant:Pu[w],size:Le.MEDIUM,onClick:g,isLoading:p,children:c})]}),children:l})},zu=s.memo(Ou),Hu="hanui-drawer-fgfi1",Ku="hanui-drawer__header-BDcRe",Uu="hanui-drawer__title-9M0e8",qu="hanui-drawer__close-Z30oW",Yu="hanui-drawer__toolbar-vcsYi",Xu="hanui-drawer__body-x12SX",Gu="hanui-drawer__footer-PajTg",pe={drawer:Hu,"drawer--sm":"hanui-drawer--sm-ywgof","drawer--md":"hanui-drawer--md-mN8Kg","drawer--lg":"hanui-drawer--lg-5H-oE","drawer--end":"hanui-drawer--end-q-sIP","drawer--start":"hanui-drawer--start-xqVlX",drawer__header:Ku,drawer__title:Uu,drawer__close:qu,drawer__toolbar:Yu,drawer__body:Xu,drawer__footer:Gu},Qu=({isOpen:e,onClose:a,title:n,closeLabel:r,children:o,side:c="end",size:i="md",footer:u,toolbar:h,className:d,testId:l})=>{const{labels:_}=z(),p=s.useRef(null),b=s.useRef(null),w=s.useId();s.useEffect(()=>{const m=p.current;if(!m)return;if(!e){m.open&&m.close();return}const v=ot();m.open||m.showModal(),At(m,`.${pe.drawer__close}`),Lt(m);const{token:$,pop:j}=Ft();return b.current=$,()=>{j(),b.current=null,v()}},[e]),kt(e),s.useEffect(()=>{const m=p.current;if(!m)return;const v=$=>{$.preventDefault(),!(b.current&&!Mt(b.current))&&a()};return m.addEventListener("cancel",v),()=>m.removeEventListener("cancel",v)},[a]);const g=s.useCallback(m=>{m.target===p.current&&a()},[a]);return t.jsxs("dialog",{ref:p,className:f(pe.drawer,pe[`drawer--${c}`],pe[`drawer--${i}`],d),"aria-labelledby":w,"data-testid":l,onClick:g,children:[t.jsxs("header",{className:pe.drawer__header,children:[t.jsx("h2",{id:w,className:pe.drawer__title,children:n}),t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:M("Drawer.closeLabel",r,_==null?void 0:_.close),variant:"ghost",size:"sm",className:pe.drawer__close,onClick:a})]}),h&&t.jsx("div",{className:pe.drawer__toolbar,children:h}),t.jsx("div",{className:pe.drawer__body,children:o}),u&&t.jsx("div",{className:pe.drawer__footer,children:u})]})},Ju=s.memo(A(Qu,"Drawer")),Wu="hanui-form-zpZn4",Zu={form:Wu},Vu=({isOpen:e,onClose:a,onSubmit:n,title:r,label:o,submitLabel:c,cancelLabel:i,closeLabel:u,description:h,hint:d,placeholder:l,defaultValue:_="",isRequired:p,requiredLabel:b,inputMode:w="text",maxLength:g,rows:m=4})=>{const{labels:v}=z(),$=s.useId(),[j,x]=s.useState(_),[N,k]=s.useState(!1),T=s.useRef(!1);s.useEffect(()=>{e&&!T.current&&x(_),T.current=e},[e,_]);const C=j.trim(),D=!!p&&C==="",y=P=>w==="multiline"?t.jsx(La,{...P,value:j,onChange:X=>x(X.target.value),placeholder:l,maxLength:g,rows:m}):t.jsx(Sa,{...P,type:w==="number"?"number":"text",value:j,onChange:X=>x(X.target.value),placeholder:l,maxLength:g}),S=async()=>{if(!(D||N)){k(!0);try{await n(C),a()}catch{}finally{k(!1)}}};return t.jsx(Vt,{isOpen:e,onClose:a,title:r,closeLabel:u??(v==null?void 0:v.close),description:h,size:"sm",isDismissable:!N,footer:t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:be.SECONDARY,size:Le.MEDIUM,onClick:a,disabled:N,children:M("PromptDialog.cancelLabel",i,v==null?void 0:v.cancel)}),t.jsx(rt,{type:"submit",form:$,variant:be.PRIMARY,size:Le.MEDIUM,disabled:D,isLoading:N,children:M("PromptDialog.submitLabel",c,v==null?void 0:v.submit)})]}),children:t.jsx("form",{id:$,className:Zu.form,onSubmit:P=>{P.preventDefault(),S()},children:t.jsx(Aa,{label:o,hint:d,isRequired:p,requiredLabel:b,children:y})})})},e_=s.memo(Vu),t_="hanui-scroller-EtDmS",a_="hanui-table-uCv4q",nt={scroller:t_,"scroller--frame":"hanui-scroller--frame-84zz6",table:a_,"table--compact":"hanui-table--compact-4KCVl","table--regular":"hanui-table--regular-hsA3-","table--spacious":"hanui-table--spacious-BBUX-","table--sticky-head":"hanui-table--sticky-head-FO2L4","table--row-hover":"hanui-table--row-hover--MAoe"},n_=A(s.memo(({hasFrame:e=!0,className:a,children:n,...r})=>t.jsx("div",{className:f(nt.scroller,e&&nt["scroller--frame"],a),...r,children:n})),"TableScroller"),s_=({density:e="regular",hasStickyHead:a,hasRowHover:n,className:r,children:o,...c})=>t.jsx("table",{className:f(nt.table,nt[`table--${e}`],a&&nt["table--sticky-head"],n&&nt["table--row-hover"],r),...c,children:o}),r_=s.memo(s_),o_="hanui-wrapper-KXCZg",i_="hanui-table-LF5Ow",c_="hanui-state-YPPb0",l_="hanui-state__message-wwbIW",d_="hanui-srOnly-Oia8c",u_="hanui-sort-3Q6Fx",__="hanui-sort__arrow-MITWb",h_="hanui-sticky-KDEvQ",p_="hanui-bulkBar-62qk0",Z={wrapper:o_,"wrapper--capped":"hanui-wrapper--capped-M2QUJ",table:i_,state:c_,"state--error":"hanui-state--error-A492d",state__message:l_,"row--warning":"hanui-row--warning-BAUN2",srOnly:d_,sort:u_,sort__arrow:__,"sort__arrow--ascending":"hanui-sort__arrow--ascending-85T5d","sort__arrow--descending":"hanui-sort__arrow--descending-gs3VU",sticky:h_,bulkBar:p_},m_=({columns:e,children:a,isLoading:n,error:r,emptyMessage:o,loadingMessage:c,hasViewportCap:i,onSort:u,bulkBar:h,className:d,testId:l})=>{var w,g;const{labels:_}=z(),p=s.Children.count(a),b=(m,v)=>t.jsx("tr",{children:t.jsx("td",{colSpan:e.length,className:f(Z.state,v&&Z[`state--${v}`]),children:m})});return t.jsxs("div",{className:f(Z.wrapper,i&&Z["wrapper--capped"],d),"data-testid":l,children:[h&&t.jsx("div",{className:Z.bulkBar,children:h}),t.jsxs("table",{className:Z.table,children:[t.jsx("thead",{children:t.jsx("tr",{children:e.map(m=>{const v=!!(m.isSortable&&u),$=m.ariaSort==="ascending"?"descending":"ascending";return t.jsx("th",{scope:"col","aria-sort":m.ariaSort,className:f(m.className,m.isSticky&&Z.sticky),children:v?t.jsxs("button",{type:"button",className:Z.sort,onClick:()=>u==null?void 0:u(m.key,$),children:[m.label,m.srLabel&&t.jsx("span",{className:Z.srOnly,children:m.srLabel}),t.jsx("span",{"aria-hidden":!0,className:f(Z.sort__arrow,m.ariaSort&&Z[`sort__arrow--${m.ariaSort}`]),children:m.ariaSort==="descending"?"▾":"▴"})]}):t.jsxs(t.Fragment,{children:[m.label,m.srLabel&&t.jsx("span",{className:Z.srOnly,children:m.srLabel})]})},m.key)})})}),t.jsx("tbody",{children:r?b(t.jsxs("span",{role:"alert",className:Z.state__message,children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),r]}),"error"):n?b(M("DataTable.loadingMessage",c,(w=_==null?void 0:_.dataTable)==null?void 0:w.loading)):p===0?b(M("DataTable.emptyMessage",o,(g=_==null?void 0:_.dataTable)==null?void 0:g.empty)):a})]})]})},b_=A(s.memo(({isWarning:e,className:a,children:n,...r})=>t.jsx("tr",{className:f(e&&Z["row--warning"],a),...r,children:n})),"DataTableRow"),g_=s.memo(m_),f_="hanui-bar-b4PP4",x_="hanui-bar__hiddenSubmit-jeCyX",v_="hanui-bar__actions-rG69L",y_="hanui-field-f-rvu",xt={bar:f_,bar__hiddenSubmit:x_,bar__actions:v_,field:y_,"field--wide":"hanui-field--wide-FA5gf"},w_=({onSubmit:e,children:a,actions:n,label:r,className:o,testId:c})=>{const{labels:i}=z();return t.jsxs("form",{className:f(xt.bar,o),"aria-label":M("FilterBar.label",r,i==null?void 0:i.filters),"data-testid":c,onSubmit:u=>{u.preventDefault(),e()},children:[a,t.jsx("button",{type:"submit",className:xt.bar__hiddenSubmit,tabIndex:-1,"aria-hidden":!0}),n&&t.jsx("div",{className:xt.bar__actions,children:n})]})},k_=A(s.memo(({children:e,isWide:a,className:n})=>t.jsx("div",{className:f(xt.field,a&&xt["field--wide"],n),children:e})),"FilterBarField"),j_=s.memo(w_),N_="hanui-pagination-K-L20",$_="hanui-pagination__list--9HqC",E_="hanui-pagination__arrow-XIgoX",C_="hanui-pagination__page-TpoJM",I_="hanui-pagination__gap-qoDyI",je={pagination:N_,pagination__list:$_,pagination__arrow:E_,pagination__page:C_,"pagination__page--active":"hanui-pagination__page--active-XHeaz",pagination__gap:I_},D_=(e,a)=>{if(a<=7)return Array.from({length:a},(c,i)=>i+1);const n=new Set([1,a,e]);e-1>1&&n.add(e-1),e+1<a&&n.add(e+1);const r=[...n].sort((c,i)=>c-i),o=[];return r.forEach((c,i)=>{i>0&&c-r[i-1]>1&&o.push("gap"),o.push(c)}),o},T_=({page:e,totalPages:a,label:n,previousLabel:r,nextLabel:o,buildHref:c,onPageChange:i,linkProps:u,formatAnnouncement:h,className:d,testId:l})=>{var m,v,$;const{labels:_}=z(),p=Rt(),b=s.useRef(e);s.useEffect(()=>{b.current!==e&&(b.current=e,h&&p(h(e,a)))},[e,a,h,p]);const w=s.useMemo(()=>D_(e,a),[e,a]);if(a<=1)return null;const g=j=>{i&&i(j)};return t.jsxs("nav",{className:f(je.pagination,d),"aria-label":M("Pagination.label",n,(m=_==null?void 0:_.pagination)==null?void 0:m.label),"data-testid":l,children:[t.jsx(ge,{className:je.pagination__arrow,icon:t.jsx(I.CaretLeftFill,{"aria-hidden":!0}),label:M("Pagination.previousLabel",r,(v=_==null?void 0:_.pagination)==null?void 0:v.previous),variant:"outline",disabled:e<=1,onClick:()=>g(e-1)}),t.jsx("ul",{className:je.pagination__list,children:w.map((j,x)=>j==="gap"?t.jsx("li",{className:je.pagination__gap,"aria-hidden":!0,children:"…"},`gap-${x}`):t.jsx("li",{children:c?t.jsx(fe,{href:c(j),className:f(je.pagination__page,j===e&&je["pagination__page--active"]),"aria-current":j===e?"page":void 0,...u,children:j}):t.jsx(rt,{variant:be.SECONDARY,size:Le.SMALL,className:f(je.pagination__page,j===e&&je["pagination__page--active"]),"aria-current":j===e?"page":void 0,onClick:()=>g(j),children:j})},j))}),t.jsx(ge,{className:je.pagination__arrow,icon:t.jsx(I.CaretRightFill,{"aria-hidden":!0}),label:M("Pagination.nextLabel",o,($=_==null?void 0:_.pagination)==null?void 0:$.next),variant:"outline",disabled:e>=a,onClick:()=>g(e+1)})]})},R_=s.memo(T_);exports.ABOVE_MOBILE_MEDIA_QUERY=St;exports.ABOVE_TABLET_MEDIA_QUERY=dn;exports.Accordion=Ed;exports.Alert=ii;exports.Avatar=pi;exports.Badge=fi;exports.BottomSheet=Wt;exports.Breadcrumb=Ni;exports.Button=rt;exports.COMPACT_DENSITY=Ga;exports.Card=Bi;exports.CardBody=Fi;exports.CardFooter=Mi;exports.CardMedia=Li;exports.CardOverlay=Ai;exports.Carousel=Yi;exports.Checkbox=Qs;exports.Chip=Ra;exports.ChipGroup=Wn;exports.Combobox=js;exports.CommandPalette=Fu;exports.ConfirmDialog=zu;exports.CopyField=Vi;exports.DARK_THEME=xa;exports.DEFAULT_FONTS=Qa;exports.DataTable=g_;exports.DataTableRow=b_;exports.DateField=po;exports.DateRange=bo;exports.Directory=yc;exports.DirectoryGroup=fc;exports.DirectoryJump=vc;exports.DirectoryRow=xc;exports.Divider=nc;exports.Drawer=Ju;exports.EmptyState=Cc;exports.Field=Aa;exports.FileUpload=Zo;exports.FilterBar=j_;exports.FilterBarField=k_;exports.HanuiProvider=Wa;exports.IconButton=ge;exports.Input=Sa;exports.LIGHT_THEME=fa;exports.METRIC_TOKENS=Xa;exports.MOBILE_BREAKPOINT=Ia;exports.Menu=On;exports.Modal=Vt;exports.PageHeader=Oc;exports.Pagination=R_;exports.Panel=nl;exports.PanelForm=tl;exports.PanelRow=al;exports.Popover=Kn;exports.Price=dl;exports.Progress=Ma;exports.ProgressCircle=Fo;exports.PromptDialog=e_;exports.QuantityStepper=zr;exports.Radio=ur;exports.RadioCard=gr;exports.RangeSlider=$r;exports.Rating=gl;exports.RatingInput=Fr;exports.ScrollArea=Cl;exports.SectionHeader=Nl;exports.SegmentedControl=Ds;exports.Select=Hs;exports.Skeleton=Pl;exports.SkeletonCard=Kl;exports.SkeletonRows=Ul;exports.SkeletonTable=ql;exports.Spinner=Jt;exports.Stat=nd;exports.Steps=Pd;exports.Switch=nr;exports.TABLET_BREAKPOINT=Da;exports.TABLET_PORTRAIT_BREAKPOINT=ln;exports.Table=r_;exports.TableCheckbox=qr;exports.TableScroller=n_;exports.Tabs=Yd;exports.TagInput=ao;exports.TextLink=En;exports.Textarea=La;exports.Tile=Zd;exports.Timeline=du;exports.ToastHub=gd;exports.Tooltip=Ln;exports.UISize=Le;exports.UIVariant=be;exports.buildThemeCss=ya;exports.initHanui=Za;exports.isKeyboardOpeningElement=Ta;exports.matchesSearch=vt;exports.normalizeSearchTerm=Ut;exports.preventAutoKeyboard=Lt;exports.resolveTokens=Ja;exports.toast=pd;exports.useAnnounce=Rt;exports.useHanui=z;exports.useHanuiTheme=nn;exports.useListboxNavigation=Qt;exports.usePositioning=wt;exports.useScrollLock=kt;exports.useSheetViewport=Ca;exports.useVirtualList=ja;
|
|
21
|
+
`)},wa=e=>{if(!z.isClient())return;const a=e?ya(e):"",n=document.getElementById(ra);if(a===""){n==null||n.remove();return}const r=n??document.createElement("style");r.id=ra,r.textContent=a,n||document.head.appendChild(r)},ka=s.createContext({}),H=()=>s.useContext(ka),Wa=({children:e,theme:a,linkComponent:n,labels:r})=>{const o=s.useMemo(()=>a?JSON.stringify(a):"",[a]);s.useEffect(()=>{wa(a)},[o]);const c=s.useRef(a);c.current=a;const i=s.useMemo(()=>({theme:c.current,linkComponent:n,labels:r}),[o,n,r]);return t.jsx(ka.Provider,{value:i,children:e})},Za=(e={})=>{wa(e.theme),z.isClient()&&(e.colorScheme&&document.documentElement.setAttribute(Ye,e.colorScheme),e.density&&document.documentElement.setAttribute(va,e.density))},Va="hanui-live-region",en=e=>{if(!z.isClient())return null;const a=`${Va}-${e}`,n=document.getElementById(a);if(n)return n;const r=document.createElement("div");return r.id=a,r.setAttribute("aria-live",e),r.setAttribute("aria-atomic","true"),r.className="hanui-visually-hidden",document.body.appendChild(r),r},tn=(e,a)=>{e.textContent="",window.requestAnimationFrame(()=>{e.textContent=a})},Rt=()=>s.useCallback((e,a="polite")=>{const n=e.trim();if(n==="")return;const r=en(a);r&&tn(r,n)},[]),ia=()=>{var e;return z.isClient()&&((e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches)?"dark":"light"},an=()=>{if(!z.isClient())return"system";const e=document.documentElement.getAttribute(Ye);return e==="dark"||e==="light"?e:"system"},nn=()=>{const[e,a]=s.useState("light"),[n,r]=s.useState("light"),[o,c]=s.useState(!1);s.useEffect(()=>{a(an()),r(ia()),c(!0)},[]),s.useEffect(()=>{if(!z.isClient()||!window.matchMedia)return;const u=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>r(ia());return u.addEventListener("change",l),()=>u.removeEventListener("change",l)},[]);const i=e==="system"?n:e,_=s.useCallback(u=>{if(!z.isClient())return;const l=document.documentElement;l.classList.add(oa),u==="system"?l.removeAttribute(Ye):l.setAttribute(Ye,u),a(u),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>l.classList.remove(oa))})},[]),h=s.useCallback(()=>_(i==="dark"?"light":"dark"),[i,_]);return{scheme:i,preference:e,setScheme:_,toggle:h,isReady:o}},Gt=(e,a)=>{typeof(e==null?void 0:e.scrollIntoView)=="function"&&e.scrollIntoView(a)},Qt=({count:e,isOpen:a,initialIndex:n=0,onSelect:r,onClose:o},{hasSpaceSelect:c=!1}={})=>{const[i,_]=s.useState(n),h=s.useRef(null);s.useEffect(()=>{a&&_(n)},[a,n]),s.useEffect(()=>{_(l=>l>=e?Math.max(0,e-1):l)},[e]),s.useEffect(()=>{var l;a&&Gt((l=h.current)==null?void 0:l.querySelector(`[data-index="${i}"]`),{block:"nearest"})},[i,a,e]);const u=s.useCallback(l=>{const d=e-1;switch(l.key){case"ArrowDown":l.preventDefault(),_(p=>p>=d?0:p+1);break;case"ArrowUp":l.preventDefault(),_(p=>p<=0?d:p-1);break;case"Home":l.preventDefault(),_(0);break;case"End":l.preventDefault(),_(d);break;case" ":case"Enter":{if(l.key===" "&&!c)break;l.preventDefault(),e>0&&r(i);break}case"Escape":l.preventDefault(),o();break;case"Tab":o();break}},[i,e,c,o,r]);return{activeIndex:i,setActiveIndex:_,listRef:h,handleKeyDown:u}},Pt={top:"bottom",bottom:"top",left:"right",right:"left"},ca=(e,a,n)=>Math.min(Math.max(e,a),n),Ot=(e,a,n,r,o)=>{const c=n==="top"||n==="bottom",i={top:e.top-a.height-o,bottom:e.top+e.height+o,left:e.left-a.width-o,right:e.left+e.width+o}[n],_=c?e.left:e.top,h=c?e.width:e.height,u=c?a.width:a.height,l={start:_,center:_+h/2-u/2,end:_+h-u}[r];return c?{top:i,left:l}:{top:l,left:i}},la=(e,a,n,r,o)=>({top:e.top>=r,bottom:e.top+a.height<=o.height-r,left:e.left>=r,right:e.left+a.width<=o.width-r})[n],wt=(e,a,{side:n="top",align:r="center",offset:o=8,padding:c=8,isOpen:i})=>{const[_,h]=s.useState({style:{position:"fixed",top:0,left:0},side:n,isPositioned:!1}),u=s.useRef(0),l=s.useCallback(()=>{const b=e.current,w=a.current;if(!b||!w)return;const g=b.getBoundingClientRect(),m=w.getBoundingClientRect(),v={width:window.innerWidth,height:window.innerHeight},$=Ot(g,m,n,r,o),j=la($,m,n,c,v)?n:la(Ot(g,m,Pt[n],r,o),m,Pt[n],c,v)?Pt[n]:n,x=Ot(g,m,j,r,o);h({style:{position:"fixed",top:Math.round(ca(x.top,c,v.height-m.height-c)),left:Math.round(ca(x.left,c,v.width-m.width-c))},side:j,isPositioned:!0})},[e,a,n,r,o,c]),d=s.useCallback(()=>{u.current||(u.current=window.requestAnimationFrame(()=>{u.current=0,l()}))},[l]);return(z.isClient()?s.useLayoutEffect:s.useEffect)(()=>{if(!i){h(w=>w.isPositioned?{...w,isPositioned:!1}:w);return}l(),window.addEventListener("resize",d),document.addEventListener("scroll",d,!0);const b=typeof ResizeObserver>"u"?null:new ResizeObserver(d);return b&&a.current&&b.observe(a.current),b&&e.current&&b.observe(e.current),()=>{window.removeEventListener("resize",d),document.removeEventListener("scroll",d,!0),b==null||b.disconnect(),u.current&&(window.cancelAnimationFrame(u.current),u.current=0)}},[i,l,d,e,a]),_},ja=(e,{rowHeight:a=40,overscan:n=6,isEnabled:r=!0}={})=>{const o=s.useRef(null),[c,i]=s.useState({start:0,end:e,totalHeight:e*a,offset:0}),_=s.useCallback(()=>{const u=o.current,l=!r||!u||u.clientHeight===0?{start:0,end:e,totalHeight:e*a,offset:0}:(()=>{const d=Math.ceil(u.clientHeight/a),p=Math.floor(u.scrollTop/a),b=Math.max(0,p-n),w=Math.min(e,p+d+n);return{start:b,end:w,totalHeight:e*a,offset:b*a}})();i(d=>d.start===l.start&&d.end===l.end&&d.totalHeight===l.totalHeight&&d.offset===l.offset?d:l)},[e,r,n,a]);s.useEffect(_),s.useEffect(()=>{const u=o.current;if(!u)return;u.addEventListener("scroll",_,{passive:!0});const l=typeof ResizeObserver>"u"?null:new ResizeObserver(_);return l==null||l.observe(u),()=>{u.removeEventListener("scroll",_),l==null||l.disconnect()}},[_]);const h=s.useCallback(u=>{const l=o.current;if(!l||!r)return;const d=u*a,p=d+a;d<l.scrollTop?l.scrollTop=d:p>l.scrollTop+l.clientHeight&&(l.scrollTop=p-l.clientHeight)},[r,a]);return{scrollRef:o,range:c,scrollToIndex:h,measure:_}};let gt=0,Ne=null;const sn=()=>/iP(hone|ad|od)/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,rn=()=>{if(gt+=1,gt>1)return;const{body:e,style:a}={body:document.body,style:document.documentElement.style},n=window.scrollY;Ne={overflow:e.style.overflow,position:e.style.position,top:e.style.top,width:e.style.width,paddingRight:e.style.paddingRight,scrollY:n};const r=window.innerWidth-document.documentElement.clientWidth;r>0&&(e.style.paddingRight=`${r}px`),a.setProperty("scrollbar-gutter","stable"),e.style.overflow="hidden",sn()&&(e.style.position="fixed",e.style.top=`${-n}px`,e.style.width="100%")},on=()=>{if(gt=Math.max(0,gt-1),gt>0||!Ne)return;const{body:e}=document,{scrollY:a}=Ne;e.style.overflow=Ne.overflow,e.style.position=Ne.position,e.style.top=Ne.top,e.style.width=Ne.width,e.style.paddingRight=Ne.paddingRight,document.documentElement.style.removeProperty("scrollbar-gutter"),Ne=null,window.scrollTo(0,a)},kt=(e=!0)=>{s.useEffect(()=>{if(e)return rn(),on},[e])},Na="--hanui-sheet-height",$a="--hanui-sheet-inset-bottom";let Nt=0,st=0;const cn=240,Ea=()=>{const e=window.visualViewport;if(!e||e.height<cn)return;const a=window.innerHeight-e.height-e.offsetTop,n=document.documentElement;n.style.setProperty($a,`${Math.max(0,Math.round(a))}px`),n.style.setProperty(Na,`${Math.round(e.height)}px`)},Je=()=>{st||(st=window.requestAnimationFrame(()=>{st=0,Ea()}))},da=()=>{st&&(window.cancelAnimationFrame(st),st=0)},Ca=(e=!0)=>{s.useEffect(()=>{if(!e)return;const a=window.visualViewport;if(a)return Nt+=1,Nt===1&&(a.addEventListener("resize",Je),a.addEventListener("scroll",Je),window.addEventListener("orientationchange",Je)),da(),Ea(),()=>{Nt-=1,!(Nt>0)&&(a.removeEventListener("resize",Je),a.removeEventListener("scroll",Je),window.removeEventListener("orientationchange",Je),da(),document.documentElement.style.removeProperty($a),document.documentElement.style.removeProperty(Na))}},[e])};var be=(e=>(e.PRIMARY="PRIMARY",e.CART="CART",e.SECONDARY="SECONDARY",e.OUTLINE="OUTLINE",e.DARK="DARK",e.LIGHT="LIGHT",e.GHOST="GHOST",e.DANGER="DANGER",e))(be||{}),Le=(e=>(e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e))(Le||{});const Ia=640,ln=768,Da=1024,dn=`(min-width: ${Da+1}px)`,St=`(min-width: ${Ia+1}px)`,Ut=e=>e.replace(/İ/g,"i").replace(/I/g,"i").replace(/ı/g,"i").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ş/g,"s").replace(/ğ/g,"g").replace(/ç/g,"c").replace(/ø/g,"o").replace(/æ/g,"ae").replace(/ß/g,"ss").replace(/đ/g,"d").replace(/ł/g,"l").replace(/\s+/g," ").trim(),vt=(e,a)=>Ut(e).includes(Ut(a)),un=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),Ta=e=>{if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const a=e.getAttribute("contenteditable");if(a===""||a==="true"||a==="plaintext-only")return!0;const n=e.tagName;return n==="TEXTAREA"?!0:n!=="INPUT"?!1:!un.has(e.type)},Lt=e=>{const a=e.ownerDocument.activeElement;!e.contains(a)||!Ta(a)||(a.blur(),e.tabIndex=-1,e.focus({preventScroll:!0}))},ot=()=>{const e=typeof document>"u"?null:document.activeElement;return()=>{e instanceof HTMLElement&&e.isConnected&&e.focus({preventScroll:!0})}},_n=["a[href]","button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"])'].map(e=>`${e}:not([inert]):not([aria-hidden="true"])`).join(", "),At=(e,a="[data-hanui-close]")=>{const n=e.querySelector("[data-hanui-autofocus]");if(n){n.focus({preventScroll:!0});return}const r=[...e.querySelectorAll(_n)],o=r.find(c=>!c.matches(a))??r[0];if(o){o.focus({preventScroll:!0});return}e.tabIndex=-1,e.focus({preventScroll:!0})},ft=[],Ft=()=>{const e=Symbol("hanui-modal");return ft.push(e),{token:e,pop:()=>{const a=ft.indexOf(e);a>=0&&ft.splice(a,1)}}},Mt=e=>ft[ft.length-1]===e,f=(...e)=>{let a="";for(const n of e)n&&(a=a===""?n:`${a} ${n}`);return a},A=(e,a)=>Object.assign(e,{displayName:a}),fe=({children:e,...a})=>{const{linkComponent:n}=H();return n?t.jsx(n,{...a,children:e}):t.jsx("a",{...a,children:e})},ua=new Set,M=(e,...a)=>{for(const n of a)if(n!==void 0)return n;return process.env.NODE_ENV!=="production"&&!ua.has(e)&&(ua.add(e),console.error(`[hanui] Eksik metin: ${e}. Prop olarak geçin ya da <HanuiProvider labels={…}> içinde bir kez tanımlayın. Metinsiz bırakılan öğe ekran okuyucuda adsız kalır.`)),""},Tt=(e,a,...n)=>a?a(...n):M(e),hn="hanui-spinner-7pXwf",pn="hanui-spinner__label-sZvSq",Ht={spinner:hn,"hanui-spin":"hanui-hanui-spin-wTV0a",spinner__label:pn,"spinner--sm":"hanui-spinner--sm-uI0wH","spinner--md":"hanui-spinner--md--VmFK","spinner--lg":"hanui-spinner--lg-K9k-Z"},mn=({size:e="md",label:a,className:n})=>{const{labels:r}=H();return t.jsx("span",{className:f(Ht.spinner,Ht[`spinner--${e}`],n),role:"status",children:t.jsx("span",{className:Ht.spinner__label,children:a??M("Spinner.label",r==null?void 0:r.loading)})})},Jt=s.memo(mn),bn="hanui-button-SRu4R",gn="hanui-button__icon-giom6",fn="hanui-button__spinner-vexVG",xn="hanui-button__label-qiMHm",ve={button:bn,button__icon:gn,button__spinner:fn,button__label:xn,"button--full":"hanui-button--full-CwPHR","button--loading":"hanui-button--loading-O-naJ","button--small":"hanui-button--small-TF9Hz","button--medium":"hanui-button--medium-JDjkH","button--large":"hanui-button--large-btadu","button--primary":"hanui-button--primary-ym7RJ","button--cart":"hanui-button--cart-5DVmR","button--secondary":"hanui-button--secondary-56m1d","button--outline":"hanui-button--outline-ZI8sw","button--dark":"hanui-button--dark-FGZgn","button--light":"hanui-button--light-YzEPs","button--ghost":"hanui-button--ghost-rijnZ","button--danger":"hanui-button--danger-TNGd2"},vn=s.forwardRef(({variant:e=be.PRIMARY,size:a=Le.MEDIUM,isLoading:n,isFullWidth:r,startIcon:o,endIcon:c,className:i,children:_,disabled:h,href:u,isExternal:l,linkProps:d,testId:p,...b},w)=>{const g=f(ve.button,ve[`button--${e.toLowerCase()}`],ve[`button--${a.toLowerCase()}`],r&&ve["button--full"],n&&ve["button--loading"],i),m=t.jsxs(t.Fragment,{children:[n&&t.jsx(Jt,{size:"sm",className:ve.button__spinner,label:""}),!n&&o&&t.jsx("span",{className:ve.button__icon,children:o}),t.jsx("span",{className:ve.button__label,children:_}),c&&t.jsx("span",{className:ve.button__icon,children:c})]});return u&&l?t.jsx("a",{href:u,className:g,target:"_blank",rel:"noopener noreferrer","aria-label":b["aria-label"],"data-testid":p,children:m}):u?t.jsx(fe,{href:u,className:g,"data-testid":p,...d,children:m}):t.jsx("button",{ref:w,className:g,disabled:h||n,"aria-busy":n,"data-testid":p,...b,children:m})}),rt=s.memo(A(vn,"Button")),yn="hanui-iconButton-JdtwM",zt={iconButton:yn,"iconButton--sm":"hanui-iconButton--sm-wE6zE","iconButton--md":"hanui-iconButton--md-iTNNS","iconButton--ghost":"hanui-iconButton--ghost-w-8K3","iconButton--outline":"hanui-iconButton--outline-vEhcY","iconButton--solid":"hanui-iconButton--solid-NUszP","iconButton--cart":"hanui-iconButton--cart-nVsH-","iconButton--danger":"hanui-iconButton--danger-xKkEA"},wn=s.forwardRef(({icon:e,label:a,variant:n="ghost",size:r="md",className:o,type:c="button",href:i,linkProps:_,testId:h,...u},l)=>{const d=f(zt.iconButton,zt[`iconButton--${n}`],zt[`iconButton--${r}`],o);return i?t.jsx(fe,{href:i,className:d,"aria-label":a,title:u.title,"data-testid":h,..._,children:e}):t.jsx("button",{ref:l,type:c,className:d,"aria-label":a,"data-testid":h,...u,children:e})}),ge=s.memo(A(wn,"IconButton")),kn="hanui-link-WBmXY",jn="hanui-link__label--OEu-",Nn="hanui-link__arrow-JKXm-",lt={link:kn,link__label:jn,link__arrow:Nn,"link--sm":"hanui-link--sm-a-3Dz","link--md":"hanui-link--md-lZdYP","link--brand":"hanui-link--brand-vr8sW","link--muted":"hanui-link--muted-EeN6l"},$n=({href:e,children:a,hasArrow:n,tone:r="brand",size:o="md",className:c,linkProps:i,..._})=>t.jsxs(fe,{href:e,className:f(lt.link,lt[`link--${r}`],lt[`link--${o}`],c),...i,..._,children:[t.jsx("span",{className:lt.link__label,children:a}),n&&t.jsx(I.ArrowRight,{"aria-hidden":!0,className:lt.link__arrow})]}),En=s.memo($n),Cn="hanui-tooltip-RG1g1",In="hanui-tooltip__trigger-nWZtO",Dn="hanui-bubble-bcBNk",$t={tooltip:Cn,tooltip__trigger:In,bubble:Dn,"bubble--top":"hanui-bubble--top-uWSZy","hanui-fade-in-up":"hanui-hanui-fade-in-up-Fwj3A","bubble--bottom":"hanui-bubble--bottom-jKokL","hanui-fade-in-down":"hanui-hanui-fade-in-down-5UfIc","bubble--left":"hanui-bubble--left-WK4EM","bubble--right":"hanui-bubble--right-EQjUT","hanui-fade-in":"hanui-hanui-fade-in-wwrDx"},Tn=120,Rn=500,Sn=({content:e,children:a,side:n,position:r,openDelay:o=300,className:c})=>{const[i,_]=s.useState(!1),h=s.useId(),u=n??r??"top",l=s.useRef(null),d=s.useRef(null),p=s.useRef(0),b=s.useRef(0),w=wt(l,d,{side:u,align:"center",isOpen:i}),g=s.useCallback(()=>{p.current&&window.clearTimeout(p.current),p.current=0},[]),m=s.useCallback(x=>{g(),p.current=window.setTimeout(()=>_(!0),x)},[g]),v=s.useCallback((x=Tn)=>{g(),p.current=window.setTimeout(()=>_(!1),x)},[g]);s.useEffect(()=>g,[g]),s.useEffect(()=>{if(!i)return;const x=N=>{N.key==="Escape"&&v(0)};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i,v]),s.useEffect(()=>{if(!i)return;const x=N=>{var k;N.pointerType!=="mouse"&&((k=l.current)!=null&&k.contains(N.target)||v(0))};return document.addEventListener("pointerdown",x),()=>document.removeEventListener("pointerdown",x)},[i,v]);const $=()=>{b.current&&window.clearTimeout(b.current),b.current=0},j=x=>{x.pointerType!=="mouse"&&(b.current=window.setTimeout(()=>_(!0),Rn))};return t.jsxs(t.Fragment,{children:[t.jsx("span",{ref:l,className:f($t.tooltip,c),onPointerEnter:x=>x.pointerType==="mouse"&&m(o),onPointerLeave:x=>{$(),x.pointerType==="mouse"&&v()},onPointerDown:j,onPointerUp:$,onPointerCancel:$,onFocus:()=>m(0),onBlur:()=>v(0),onContextMenu:x=>{(i||b.current)&&x.preventDefault()},children:t.jsx("span",{"aria-describedby":i?h:void 0,className:$t.tooltip__trigger,children:a})}),i&&z.isClient()&&yt.createPortal(t.jsx("span",{ref:d,id:h,role:"tooltip",className:f($t.bubble,$t[`bubble--${w.side}`]),style:{...w.style,visibility:w.isPositioned?"visible":"hidden"},onPointerEnter:g,onPointerLeave:()=>v(),children:e}),document.body)]})},Ln=s.memo(A(Sn,"Tooltip")),An="hanui-menu-1x-FU",Fn="hanui-menu__item-d1iil",Mn="hanui-menu__icon-kzLV2",dt={menu:An,"menu--top":"hanui-menu--top-gpo39","hanui-fade-in-up":"hanui-hanui-fade-in-up-7YdDa","menu--bottom":"hanui-menu--bottom-6sL7b","hanui-fade-in-down":"hanui-hanui-fade-in-down-gZjPq","menu--left":"hanui-menu--left-4w-O8","menu--right":"hanui-menu--right-XmM8G","hanui-fade-in":"hanui-hanui-fade-in-vivgk",menu__item:Fn,"menu__item--danger":"hanui-menu__item--danger-lIINY",menu__icon:Mn},Bn=e=>e.map((a,n)=>a.isDisabled?-1:n).filter(a=>a>=0),Pn=({trigger:e,items:a,label:n,side:r="bottom",align:o="start",className:c,testId:i})=>{const _=s.useId(),h=s.useRef(null),u=s.useRef(null),l=s.useRef(null),d=s.useRef({text:"",at:0}),[p,b]=s.useState(!1),[w,g]=s.useState(0),m=wt(h,u,{side:r,align:o,isOpen:p}),v=Bn(a),$=s.useCallback(y=>{v.length!==0&&(l.current=ot(),g(y==="first"?v[0]:v[v.length-1]),b(!0))},[v]),j=s.useCallback(()=>{var y;b(!1),(y=l.current)==null||y.call(l),l.current=null},[]);s.useEffect(()=>{var y,S;p&&((S=(y=u.current)==null?void 0:y.querySelector(`[data-index="${w}"]`))==null||S.focus({preventScroll:!0}))},[p,w]),s.useEffect(()=>{if(!p)return;const y=S=>{var X,G;const P=S.target;(X=u.current)!=null&&X.contains(P)||(G=h.current)!=null&&G.contains(P)||j()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[p,j]);const x=y=>{const P=(v.indexOf(w)+y+v.length)%v.length;g(v[P])},N=y=>{const S=Date.now(),P=S-d.current.at>500?y:d.current.text+y;d.current={text:P,at:S};const X=v.find(G=>a[G].label.toLocaleLowerCase("tr").startsWith(P.toLocaleLowerCase("tr")));X!==void 0&&g(X)},k=y=>{switch(y.key){case"ArrowDown":y.preventDefault(),x(1);break;case"ArrowUp":y.preventDefault(),x(-1);break;case"Home":y.preventDefault(),g(v[0]);break;case"End":y.preventDefault(),g(v[v.length-1]);break;case"Escape":y.preventDefault(),j();break;case"Tab":j();break;default:y.key.length===1&&!y.metaKey&&!y.ctrlKey&&N(y.key)}},T=y=>{if(y.key==="ArrowUp"){y.preventDefault(),$("last");return}["ArrowDown","Enter"," "].includes(y.key)&&(y.preventDefault(),$("first"))};if(!s.isValidElement(e))return null;const C=e.props,D=s.cloneElement(e,{ref:h,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?_:void 0,onClick:y=>{var S;(S=C.onClick)==null||S.call(C,y),p?j():$("first")},onKeyDown:y=>{var S;(S=C.onKeyDown)==null||S.call(C,y),p||T(y)}});return t.jsxs(t.Fragment,{children:[D,p&&z.isClient()&&yt.createPortal(t.jsx("div",{ref:u,id:_,role:"menu","aria-label":n,className:f(dt.menu,dt[`menu--${m.side}`],c),style:{...m.style,visibility:m.isPositioned?"visible":"hidden"},"data-testid":i,onKeyDown:k,children:a.map((y,S)=>t.jsxs("button",{type:"button",role:"menuitem","data-index":S,tabIndex:S===w?0:-1,disabled:y.isDisabled,className:f(dt.menu__item,y.isDanger&&dt["menu__item--danger"]),onClick:()=>{y.onSelect(),j()},onMouseEnter:()=>!y.isDisabled&&g(S),children:[y.icon&&t.jsx("span",{className:dt.menu__icon,"aria-hidden":!0,children:y.icon}),y.label]},y.id))}),document.body)]})},On=s.memo(A(Pn,"Menu")),Hn="hanui-popover-VxgiK",_a={popover:Hn,"popover--top":"hanui-popover--top-OUYwo","hanui-fade-in-up":"hanui-hanui-fade-in-up-it2wl","popover--bottom":"hanui-popover--bottom-Q1K4X","hanui-fade-in-down":"hanui-hanui-fade-in-down-E-AGy","popover--left":"hanui-popover--left-9Rsjx","popover--right":"hanui-popover--right-0TJeo","hanui-fade-in":"hanui-hanui-fade-in-zsza4"},zn=({trigger:e,children:a,label:n,side:r="bottom",align:o="start",isOpen:c,onOpenChange:i,className:_,testId:h})=>{const u=s.useId(),l=s.useRef(null),d=s.useRef(null),p=s.useRef(null),[b,w]=s.useState(!1),g=c!==void 0,m=g?c:b,v=wt(l,d,{side:r,align:o,isOpen:m}),$=s.useCallback(N=>{g||w(N),i==null||i(N)},[g,i]);if(s.useEffect(()=>{if(!m)return;p.current=ot();const N=d.current;return N&&At(N),()=>{var k;(k=p.current)==null||k.call(p),p.current=null}},[m]),s.useEffect(()=>{if(!m)return;const N=T=>{T.key==="Escape"&&$(!1)},k=T=>{var D,y;const C=T.target;(D=d.current)!=null&&D.contains(C)||(y=l.current)!=null&&y.contains(C)||$(!1)};return document.addEventListener("keydown",N),document.addEventListener("mousedown",k),()=>{document.removeEventListener("keydown",N),document.removeEventListener("mousedown",k)}},[m,$]),!s.isValidElement(e))return null;const j=e.props,x=s.cloneElement(e,{ref:l,"aria-expanded":m,"aria-haspopup":"dialog","aria-controls":m?u:void 0,onClick:N=>{var k;(k=j.onClick)==null||k.call(j,N),$(!m)}});return t.jsxs(t.Fragment,{children:[x,m&&z.isClient()&&yt.createPortal(t.jsx("div",{ref:d,id:u,role:"dialog","aria-label":n,className:f(_a.popover,_a[`popover--${v.side}`],_),style:{...v.style,visibility:v.isPositioned?"visible":"hidden"},"data-testid":h,onBlur:N=>{var k;N.currentTarget.contains(N.relatedTarget)||(k=l.current)!=null&&k.contains(N.relatedTarget)||$(!1)},children:a}),document.body)]})},Kn=s.memo(A(zn,"Popover")),Un="hanui-chip--NLgU",qn="hanui-chip__icon-IjjSb",Yn="hanui-chip__label-cT4hw",Xn="hanui-chip__count-MBGO3",Ce={chip:Un,chip__icon:qn,chip__label:Yn,chip__count:Xn,"chip--sm":"hanui-chip--sm-60H-S","chip--md":"hanui-chip--md--yAlm","chip--iconOnly":"hanui-chip--iconOnly-5LT1h","chip--selected":"hanui-chip--selected-FdpCr"},Gn=s.forwardRef(({children:e,icon:a,endIcon:n,count:r,isSelected:o,size:c="md",label:i,href:_,linkProps:h,className:u,type:l="button",role:d,testId:p,...b},w)=>{const g=f(Ce.chip,Ce[`chip--${c}`],o&&Ce["chip--selected"],!e&&Ce["chip--iconOnly"],u),m=t.jsxs(t.Fragment,{children:[a&&t.jsx("span",{className:Ce.chip__icon,"aria-hidden":!0,children:a}),e&&t.jsx("span",{className:Ce.chip__label,children:e}),z.isDefined(r)&&t.jsx("span",{className:Ce.chip__count,children:r}),n&&t.jsx("span",{className:Ce.chip__icon,"aria-hidden":!0,children:n})]});return _?t.jsx(fe,{href:_,className:g,"aria-label":e?void 0:i,"aria-current":o?"page":void 0,"data-testid":p,...h,children:m}):t.jsx("button",{ref:w,type:l,role:d,className:g,"aria-label":e?void 0:i,"data-testid":p,...d==="radio"?{"aria-checked":!!o}:{"aria-pressed":!!o},...b,children:m})}),Ra=s.memo(A(Gn,"Chip")),Qn="hanui-group-0tnVf",ha={group:Qn,"group--scrollable":"hanui-group--scrollable-PMu6V"},Jn=({options:e,label:a,size:n="md",isScrollable:r,className:o,...c})=>{var d;const i=s.useRef(null),_=p=>c.isMultiple?c.value.includes(p):c.value===p,h=p=>{if(c.isMultiple){const b=c.value.includes(p)?c.value.filter(w=>w!==p):[...c.value,p];c.onChange(b);return}c.onChange(c.value===p?null:p)},u=p=>{var v,$;if(c.isMultiple)return;const b=p.key==="ArrowRight"||p.key==="ArrowDown"?1:p.key==="ArrowLeft"||p.key==="ArrowUp"?-1:0;if(b===0)return;p.preventDefault();const w=e.filter(j=>!j.isDisabled);if(w.length===0)return;const g=w.findIndex(j=>j.value===c.value),m=w[(g+b+w.length)%w.length];c.onChange(m.value),($=(v=i.current)==null?void 0:v.querySelector(`[data-chip-value="${m.value}"]`))==null||$.focus()},l=c.isMultiple?null:c.value??((d=e.find(p=>!p.isDisabled))==null?void 0:d.value)??null;return t.jsx("div",{ref:i,className:f(ha.group,r&&ha["group--scrollable"],o),role:c.isMultiple?"group":"radiogroup","aria-label":a,onKeyDown:u,children:e.map(p=>t.jsx(Ra,{size:n,icon:p.icon,count:p.count,isSelected:_(p.value),disabled:p.isDisabled,role:c.isMultiple?void 0:"radio",tabIndex:c.isMultiple||p.value===l?0:-1,"data-chip-value":p.value,onClick:()=>h(p.value),children:p.label},p.value))})},Wn=s.memo(Jn),Zn="hanui-sheet-GEvdE",Vn="hanui-sheet__header-NJgw-",es="hanui-sheet__title-f-b07",ts="hanui-sheet__toolbar-eyhmW",as="hanui-sheet__body-eJ2KB",ns="hanui-sheet__footer-NpsY5",Me={sheet:Zn,sheet__header:Vn,sheet__title:es,sheet__toolbar:ts,sheet__body:as,sheet__footer:ns},ss=({title:e,closeLabel:a,onClose:n,children:r,toolbar:o,footer:c,closeAbove:i=St,className:_,testId:h})=>{const{labels:u}=H(),l=s.useId(),d=s.useRef(null);Ca(),kt(),s.useEffect(()=>{const w=ot(),{token:g,pop:m}=Ft();return d.current=g,()=>{m(),d.current=null,w()}},[]),s.useEffect(()=>{const w=window.matchMedia(i);return w.addEventListener("change",n),()=>w.removeEventListener("change",n)},[i,n]);const p=s.useCallback(w=>{!w||w.open||(w.showModal(),At(w,`.${Me.sheet__header} button`),Lt(w))},[]),b=s.useCallback(w=>{w.target===w.currentTarget&&n()},[n]);return z.isClient()?yt.createPortal(t.jsxs("dialog",{ref:p,className:f(Me.sheet,_),"aria-labelledby":l,"data-testid":h,onCancel:w=>{w.preventDefault(),!(d.current&&!Mt(d.current))&&n()},onClick:b,children:[t.jsxs("header",{className:Me.sheet__header,children:[t.jsx("h2",{id:l,className:Me.sheet__title,children:e}),t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:M("BottomSheet.closeLabel",a,u==null?void 0:u.close),variant:"ghost",size:"sm",onClick:n})]}),o&&t.jsx("div",{className:Me.sheet__toolbar,children:o}),t.jsx("div",{className:Me.sheet__body,children:r}),c&&t.jsx("div",{className:Me.sheet__footer,children:c})]}),document.body):null},Wt=s.memo(ss),rs="hanui-combobox-NtZoV",os="hanui-combobox__trigger-2riRR",is="hanui-combobox__leadingIcon-it2xz",cs="hanui-combobox__value-acDlr",ls="hanui-combobox__clear-EXOsc",ds="hanui-combobox__chevron-g-QzQ",us="hanui-combobox__panel-srBxl",_s="hanui-combobox__search-THjer",hs="hanui-combobox__searchIcon-vr4Bg",ps="hanui-combobox__searchInput-JPp5h",ms="hanui-combobox__list-p-eCs",bs="hanui-combobox__option-CLWh-",gs="hanui-combobox__optionText-Zm0D6",fs="hanui-combobox__optionLabel-WvT4W",xs="hanui-combobox__optionDescription-8OEzi",vs="hanui-combobox__check-MKlLz",ys="hanui-combobox__empty-mZwBq",O={combobox:rs,combobox__trigger:os,"combobox__trigger--empty":"hanui-combobox__trigger--empty-RxwCq","combobox__trigger--open":"hanui-combobox__trigger--open-rw1ZS","combobox__trigger--invalid":"hanui-combobox__trigger--invalid-iZgiN","combobox__trigger--clearable":"hanui-combobox__trigger--clearable-shq9I",combobox__leadingIcon:is,combobox__value:cs,combobox__clear:ls,combobox__chevron:ds,"combobox__chevron--open":"hanui-combobox__chevron--open-9kj1j",combobox__panel:us,combobox__search:_s,combobox__searchIcon:hs,combobox__searchInput:ps,combobox__list:ms,"combobox__list--sheet":"hanui-combobox__list--sheet-r3MzB",combobox__option:bs,"combobox__option--active":"hanui-combobox__option--active--75Vq","combobox__option--selected":"hanui-combobox__option--selected-DVFGy","combobox__option--disabled":"hanui-combobox__option--disabled-e6VjI",combobox__optionText:gs,combobox__optionLabel:fs,combobox__optionDescription:xs,combobox__check:vs,combobox__empty:ys},ws=80,pa=40,ks=({options:e,value:a,onChange:n,labels:r,isSearchHidden:o,onSearch:c,isLoading:i,isDisabled:_,isClearable:h,icon:u,id:l,className:d,testId:p,"aria-describedby":b,"aria-invalid":w})=>{var na;const{labels:g}=H(),m={get search(){var R;return M("Combobox.searchPlaceholder",r.searchPlaceholder,(R=g==null?void 0:g.combobox)==null?void 0:R.searchPlaceholder)},get empty(){var R;return M("Combobox.emptyMessage",r.emptyMessage,(R=g==null?void 0:g.combobox)==null?void 0:R.emptyMessage)},get loading(){var R;return M("Combobox.loadingMessage",r.loadingMessage,(R=g==null?void 0:g.combobox)==null?void 0:R.loadingMessage)},get clear(){var R;return M("Combobox.clearLabel",r.clearLabel,(R=g==null?void 0:g.combobox)==null?void 0:R.clearLabel)}},v=s.useId(),$=l??v,j=`${$}-listbox`,x=s.useRef(null),N=s.useRef(null),k=s.useRef(null),T=s.useRef(null),[C,D]=s.useState(null),y=C!==null,[S,P]=s.useState(""),[X,G]=s.useState(null),K=s.useMemo(()=>{if(c||S.trim()==="")return e;const R=S.trim();return e.filter(te=>vt(te.label,R)||(te.description?vt(te.description,R):!1))},[e,S,c]),oe=e.find(R=>R.value===a)??null;s.useEffect(()=>{oe?G(oe.label):a===null&&G(null)},[oe,a]);const Ge=(oe==null?void 0:oe.label)??X,xe=s.useRef(c);xe.current=c,s.useEffect(()=>{if(!y||!xe.current)return;const R=window.setTimeout(()=>{var te;return(te=xe.current)==null?void 0:te.call(xe,S.trim())},300);return()=>window.clearTimeout(R)},[S,y]);const Ee=s.useCallback(()=>{D(null),P("")},[]),jt=s.useCallback(()=>{_||(D(window.matchMedia(St).matches?"popover":"sheet"),P(""))},[_]);s.useEffect(()=>{if(C!=="popover")return;const R=te=>{var le;(le=x.current)!=null&&le.contains(te.target)||Ee()};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[C,Ee]),s.useEffect(()=>{var R;C==="popover"&&((R=T.current)==null||R.focus({preventScroll:!0}))},[C]);const it=R=>{R.isDisabled||(G(R.label),n(R.value),Ee())},B=s.useRef(!1);s.useEffect(()=>{var R;B.current&&!y&&((R=N.current)==null||R.focus()),B.current=y},[y]);const J=wt(N,k,{side:"bottom",align:"start",isOpen:y&&C==="popover"}),{activeIndex:ee,setActiveIndex:Qe,listRef:Ba,handleKeyDown:Pa}=Qt({count:K.length,isOpen:y,initialIndex:Math.max(e.findIndex(R=>R.value===a),0),onSelect:R=>{const te=K[R];te&&it(te)},onClose:Ee}),Oa=K.some(R=>!!R.description),Ae=C==="popover"&&!Oa&&K.length>ws,{scrollRef:Ha,range:Fe,scrollToIndex:ea}=ja(K.length,{rowHeight:pa,isEnabled:Ae});s.useEffect(()=>{Ae&&ea(ee)},[ee,Ae,ea]);const za=R=>{Ba.current=R,Ha.current=R},Ka=Pa,Ua=()=>{n(null),G(null)},ta=o?null:t.jsxs("div",{className:O.combobox__search,children:[t.jsx(I.Search,{"aria-hidden":!0,className:O.combobox__searchIcon}),t.jsx("input",{ref:T,type:"text",role:"combobox",className:O.combobox__searchInput,value:S,placeholder:m.search,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":j,"aria-activedescendant":K[ee]?`${$}-option-${ee}`:void 0,"aria-label":m.search,onChange:R=>{P(R.target.value),Qe(0)},onKeyDown:Ka}),i&&t.jsx(Jt,{size:"sm",label:""})]}),aa=R=>{const te=K.slice(Fe.start,Fe.end);return t.jsxs("ul",{ref:za,id:j,role:"listbox",className:f(O.combobox__list,R&&O["combobox__list--sheet"]),children:[Ae&&Fe.offset>0&&t.jsx("li",{"aria-hidden":!0,style:{height:Fe.offset}}),te.map((le,qa)=>{const ct=Fe.start+qa,Ya=ct===ee,Bt=le.value===a;return t.jsx("li",{children:t.jsxs("div",{id:`${$}-option-${ct}`,role:"option","data-index":ct,"aria-setsize":Ae?K.length:void 0,"aria-posinset":Ae?ct+1:void 0,"aria-selected":Bt,"aria-disabled":le.isDisabled,className:f(O.combobox__option,Ya&&O["combobox__option--active"],Bt&&O["combobox__option--selected"],le.isDisabled&&O["combobox__option--disabled"]),onMouseEnter:()=>Qe(ct),onClick:()=>it(le),children:[t.jsxs("span",{className:O.combobox__optionText,children:[t.jsx("span",{className:O.combobox__optionLabel,children:le.label}),le.description&&t.jsx("span",{className:O.combobox__optionDescription,children:le.description})]}),Bt&&t.jsx(I.CheckLg,{"aria-hidden":!0,className:O.combobox__check})]})},le.value)}),Ae&&Fe.end<K.length&&t.jsx("li",{"aria-hidden":!0,style:{height:(K.length-Fe.end)*pa}}),K.length===0&&t.jsx("li",{className:O.combobox__empty,children:i?m.loading:m.empty})]})};return t.jsxs("div",{ref:x,className:f(O.combobox,d),"data-testid":p,children:[t.jsxs("button",{ref:N,id:$,type:"button",className:f(O.combobox__trigger,!Ge&&O["combobox__trigger--empty"],y&&O["combobox__trigger--open"],w&&O["combobox__trigger--invalid"],h&&Ge&&!_&&O["combobox__trigger--clearable"]),disabled:_,"aria-haspopup":"listbox","aria-expanded":y,"aria-controls":y?j:void 0,"aria-label":r.placeholder,"aria-describedby":b,onClick:()=>y?Ee():jt(),children:[u&&t.jsx("span",{className:O.combobox__leadingIcon,"aria-hidden":!0,children:u}),t.jsx("span",{className:O.combobox__value,children:Ge??r.placeholder}),t.jsx(I.CaretDownFill,{"aria-hidden":!0,className:f(O.combobox__chevron,y&&O["combobox__chevron--open"])})]}),h&&Ge&&!_&&t.jsx("button",{type:"button",className:O.combobox__clear,"aria-label":m.clear,onClick:Ua,children:t.jsx(I.XLg,{"aria-hidden":!0})}),C==="popover"&&t.jsxs("div",{ref:k,className:O.combobox__panel,style:{...J.style,width:(na=N.current)==null?void 0:na.offsetWidth,visibility:J.isPositioned?void 0:"hidden"},children:[ta,aa(!1)]}),C==="sheet"&&t.jsx(Wt,{title:r.placeholder,closeLabel:r.closeLabel??(g==null?void 0:g.close),onClose:Ee,toolbar:ta??void 0,children:aa(!0)})]})},js=s.memo(ks),Ns="hanui-segmented-qo2Bw",$s="hanui-segmented__item-mqRNZ",Es="hanui-segmented__icon-C9CT-",Cs="hanui-segmented__label-NVXBv",We={segmented:Ns,"segmented--sm":"hanui-segmented--sm-7tUry","segmented--md":"hanui-segmented--md-PiSqt",segmented__item:$s,"segmented__item--selected":"hanui-segmented__item--selected-r7CLj",segmented__icon:Es,segmented__label:Cs},Is=({options:e,value:a,onChange:n,label:r,isIconOnly:o,size:c="md",className:i,testId:_})=>{const h=s.useRef(null),u=l=>{var g,m;const d=l.key==="ArrowRight"||l.key==="ArrowDown"?1:l.key==="ArrowLeft"||l.key==="ArrowUp"?-1:0;if(d===0)return;l.preventDefault();const p=e.filter(v=>!v.isDisabled);if(p.length===0)return;const b=p.findIndex(v=>v.value===a),w=p[(b+d+p.length)%p.length];n(w.value),(m=(g=h.current)==null?void 0:g.querySelector(`[data-value="${w.value}"]`))==null||m.focus({preventScroll:!0})};return t.jsx("div",{ref:h,role:"radiogroup","aria-label":r,className:f(We.segmented,We[`segmented--${c}`],i),"data-testid":_,onKeyDown:u,children:e.map(l=>{const d=l.value===a;return t.jsxs("button",{type:"button",role:"radio","aria-checked":d,"aria-label":o?l.label:void 0,"data-value":l.value,disabled:l.isDisabled,tabIndex:d?0:-1,className:f(We.segmented__item,d&&We["segmented__item--selected"]),onClick:()=>!d&&n(l.value),children:[l.icon&&t.jsx("span",{className:We.segmented__icon,"aria-hidden":!0,children:l.icon}),!o&&t.jsx("span",{className:We.segmented__label,children:l.label})]},l.value)})})},Ds=s.memo(A(Is,"SegmentedControl")),Ts="hanui-select-tiiPL",Rs="hanui-trigger-rHQJz",Ss="hanui-trigger__icon-apCcx",Ls="hanui-trigger__value-ioH7K",As="hanui-trigger__chevron-FtsIZ",Fs="hanui-panel-rGOOd",Ms="hanui-list-SOKf8",Bs="hanui-option-ZDPef",Ps="hanui-option__label-SsoYB",Os="hanui-option__check-8CPSG",q={select:Ts,trigger:Rs,"trigger--empty":"hanui-trigger--empty-cuinb","trigger--open":"hanui-trigger--open-1nsvu","trigger--sm":"hanui-trigger--sm-Xnu1C",trigger__icon:Ss,trigger__value:Ls,trigger__chevron:As,"trigger__chevron--open":"hanui-trigger__chevron--open-1P2P-",panel:Fs,"hanui-fade-in-up":"hanui-hanui-fade-in-up-Lt0Bt","panel--start":"hanui-panel--start-Fotwa","panel--end":"hanui-panel--end-ClVl2",list:Ms,"list--sheet":"hanui-list--sheet-BIjCb",option:Bs,"option--active":"hanui-option--active-R4lLF","option--selected":"hanui-option--selected-glQMj","option--disabled":"hanui-option--disabled-h4rdd",option__label:Ps,option__check:Os},Hs=({options:e,value:a,onChange:n,label:r,placeholder:o,closeLabel:c,icon:i,size:_="md",align:h="start",isDisabled:u,id:l,className:d,testId:p,"aria-describedby":b,"aria-invalid":w})=>{const{labels:g}=H(),m=M("Select.placeholder",o,g==null?void 0:g.selectPlaceholder),v=s.useId(),$=l??v,j=`${$}-listbox`,x=B=>`${$}-option-${B}`,N=s.useRef(null),k=s.useRef(null),[T,C]=s.useState(null),D=T!==null,y=e.findIndex(B=>B.value===a),S=y>=0?e[y]:null,P=s.useCallback(()=>C(null),[]),X=s.useCallback(()=>{u||e.length===0||C(window.matchMedia(St).matches?"popover":"sheet")},[u,e.length]),G=B=>{B.isDisabled||(n(B.value),P())},K=s.useRef(!1);s.useEffect(()=>{var B;K.current&&!D&&((B=k.current)==null||B.focus()),K.current=D},[D]),s.useEffect(()=>{if(T!=="popover")return;const B=J=>{var ee;(ee=N.current)!=null&&ee.contains(J.target)||P()};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[T,P]);const{activeIndex:oe,setActiveIndex:Ge,listRef:xe,handleKeyDown:Ee}=Qt({count:e.length,isOpen:D,initialIndex:y>=0?y:0,onSelect:B=>{const J=e[B];J&&G(J)},onClose:P});s.useEffect(()=>{var B;T==="sheet"&&((B=xe.current)==null||B.focus({preventScroll:!0}))},[T,xe]);const jt=B=>{if(!D){["ArrowDown","ArrowUp","Enter"," "].includes(B.key)&&(B.preventDefault(),X());return}Ee(B)},it=B=>t.jsx("ul",{ref:xe,id:j,role:"listbox","aria-label":r,"aria-activedescendant":B&&e[oe]?x(oe):void 0,tabIndex:B?0:-1,className:f(q.list,B&&q["list--sheet"]),onKeyDown:B?jt:void 0,children:e.map((J,ee)=>{const Qe=J.value===a;return t.jsxs("li",{id:x(ee),role:"option","data-index":ee,"aria-selected":Qe,"aria-disabled":J.isDisabled,className:f(q.option,ee===oe&&q["option--active"],Qe&&q["option--selected"],J.isDisabled&&q["option--disabled"]),onMouseEnter:()=>Ge(ee),onClick:()=>G(J),children:[t.jsx("span",{className:q.option__label,children:J.label}),Qe&&t.jsx(I.CheckLg,{"aria-hidden":!0,className:q.option__check})]},J.value)})});return t.jsxs("span",{ref:N,className:f(q.select,d),"data-testid":p,children:[t.jsxs("button",{ref:k,id:$,type:"button",role:"combobox",className:f(q.trigger,q[`trigger--${_}`],!S&&q["trigger--empty"],D&&q["trigger--open"]),disabled:u,"aria-haspopup":"listbox","aria-expanded":D,"aria-controls":D?j:void 0,"aria-activedescendant":T==="popover"&&e[oe]?x(oe):void 0,"aria-label":r,"aria-describedby":b,"aria-invalid":w,onClick:()=>D?P():X(),onKeyDown:jt,children:[i&&t.jsx("span",{className:q.trigger__icon,"aria-hidden":!0,children:i}),t.jsx("span",{className:q.trigger__value,children:(S==null?void 0:S.label)??m}),t.jsx(I.CaretDownFill,{"aria-hidden":!0,className:f(q.trigger__chevron,D&&q["trigger__chevron--open"])})]}),T==="popover"&&t.jsx("div",{className:f(q.panel,q[`panel--${h}`]),children:it(!1)}),T==="sheet"&&t.jsx(Wt,{title:r,closeLabel:c??(g==null?void 0:g.close),onClose:P,children:it(!0)})]})},zs=s.memo(Hs),Ks="hanui-checkbox-FaFCj",Us="hanui-checkbox__input-nTHne",qs="hanui-checkbox__body-VAEW2",Ys="hanui-checkbox__label-sSNZY",Xs="hanui-checkbox__hint-ish-J",ut={checkbox:Ks,checkbox__input:Us,checkbox__body:qs,checkbox__label:Ys,checkbox__hint:Xs},Gs=s.forwardRef(({label:e,hint:a,className:n,testId:r,...o},c)=>t.jsxs("label",{className:f(ut.checkbox,n),"data-testid":r,children:[t.jsx("input",{ref:c,type:"checkbox",className:ut.checkbox__input,...o}),t.jsxs("span",{className:ut.checkbox__body,children:[t.jsx("span",{className:ut.checkbox__label,children:e}),a&&t.jsx("span",{className:ut.checkbox__hint,children:a})]})]})),Qs=s.memo(A(Gs,"Checkbox")),Js="hanui-switch__input-Q2UQ4",Ws="hanui-switch__label-gPZuO",Zs="hanui-switch__hint-NRuzC",Vs="hanui-switch__track-3417m",er="hanui-switch__thumb-1LHta",tr="hanui-switch__text-32uMY",Ie={switch:"hanui-switch-KLH29",switch__input:Js,"switch--labelFirst":"hanui-switch--labelFirst-Grirk",switch__label:Ws,switch__hint:Zs,switch__track:Vs,switch__thumb:er,switch__text:tr},ar=s.forwardRef(({label:e,hint:a,isLabelFirst:n,className:r,id:o,testId:c,...i},_)=>t.jsxs("label",{className:f(Ie.switch,n&&Ie["switch--labelFirst"],r),"data-testid":c,children:[t.jsx("input",{ref:_,type:"checkbox",role:"switch",id:o,className:Ie.switch__input,...i}),t.jsx("span",{className:Ie.switch__track,"aria-hidden":!0,children:t.jsx("span",{className:Ie.switch__thumb})}),t.jsxs("span",{className:Ie.switch__text,children:[t.jsx("span",{className:Ie.switch__label,children:e}),a&&t.jsx("span",{className:Ie.switch__hint,children:a})]})]})),nr=s.memo(A(ar,"Switch")),sr="hanui-radio-KoZak",rr="hanui-radio__input-gVMgh",or="hanui-radio__body-oZWg6",ir="hanui-radio__label-d-5ce",cr="hanui-radio__hint-baVbs",lr="hanui-radio__count-OtkUM",Ze={radio:sr,radio__input:rr,radio__body:or,radio__label:ir,radio__hint:cr,radio__count:lr},dr=s.forwardRef(({label:e,hint:a,count:n,className:r,testId:o,...c},i)=>t.jsxs("label",{className:f(Ze.radio,r),"data-testid":o,children:[t.jsx("input",{ref:i,type:"radio",className:Ze.radio__input,...c}),t.jsxs("span",{className:Ze.radio__body,children:[t.jsx("span",{className:Ze.radio__label,children:e}),a&&t.jsx("span",{className:Ze.radio__hint,children:a})]}),z.isDefined(n)&&t.jsx("span",{className:Ze.radio__count,children:n})]})),ur=s.memo(A(dr,"Radio")),_r="hanui-radioCard-sndiC",hr="hanui-radioCard__input-6vuoD",pr="hanui-radioCard__indicator--x9LT",mr="hanui-radioCard__body-CFqoi",Ve={radioCard:_r,radioCard__input:hr,"radioCard--selected":"hanui-radioCard--selected-Mi7ee",radioCard__indicator:pr,"radioCard--disabled":"hanui-radioCard--disabled-YlYee",radioCard__body:mr},br=({name:e,value:a,isSelected:n,isDisabled:r,onChange:o,children:c,className:i,id:_,testId:h})=>t.jsxs("label",{className:f(Ve.radioCard,n&&Ve["radioCard--selected"],r&&Ve["radioCard--disabled"],i),"data-testid":h,children:[t.jsx("input",{type:"radio",id:_,name:e,value:a,checked:n,disabled:r,onChange:()=>o(a),className:Ve.radioCard__input}),t.jsx("span",{className:Ve.radioCard__indicator,"aria-hidden":!0}),t.jsx("span",{className:Ve.radioCard__body,children:c})]}),gr=s.memo(br),fr="hanui-range-RpDPh",xr="hanui-range__readout-itDMd",vr="hanui-range__separator-u-ZJX",yr="hanui-range__track-bCh5Y",wr="hanui-range__fill-VXMCE",kr="hanui-range__input-TAN2I",jr="hanui-range__bounds-GIhFd",de={range:fr,"range--disabled":"hanui-range--disabled-13hlc",range__readout:xr,range__separator:vr,range__track:yr,range__fill:wr,range__input:kr,range__bounds:jr},Nr=({min:e,max:a,step:n=1,value:r,onChange:o,onCommit:c,formatValue:i=String,label:_,minLabel:h,maxLabel:u,isDisabled:l,className:d,testId:p})=>{var D,y;const{labels:b}=H(),w=M("RangeSlider.minLabel",h,(D=b==null?void 0:b.range)==null?void 0:D.min),g=M("RangeSlider.maxLabel",u,(y=b==null?void 0:b.range)==null?void 0:y.max),[m,v]=r,$=s.useCallback(S=>o([Math.min(S,v),v]),[v,o]),j=s.useCallback(S=>o([m,Math.max(S,m)]),[m,o]),x=s.useCallback(()=>c==null?void 0:c([m,v]),[m,v,c]),N=a-e,k=N===0?0:z.normalize(m-e,N),T=N===0?0:z.normalize(v-e,N),C=k>50;return t.jsxs("div",{className:f(de.range,l&&de["range--disabled"],d),role:"group","aria-label":_,"data-testid":p,children:[t.jsxs("div",{className:de.range__readout,children:[t.jsx("span",{className:de.range__value,children:i(m)}),t.jsx("span",{className:de.range__separator,"aria-hidden":!0,children:"—"}),t.jsx("span",{className:de.range__value,children:i(v)})]}),t.jsxs("div",{className:de.range__track,children:[t.jsx("span",{className:de.range__fill,style:{left:`${k}%`,right:`${100-T}%`},"aria-hidden":!0}),t.jsx("input",{type:"range",className:de.range__input,style:{zIndex:C?4:3},min:e,max:a,step:n,value:m,disabled:l,"aria-label":`${_} — ${w}`,"aria-valuetext":i(m),onChange:S=>$(Number(S.target.value)),onPointerUp:x,onKeyUp:x}),t.jsx("input",{type:"range",className:de.range__input,style:{zIndex:C?3:4},min:e,max:a,step:n,value:v,disabled:l,"aria-label":`${_} — ${g}`,"aria-valuetext":i(v),onChange:S=>j(Number(S.target.value)),onPointerUp:x,onKeyUp:x})]}),t.jsxs("div",{className:de.range__bounds,"aria-hidden":!0,children:[t.jsx("span",{children:i(e)}),t.jsx("span",{children:i(a)})]})]})},$r=s.memo(Nr),Er="hanui-rating-neNnF",Cr="hanui-rating__legend-uYvFS",Ir="hanui-rating__stars-vJFLk",Dr="hanui-rating__star-BANFJ",Tr="hanui-rating__input-s2iiO",Rr="hanui-rating__srOnly-iSCoz",Sr="hanui-rating__caption-13KFX",ye={rating:Er,"rating--disabled":"hanui-rating--disabled-ZKjHa",rating__legend:Cr,rating__stars:Ir,rating__star:Dr,"rating__star--filled":"hanui-rating__star--filled-L3AkT",rating__input:Tr,rating__srOnly:Rr,rating__caption:Sr},Lr=[1,2,3,4,5],Ar=({value:e,onChange:a,label:n,ratingLabels:r,formatStarCount:o,isDisabled:c,className:i,testId:_})=>{var w;const{labels:h}=H(),u=r??((w=h==null?void 0:h.rating)==null?void 0:w.scale),l=s.useId(),[d,p]=s.useState(null),b=d??e;return t.jsxs("fieldset",{className:f(ye.rating,c&&ye["rating--disabled"],i),disabled:c,"data-testid":_,children:[t.jsx("legend",{className:ye.rating__legend,children:n}),t.jsx("div",{className:ye.rating__stars,onMouseLeave:()=>p(null),children:Lr.map(g=>{var m;return t.jsxs("label",{className:f(ye.rating__star,b!==null&&g<=b&&ye["rating__star--filled"]),onMouseEnter:()=>p(g),children:[t.jsx("input",{type:"radio",name:l,value:g,checked:e===g,onChange:()=>a(g),className:ye.rating__input}),t.jsx(I.StarFill,{"aria-hidden":!0}),t.jsxs("span",{className:ye.rating__srOnly,children:[Tt("RatingInput.formatStarCount",o??((m=h==null?void 0:h.rating)==null?void 0:m.starCount),g)," ","— ",(u==null?void 0:u[g])??""]})]},g)})}),b!==null&&t.jsx("span",{className:ye.rating__caption,"aria-hidden":!0,children:(u==null?void 0:u[b])??""})]})},Fr=s.memo(Ar),Mr="hanui-stepper-8s5Ih",Br="hanui-stepper__button-h6g7d",Pr="hanui-stepper__input-OQh5v",_t={stepper:Mr,stepper__button:Br,stepper__input:Pr,"stepper--sm":"hanui-stepper--sm-RvrBP","stepper--md":"hanui-stepper--md-Cnjei"},Or=({value:e,onChange:a,label:n,decreaseLabel:r,increaseLabel:o,min:c=1,max:i=99,isDisabled:_,size:h="md",className:u,testId:l})=>{var m,v,$;const{labels:d}=H(),p=M("QuantityStepper.label",n,(m=d==null?void 0:d.quantity)==null?void 0:m.label),[b,w]=s.useState(null),g=j=>{w(null);const x=Number(j.replace(/\D/g,""));x&&a(Math.min(Math.max(x,c),i))};return t.jsxs("div",{className:f(_t.stepper,_t[`stepper--${h}`],u),role:"group","aria-label":p,"data-testid":l,children:[t.jsx("button",{type:"button",className:_t.stepper__button,onClick:()=>a(Math.max(e-1,c)),disabled:_||e<=c,"aria-label":M("QuantityStepper.decreaseLabel",r,(v=d==null?void 0:d.quantity)==null?void 0:v.decrease),children:t.jsx(I.DashLg,{"aria-hidden":!0})}),t.jsx("input",{className:_t.stepper__input,value:b??String(e),onChange:j=>w(j.target.value.replace(/\D/g,"").slice(0,2)),onBlur:j=>g(j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),g(j.target.value))},inputMode:"numeric",disabled:_,"aria-label":`${p} (${c}-${i})`}),t.jsx("button",{type:"button",className:_t.stepper__button,onClick:()=>a(Math.min(e+1,i)),disabled:_||e>=i,"aria-label":M("QuantityStepper.increaseLabel",o,($=d==null?void 0:d.quantity)==null?void 0:$.increase),children:t.jsx(I.PlusLg,{"aria-hidden":!0})})]})},Hr=s.memo(Or),zr="hanui-checkbox--dvpB",Kr={checkbox:zr},Ur=s.forwardRef(({label:e,className:a,testId:n,...r},o)=>t.jsx("input",{ref:o,type:"checkbox","aria-label":e,className:f(Kr.checkbox,a),"data-testid":n,...r})),qr=s.memo(A(Ur,"TableCheckbox")),Yr="hanui-wrapper-IAI4E",Xr="hanui-wrapper__prefix-XKDlV",Gr="hanui-wrapper__suffix-lT35q",Qr="hanui-input-pIS2u",Be={wrapper:Yr,wrapper__prefix:Xr,wrapper__suffix:Gr,input:Qr,"input--hasPrefix":"hanui-input--hasPrefix-nsrWh","input--hasSuffix":"hanui-input--hasSuffix-OrE5A","input--technical":"hanui-input--technical---DCD"},Jr=s.forwardRef(({prefix:e,suffix:a,isTechnical:n,className:r,testId:o,...c},i)=>t.jsxs("span",{className:f(Be.wrapper,r),children:[e&&t.jsx("span",{className:Be.wrapper__prefix,"aria-hidden":!0,children:e}),t.jsx("input",{ref:i,className:f(Be.input,!!e&&Be["input--hasPrefix"],!!a&&Be["input--hasSuffix"],n&&Be["input--technical"]),"data-testid":o,...c}),a&&t.jsx("span",{className:Be.wrapper__suffix,"aria-hidden":!0,children:a})]})),Sa=s.memo(A(Jr,"Input")),Wr="hanui-tagInput-QraZR",Zr="hanui-tagInput__field-HeWrC",Vr="hanui-tagInput__tag-D-ZWB",eo="hanui-tagInput__remove-bpjGG",Pe={tagInput:Wr,tagInput__field:Zr,"tagInput--invalid":"hanui-tagInput--invalid-NQogL","tagInput--disabled":"hanui-tagInput--disabled--AJFF",tagInput__tag:Vr,"tagInput__tag--duplicate":"hanui-tagInput__tag--duplicate-3-FMF",tagInput__remove:eo},to=({values:e,onChange:a,label:n,placeholder:r,removeLabel:o,separators:c=["Enter",","],maxTags:i,isDisabled:_,id:h,className:u,testId:l,"aria-describedby":d,"aria-invalid":p})=>{const b=s.useId(),w=h??b,g=s.useRef(null),m=Rt(),[v,$]=s.useState(""),[j,x]=s.useState(null),N=i!==void 0&&e.length>=i,k=D=>{const y=D.trim();if(y!==""){if(e.includes(y)){x(y),window.setTimeout(()=>x(null),1e3),m(`${y} zaten ekli`,"assertive"),$("");return}N||(a([...e,y]),$(""),m(`${y} eklendi`))}},T=D=>{a(e.filter(y=>y!==D)),m(`${D} kaldırıldı`)},C=D=>{if(c.includes(D.key)){D.preventDefault(),k(v);return}D.key==="Backspace"&&v===""&&e.length>0&&T(e[e.length-1])};return t.jsxs("div",{className:f(Pe.tagInput,_&&Pe["tagInput--disabled"],p&&Pe["tagInput--invalid"],u),"data-testid":l,onClick:()=>{var D;return(D=g.current)==null?void 0:D.focus()},children:[e.map(D=>t.jsxs("span",{className:f(Pe.tagInput__tag,j===D&&Pe["tagInput__tag--duplicate"]),children:[D,t.jsx("button",{type:"button",className:Pe.tagInput__remove,"aria-label":`${D} — ${o}`,disabled:_,onClick:y=>{y.stopPropagation(),T(D)},children:t.jsx(I.XLg,{"aria-hidden":!0})})]},D)),t.jsx("input",{ref:g,id:w,type:"text",className:Pe.tagInput__field,value:v,placeholder:e.length===0?r:void 0,"aria-label":n,"aria-describedby":d,"aria-invalid":p,disabled:_||N,onChange:D=>$(D.target.value),onKeyDown:C,onBlur:()=>k(v)})]})},ao=s.memo(A(to,"TagInput")),no="hanui-textarea-zwJcB",so="hanui-wrapper-O8aJA",ro="hanui-counter-bHVh3",ht={textarea:no,wrapper:so,"textarea--autoSize":"hanui-textarea--autoSize--F8yj",counter:ro,"counter--near":"hanui-counter--near-AZAQm"},oo=s.forwardRef(({className:e,rows:a=4,isAutoSize:n,maxRows:r=12,hasCounter:o,maxLength:c,value:i,defaultValue:_,onChange:h,testId:u,...l},d)=>{const p=s.useRef(null),[b,w]=s.useState(String(_??"").length),g=i===void 0?b:String(i).length,m=s.useCallback($=>{p.current=$,typeof d=="function"?d($):d&&(d.current=$)},[d]);s.useLayoutEffect(()=>{const $=p.current;if(!n||!$)return;$.style.height="auto";const x=(Number.parseFloat(getComputedStyle($).lineHeight)||20)*r;$.style.height=`${Math.min($.scrollHeight,x)}px`,$.style.overflowY=$.scrollHeight>x?"auto":"hidden"},[n,r,i,g]);const v=c!==void 0&&g>=c*.9;return t.jsxs("div",{className:f(ht.wrapper,e),"data-testid":u,children:[t.jsx("textarea",{ref:m,rows:a,className:f(ht.textarea,n&&ht["textarea--autoSize"]),maxLength:c,value:i,defaultValue:_,onChange:$=>{w($.target.value.length),h==null||h($)},...l}),o&&c!==void 0&&t.jsxs("span",{className:f(ht.counter,v&&ht["counter--near"]),"aria-hidden":!0,children:[g," / ",c]})]})}),La=s.memo(A(oo,"Textarea")),io="hanui-dateField-UnUwe",co="hanui-range-nGuRH",lo="hanui-range__row--debA",uo="hanui-range__separator-fEqqr",_o="hanui-range__field-tmoNH",ho="hanui-range__summary-L6v1T",Ue={dateField:io,range:co,range__row:lo,range__separator:uo,range__field:_o,range__summary:ho},qt=s.forwardRef(({type:e="date",className:a,testId:n,...r},o)=>t.jsx("input",{ref:o,type:e,className:f(Ue.dateField,a),"data-testid":n,...r})),po=s.memo(A(qt,"DateField")),mo=({value:e,onChange:a,startLabel:n,endLabel:r,separator:o="–",min:c,max:i,isSummaryVisible:_,isDisabled:h,className:u,testId:l})=>{const{labels:d}=H(),p=(()=>{if(!_||!(d!=null&&d.locale)||e.start===""||e.end==="")return null;try{const b=new Intl.DateTimeFormat(d.locale,{dateStyle:"medium"});return`${b.format(new Date(e.start))} ${o} ${b.format(new Date(e.end))}`}catch{return null}})();return t.jsxs("div",{className:f(Ue.range,u),"data-testid":l,children:[t.jsxs("div",{className:Ue.range__row,children:[t.jsx(qt,{className:Ue.range__field,"aria-label":n,value:e.start,min:c,max:e.end||i,disabled:h,onChange:b=>a({...e,start:b.target.value})}),t.jsx("span",{className:Ue.range__separator,"aria-hidden":!0,children:o}),t.jsx(qt,{className:Ue.range__field,"aria-label":r,value:e.end,min:e.start||c,max:i,disabled:h,onChange:b=>a({...e,end:b.target.value})})]}),p&&t.jsx("span",{className:Ue.range__summary,children:p})]})},bo=A(s.memo(mo),"DateRange"),go="hanui-field-KKvre",fo="hanui-field__label-9dlYd",xo="hanui-field__required-hbDJk",vo="hanui-field__srOnly-2WQFH",yo="hanui-field__hint-SQPiL",wo="hanui-field__error-gLlZ-",ko="hanui-field__errorIcon-uA3o8",De={field:go,field__label:fo,"field__label--hidden":"hanui-field__label--hidden-ufuVt",field__required:xo,field__srOnly:vo,field__hint:yo,field__error:wo,field__errorIcon:ko},jo=({label:e,children:a,hint:n,error:r,isRequired:o,requiredLabel:c,isLabelHidden:i,className:_})=>{const{labels:h}=H(),u=s.useId(),l=`${u}-error`,d=`${u}-hint`;return t.jsxs("div",{className:f(De.field,_),children:[t.jsxs("label",{htmlFor:u,className:f(De.field__label,i&&De["field__label--hidden"]),children:[e,o&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:De.field__required,"aria-hidden":!0,children:"*"}),t.jsx("span",{className:De.field__srOnly,children:M("Field.requiredLabel",c,h==null?void 0:h.required)})]})]}),a({id:u,required:o||void 0,"aria-invalid":r?!0:void 0,"aria-describedby":[r&&l,n&&d].filter(Boolean).join(" ")||void 0}),r&&t.jsxs("p",{id:l,className:De.field__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0,className:De.field__errorIcon}),r]}),n&&t.jsx("p",{id:d,className:De.field__hint,children:n})]})},Aa=s.memo(jo),No="hanui-progress-99MrX",$o="hanui-progress__track-Qbp9t",Eo="hanui-progress__fill-Bam55",Co="hanui-progress__value-3FYxj",Io="hanui-circle-9cn2w",Do="hanui-circle__svg-0IwkR",To="hanui-circle__track-zY2qc",Ro="hanui-circle__fill-Jbde6",So="hanui-circle__label-A3nJB",V={progress:No,progress__track:$o,"progress__track--sm":"hanui-progress__track--sm-dbHZq","progress__track--md":"hanui-progress__track--md-v1GdW","progress__track--indeterminate":"hanui-progress__track--indeterminate-8fMxl",progress__fill:Eo,"hanui-progress-slide":"hanui-hanui-progress-slide-DQi2w","progress__fill--success":"hanui-progress__fill--success-IFuI5","progress__fill--warning":"hanui-progress__fill--warning-wIhgi","progress__fill--danger":"hanui-progress__fill--danger-cuqj0",progress__value:Co,circle:Io,circle__svg:Do,circle__track:To,circle__fill:Ro,"circle__fill--success":"hanui-circle__fill--success-HTr0m","circle__fill--warning":"hanui-circle__fill--warning-Fkgj2","circle__fill--danger":"hanui-circle__fill--danger-4E3Z8","circle--indeterminate":"hanui-circle--indeterminate-cITY6","hanui-spin":"hanui-hanui-spin-ez3g8",circle__label:So},Fa=(e,a)=>!Number.isFinite(e)||!Number.isFinite(a)||a<=0?0:Math.min(100,Math.max(0,e/a*100)),Lo=({value:e,max:a=100,label:n,valueText:r,isValueVisible:o,tone:c="brand",size:i="md",className:_,testId:h})=>{const u=e===void 0,l=u?0:Fa(e,a);return t.jsxs("div",{className:f(V.progress,_),"data-testid":h,children:[t.jsx("div",{role:"progressbar","aria-label":n,"aria-valuenow":u?void 0:Math.round(l),"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:100,"aria-valuetext":u?void 0:r,className:f(V.progress__track,V[`progress__track--${i}`],u&&V["progress__track--indeterminate"]),children:t.jsx("span",{className:f(V.progress__fill,V[`progress__fill--${c}`]),style:u?void 0:{inlineSize:`${l}%`}})}),o&&!u&&t.jsx("span",{className:V.progress__value,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},Ma=s.memo(A(Lo,"Progress")),Ao=({value:e,max:a=100,label:n,valueText:r,isValueVisible:o,tone:c="brand",size:i=44,className:_,testId:h})=>{const u=e===void 0,l=u?25:Fa(e,a),d=Math.max(3,Math.round(i*.1)),p=(i-d)/2,b=2*Math.PI*p;return t.jsxs("div",{className:f(V.circle,u&&V["circle--indeterminate"],_),style:{width:i,height:i},"data-testid":h,children:[t.jsxs("svg",{className:V.circle__svg,width:i,height:i,viewBox:`0 0 ${i} ${i}`,role:"progressbar","aria-label":n,"aria-valuenow":u?void 0:Math.round(l),"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:100,"aria-valuetext":u?void 0:r,children:[t.jsx("circle",{className:V.circle__track,cx:i/2,cy:i/2,r:p,fill:"none",strokeWidth:d}),t.jsx("circle",{className:f(V.circle__fill,V[`circle__fill--${c}`]),cx:i/2,cy:i/2,r:p,fill:"none",strokeWidth:d,strokeDasharray:b,strokeDashoffset:b*(1-l/100)})]}),o&&!u&&t.jsx("span",{className:V.circle__label,"aria-hidden":!0,children:r??`%${Math.round(l)}`})]})},Fo=A(s.memo(Ao),"ProgressCircle"),Mo="hanui-upload-v1pRY",Bo="hanui-upload__drop-OpNbO",Po="hanui-upload__input-Tcg9-",Oo="hanui-upload__icon-KpMkq",Ho="hanui-upload__label-M4HJb",zo="hanui-upload__drag-ewSQw",Ko="hanui-upload__hint-MZRJ6",Uo="hanui-upload__error-7GkCC",qo="hanui-upload__list-lbViQ",Yo="hanui-upload__file-Znp1Q",Xo="hanui-upload__fileText-EtJcs",Go="hanui-upload__fileName-ArF8-",Qo="hanui-upload__fileMeta-i6sO1",Jo="hanui-upload__progress-JY2a5",Y={upload:Mo,upload__drop:Bo,upload__input:Po,"upload__drop--dragging":"hanui-upload__drop--dragging-YztUx","upload__drop--invalid":"hanui-upload__drop--invalid-JhwnL","upload__drop--disabled":"hanui-upload__drop--disabled-zyfUv",upload__icon:Oo,upload__label:Ho,upload__drag:zo,upload__hint:Ko,upload__error:Uo,upload__list:qo,upload__file:Yo,"upload__file--error":"hanui-upload__file--error-wpbtA",upload__fileText:Xo,upload__fileName:Go,upload__fileMeta:Qo,upload__progress:Jo},ma=e=>e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`,Wo=({files:e,onSelect:a,onRemove:n,label:r,hint:o,accept:c,isMultiple:i,maxSize:_,removeLabel:h,dropLabel:u,sizeErrorText:l="{name} çok büyük (en fazla {max}).",isDisabled:d,error:p,children:b,className:w,testId:g})=>{const m=s.useId(),v=s.useId(),$=s.useRef(null),j=Rt(),[x,N]=s.useState(!1),[k,T]=s.useState([]),C=y=>{if(!y||y.length===0)return;const S=[...y],P=_===void 0?[]:S.filter(K=>K.size>_),X=S.filter(K=>!P.includes(K)),G=P.map(K=>l.replace("{name}",K.name).replace("{max}",ma(_??0)));T(G),X.length>0&&(a(X),j(`${X.length} dosya eklendi`)),G.length>0&&j(G.join(" "),"assertive")},D=y=>{y.preventDefault(),N(!1),!d&&C(y.dataTransfer.files)};return t.jsxs("div",{className:f(Y.upload,w),"data-testid":g,children:[t.jsxs("label",{htmlFor:m,className:f(Y.upload__drop,x&&Y["upload__drop--dragging"],d&&Y["upload__drop--disabled"],p&&Y["upload__drop--invalid"]),onDragOver:y=>{y.preventDefault(),d||N(!0)},onDragLeave:()=>N(!1),onDrop:D,children:[t.jsx(I.CloudArrowUpFill,{"aria-hidden":!0,className:Y.upload__icon}),t.jsx("span",{className:Y.upload__label,children:r}),t.jsx("span",{className:Y.upload__drag,children:u}),o&&t.jsx("span",{id:v,className:Y.upload__hint,children:o}),t.jsx("input",{ref:$,id:m,type:"file",className:Y.upload__input,accept:c,multiple:i,disabled:d,"aria-describedby":o?v:void 0,"aria-invalid":p?!0:void 0,onChange:y=>{C(y.target.files),y.target.value=""}})]}),p&&t.jsxs("p",{className:Y.upload__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),p]}),k.map(y=>t.jsxs("p",{className:Y.upload__error,role:"alert",children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),y]},y)),e.length>0&&t.jsx("ul",{className:Y.upload__list,children:e.map(y=>t.jsxs("li",{className:f(Y.upload__file,y.error&&Y["upload__file--error"]),children:[t.jsxs("span",{className:Y.upload__fileText,children:[t.jsx("span",{className:Y.upload__fileName,children:y.name}),t.jsx("span",{className:Y.upload__fileMeta,children:y.error??ma(y.size)})]}),y.progress!==void 0&&t.jsx(Ma,{value:y.progress,label:`${y.name} yükleniyor`,size:"sm",className:Y.upload__progress}),t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:`${y.name} — ${h}`,variant:"ghost",size:"sm",onClick:()=>n(y.id)})]},y.id))}),b]})},Zo=s.memo(A(Wo,"FileUpload")),Vo="hanui-alert-gHI-9",ei="hanui-alert__icon-DhiCT",ti="hanui-alert__body-52-z2",ai="hanui-alert__title-I8BAh",ni="hanui-alert__content-lhBEo",si="hanui-alert__action-1mTje",Oe={alert:Vo,alert__icon:ei,alert__body:ti,alert__title:ai,alert__content:ni,alert__action:si,"alert--info":"hanui-alert--info-lsAVw","alert--success":"hanui-alert--success-RMJR6","alert--warning":"hanui-alert--warning-Rkgln","alert--danger":"hanui-alert--danger-9ei0Y"},ri={info:t.jsx(I.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(I.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(I.XCircleFill,{"aria-hidden":!0})},oi=({children:e,tone:a="info",title:n,action:r,className:o,testId:c})=>t.jsxs("div",{className:f(Oe.alert,Oe[`alert--${a}`],o),role:a==="danger"||a==="warning"?"alert":void 0,"data-testid":c,children:[t.jsx("span",{className:Oe.alert__icon,children:ri[a]}),t.jsxs("div",{className:Oe.alert__body,children:[n&&t.jsx("strong",{className:Oe.alert__title,children:n}),t.jsx("div",{className:Oe.alert__content,children:e})]}),r&&t.jsx("div",{className:Oe.alert__action,children:r})]}),ii=s.memo(oi),ci="hanui-avatar-qoh3P",li="hanui-avatar__image-uAyAX",Et={avatar:ci,avatar__image:li,"avatar--sm":"hanui-avatar--sm-GGjU4","avatar--md":"hanui-avatar--md-xhXnK","avatar--lg":"hanui-avatar--lg-ULP-r","avatar--tone-0":"hanui-avatar--tone-0-mvjdw","avatar--tone-1":"hanui-avatar--tone-1-RYZOX","avatar--tone-2":"hanui-avatar--tone-2-vP-CS","avatar--tone-3":"hanui-avatar--tone-3-ivgnI","avatar--tone-4":"hanui-avatar--tone-4-V57r3","avatar--tone-5":"hanui-avatar--tone-5-65aPg"},di=(e,a)=>{const n=e.trim().split(/\s+/).filter(Boolean);if(n.length===0)return"?";const r=n.length===1?n[0].slice(0,2):`${n[0][0]}${n[n.length-1][0]}`;return a?r.toLocaleUpperCase(a):r.toLocaleUpperCase()},ui=(e,a)=>{let n=5381;for(let r=0;r<e.length;r+=1)n=n*33^e.charCodeAt(r);return Math.abs(n)%a},_i=6,hi=({name:e,imageUrl:a,locale:n,size:r="md",className:o,testId:c})=>{const{labels:i}=H();return t.jsx("span",{className:f(Et.avatar,Et[`avatar--${r}`],!a&&Et[`avatar--tone-${ui(e,_i)}`],o),"aria-hidden":!0,"data-testid":c,children:a?t.jsx("img",{className:Et.avatar__image,src:a,alt:""}):di(e,n??(i==null?void 0:i.locale))})},pi=s.memo(hi),mi="hanui-badge-uLAaI",bi="hanui-badge__icon-R2goZ",Ct={badge:mi,badge__icon:bi,"badge--neutral":"hanui-badge--neutral-6kddt","badge--soft":"hanui-badge--soft-gFeRF","badge--solid":"hanui-badge--solid-rtdHI","badge--outline":"hanui-badge--outline-QiAAz","badge--success":"hanui-badge--success-Oj11F","badge--danger":"hanui-badge--danger-X3nV0","badge--warning":"hanui-badge--warning-vAsx2","badge--info":"hanui-badge--info-mHOwk","badge--oem":"hanui-badge--oem-Nl-VX","badge--alt":"hanui-badge--alt-gQkww","badge--sale":"hanui-badge--sale-Li1tG","badge--action":"hanui-badge--action-7pUio","badge--link":"hanui-badge--link-zcNJZ"},gi=({children:e,tone:a="neutral",variant:n="soft",icon:r,className:o,testId:c})=>t.jsxs("span",{className:f(Ct.badge,Ct[`badge--${a}`],Ct[`badge--${n}`],o),"data-testid":c,children:[r&&t.jsx("span",{className:Ct.badge__icon,children:r}),e]}),fi=s.memo(gi),xi="hanui-breadcrumb-amB9n",vi="hanui-breadcrumb__item-Icv1S",yi="hanui-breadcrumb__link-eVkPq",wi="hanui-breadcrumb__current-8XjhU",ki="hanui-breadcrumb__separator-vvaUi",pt={breadcrumb:xi,breadcrumb__item:vi,breadcrumb__link:yi,breadcrumb__current:wi,breadcrumb__separator:ki},ji=({items:e,label:a,linkProps:n,className:r,testId:o})=>{const{labels:c}=H();return t.jsx("nav",{className:r,"aria-label":M("Breadcrumb.label",a,c==null?void 0:c.breadcrumb),"data-testid":o,children:t.jsx("ol",{className:f(pt.breadcrumb),children:e.map((i,_)=>{const h=_===e.length-1;return t.jsxs("li",{className:pt.breadcrumb__item,children:[i.href&&!h?t.jsx(fe,{href:i.href,className:pt.breadcrumb__link,...n,children:i.label}):t.jsx("span",{className:pt.breadcrumb__current,"aria-current":"page",children:i.label}),!h&&t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:pt.breadcrumb__separator})]},`${i.label}-${_}`)})})})},Ni=s.memo(ji),$i="hanui-card-CaHUG",Ei="hanui-media__frame-eBv-s",Ci="hanui-media-eggk5",Ii="hanui-media__link-ujyVV",Di="hanui-overlay-AVMTX",Ti="hanui-body-DyI-6",Ri="hanui-footer-2WNCZ",me={card:$i,"card--interactive":"hanui-card--interactive-C1pXZ",media__frame:Ei,media:Ci,media__link:Ii,"media__frame--contained":"hanui-media__frame--contained-Nv9gh",overlay:Di,"overlay--top-left":"hanui-overlay--top-left-td1xA","overlay--top-right":"hanui-overlay--top-right-GqD9H","overlay--bottom-left":"hanui-overlay--bottom-left-T5Quw","overlay--bottom-right":"hanui-overlay--bottom-right-za3z3",body:Ti,footer:Ri},Si=({children:e,isInteractive:a,as:n="div",className:r,testId:o})=>t.jsx(n,{className:f(me.card,a&&me["card--interactive"],r),"data-testid":o,children:e}),Li=A(s.memo(({children:e,ratio:a=1,href:n,linkProps:r,isContained:o=!0,className:c})=>{const i=t.jsx("span",{className:f(me.media__frame,o&&me["media__frame--contained"]),style:{aspectRatio:a},children:e});return t.jsx("div",{className:f(me.media,c),children:n?t.jsx(fe,{href:n,className:me.media__link,tabIndex:-1,"aria-hidden":!0,...r,children:i}):i})}),"CardMedia"),Ai=A(s.memo(({children:e,position:a="top-left",className:n})=>t.jsx("div",{className:f(me.overlay,me[`overlay--${a}`],n),children:e})),"CardOverlay"),Fi=A(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(me.body,a),children:e})),"CardBody"),Mi=A(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(me.footer,a),children:e})),"CardFooter"),Bi=s.memo(Si),Pi="hanui-carousel-GJXkW",Oi="hanui-carousel__controls-hm5ij",Hi="hanui-carousel__arrowIcon-adFey",zi="hanui-carousel__track-mAux5",Ki="hanui-carousel__dots-iU8RJ",Ui="hanui-carousel__dot-JTLCB",Te={carousel:Pi,carousel__controls:Oi,carousel__arrowIcon:Hi,carousel__track:zi,carousel__dots:Ki,carousel__dot:Ui,"carousel__dot--active":"hanui-carousel__dot--active-riNMm"},qi=({children:e,label:a,previousLabel:n,nextLabel:r,formatDotLabel:o,itemMinWidth:c=240,className:i,testId:_})=>{const h=s.useRef(null),[u,l]=s.useState(!1),[d,p]=s.useState(!1),[b,w]=s.useState(0),[g,m]=s.useState(1),[v,$]=s.useState(!1),j=s.useCallback(()=>{const N=h.current;if(!N)return;const{scrollLeft:k,scrollWidth:T,clientWidth:C}=N;l(k>1),p(k+C<T-1),w(C>0?Math.round(k/C):0),m(C>0?Math.max(1,Math.ceil(T/C)):1),$(T>C&&N.querySelector("a, button, input, select, textarea, [tabindex]")===null)},[]);s.useEffect(()=>{const N=h.current;if(!N)return;j(),N.addEventListener("scroll",j,{passive:!0});const k=typeof ResizeObserver>"u"?null:new ResizeObserver(j);return k==null||k.observe(N),()=>{N.removeEventListener("scroll",j),k==null||k.disconnect()}},[j,e]);const x=N=>{var k;return(k=h.current)==null?void 0:k.scrollBy({left:N*h.current.clientWidth,behavior:"smooth"})};return t.jsxs("section",{className:f(Te.carousel,i),"aria-label":a,"data-testid":_,children:[t.jsxs("div",{className:Te.carousel__controls,children:[t.jsx(ge,{icon:t.jsx(I.CaretLeftFill,{"aria-hidden":!0,className:Te.carousel__arrowIcon}),label:n,variant:"outline",size:"sm",disabled:!u,onClick:()=>x(-1)}),t.jsx(ge,{icon:t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:Te.carousel__arrowIcon}),label:r,variant:"outline",size:"sm",disabled:!d,onClick:()=>x(1)})]}),t.jsx("div",{ref:h,className:Te.carousel__track,style:{"--hanui-carousel-item":`${c}px`},tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?a:void 0,children:e}),o&&g>1&&t.jsx("div",{className:Te.carousel__dots,children:Array.from({length:g},(N,k)=>t.jsx("button",{type:"button",className:f(Te.carousel__dot,k===b&&Te["carousel__dot--active"]),"aria-label":o(k+1,g),"aria-current":k===b?"true":void 0,onClick:()=>{var T;return(T=h.current)==null?void 0:T.scrollTo({left:k*h.current.clientWidth,behavior:"smooth"})}},k))})]})},Yi=s.memo(A(qi,"Carousel")),Xi="hanui-copy-Yht5s",Gi="hanui-copy__code-CYlCA",Qi="hanui-copy__button-GDdH6",Ji="hanui-copy__srOnly-WMTNN",et={copy:Xi,"copy--sm":"hanui-copy--sm-Tjqws",copy__code:Gi,"copy--md":"hanui-copy--md-00rhU",copy__button:Qi,"copy__button--done":"hanui-copy__button--done-MujUR",copy__srOnly:Ji},Wi=1600,Zi=({value:e,copyLabel:a,copiedLabel:n,copiedAnnouncement:r,size:o="sm",isReadOnly:c,className:i,testId:_})=>{var g,m,v;const{labels:h}=H(),[u,l]=s.useState(!1),d=s.useRef(null),p=s.useRef(void 0);s.useEffect(()=>()=>window.clearTimeout(p.current),[]);const b=s.useCallback(()=>{const $=d.current;if(!$)return;const j=document.createRange();j.selectNodeContents($);const x=window.getSelection();x==null||x.removeAllRanges(),x==null||x.addRange(j)},[]),w=s.useCallback(async()=>{try{await navigator.clipboard.writeText(e),l(!0),p.current=window.setTimeout(()=>l(!1),Wi)}catch{b()}},[e,b]);return t.jsxs("span",{className:f(et.copy,et[`copy--${o}`],i),"data-testid":_,children:[t.jsx("span",{className:et.copy__code,ref:d,children:e}),!c&&t.jsx("button",{type:"button",className:f(et.copy__button,u&&et["copy__button--done"]),onClick:w,"aria-label":u?n??Tt("CopyField.copiedLabel",(g=h==null?void 0:h.copyField)==null?void 0:g.copied,e):a??Tt("CopyField.copyLabel",(m=h==null?void 0:h.copyField)==null?void 0:m.copy,e),children:u?t.jsx(I.ClipboardCheckFill,{"aria-hidden":!0}):t.jsx(I.ClipboardFill,{"aria-hidden":!0})}),t.jsx("span",{"aria-live":"polite",className:et.copy__srOnly,children:u?M("CopyField.copiedAnnouncement",r,(v=h==null?void 0:h.copyField)==null?void 0:v.announcement):""})]})},Vi=s.memo(Zi),ec="hanui-divider-RJqCw",tc="hanui-divider__label-M8sBA",It={divider:ec,"divider--labelled":"hanui-divider--labelled-jZH1-",divider__label:tc},ac=({label:e,className:a})=>e?t.jsx("div",{className:f(It.divider,It["divider--labelled"],a),children:t.jsx("span",{className:It.divider__label,children:e})}):t.jsx("hr",{className:f(It.divider,a)}),nc=s.memo(ac),sc="hanui-directory-badEd",rc="hanui-group-i6An9",oc="hanui-group__header-rc19c",ic="hanui-group__label-vQTcs",cc="hanui-group__link-es5V7",lc="hanui-group__meta-LtC-u",dc="hanui-group__list-YxBCG",uc="hanui-row-3LH7X",_c="hanui-row__name-75Wbq",hc="hanui-row__media-AxZEh",pc="hanui-row__marker-RYHb-",mc="hanui-jump-vpGwB",bc="hanui-jump__link-rRnT6",se={directory:sc,group:rc,group__header:oc,group__label:ic,group__link:cc,group__meta:lc,group__list:dc,row:uc,row__name:_c,row__media:hc,row__marker:pc,jump:mc,jump__link:bc},gc=({children:e,className:a})=>t.jsx("div",{className:f(se.directory,a),children:e}),fc=A(s.memo(({label:e,href:a,linkProps:n,meta:r,children:o,id:c})=>t.jsxs("section",{className:se.group,id:c,children:[t.jsxs("header",{className:se.group__header,children:[t.jsx("h2",{className:se.group__label,children:a?t.jsx(fe,{href:a,className:se.group__link,...n,children:e}):e}),r&&t.jsx("span",{className:se.group__meta,children:r})]}),t.jsx("ul",{className:se.group__list,children:o})]})),"DirectoryGroup"),xc=A(s.memo(({href:e,name:a,media:n,marker:r,linkProps:o,className:c})=>t.jsx("li",{children:t.jsxs(fe,{href:e,className:f(se.row,c),...o,children:[n&&t.jsx("span",{className:se.row__media,children:n}),t.jsx("span",{className:se.row__name,children:a}),r&&t.jsx("span",{className:se.row__marker,children:r})]})})),"DirectoryRow"),vc=A(s.memo(({labels:e,toId:a,label:n})=>{const{labels:r}=H();return t.jsx("nav",{className:se.jump,"aria-label":M("DirectoryJump.label",n,r==null?void 0:r.directoryJump),children:e.map(o=>t.jsx("a",{href:`#${a(o)}`,className:se.jump__link,children:o},o))})}),"DirectoryJump"),yc=s.memo(gc),wc="hanui-empty-47qZR",kc="hanui-empty__icon-okfEc",jc="hanui-empty__title-Z7Dzd",Nc="hanui-empty__description-6BoCk",$c="hanui-empty__actions-ARk-k",He={empty:wc,empty__icon:kc,empty__title:jc,empty__description:Nc,empty__actions:$c,"empty--sm":"hanui-empty--sm-QXaXx","empty--error":"hanui-empty--error-4BBgp"},Ec=({title:e,description:a,icon:n,action:r,secondaryAction:o,tone:c="empty",size:i="md",className:_,testId:h})=>t.jsxs("div",{className:f(He.empty,He[`empty--${i}`],He[`empty--${c}`],_),role:c==="error"?"alert":void 0,"data-testid":h,children:[n&&t.jsx("span",{className:He.empty__icon,children:n}),t.jsx("h3",{className:He.empty__title,children:e}),a&&t.jsx("p",{className:He.empty__description,children:a}),(r||o)&&t.jsxs("div",{className:He.empty__actions,children:[r,o]})]}),Cc=s.memo(Ec),Ic="hanui-header-yJwus",Dc="hanui-header__top-UK4si",Tc="hanui-header__breadcrumb-A2j0i",Rc="hanui-header__text-HIo8U",Sc="hanui-header__eyebrow-dZ9Zc",Lc="hanui-header__titleRow-KgDZj",Ac="hanui-header__title-s1giF",Fc="hanui-header__meta-UxuaD",Mc="hanui-header__description-NXbbC",Bc="hanui-header__actions-aShpt",he={header:Ic,header__top:Dc,header__breadcrumb:Tc,header__text:Rc,header__eyebrow:Sc,header__titleRow:Lc,header__title:Ac,header__meta:Fc,header__description:Mc,header__actions:Bc},Pc=({title:e,eyebrow:a,description:n,actions:r,breadcrumb:o,meta:c,children:i,as:_="h1",className:h,testId:u})=>t.jsxs("header",{className:f(he.header,h),"data-testid":u,children:[o&&t.jsx("div",{className:he.header__breadcrumb,children:o}),t.jsxs("div",{className:he.header__top,children:[t.jsxs("div",{className:he.header__text,children:[a&&t.jsx("span",{className:he.header__eyebrow,children:a}),t.jsxs("div",{className:he.header__titleRow,children:[t.jsx(_,{className:he.header__title,children:e}),c&&t.jsx("span",{className:he.header__meta,children:c})]}),n&&t.jsx("p",{className:he.header__description,children:n})]}),r&&t.jsx("div",{className:he.header__actions,children:r})]}),i]}),Oc=s.memo(Pc),Hc="hanui-panel-Sv-1m",zc="hanui-panel__header-ysexh",Kc="hanui-panel__heading-xLCsB",Uc="hanui-panel__icon--yPQT",qc="hanui-panel__headingText--XqxW",Yc="hanui-panel__title-6-6uC",Xc="hanui-panel__description-qXTSM",Gc="hanui-panel__actions-Ra-zy",Qc="hanui-panel__body-lo5aX",Jc="hanui-panel__footer-qLpR1",Wc="hanui-panel__footerInner-r6VQI",Zc="hanui-form-o9UqJ",Vc="hanui-row-vUGpa",Q={panel:Hc,panel__header:zc,panel__heading:Kc,panel__icon:Uc,panel__headingText:qc,panel__title:Yc,panel__description:Xc,panel__actions:Gc,panel__body:Qc,"panel__body--sm":"hanui-panel__body--sm-6XP6W","panel__body--lg":"hanui-panel__body--lg-RTK5B","panel__body--flush":"hanui-panel__body--flush-iK75R",panel__footer:Jc,panel__footerInner:Wc,form:Zc,"form--2":"hanui-form--2-HdwDc",row:Vc},el=({children:e,title:a,description:n,actions:r,icon:o,isFlush:c,gap:i="md",footer:_,as:h="section",className:u,bodyClassName:l,testId:d})=>t.jsxs(h,{className:f(Q.panel,u),"data-testid":d,children:[(a||r)&&t.jsxs("div",{className:Q.panel__header,children:[t.jsxs("div",{className:Q.panel__heading,children:[o&&t.jsx("span",{className:Q.panel__icon,children:o}),t.jsxs("div",{className:Q.panel__headingText,children:[a&&t.jsx("h2",{className:Q.panel__title,children:a}),n&&t.jsx("p",{className:Q.panel__description,children:n})]})]}),r&&t.jsx("div",{className:Q.panel__actions,children:r})]}),t.jsx("div",{className:f(Q.panel__body,Q[`panel__body--${i}`],c&&Q["panel__body--flush"],l),children:e}),_&&t.jsx("div",{className:Q.panel__footer,children:t.jsx("div",{className:Q.panel__footerInner,children:_})})]}),tl=A(s.memo(({children:e,columns:a=1,className:n})=>t.jsx("div",{className:f(Q.form,Q[`form--${a}`],n),children:e})),"PanelForm"),al=A(s.memo(({children:e,className:a})=>t.jsx("div",{className:f(Q.row,a),children:e})),"PanelRow"),nl=s.memo(el),sl="hanui-price-Oc5Nr",rl="hanui-price__current-2Xup2",ol="hanui-price__currency-32NLN",il="hanui-price__list-MlQgT",cl="hanui-price__discount-5Yc6W",ze={price:sl,price__current:rl,price__currency:ol,price__list:il,price__discount:cl,"price--sm":"hanui-price--sm-Hd8Oe","price--md":"hanui-price--md-JMxlK","price--lg":"hanui-price--lg-TFqIF","price--xl":"hanui-price--xl-EJBYq"},ll=({value:e,currency:a,listValue:n,discountPercent:r,formatDiscount:o=u=>`%${u}`,isFormatted:c,size:i="md",className:_,testId:h})=>{const{labels:u}=H(),l=M("Price.currency",a,u==null?void 0:u.currency),d=p=>{if(!c||!(u!=null&&u.locale)||!/\d/.test(p))return p;const b=Number(p.replace(/[^\d.,-]/g,"").replace(/\.(?=\d{3}\b)/g,"").replace(",","."));if(!Number.isFinite(b))return p;try{return new Intl.NumberFormat(u.locale).format(b)}catch{return p}};return t.jsxs("span",{className:f(ze.price,ze[`price--${i}`],_),"data-testid":h,children:[t.jsxs("span",{className:ze.price__current,children:[d(e),t.jsx("span",{className:ze.price__currency,children:l})]}),n&&t.jsxs("s",{className:ze.price__list,children:[d(n),t.jsx("span",{className:ze.price__currency,children:l})]}),r!==void 0&&r>0&&t.jsx("span",{className:ze.price__discount,children:o(r)})]})},dl=s.memo(ll),ul="hanui-rating-94dke",_l="hanui-rating__stars-QkpVU",hl="hanui-rating__empty-Wf6-K",pl="hanui-rating__count-pIoEs",ml="hanui-rating__srOnly-E9h0d",tt={rating:ul,rating__stars:_l,rating__empty:hl,rating__count:pl,rating__srOnly:ml,"rating--sm":"hanui-rating--sm-AtY7U","rating--md":"hanui-rating--md-Q0nxN"},bl=({value:e,count:a,srLabel:n,size:r="sm",className:o,testId:c})=>{var h;const{labels:i}=H(),_=Math.round(e*2)/2;return t.jsxs("span",{className:f(tt.rating,tt[`rating--${r}`],o),"data-testid":c,children:[t.jsx("span",{className:tt.rating__stars,"aria-hidden":!0,children:Array.from({length:5},(u,l)=>{const d=l+1;return _>=d?t.jsx(I.StarFill,{},l):_>=d-.5?t.jsx(I.StarHalf,{},l):t.jsx(I.StarFill,{className:tt.rating__empty},l)})}),t.jsx("span",{className:tt.rating__srOnly,children:n??Tt("Rating.srLabel",(h=i==null?void 0:i.rating)==null?void 0:h.srLabel,e,a)}),z.isDefined(a)&&t.jsxs("span",{className:tt.rating__count,"aria-hidden":!0,children:["(",a,")"]})]})},gl=s.memo(bl),fl="hanui-header-a08Jh",xl="hanui-header__text-ArJkA",vl="hanui-header__overline-X5Epo",yl="hanui-header__title-nQQQJ",wl="hanui-header__description-08oCr",kl="hanui-header__action-xsxQF",Ke={header:fl,header__text:xl,header__overline:vl,header__title:yl,header__description:wl,header__action:kl,"header--sm":"hanui-header--sm-mIJWZ","header--lg":"hanui-header--lg-QBLIz"},jl=({title:e,description:a,overline:n,action:r,as:o="h2",size:c="md",className:i,testId:_})=>t.jsxs("header",{className:f(Ke.header,Ke[`header--${c}`],i),"data-testid":_,children:[t.jsxs("div",{className:Ke.header__text,children:[n&&t.jsx("span",{className:Ke.header__overline,children:n}),t.jsx(o,{className:Ke.header__title,children:e}),a&&t.jsx("p",{className:Ke.header__description,children:a})]}),r&&t.jsx("div",{className:Ke.header__action,children:r})]}),Nl=s.memo(jl),$l="hanui-scrollArea-Ly-yT",Kt={scrollArea:$l,"scrollArea--vertical":"hanui-scrollArea--vertical-2ujC7","scrollArea--horizontal":"hanui-scrollArea--horizontal-e9pu-","scrollArea--both":"hanui-scrollArea--both-lv-8W","scrollArea--fade":"hanui-scrollArea--fade-01Bbm"},El=({children:e,label:a,axis:n="vertical",maxHeight:r,hasFade:o,className:c,testId:i})=>{const _=s.useRef(null),[h,u]=s.useState(!1);return s.useEffect(()=>{const l=_.current;if(!l||typeof ResizeObserver>"u")return;const d=()=>{const b=l.scrollHeight>l.clientHeight,w=l.scrollWidth>l.clientWidth;u(n==="horizontal"?w:n==="vertical"?b:b||w)};d();const p=new ResizeObserver(d);p.observe(l);for(const b of l.children)p.observe(b);return()=>p.disconnect()},[n,e]),t.jsx("div",{ref:_,className:f(Kt.scrollArea,Kt[`scrollArea--${n}`],o&&Kt["scrollArea--fade"],c),style:r===void 0?void 0:{maxBlockSize:r},tabIndex:h?0:void 0,role:h?"region":void 0,"aria-label":h?a:void 0,"data-testid":i,children:e})},Cl=s.memo(A(El,"ScrollArea")),Il="hanui-skeleton-n92if",Dl="hanui-group-YMfwa",Tl="hanui-card-XQs-Q",Rl="hanui-card__media-YLJDv",Sl="hanui-card__body-msRvB",Ll="hanui-rows-EZ9Am",Al="hanui-row-se56N",Fl="hanui-row__text-TD4iS",Ml="hanui-table-L328g",Bl="hanui-table__row-rSJTK",re={skeleton:Il,"hanui-shimmer":"hanui-hanui-shimmer-6yd48","skeleton--block":"hanui-skeleton--block-tOZ-a","skeleton--text":"hanui-skeleton--text-k-ROi","skeleton--circle":"hanui-skeleton--circle-x-mX3",group:Dl,card:Tl,card__media:Rl,card__body:Sl,rows:Ll,row:Al,row__text:Fl,table:Ml,table__row:Bl},Se=({width:e,height:a,variant:n="block",lines:r=1,className:o})=>{const c={width:z.isNumber(e)?`${e}px`:e,height:z.isNumber(a)?`${a}px`:a};return n==="text"&&r>1?t.jsx("span",{className:f(re.group,o),"aria-hidden":!0,children:Array.from({length:r},(i,_)=>t.jsx("span",{className:f(re.skeleton,re["skeleton--text"]),style:_===r-1?{width:"60%"}:void 0},_))}):t.jsx("span",{className:f(re.skeleton,re[`skeleton--${n}`],o),style:c,"aria-hidden":!0})},Pl=s.memo(Se),Ol=({count:e=1,className:a})=>t.jsx(t.Fragment,{children:Array.from({length:e},(n,r)=>t.jsxs("div",{className:f(re.card,a),"aria-hidden":!0,children:[t.jsx(Se,{className:re.card__media}),t.jsxs("div",{className:re.card__body,children:[t.jsx(Se,{variant:"text",width:"70%"}),t.jsx(Se,{variant:"text",width:"40%"})]})]},r))}),Hl=({count:e=3,className:a})=>t.jsx("div",{className:f(re.rows,a),"aria-hidden":!0,children:Array.from({length:e},(n,r)=>t.jsxs("div",{className:re.row,children:[t.jsx(Se,{variant:"circle",width:36,height:36}),t.jsxs("div",{className:re.row__text,children:[t.jsx(Se,{variant:"text",width:"45%"}),t.jsx(Se,{variant:"text",width:"25%"})]})]},r))}),zl=({count:e=5,columns:a=4,className:n})=>t.jsx("div",{className:f(re.table,n),"aria-hidden":!0,children:Array.from({length:e},(r,o)=>t.jsx("div",{className:re.table__row,children:Array.from({length:a},(c,i)=>t.jsx(Se,{variant:"text"},i))},o))}),Kl=A(s.memo(Ol),"SkeletonCard"),Ul=A(s.memo(Hl),"SkeletonRows"),ql=A(s.memo(zl),"SkeletonTable"),Yl="hanui-stat-Xb7wp",Xl="hanui-stat__icon-MB8NU",Gl="hanui-stat__label-kUX2m",Ql="hanui-stat__value--6p13",Jl="hanui-stat__unit-mjHVk",Wl="hanui-stat__delta-YKpOu",Zl="hanui-stat__description-Yvw6J",Vl="hanui-stat__srOnly-YKebA",ie={stat:Yl,"stat--sm":"hanui-stat--sm-XnK8p","stat--plain":"hanui-stat--plain-N-3RC",stat__icon:Xl,stat__label:Gl,stat__value:Ql,stat__unit:Jl,stat__delta:Wl,"stat__delta--positive":"hanui-stat__delta--positive-1AUAM","stat__delta--negative":"hanui-stat__delta--negative--WWEP",stat__description:Zl,stat__srOnly:Vl},ed={up:t.jsx(I.ArrowUpShort,{"aria-hidden":!0}),down:t.jsx(I.ArrowDownShort,{"aria-hidden":!0}),flat:t.jsx(I.DashLg,{"aria-hidden":!0})},td={up:"artış",down:"azalış",flat:"değişim yok"},ad=({label:e,value:a,unit:n,delta:r,trend:o,isUpPositive:c=!0,description:i,icon:_,variant:h="card",size:u="md",className:l,testId:d})=>{const p=o==="flat"?void 0:o==="up"===c;return t.jsxs("div",{className:f(ie.stat,ie[`stat--${u}`],ie[`stat--${h}`],l),"data-testid":d,children:[_&&t.jsx("span",{className:ie.stat__icon,"aria-hidden":!0,children:_}),t.jsx("span",{className:ie.stat__label,children:e}),t.jsxs("span",{className:ie.stat__value,children:[a,n&&t.jsx("span",{className:ie.stat__unit,children:n})]}),r&&o&&t.jsxs("span",{className:f(ie.stat__delta,p===!0&&ie["stat__delta--positive"],p===!1&&ie["stat__delta--negative"]),children:[ed[o],r,t.jsx("span",{className:ie.stat__srOnly,children:td[o]})]}),i&&t.jsx("span",{className:ie.stat__description,children:i})]})},nd=s.memo(A(ad,"Stat")),sd="hanui-hub-JoqOf",rd="hanui-toast-U27Of",od="hanui-toast__icon-p-rgI",id="hanui-toast__text-rG4ji",cd="hanui-toast__message-s6S2-",ld="hanui-toast__description-0cYTx",dd="hanui-toast__action-fOXU5",ud="hanui-toast__close-QxSNP",$e={hub:sd,toast:rd,"hanui-fade-in-up":"hanui-hanui-fade-in-up-hhv43","toast--info":"hanui-toast--info-S1QJr","toast--success":"hanui-toast--success-NUso7","toast--warning":"hanui-toast--warning-7mi-S","toast--danger":"hanui-toast--danger-IhFSz",toast__icon:od,toast__text:id,toast__message:cd,toast__description:ld,toast__action:dd,toast__close:ud},_d={info:t.jsx(I.InfoCircleFill,{"aria-hidden":!0}),success:t.jsx(I.CheckCircleFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),danger:t.jsx(I.XCircleFill,{"aria-hidden":!0})},hd={info:4e3,success:4e3,warning:6e3,danger:8e3};let ba=0;const Yt=new Set;let Xe=[];const Zt=()=>Yt.forEach(e=>e(Xe)),Xt=e=>{Xe=Xe.filter(a=>a.id!==e),Zt()},mt=(e,a={})=>{ba+=1;const n=ba;return Xe=[...Xe,{...a,id:n,message:e}].slice(-3),Zt(),n},pd={show:mt,info:(e,a)=>mt(e,{...a,tone:"info"}),success:(e,a)=>mt(e,{...a,tone:"success"}),warning:(e,a)=>mt(e,{...a,tone:"warning"}),error:(e,a)=>mt(e,{...a,tone:"danger"}),dismiss:Xt,clear:()=>{Xe=[],Zt()}},md=({toast:e,closeLabel:a,onDismiss:n})=>{const r=e.tone??"info",o=e.duration??hd[r],[c,i]=s.useState(!1),_=s.useRef(o),h=s.useRef(0);return s.useEffect(()=>{if(o===0||c)return;h.current=Date.now();const u=window.setTimeout(()=>n(e.id),_.current);return()=>{window.clearTimeout(u),_.current=Math.max(0,_.current-(Date.now()-h.current))}},[o,c,n,e.id]),t.jsxs("div",{className:f($e.toast,$e[`toast--${r}`]),role:r==="danger"?"alert":"status",onPointerEnter:()=>i(!0),onPointerLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t.jsx("span",{className:$e.toast__icon,"aria-hidden":!0,children:_d[r]}),t.jsxs("div",{className:$e.toast__text,children:[t.jsx("span",{className:$e.toast__message,children:e.message}),e.description&&t.jsx("span",{className:$e.toast__description,children:e.description})]}),e.action&&t.jsx("button",{type:"button",className:$e.toast__action,onClick:()=>{var u;(u=e.action)==null||u.onClick(),n(e.id)},children:e.action.label}),t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:a,variant:"ghost",size:"sm",className:$e.toast__close,onClick:()=>n(e.id)})]})},bd=({closeLabel:e,className:a})=>{const{labels:n}=H(),[r,o]=s.useState([]);s.useEffect(()=>(Yt.add(o),o(Xe),()=>{Yt.delete(o)}),[]);const c=s.useCallback(h=>Xt(h),[]);s.useEffect(()=>{if(r.length===0)return;const h=u=>{u.key==="Escape"&&Xt(r[r.length-1].id)};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]);const[i,_]=s.useState(!1);return s.useEffect(()=>_(!0),[]),i?yt.createPortal(t.jsx("div",{className:f($e.hub,a),children:r.map(h=>t.jsx(md,{toast:h,closeLabel:M("ToastHub.closeLabel",e,n==null?void 0:n.close),onDismiss:c},h.id))}),document.body):null},gd=s.memo(A(bd,"ToastHub")),fd="hanui-accordion-h9jLC",xd="hanui-accordion__item--YvzK",vd="hanui-accordion__title-qZOLY",yd="hanui-accordion__meta-PSlsO",wd="hanui-accordion__marker-QcWcI",kd="hanui-accordion__summary-QUhWh",jd="hanui-accordion__panel--3EXE",Nd="hanui-accordion__content-fO64s",we={accordion:fd,accordion__item:xd,"accordion__item--disabled":"hanui-accordion__item--disabled-x1erZ",accordion__title:vd,accordion__meta:yd,accordion__marker:wd,accordion__summary:kd,accordion__panel:jd,accordion__content:Nd},$d=({items:e,isSingle:a,defaultOpenIds:n,openIds:r,onChange:o,className:c,testId:i})=>{const _=s.useId(),[h,u]=s.useState(n??[]),l=r!==void 0,d=l?r:h,p=s.useCallback((b,w)=>{const g=w?a?[b]:[...d.filter(m=>m!==b),b]:d.filter(m=>m!==b);l||u(g),o==null||o(g)},[l,a,o,d]);return t.jsx("div",{className:f(we.accordion,c),"data-testid":i,children:e.map(b=>{const w=d.includes(b.id);return t.jsxs("details",{className:f(we.accordion__item,b.isDisabled&&we["accordion__item--disabled"]),open:w,onToggle:g=>{const m=g.currentTarget.open;m!==w&&p(b.id,m)},children:[t.jsxs("summary",{id:`${_}-${b.id}`,className:we.accordion__summary,"aria-disabled":b.isDisabled,tabIndex:b.isDisabled?-1:void 0,onClick:g=>b.isDisabled&&g.preventDefault(),children:[t.jsx(I.CaretRightFill,{"aria-hidden":!0,className:we.accordion__marker}),t.jsx("span",{className:we.accordion__title,children:b.title}),b.meta&&t.jsx("span",{className:we.accordion__meta,children:b.meta})]}),t.jsx("div",{className:we.accordion__panel,children:t.jsx("div",{className:we.accordion__content,children:b.content})})]},b.id)})})},Ed=s.memo(A($d,"Accordion")),Cd="hanui-steps-ntge1",Id="hanui-steps__item-GrU1x",Dd="hanui-steps__button-XBsnS",Td="hanui-steps__marker-g-GLE",Rd="hanui-steps__text-Mkpkh",Sd="hanui-steps__label-NSeFM",Ld="hanui-steps__description-bQuNT",Ad="hanui-steps__status-wWJfP",ue={steps:Cd,"steps--horizontal":"hanui-steps--horizontal-O-mkx","steps--vertical":"hanui-steps--vertical-agfwo",steps__item:Id,steps__button:Dd,steps__marker:Td,"steps__item--done":"hanui-steps__item--done-mvOuN","steps__item--current":"hanui-steps__item--current-Qzlal",steps__text:Rd,steps__label:Sd,steps__description:Ld,steps__status:Ad},Fd=(e,a)=>e<a?"done":e===a?"current":"upcoming",Md={done:"tamamlandı",current:"şu anki adım",upcoming:"sıradaki"},Bd=({steps:e,currentIndex:a,onStepClick:n,label:r,orientation:o="horizontal",className:c,testId:i})=>t.jsx("ol",{className:f(ue.steps,ue[`steps--${o}`],c),"aria-label":r,"data-testid":i,children:e.map((_,h)=>{const u=Fd(h,a),l=!!n&&u==="done",d=t.jsxs(t.Fragment,{children:[t.jsx("span",{className:ue.steps__marker,"aria-hidden":!0,children:u==="done"?t.jsx(I.CheckLg,{}):h+1}),t.jsxs("span",{className:ue.steps__text,children:[t.jsx("span",{className:ue.steps__label,children:_.label}),_.description&&t.jsx("span",{className:ue.steps__description,children:_.description})]}),t.jsx("span",{className:ue.steps__status,children:Md[u]})]});return t.jsx("li",{className:f(ue.steps__item,ue[`steps__item--${u}`]),"aria-current":u==="current"?"step":void 0,children:l?t.jsx("button",{type:"button",className:ue.steps__button,onClick:()=>n==null?void 0:n(h),children:d}):t.jsx("span",{className:ue.steps__button,children:d})},_.id)})}),Pd=s.memo(A(Bd,"Steps")),Od="hanui-tabs-l4dFE",Hd="hanui-tabs__list-HJvR8",zd="hanui-tabs__tab-7gDW7",Kd="hanui-tabs__count-8JX8s",Ud="hanui-tabs__panel-CPklY",at={tabs:Od,tabs__list:Hd,tabs__tab:zd,"tabs__tab--active":"hanui-tabs__tab--active-riqNp",tabs__count:Kd,tabs__panel:Ud},qd=({items:e,defaultTabId:a,activeId:n,onChange:r,ariaLabel:o,isManualActivation:c,className:i,testId:_})=>{var N;const h=s.useId(),[u,l]=s.useState(a??((N=e[0])==null?void 0:N.id)),d=z.isDefined(n),p=d?n:u,b=e.findIndex(k=>k.id===p),[w,g]=s.useState(b<0?0:b),m=s.useRef(null),v=e[b]??e[0];s.useEffect(()=>{var k;Gt((k=m.current)==null?void 0:k.querySelector('[aria-selected="true"]'),{block:"nearest",inline:"nearest"})},[p]);const $=k=>{d||l(k),r==null||r(k)},j=k=>{var D;if(c&&(k.key==="Enter"||k.key===" ")){k.preventDefault(),$(e[w].id);return}const T=k.key==="ArrowRight"?1:k.key==="ArrowLeft"?-1:0;if(T===0)return;k.preventDefault();const C=((c?w:b)+T+e.length)%e.length;g(C),c||$(e[C].id),(D=document.getElementById(`${h}-tab-${e[C].id}`))==null||D.focus()};if(e.length===0)return null;const x=z.isDefined(v==null?void 0:v.content);return t.jsxs("div",{className:f(at.tabs,i),"data-testid":_,children:[t.jsx("div",{ref:m,className:at.tabs__list,role:"tablist","aria-label":o,onKeyDown:j,children:e.map(k=>{var C;const T=k.id===v.id;return t.jsxs("button",{id:`${h}-tab-${k.id}`,type:"button",role:"tab","aria-selected":T,"aria-controls":x?`${h}-panel-${k.id}`:void 0,tabIndex:(c?((C=e[w])==null?void 0:C.id)===k.id:T)?0:-1,className:f(at.tabs__tab,T&&at["tabs__tab--active"]),onClick:()=>$(k.id),children:[k.label,z.isDefined(k.count)&&t.jsx("span",{className:at.tabs__count,children:k.count})]},k.id)})}),x&&t.jsx("div",{id:`${h}-panel-${v.id}`,role:"tabpanel","aria-labelledby":`${h}-tab-${v.id}`,className:at.tabs__panel,tabIndex:0,children:v.content})]})},Yd=s.memo(qd),Xd="hanui-tile-TGur-",Gd="hanui-tile__medallion--Y0pz",Qd="hanui-tile__label-mI1OQ",Jd="hanui-tile__meta-22qnR",bt={tile:Xd,tile__medallion:Gd,tile__label:Qd,tile__meta:Jd,"tile--active":"hanui-tile--active-z0F2M"},Wd=({label:e,icon:a,href:n,meta:r,isActive:o,linkProps:c,className:i,testId:_})=>t.jsxs(fe,{href:n,className:f(bt.tile,o&&bt["tile--active"],i),"aria-current":o?"page":void 0,"data-testid":_,...c,children:[t.jsx("span",{className:bt.tile__medallion,"aria-hidden":!0,children:a}),t.jsx("span",{className:bt.tile__label,children:e}),r&&t.jsx("span",{className:bt.tile__meta,children:r})]}),Zd=s.memo(Wd),Vd="hanui-timeline-GxubZ",eu="hanui-timeline__item-qMpF2",tu="hanui-timeline__marker-MDk07",au="hanui-timeline__body-xJi7t",nu="hanui-timeline__title-pKxZJ",su="hanui-timeline__time-ITWYy",ru="hanui-timeline__description-4vrEy",ou="hanui-timeline__srOnly-7K2We",ke={timeline:Vd,timeline__item:eu,timeline__marker:tu,"timeline__item--done":"hanui-timeline__item--done-dqiOQ","timeline__item--current":"hanui-timeline__item--current-TGV5f","timeline__item--pending":"hanui-timeline__item--pending-VMZTS","timeline__item--failed":"hanui-timeline__item--failed-2BbfX",timeline__body:au,timeline__title:nu,timeline__time:su,timeline__description:ru,timeline__srOnly:ou},iu={done:t.jsx(I.CheckLg,{}),failed:t.jsx(I.XLg,{}),current:null,pending:null},cu={done:"tamamlandı",current:"şu an",pending:"bekliyor",failed:"başarısız"},lu=({events:e,label:a,className:n,testId:r})=>t.jsx("ol",{className:f(ke.timeline,n),"aria-label":a,"data-testid":r,children:e.map(o=>{const c=o.status??"done";return t.jsxs("li",{className:f(ke.timeline__item,ke[`timeline__item--${c}`]),"aria-current":c==="current"?"step":void 0,children:[t.jsx("span",{className:ke.timeline__marker,"aria-hidden":!0,children:o.icon??iu[c]}),t.jsxs("div",{className:ke.timeline__body,children:[t.jsxs("span",{className:ke.timeline__title,children:[o.title,t.jsx("span",{className:ke.timeline__srOnly,children:cu[c]})]}),o.time&&t.jsx("span",{className:ke.timeline__time,children:o.time}),o.description&&t.jsx("span",{className:ke.timeline__description,children:o.description})]})]},o.id)})}),du=s.memo(A(lu,"Timeline")),uu="hanui-modal-3IDi9",_u="hanui-modal__panel--qLSz",hu="hanui-modal__header-meWm6",pu="hanui-modal__icon-df2dd",mu="hanui-modal__heading-PwDS8",bu="hanui-modal__title-80Sh6",gu="hanui-modal__description-fsCHI",fu="hanui-modal__close-vFPbw",xu="hanui-modal__body-PDF12",vu="hanui-modal__footer-CCCkx",ne={modal:uu,"modal--sm":"hanui-modal--sm-A7WsS","modal--lg":"hanui-modal--lg-z99Em",modal__panel:_u,modal__header:hu,modal__icon:pu,"modal__icon--neutral":"hanui-modal__icon--neutral-QSL7c","modal__icon--danger":"hanui-modal__icon--danger-6V90a","modal__icon--warning":"hanui-modal__icon--warning-a--FX","modal__icon--success":"hanui-modal__icon--success-YWxZs","modal__icon--info":"hanui-modal__icon--info-WRLah",modal__heading:mu,modal__title:bu,modal__description:gu,modal__close:fu,modal__body:xu,modal__footer:vu},yu=({isOpen:e,onClose:a,title:n,closeLabel:r,children:o,description:c,footer:i,icon:_,tone:h="neutral",size:u="md",isDismissable:l=!0,className:d,testId:p})=>{const{labels:b}=H(),w=s.useRef(null),g=s.useRef(null),m=s.useId(),v=s.useId();s.useEffect(()=>{const j=w.current;if(!j)return;if(!e){j.open&&j.close();return}const x=ot();j.open||j.showModal(),At(j,`.${ne.modal__close}`),Lt(j);const{token:N,pop:k}=Ft();return g.current=N,()=>{k(),g.current=null,x()}},[e]),kt(e),s.useEffect(()=>{const j=w.current;if(!j)return;const x=N=>{N.preventDefault(),l&&(g.current&&!Mt(g.current)||a())};return j.addEventListener("cancel",x),()=>j.removeEventListener("cancel",x)},[a,l]);const $=s.useCallback(j=>{l&&j.target===w.current&&a()},[l,a]);return t.jsx("dialog",{ref:w,className:f(ne.modal,ne[`modal--${u}`],d),"aria-labelledby":m,"aria-describedby":c?v:void 0,"data-testid":p,onClick:$,children:t.jsxs("div",{className:ne.modal__panel,children:[t.jsxs("header",{className:ne.modal__header,children:[_&&t.jsx("span",{className:f(ne.modal__icon,ne[`modal__icon--${h}`]),children:_}),t.jsxs("div",{className:ne.modal__heading,children:[t.jsx("h2",{id:m,className:ne.modal__title,children:n}),c&&t.jsx("p",{id:v,className:ne.modal__description,children:c})]}),l&&t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:M("Modal.closeLabel",r,b==null?void 0:b.close),variant:"ghost",size:"sm",className:ne.modal__close,onClick:a})]}),o&&t.jsx("div",{className:ne.modal__body,children:o}),i&&t.jsx("footer",{className:ne.modal__footer,children:i})]})})},Vt=s.memo(yu),wu="hanui-palette-ag-P9",ku="hanui-palette__search-G3aYv",ju="hanui-palette__searchIcon-2UYj-",Nu="hanui-palette__input-vvLvt",$u="hanui-palette__list--KWiH",Eu="hanui-palette__group-KPj5Q",Cu="hanui-palette__item-UZzkp",Iu="hanui-palette__icon-Fg0Lt",Du="hanui-palette__text-flfN9",Tu="hanui-palette__label-8-UHe",Ru="hanui-palette__description-eRlk9",Su="hanui-palette__shortcut-DwYKX",Lu="hanui-palette__empty-vg-I3",W={palette:wu,palette__search:ku,palette__searchIcon:ju,palette__input:Nu,palette__list:$u,palette__group:Eu,palette__item:Cu,"palette__item--active":"hanui-palette__item--active-XHcka",palette__icon:Iu,palette__text:Du,palette__label:Tu,palette__description:Ru,palette__shortcut:Su,palette__empty:Lu},Au=({isOpen:e,onClose:a,items:n,label:r,searchPlaceholder:o,emptyMessage:c,className:i,testId:_})=>{const h=s.useId(),u=`${h}-listbox`,l=s.useRef(null),d=s.useRef(null),p=s.useRef(null),[b,w]=s.useState(""),[g,m]=s.useState(0),v=s.useMemo(()=>{if(b.trim()==="")return n;const x=b.trim();return n.filter(N=>vt(N.label,x)||(N.description?vt(N.description,x):!1))},[n,b]);kt(e),s.useEffect(()=>{var C;const x=l.current;if(!x)return;if(!e){x.open&&x.close();return}const N=ot();x.open||x.showModal(),(C=d.current)==null||C.focus({preventScroll:!0}),w(""),m(0);const{token:k,pop:T}=Ft();return p.current=k,()=>{T(),p.current=null,N()}},[e]),s.useEffect(()=>{const x=l.current;if(!x)return;const N=k=>{k.preventDefault(),!(p.current&&!Mt(p.current))&&a()};return x.addEventListener("cancel",N),()=>x.removeEventListener("cancel",N)},[a]),s.useEffect(()=>{var x;Gt((x=l.current)==null?void 0:x.querySelector(`[data-index="${g}"]`),{block:"nearest"})},[g]);const $=x=>{x.onSelect(),a()},j=x=>{const N=v.length-1;switch(x.key){case"ArrowDown":x.preventDefault(),m(k=>k>=N?0:k+1);break;case"ArrowUp":x.preventDefault(),m(k=>k<=0?N:k-1);break;case"Home":x.preventDefault(),m(0);break;case"End":x.preventDefault(),m(N);break;case"Enter":{x.preventDefault();const k=v[g];k&&$(k);break}}};return t.jsxs("dialog",{ref:l,className:f(W.palette,i),"aria-label":r,"data-testid":_,onClick:x=>x.target===l.current&&a(),children:[t.jsxs("div",{className:W.palette__search,children:[t.jsx(I.Search,{"aria-hidden":!0,className:W.palette__searchIcon}),t.jsx("input",{ref:d,type:"text",role:"combobox",className:W.palette__input,value:b,placeholder:o,"aria-label":o,autoComplete:"off","aria-autocomplete":"list","aria-expanded":!0,"aria-controls":u,"aria-activedescendant":v[g]?`${h}-option-${g}`:void 0,onChange:x=>{w(x.target.value),m(0)},onKeyDown:j})]}),t.jsxs("ul",{id:u,role:"listbox","aria-label":r,className:W.palette__list,children:[v.map((x,N)=>{var T;const k=x.group!==void 0&&x.group!==((T=v[N-1])==null?void 0:T.group);return t.jsxs("li",{children:[k&&t.jsx("span",{className:W.palette__group,"aria-hidden":!0,children:x.group}),t.jsxs("div",{id:`${h}-option-${N}`,role:"option","data-index":N,"aria-selected":N===g,className:f(W.palette__item,N===g&&W["palette__item--active"]),onMouseEnter:()=>m(N),onClick:()=>$(x),children:[x.icon&&t.jsx("span",{className:W.palette__icon,"aria-hidden":!0,children:x.icon}),t.jsxs("span",{className:W.palette__text,children:[t.jsx("span",{className:W.palette__label,children:x.label}),x.description&&t.jsx("span",{className:W.palette__description,children:x.description})]}),x.shortcut&&t.jsx("kbd",{className:W.palette__shortcut,"aria-hidden":!0,children:x.shortcut})]})]},x.id)}),v.length===0&&t.jsx("li",{className:W.palette__empty,children:c})]})]})},Fu=s.memo(A(Au,"CommandPalette")),Mu={destructive:t.jsx(I.TrashFill,{"aria-hidden":!0}),warning:t.jsx(I.ExclamationTriangleFill,{"aria-hidden":!0}),neutral:t.jsx(I.QuestionCircleFill,{"aria-hidden":!0})},Bu={destructive:"danger",warning:"warning",neutral:"info"},Pu={destructive:be.DANGER,warning:be.PRIMARY,neutral:be.PRIMARY},Ou=({isOpen:e,onClose:a,onConfirm:n,title:r,description:o,confirmLabel:c,cancelLabel:i,closeLabel:_,variant:h,kind:u,children:l})=>{const{labels:d}=H(),[p,b]=s.useState(!1),w=h??u??"neutral",g=async()=>{b(!0);try{await n()}finally{b(!1)}};return t.jsx(Vt,{isOpen:e,onClose:a,title:r,closeLabel:_??(d==null?void 0:d.close),description:o,icon:Mu[w],tone:Bu[w],size:"sm",isDismissable:!p,footer:t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:be.SECONDARY,size:Le.MEDIUM,onClick:a,disabled:p,children:M("ConfirmDialog.cancelLabel",i,d==null?void 0:d.cancel)}),t.jsx(rt,{variant:Pu[w],size:Le.MEDIUM,onClick:g,isLoading:p,children:c})]}),children:l})},Hu=s.memo(Ou),zu="hanui-drawer-fgfi1",Ku="hanui-drawer__header-BDcRe",Uu="hanui-drawer__title-9M0e8",qu="hanui-drawer__close-Z30oW",Yu="hanui-drawer__toolbar-vcsYi",Xu="hanui-drawer__body-x12SX",Gu="hanui-drawer__footer-PajTg",pe={drawer:zu,"drawer--sm":"hanui-drawer--sm-ywgof","drawer--md":"hanui-drawer--md-mN8Kg","drawer--lg":"hanui-drawer--lg-5H-oE","drawer--end":"hanui-drawer--end-q-sIP","drawer--start":"hanui-drawer--start-xqVlX",drawer__header:Ku,drawer__title:Uu,drawer__close:qu,drawer__toolbar:Yu,drawer__body:Xu,drawer__footer:Gu},Qu=({isOpen:e,onClose:a,title:n,closeLabel:r,children:o,side:c="end",size:i="md",footer:_,toolbar:h,className:u,testId:l})=>{const{labels:d}=H(),p=s.useRef(null),b=s.useRef(null),w=s.useId();s.useEffect(()=>{const m=p.current;if(!m)return;if(!e){m.open&&m.close();return}const v=ot();m.open||m.showModal(),At(m,`.${pe.drawer__close}`),Lt(m);const{token:$,pop:j}=Ft();return b.current=$,()=>{j(),b.current=null,v()}},[e]),kt(e),s.useEffect(()=>{const m=p.current;if(!m)return;const v=$=>{$.preventDefault(),!(b.current&&!Mt(b.current))&&a()};return m.addEventListener("cancel",v),()=>m.removeEventListener("cancel",v)},[a]);const g=s.useCallback(m=>{m.target===p.current&&a()},[a]);return t.jsxs("dialog",{ref:p,className:f(pe.drawer,pe[`drawer--${c}`],pe[`drawer--${i}`],u),"aria-labelledby":w,"data-testid":l,onClick:g,children:[t.jsxs("header",{className:pe.drawer__header,children:[t.jsx("h2",{id:w,className:pe.drawer__title,children:n}),t.jsx(ge,{icon:t.jsx(I.XLg,{"aria-hidden":!0}),label:M("Drawer.closeLabel",r,d==null?void 0:d.close),variant:"ghost",size:"sm",className:pe.drawer__close,onClick:a})]}),h&&t.jsx("div",{className:pe.drawer__toolbar,children:h}),t.jsx("div",{className:pe.drawer__body,children:o}),_&&t.jsx("div",{className:pe.drawer__footer,children:_})]})},Ju=s.memo(A(Qu,"Drawer")),Wu="hanui-form-zpZn4",Zu={form:Wu},Vu=({isOpen:e,onClose:a,onSubmit:n,title:r,label:o,submitLabel:c,cancelLabel:i,closeLabel:_,description:h,hint:u,placeholder:l,defaultValue:d="",isRequired:p,requiredLabel:b,inputMode:w="text",maxLength:g,rows:m=4})=>{const{labels:v}=H(),$=s.useId(),[j,x]=s.useState(d),[N,k]=s.useState(!1),T=s.useRef(!1);s.useEffect(()=>{e&&!T.current&&x(d),T.current=e},[e,d]);const C=j.trim(),D=!!p&&C==="",y=P=>w==="multiline"?t.jsx(La,{...P,value:j,onChange:X=>x(X.target.value),placeholder:l,maxLength:g,rows:m}):t.jsx(Sa,{...P,type:w==="number"?"number":"text",value:j,onChange:X=>x(X.target.value),placeholder:l,maxLength:g}),S=async()=>{if(!(D||N)){k(!0);try{await n(C),a()}catch{}finally{k(!1)}}};return t.jsx(Vt,{isOpen:e,onClose:a,title:r,closeLabel:_??(v==null?void 0:v.close),description:h,size:"sm",isDismissable:!N,footer:t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:be.SECONDARY,size:Le.MEDIUM,onClick:a,disabled:N,children:M("PromptDialog.cancelLabel",i,v==null?void 0:v.cancel)}),t.jsx(rt,{type:"submit",form:$,variant:be.PRIMARY,size:Le.MEDIUM,disabled:D,isLoading:N,children:M("PromptDialog.submitLabel",c,v==null?void 0:v.submit)})]}),children:t.jsx("form",{id:$,className:Zu.form,onSubmit:P=>{P.preventDefault(),S()},children:t.jsx(Aa,{label:o,hint:u,isRequired:p,requiredLabel:b,children:y})})})},e_=s.memo(Vu),t_="hanui-scroller-EtDmS",a_="hanui-table-uCv4q",nt={scroller:t_,"scroller--frame":"hanui-scroller--frame-84zz6",table:a_,"table--compact":"hanui-table--compact-4KCVl","table--regular":"hanui-table--regular-hsA3-","table--spacious":"hanui-table--spacious-BBUX-","table--sticky-head":"hanui-table--sticky-head-FO2L4","table--row-hover":"hanui-table--row-hover--MAoe"},n_=A(s.memo(({hasFrame:e=!0,className:a,children:n,...r})=>t.jsx("div",{className:f(nt.scroller,e&&nt["scroller--frame"],a),...r,children:n})),"TableScroller"),s_=({density:e="regular",hasStickyHead:a,hasRowHover:n,className:r,children:o,...c})=>t.jsx("table",{className:f(nt.table,nt[`table--${e}`],a&&nt["table--sticky-head"],n&&nt["table--row-hover"],r),...c,children:o}),r_=s.memo(s_),o_="hanui-wrapper-KXCZg",i_="hanui-table-LF5Ow",c_="hanui-state-YPPb0",l_="hanui-state__message-wwbIW",d_="hanui-srOnly-Oia8c",u_="hanui-sort-3Q6Fx",__="hanui-sort__arrow-MITWb",h_="hanui-sticky-KDEvQ",p_="hanui-bulkBar-62qk0",Z={wrapper:o_,"wrapper--capped":"hanui-wrapper--capped-M2QUJ",table:i_,state:c_,"state--error":"hanui-state--error-A492d",state__message:l_,"row--warning":"hanui-row--warning-BAUN2",srOnly:d_,sort:u_,sort__arrow:__,"sort__arrow--ascending":"hanui-sort__arrow--ascending-85T5d","sort__arrow--descending":"hanui-sort__arrow--descending-gs3VU",sticky:h_,bulkBar:p_},m_=({columns:e,children:a,isLoading:n,error:r,emptyMessage:o,loadingMessage:c,hasViewportCap:i,onSort:_,bulkBar:h,className:u,testId:l})=>{var w,g;const{labels:d}=H(),p=s.Children.count(a),b=(m,v)=>t.jsx("tr",{children:t.jsx("td",{colSpan:e.length,className:f(Z.state,v&&Z[`state--${v}`]),children:m})});return t.jsxs("div",{className:f(Z.wrapper,i&&Z["wrapper--capped"],u),"data-testid":l,children:[h&&t.jsx("div",{className:Z.bulkBar,children:h}),t.jsxs("table",{className:Z.table,children:[t.jsx("thead",{children:t.jsx("tr",{children:e.map(m=>{const v=!!(m.isSortable&&_),$=m.ariaSort==="ascending"?"descending":"ascending";return t.jsx("th",{scope:"col","aria-sort":m.ariaSort,className:f(m.className,m.isSticky&&Z.sticky),children:v?t.jsxs("button",{type:"button",className:Z.sort,onClick:()=>_==null?void 0:_(m.key,$),children:[m.label,m.srLabel&&t.jsx("span",{className:Z.srOnly,children:m.srLabel}),t.jsx("span",{"aria-hidden":!0,className:f(Z.sort__arrow,m.ariaSort&&Z[`sort__arrow--${m.ariaSort}`]),children:m.ariaSort==="descending"?"▾":"▴"})]}):t.jsxs(t.Fragment,{children:[m.label,m.srLabel&&t.jsx("span",{className:Z.srOnly,children:m.srLabel})]})},m.key)})})}),t.jsx("tbody",{children:r?b(t.jsxs("span",{role:"alert",className:Z.state__message,children:[t.jsx(I.ExclamationCircleFill,{"aria-hidden":!0}),r]}),"error"):n?b(M("DataTable.loadingMessage",c,(w=d==null?void 0:d.dataTable)==null?void 0:w.loading)):p===0?b(M("DataTable.emptyMessage",o,(g=d==null?void 0:d.dataTable)==null?void 0:g.empty)):a})]})]})},b_=A(s.memo(({isWarning:e,className:a,children:n,...r})=>t.jsx("tr",{className:f(e&&Z["row--warning"],a),...r,children:n})),"DataTableRow"),g_=s.memo(m_),f_="hanui-bar-b4PP4",x_="hanui-bar__hiddenSubmit-jeCyX",v_="hanui-bar__actions-rG69L",y_="hanui-field-f-rvu",xt={bar:f_,bar__hiddenSubmit:x_,bar__actions:v_,field:y_,"field--wide":"hanui-field--wide-FA5gf"},w_=({onSubmit:e,children:a,actions:n,label:r,className:o,testId:c})=>{const{labels:i}=H();return t.jsxs("form",{className:f(xt.bar,o),"aria-label":M("FilterBar.label",r,i==null?void 0:i.filters),"data-testid":c,onSubmit:_=>{_.preventDefault(),e()},children:[a,t.jsx("button",{type:"submit",className:xt.bar__hiddenSubmit,tabIndex:-1,"aria-hidden":!0}),n&&t.jsx("div",{className:xt.bar__actions,children:n})]})},k_=A(s.memo(({children:e,isWide:a,className:n})=>t.jsx("div",{className:f(xt.field,a&&xt["field--wide"],n),children:e})),"FilterBarField"),j_=s.memo(w_),N_="hanui-pagination-K-L20",$_="hanui-pagination__list--9HqC",E_="hanui-pagination__arrow-XIgoX",C_="hanui-pagination__page-TpoJM",I_="hanui-pagination__gap-qoDyI",je={pagination:N_,pagination__list:$_,pagination__arrow:E_,pagination__page:C_,"pagination__page--active":"hanui-pagination__page--active-XHeaz",pagination__gap:I_},D_=(e,a)=>{if(a<=7)return Array.from({length:a},(c,i)=>i+1);const n=new Set([1,a,e]);e-1>1&&n.add(e-1),e+1<a&&n.add(e+1);const r=[...n].sort((c,i)=>c-i),o=[];return r.forEach((c,i)=>{i>0&&c-r[i-1]>1&&o.push("gap"),o.push(c)}),o},T_=({page:e,totalPages:a,label:n,previousLabel:r,nextLabel:o,buildHref:c,onPageChange:i,linkProps:_,formatAnnouncement:h,className:u,testId:l})=>{var m,v,$;const{labels:d}=H(),p=Rt(),b=s.useRef(e);s.useEffect(()=>{b.current!==e&&(b.current=e,h&&p(h(e,a)))},[e,a,h,p]);const w=s.useMemo(()=>D_(e,a),[e,a]);if(a<=1)return null;const g=j=>{i&&i(j)};return t.jsxs("nav",{className:f(je.pagination,u),"aria-label":M("Pagination.label",n,(m=d==null?void 0:d.pagination)==null?void 0:m.label),"data-testid":l,children:[t.jsx(ge,{className:je.pagination__arrow,icon:t.jsx(I.CaretLeftFill,{"aria-hidden":!0}),label:M("Pagination.previousLabel",r,(v=d==null?void 0:d.pagination)==null?void 0:v.previous),variant:"outline",disabled:e<=1,onClick:()=>g(e-1)}),t.jsx("ul",{className:je.pagination__list,children:w.map((j,x)=>j==="gap"?t.jsx("li",{className:je.pagination__gap,"aria-hidden":!0,children:"…"},`gap-${x}`):t.jsx("li",{children:c?t.jsx(fe,{href:c(j),className:f(je.pagination__page,j===e&&je["pagination__page--active"]),"aria-current":j===e?"page":void 0,..._,children:j}):t.jsx(rt,{variant:be.SECONDARY,size:Le.SMALL,className:f(je.pagination__page,j===e&&je["pagination__page--active"]),"aria-current":j===e?"page":void 0,onClick:()=>g(j),children:j})},j))}),t.jsx(ge,{className:je.pagination__arrow,icon:t.jsx(I.CaretRightFill,{"aria-hidden":!0}),label:M("Pagination.nextLabel",o,($=d==null?void 0:d.pagination)==null?void 0:$.next),variant:"outline",disabled:e>=a,onClick:()=>g(e+1)})]})},R_=s.memo(T_);exports.ABOVE_MOBILE_MEDIA_QUERY=St;exports.ABOVE_TABLET_MEDIA_QUERY=dn;exports.Accordion=Ed;exports.Alert=ii;exports.Avatar=pi;exports.Badge=fi;exports.BottomSheet=Wt;exports.Breadcrumb=Ni;exports.Button=rt;exports.COMPACT_DENSITY=Ga;exports.Card=Bi;exports.CardBody=Fi;exports.CardFooter=Mi;exports.CardMedia=Li;exports.CardOverlay=Ai;exports.Carousel=Yi;exports.Checkbox=Qs;exports.Chip=Ra;exports.ChipGroup=Wn;exports.Combobox=js;exports.CommandPalette=Fu;exports.ConfirmDialog=Hu;exports.CopyField=Vi;exports.DARK_THEME=xa;exports.DEFAULT_FONTS=Qa;exports.DataTable=g_;exports.DataTableRow=b_;exports.DateField=po;exports.DateRange=bo;exports.Directory=yc;exports.DirectoryGroup=fc;exports.DirectoryJump=vc;exports.DirectoryRow=xc;exports.Divider=nc;exports.Drawer=Ju;exports.EmptyState=Cc;exports.Field=Aa;exports.FileUpload=Zo;exports.FilterBar=j_;exports.FilterBarField=k_;exports.HanuiProvider=Wa;exports.IconButton=ge;exports.Input=Sa;exports.LIGHT_THEME=fa;exports.METRIC_TOKENS=Xa;exports.MOBILE_BREAKPOINT=Ia;exports.Menu=On;exports.Modal=Vt;exports.PageHeader=Oc;exports.Pagination=R_;exports.Panel=nl;exports.PanelForm=tl;exports.PanelRow=al;exports.Popover=Kn;exports.Price=dl;exports.Progress=Ma;exports.ProgressCircle=Fo;exports.PromptDialog=e_;exports.QuantityStepper=Hr;exports.Radio=ur;exports.RadioCard=gr;exports.RangeSlider=$r;exports.Rating=gl;exports.RatingInput=Fr;exports.ScrollArea=Cl;exports.SectionHeader=Nl;exports.SegmentedControl=Ds;exports.Select=zs;exports.Skeleton=Pl;exports.SkeletonCard=Kl;exports.SkeletonRows=Ul;exports.SkeletonTable=ql;exports.Spinner=Jt;exports.Stat=nd;exports.Steps=Pd;exports.Switch=nr;exports.TABLET_BREAKPOINT=Da;exports.TABLET_PORTRAIT_BREAKPOINT=ln;exports.Table=r_;exports.TableCheckbox=qr;exports.TableScroller=n_;exports.Tabs=Yd;exports.TagInput=ao;exports.TextLink=En;exports.Textarea=La;exports.Tile=Zd;exports.Timeline=du;exports.ToastHub=gd;exports.Tooltip=Ln;exports.UISize=Le;exports.UIVariant=be;exports.buildThemeCss=ya;exports.initHanui=Za;exports.isKeyboardOpeningElement=Ta;exports.matchesSearch=vt;exports.normalizeSearchTerm=Ut;exports.preventAutoKeyboard=Lt;exports.resolveTokens=Ja;exports.toast=pd;exports.useAnnounce=Rt;exports.useHanui=H;exports.useHanuiTheme=nn;exports.useListboxNavigation=Qt;exports.usePositioning=wt;exports.useScrollLock=kt;exports.useSheetViewport=Ca;exports.useVirtualList=ja;
|
|
22
22
|
//# sourceMappingURL=index.cjs.map
|