@domphy/ui 0.18.23 → 0.20.1

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/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var $r=Object.defineProperty,Ir=Object.defineProperties;var zr=Object.getOwnPropertyDescriptors;var Uo=Object.getOwnPropertySymbols;var Vr=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable;var Xo=(n,o,r)=>o in n?$r(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,A=(n,o)=>{for(var r in o||(o={}))Vr.call(o,r)&&Xo(n,r,o[r]);if(Uo)for(var r of Uo(o))Mr.call(o,r)&&Xo(n,r,o[r]);return n},Oe=(n,o)=>Ir(n,zr(o));import{toState as Jo}from"@domphy/core";import{themeColor as Ge,themeSize as _r,themeSpacing as Rr}from"@domphy/theme";function Rl(n={}){var e,a;let o=Jo((e=n.color)!=null?e:"neutral","color"),r=Jo((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>_r(t),backgroundColor:t=>Ge(t),color:t=>Ge(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Ge(t,"shift-7",o.get(t)),textUnderlineOffset:Rr(.72),cursor:"help","&:hover":{color:t=>Ge(t,"shift-11",r.get(t)),textDecorationColor:t=>Ge(t,"shift-9",r.get(t))}}}}import{toState as Zo}from"@domphy/core";import{themeColor as Xt,themeDensity as Hr,themeSpacing as Qo}from"@domphy/theme";function Bl(n={}){var a,t;let{type:o="single"}=n,r=Zo((a=n.color)!=null?a:"neutral","color"),e=Zo((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:i=>{if(o!=="single")return;let c=i.domElement;if(!c)return;let l=d=>{let s=d.target.closest("summary");if(!s)return;let m=s.closest("details");!m||m.parentElement!==c||m.open||Array.from(c.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};c.addEventListener("click",l),i.addHook("Remove",()=>c.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:i=>Qo(Hr(i)*1),outline:i=>`1px solid ${Xt(i,"shift-4",r.get(i))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:i=>`1px solid ${Xt(i,"shift-4",r.get(i))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:i=>`${Qo(.5)} solid ${Xt(i,"shift-6",e.get(i))}`}}}}import{toState as Ar}from"@domphy/core";import{themeColor as Jt,themeDensity as en,themeSize as Nr,themeSpacing as bt}from"@domphy/theme";function jl(n={}){var r;let o=Ar((r=n.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:bt(3),paddingBlock:e=>bt(en(e)*2),paddingInline:e=>bt(en(e)*4),boxShadow:e=>`inset ${bt(1)} 0 0 0 ${Jt(e,"shift-8",o.get(e))}`,backgroundColor:e=>Jt(e,"inherit",o.get(e)),color:e=>Jt(e,"shift-10",o.get(e)),fontSize:e=>Nr(e,"inherit")}}}import{toState as Br}from"@domphy/core";import{themeColor as tn,themeSize as Fr,themeSpacing as on}from"@domphy/theme";function Ul(n={}){var r;let o=Br((r=n.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:on(9),height:on(9),fontSize:e=>Fr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>tn(e,"inherit",o.get(e)),color:e=>tn(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as nn}from"@domphy/core";import{themeColor as rn,themeSize as Wr,themeSpacing as Zt}from"@domphy/theme";function Ql(n={}){var a;let{label:o=999}=n,r=nn(o),e=nn((a=n.color)!=null?a:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Zt(1),minWidth:Zt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>Wr(t,"decrease-1"),borderRadius:Zt(999),backgroundColor:t=>rn(t,"shift-9",e.get(t)),color:t=>rn(t,"shift-0",e.get(t))}}}}import{toState as Kr}from"@domphy/core";import{themeColor as an,themeDensity as ln,themeSize as jr,themeSpacing as Qt}from"@domphy/theme";function ns(n={}){var r;let o=Kr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>jr(e,"inherit"),backgroundColor:e=>an(e,"inherit",o.get(e)),boxShadow:e=>`inset ${Qt(1)} 0 0 0 ${an(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>Qt(ln(e)*2),paddingInline:e=>Qt(ln(e)*4),margin:0}}}import{toState as Yr}from"@domphy/core";import{themeColor as Ue,themeSize as qr,themeSpacing as sn}from"@domphy/theme";function ls(n={}){var e;let{separator:o="/"}=n,r=Yr((e=n.color)!=null?e:"neutral","color");return{_onInsert:a=>{a.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:a=>qr(a,"inherit"),gap:sn(1),color:a=>Ue(a,"shift-9",r.get(a)),backgroundColor:a=>Ue(a,"inherit",r.get(a)),"& > *":{display:"inline-flex",alignItems:"center",color:a=>Ue(a,"shift-8",r.get(a))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:a=>Ue(a,"shift-4",r.get(a)),paddingInlineStart:sn(1)},"& > [aria-current=page]":{color:a=>Ue(a,"shift-10",r.get(a)),pointerEvents:"none"}}}}import{toState as Gr}from"@domphy/core";import{themeColor as St,themeSize as Ur,themeSpacing as Ct}from"@domphy/theme";function us(n={}){var r;let o=Gr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>Ur(e,"inherit"),paddingInline:Ct(1),border:"none",background:"none",cursor:"pointer",color:e=>St(e,"shift-8",o.get(e)),borderRadius:Ct(1),"&:hover":{color:e=>St(e,"shift-10",o.get(e)),backgroundColor:e=>St(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${Ct(.5)} solid ${St(e,"shift-6",o.get(e))}`,outlineOffset:Ct(.5)}}}}import{toState as Xr}from"@domphy/core";import{themeColor as Z,themeDensity as vt,themeSize as Jr,themeSpacing as Xe}from"@domphy/theme";function fs(n={}){var r;let o=Xr((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Jr(e,"inherit"),paddingBlock:e=>Xe(vt(e)*1),paddingInline:e=>Xe(vt(e)*3),borderRadius:e=>Xe(vt(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>Xe(vt(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${Z(e,"shift-4",o.get(e))}`,color:e=>Z(e,"shift-9",o.get(e)),backgroundColor:e=>Z(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>Z(e,"shift-10",o.get(e)),backgroundColor:e=>Z(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Xe(.5)} ${Z(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>Z(e,"shift-2","neutral"),outline:e=>`1px solid ${Z(e,"shift-4","neutral")}`,color:e=>Z(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Zr}from"@domphy/core";import{themeColor as Je,themeDensity as Et,themeSize as Qr,themeSpacing as Ze}from"@domphy/theme";function Ss(n={}){var r;let o=Zr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Qr(e,"inherit"),paddingBlock:e=>Ze(Et(e)*1),paddingInline:e=>Ze(Et(e)*1),borderRadius:e=>Ze(Et(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>Ze(Et(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>Je(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>Je(e,"shift-9",o.get(e)),backgroundColor:e=>Je(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Ze(.5)} ${Je(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Je(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as eo}from"@domphy/core";import{themeColor as Le,themeSize as ei,themeSpacing as N}from"@domphy/theme";function ks(n={}){var t,i;let{checked:o=!1}=n,r=eo(o),e=eo((t=n.color)!=null?t:"neutral","color"),a=eo((i=n.accentColor)!=null?i:"primary","accentColor");return{_onSchedule:c=>{c.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:c=>r.get(c),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:c=>ei(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${Le(c,"shift-3",e.get(c))}`,minWidth:N(12),minHeight:N(6),borderRadius:N(999),paddingLeft:N(7),paddingRight:N(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>Le(c,"inherit",e.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:N(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:N(5),height:N(5),borderRadius:N(999),color:c=>Le(c,"shift-9"),backgroundColor:c=>Le(c,"decrease-2",e.get(c))},"&[aria-checked=true]":{backgroundColor:c=>Le(c,"increase-3",a.get(c)),outline:"none",color:c=>Le(c,"decrease-2"),paddingLeft:N(2),paddingRight:N(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${N(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ti}from"@domphy/core";import{themeColor as $e,themeDensity as se,themeSpacing as Q}from"@domphy/theme";function Ds(n={}){var r;let o=ti((r=n.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>Q(se(e)*2),backgroundColor:e=>$e(e,"inherit",o.get(e)),color:e=>$e(e,"shift-10",o.get(e)),outline:e=>`1px solid ${$e(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>Q(se(e)*2),paddingInline:e=>Q(se(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>Q(se(e)*4),color:e=>$e(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>Q(se(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>Q(se(e)*4),color:e=>$e(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:Q(2),paddingBlock:e=>Q(se(e)*2),paddingInline:e=>Q(se(e)*4),borderTop:e=>`1px solid ${$e(e,"shift-3",o.get(e))}`}}}}import{toState as oi}from"@domphy/core";import{themeColor as cn,themeSize as ni,themeSpacing as to}from"@domphy/theme";function $s(n={}){var r;let o=oi((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>ni(e,"inherit"),color:e=>cn(e,"shift-9",o.get(e)),backgroundColor:e=>cn(e,"inherit",o.get(e)),height:to(6),paddingInline:to(1.5),borderRadius:to(1)}}}import{merge as oo,toState as no}from"@domphy/core";import{themeColor as Qe,themeDensity as ro,themeSize as mn,themeSpacing as ve}from"@domphy/theme";import{behavior as ri,merge as ii,toState as ai}from"@domphy/core";import{autoUpdate as li,computePosition as si,flip as ci,offset as mi,shift as ui}from"@domphy/floating";function di(n,o){var D;let{openState:r,placement:e,content:a,keepOpenOnContentHover:t}=o,i=null,c=null,l=null,d=null,s=!1,m=n.domElement,y=n.getRoot(),g={style:{position:"fixed",pointerEvents:"auto",visibility:k=>r.get(k)?"visible":"hidden"},onKeyDown:k=>{k.key==="Escape"&&C()},onMouseEnter:()=>t&&v(),onMouseLeave:()=>t&&C(),_onMount:k=>{var P;if(l=k.domElement,m&&l&&!l.hasAttribute("data-theme")){let F=(P=m.closest("[data-theme]"))==null?void 0:P.getAttribute("data-theme");F&&l.setAttribute("data-theme",F)}},_portal:k=>{let P=k.domElement.querySelector("#domphy-floating");if(!P){let F={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};P=k.children.insert(F).domElement}return P}},u=k=>ii(k,g);u(a);let p=()=>{s||(s=!0,d=y.children.insert(a))},h=()=>{p(),m&&l&&(c==null||c(),c=li(m,l,()=>{si(m,l,{placement:e.get(),middleware:[mi(12),ci(),ui()],strategy:"fixed"}).then(({x:k,y:P,placement:F})=>{l&&(Object.assign(l.style,{left:`${k}px`,top:`${P}px`}),e.set(F))})}),r.set(!0))},S=()=>{c==null||c(),c=null,d&&(d.remove(),d=null),l=null,s=!1,r.set(!1)},v=()=>{i&&clearTimeout(i),i=setTimeout(h,100)},C=()=>{i&&clearTimeout(i),i=setTimeout(S,100)},T=k=>{if(!r.get()||!m||!l)return;let P=k.target;!m.contains(P)&&!l.contains(P)&&C()};return(D=y.domElement)==null||D.addEventListener("click",T),{show:v,hide:C,update(k){r=k.openState,e=k.placement,a=k.content,t=k.keepOpenOnContentHover,u(a),d&&d.patch(a)},destroy(){var k;i&&clearTimeout(i),c==null||c(),d==null||d.remove(),(k=y.domElement)==null||k.removeEventListener("click",T)}}}function j(n){let{kind:o,open:r=!1,placement:e}=n,a=ai(r),t=`floating:${o}`,i=d=>{var s;return(s=d==null?void 0:d.getBehavior(t))==null?void 0:s.show()},c=d=>{var s;return(s=d==null?void 0:d.getBehavior(t))==null?void 0:s.hide()},l=A({onKeyDown:(d,s)=>d.key==="Escape"&&c(s)},ri(t,di,{openState:a,placement:e,content:n.content,keepOpenOnContentHover:!!n.keepOpenOnContentHover}));return{show:i,hide:c,anchorPartial:l}}import{toState as pi}from"@domphy/core";import{themeColor as kt,themeSize as hi,themeSpacing as ee}from"@domphy/theme";var fi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function xt(n={}){var e;let{removable:o=!1}=n,r=pi((e=n.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:a=>{let t={span:fi,onClick:i=>{i.stopPropagation(),a.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:ee(1),width:ee(4),height:ee(4),flexShrink:0,"&:hover":{backgroundColor:i=>kt(i,"shift-4",r.get(i))}}};o&&a.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:ee(6),paddingBlock:0,borderRadius:ee(1),paddingInlineStart:ee(2),paddingInlineEnd:o?ee(1):ee(2),gap:ee(2),fontSize:a=>hi(a,"inherit"),backgroundColor:a=>kt(a,"inherit",r.get(a)),color:a=>kt(a,"shift-9",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${kt(a,"shift-4",r.get(a))}`}}}function Ks(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=no(n.value),c=no(a),{show:l,hide:d,anchorPartial:s}=j({kind:"combobox",open:c,placement:no(r),content:n.content}),m={onClick:(h,S)=>!t&&d(S)};oo(n.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:ve(6),marginInlineStart:ve(2),fontSize:h=>mn(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)},g;if(n.input){let h={onFocus:(S,v)=>l(v),style:y,_key:"combobox-input"};oo(n.input,h),g=n.input}else g={input:null,onFocus:(h,S)=>l(S),value:h=>(i.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let S=i.get(h),v=Array.isArray(S)?S:[S],T=o.filter(D=>v.includes(D.value)).map(D=>({span:D.label,$:[xt({color:e,removable:!0})],_key:D.value,_onRemove:k=>{let P=i.get(),Ce=(Array.isArray(P)?P:[P]).filter(ae=>ae!==D.value);t?i.set(Ce):i.set(Ce[0])}}));return T.push(g),T},style:{display:"flex",flexWrap:"wrap",gap:ve(1)}},p={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:ve(32),outlineOffset:"-1px",outline:h=>`1px solid ${Qe(h,"shift-4","neutral")}`,paddingBlock:h=>ve(ro(h)*1),paddingInline:h=>ve(ro(h)*1),borderRadius:h=>ve(ro(h)*1),fontSize:h=>mn(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)}};return oo(s,p),s}import{merge as gi,toState as yi}from"@domphy/core";import{themeColor as te,themeDensity as wt,themeSize as un,themeSpacing as Ie}from"@domphy/theme";function Gs(){return{_onSchedule:(n,o)=>{gi(o,{_context:{command:{query:yi("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Us(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let a=e.getContext("command");if(!a){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,i=()=>a.query.set(t.value);t.addEventListener("input",i),e.addHook("Remove",()=>t.removeEventListener("input",i))},style:{fontFamily:"inherit",fontSize:e=>un(e,"inherit"),paddingInline:e=>Ie(wt(e)*3),paddingBlock:e=>Ie(wt(e)*2),border:"none",borderBottom:e=>`1px solid ${te(e,"shift-3",o)}`,outline:"none",color:e=>te(e,"shift-10",o),backgroundColor:e=>te(e,"inherit",o),"&::placeholder":{color:e=>te(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>te(e,"shift-6",r)}}}}function Xs(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{role:"option",_onMount:e=>{var d,s;let a=e.getContext("command");if(!a){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,i=(s=(d=t.textContent)==null?void 0:d.toLowerCase())!=null?s:"",c=m=>{t.hidden=m.length>0&&!i.includes(m.toLowerCase())};c(a.query.get());let l=a.query.addListener(c);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>un(e,"inherit"),height:e=>Ie(6+wt(e)*2),paddingInline:e=>Ie(wt(e)*3),border:"none",outline:"none",color:e=>te(e,"shift-9",o),backgroundColor:e=>te(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>te(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${Ie(.5)} solid ${te(e,"shift-6",r)}`,outlineOffset:`-${Ie(.5)}`}}}}import{merge as bi,toState as oe}from"@domphy/core";import{themeColor as $,themeSize as ze,themeSpacing as I}from"@domphy/theme";var z=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),Ee=(n,o)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+o),io=(n,o)=>new Date(n.getFullYear(),n.getMonth()+o,n.getDate()),et=(n,o)=>!!n&&!!o&&n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate(),ao=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,lo=(n,o)=>Ee(n,-((n.getDay()-o+7)%7));function Si(n){var o,r;try{let e=new Intl.Locale(n),a=(r=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?r:e.weekInfo;if(a!=null&&a.firstDay)return a.firstDay%7}catch(e){}return 0}function tc(n={}){var jo,Yo,qo,Go;let{mode:o="single",time:r=!1,min:e,max:a,disabledDate:t,locale:i=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:l}=n,d=(jo=n.weekStartsOn)!=null?jo:Si(i),s=oe((Yo=n.accentColor)!=null?Yo:"primary","accentColor"),m=oe((qo=n.placement)!=null?qo:"bottom-start"),y=oe((Go=n.value)!=null?Go:o==="range"?[null,null]:null),g=l?y.addListener(f=>l(f)):null,u=(()=>{let f=y.get(),b=o==="range"?f==null?void 0:f[0]:f;return b instanceof Date?b:new Date})(),p=oe(u.getFullYear(),"viewYear"),h=oe(u.getMonth(),"viewMonth"),S=oe(z(u),"focused"),v=oe(null,"hovered"),C=oe(u.getHours(),"hour"),T=oe(u.getMinutes(),"minute"),D=null,k=new Intl.DateTimeFormat(i,A({dateStyle:"medium"},r?{timeStyle:"short"}:{})),P=new Intl.DateTimeFormat(i,{month:"long",year:"numeric"}),F=new Intl.DateTimeFormat(i,{weekday:"short"}),Ce=new Intl.DateTimeFormat(i,{dateStyle:"full"}),ae=f=>f?k.format(f):"",fr=f=>{if(c)return c(f);if(o==="range"){let[b,E]=f!=null?f:[null,null];return b?`${ae(b)} \u2013 ${ae(E)}`:""}return ae(f)},gr=Array.from({length:7},(f,b)=>F.format(new Date(2023,0,1+(b+d)%7))),Bo=f=>!!e&&z(f)<z(e)||!!a&&z(f)>z(a)||!!t&&t(f),le=f=>{if(!r)return z(f);let b=z(f);return b.setHours(C.get(),T.get(),0,0),b},Fo=f=>{var x;if(Bo(f))return;if(o==="single"){y.set(le(f)),r||Gt();return}let[b,E]=(x=y.get())!=null?x:[null,null];!b||b&&E?y.set([le(f),null]):z(f)<z(b)?(y.set([le(f),le(b)]),r||Gt()):(y.set([b,le(f)]),r||Gt())},yr=()=>{var f;if(r)if(o==="single"){let b=y.get();b&&y.set(le(b))}else{let[b,E]=(f=y.get())!=null?f:[null,null];y.set([b&&le(b),E&&le(E)])}},br=(f,b)=>{var Pe;if(o!=="range")return!1;let[E,x]=(Pe=y.get(b))!=null?Pe:[null,null],O=x!=null?x:v.get(b);if(!E||!O)return!1;let w=z(E)<=z(O)?E:O,H=z(E)<=z(O)?O:E,_=z(f);return _>=z(w)&&_<=z(H)},Sr=(f,b)=>{let E=y.get(b);if(o==="range"){let[x,O]=E!=null?E:[null,null];return et(f,x)||et(f,O)}return et(f,E)},yt=f=>{p.set(f.getFullYear()),h.set(f.getMonth())},Wo=f=>{let b=io(new Date(p.get(),h.get(),1),f);yt(b)},Ko=f=>p.set(p.get()+f),Yt=()=>{setTimeout(()=>{var f;(f=D==null?void 0:D.querySelector(`[data-date="${ao(S.get())}"]`))==null||f.focus()},0)},Cr=wr(),{show:vr,hide:Er,anchorPartial:qt}=j({kind:"datePicker",open:!1,placement:m,content:Cr});function Gt(){Er()}qt.onClick=()=>{};let kr={type:"text",readonly:!0,value:f=>fr(y.get(f)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(f,b)=>{Ut(b)},onFocus:(f,b)=>{Ut(b)},onKeyDown:(f,b)=>{let E=f.key;(E==="ArrowDown"||E==="Enter")&&(f.preventDefault(),Ut(b))},_onMount:f=>g&&f.addHook("Remove",()=>{g()})};function Ut(f){var E;let b=(E=xr())!=null?E:new Date;S.set(z(b)),yt(b),vr(f),Yt()}function xr(){var b;let f=y.get();return o==="range"?(b=f==null?void 0:f[0])!=null?b:null:f!=null?f:null}return bi(qt,kr),qt;function wr(){let f=(w,H,_)=>({button:w,type:"button",ariaLabel:H,onClick:_,style:Ci()}),b={div:[f("\xAB","Previous year",()=>Ko(-1)),f("\u2039","Previous month",()=>Wo(-1)),{div:w=>P.format(new Date(p.get(w),h.get(w),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:w=>ze(w)}},f("\u203A","Next month",()=>Wo(1)),f("\xBB","Next year",()=>Ko(1))],style:{display:"flex",alignItems:"center",gap:I(1),marginBottom:I(2)}},E={div:gr.map((w,H)=>({div:w,style:{textAlign:"center",fontSize:_=>ze(_,"decrease-1"),fontWeight:"600",color:_=>$(_,"shift-7"),paddingBlock:I(1)},_key:H})),role:"row",style:dn()},x={div:w=>Tr(w),role:"grid",ariaLabel:"Calendar",onKeyDown:Lr,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:I(.5)}},O=[b,E,x];return r&&O.push(Pr()),O.push(Or()),{div:O,role:"dialog",ariaModal:"false",_onMount:w=>{D=w.domElement},style:{minWidth:I(70),padding:I(3),borderRadius:I(2),backgroundColor:w=>$(w,"base"),color:w=>$(w,"shift-10"),border:w=>`1px solid ${$(w,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Tr(f){let b=new Date(p.get(f),h.get(f),1),E=h.get(f),x=lo(b,d),O=[];for(let w=0;w<6;w++){let H=[];for(let _=0;_<7;_++){let Pe=Ee(x,w*7+_);H.push(Dr(Pe,E,f))}O.push({div:H,role:"row",style:dn(),_key:w})}return O}function Dr(f,b,E){let x=Bo(f),O=Sr(f,E),w=br(f,E),H=f.getMonth()!==b,_=et(f,S.get(E)),Pe=et(f,new Date);return{button:String(f.getDate()),type:"button",role:"gridcell",tabIndex:_?0:-1,ariaSelected:O,ariaDisabled:x,disabled:x,ariaLabel:Ce.format(f),dataDate:ao(f),onClick:()=>Fo(f),onMouseEnter:()=>o==="range"&&v.set(f),style:{appearance:"none",border:"none",cursor:x?"not-allowed":"pointer",aspectRatio:"1",borderRadius:I(1),fontSize:L=>ze(L),fontFamily:"inherit",opacity:x?.35:H?.5:1,backgroundColor:L=>O?$(L,"shift-7",s.get(L)):w?$(L,"shift-2",s.get(L)):"transparent",color:L=>O?$(L,"shift-0",s.get(L)):$(L,"shift-9"),outline:Pe?L=>`1px solid ${$(L,"shift-6",s.get(L))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:L=>O?$(L,"shift-7",s.get(L)):$(L,"shift-3",s.get(L))},"&:focus-visible":{outline:L=>`2px solid ${$(L,"shift-6",s.get(L))}`}},_key:ao(f)}}function Pr(){let f=(b,E,x)=>({select:Array.from({length:b},(O,w)=>({option:String(w).padStart(2,"0"),value:String(w),selected:H=>E.get(H)===w,_key:w})),ariaLabel:x,onChange:O=>{E.set(Number(O.target.value)),yr()},style:vi()});return{div:[f(24,C,"Hour"),{span:":",style:{fontWeight:"600"}},f(60,T,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:I(1),marginTop:I(3)}}}function Or(){let f=(b,E)=>({button:b,type:"button",onClick:E,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:x=>ze(x,"decrease-1"),color:x=>$(x,"shift-8",s.get(x)),padding:I(1)}});return{div:[f("Today",()=>{let b=new Date;S.set(z(b)),yt(b),Yt()}),f("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:I(2),paddingTop:I(2),borderTop:b=>`1px solid ${$(b,"shift-3")}`}}}function Lr(f){let b=f,E=S.get(),x=null;switch(b.key){case"ArrowLeft":x=Ee(E,-1);break;case"ArrowRight":x=Ee(E,1);break;case"ArrowUp":x=Ee(E,-7);break;case"ArrowDown":x=Ee(E,7);break;case"Home":x=lo(E,d);break;case"End":x=Ee(lo(E,d),6);break;case"PageUp":x=io(E,b.shiftKey?-12:-1);break;case"PageDown":x=io(E,b.shiftKey?12:1);break;case"Enter":case" ":b.preventDefault(),Fo(E);return;default:return}b.preventDefault(),S.set(x),yt(x),Yt()}}function dn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:I(.5)}}function Ci(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:n=>ze(n),color:n=>$(n,"shift-8"),width:I(7),height:I(7),borderRadius:I(1),"&:hover":{backgroundColor:n=>$(n,"shift-3")}}}function vi(){return{fontFamily:"inherit",fontSize:n=>ze(n),padding:I(1),borderRadius:I(1),border:n=>`1px solid ${$(n,"shift-4")}`,backgroundColor:n=>$(n,"base"),color:n=>$(n,"shift-9")}}import{toState as Ei}from"@domphy/core";import{themeColor as pn,themeSize as hn,themeSpacing as fn}from"@domphy/theme";function ac(n={}){var r;let o=Ei((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${fn(24)}, max-content) 1fr`,columnGap:fn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>hn(e,"inherit"),color:e=>pn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>hn(e,"inherit"),color:e=>pn(e,"shift-9",o.get(e))}}}}import{toState as gn}from"@domphy/core";import{themeColor as ce,themeDensity as tt,themeSize as yn,themeSpacing as V}from"@domphy/theme";function mc(n={}){var a,t;let{duration:o=240}=n,r=gn((a=n.color)!=null?a:"neutral","color"),e=gn((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:i=>{i.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:i=>yn(i,"inherit"),color:i=>ce(i,"shift-9",r.get(i)),backgroundColor:i=>ce(i,"inherit",r.get(i)),overflow:"hidden","& > summary":{backgroundColor:i=>ce(i,"shift-2",r.get(i)),color:i=>ce(i,"shift-10",r.get(i)),fontSize:i=>yn(i,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:V(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:i=>V(tt(i)*4),height:V(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:V(2),height:V(2),flexShrink:0,marginTop:`-${V(.5)}`,borderInlineEnd:i=>`${V(.5)} solid ${ce(i,"shift-9",r.get(i))}`,borderBottom:i=>`${V(.5)} solid ${ce(i,"shift-9",r.get(i))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:i=>ce(i,"shift-3",r.get(i))},"& > summary:focus-visible":{borderRadius:i=>V(tt(i)*2),outlineOffset:`-${V(.5)}`,outline:i=>`${V(.5)} solid ${ce(i,"shift-6",e.get(i))}`},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:i=>V(tt(i)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:V(250),opacity:1,paddingTop:i=>V(tt(i)*1),paddingBottom:i=>V(tt(i)*3)}}}}import{toState as ki}from"@domphy/core";import{themeColor as Dt,themeDensity as xi,themeSize as wi,themeSpacing as so}from"@domphy/theme";var ot=0;function Tt(){ot++,ot===1&&(document.body.style.overflow="hidden")}function Ve(){ot=Math.max(0,ot-1),ot===0&&(document.body.style.overflow="")}var bn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function gc(n={}){let{color:o="neutral",open:r=!1}=n,e=ki(r),a=null,t=!1,i=!1,c=l=>{t=!1,l.close(),i&&(Ve(),i=!1),a==null||a.focus(),a=null};return{_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(l,d)=>{if(l.target!==d.domElement)return;let s=d.domElement.getBoundingClientRect();l.clientX>=s.left&&l.clientX<=s.right&&l.clientY>=s.top&&l.clientY<=s.bottom||e.set(!1)},onTransitionEnd:(l,d)=>{t&&l.target===d.domElement&&l.propertyName==="opacity"&&c(d.domElement)},_onMount:l=>{let d=l.domElement;d.setAttribute("aria-modal","true");let s=null,m=p=>{if(p.key!=="Tab")return;let h=Array.from(d.querySelectorAll(bn)).filter(C=>!C.closest("[aria-hidden='true']")&&C.offsetParent!==null);if(!h.length){p.preventDefault();return}let S=h[0],v=h[h.length-1];p.shiftKey?(document.activeElement===S||document.activeElement===d)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),S.focus())},y=p=>{p.preventDefault(),e.set(!1)};d.addEventListener("cancel",y);let g=p=>{p?(a=document.activeElement,d.showModal(),i||(Tt(),i=!0),d.addEventListener("keydown",m),requestAnimationFrame(()=>{d.style.opacity="1";let h=d.querySelector(bn);h==null||h.focus()})):(t=!0,d.style.opacity="0",d.removeEventListener("keydown",m),s=setTimeout(()=>{s=null,t&&c(d)},350))};g(e.get());let u=e.addListener(g);l.addHook("Remove",()=>{s&&(clearTimeout(s),s=null),u(),d.removeEventListener("cancel",y),i&&(Ve(),i=!1),d.removeEventListener("keydown",m),a==null||a.focus(),a=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:l=>wi(l,"inherit"),color:l=>Dt(l,"shift-10",o),backgroundColor:l=>Dt(l,"inherit",o),border:"none",padding:l=>so(xi(l)*3),boxShadow:l=>`0 ${so(9)} ${so(16)} ${Dt(l,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:l=>Dt(l,"shift-2","neutral"),opacity:.75}}}}import{toState as Ti}from"@domphy/core";import{themeColor as Pt,themeSize as Di,themeSpacing as Pi}from"@domphy/theme";function Cc(n={}){var r;let o=Ti((r=n.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:Pi(2),fontSize:e=>Di(e,"inherit"),backgroundColor:e=>Pt(e),color:e=>Pt(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Pt(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Pt(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as Oi}from"@domphy/core";import{themeColor as Ot,themeDensity as Li,themeSize as $i,themeSpacing as nt}from"@domphy/theme";var co={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Sn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},rt=n=>n==="left"||n==="right";function Cn(n,o){return n==="start"?o?"right":"left":n==="end"?o?"left":"right":n}function wc(n={}){let{color:o="neutral",open:r=!1,placement:e="end",size:a}=n,t=Oi(r),i=e==="start"||e==="end",c=Cn(e,!1),l=rt(c)?nt(80):nt(64),d=a!=null?a:l;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,m)=>{s.target===m.domElement&&t.set(!1)},_onMount:s=>{let m=s.domElement;m.setAttribute("aria-modal","true");let y=k=>{k.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let g=i&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=Cn(e,g);i&&(m.style.transform=co[u],m.style.margin=Sn[u],m.style.width=rt(u)?d:"100dvw",m.style.height=rt(u)?"100dvh":d);let p=!1,h=!1,S=null,v=()=>{S=null,p&&(p=!1,m.close(),h&&(Ve(),h=!1))},C=k=>{k.target===m&&k.propertyName==="transform"&&v()};m.addEventListener("transitionend",C);let T=k=>{k?(p=!1,m.showModal(),h||(Tt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(p=!0,m.style.transform=co[u],S=setTimeout(v,350))};T(t.get());let D=t.addListener(T);s.addHook("Remove",()=>{S&&(clearTimeout(S),S=null),D(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",C),h&&(Ve(),h=!1)})},style:{transform:co[c],transition:"transform 0.25s ease",fontSize:s=>$i(s,"inherit"),color:s=>Ot(s,"shift-10",o),backgroundColor:s=>Ot(s,"inherit",o),border:"none",padding:s=>nt(Li(s)*3),margin:Sn[c],width:rt(c)?d:"100dvw",height:rt(c)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${nt(4)} ${nt(12)} ${Ot(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ot(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Ii}from"@domphy/core";import{themeColor as zi,themeSize as Vi}from"@domphy/theme";function Oc(n={}){var r;let o=Ii((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Vi(e,"inherit"),fontStyle:"italic",color:e=>zi(e,"shift-10",o.get(e))}}}import{toState as Mi}from"@domphy/core";import{themeColor as vn,themeSpacing as mo}from"@domphy/theme";function zc(n={}){var r;let o=Mi((r=n.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:mo(3),paddingBlock:mo(12),paddingInline:mo(6),textAlign:"center",color:e=>vn(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>vn(e,"shift-5",o.get(e))}}}}function Mc(n={}){return{_onError:(o,r,e)=>{var t,i;(t=n.onError)==null||t.call(n,r);let a=typeof n.fallback=="function"?n.fallback(r,e):(i=n.fallback)!=null?i:{div:"An error occurred."};o.children.update([a])}}}import{toState as _i}from"@domphy/core";import{themeColor as Me,themeSize as Ri,themeSpacing as it}from"@domphy/theme";var Hi={small:8,medium:10,large:14};function Ac(n={}){var e,a;let o=_i((e=n.color)!=null?e:"primary","color"),r=it(Hi[(a=n.size)!=null?a:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:r,height:r,borderRadius:"50%",fontSize:t=>Ri(t,"inherit"),backgroundColor:t=>Me(t,"shift-9",o.get(t)),color:t=>Me(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${it(1)} ${it(4)} ${Me(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>Me(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${it(2)} ${it(6)} ${Me(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${Me(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ai}from"@domphy/core";import{themeColor as En,themeSize as Ni,themeSpacing as Lt}from"@domphy/theme";function Wc(n={}){var r;let o=Ai((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Lt(2),marginInline:0,marginTop:Lt(3),marginBottom:Lt(3),color:e=>En(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Lt(2)},"& figcaption":{fontSize:e=>Ni(e,"decrease-1"),color:e=>En(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Bi}from"@domphy/core";import{themeColor as $t,themeDensity as _e,themeSize as uo,themeSpacing as ne}from"@domphy/theme";function qc(n={}){var a;let{layout:o="horizontal"}=n,r=Bi((a=n.color)!=null?a:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>ne(_e(t)*3),paddingBlock:t=>ne(_e(t)*3),border:"none",borderRadius:t=>ne(_e(t)*2),fontSize:t=>uo(t,"inherit"),backgroundColor:t=>$t(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:ne(4),rowGap:ne(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>uo(t,"inherit"),fontWeight:600,paddingBlock:t=>ne(_e(t)*1),borderRadius:t=>ne(_e(t)*2),color:t=>$t(t,"shift-9",r.get(t)),backgroundColor:t=>$t(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:ne(_e(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${ne(2)} * -1)`,fontSize:t=>uo(t,"decrease-1"),color:t=>$t(t,"shift-9",r.get(t))}}}}import{toState as Fi}from"@domphy/core";import{themeColor as Wi,themeSize as Ki,themeSpacing as ji}from"@domphy/theme";var Yi={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Jc(n={}){var r;let o=Fi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Wi(e,"shift-11",o.get(e)),marginTop:0,marginBottom:ji(2),fontSize:e=>{let a=Yi[e.elementNode.tagName]||"inherit";return Ki(e,a)}}}}import{toState as qi}from"@domphy/core";import{themeColor as Gi,themeSpacing as kn}from"@domphy/theme";function tm(n={}){var r;let o=qi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:kn(3),marginBottom:kn(3),backgroundColor:e=>Gi(e,"shift-4",o.get(e))}}}import{toState as Ui}from"@domphy/core";import{themeColor as Xi,themeSize as Ji,themeSpacing as xn}from"@domphy/theme";function im(n={}){var r;let o=Ui((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:xn(4),height:xn(4),flexShrink:"0",fontSize:e=>Ji(e),backgroundColor:"transparent",color:e=>Xi(e,"shift-9",o.get(e))}}}import{toState as Zi}from"@domphy/core";import{themeColor as Qi,themeSpacing as ea}from"@domphy/theme";function cm(n={}){var r;let o=Zi((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:ea(2),backgroundColor:e=>Qi(e,"inherit",o.get(e))}}}import{toState as wn}from"@domphy/core";import{themeColor as R,themeSize as ta,themeSpacing as me}from"@domphy/theme";function pm(n={}){var e,a;let o=wn((e=n.color)!=null?e:"neutral","color"),r=wn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>ta(t,"inherit"),display:"inline-flex",position:"relative",width:me(6),height:me(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:me(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${R(t,"shift-4",o.get(t))}`,color:t=>R(t,"shift-9",o.get(t)),width:me(4),height:me(4)},"&:hover::before":{backgroundColor:t=>R(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>R(t,"shift-7",r.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${me(.5)} solid ${R(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>R(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:me(1.5),outline:t=>`${me(.5)} solid ${R(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>R(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as Tn,themeDensity as at,themeSize as oa,themeSpacing as lt}from"@domphy/theme";function gm(n={}){return{type:"color",_onSchedule:(o,r)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),r.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>oa(o,"inherit"),paddingBlock:o=>lt(at(o)*1),paddingInline:o=>lt(at(o)*1),blockSize:o=>lt(6+at(o)*2),inlineSize:o=>lt(6+at(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>lt(at(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>Tn(o,"shift-2","neutral"),outline:o=>`1px solid ${Tn(o,"shift-4","neutral")}`}}}}import{toState as Dn}from"@domphy/core";import{themeColor as ue,themeDensity as po,themeSize as na,themeSpacing as st}from"@domphy/theme";function Cm(n={}){var a,t;let{mode:o="datetime-local"}=n,r=Dn((a=n.color)!=null?a:"neutral","color"),e=Dn((t=n.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(i,c)=>{i.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=o},style:{fontFamily:"inherit",fontSize:i=>na(i,"inherit"),lineHeight:"inherit",color:i=>ue(i,"shift-9",r.get(i)),backgroundColor:i=>ue(i,"inherit",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${ue(i,"shift-4",r.get(i))}`,borderRadius:i=>st(po(i)*1),paddingInline:i=>st(po(i)*3),height:i=>st(6+po(i)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:i=>`${st(.5)} solid ${ue(i,"shift-6",e.get(i))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>ue(i,"shift-8","neutral"),backgroundColor:i=>ue(i,"shift-2","neutral"),outline:i=>`1px solid ${ue(i,"shift-4","neutral")}`},"&:invalid":{outline:i=>`${st(.5)} solid ${ue(i,"shift-6","error")}`}}}}import{toState as Pn}from"@domphy/core";import{themeColor as W,themeDensity as It,themeSize as ra,themeSpacing as de}from"@domphy/theme";function xm(n={}){var e,a;let o=Pn((e=n.color)!=null?e:"neutral","color"),r=Pn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"file",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),i.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>ra(t,"inherit"),lineHeight:"inherit",color:t=>W(t,"shift-9",o.get(t)),backgroundColor:t=>W(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${W(t,"shift-4",o.get(t))}`,borderRadius:t=>de(It(t)*1),height:t=>de(6+It(t)*2),paddingInline:t=>de(It(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>de(It(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:de(1),height:de(6),paddingInline:de(2),cursor:"pointer",color:t=>W(t,"shift-11",o.get(t)),backgroundColor:t=>W(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${de(.5)} solid ${W(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>W(t,"shift-8","neutral"),outline:t=>`1px solid ${W(t,"shift-4","neutral")}`,backgroundColor:t=>W(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>W(t,"shift-8","neutral"),backgroundColor:t=>W(t,"shift-3","neutral")}}}}import{toState as On}from"@domphy/core";import{themeColor as ke,themeDensity as zt,themeSize as ia,themeSpacing as Re}from"@domphy/theme";function Pm(n={}){var e,a;let o=On((e=n.color)!=null?e:"neutral","color"),r=On((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"number",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),i.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Re(10),paddingInlineStart:t=>Re(zt(t)*3),paddingInlineEnd:t=>Re(zt(t)*1.5),paddingBlock:t=>Re(zt(t)*1),borderRadius:t=>Re(zt(t)*1),fontSize:t=>ia(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ke(t,"shift-4",o.get(t))}`,color:t=>ke(t,"shift-9",o.get(t)),backgroundColor:t=>ke(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${Re(.5)} solid ${ke(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>ke(t,"shift-2","neutral"),outline:t=>`1px solid ${ke(t,"shift-4","neutral")}`,color:t=>ke(t,"shift-8","neutral")}}}}import{toState as ho}from"@domphy/core";import{themeColor as Vt,themeDensity as Mt,themeSize as aa,themeSpacing as ct}from"@domphy/theme";var la='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',sa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function Im(n={}){var a,t;let o=ho((a=n.color)!=null?a:"neutral","color"),r=ho((t=n.accentColor)!=null?t:"primary","accentColor"),e=ho(!1);return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:i=>{let c={input:null,type:d=>e.get(d)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},l={button:d=>e.get(d)?sa:la,type:"button",ariaLabel:d=>e.get(d)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(c),i.children.insert(l)},style:{display:"flex",alignItems:"center",gap:i=>ct(Mt(i)*1),paddingBlock:i=>ct(Mt(i)*1),paddingInline:i=>ct(Mt(i)*3),borderRadius:i=>ct(Mt(i)*1),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Vt(i,"shift-4",o.get(i))}`,color:i=>Vt(i,"shift-9",o.get(i)),backgroundColor:i=>Vt(i,"inherit",o.get(i)),fontSize:i=>aa(i,"inherit"),"&:focus-within":{outline:i=>`${ct(.5)} solid ${Vt(i,"shift-6",r.get(i))}`}}}}import{themeSpacing as Ln}from"@domphy/theme";function Mm(){return{style:{display:"flex",alignItems:"center",gap:Ln(2),"& > *":{minWidth:`${Ln(9)}!important`}},_onMount:n=>{let o=n.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=i=>{let c=r(),l=i.target,d=c.indexOf(l);l.value&&d<c.length-1&&c[d+1].focus()},a=i=>{let c=r(),l=i.target,d=c.indexOf(l);i.key==="Backspace"&&!l.value&&d>0&&c[d-1].focus(),i.key==="ArrowLeft"&&d>0&&c[d-1].focus(),i.key==="ArrowRight"&&d<c.length-1&&c[d+1].focus()},t=i=>{var y,g,u;i.preventDefault();let c=(g=(y=i.clipboardData)==null?void 0:y.getData("text"))!=null?g:"",l=r(),d=l.indexOf(i.target),s=d===-1?0:d;[...c].forEach((p,h)=>{l[s+h]&&(l[s+h].value=p)});let m=Math.min(s+c.length-1,l.length-1);(u=l[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",a),o.addEventListener("paste",t),n.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",a),o.removeEventListener("paste",t)})}}}import{toState as $n}from"@domphy/core";import{themeColor as pe,themeSize as ca,themeSpacing as mt}from"@domphy/theme";function Am(n={}){var e,a;let o=$n((e=n.color)!=null?e:"neutral","color"),r=$n((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>ca(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:mt(6),height:mt(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${pe(t,"shift-4",o.get(t))}`,color:t=>pe(t,"shift-9",o.get(t)),width:mt(4),height:mt(4)},"&:hover::before":{backgroundColor:t=>pe(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${pe(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>pe(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>pe(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${mt(.5)} solid ${pe(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>pe(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as In}from"@domphy/core";import{themeColor as _t,themeSpacing as K}from"@domphy/theme";function Wm(n={}){var e,a;let o=In((e=n.color)!=null?e:"neutral","color"),r=In((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:K(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:K(1.5),borderRadius:K(999),backgroundColor:t=>_t(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:K(4),height:K(4),borderRadius:K(999),border:"none",marginTop:`calc((${K(1.5)} - ${K(4)}) / 2)`,backgroundColor:t=>_t(t,"shift-9",r.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>_t(t,"shift-10",r.get(t))},"&:focus-visible":{outline:t=>`${K(.5)} solid ${_t(t,"shift-6",r.get(t))}`,outlineOffset:K(1),borderRadius:K(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as zn}from"@domphy/core";import{themeColor as he,themeDensity as fo,themeSize as ma,themeSpacing as ut}from"@domphy/theme";function qm(n={}){var e,a;let o=zn((e=n.color)!=null?e:"neutral","color"),r=zn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"search",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),i.type="search"},style:{fontFamily:"inherit",fontSize:t=>ma(t,"inherit"),lineHeight:"inherit",color:t=>he(t,"shift-9",o.get(t)),backgroundColor:t=>he(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${he(t,"shift-4",o.get(t))}`,borderRadius:t=>ut(fo(t)*1),minWidth:ut(32),paddingInline:t=>ut(fo(t)*3),paddingBlock:t=>ut(fo(t)*1),"&::placeholder":{color:t=>he(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ut(.5)} solid ${he(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>he(t,"shift-8","neutral"),backgroundColor:t=>he(t,"shift-2","neutral"),outline:t=>`1px solid ${he(t,"shift-4","neutral")}`}}}}import{toState as ua}from"@domphy/core";import{themeColor as go,themeSize as Vn,themeSpacing as re}from"@domphy/theme";function Jm(n={}){var r;let o=ua((r=n.accentColor)!=null?r:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>Vn(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:re(9),height:re(6),cursor:"pointer",margin:"0",paddingBlock:re(1),"&:checked":{"&::before":{backgroundColor:e=>go(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${re(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:re(3),height:re(3),borderRadius:re(999),left:re(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>go(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:re(999),display:"inline-block",fontSize:e=>Vn(e,"inherit"),lineHeight:1,backgroundColor:e=>go(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Mn}from"@domphy/core";import{themeColor as B,themeDensity as yo,themeSize as da,themeSpacing as fe}from"@domphy/theme";function tu(n={}){var e,a;let o=Mn((e=n.color)!=null?e:"neutral","color"),r=Mn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"text",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),i.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:fe(10),paddingInline:t=>fe(yo(t)*3),paddingBlock:t=>fe(yo(t)*1),borderRadius:t=>fe(yo(t)*1),fontSize:t=>da(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${B(t,"shift-4",o.get(t))}`,color:t=>B(t,"shift-9",o.get(t)),backgroundColor:t=>B(t,"inherit",o.get(t)),"&::placeholder":{color:t=>B(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>B(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${fe(.5)} solid ${B(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>B(t,"shift-2","neutral"),outline:t=>`1px solid ${B(t,"shift-4","neutral")}`,color:t=>B(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${fe(.5)} solid ${B(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${fe(.5)} solid ${B(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${fe(.5)} solid ${B(t,"shift-6","warning")}`}}}}import{toState as pa}from"@domphy/core";import{themeColor as bo,themeSize as ha,themeSpacing as So}from"@domphy/theme";function iu(n={}){var r;let o=pa((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>ha(e,"inherit"),color:e=>bo(e,"shift-9",o.get(e)),backgroundColor:e=>bo(e,"inherit",o.get(e)),paddingBlock:So(.5),paddingInline:So(1.5),borderRadius:So(1),outline:e=>`1px solid ${bo(e,"shift-4",o.get(e))}`}}}import{toState as _n}from"@domphy/core";import{themeColor as Co,themeSize as fa,themeSpacing as ga}from"@domphy/theme";function cu(n={}){var e,a;let o=_n((e=n.color)!=null?e:"neutral","color"),r=_n((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:ga(2),fontSize:t=>fa(t,"inherit"),color:t=>Co(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>Co(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>Co(t,"shift-8","neutral")}}}}import{toState as Rn}from"@domphy/core";import{themeColor as He,themeSize as ya,themeSpacing as vo}from"@domphy/theme";function pu(n={}){var e,a;let o=Rn((e=n.color)!=null?e:"primary","color"),r=Rn((a=n.accentColor)!=null?a:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>ya(t,"inherit"),backgroundColor:t=>He(t),color:t=>He(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>He(t,"shift-9",r.get(t))},"&:hover:not([disabled])":{color:t=>He(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:vo(1),outlineOffset:vo(1),outline:t=>`${vo(.5)} solid ${He(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>He(t,"shift-8","neutral")}}}}import{toState as ba}from"@domphy/core";import{themeColor as ie,themeDensity as Rt,themeSize as Sa,themeSpacing as dt}from"@domphy/theme";function yu(n={}){var r;let o=ba((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:e=>Sa(e,"inherit"),textDecoration:"none",paddingBlock:e=>dt(Rt(e)*1),paddingInline:e=>dt(Rt(e)*3),borderRadius:e=>dt(Rt(e)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>dt(Rt(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${ie(e,"shift-4",o.get(e))}`,color:e=>ie(e,"shift-9",o.get(e)),backgroundColor:e=>ie(e,"inherit",o.get(e)),"&:hover":{color:e=>ie(e,"shift-10",o.get(e)),backgroundColor:e=>ie(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${dt(.5)} ${ie(e,"shift-6",o.get(e))}`},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>ie(e,"shift-2","neutral"),outline:e=>`1px solid ${ie(e,"shift-4","neutral")}`,color:e=>ie(e,"shift-8","neutral")}}}}import{toState as Ca}from"@domphy/core";import{themeColor as pt,themeDensity as xe,themeSize as Hn,themeSpacing as we}from"@domphy/theme";function vu(n={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Eu(n={}){let{dense:o=!1}=n;return{style:{display:"flex",alignItems:"center",gap:r=>we(xe(r)*2),paddingBlock:r=>we(o?1:xe(r)*2),paddingInline:r=>we(xe(r)*3),fontSize:r=>Hn(r,"inherit")}}}function ku(n={}){var a,t;let o=Ca((a=n.color)!=null?a:"neutral","color"),r=(t=n.accentColor)!=null?t:"primary",{dense:e=!1}=n;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:i=>we(xe(i)*2),paddingBlock:i=>we(e?1:xe(i)*2),paddingInline:i=>we(xe(i)*3),fontSize:i=>Hn(i,"inherit"),color:i=>pt(i,"shift-9",o.get(i)),borderRadius:i=>we(xe(i)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:i=>pt(i,"shift-2",o.get(i))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:i=>pt(i,"shift-3",r),color:i=>pt(i,"shift-12",r)},"&:focus-visible":{outline:i=>`2px solid ${pt(i,"shift-6",r)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as va}from"@domphy/core";import{themeColor as An,themeSize as Ea,themeSpacing as Eo}from"@domphy/theme";function Du(n={}){var r;let o=va((r=n.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>Ea(e,"inherit"),color:e=>An(e,"shift-9",o.get(e)),backgroundColor:e=>An(e,"inherit",o.get(e)),height:Eo(6),borderRadius:Eo(1),paddingInline:Eo(1.5)}}}import{toState as ka}from"@domphy/core";import{themeColor as Te,themeDensity as Ht,themeSize as Nn,themeSpacing as De}from"@domphy/theme";function $u(n={items:[]}){var i;let{items:o=[],selectable:r=!0,color:e="neutral",accentColor:a="primary"}=n,t=ka((i=n.activeKey)!=null?i:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(c,l)=>{if(o.length===0)return;let d=c.nodeId,s=o.map((m,y)=>{var u;let g=(u=m.key)!=null?u:y;return Oe(A({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:g,type:"button",id:`menuitem${d}${g}`,role:"menuitem"},r?{ariaCurrent:p=>t.get(p)===g||void 0}:{}),{onClick:()=>{var p;r&&t.set(g),(p=m.onClick)==null||p.call(m)},onKeyDown:p=>{var T;let h=p.key;if(h==="Enter"||h===" "){p.preventDefault(),p.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;p.preventDefault();let S=o.map((D,k)=>{var P;return(P=D.key)!=null?P:k}),v=S.indexOf(g),C=v;h==="ArrowDown"?C=(v+1)%S.length:h==="ArrowUp"?C=(v-1+S.length)%S.length:h==="Home"?C=0:h==="End"&&(C=S.length-1),(T=document.getElementById(`menuitem${d}${S[C]}`))==null||T.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:De(2),width:"100%",fontSize:p=>Nn(p,"inherit"),height:p=>De(6+Ht(p)*2),paddingInline:p=>De(Ht(p)*3),border:"none",outline:"none",color:p=>Te(p,"shift-9",e),backgroundColor:p=>Te(p,"inherit",e),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:p=>Te(p,"shift-2",e)},"&[aria-current=true]":{backgroundColor:p=>Te(p,"shift-3",a),color:p=>Te(p,"shift-10")},"&:focus-visible":{outline:p=>`${De(.5)} solid ${Te(p,"shift-6",a)}`,outlineOffset:`-${De(.5)}`}}})});l[c.tagName]=s},style:{display:"flex",flexDirection:"column",paddingBlock:c=>De(Ht(c)*2),paddingInline:c=>De(Ht(c)*2),fontSize:c=>Nn(c,"inherit"),backgroundColor:c=>Te(c,"inherit",e)}}}var Bn=n=>!!n&&typeof n.get=="function"&&n._isState===!0,Ae=n=>{let o={},r=[];for(let e in n){let a=n[e];e==="x"?r.push(`translateX(${typeof a=="number"?`${a}px`:a})`):e==="y"?r.push(`translateY(${typeof a=="number"?`${a}px`:a})`):e==="scale"?r.push(`scale(${a})`):e==="rotate"?r.push(`rotate(${typeof a=="number"?`${a}deg`:a})`):o[e]=a}return r.length&&(o.transform=r.join(" ")),o};function Vu(n={}){var i,c,l,d;let{initial:o,animate:r,exit:e,transition:a={}}=n,t={duration:(i=a.duration)!=null?i:300,delay:(c=a.delay)!=null?c:0,easing:(l=a.easing)!=null?l:"ease",iterations:(d=a.iterations)!=null?d:1,fill:"both"};return{_onMount:s=>{let m=s.domElement;if(!m||typeof m.animate!="function")return;let y=Bn(r)?r.get():r;if(y?m.animate(o?[Ae(o),Ae(y)]:[Ae(y)],t):o&&Object.assign(m.style,Ae(o)),Bn(r)){let g=r.addListener(u=>{m.animate([Ae(u)],t)});s.setMetadata("motionRelease",g)}},_onBeforeRemove:(s,m)=>{let y=s.domElement;if(!y||!e||typeof y.animate!="function")return m();y.animate([Ae(e)],t).finished.then(m,m)},_onRemove:s=>{let m=s.getMetadata("motionRelease");m==null||m()}}}import{toState as xa}from"@domphy/core";import{themeColor as Fn,themeSize as wa,themeSpacing as Ta}from"@domphy/theme";function Hu(n={}){var r;let o=xa((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>wa(e,"inherit"),backgroundColor:e=>Fn(e),color:e=>Fn(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Ta(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as Da}from"@domphy/core";import{themeColor as Ne,themeDensity as ht,themeSize as Pa,themeSpacing as Be}from"@domphy/theme";function Oa(n,o){if(o<=7)return Array.from({length:o},(t,i)=>i+1);let r=[1];n>3&&r.push("...");let e=Math.max(2,n-1),a=Math.min(o-1,n+1);for(let t=e;t<=a;t++)r.push(t);return n<o-2&&r.push("..."),r.push(o),r}function Fu(n){var c;let{total:o,color:r="neutral",accentColor:e="primary"}=n,a=Da((c=n.value)!=null?c:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>Be(6+ht(l)*2),height:l=>Be(6+ht(l)*2),paddingInline:l=>Be(ht(l)*2),borderRadius:l=>Be(ht(l)*1),border:"none",cursor:"pointer",fontSize:l=>Pa(l,"inherit"),backgroundColor:"transparent",color:l=>Ne(l,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:l=>Ne(l,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},i=Oe(A({},t),{backgroundColor:l=>Ne(l,"shift-6",e),color:l=>Ne(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>Ne(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let d={div:s=>{let m=a.get(s),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&a.set(m-1),style:t});let g=0;for(let u of Oa(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${g++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:p=>Be(ht(p)*2),color:p=>Ne(p,"shift-7",r)}});else{let p=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:p?"page":void 0,disabled:p,onClick:()=>a.set(u),style:p?i:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&a.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:Be(1)}};l.children.insert(d)},style:{display:"inline-flex"}}}import{toState as La}from"@domphy/core";import{themeColor as $a,themeSize as Ia}from"@domphy/theme";function qu(n={}){var r;let o=La((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Ia(e,"inherit"),color:e=>$a(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as za,toState as Wn}from"@domphy/core";import{themeColor as Va}from"@domphy/theme";function Zu(n){var y;let{open:o=!1,placement:r="bottom",openOn:e="click"}=n,a=null,t=Wn(o),i=Wn(r),{show:c,hide:l,anchorPartial:d}=j({kind:"popover",open:t,placement:i,content:n.content,keepOpenOnContentHover:e==="hover"}),s={role:"dialog",dataTone:"shift-14",style:{backgroundColor:g=>Va(g,"inherit")},_onInsert:g=>{let u=g.attributes.get("id");a=u||g.nodeId,!u&&g.attributes.set("id",a)}};return(y=n.content).$||(y.$=[]),n.content.$.push(s),za(d,{ariaHaspopup:"dialog",ariaExpanded:g=>t.get(g),onMouseEnter:(g,u)=>e==="hover"&&c(u),onMouseLeave:(g,u)=>e==="hover"&&l(u),onClick:(g,u)=>{e==="click"&&(t.get()?l(u):c(u))},onKeyDown:(g,u)=>{g.key==="Escape"&&t.get()&&l(u)},onFocus:(g,u)=>e==="hover"&&c(u),onBlur:(g,u)=>{let p=g.relatedTarget,h=u.getRoot().domElement,S=a?h.querySelector(`#${CSS.escape(a)}`):null;p&&(S!=null&&S.contains(p))||l(u)},_onMount:g=>a&&g.attributes.set("ariaControls",a)}),d}import{toState as Ma}from"@domphy/core";import{themeColor as At,themeSize as _a,themeSpacing as ko}from"@domphy/theme";function Kn(n={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=ko(6),bordered:a=!0}=n,t=Ma(o),i={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},c=s=>{var m;return(m=i[t.get(s)])!=null?m:i["bottom-end"]},l=s=>s.includes("start")?e:s.includes("end")?"auto":"50%",d=s=>s.includes("end")?e:s.includes("start")?"auto":"50%";return{style:{fontSize:s=>_a(s),backgroundColor:s=>At(s),color:s=>At(s,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:ko(1.5),height:ko(1.5),backgroundColor:s=>At(s,"inherit",r),borderWidth:a?"1px":0,borderColor:s=>At(s,"inherit",r),borderTopStyle:s=>{let m=c(s);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:s=>{let m=c(s);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:s=>{let m=c(s);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:s=>{let m=c(s);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:s=>{let m=c(s);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:s=>{let m=c(s);return m.includes("right")?0:m.includes("left")?"auto":d(m)},bottom:s=>{let m=c(s);return m.includes("bottom")?0:m.includes("top")?"auto":d(m)},left:s=>{let m=c(s);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:s=>{let m=c(s),y=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",g=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${y},${g}) rotate(45deg)`}}}}}import{toState as Ra}from"@domphy/core";import{themeColor as jn,themeDensity as xo,themeSize as Ha,themeSpacing as wo}from"@domphy/theme";function id(n={}){var r;let o=Ra((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Ha(e,"inherit"),color:e=>jn(e,"shift-9",o.get(e)),backgroundColor:e=>jn(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>wo(xo(e)*2),paddingInline:e=>wo(xo(e)*3),borderRadius:e=>wo(xo(e)*2)}}}import{toState as Yn}from"@domphy/core";import{themeColor as To,themeSpacing as Nt}from"@domphy/theme";function cd(n={}){var e,a;let o=Yn((e=n.color)!=null?e:"neutral","color"),r=Yn((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:Nt(2),border:0,borderRadius:Nt(999),overflow:"hidden",backgroundColor:t=>To(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>To(t,"shift-3",o.get(t)),borderRadius:Nt(999)},"&::-webkit-progress-value":{backgroundColor:t=>To(t,"shift-9",r.get(t)),borderRadius:Nt(999),transition:"width 220ms ease"}}}}import{toState as qn}from"@domphy/core";import{themeColor as Aa,themeSpacing as Na}from"@domphy/theme";var Ba='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',Fa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function pd(n={}){var l,d;let{max:o=5,readOnly:r=!1,onChange:e}=n,a=(l=n.color)!=null?l:"warning",t=qn((d=n.value)!=null?d:0),i=qn(0),c=s=>{let m=i.get(s);return m>0?m:t.get(s)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Na(.5),fontSize:"1.5rem",cursor:r?"default":"pointer",color:s=>Aa(s,"shift-8",a)},_onInit:s=>{for(let m=1;m<=o;m++){let y=m,g=r?{}:{onClick:()=>{let p=y===t.get()?0:y;t.set(p),e==null||e(p),i.set(0)},onMouseEnter:()=>i.set(y),onMouseLeave:()=>i.set(0),onKeyDown:p=>{var C,T;let h=t.get(),S=h;if(p.key==="ArrowRight"||p.key==="ArrowUp")S=Math.min(o,h+1),p.preventDefault();else if(p.key==="ArrowLeft"||p.key==="ArrowDown")S=Math.max(0,h-1),p.preventDefault();else return;t.set(S),e==null||e(S);let v=S>0?S-1:0;(T=(C=s.domElement)==null?void 0:C.children[v])==null||T.focus()}},u=Oe(A({button:p=>y<=c(p)?Ba:Fa,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},g),{style:{background:"none",border:"none",padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center"}});s.children.insert(u)}}}}import{toState as Do}from"@domphy/core";import{themeColor as Gn,themeSpacing as Un}from"@domphy/theme";function bd(n={}){var l,d,s;let{size:o=16,thickness:r=.25}=n,e=Do((l=n.value)!=null?l:0,"value"),a=Do((d=n.color)!=null?d:"primary","color"),t=Do((s=n.trackColor)!=null?s:"neutral","trackColor"),i=Math.round((1-r)*100),c=`radial-gradient(circle closest-side, transparent ${i}%, black ${i}%)`;return{role:"progressbar",ariaValuenow:m=>String(Math.round(e.get(m))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:m=>{m.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:Un(o),height:Un(o),borderRadius:"50%",background:m=>`conic-gradient(from -90deg, ${Gn(m,"shift-9",a.get(m))} ${e.get(m)}%, ${Gn(m,"shift-3",t.get(m))} 0%)`,WebkitMask:c,mask:c}}}import{toState as Wa}from"@domphy/core";import{themeColor as Po,themeSpacing as Bt}from"@domphy/theme";function Ed(n={}){var r;let o=Wa((r=n.color)!=null?r:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:Bt(2),height:Bt(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Po(e,"shift-5",o.get(e)),borderRadius:Bt(999),border:`${Bt(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Po(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Po(e,"shift-5",o.get(e))} transparent`}}}import{toState as Ka}from"@domphy/core";import{themeColor as Fe,themeSize as ja,themeSpacing as Y}from"@domphy/theme";function Td(n={items:[]}){var t,i,c;let{items:o=[],color:r="neutral",accentColor:e="primary"}=n,a=Ka((c=(i=n.value)!=null?i:(t=o[0])==null?void 0:t.key)!=null?c:"");return{role:"radiogroup",_context:{segmented:{value:a}},_onSchedule:(l,d)=>{let s=o.map((m,y)=>{var p;let g=(p=m.key)!=null?p:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,type:"button",role:"radio",ariaChecked:h=>a.get(h)===g,onClick:()=>a.set(g),style:{cursor:"pointer",fontSize:h=>ja(h,"inherit"),height:Y(6),paddingBlock:Y(1),paddingInline:Y(3),border:"none",borderRadius:Y(10),color:h=>Fe(h,"shift-9",r),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>Fe(h,"shift-3",r)},"&[aria-checked=true]":{backgroundColor:h=>Fe(h,"shift-0",e),color:h=>Fe(h,"shift-10",e)},"&:focus-visible":{outline:h=>`${Y(.5)} solid ${Fe(h,"shift-6",e)}`,outlineOffset:`-${Y(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[l.tagName]=s},style:{display:"inline-flex",paddingBlock:Y(1),paddingInline:Y(1),gap:Y(.5),borderRadius:Y(10),backgroundColor:l=>Fe(l,"shift-2",r)}}}import{themeColor as q,themeColorToken as Ya,themeDensity as ft,themeSize as qa,themeSpacing as G}from"@domphy/theme";function Od(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>qa(e,"inherit"),lineHeight:"inherit",color:e=>q(e,"shift-9",o),backgroundColor:e=>q(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${q(e,"shift-4",o)}`,borderRadius:e=>G(ft(e)*1),paddingBlock:e=>G(ft(e)*1),paddingLeft:e=>G(ft(e)*3),paddingRight:e=>G(ft(e)*5),backgroundImage:e=>{let a=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Ya(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(a)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${G(2)} center`,backgroundSize:`${G(2.5)} ${G(1.5)}`,"&:not([multiple])":{height:e=>G(6+ft(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${G(.5)} solid ${q(e,"shift-5",r)}`},"&:focus-visible":{outline:e=>`${G(.5)} solid ${q(e,"shift-6",r)}`},"& optgroup":{color:e=>q(e,"shift-11",o)},"& option[disabled]":{color:e=>q(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>q(e,"shift-8","neutral"),outline:e=>`1px solid ${q(e,"shift-4","neutral")}`,backgroundColor:e=>q(e,"shift-2","neutral")}}}}import{merge as Xn,toState as Oo}from"@domphy/core";import{themeColor as Lo,themeDensity as $o,themeSize as Ga,themeSpacing as gt}from"@domphy/theme";function Md(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=Oo(n.value),c=Oo(a),{show:l,hide:d,anchorPartial:s}=j({kind:"selectBox",open:c,placement:Oo(r),content:n.content}),m={onClick:(u,p)=>!t&&d(p)};Xn(n.content,m);let y={div:u=>{let p=i.get(u),h=Array.isArray(p)?p:[p];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[xt({color:e,removable:t})],_key:v.value,_onRemove:C=>{let T=i.get(),k=(Array.isArray(T)?T:[T]).filter(P=>P!==v.value);t?i.set(k):i.set(k[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:gt(1),flex:1}},g={_onInsert:u=>{u.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:u=>u.children.insert(y),onClick:(u,p)=>c.get()?d(p):l(p),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>gt(6+$o(u)*2),minWidth:gt(32),outlineOffset:"-1px",outline:u=>`1px solid ${Lo(u,"shift-4","neutral")}`,paddingInline:u=>gt($o(u)*2),borderRadius:u=>gt($o(u)*1),fontSize:u=>Ga(u,"inherit"),color:u=>Lo(u,"shift-9",e),backgroundColor:u=>Lo(u,"inherit",e)}};return Xn(s,g),s}import{themeColor as We,themeDensity as Jn,themeSize as Ua,themeSpacing as Ft}from"@domphy/theme";function Hd(n={}){let{accentColor:o="primary",color:r="neutral",value:e=null}=n;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let i=t.getContext("select");if(i){let c=i.value;t.attributes.set("ariaSelected",l=>{let d=c.get(l);return i.multiple?d.includes(e):d===e}),t.addEvent("click",()=>{let l=c.get();i.multiple?l.includes(e)?c.set(l.filter(d=>d!==e)):c.set(l.concat([e])):l!==e&&c.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Ua(t,"inherit"),height:t=>Ft(6+Jn(t)*2),paddingInline:t=>Ft(Jn(t)*3),border:"none",outline:"none",color:t=>We(t,"shift-9",r),backgroundColor:t=>We(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>We(t,"shift-2",r)},"&[aria-selected=true]":{backgroundColor:t=>We(t,"shift-6",o),color:t=>We(t,"shift-11")},"&:focus-visible":{outline:t=>`${Ft(.5)} solid ${We(t,"shift-6",o)}`,outlineOffset:`-${Ft(.5)}`}}}}import{toState as Xa}from"@domphy/core";import{themeColor as Ja,themeDensity as Zn,themeSize as Za,themeSpacing as Qn}from"@domphy/theme";function Fd(n={}){var i;let{color:o="neutral",multiple:r=!1}=n,e=Xa((i=n.value)!=null?i:r?[]:null),a={div:c=>{let l=e.get(c);return(Array.isArray(l)?l:[l]).map(s=>({input:null,name:n.name,value:s==null?"":String(s)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:r}},_onInit:c=>{c.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),c.children.insert(a)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>Qn(Zn(c)*2),paddingInline:c=>Qn(Zn(c)*2),fontSize:c=>Za(c,"inherit"),backgroundColor:c=>Ja(c,"inherit",o)}}}import{hashString as Qa,toState as el}from"@domphy/core";import{themeColor as er,themeSize as tl,themeSpacing as tr}from"@domphy/theme";function Yd(n={}){var a;let o=el((a=n.color)!=null?a:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=Qa(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>tl(t),color:t=>er(t,"shift-9",o.get(t)),height:tr(6),display:"block",borderRadius:tr(1),backgroundColor:t=>er(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{toState as ol}from"@domphy/core";import{themeColor as nl,themeSize as rl}from"@domphy/theme";function Xd(n={}){var r;let o=ol((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>rl(e,"inherit"),color:e=>nl(e,"shift-9",o.get(e))}}}import{hashString as il,toState as al}from"@domphy/core";import{themeColor as Wt,themeSize as ll,themeSpacing as Io}from"@domphy/theme";var nr={to:{transform:"rotate(360deg)"}},or=il(JSON.stringify(nr));function ep(n={}){var r;let o=al((r=n.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>ll(e),backgroundColor:e=>Wt(e),color:e=>Wt(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Io(6),height:Io(6),borderRadius:"50%",border:e=>`${Io(.5)} solid ${Wt(e,"shift-4",o.get(e))}`,borderTopColor:e=>Wt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${or} 0.7s linear infinite`,[`@keyframes ${or}`]:nr}}}import{merge as sl,toState as cl}from"@domphy/core";import{themeColor as Kt,themeSpacing as zo}from"@domphy/theme";function rp(n={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:a=90}=n;return{_onSchedule:(t,i)=>{sl(i,{_context:{splitter:{direction:o,size:cl(r),min:e,max:a,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function ip(){return{_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal"?"width":"height",a=o.panelCount++===0,t=c=>{r.style[e]=`${a?c:100-c}%`};t(o.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let i=o.size.addListener(t);n.addHook("Remove",i)}}}function ap(){return{role:"separator",tabindex:0,_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal";r.style.cursor=e?"col-resize":"row-resize",r.setAttribute("aria-orientation",e?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(o.min)),r.setAttribute("aria-valuemax",String(o.max)),r.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let a=o.size.addListener(l=>{r.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let d=l.shiftKey?10:1,s=null;e?l.key==="ArrowRight"?s=Math.min(o.size.get()+d,o.max):l.key==="ArrowLeft"&&(s=Math.max(o.size.get()-d,o.min)):l.key==="ArrowDown"?s=Math.min(o.size.get()+d,o.max):l.key==="ArrowUp"&&(s=Math.max(o.size.get()-d,o.min)),l.key==="Home"?s=o.min:l.key==="End"&&(s=o.max),s!==null&&(l.preventDefault(),o.size.set(s))},i=null,c=l=>{l.preventDefault();let d=r.parentElement,s=y=>{let g=d.getBoundingClientRect(),u=e?(y.clientX-g.left)/g.width*100:(y.clientY-g.top)/g.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",m),i=null};i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",m),i=null},document.addEventListener("mousemove",s),document.addEventListener("mouseup",m)};r.addEventListener("keydown",t),r.addEventListener("mousedown",c),n.addHook("Remove",()=>{i==null||i(),a(),r.removeEventListener("keydown",t),r.removeEventListener("mousedown",c)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n=>Kt(n,"shift-2"),"&:hover":{backgroundColor:n=>Kt(n,"shift-3")},"&:focus-visible":{outline:n=>`2px solid ${Kt(n,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:zo(1),height:zo(1),borderRadius:zo(999),backgroundColor:n=>Kt(n,"shift-4")}}}}import{toState as ml}from"@domphy/core";import{themeColor as M,themeSize as rr,themeSpacing as ge}from"@domphy/theme";function mp(n={items:[]}){var i;let{items:o=[],direction:r="horizontal",color:e="neutral",accentColor:a="primary"}=n,t=ml((i=n.current)!=null?i:0);return{_context:{steps:{current:t,direction:r,color:e,accentColor:a}},_onSchedule:(c,l)=>{let d=o.map((s,m)=>{var g;return{li:[typeof s.label=="string"?{span:s.label}:s.label],_key:(g=s.key)!=null?g:m,dataStep:String(m+1),dataStatus:u=>{let p=t.get(u);return m<p?"done":m===p?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:ge(1),flex:"1",fontSize:u=>rr(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:ge(6),height:ge(6),borderRadius:ge(999),fontSize:u=>rr(u,"decrease-1"),fontWeight:"600",flexShrink:"0",border:u=>`2px solid ${M(u,"shift-4",e)}`,backgroundColor:u=>M(u,"inherit"),color:u=>M(u,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:ge(3),right:`calc(50% + ${ge(3)})`,left:`calc(-50% + ${ge(3)})`,height:"2px",backgroundColor:u=>M(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>M(u,"shift-6",a),borderColor:u=>M(u,"shift-6",a),color:u=>M(u,"shift-15",a)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>M(u,"shift-3",e),borderColor:u=>M(u,"shift-3",e),color:u=>M(u,"shift-9",e)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-3",e)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-6",a)},"&[data-status=pending]":{color:u=>M(u,"shift-7")},"&[data-status=active]":{color:u=>M(u,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:u=>M(u,"shift-8")}}}});l[c.tagName]=d},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:ge(2),listStyle:"none",margin:"0",padding:"0"}}}import{toState as ul}from"@domphy/core";import{themeColor as ir,themeSize as dl}from"@domphy/theme";function hp(n={}){var r;let o=ul((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>dl(e,"inherit"),fontWeight:700,color:e=>ir(e,"shift-11",o.get(e)),backgroundColor:e=>ir(e)}}}import{toState as pl}from"@domphy/core";import{themeColor as hl,themeSize as fl}from"@domphy/theme";function bp(n={}){var r;let o=pl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>fl(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>hl(e,"shift-9",o.get(e))}}}import{toState as gl}from"@domphy/core";import{themeColor as yl,themeSize as bl}from"@domphy/theme";function Ep(n={}){var r;let o=gl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>bl(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>yl(e,"shift-9",o.get(e))}}}import{toState as Sl}from"@domphy/core";import{themeColor as U,themeDensity as Ke,themeSize as ar,themeSpacing as je}from"@domphy/theme";function Tp(n={}){var r;let o=Sl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>ar(e,"inherit"),color:e=>U(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-10",o.get(e)),backgroundColor:e=>U(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${U(e,"shift-3",o.get(e))}`,fontSize:e=>ar(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-10",o.get(e)),backgroundColor:e=>U(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${U(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>U(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>U(e,"shift-2")}}}}import{toState as Cl}from"@domphy/core";import{themeColor as Ye,themeDensity as jt,themeSize as vl,themeSpacing as ye}from"@domphy/theme";function Lp(n={items:[]}){var t,i,c;let{items:o=[],accentColor:r="primary",color:e="neutral"}=n,a=Cl((c=(i=n.activeKey)!=null?i:(t=o[0])==null?void 0:t.key)!=null?c:0);return{_onSchedule:(l,d)=>{let s=l.nodeId,y={div:o.map((u,p)=>{var v;let h=(v=u.key)!=null?v:p;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,type:"button",role:"tab",id:`tab${s}${h}`,ariaControls:`panel${s}${h}`,ariaSelected:C=>a.get(C)===h,onClick:()=>a.set(h),onKeyDown:C=>{let T=C.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(T))return;C.preventDefault();let D=o.map((F,Ce)=>{var ae;return(ae=F.key)!=null?ae:Ce}),k=D.indexOf(h),P=k;T==="ArrowRight"?P=(k+1)%D.length:T==="ArrowLeft"?P=(k-1+D.length)%D.length:T==="Home"?P=0:T==="End"&&(P=D.length-1),a.set(D[P])},style:{cursor:"pointer",fontSize:C=>vl(C,"inherit"),height:C=>ye(6+jt(C)*2),paddingInline:C=>ye(jt(C)*4),border:"none",outline:"none",color:C=>Ye(C,"shift-9"),backgroundColor:C=>Ye(C,"inherit"),boxShadow:C=>`inset 0 -${ye(.5)} 0 0 ${Ye(C,"shift-1",e)}`,"&:hover:not([disabled])":{boxShadow:C=>`inset 0 -${ye(.5)} 0 0 ${Ye(C,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:C=>`inset 0 -${ye(.5)} 0 0 ${Ye(C,"shift-6",r)}`},"&:focus-visible":{boxShadow:C=>`inset 0 -${ye(.5)} 0 0 ${Ye(C,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},g=o.map((u,p)=>{var S;let h=(S=u.key)!=null?S:p;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${s}${h}`,ariaLabelledby:`tab${s}${h}`,hidden:v=>a.get(v)!==h,style:{paddingBlock:v=>ye(jt(v)*2),paddingInline:v=>ye(jt(v)*2)}}});d[l.tagName]=[y,...g]}}}import{toState as lr}from"@domphy/core";import{themeColor as X,themeDensity as Vo,themeSize as El,themeSpacing as qe}from"@domphy/theme";function Vp(n={}){var a,t;let o=lr((a=n.color)!=null?a:"neutral","color"),r=lr((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return{_onInsert:i=>{i.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:i=>{if(e){let c=i.domElement;c.style.overflow="hidden";let l=()=>{c.style.height="auto",c.style.height=`${c.scrollHeight}px`};c.addEventListener("input",l),l(),i.addHook("Remove",()=>c.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:i=>qe(Vo(i)*2),paddingBlock:i=>qe(Vo(i)*1.5),border:"none",borderRadius:i=>qe(Vo(i)*1.5),fontSize:i=>El(i,"inherit"),color:i=>X(i,"shift-9",o.get(i)),outlineOffset:"-1px",outline:i=>`1px solid ${X(i,"shift-4",o.get(i))}`,backgroundColor:i=>X(i,"inherit",o.get(i)),"&::placeholder":{color:i=>X(i,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:i=>`${qe(.5)} solid ${X(i,"shift-5",r.get(i))}`},"&:focus-visible":{outline:i=>`${qe(.5)} solid ${X(i,"shift-6",r.get(i))}`},"&:invalid":{outline:i=>`${qe(.5)} solid ${X(i,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>X(i,"shift-8","neutral"),outline:i=>`1px solid ${X(i,"shift-4","neutral")}`,backgroundColor:i=>X(i,"shift-2","neutral")}}}}import{toState as kl}from"@domphy/core";import{themeColor as sr,themeDensity as Mo,themeSpacing as _o}from"@domphy/theme";function Hp(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Ap(n={}){var t,i,c;let{last:o=!1}=n,r=(t=n.color)!=null?t:"neutral",e=(i=n.accentColor)!=null?i:"primary",a=kl((c=n.active)!=null?c:!1);return{style:A({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>_o(Mo(l)*2),paddingBottom:l=>o?"0":_o(Mo(l)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:l=>sr(l,"shift-8",a.get(l)?e:r),opacity:l=>a.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${_o(Mo(l)*4)}`,width:"2px",backgroundColor:l=>sr(l,"shift-3",r)}})}}import{toState as xl}from"@domphy/core";import{themeColor as Ro,themeDensity as Ho,themeSize as wl,themeSpacing as be}from"@domphy/theme";function Kp(n={}){let{position:o="top-center",color:r="neutral"}=n,e=xl(!1),a=o.startsWith("top"),t=o.endsWith("center"),i=o.endsWith("right"),c={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:a?"column":"column-reverse",alignItems:t?"center":i?"end":"start",inset:0,gap:be(4),zIndex:30,padding:be(6),pointerEvents:"none"}};return{_portal:l=>{let d=l.domElement.querySelector(`#domphy-toast-${o}`);return d||(d=l.children.insert(c).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:be(32),pointerEvents:"auto",paddingBlock:l=>be(Ho(l)*2),paddingInline:l=>be(Ho(l)*4),borderRadius:l=>be(Ho(l)*2),fontSize:l=>wl(l,"inherit"),color:l=>Ro(l,"shift-9",r),backgroundColor:l=>Ro(l,"inherit",r),boxShadow:l=>`0 ${be(2)} ${be(9)} ${Ro(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":a?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,d)=>{let s=!1,m=null,y=()=>{s||(s=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",g),d())},g=u=>{u.propertyName==="transform"&&y()};l.domElement.addEventListener("transitionend",g),m=setTimeout(y,350),l.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=l.domElement)==null||u.removeEventListener("transitionend",g)}),e.set(!1)}}}import{toState as Tl}from"@domphy/core";import{themeColor as Se,themeSize as cr,themeSpacing as J}from"@domphy/theme";function Gp(n={items:[]}){var i;let{items:o=[],multiple:r=!1,color:e="neutral",accentColor:a="primary"}=n,t=Tl((i=n.value)!=null?i:r?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:r}},_onSchedule:(c,l)=>{let d=o.map((s,m)=>{var u;let y=(u=s.key)!=null?u:String(m);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:y,type:"button",role:"button",ariaPressed:p=>{let h=t.get(p);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let p=t.get();if(r){let h=Array.isArray(p)?[...p]:[];t.set(h.includes(y)?h.filter(S=>S!==y):[...h,y])}else t.set(p===y?"":y)},style:{cursor:"pointer",fontSize:p=>cr(p,"inherit"),height:J(6),paddingBlock:J(1),paddingInline:J(2),border:"none",borderRadius:J(1),color:p=>Se(p,"shift-9",e),backgroundColor:p=>Se(p,"inherit",e),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:p=>Se(p,"shift-2",e)},"&[aria-pressed=true]":{backgroundColor:p=>Se(p,"shift-3",a),color:p=>Se(p,"shift-12",a)},"&:focus-visible":{outline:p=>`${J(.5)} solid ${Se(p,"shift-6",a)}`,outlineOffset:`-${J(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});l[c.tagName]=d},style:{display:"flex",paddingBlock:J(1),paddingInline:J(1),gap:J(1),borderRadius:J(2),fontSize:c=>cr(c,"inherit"),backgroundColor:c=>Se(c,"inherit",e),outline:c=>`1px solid ${Se(c,"shift-3",e)}`,outlineOffset:"-1px"}}}import{themeDensity as Dl,themeSpacing as Pl}from"@domphy/theme";function Jp(n={}){var r;let o=(r=n.gap)!=null?r:4;return{style:{display:"flex",alignItems:"center",gap:e=>Pl(Dl(e)*o)}}}function Zp(){return{div:null,style:{flex:"1 1 0"}}}import{merge as Ol,toState as mr}from"@domphy/core";import{themeColor as ur,themeDensity as Ao,themeSize as Ll,themeSpacing as No}from"@domphy/theme";function rh(n={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=n,a=mr(r),t=mr(e),i=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,c={span:g=>t.get(g),id:i},{show:l,hide:d,anchorPartial:s}=j({kind:"tooltip",open:o,placement:a,content:c}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>No(Ao(g)*1),paddingInline:g=>No(Ao(g)*3),borderRadius:g=>No(Ao(g)*1),color:g=>ur(g,"shift-9"),backgroundColor:g=>ur(g),fontSize:g=>Ll(g,"inherit")},$:[Kn({placement:a,bordered:!1})]};return c.$||(c.$=[]),c.$.push(m),Ol(s,{ariaDescribedby:i,onMouseEnter:(g,u)=>l(u),onMouseLeave:(g,u)=>d(u),onFocus:(g,u)=>l(u),onBlur:(g,u)=>d(u),onKeyDown:(g,u)=>g.key==="Escape"&&d(u)}),s}import{ElementNode as dr}from"@domphy/core";function pr(n,o){return n.key!==void 0&&n.key!==null?String(n.key):`index-${o}`}function lh(n={}){let{duration:o=300,delay:r=0}=n,e=new Map,a=new Map,t=new Set,i=new Set;return{_onMount:c=>{c.addHook("Remove",()=>{for(let l of Array.from(a.values()))l();a.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of i)cancelAnimationFrame(l);i.clear()})},_onBeforeUpdate:c=>{e=new Map,c.children.items.forEach((l,d)=>{if(!(l instanceof dr))return;let s=l.domElement;s&&e.set(pr(l,d),s.getBoundingClientRect())})},_onUpdate:c=>{c.children.items.forEach((l,d)=>{var D;if(!(l instanceof dr))return;let s=l.domElement;if(!s)return;let m=pr(l,d),y=e.get(m);if(!y)return;let g=s.getBoundingClientRect(),u=y.left-g.left,p=y.top-g.top;if(Math.abs(u)<.5&&Math.abs(p)<.5)return;(D=a.get(s))==null||D(),s.style.transition="none",s.style.transform=`translate(${u}px, ${p}px)`,s.getBoundingClientRect();let h=requestAnimationFrame(()=>{i.delete(h),s.style.transition=`transform ${o}ms ease ${r}ms`,s.style.transform="translate(0px, 0px)"});i.add(h);let S=!1,v=null,C=()=>{S||(S=!0,v&&(t.delete(v),v=null),a.delete(s),s.removeEventListener("transitionend",T),s.style.transition="",s.style.transform="")},T=k=>{k.propertyName==="transform"&&C()};a.set(s,()=>{S=!0,v&&(clearTimeout(v),t.delete(v),v=null),a.delete(s),s.removeEventListener("transitionend",T)}),s.addEventListener("transitionend",T),v=setTimeout(C,o+r+34),t.add(v)}),e.clear()}}}import{toState as $l}from"@domphy/core";import{themeColor as hr,themeSize as Il,themeSpacing as zl}from"@domphy/theme";function uh(n={}){var r;let o=$l((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>Il(e,"inherit"),backgroundColor:e=>hr(e),color:e=>hr(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:zl(3),listStyleType:"disc",listStylePosition:"outside"}}}export{Rl as abbreviation,Bl as accordion,jl as alert,Ul as avatar,Ql as badge,ns as blockquote,ls as breadcrumb,us as breadcrumbEllipsis,fs as button,Ss as buttonGhost,ks as buttonSwitch,Ds as card,$s as code,Ks as combobox,Gs as command,Xs as commandItem,Us as commandSearch,tc as datePicker,ac as descriptionList,mc as details,gc as dialog,Cc as divider,wc as drawer,Oc as emphasis,zc as empty,Mc as errorBoundary,Ac as fab,Wc as figure,qc as formGroup,Jc as heading,tm as horizontalRule,im as icon,cm as image,pm as inputCheckbox,gm as inputColor,Cm as inputDateTime,xm as inputFile,Pm as inputNumber,Mm as inputOTP,Im as inputPassword,Am as inputRadio,Wm as inputRange,qm as inputSearch,Jm as inputSwitch,tu as inputText,iu as keyboard,cu as label,pu as link,yu as linkButton,vu as list,Eu as listItem,ku as listItemButton,Du as mark,$u as menu,Vu as motion,Hu as orderedList,Fu as pagination,qu as paragraph,Zu as popover,Kn as popoverArrow,id as preformated,cd as progress,pd as rating,bd as ringProgress,Ed as scrollArea,Td as segmented,Od as select,Md as selectBox,Hd as selectItem,Fd as selectList,Yd as skeleton,Xd as small,ep as spinner,rp as splitter,ap as splitterHandle,ip as splitterPanel,mp as steps,hp as strong,bp as subscript,Ep as superscript,Tp as table,Lp as tabs,xt as tag,Vp as textarea,Hp as timeline,Ap as timelineItem,Kp as toast,Gp as toggleGroup,Jp as toolbar,Zp as toolbarSpacer,rh as tooltip,lh as transitionGroup,uh as unorderedList};
1
+ var Ar=Object.defineProperty,Br=Object.defineProperties;var Nr=Object.getOwnPropertyDescriptors;var Uo=Object.getOwnPropertySymbols;var Hr=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable;var Xo=(n,o,r)=>o in n?Ar(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,V=(n,o)=>{for(var r in o||(o={}))Hr.call(o,r)&&Xo(n,r,o[r]);if(Uo)for(var r of Uo(o))Fr.call(o,r)&&Xo(n,r,o[r]);return n},Ie=(n,o)=>Br(n,Nr(o));import{toState as Jo}from"@domphy/core";import{themeColor as qe,themeSize as Wr,themeSpacing as Kr}from"@domphy/theme";function ts(n={}){var e,i;let o=Jo((e=n.color)!=null?e:"neutral","color"),r=Jo((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Wr(t),backgroundColor:t=>qe(t),color:t=>qe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>qe(t,"shift-7",o.get(t)),textUnderlineOffset:Kr(.72),cursor:"help","&:hover":{color:t=>qe(t,"shift-11",r.get(t)),textDecorationColor:t=>qe(t,"shift-9",r.get(t))}}}}import{toState as Zo}from"@domphy/core";import{themeColor as Jt,themeDensity as jr,themeSpacing as Qo}from"@domphy/theme";function as(n={}){var i,t;let{type:o="single"}=n,r=Zo((i=n.color)!=null?i:"neutral","color"),e=Zo((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let c=a.domElement;if(!c)return;let s=d=>{let l=d.target.closest("summary");if(!l)return;let m=l.closest("details");!m||m.parentElement!==c||m.open||Array.from(c.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};c.addEventListener("click",s),a.addHook("Remove",()=>c.removeEventListener("click",s))},style:{display:"flex",flexDirection:"column",borderRadius:a=>Qo(jr(a)*1.5),outline:a=>`1px solid ${Jt(a,"border-strong",r.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${Jt(a,"border-strong",r.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${Qo(.5)} solid ${Jt(a,"shift-6",e.get(a))}`}}}}import{toState as Yr}from"@domphy/core";import{themeColor as Zt,themeDensity as en,themeSize as qr,themeSpacing as ut}from"@domphy/theme";function cs(n={}){var r;let o=Yr((r=n.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:ut(3),paddingBlock:e=>ut(en(e)*2),paddingInline:e=>ut(en(e)*4),boxShadow:e=>`inset ${ut(1)} 0 0 0 ${Zt(e,"shift-8",o.get(e))}`,backgroundColor:e=>Zt(e,"inherit",o.get(e)),color:e=>Zt(e,"shift-10",o.get(e)),fontSize:e=>qr(e,"inherit")}}}import{toState as Gr}from"@domphy/core";import{themeColor as tn,themeSize as Ur,themeSpacing as on}from"@domphy/theme";function ps(n={}){var r;let o=Gr((r=n.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:on(9),height:on(9),fontSize:e=>Ur(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>tn(e,"inherit",o.get(e)),color:e=>tn(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as nn}from"@domphy/core";import{themeColor as rn,themeSize as Xr,themeSpacing as Qt}from"@domphy/theme";function ys(n={}){var i;let{label:o=999}=n,r=nn(o),e=nn((i=n.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Qt(1),minWidth:Qt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>Xr(t,"decrease-1"),borderRadius:Qt(999),backgroundColor:t=>rn(t,"shift-9",e.get(t)),color:t=>rn(t,"shift-0",e.get(t))}}}}import{toState as Jr}from"@domphy/core";import{themeColor as an,themeDensity as ln,themeSize as Zr,themeSpacing as eo}from"@domphy/theme";function vs(n={}){var r;let o=Jr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Zr(e,"inherit"),backgroundColor:e=>an(e,"inherit",o.get(e)),boxShadow:e=>`inset ${eo(1)} 0 0 0 ${an(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>eo(ln(e)*2),paddingInline:e=>eo(ln(e)*4),margin:0}}}import{toState as Qr}from"@domphy/core";import{themeColor as Ge,themeSize as ea,themeSpacing as sn}from"@domphy/theme";function ws(n={}){var e;let{separator:o="/"}=n,r=Qr((e=n.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>ea(i,"inherit"),gap:sn(1),color:i=>Ge(i,"text",r.get(i)),backgroundColor:i=>Ge(i,"inherit",r.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>Ge(i,"muted",r.get(i))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:i=>Ge(i,"shift-4",r.get(i)),paddingInlineStart:sn(1)},"& > [aria-current=page]":{color:i=>Ge(i,"shift-10",r.get(i)),pointerEvents:"none"}}}}import{toState as ta}from"@domphy/core";import{themeColor as dt,themeSize as oa,themeSpacing as pt}from"@domphy/theme";function Os(n={}){var r;let o=ta((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>oa(e,"inherit"),paddingInline:pt(1),border:"none",background:"none",cursor:"pointer",color:e=>dt(e,"muted",o.get(e)),borderRadius:pt(1),"&:hover":{color:e=>dt(e,"shift-10",o.get(e)),backgroundColor:e=>dt(e,"hover",o.get(e))},"&:focus-visible":{outline:e=>`${pt(.5)} solid ${dt(e,"shift-6",o.get(e))}`,outlineOffset:pt(.5)}}}}import{toState as la}from"@domphy/core";import{themeColor as F,themeDensity as bt,themeSize as sa,themeSpacing as St}from"@domphy/theme";var ht={small:"decrease-1",medium:"inherit",large:"increase-1"};import{themeColor as na}from"@domphy/theme";function T(n,o="primary"){return`0 0 0 2px ${na(n,"shift-6",o)}`}import{toState as ra}from"@domphy/core";import{themeColor as gt,themeDensity as ft,themeSize as aa,themeSpacing as yt}from"@domphy/theme";var ia={small:.5,medium:1,large:1.5};function cn(n={}){var i,t,a;let o=ra((i=n.color)!=null?i:"neutral","color"),r=ia[(t=n.size)!=null?t:"medium"],e=ht[(a=n.size)!=null?a:"medium"];return{_onInsert:c=>{c.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:c=>aa(c,e),paddingBlock:c=>yt(ft(c)*r),paddingInline:c=>yt(ft(c)*r),borderRadius:c=>yt(ft(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>yt(ft(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>gt(c,"shift-6",o.get(c)),"&:hover:not([disabled]):not([aria-busy=true])":{color:c=>gt(c,"text",o.get(c)),backgroundColor:c=>gt(c,"hover",o.get(c))},"&:focus-visible":{boxShadow:c=>T(c,o.get(c))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:c=>gt(c,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var ca={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Ks(n={}){var a,c,s,d;let o=(a=n.variant)!=null?a:"outline";if(o==="ghost")return cn({color:n.color,size:n.size});let r=la((c=n.color)!=null?c:"primary","color"),e=o==="solid",i=ca[(s=n.size)!=null?s:"medium"],t=ht[(d=n.size)!=null?d:"medium"];return{_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:l=>sa(l,t),paddingBlock:l=>St(bt(l)*i.block),paddingInline:l=>St(bt(l)*i.inline),borderRadius:l=>St(bt(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>St(bt(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${F(l,"border-strong",r.get(l))}`,color:l=>e?F(l,"shift-0",r.get(l)):F(l,"text",r.get(l)),backgroundColor:l=>e?F(l,"shift-9",r.get(l)):F(l,"inherit",r.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?F(l,"shift-0",r.get(l)):F(l,"shift-10",r.get(l)),backgroundColor:l=>e?F(l,"shift-10",r.get(l)):F(l,"hover",r.get(l))},"&:focus-visible":{boxShadow:l=>T(l,r.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>F(l,"shift-2","neutral"),outline:l=>`1px solid ${F(l,"border-strong","neutral")}`,color:l=>F(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as to}from"@domphy/core";import{themeColor as ze,themeSize as ma,themeSpacing as W}from"@domphy/theme";function Gs(n={}){var t,a;let{checked:o=!1}=n,r=to(o),e=to((t=n.color)!=null?t:"neutral","color"),i=to((a=n.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:c=>{c.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:c=>r.get(c),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:c=>ma(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${ze(c,"border",e.get(c))}`,minWidth:W(12),minHeight:W(6),borderRadius:W(999),paddingLeft:W(7),paddingRight:W(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>ze(c,"inherit",e.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:W(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:W(5),height:W(5),borderRadius:W(999),color:c=>ze(c,"text"),backgroundColor:c=>ze(c,"decrease-2",e.get(c))},"&[aria-checked=true]":{backgroundColor:c=>ze(c,"increase-3",i.get(c)),outline:"none",color:c=>ze(c,"decrease-2"),paddingLeft:W(2),paddingRight:W(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${W(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ua}from"@domphy/core";import{themeColor as Ve,themeDensity as ie,themeSpacing as X}from"@domphy/theme";function Zs(n={}){var r;let o=ua((r=n.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>X(ie(e)*2),backgroundColor:e=>Ve(e,"inherit",o.get(e)),color:e=>Ve(e,"shift-10",o.get(e)),outline:e=>`1px solid ${Ve(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>X(ie(e)*2),paddingInline:e=>X(ie(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>X(ie(e)*4),color:e=>Ve(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>X(ie(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>X(ie(e)*4),color:e=>Ve(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:X(2),paddingBlock:e=>X(ie(e)*2),paddingInline:e=>X(ie(e)*4),borderTop:e=>`1px solid ${Ve(e,"border",o.get(e))}`}}}}import{toState as da}from"@domphy/core";import{themeColor as mn,themeSize as pa,themeSpacing as oo}from"@domphy/theme";function oc(n={}){var r;let o=da((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>pa(e,"inherit"),color:e=>mn(e,"text",o.get(e)),backgroundColor:e=>mn(e,"inherit",o.get(e)),height:oo(6),paddingInline:oo(1.5),borderRadius:oo(1)}}}import{merge as no,toState as ro}from"@domphy/core";import{themeColor as ve,themeDensity as xt,themeSize as un,themeSpacing as le}from"@domphy/theme";var ha={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function I(n){return ha[n]}import{behavior as ga,merge as fa,toState as ya}from"@domphy/core";import{autoUpdate as ba,computePosition as Sa,flip as Ca,offset as va,shift as xa}from"@domphy/floating";function Ea(n,o){var P;let{openState:r,placement:e,content:i,keepOpenOnContentHover:t}=o,a=null,c=null,s=null,d=null,l=!1,m=n.domElement,y=n.getRoot(),f={style:{position:"fixed",pointerEvents:"auto",visibility:E=>r.get(E)?"visible":"hidden"},onKeyDown:E=>{E.key==="Escape"&&C()},onMouseEnter:()=>t&&v(),onMouseLeave:()=>t&&C(),_onMount:E=>{var O;if(s=E.domElement,m&&s&&!s.hasAttribute("data-theme")){let j=(O=m.closest("[data-theme]"))==null?void 0:O.getAttribute("data-theme");j&&s.setAttribute("data-theme",j)}},_portal:E=>{let O=E.domElement.querySelector("#domphy-floating");if(!O){let j={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};O=E.children.insert(j).domElement}return O}},u=E=>fa(E,f);u(i);let p=()=>{l||(l=!0,d=y.children.insert(i))},h=()=>{p(),m&&s&&(c==null||c(),c=ba(m,s,()=>{Sa(m,s,{placement:e.get(),middleware:[va(12),Ca(),xa()],strategy:"fixed"}).then(({x:E,y:O,placement:j})=>{s&&(Object.assign(s.style,{left:`${E}px`,top:`${O}px`}),e.set(j))})}),r.set(!0))},S=()=>{c==null||c(),c=null,d&&(d.remove(),d=null),s=null,l=!1,r.set(!1)},v=()=>{a&&clearTimeout(a),a=setTimeout(h,100)},C=()=>{a&&clearTimeout(a),a=setTimeout(S,100)},D=E=>{if(!r.get()||!m||!s)return;let O=E.target;!m.contains(O)&&!s.contains(O)&&C()};return(P=y.domElement)==null||P.addEventListener("click",D),{show:v,hide:C,update(E){r=E.openState,e=E.placement,i=E.content,t=E.keepOpenOnContentHover,u(i),d&&d.patch(i)},destroy(){var E;a&&clearTimeout(a),c==null||c(),d==null||d.remove(),(E=y.domElement)==null||E.removeEventListener("click",D)}}}function G(n){let{kind:o,open:r=!1,placement:e}=n,i=ya(r),t=`floating:${o}`,a=d=>{var l;return(l=d==null?void 0:d.getBehavior(t))==null?void 0:l.show()},c=d=>{var l;return(l=d==null?void 0:d.getBehavior(t))==null?void 0:l.hide()},s=V({onKeyDown:(d,l)=>d.key==="Escape"&&c(l)},ga(t,Ea,{openState:i,placement:e,content:n.content,keepOpenOnContentHover:!!n.keepOpenOnContentHover}));return{show:a,hide:c,anchorPartial:s}}import{toState as ka}from"@domphy/core";import{themeColor as Ct,themeSize as wa,themeSpacing as J}from"@domphy/theme";var Ta='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function vt(n={}){var e;let{removable:o=!1}=n,r=ka((e=n.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let t={span:Ta,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:J(1),width:J(4),height:J(4),flexShrink:0,"&:hover":{backgroundColor:a=>Ct(a,"shift-4",r.get(a))}}};o&&i.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:J(6),paddingBlock:0,borderRadius:J(1),paddingInlineStart:J(2),paddingInlineEnd:o?J(1):J(2),gap:J(2),fontSize:i=>wa(i,"inherit"),backgroundColor:i=>Ct(i,"inherit",r.get(i)),color:i=>Ct(i,"text",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Ct(i,"border-strong",r.get(i))}`}}}function yc(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=ro(n.value),c=ro(i),{show:s,hide:d,anchorPartial:l}=G({kind:"combobox",open:c,placement:ro(r),content:n.content}),m={onClick:(h,S)=>!t&&d(S),dataTone:"shift-14",style:{backgroundColor:h=>ve(h,"inherit"),borderRadius:h=>le(xt(h)*2),outline:h=>`1px solid ${ve(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:I("medium")}};no(n.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:le(6),marginInlineStart:le(2),fontSize:h=>un(h,"inherit"),color:h=>ve(h,"text",e),backgroundColor:h=>ve(h,"inherit",e)},f;if(n.input){let h={onFocus:(S,v)=>s(v),style:y,_key:"combobox-input"};no(n.input,h),f=n.input}else f={input:null,onFocus:(h,S)=>s(S),value:h=>(a.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let S=a.get(h),v=Array.isArray(S)?S:[S],D=o.filter(P=>v.includes(P.value)).map(P=>({span:P.label,$:[vt({color:e,removable:!0})],_key:P.value,_onRemove:E=>{let O=a.get(),Ce=(Array.isArray(O)?O:[O]).filter(re=>re!==P.value);t?a.set(Ce):a.set(Ce[0])}}));return D.push(f),D},style:{display:"flex",flexWrap:"wrap",gap:le(1)}},p={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:le(32),outlineOffset:"-1px",outline:h=>`1px solid ${ve(h,"border-strong","neutral")}`,paddingBlock:h=>le(xt(h)*1),paddingInline:h=>le(xt(h)*1),borderRadius:h=>le(xt(h)*1.5),fontSize:h=>un(h,"inherit"),color:h=>ve(h,"text",e),backgroundColor:h=>ve(h,"inherit",e)}};return no(l,p),l}import{merge as Da,toState as Pa}from"@domphy/core";import{themeColor as Z,themeDensity as Et,themeSize as dn,themeSpacing as $e}from"@domphy/theme";function vc(){return{_onSchedule:(n,o)=>{Da(o,{_context:{command:{query:Pa("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function xc(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>i.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>dn(e,"inherit"),paddingInline:e=>$e(Et(e)*3),paddingBlock:e=>$e(Et(e)*2),border:"none",borderBottom:e=>`1px solid ${Z(e,"border",o)}`,outline:"none",color:e=>Z(e,"shift-10",o),backgroundColor:e=>Z(e,"inherit",o),"&::placeholder":{color:e=>Z(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>Z(e,"shift-6",r)}}}}function Ec(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{role:"option",_onMount:e=>{var d,l;let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(d=t.textContent)==null?void 0:d.toLowerCase())!=null?l:"",c=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};c(i.query.get());let s=i.query.addListener(c);e.addHook("Remove",s)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>dn(e,"inherit"),height:e=>$e(6+Et(e)*2),paddingInline:e=>$e(Et(e)*3),border:"none",outline:"none",color:e=>Z(e,"text",o),backgroundColor:e=>Z(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>Z(e,"hover",o)},"&:focus-visible":{outline:e=>`${$e(.5)} solid ${Z(e,"shift-6",r)}`,outlineOffset:`-${$e(.5)}`}}}}import{merge as Oa,toState as Q}from"@domphy/core";import{themeColor as $,themeDensity as La,themeSize as Re,themeSpacing as R}from"@domphy/theme";var _=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),xe=(n,o)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+o),ao=(n,o)=>new Date(n.getFullYear(),n.getMonth()+o,n.getDate()),Ue=(n,o)=>!!n&&!!o&&n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate(),io=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,lo=(n,o)=>xe(n,-((n.getDay()-o+7)%7));function Ia(n){var o,r;try{let e=new Intl.Locale(n),i=(r=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?r:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function Oc(n={}){var jo,Yo,qo,Go;let{mode:o="single",time:r=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:s}=n,d=(jo=n.weekStartsOn)!=null?jo:Ia(a),l=Q((Yo=n.accentColor)!=null?Yo:"primary","accentColor"),m=Q((qo=n.placement)!=null?qo:"bottom-start"),y=Q((Go=n.value)!=null?Go:o==="range"?[null,null]:null),f=s?y.addListener(g=>s(g)):null,u=(()=>{let g=y.get(),b=o==="range"?g==null?void 0:g[0]:g;return b instanceof Date?b:new Date})(),p=Q(u.getFullYear(),"viewYear"),h=Q(u.getMonth(),"viewMonth"),S=Q(_(u),"focused"),v=Q(null,"hovered"),C=Q(u.getHours(),"hour"),D=Q(u.getMinutes(),"minute"),P=null,E=new Intl.DateTimeFormat(a,V({dateStyle:"medium"},r?{timeStyle:"short"}:{})),O=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),j=new Intl.DateTimeFormat(a,{weekday:"short"}),Ce=new Intl.DateTimeFormat(a,{dateStyle:"full"}),re=g=>g?E.format(g):"",xr=g=>{if(c)return c(g);if(o==="range"){let[b,x]=g!=null?g:[null,null];return b?`${re(b)} \u2013 ${re(x)}`:""}return re(g)},Er=Array.from({length:7},(g,b)=>j.format(new Date(2023,0,1+(b+d)%7))),Ho=g=>!!e&&_(g)<_(e)||!!i&&_(g)>_(i)||!!t&&t(g),ae=g=>{if(!r)return _(g);let b=_(g);return b.setHours(C.get(),D.get(),0,0),b},Fo=g=>{var k;if(Ho(g))return;if(o==="single"){y.set(ae(g)),r||Ut();return}let[b,x]=(k=y.get())!=null?k:[null,null];!b||b&&x?y.set([ae(g),null]):_(g)<_(b)?(y.set([ae(g),ae(b)]),r||Ut()):(y.set([b,ae(g)]),r||Ut())},kr=()=>{var g;if(r)if(o==="single"){let b=y.get();b&&y.set(ae(b))}else{let[b,x]=(g=y.get())!=null?g:[null,null];y.set([b&&ae(b),x&&ae(x)])}},wr=(g,b)=>{var Le;if(o!=="range")return!1;let[x,k]=(Le=y.get(b))!=null?Le:[null,null],L=k!=null?k:v.get(b);if(!x||!L)return!1;let w=_(x)<=_(L)?x:L,H=_(x)<=_(L)?L:x,B=_(g);return B>=_(w)&&B<=_(H)},Tr=(g,b)=>{let x=y.get(b);if(o==="range"){let[k,L]=x!=null?x:[null,null];return Ue(g,k)||Ue(g,L)}return Ue(g,x)},mt=g=>{p.set(g.getFullYear()),h.set(g.getMonth())},Wo=g=>{let b=ao(new Date(p.get(),h.get(),1),g);mt(b)},Ko=g=>p.set(p.get()+g),qt=()=>{setTimeout(()=>{var g;(g=P==null?void 0:P.querySelector(`[data-date="${io(S.get())}"]`))==null||g.focus()},0)},Dr=zr(),{show:Pr,hide:Or,anchorPartial:Gt}=G({kind:"datePicker",open:!1,placement:m,content:Dr});function Ut(){Or()}Gt.onClick=()=>{};let Lr={type:"text",readonly:!0,value:g=>xr(y.get(g)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(g,b)=>{Xt(b)},onFocus:(g,b)=>{Xt(b)},onKeyDown:(g,b)=>{let x=g.key;(x==="ArrowDown"||x==="Enter")&&(g.preventDefault(),Xt(b))},_onMount:g=>f&&g.addHook("Remove",()=>{f()})};function Xt(g){var x;let b=(x=Ir())!=null?x:new Date;S.set(_(b)),mt(b),Pr(g),qt()}function Ir(){var b;let g=y.get();return o==="range"?(b=g==null?void 0:g[0])!=null?b:null:g!=null?g:null}return Oa(Gt,Lr),Gt;function zr(){let g=(w,H,B)=>({button:w,type:"button",ariaLabel:H,onClick:B,style:za()}),b={div:[g("\xAB","Previous year",()=>Ko(-1)),g("\u2039","Previous month",()=>Wo(-1)),{div:w=>O.format(new Date(p.get(w),h.get(w),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:w=>Re(w)}},g("\u203A","Next month",()=>Wo(1)),g("\xBB","Next year",()=>Ko(1))],style:{display:"flex",alignItems:"center",gap:R(1),marginBottom:R(2)}},x={div:Er.map((w,H)=>({div:w,style:{textAlign:"center",fontSize:B=>Re(B,"decrease-1"),fontWeight:"600",color:B=>$(B,"shift-7"),paddingBlock:R(1)},_key:H})),role:"row",style:pn()},k={div:w=>Vr(w),role:"grid",ariaLabel:"Calendar",onKeyDown:Mr,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:R(.5)}},L=[b,x,k];return r&&L.push(Rr()),L.push(_r()),{div:L,role:"dialog",ariaModal:"false",_onMount:w=>{P=w.domElement},style:{minWidth:R(70),padding:R(3),borderRadius:w=>R(La(w)*2),backgroundColor:w=>$(w,"base"),color:w=>$(w,"shift-10"),border:w=>`1px solid ${$(w,"border-strong")}`,boxShadow:I("medium")}}}function Vr(g){let b=new Date(p.get(g),h.get(g),1),x=h.get(g),k=lo(b,d),L=[];for(let w=0;w<6;w++){let H=[];for(let B=0;B<7;B++){let Le=xe(k,w*7+B);H.push($r(Le,x,g))}L.push({div:H,role:"row",style:pn(),_key:w})}return L}function $r(g,b,x){let k=Ho(g),L=Tr(g,x),w=wr(g,x),H=g.getMonth()!==b,B=Ue(g,S.get(x)),Le=Ue(g,new Date);return{button:String(g.getDate()),type:"button",role:"gridcell",tabIndex:B?0:-1,ariaSelected:L,ariaDisabled:k,disabled:k,ariaLabel:Ce.format(g),dataDate:io(g),onClick:()=>Fo(g),onMouseEnter:()=>o==="range"&&v.set(g),style:{appearance:"none",border:"none",cursor:k?"not-allowed":"pointer",aspectRatio:"1",borderRadius:R(1),fontSize:z=>Re(z),fontFamily:"inherit",opacity:k?.35:H?.5:1,backgroundColor:z=>L?$(z,"shift-7",l.get(z)):w?$(z,"hover",l.get(z)):"transparent",color:z=>L?$(z,"shift-0",l.get(z)):$(z,"text"),outline:Le?z=>`1px solid ${$(z,"shift-6",l.get(z))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:z=>L?$(z,"shift-7",l.get(z)):$(z,"shift-3",l.get(z))},"&:focus-visible":{outline:z=>`2px solid ${$(z,"shift-6",l.get(z))}`}},_key:io(g)}}function Rr(){let g=(b,x,k)=>({select:Array.from({length:b},(L,w)=>({option:String(w).padStart(2,"0"),value:String(w),selected:H=>x.get(H)===w,_key:w})),ariaLabel:k,onChange:L=>{x.set(Number(L.target.value)),kr()},style:Va()});return{div:[g(24,C,"Hour"),{span:":",style:{fontWeight:"600"}},g(60,D,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:R(1),marginTop:R(3)}}}function _r(){let g=(b,x)=>({button:b,type:"button",onClick:x,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:k=>Re(k,"decrease-1"),color:k=>$(k,"muted",l.get(k)),padding:R(1)}});return{div:[g("Today",()=>{let b=new Date;S.set(_(b)),mt(b),qt()}),g("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:R(2),paddingTop:R(2),borderTop:b=>`1px solid ${$(b,"border")}`}}}function Mr(g){let b=g,x=S.get(),k=null;switch(b.key){case"ArrowLeft":k=xe(x,-1);break;case"ArrowRight":k=xe(x,1);break;case"ArrowUp":k=xe(x,-7);break;case"ArrowDown":k=xe(x,7);break;case"Home":k=lo(x,d);break;case"End":k=xe(lo(x,d),6);break;case"PageUp":k=ao(x,b.shiftKey?-12:-1);break;case"PageDown":k=ao(x,b.shiftKey?12:1);break;case"Enter":case" ":b.preventDefault(),Fo(x);return;default:return}b.preventDefault(),S.set(k),mt(k),qt()}}function pn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:R(.5)}}function za(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:n=>Re(n),color:n=>$(n,"muted"),width:R(7),height:R(7),borderRadius:R(1),"&:hover":{backgroundColor:n=>$(n,"shift-3")}}}function Va(){return{fontFamily:"inherit",fontSize:n=>Re(n),padding:R(1),borderRadius:R(1),border:n=>`1px solid ${$(n,"border-strong")}`,backgroundColor:n=>$(n,"base"),color:n=>$(n,"text")}}import{toState as $a}from"@domphy/core";import{themeColor as hn,themeSize as gn,themeSpacing as fn}from"@domphy/theme";function $c(n={}){var r;let o=$a((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${fn(24)}, max-content) 1fr`,columnGap:fn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>gn(e,"inherit"),color:e=>hn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>gn(e,"inherit"),color:e=>hn(e,"text",o.get(e))}}}}import{toState as yn}from"@domphy/core";import{themeColor as se,themeDensity as Xe,themeSize as bn,themeSpacing as M}from"@domphy/theme";function Ac(n={}){var i,t;let{duration:o=240}=n,r=yn((i=n.color)!=null?i:"neutral","color"),e=yn((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>bn(a,"inherit"),color:a=>se(a,"text",r.get(a)),backgroundColor:a=>se(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>se(a,"shift-2",r.get(a)),color:a=>se(a,"shift-10",r.get(a)),fontSize:a=>bn(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:M(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>M(Xe(a)*4),height:M(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:M(2),height:M(2),flexShrink:0,marginTop:`-${M(.5)}`,borderInlineEnd:a=>`${M(.5)} solid ${se(a,"shift-9",r.get(a))}`,borderBottom:a=>`${M(.5)} solid ${se(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>se(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>M(Xe(a)*2),outlineOffset:`-${M(.5)}`,outline:a=>`${M(.5)} solid ${se(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>M(Xe(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:M(250),opacity:1,paddingTop:a=>M(Xe(a)*1),paddingBottom:a=>M(Xe(a)*3)}}}}import{toState as Ra}from"@domphy/core";import{themeColor as so,themeDensity as Sn,themeSize as _a,themeSpacing as Cn}from"@domphy/theme";var Je=0;function kt(){Je++,Je===1&&(document.body.style.overflow="hidden")}function _e(){Je=Math.max(0,Je-1),Je===0&&(document.body.style.overflow="")}var vn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function jc(n={}){let{color:o="neutral",open:r=!1}=n,e=Ra(r),i=null,t=!1,a=!1,c=s=>{t=!1,s.close(),s.style.visibility="hidden",s.style.pointerEvents="none",a&&(_e(),a=!1),i==null||i.focus(),i=null};return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(s,d)=>{if(s.target!==d.domElement)return;let l=d.domElement.getBoundingClientRect();s.clientX>=l.left&&s.clientX<=l.right&&s.clientY>=l.top&&s.clientY<=l.bottom||e.set(!1)},onTransitionEnd:(s,d)=>{t&&s.target===d.domElement&&s.propertyName==="opacity"&&c(d.domElement)},_onMount:s=>{let d=s.domElement;d.setAttribute("aria-modal","true");let l=null,m=p=>{if(p.key!=="Tab")return;let h=Array.from(d.querySelectorAll(vn)).filter(C=>!C.closest("[aria-hidden='true']")&&C.offsetParent!==null);if(!h.length){p.preventDefault();return}let S=h[0],v=h[h.length-1];p.shiftKey?(document.activeElement===S||document.activeElement===d)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),S.focus())},y=p=>{p.preventDefault(),e.set(!1)};d.addEventListener("cancel",y);let f=p=>{p?(i=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",d.showModal(),a||(kt(),a=!0),d.addEventListener("keydown",m),requestAnimationFrame(()=>{d.style.opacity="1";let h=d.querySelector(vn);h==null||h.focus()})):(t=!0,d.style.opacity="0",d.removeEventListener("keydown",m),l=setTimeout(()=>{l=null,t&&c(d)},350))};f(e.get());let u=e.addListener(f);s.addHook("Remove",()=>{l&&(clearTimeout(l),l=null),u(),d.removeEventListener("cancel",y),a&&(_e(),a=!1),d.removeEventListener("keydown",m),i==null||i.focus(),i=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:s=>_a(s,"inherit"),color:s=>so(s,"shift-10",o),backgroundColor:s=>so(s,"inherit",o),border:"none",borderRadius:s=>Cn(Sn(s)*2),padding:s=>Cn(Sn(s)*3),boxShadow:I("high"),"&::backdrop":{backgroundColor:s=>so(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Ma}from"@domphy/core";import{themeColor as wt,themeSize as Aa,themeSpacing as Ba}from"@domphy/theme";function Uc(n={}){var r;let o=Ma((r=n.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:Ba(2),fontSize:e=>Aa(e,"inherit"),backgroundColor:e=>wt(e),color:e=>wt(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>wt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>wt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as Na}from"@domphy/core";import{themeColor as co,themeDensity as Ha,themeSize as Fa,themeSpacing as mo}from"@domphy/theme";var uo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},xn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Ze=n=>n==="left"||n==="right";function En(n,o){return n==="start"?o?"right":"left":n==="end"?o?"left":"right":n}function tm(n={}){let{color:o="neutral",open:r=!1,placement:e="end",size:i}=n,t=Na(r),a=e==="start"||e==="end",c=En(e,!1),s=Ze(c)?mo(80):mo(64),d=i!=null?i:s;return{_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(l,m)=>{l.target===m.domElement&&t.set(!1)},_onMount:l=>{let m=l.domElement;m.setAttribute("aria-modal","true");let y=E=>{E.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let f=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=En(e,f);a&&(m.style.transform=uo[u],m.style.margin=xn[u],m.style.width=Ze(u)?d:"100dvw",m.style.height=Ze(u)?"100dvh":d);let p=!1,h=!1,S=null,v=()=>{S=null,p&&(p=!1,m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",h&&(_e(),h=!1))},C=E=>{E.target===m&&E.propertyName==="transform"&&v()};m.addEventListener("transitionend",C);let D=E=>{E?(p=!1,m.style.visibility="visible",m.style.pointerEvents="auto",m.showModal(),h||(kt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(p=!0,m.style.transform=uo[u],S=setTimeout(v,350))};D(t.get());let P=t.addListener(D);l.addHook("Remove",()=>{S&&(clearTimeout(S),S=null),P(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",C),h&&(_e(),h=!1)})},style:{transform:uo[c],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:l=>Fa(l,"inherit"),color:l=>co(l,"shift-10",o),backgroundColor:l=>co(l,"inherit",o),border:"none",padding:l=>mo(Ha(l)*3),margin:xn[c],width:Ze(c)?d:"100dvw",height:Ze(c)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:I("high"),"&::backdrop":{backgroundColor:l=>co(l,"shift-2","neutral"),opacity:.75}}}}import{toState as Wa}from"@domphy/core";import{themeColor as Ka,themeSize as ja}from"@domphy/theme";function am(n={}){var r;let o=Wa((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>ja(e,"inherit"),fontStyle:"italic",color:e=>Ka(e,"shift-10",o.get(e))}}}import{toState as Ya}from"@domphy/core";import{themeColor as kn,themeSpacing as po}from"@domphy/theme";function cm(n={}){var r;let o=Ya((r=n.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:po(3),paddingBlock:po(12),paddingInline:po(6),textAlign:"center",color:e=>kn(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>kn(e,"shift-5",o.get(e))}}}}function um(n={}){return{_onError:(o,r,e)=>{var t,a;(t=n.onError)==null||t.call(n,r);let i=typeof n.fallback=="function"?n.fallback(r,e):(a=n.fallback)!=null?a:{div:"An error occurred."};o.children.update([i])}}}import{toState as qa}from"@domphy/core";import{themeColor as ho,themeSize as Ga,themeSpacing as Ua}from"@domphy/theme";var Xa={small:8,medium:10,large:14};function ym(n={}){var e,i;let o=qa((e=n.color)!=null?e:"primary","color"),r=Ua(Xa[(i=n.size)!=null?i:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:r,height:r,borderRadius:"50%",fontSize:t=>Ga(t,"inherit"),backgroundColor:t=>ho(t,"shift-9",o.get(t)),color:t=>ho(t,"shift-0",o.get(t)),boxShadow:I("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>ho(t,"shift-10",o.get(t)),boxShadow:I("medium")},"&:focus-visible":{boxShadow:t=>`${I("medium")}, ${T(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ja}from"@domphy/core";import{themeColor as wn,themeSize as Za,themeSpacing as Tt}from"@domphy/theme";function vm(n={}){var r;let o=Ja((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Tt(2),marginInline:0,marginTop:Tt(3),marginBottom:Tt(3),color:e=>wn(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Tt(2)},"& figcaption":{fontSize:e=>Za(e,"decrease-1"),color:e=>wn(e,"muted",o.get(e)),lineHeight:1.45}}}}import{toState as Qa}from"@domphy/core";import{themeColor as Dt,themeDensity as Me,themeSize as go,themeSpacing as ee}from"@domphy/theme";function wm(n={}){var i;let{layout:o="horizontal"}=n,r=Qa((i=n.color)!=null?i:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>ee(Me(t)*3),paddingBlock:t=>ee(Me(t)*3),border:"none",borderRadius:t=>ee(Me(t)*2),fontSize:t=>go(t,"inherit"),backgroundColor:t=>Dt(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:ee(4),rowGap:ee(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>go(t,"inherit"),fontWeight:600,paddingBlock:t=>ee(Me(t)*1),borderRadius:t=>ee(Me(t)*2),color:t=>Dt(t,"text",r.get(t)),backgroundColor:t=>Dt(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:ee(Me(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${ee(2)} * -1)`,fontSize:t=>go(t,"decrease-1"),color:t=>Dt(t,"text",r.get(t))}}}}import{toState as ei}from"@domphy/core";import{themeColor as ti,themeSize as oi,themeSpacing as ni}from"@domphy/theme";var ri={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Om(n={}){var r;let o=ei((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>ti(e,"shift-11",o.get(e)),marginTop:0,marginBottom:ni(2),fontSize:e=>{let i=ri[e.elementNode.tagName]||"inherit";return oi(e,i)}}}}import{toState as ai}from"@domphy/core";import{themeColor as ii,themeSpacing as Tn}from"@domphy/theme";function Vm(n={}){var r;let o=ai((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:Tn(3),marginBottom:Tn(3),backgroundColor:e=>ii(e,"shift-4",o.get(e))}}}import{toState as li}from"@domphy/core";import{themeColor as si,themeSize as ci,themeSpacing as Dn}from"@domphy/theme";function Mm(n={}){var r;let o=li((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:Dn(4),height:Dn(4),flexShrink:"0",fontSize:e=>ci(e),backgroundColor:"transparent",color:e=>si(e,"text",o.get(e))}}}import{toState as mi}from"@domphy/core";import{themeColor as ui,themeSpacing as di}from"@domphy/theme";function Hm(n={}){var r;let o=mi((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:di(2),backgroundColor:e=>ui(e,"inherit",o.get(e))}}}import{toState as Pn}from"@domphy/core";import{themeColor as N,themeSize as pi,themeSpacing as ce}from"@domphy/theme";function jm(n={}){var e,i;let o=Pn((e=n.color)!=null?e:"neutral","color"),r=Pn((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>pi(t,"inherit"),display:"inline-flex",position:"relative",width:ce(6),height:ce(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:ce(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${N(t,"border-strong",o.get(t))}`,color:t=>N(t,"text",o.get(t)),width:ce(4),height:ce(4)},"&:hover::before":{backgroundColor:t=>N(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${N(t,"shift-6",r.get(t))}`,backgroundColor:t=>N(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>N(t,"shift-7",r.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${ce(.5)} solid ${N(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${N(t,"shift-6",r.get(t))}`,backgroundColor:t=>N(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>N(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>N(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:ce(1.5),outline:t=>`${ce(.5)} solid ${N(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>N(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as On,themeDensity as Qe,themeSize as hi,themeSpacing as et}from"@domphy/theme";function Gm(n={}){return{type:"color",_onSchedule:(o,r)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),r.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>hi(o,"inherit"),paddingBlock:o=>et(Qe(o)*1),paddingInline:o=>et(Qe(o)*1),blockSize:o=>et(6+Qe(o)*2),inlineSize:o=>et(6+Qe(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>et(Qe(o)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>On(o,"shift-2","neutral"),outline:o=>`1px solid ${On(o,"border-strong","neutral")}`}}}}import{toState as Ln}from"@domphy/core";import{themeColor as me,themeDensity as fo,themeSize as gi,themeSpacing as Pt}from"@domphy/theme";function Qm(n={}){var i,t;let{mode:o="datetime-local"}=n,r=Ln((i=n.color)!=null?i:"neutral","color"),e=Ln((t=n.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,c)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=o},style:{fontFamily:"inherit",fontSize:a=>gi(a,"inherit"),lineHeight:"inherit",color:a=>me(a,"text",r.get(a)),backgroundColor:a=>me(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${me(a,"border-strong",r.get(a))}`,borderRadius:a=>Pt(fo(a)*1.5),paddingInline:a=>Pt(fo(a)*3),height:a=>Pt(6+fo(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${me(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>T(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>me(a,"muted","neutral"),backgroundColor:a=>me(a,"shift-2","neutral"),outline:a=>`1px solid ${me(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${Pt(.5)} solid ${me(a,"shift-6","error")}`}}}}import{toState as In}from"@domphy/core";import{themeColor as Y,themeDensity as Ot,themeSize as fi,themeSpacing as Ee}from"@domphy/theme";function ru(n={}){var e,i;let o=In((e=n.color)!=null?e:"neutral","color"),r=In((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>fi(t,"inherit"),lineHeight:"inherit",color:t=>Y(t,"text",o.get(t)),backgroundColor:t=>Y(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Y(t,"border-strong",o.get(t))}`,borderRadius:t=>Ee(Ot(t)*1.5),height:t=>Ee(6+Ot(t)*2),paddingInline:t=>Ee(Ot(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>Ee(Ot(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:Ee(1),height:Ee(6),paddingInline:Ee(2),cursor:"pointer",color:t=>Y(t,"shift-11",o.get(t)),backgroundColor:t=>Y(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${Y(t,"shift-5",r.get(t))}`},"&:focus-visible":{boxShadow:t=>T(t,r.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>Y(t,"muted","neutral"),outline:t=>`1px solid ${Y(t,"border-strong","neutral")}`,backgroundColor:t=>Y(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>Y(t,"muted","neutral"),backgroundColor:t=>Y(t,"shift-3","neutral")}}}}import{toState as zn}from"@domphy/core";import{themeColor as ke,themeDensity as Lt,themeSize as yi,themeSpacing as tt}from"@domphy/theme";function cu(n={}){var e,i;let o=zn((e=n.color)!=null?e:"neutral","color"),r=zn((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:tt(10),paddingInlineStart:t=>tt(Lt(t)*3),paddingInlineEnd:t=>tt(Lt(t)*1.5),paddingBlock:t=>tt(Lt(t)*1),borderRadius:t=>tt(Lt(t)*1.5),fontSize:t=>yi(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ke(t,"border-strong",o.get(t))}`,color:t=>ke(t,"text",o.get(t)),backgroundColor:t=>ke(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${ke(t,"shift-5",r.get(t))}`},"&:focus-visible":{boxShadow:t=>T(t,r.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>ke(t,"shift-2","neutral"),outline:t=>`1px solid ${ke(t,"border-strong","neutral")}`,color:t=>ke(t,"muted","neutral")}}}}import{toState as yo}from"@domphy/core";import{themeColor as It,themeDensity as zt,themeSize as bi,themeSpacing as Vt}from"@domphy/theme";var Si='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',Ci='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function hu(n={}){var i,t;let o=yo((i=n.color)!=null?i:"neutral","color"),r=yo((t=n.accentColor)!=null?t:"primary","accentColor"),e=yo(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let c={input:null,type:d=>e.get(d)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},s={button:d=>e.get(d)?Ci:Si,type:"button",ariaLabel:d=>e.get(d)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(c),a.children.insert(s)},style:{display:"flex",alignItems:"center",gap:a=>Vt(zt(a)*1),paddingBlock:a=>Vt(zt(a)*1),paddingInline:a=>Vt(zt(a)*3),borderRadius:a=>Vt(zt(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${It(a,"border-strong",o.get(a))}`,color:a=>It(a,"text",o.get(a)),backgroundColor:a=>It(a,"inherit",o.get(a)),fontSize:a=>bi(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${It(a,"shift-5",r.get(a))}`},"&:focus-within":{boxShadow:a=>T(a,r.get(a))}}}}import{themeSpacing as Vn}from"@domphy/theme";function yu(){return{style:{display:"flex",alignItems:"center",gap:Vn(2),"& > *":{minWidth:`${Vn(9)}!important`}},_onMount:n=>{let o=n.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=a=>{let c=r(),s=a.target,d=c.indexOf(s);s.value&&d<c.length-1&&c[d+1].focus()},i=a=>{let c=r(),s=a.target,d=c.indexOf(s);a.key==="Backspace"&&!s.value&&d>0&&c[d-1].focus(),a.key==="ArrowLeft"&&d>0&&c[d-1].focus(),a.key==="ArrowRight"&&d<c.length-1&&c[d+1].focus()},t=a=>{var y,f,u;a.preventDefault();let c=(f=(y=a.clipboardData)==null?void 0:y.getData("text"))!=null?f:"",s=r(),d=s.indexOf(a.target),l=d===-1?0:d;[...c].forEach((p,h)=>{s[l+h]&&(s[l+h].value=p)});let m=Math.min(l+c.length-1,s.length-1);(u=s[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",i),o.addEventListener("paste",t),n.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",i),o.removeEventListener("paste",t)})}}}import{toState as $n}from"@domphy/core";import{themeColor as ue,themeSize as vi,themeSpacing as ot}from"@domphy/theme";function vu(n={}){var e,i;let o=$n((e=n.color)!=null?e:"neutral","color"),r=$n((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>vi(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:ot(6),height:ot(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ue(t,"border-strong",o.get(t))}`,color:t=>ue(t,"text",o.get(t)),width:ot(4),height:ot(4)},"&:hover::before":{backgroundColor:t=>ue(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${ue(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>ue(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>ue(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${ot(.5)} solid ${ue(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>ue(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Rn}from"@domphy/core";import{themeColor as $t,themeSpacing as q}from"@domphy/theme";function wu(n={}){var e,i;let o=Rn((e=n.color)!=null?e:"neutral","color"),r=Rn((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:q(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:q(1.5),borderRadius:q(999),backgroundColor:t=>$t(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:q(4),height:q(4),borderRadius:q(999),border:"none",marginTop:`calc((${q(1.5)} - ${q(4)}) / 2)`,backgroundColor:t=>$t(t,"shift-9",r.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>$t(t,"shift-10",r.get(t))},"&:focus-visible":{outline:t=>`${q(.5)} solid ${$t(t,"shift-6",r.get(t))}`,outlineOffset:q(1),borderRadius:q(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as _n}from"@domphy/core";import{themeColor as de,themeDensity as bo,themeSize as xi,themeSpacing as Rt}from"@domphy/theme";function Lu(n={}){var e,i;let o=_n((e=n.color)!=null?e:"neutral","color"),r=_n((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>xi(t,"inherit"),lineHeight:"inherit",color:t=>de(t,"text",o.get(t)),backgroundColor:t=>de(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${de(t,"border-strong",o.get(t))}`,borderRadius:t=>Rt(bo(t)*1.5),minWidth:Rt(32),paddingInline:t=>Rt(bo(t)*3),paddingBlock:t=>Rt(bo(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>de(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${de(t,"shift-5",r.get(t))}`},"&:focus-visible":{boxShadow:t=>T(t,r.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>de(t,"muted","neutral"),backgroundColor:t=>de(t,"shift-2","neutral"),outline:t=>`1px solid ${de(t,"border-strong","neutral")}`}}}}import{toState as Ei}from"@domphy/core";import{themeColor as So,themeSize as Mn,themeSpacing as te}from"@domphy/theme";function $u(n={}){var r;let o=Ei((r=n.accentColor)!=null?r:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>Mn(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:te(9),height:te(6),cursor:"pointer",margin:"0",paddingBlock:te(1),"&:checked":{"&::before":{backgroundColor:e=>So(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${te(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:te(3),height:te(3),borderRadius:te(999),left:te(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>So(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:te(999),display:"inline-block",fontSize:e=>Mn(e,"inherit"),lineHeight:1,backgroundColor:e=>So(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as An}from"@domphy/core";import{themeColor as K,themeDensity as Co,themeSize as ki,themeSpacing as we}from"@domphy/theme";function Bu(n={}){var e,i;let o=An((e=n.color)!=null?e:"neutral","color"),r=An((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:we(10),paddingInline:t=>we(Co(t)*3),paddingBlock:t=>we(Co(t)*1),borderRadius:t=>we(Co(t)*1.5),fontSize:t=>ki(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${K(t,"border-strong",o.get(t))}`,color:t=>K(t,"text",o.get(t)),backgroundColor:t=>K(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>K(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>K(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${K(t,"shift-5",r.get(t))}`},"&:focus-visible":{boxShadow:t=>T(t,r.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>K(t,"shift-2","neutral"),outline:t=>`1px solid ${K(t,"border-strong","neutral")}`,color:t=>K(t,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${we(.5)} solid ${K(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${we(.5)} solid ${K(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${we(.5)} solid ${K(t,"shift-6","warning")}`}}}}import{toState as wi}from"@domphy/core";import{themeColor as vo,themeSize as Ti,themeSpacing as xo}from"@domphy/theme";function Wu(n={}){var r;let o=wi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>Ti(e,"inherit"),color:e=>vo(e,"text",o.get(e)),backgroundColor:e=>vo(e,"inherit",o.get(e)),paddingBlock:xo(.5),paddingInline:xo(1.5),borderRadius:xo(1),outline:e=>`1px solid ${vo(e,"border-strong",o.get(e))}`}}}import{toState as Bn}from"@domphy/core";import{themeColor as Eo,themeSize as Di,themeSpacing as Pi}from"@domphy/theme";function qu(n={}){var e,i;let o=Bn((e=n.color)!=null?e:"neutral","color"),r=Bn((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Pi(2),fontSize:t=>Di(t,"inherit"),color:t=>Eo(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>Eo(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>Eo(t,"muted","neutral")}}}}import{toState as Nn}from"@domphy/core";import{themeColor as Ae,themeSize as Oi,themeSpacing as ko}from"@domphy/theme";function Ju(n={}){var e,i;let o=Nn((e=n.color)!=null?e:"primary","color"),r=Nn((i=n.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>Oi(t,"inherit"),backgroundColor:t=>Ae(t),color:t=>Ae(t,"text",o.get(t)),textDecoration:"none","&:visited":{color:t=>Ae(t,"text",r.get(t))},"&:hover:not([disabled])":{color:t=>Ae(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:ko(1),outlineOffset:ko(1),outline:t=>`${ko(.5)} solid ${Ae(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Ae(t,"muted","neutral")}}}}import{toState as Li}from"@domphy/core";import{themeColor as pe,themeDensity as _t,themeSize as Ii,themeSpacing as Mt}from"@domphy/theme";function od(n={}){var r;let o=Li((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:e=>Ii(e,"inherit"),textDecoration:"none",paddingBlock:e=>Mt(_t(e)*1),paddingInline:e=>Mt(_t(e)*3),borderRadius:e=>Mt(_t(e)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>Mt(_t(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${pe(e,"border-strong",o.get(e))}`,color:e=>pe(e,"text",o.get(e)),backgroundColor:e=>pe(e,"inherit",o.get(e)),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>pe(e,"shift-10",o.get(e)),backgroundColor:e=>pe(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>T(e,o.get(e))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>pe(e,"shift-2","neutral"),outline:e=>`1px solid ${pe(e,"border-strong","neutral")}`,color:e=>pe(e,"muted","neutral")}}}}import{toState as zi}from"@domphy/core";import{themeColor as nt,themeDensity as Te,themeSize as Hn,themeSpacing as De}from"@domphy/theme";function id(n={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function ld(n={}){let{dense:o=!1}=n;return{style:{display:"flex",alignItems:"center",gap:r=>De(Te(r)*2),paddingBlock:r=>De(o?1:Te(r)*2),paddingInline:r=>De(Te(r)*3),fontSize:r=>Hn(r,"inherit")}}}function sd(n={}){var i,t;let o=zi((i=n.color)!=null?i:"neutral","color"),r=(t=n.accentColor)!=null?t:"primary",{dense:e=!1}=n;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>De(Te(a)*2),paddingBlock:a=>De(e?1:Te(a)*2),paddingInline:a=>De(Te(a)*3),fontSize:a=>Hn(a,"inherit"),color:a=>nt(a,"text",o.get(a)),borderRadius:a=>De(Te(a)*1.5),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>nt(a,"hover",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>nt(a,"shift-3",r),color:a=>nt(a,"shift-12",r)},"&:focus-visible":{outline:a=>`2px solid ${nt(a,"shift-6",r)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Vi}from"@domphy/core";import{themeColor as Fn,themeSize as $i,themeSpacing as wo}from"@domphy/theme";function dd(n={}){var r;let o=Vi((r=n.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>$i(e,"inherit"),color:e=>Fn(e,"text",o.get(e)),backgroundColor:e=>Fn(e,"inherit",o.get(e)),height:wo(6),borderRadius:wo(1),paddingInline:wo(1.5)}}}import{toState as Ri}from"@domphy/core";import{themeColor as he,themeDensity as rt,themeSize as Wn,themeSpacing as ge}from"@domphy/theme";function yd(n={items:[]}){var a;let{items:o=[],selectable:r=!0,color:e="neutral",accentColor:i="primary"}=n,t=Ri((a=n.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(c,s)=>{if(o.length===0)return;let d=c.nodeId,l=o.map((m,y)=>{var u;let f=(u=m.key)!=null?u:y;return Ie(V({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:f,type:"button",id:`menuitem${d}${f}`,role:"menuitem"},r?{ariaCurrent:p=>t.get(p)===f||void 0}:{}),{onClick:()=>{var p;r&&t.set(f),(p=m.onClick)==null||p.call(m)},onKeyDown:p=>{var D;let h=p.key;if(h==="Enter"||h===" "){p.preventDefault(),p.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;p.preventDefault();let S=o.map((P,E)=>{var O;return(O=P.key)!=null?O:E}),v=S.indexOf(f),C=v;h==="ArrowDown"?C=(v+1)%S.length:h==="ArrowUp"?C=(v-1+S.length)%S.length:h==="Home"?C=0:h==="End"&&(C=S.length-1),(D=document.getElementById(`menuitem${d}${S[C]}`))==null||D.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:ge(2),width:"100%",fontSize:p=>Wn(p,"inherit"),height:p=>ge(6+rt(p)*2),paddingInline:p=>ge(rt(p)*3),border:"none",outline:"none",color:p=>he(p,"text",e),backgroundColor:p=>he(p,"inherit",e),transition:"background-color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:p=>he(p,"hover",e)},"&[aria-current=true]":{backgroundColor:p=>he(p,"shift-3",i),color:p=>he(p,"shift-10")},"&:focus-visible":{outline:p=>`${ge(.5)} solid ${he(p,"shift-6",i)}`,outlineOffset:`-${ge(.5)}`}}})});s[c.tagName]=l},style:{display:"flex",flexDirection:"column",paddingBlock:c=>ge(rt(c)*2),paddingInline:c=>ge(rt(c)*2),fontSize:c=>Wn(c,"inherit"),backgroundColor:c=>he(c,"inherit",e),borderRadius:c=>ge(rt(c)*2),outline:c=>`1px solid ${he(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:I("medium")}}}var Kn=n=>!!n&&typeof n.get=="function"&&n._isState===!0,Be=n=>{let o={},r=[];for(let e in n){let i=n[e];e==="x"?r.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?r.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?r.push(`scale(${i})`):e==="rotate"?r.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):o[e]=i}return r.length&&(o.transform=r.join(" ")),o};function Cd(n={}){var a,c,s,d;let{initial:o,animate:r,exit:e,transition:i={}}=n,t={duration:(a=i.duration)!=null?a:300,delay:(c=i.delay)!=null?c:0,easing:(s=i.easing)!=null?s:"ease",iterations:(d=i.iterations)!=null?d:1,fill:"both"};return{_onMount:l=>{let m=l.domElement;if(!m||typeof m.animate!="function")return;let y=Kn(r)?r.get():r;if(y?m.animate(o?[Be(o),Be(y)]:[Be(y)],t):o&&Object.assign(m.style,Be(o)),Kn(r)){let f=r.addListener(u=>{m.animate([Be(u)],t)});l.setMetadata("motionRelease",f)}},_onBeforeRemove:(l,m)=>{let y=l.domElement;if(!y||!e||typeof y.animate!="function")return m();y.animate([Be(e)],t).finished.then(m,m)},_onRemove:l=>{let m=l.getMetadata("motionRelease");m==null||m()}}}import{toState as _i}from"@domphy/core";import{themeColor as jn,themeSize as Mi,themeSpacing as Ai}from"@domphy/theme";function kd(n={}){var r;let o=_i((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Mi(e,"inherit"),backgroundColor:e=>jn(e),color:e=>jn(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Ai(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as Bi}from"@domphy/core";import{themeColor as Ne,themeDensity as at,themeSize as Ni,themeSpacing as He}from"@domphy/theme";function Hi(n,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let r=[1];n>3&&r.push("...");let e=Math.max(2,n-1),i=Math.min(o-1,n+1);for(let t=e;t<=i;t++)r.push(t);return n<o-2&&r.push("..."),r.push(o),r}function Od(n){var c;let{total:o,color:r="neutral",accentColor:e="primary"}=n,i=Bi((c=n.value)!=null?c:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>He(6+at(s)*2),height:s=>He(6+at(s)*2),paddingInline:s=>He(at(s)*2),borderRadius:s=>He(at(s)*1.5),border:"none",cursor:"pointer",fontSize:s=>Ni(s,"inherit"),backgroundColor:"transparent",color:s=>Ne(s,"text",r),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:s=>Ne(s,"hover",r)},"&:focus-visible":{boxShadow:s=>T(s,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Ie(V({},t),{backgroundColor:s=>Ne(s,"shift-6",e),color:s=>Ne(s,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:s=>Ne(s,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:s=>{s.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:s=>{let d={div:l=>{let m=i.get(l),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&i.set(m-1),style:t});let f=0;for(let u of Hi(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${f++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:p=>He(at(p)*2),color:p=>Ne(p,"shift-7",r)}});else{let p=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:p?"page":void 0,disabled:p,onClick:()=>i.set(u),style:p?a:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&i.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:He(1)}};s.children.insert(d)},style:{display:"inline-flex"}}}import{toState as Fi}from"@domphy/core";import{themeColor as Wi,themeDensity as Ki,themeSpacing as ji}from"@domphy/theme";function $d(n={}){var i;let{padding:o=4,divider:r=!1}=n,e=Fi((i=n.color)!=null?i:"neutral","color");return{style:V({padding:t=>ji(Ki(t)*o)},r?{borderBottom:t=>`1px solid ${Wi(t,"border",e.get(t))}`}:{})}}import{toState as Yi}from"@domphy/core";import{themeColor as qi,themeSize as Gi}from"@domphy/theme";function Bd(n={}){var r;let o=Yi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Gi(e,"inherit"),color:e=>qi(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Ui,toState as Yn}from"@domphy/core";import{themeColor as qn,themeDensity as Xi,themeSpacing as Ji}from"@domphy/theme";function jd(n){var y;let{open:o=!1,placement:r="bottom",openOn:e="click"}=n,i=null,t=Yn(o),a=Yn(r),{show:c,hide:s,anchorPartial:d}=G({kind:"popover",open:t,placement:a,content:n.content,keepOpenOnContentHover:e==="hover"}),l={role:"dialog",dataTone:"shift-14",style:{backgroundColor:f=>qn(f,"inherit"),borderRadius:f=>Ji(Xi(f)*2),outline:f=>`1px solid ${qn(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:I("medium")},_onInsert:f=>{let u=f.attributes.get("id");i=u||f.nodeId,!u&&f.attributes.set("id",i)}};return(y=n.content).$||(y.$=[]),n.content.$.push(l),Ui(d,{ariaHaspopup:"dialog",ariaExpanded:f=>t.get(f),onMouseEnter:(f,u)=>e==="hover"&&c(u),onMouseLeave:(f,u)=>e==="hover"&&s(u),onClick:(f,u)=>{e==="click"&&(t.get()?s(u):c(u))},onKeyDown:(f,u)=>{f.key==="Escape"&&t.get()&&s(u)},onFocus:(f,u)=>e==="hover"&&c(u),onBlur:(f,u)=>{let p=f.relatedTarget,h=u.getRoot().domElement,S=i?h.querySelector(`#${CSS.escape(i)}`):null;p&&(S!=null&&S.contains(p))||s(u)},_onMount:f=>i&&f.attributes.set("ariaControls",i)}),d}import{toState as Zi}from"@domphy/core";import{themeColor as At,themeSize as Qi,themeSpacing as To}from"@domphy/theme";function Gn(n={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=To(6),bordered:i=!0}=n,t=Zi(o),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},c=l=>{var m;return(m=a[t.get(l)])!=null?m:a["bottom-end"]},s=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",d=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>Qi(l),backgroundColor:l=>At(l),color:l=>At(l,"text",r),position:"relative","&::after":{content:'""',position:"absolute",width:To(1.5),height:To(1.5),backgroundColor:l=>At(l,"inherit",r),borderWidth:i?"1px":0,borderColor:l=>At(l,"inherit",r),borderTopStyle:l=>{let m=c(l);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:l=>{let m=c(l);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:l=>{let m=c(l);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:l=>{let m=c(l);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:l=>{let m=c(l);return m.includes("top")?0:m.includes("bottom")?"auto":s(m)},right:l=>{let m=c(l);return m.includes("right")?0:m.includes("left")?"auto":d(m)},bottom:l=>{let m=c(l);return m.includes("bottom")?0:m.includes("top")?"auto":d(m)},left:l=>{let m=c(l);return m.includes("left")?0:m.includes("right")?"auto":s(m)},transform:l=>{let m=c(l),y=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",f=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${y},${f}) rotate(45deg)`}}}}}import{toState as el}from"@domphy/core";import{themeColor as Un,themeDensity as Do,themeSize as tl,themeSpacing as Po}from"@domphy/theme";function Zd(n={}){var r;let o=el((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>tl(e,"inherit"),color:e=>Un(e,"text",o.get(e)),backgroundColor:e=>Un(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>Po(Do(e)*2),paddingInline:e=>Po(Do(e)*3),borderRadius:e=>Po(Do(e)*2)}}}import{toState as Xn}from"@domphy/core";import{themeColor as Oo,themeSpacing as Bt}from"@domphy/theme";function op(n={}){var e,i;let o=Xn((e=n.color)!=null?e:"neutral","color"),r=Xn((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:Bt(2),border:0,borderRadius:Bt(999),overflow:"hidden",backgroundColor:t=>Oo(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>Oo(t,"shift-3",o.get(t)),borderRadius:Bt(999)},"&::-webkit-progress-value":{backgroundColor:t=>Oo(t,"shift-9",r.get(t)),borderRadius:Bt(999),transition:"width 220ms ease"}}}}import{toState as Jn}from"@domphy/core";import{themeColor as ol,themeSpacing as Zn}from"@domphy/theme";var nl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',rl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function lp(n={}){var s,d;let{max:o=5,readOnly:r=!1,onChange:e}=n,i=(s=n.color)!=null?s:"warning",t=Jn((d=n.value)!=null?d:0),a=Jn(0),c=l=>{let m=a.get(l);return m>0?m:t.get(l)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Zn(.5),fontSize:"1.5rem",cursor:r?"default":"pointer",color:l=>ol(l,"muted",i)},_onInit:l=>{for(let m=1;m<=o;m++){let y=m,f=r?{}:{onClick:()=>{let p=y===t.get()?0:y;t.set(p),e==null||e(p),a.set(0)},onMouseEnter:()=>a.set(y),onMouseLeave:()=>a.set(0),onKeyDown:p=>{var C,D;let h=t.get(),S=h;if(p.key==="ArrowRight"||p.key==="ArrowUp")S=Math.min(o,h+1),p.preventDefault();else if(p.key==="ArrowLeft"||p.key==="ArrowDown")S=Math.max(0,h-1),p.preventDefault();else return;t.set(S),e==null||e(S);let v=S>0?S-1:0;(D=(C=l.domElement)==null?void 0:C.children[v])==null||D.focus()}},u=Ie(V({button:p=>y<=c(p)?nl:rl,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},f),{style:{background:"none",border:"none",outline:"none",borderRadius:Zn(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>T(p,i)}}});l.children.insert(u)}}}}import{toState as Lo}from"@domphy/core";import{themeColor as Qn,themeSpacing as er}from"@domphy/theme";function dp(n={}){var s,d,l;let{size:o=16,thickness:r=.25}=n,e=Lo((s=n.value)!=null?s:0,"value"),i=Lo((d=n.color)!=null?d:"primary","color"),t=Lo((l=n.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-r)*100),c=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:m=>String(Math.round(e.get(m))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:m=>{m.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:er(o),height:er(o),borderRadius:"50%",background:m=>`conic-gradient(from -90deg, ${Qn(m,"shift-9",i.get(m))} ${e.get(m)}%, ${Qn(m,"shift-3",t.get(m))} 0%)`,WebkitMask:c,mask:c}}}import{themeDensity as al,themeSpacing as il}from"@domphy/theme";function tr(n={}){let{gap:o=4,align:r="center",justify:e,wrap:i=!1}=n;return{style:V(V({display:"flex",alignItems:r,gap:t=>il(al(t)*o)},e?{justifyContent:e}:{}),i?{flexWrap:"wrap"}:{})}}import{toState as ll}from"@domphy/core";import{themeColor as Io,themeSpacing as Nt}from"@domphy/theme";function Sp(n={}){var r;let o=ll((r=n.color)!=null?r:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:Nt(2),height:Nt(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Io(e,"shift-5",o.get(e)),borderRadius:Nt(999),border:`${Nt(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Io(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Io(e,"shift-5",o.get(e))} transparent`}}}import{toState as sl}from"@domphy/core";import{themeColor as it,themeSize as cl,themeSpacing as fe}from"@domphy/theme";function kp(n={items:[]}){var t,a,c;let{items:o=[],color:r="neutral",accentColor:e="primary"}=n,i=sl((c=(a=n.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?c:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(s,d)=>{let l=o.map((m,y)=>{var p;let f=(p=m.key)!=null?p:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:f,type:"button",role:"radio",ariaChecked:h=>i.get(h)===f,onClick:()=>i.set(f),style:{cursor:"pointer",fontSize:h=>cl(h,"inherit"),height:fe(6),paddingBlock:fe(1),paddingInline:fe(3),border:"none",borderRadius:fe(10),color:h=>it(h,"text",r),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>it(h,"shift-3",r)},"&[aria-checked=true]":{backgroundColor:h=>it(h,"shift-0",e),color:h=>it(h,"shift-10",e)},"&:focus-visible":{boxShadow:h=>T(h,e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[s.tagName]=l},style:{display:"inline-flex",paddingBlock:fe(1),paddingInline:fe(1),gap:fe(.5),borderRadius:fe(10),backgroundColor:s=>it(s,"shift-2",r)}}}import{themeColor as oe,themeColorToken as ml,themeDensity as lt,themeSize as ul,themeSpacing as ye}from"@domphy/theme";function Pp(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>ul(e,"inherit"),lineHeight:"inherit",color:e=>oe(e,"text",o),backgroundColor:e=>oe(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${oe(e,"border-strong",o)}`,borderRadius:e=>ye(lt(e)*1.5),paddingBlock:e=>ye(lt(e)*1),paddingLeft:e=>ye(lt(e)*3),paddingRight:e=>ye(lt(e)*5),backgroundImage:e=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${ml(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${ye(2)} center`,backgroundSize:`${ye(2.5)} ${ye(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>ye(6+lt(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${oe(e,"shift-5",r)}`},"&:focus-visible":{boxShadow:e=>T(e,r)},"& optgroup":{color:e=>oe(e,"shift-11",o)},"& option[disabled]":{color:e=>oe(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>oe(e,"muted","neutral"),outline:e=>`1px solid ${oe(e,"border-strong","neutral")}`,backgroundColor:e=>oe(e,"shift-2","neutral")}}}}import{merge as or,toState as zo}from"@domphy/core";import{themeColor as st,themeDensity as Ht,themeSize as dl,themeSpacing as Fe}from"@domphy/theme";function Rp(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=zo(n.value),c=zo(i),{show:s,hide:d,anchorPartial:l}=G({kind:"selectBox",open:c,placement:zo(r),content:n.content}),m={onClick:(u,p)=>!t&&d(p),dataTone:"shift-14",style:{backgroundColor:u=>st(u,"inherit"),borderRadius:u=>Fe(Ht(u)*2),outline:u=>`1px solid ${st(u,"border-strong")}`,outlineOffset:"-1px",boxShadow:I("medium")}};or(n.content,m);let y={div:u=>{let p=a.get(u),h=Array.isArray(p)?p:[p];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[vt({color:e,removable:t})],_key:v.value,_onRemove:C=>{let D=a.get(),E=(Array.isArray(D)?D:[D]).filter(O=>O!==v.value);t?a.set(E):a.set(E[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:Fe(1),flex:1}},f={_onInsert:u=>{u.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:u=>u.children.insert(y),onClick:(u,p)=>c.get()?d(p):s(p),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>Fe(6+Ht(u)*2),minWidth:Fe(32),outlineOffset:"-1px",outline:u=>`1px solid ${st(u,"border-strong","neutral")}`,paddingInline:u=>Fe(Ht(u)*2),borderRadius:u=>Fe(Ht(u)*1.5),fontSize:u=>dl(u,"inherit"),color:u=>st(u,"text",e),backgroundColor:u=>st(u,"inherit",e)}};return or(l,f),l}import{themeColor as We,themeDensity as nr,themeSize as pl,themeSpacing as Ft}from"@domphy/theme";function Ap(n={}){let{accentColor:o="primary",color:r="neutral",value:e=null}=n;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let c=a.value;t.attributes.set("ariaSelected",s=>{let d=c.get(s);return a.multiple?d.includes(e):d===e}),t.addEvent("click",()=>{let s=c.get();a.multiple?s.includes(e)?c.set(s.filter(d=>d!==e)):c.set(s.concat([e])):s!==e&&c.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>pl(t,"inherit"),height:t=>Ft(6+nr(t)*2),paddingInline:t=>Ft(nr(t)*3),border:"none",outline:"none",color:t=>We(t,"text",r),backgroundColor:t=>We(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>We(t,"hover",r)},"&[aria-selected=true]":{backgroundColor:t=>We(t,"shift-6",o),color:t=>We(t,"shift-11")},"&:focus-visible":{outline:t=>`${Ft(.5)} solid ${We(t,"shift-6",o)}`,outlineOffset:`-${Ft(.5)}`}}}}import{toState as hl}from"@domphy/core";import{themeColor as gl,themeDensity as rr,themeSize as fl,themeSpacing as ar}from"@domphy/theme";function Fp(n={}){var a;let{color:o="neutral",multiple:r=!1}=n,e=hl((a=n.value)!=null?a:r?[]:null),i={div:c=>{let s=e.get(c);return(Array.isArray(s)?s:[s]).map(l=>({input:null,name:n.name,value:l==null?"":String(l)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:r}},_onInit:c=>{c.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),c.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>ar(rr(c)*2),paddingInline:c=>ar(rr(c)*2),fontSize:c=>fl(c,"inherit"),backgroundColor:c=>gl(c,"inherit",o)}}}import{hashString as yl,toState as bl}from"@domphy/core";import{themeColor as ir,themeSize as Sl,themeSpacing as lr}from"@domphy/theme";function Yp(n={}){var i;let o=bl((i=n.color)!=null?i:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=yl(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>Sl(t),color:t=>ir(t,"text",o.get(t)),height:lr(6),display:"block",borderRadius:lr(1),backgroundColor:t=>ir(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{toState as Cl}from"@domphy/core";import{themeColor as vl,themeSize as xl}from"@domphy/theme";function Xp(n={}){var r;let o=Cl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>xl(e,"inherit"),color:e=>vl(e,"text",o.get(e))}}}import{hashString as El,toState as kl}from"@domphy/core";import{themeColor as Wt,themeSize as wl,themeSpacing as Vo}from"@domphy/theme";var cr={to:{transform:"rotate(360deg)"}},sr=El(JSON.stringify(cr));function eh(n={}){var r;let o=kl((r=n.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>wl(e),backgroundColor:e=>Wt(e),color:e=>Wt(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Vo(6),height:Vo(6),borderRadius:"50%",border:e=>`${Vo(.5)} solid ${Wt(e,"border-strong",o.get(e))}`,borderTopColor:e=>Wt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${sr} 0.7s linear infinite`,[`@keyframes ${sr}`]:cr}}}import{merge as Tl,toState as Dl}from"@domphy/core";import{themeColor as Kt,themeSpacing as $o}from"@domphy/theme";function rh(n={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:i=90}=n;return{_onSchedule:(t,a)=>{Tl(a,{_context:{splitter:{direction:o,size:Dl(r),min:e,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function ah(){return{_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal"?"width":"height",i=o.panelCount++===0,t=c=>{r.style[e]=`${i?c:100-c}%`};t(o.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let a=o.size.addListener(t);n.addHook("Remove",a)}}}function ih(){return{role:"separator",tabindex:0,_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal";r.style.cursor=e?"col-resize":"row-resize",r.setAttribute("aria-orientation",e?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(o.min)),r.setAttribute("aria-valuemax",String(o.max)),r.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let i=o.size.addListener(s=>{r.setAttribute("aria-valuenow",String(Math.round(s)))}),t=s=>{let d=s.shiftKey?10:1,l=null;e?s.key==="ArrowRight"?l=Math.min(o.size.get()+d,o.max):s.key==="ArrowLeft"&&(l=Math.max(o.size.get()-d,o.min)):s.key==="ArrowDown"?l=Math.min(o.size.get()+d,o.max):s.key==="ArrowUp"&&(l=Math.max(o.size.get()-d,o.min)),s.key==="Home"?l=o.min:s.key==="End"&&(l=o.max),l!==null&&(s.preventDefault(),o.size.set(l))},a=null,c=s=>{s.preventDefault();let d=r.parentElement,l=y=>{let f=d.getBoundingClientRect(),u=e?(y.clientX-f.left)/f.width*100:(y.clientY-f.top)/f.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",m)};r.addEventListener("keydown",t),r.addEventListener("mousedown",c),n.addHook("Remove",()=>{a==null||a(),i(),r.removeEventListener("keydown",t),r.removeEventListener("mousedown",c)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n=>Kt(n,"shift-2"),"&:hover":{backgroundColor:n=>Kt(n,"shift-3")},"&:focus-visible":{outline:n=>`2px solid ${Kt(n,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:$o(1),height:$o(1),borderRadius:$o(999),backgroundColor:n=>Kt(n,"shift-4")}}}}import{themeDensity as Pl,themeSpacing as Ol}from"@domphy/theme";function ch(n={}){let{gap:o=3,align:r}=n;return{style:V({display:"flex",flexDirection:"column",gap:e=>Ol(Pl(e)*o)},r?{alignItems:r}:{})}}import{toState as Ll}from"@domphy/core";import{themeColor as A,themeSize as mr,themeSpacing as be}from"@domphy/theme";function hh(n={items:[]}){var a;let{items:o=[],direction:r="horizontal",color:e="neutral",accentColor:i="primary"}=n,t=Ll((a=n.current)!=null?a:0);return{_context:{steps:{current:t,direction:r,color:e,accentColor:i}},_onSchedule:(c,s)=>{let d=o.map((l,m)=>{var f;return{li:[typeof l.label=="string"?{span:l.label}:l.label],_key:(f=l.key)!=null?f:m,dataStep:String(m+1),dataStatus:u=>{let p=t.get(u);return m<p?"done":m===p?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:be(1),flex:"1",fontSize:u=>mr(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:be(6),height:be(6),borderRadius:be(999),fontSize:u=>mr(u,"decrease-1"),fontWeight:"600",flexShrink:"0",border:u=>`2px solid ${A(u,"border-strong",e)}`,backgroundColor:u=>A(u,"inherit"),color:u=>A(u,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:be(3),right:`calc(50% + ${be(3)})`,left:`calc(-50% + ${be(3)})`,height:"2px",backgroundColor:u=>A(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>A(u,"shift-6",i),borderColor:u=>A(u,"shift-6",i),color:u=>A(u,"shift-15",i)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>A(u,"shift-3",e),borderColor:u=>A(u,"border",e),color:u=>A(u,"text",e)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>A(u,"shift-3",e)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>A(u,"shift-6",i)},"&[data-status=pending]":{color:u=>A(u,"shift-7")},"&[data-status=active]":{color:u=>A(u,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:u=>A(u,"muted")}}}});s[c.tagName]=d},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:be(2),listStyle:"none",margin:"0",padding:"0"}}}import{toState as Il}from"@domphy/core";import{themeColor as ur,themeSize as zl}from"@domphy/theme";function bh(n={}){var r;let o=Il((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>zl(e,"inherit"),fontWeight:700,color:e=>ur(e,"shift-11",o.get(e)),backgroundColor:e=>ur(e)}}}import{toState as Vl}from"@domphy/core";import{themeColor as $l,themeSize as Rl}from"@domphy/theme";function xh(n={}){var r;let o=Vl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Rl(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>$l(e,"text",o.get(e))}}}import{toState as _l}from"@domphy/core";import{themeColor as Ml,themeSize as Al}from"@domphy/theme";function Th(n={}){var r;let o=_l((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Al(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Ml(e,"text",o.get(e))}}}import{toState as Bl}from"@domphy/core";import{themeColor as U,themeDensity as Ke,themeSize as dr,themeSpacing as je}from"@domphy/theme";function Lh(n={}){var r;let o=Bl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>dr(e,"inherit"),color:e=>U(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-10",o.get(e)),backgroundColor:e=>U(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${U(e,"shift-3",o.get(e))}`,fontSize:e=>dr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-10",o.get(e)),backgroundColor:e=>U(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${U(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>U(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>U(e,"hover")}}}}import{toState as Nl}from"@domphy/core";import{themeColor as ct,themeDensity as jt,themeSize as Hl,themeSpacing as Pe}from"@domphy/theme";function Rh(n={items:[]}){var t,a,c;let{items:o=[],accentColor:r="primary",color:e="neutral"}=n,i=Nl((c=(a=n.activeKey)!=null?a:(t=o[0])==null?void 0:t.key)!=null?c:0);return{_onSchedule:(s,d)=>{let l=s.nodeId,y={div:o.map((u,p)=>{var v;let h=(v=u.key)!=null?v:p;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,type:"button",role:"tab",id:`tab${l}${h}`,ariaControls:`panel${l}${h}`,ariaSelected:C=>i.get(C)===h,onClick:()=>i.set(h),onKeyDown:C=>{let D=C.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(D))return;C.preventDefault();let P=o.map((j,Ce)=>{var re;return(re=j.key)!=null?re:Ce}),E=P.indexOf(h),O=E;D==="ArrowRight"?O=(E+1)%P.length:D==="ArrowLeft"?O=(E-1+P.length)%P.length:D==="Home"?O=0:D==="End"&&(O=P.length-1),i.set(P[O])},style:{cursor:"pointer",fontSize:C=>Hl(C,"inherit"),height:C=>Pe(6+jt(C)*2),paddingInline:C=>Pe(jt(C)*4),border:"none",outline:"none",color:C=>ct(C,"text"),backgroundColor:C=>ct(C,"inherit"),boxShadow:C=>`inset 0 -${Pe(.5)} 0 0 ${ct(C,"shift-1",e)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{boxShadow:C=>`inset 0 -${Pe(.5)} 0 0 ${ct(C,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:C=>`inset 0 -${Pe(.5)} 0 0 ${ct(C,"shift-6",r)}`},"&:focus-visible":{boxShadow:C=>T(C,r)}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},f=o.map((u,p)=>{var S;let h=(S=u.key)!=null?S:p;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${l}${h}`,ariaLabelledby:`tab${l}${h}`,hidden:v=>i.get(v)!==h,style:{paddingBlock:v=>Pe(jt(v)*2),paddingInline:v=>Pe(jt(v)*2)}}});d[s.tagName]=[y,...f]}}}import{toState as pr}from"@domphy/core";import{themeColor as ne,themeDensity as Ro,themeSize as Fl,themeSpacing as Yt}from"@domphy/theme";function Nh(n={}){var i,t;let o=pr((i=n.color)!=null?i:"neutral","color"),r=pr((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let c=a.domElement;c.style.overflow="hidden";let s=()=>{c.style.height="auto",c.style.height=`${c.scrollHeight}px`};c.addEventListener("input",s),s(),a.addHook("Remove",()=>c.removeEventListener("input",s))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>Yt(Ro(a)*2),paddingBlock:a=>Yt(Ro(a)*1.5),border:"none",borderRadius:a=>Yt(Ro(a)*1.5),fontSize:a=>Fl(a,"inherit"),color:a=>ne(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${ne(a,"border-strong",o.get(a))}`,backgroundColor:a=>ne(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>ne(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${ne(a,"shift-5",r.get(a))}`},"&:focus-visible":{boxShadow:a=>T(a,r.get(a))},"&:invalid":{outline:a=>`${Yt(.5)} solid ${ne(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>ne(a,"muted","neutral"),outline:a=>`1px solid ${ne(a,"border-strong","neutral")}`,backgroundColor:a=>ne(a,"shift-2","neutral")}}}}import{toState as Wl}from"@domphy/core";import{themeColor as hr,themeDensity as _o,themeSpacing as Mo}from"@domphy/theme";function Kh(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function jh(n={}){var t,a,c;let{last:o=!1}=n,r=(t=n.color)!=null?t:"neutral",e=(a=n.accentColor)!=null?a:"primary",i=Wl((c=n.active)!=null?c:!1);return{style:V({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:s=>Mo(_o(s)*2),paddingBottom:s=>o?"0":Mo(_o(s)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:s=>hr(s,"shift-8",i.get(s)?e:r),opacity:s=>i.get(s)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:s=>`-${Mo(_o(s)*4)}`,width:"2px",backgroundColor:s=>hr(s,"shift-3",r)}})}}import{toState as Kl}from"@domphy/core";import{themeColor as gr,themeDensity as Ao,themeSize as jl,themeSpacing as Ye}from"@domphy/theme";function Jh(n={}){let{position:o="top-center",color:r="neutral"}=n,e=Kl(!1),i=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),c={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:Ye(4),zIndex:30,padding:Ye(6),pointerEvents:"none"}};return{_portal:s=>{let d=s.domElement.querySelector(`#domphy-toast-${o}`);return d||(d=s.children.insert(c).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Ye(32),pointerEvents:"auto",paddingBlock:s=>Ye(Ao(s)*2),paddingInline:s=>Ye(Ao(s)*4),borderRadius:s=>Ye(Ao(s)*2),fontSize:s=>jl(s,"inherit"),color:s=>gr(s,"text",r),backgroundColor:s=>gr(s,"inherit",r),boxShadow:I("medium"),opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,d)=>{let l=!1,m=null,y=()=>{l||(l=!0,m&&(clearTimeout(m),m=null),s.domElement.removeEventListener("transitionend",f),d())},f=u=>{u.propertyName==="transform"&&y()};s.domElement.addEventListener("transitionend",f),m=setTimeout(y,350),s.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=s.domElement)==null||u.removeEventListener("transitionend",f)}),e.set(!1)}}}import{toState as Yl}from"@domphy/core";import{themeColor as Oe,themeSize as fr,themeSpacing as Se}from"@domphy/theme";function og(n={items:[]}){var a;let{items:o=[],multiple:r=!1,color:e="neutral",accentColor:i="primary"}=n,t=Yl((a=n.value)!=null?a:r?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:r}},_onSchedule:(c,s)=>{let d=o.map((l,m)=>{var u;let y=(u=l.key)!=null?u:String(m);return{button:[typeof l.label=="string"?{span:l.label}:l.label],_key:y,type:"button",role:"button",ariaPressed:p=>{let h=t.get(p);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let p=t.get();if(r){let h=Array.isArray(p)?[...p]:[];t.set(h.includes(y)?h.filter(S=>S!==y):[...h,y])}else t.set(p===y?"":y)},style:{cursor:"pointer",fontSize:p=>fr(p,"inherit"),height:Se(6),paddingBlock:Se(1),paddingInline:Se(2),border:"none",borderRadius:Se(1.5),color:p=>Oe(p,"text",e),backgroundColor:p=>Oe(p,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:p=>Oe(p,"hover",e)},"&[aria-pressed=true]":{backgroundColor:p=>Oe(p,"shift-3",i),color:p=>Oe(p,"shift-12",i)},"&:focus-visible":{boxShadow:p=>T(p,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});s[c.tagName]=d},style:{display:"flex",paddingBlock:Se(1),paddingInline:Se(1),gap:Se(1),borderRadius:Se(2),fontSize:c=>fr(c,"inherit"),backgroundColor:c=>Oe(c,"inherit",e),outline:c=>`1px solid ${Oe(c,"border",e)}`,outlineOffset:"-1px"}}}function ag(n={}){return tr({gap:n.gap})}function ig(){return{div:null,style:{flex:"1 1 0"}}}import{merge as ql,toState as yr}from"@domphy/core";import{themeColor as br,themeDensity as Bo,themeSize as Gl,themeSpacing as No}from"@domphy/theme";function pg(n={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=n,i=yr(r),t=yr(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,c={span:f=>t.get(f),id:a},{show:s,hide:d,anchorPartial:l}=G({kind:"tooltip",open:o,placement:i,content:c}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:f=>No(Bo(f)*1),paddingInline:f=>No(Bo(f)*3),borderRadius:f=>No(Bo(f)*1.5),color:f=>br(f,"text"),backgroundColor:f=>br(f),fontSize:f=>Gl(f,"inherit"),boxShadow:I("low")},$:[Gn({placement:i,bordered:!1})]};return c.$||(c.$=[]),c.$.push(m),ql(l,{ariaDescribedby:a,onMouseEnter:(f,u)=>s(u),onMouseLeave:(f,u)=>d(u),onFocus:(f,u)=>s(u),onBlur:(f,u)=>d(u),onKeyDown:(f,u)=>f.key==="Escape"&&d(u)}),l}import{ElementNode as Sr}from"@domphy/core";function Cr(n,o){return n.key!==void 0&&n.key!==null?String(n.key):`index-${o}`}function fg(n={}){let{duration:o=300,delay:r=0}=n,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:c=>{c.addHook("Remove",()=>{for(let s of Array.from(i.values()))s();i.clear();for(let s of t)clearTimeout(s);t.clear();for(let s of a)cancelAnimationFrame(s);a.clear()})},_onBeforeUpdate:c=>{e=new Map,c.children.items.forEach((s,d)=>{if(!(s instanceof Sr))return;let l=s.domElement;l&&e.set(Cr(s,d),l.getBoundingClientRect())})},_onUpdate:c=>{c.children.items.forEach((s,d)=>{var P;if(!(s instanceof Sr))return;let l=s.domElement;if(!l)return;let m=Cr(s,d),y=e.get(m);if(!y)return;let f=l.getBoundingClientRect(),u=y.left-f.left,p=y.top-f.top;if(Math.abs(u)<.5&&Math.abs(p)<.5)return;(P=i.get(l))==null||P(),l.style.transition="none",l.style.transform=`translate(${u}px, ${p}px)`,l.getBoundingClientRect();let h=requestAnimationFrame(()=>{a.delete(h),l.style.transition=`transform ${o}ms ease ${r}ms`,l.style.transform="translate(0px, 0px)"});a.add(h);let S=!1,v=null,C=()=>{S||(S=!0,v&&(t.delete(v),v=null),i.delete(l),l.removeEventListener("transitionend",D),l.style.transition="",l.style.transform="")},D=E=>{E.propertyName==="transform"&&C()};i.set(l,()=>{S=!0,v&&(clearTimeout(v),t.delete(v),v=null),i.delete(l),l.removeEventListener("transitionend",D)}),l.addEventListener("transitionend",D),v=setTimeout(C,o+r+34),t.add(v)}),e.clear()}}}import{toState as Ul}from"@domphy/core";import{themeColor as vr,themeSize as Xl,themeSpacing as Jl}from"@domphy/theme";function Cg(n={}){var r;let o=Ul((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>Xl(e,"inherit"),backgroundColor:e=>vr(e),color:e=>vr(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Jl(3),listStyleType:"disc",listStylePosition:"outside"}}}export{ts as abbreviation,as as accordion,cs as alert,ps as avatar,ys as badge,vs as blockquote,ws as breadcrumb,Os as breadcrumbEllipsis,Ks as button,cn as buttonGhost,Gs as buttonSwitch,Zs as card,oc as code,yc as combobox,vc as command,Ec as commandItem,xc as commandSearch,Oc as datePicker,$c as descriptionList,Ac as details,jc as dialog,Uc as divider,tm as drawer,am as emphasis,cm as empty,um as errorBoundary,ym as fab,vm as figure,wm as formGroup,Om as heading,Vm as horizontalRule,Mm as icon,Hm as image,jm as inputCheckbox,Gm as inputColor,Qm as inputDateTime,ru as inputFile,cu as inputNumber,yu as inputOTP,hu as inputPassword,vu as inputRadio,wu as inputRange,Lu as inputSearch,$u as inputSwitch,Bu as inputText,Wu as keyboard,qu as label,Ju as link,od as linkButton,id as list,ld as listItem,sd as listItemButton,dd as mark,yd as menu,Cd as motion,kd as orderedList,Od as pagination,$d as panelSection,Bd as paragraph,jd as popover,Gn as popoverArrow,Zd as preformated,op as progress,lp as rating,dp as ringProgress,tr as row,Sp as scrollArea,kp as segmented,Pp as select,Rp as selectBox,Ap as selectItem,Fp as selectList,Yp as skeleton,Xp as small,eh as spinner,rh as splitter,ih as splitterHandle,ah as splitterPanel,ch as stack,hh as steps,bh as strong,xh as subscript,Th as superscript,Lh as table,Rh as tabs,vt as tag,Nh as textarea,Kh as timeline,jh as timelineItem,Jh as toast,og as toggleGroup,ag as toolbar,ig as toolbarSpacer,pg as tooltip,fg as transitionGroup,Cg as unorderedList};
2
2
  //# sourceMappingURL=index.js.map