@domphy/ui 0.21.5 → 0.21.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var wa=Object.defineProperty,Ta=Object.defineProperties;var Da=Object.getOwnPropertyDescriptors;var kn=Object.getOwnPropertySymbols;var Pa=Object.prototype.hasOwnProperty,Ia=Object.prototype.propertyIsEnumerable;var wn=(r,o,n)=>o in r?wa(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,E=(r,o)=>{for(var n in o||(o={}))Pa.call(o,n)&&wn(r,n,o[n]);if(kn)for(var n of kn(o))Ia.call(o,n)&&wn(r,n,o[n]);return r},O=(r,o)=>Ta(r,Da(o));import{toState as Tn}from"@domphy/core";import{themeColor as St,themeSize as Oa,themeSpacing as La}from"@domphy/theme";function Ic(r={}){var e,s;let o=Tn((e=r.color)!=null?e:"neutral","color"),n=Tn((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Oa(t),backgroundColor:t=>St(t),color:t=>St(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>St(t,"shift-7",o.get(t)),textUnderlineOffset:La(.72),cursor:"help","&:hover":{color:t=>St(t,"shift-11",n.get(t)),textDecorationColor:t=>St(t,"shift-9",n.get(t))}}}}import{toState as Pn}from"@domphy/core";import{themeColor as So,themeDensity as za,themeSpacing as Ra}from"@domphy/theme";import{themeColor as Dn}from"@domphy/theme";function S(r,o="primary"){let n=Dn(r,"surface"),e=Dn(r,"shift-9",o);return`0 0 0 2px ${n}, 0 0 0 4px ${e}`}function _c(r={}){var s,t;let{type:o="single"}=r,n=Pn((s=r.color)!=null?s:"neutral","color"),e=Pn((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>Ra(za(a)*1.5),outline:a=>`1px solid ${So(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>So(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${So(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}import{toState as Va}from"@domphy/core";import{themeColor as vo,themeDensity as Co,themeSize as Ma,themeSpacing as vt}from"@domphy/theme";function Bc(r={}){var n;let o=Va((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:vt(3),paddingBlock:e=>vt(Co(e)*2),paddingInline:e=>vt(Co(e)*4),borderRadius:e=>vt(Co(e)*1.5),boxShadow:e=>`inset ${vt(1)} 0 0 0 ${vo(e,"shift-8",o.get(e))}`,backgroundColor:e=>vo(e,"inherit",o.get(e)),color:e=>vo(e,"shift-10",o.get(e)),fontSize:e=>Ma(e,"inherit")}}}import{toState as _a}from"@domphy/core";import{themeColor as xo,themeSize as Na,themeSpacing as In}from"@domphy/theme";function jc(r={}){var n;let o=_a((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:In(9),height:In(9),fontSize:e=>Na(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>xo(e,"inherit",o.get(e)),color:e=>xo(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${xo(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as On}from"@domphy/core";import{themeColor as Eo,themeDensity as ko,themeSize as $a,themeSpacing as _t}from"@domphy/theme";function Gc(r={}){var s;let{label:o=999}=r,n=On(o),e=On((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>_t(ko(t)*(1.5/1.5)),minWidth:_t(5),height:t=>_t(ko(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>$a(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>_t(ko(t)*999),backgroundColor:t=>Eo(t,"shift-9",e.get(t)),color:t=>Eo(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${Eo(t,"shift-0",e.get(t))}`}}}}import{toState as Aa}from"@domphy/core";import{themeColor as wo,themeDensity as Ln,themeSize as Ba,themeSpacing as To}from"@domphy/theme";function Zc(r={}){var n;let o=Aa((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Ba(e,"inherit"),backgroundColor:e=>wo(e,"inherit",o.get(e)),color:e=>wo(e,"text",o.get(e)),boxShadow:e=>`inset ${To(1)} 0 0 0 ${wo(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>To(Ln(e)*2),paddingInline:e=>To(Ln(e)*4),margin:0}}}import{toState as Ha}from"@domphy/core";import{themeColor as Ct,themeSize as Fa,themeSpacing as zn}from"@domphy/theme";function om(r={}){var e;let{separator:o="/"}=r,n=Ha((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>Fa(s,"inherit"),gap:zn(1),color:s=>Ct(s,"text",n.get(s)),backgroundColor:s=>Ct(s,"inherit",n.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>Ct(s,"text",n.get(s))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:s=>Ct(s,"shift-4",n.get(s)),paddingInlineStart:zn(1)},"& > [aria-current=page]":{color:s=>Ct(s,"shift-10",n.get(s)),pointerEvents:"none"}}}}import{toState as Ka}from"@domphy/core";import{themeColor as Do,themeSize as ja,themeSpacing as Rn}from"@domphy/theme";function lm(r={}){var n;let o=Ka((n=r.color)!=null?n:"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=>ja(e,"inherit"),paddingInline:Rn(1),border:"none",background:"none",cursor:"pointer",color:e=>Do(e,"text",o.get(e)),borderRadius:Rn(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>Do(e,"shift-10",o.get(e)),backgroundColor:e=>Do(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>S(e,o.get(e))}}}}import{toState as Ga}from"@domphy/core";import{themeColor as Y,themeDensity as At,themeSize as Ua,themeSpacing as Bt}from"@domphy/theme";var nt={small:"decrease-1",medium:"inherit",large:"increase-1"};import{toState as Wa}from"@domphy/core";import{themeColor as rt,themeDensity as Nt,themeSize as qa,themeSpacing as $t}from"@domphy/theme";var Ya={small:.5,medium:1,large:1.5};function Vn(r={}){var s,t,a;let o=Wa((s=r.color)!=null?s:"neutral","color"),n=Ya[(t=r.size)!=null?t:"medium"],e=nt[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>qa(i,e),paddingBlock:i=>$t(Nt(i)*n),paddingInline:i=>$t(Nt(i)*n),borderRadius:i=>$t(Nt(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>$t(Nt(i)*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:i=>rt(i,"text",o.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>rt(i,"text",o.get(i)),backgroundColor:i=>rt(i,"hover",o.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>rt(i,"text",o.get(i)),backgroundColor:i=>rt(i,"increase-2",o.get(i))},"&:focus-visible":{boxShadow:i=>S(i,o.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>rt(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Ja={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function vm(r={}){var a,i,m,u;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return Vn({color:r.color,size:r.size});let n=Ga((i=r.color)!=null?i:"primary","color"),e=o==="solid",s=Ja[(m=r.size)!=null?m:"medium"],t=nt[(u=r.size)!=null?u:"medium"];return O(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>Ua(l,t),paddingBlock:l=>Bt(At(l)*s.block),paddingInline:l=>Bt(At(l)*s.inline),borderRadius:l=>Bt(At(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>Bt(At(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${Y(l,"border-strong",n.get(l))}`,color:l=>e?Y(l,"shift-0","neutral"):Y(l,"shift-13",n.get(l)),backgroundColor:l=>e?Y(l,"shift-13",n.get(l)):Y(l,"inherit",n.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?Y(l,"shift-0","neutral"):Y(l,"shift-14",n.get(l)),backgroundColor:l=>e?Y(l,"shift-14",n.get(l)):Y(l,"hover",n.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?Y(l,"shift-15",n.get(l)):Y(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>Y(l,"shift-2","neutral"),outline:l=>`1px solid ${Y(l,"border-strong","neutral")}`,color:l=>Y(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}import{toState as Po}from"@domphy/core";import{themeColor as Ke,themeSize as Xa,themeSpacing as ee}from"@domphy/theme";function Tm(r={}){var t,a;let{checked:o=!1}=r,n=Po(o),e=Po((t=r.color)!=null?t:"neutral","color"),s=Po((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>n.get(i),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>Xa(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${Ke(i,"border",e.get(i))}`,minWidth:ee(12),minHeight:ee(6),borderRadius:ee(999),paddingLeft:ee(7),paddingRight:ee(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>Ke(i,"inherit",e.get(i)),color:i=>Ke(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:ee(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:ee(5),height:ee(5),borderRadius:ee(999),color:i=>Ke(i,"text"),backgroundColor:i=>Ke(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>Ke(i,"increase-3",s.get(i)),outline:"none",color:i=>Ke(i,"decrease-2"),paddingLeft:ee(2),paddingRight:ee(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${ee(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Qa}from"@domphy/core";import{themeColor as je,themeDensity as be,themeSpacing as ce}from"@domphy/theme";var Za={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 R(r){return Za[r]}function zm(r={}){var n;let o=Qa((n=r.color)!=null?n:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>ce(be(e)*2),backgroundColor:e=>je(e,"inherit",o.get(e)),color:e=>je(e,"shift-10",o.get(e)),outline:e=>`1px solid ${je(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:R("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>ce(be(e)*2),paddingInline:e=>ce(be(e)*4),fontWeight:"600",color:e=>je(e,"shift-11",o.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>ce(be(e)*4),paddingBottom:e=>ce(be(e)*2),color:e=>je(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>ce(be(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>ce(be(e)*4),color:e=>je(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:ce(2),paddingBlock:e=>ce(be(e)*2),paddingInline:e=>ce(be(e)*4),borderTop:e=>`1px solid ${je(e,"border",o.get(e))}`}}}}import{toState as ei}from"@domphy/core";import{themeColor as Mn,themeDensity as Io,themeSize as ti,themeSpacing as Oo}from"@domphy/theme";function _m(r={}){var n;let o=ei((n=r.color)!=null?n:"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=>ti(e,"inherit"),color:e=>Mn(e,"text",o.get(e)),backgroundColor:e=>Mn(e,"inherit",o.get(e)),height:e=>Oo(Io(e)*(6/1.5)),paddingInline:e=>Oo(Io(e)*(1.5/1.5)),borderRadius:e=>Oo(Io(e)*(1/1.5))}}}import{behavior as Ci,merge as zo,toState as Kt}from"@domphy/core";import{themeColor as De,themeDensity as jt,themeSize as An,themeSpacing as Pe}from"@domphy/theme";import{behavior as ri,merge as ai}from"@domphy/core";import{autoUpdate as ii,computePosition as li,flip as si,offset as ci,shift as mi}from"@domphy/floating";import{effect as _n,toState as oi}from"@domphy/core";function ni(r){return typeof r.set=="function"}function Se(r,o,n=!0){if(typeof r.addListener=="function")return n&&o(r.get()),r.addListener(o);if(n)return _n(()=>{o(r.get())});let e=!0,s=_n(()=>{let t=r.get();e||o(t)});return e=!1,s}function Lo(r,o){ni(r)&&r.set(o)}function we(r,o){o==null||o(),Lo(r,!1)}function at(r){return oi(r!=null?r:!1)}function J(r,o){return`domphy-${r}-${o.nodeId}`}function ui(r,o){var ge,le,Fe,ye;let{openState:n,onDismiss:e,placement:s,content:t,keepOpenOnContentHover:a}=o,{kind:i}=o,m=`floating:${i}`,u=null,l=null,c=null,d=null,f=!1,h=r.domElement,C=r.getRoot(),v=J(i,r),p={style:{position:"fixed",pointerEvents:"auto",visibility:L=>n.get(L)?"visible":"hidden"},onKeyDown:L=>{L.key==="Escape"&&V()},onMouseEnter:()=>a&&w(),onMouseLeave:()=>a&&V(),_onMount:L=>{var A;if(c=L.domElement,c.id||(c.id=v),h&&c&&!c.hasAttribute("data-theme")){let se=(A=h.closest("[data-theme]"))==null?void 0:A.getAttribute("data-theme");se&&c.setAttribute("data-theme",se)}},_portal:L=>{let A=h.closest("dialog");if(A){let Z=A.querySelector(":scope > #domphy-floating");return Z||(Z=A.ownerDocument.createElement("div"),Z.id="domphy-floating",Object.assign(Z.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),A.appendChild(Z)),Z}let se=L.domElement.querySelector("#domphy-floating");if(!se){let Z={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};se=L.children.insert(Z).domElement}return se}},b=L=>ai(L,p);b(t);let k=()=>{f||(f=!0,d=C.children.insert(t),d._behaviorInstances.set(m,U))},g=()=>{f&&(!c||!c.isConnected)&&(l==null||l(),l=null,d=null,c=null,f=!1),k(),h&&c&&(l==null||l(),l=ii(h,c,()=>{li(h,c,{placement:s.get(),middleware:[ci(12),si(),mi()],strategy:"fixed"}).then(({x:L,y:A,placement:se})=>{c&&(Object.assign(c.style,{left:`${L}px`,top:`${A}px`}),s.set(se))})}),Lo(n,!0))},D=()=>{l==null||l(),l=null,d&&(d.remove(),d=null),c=null,f=!1,we(n,e)},w=()=>{u&&clearTimeout(u),u=setTimeout(g,100)},V=()=>{u&&clearTimeout(u),u=setTimeout(D,100)},j=L=>{if(!n.get()||!h||!c)return;let A=L.target;!h.contains(A)&&!c.contains(A)&&V()};(ge=C.domElement)==null||ge.addEventListener("click",j);let G=L=>{L.key==="Escape"&&n.get()&&V()},M=(ye=(Fe=(le=C.domElement)==null?void 0:le.ownerDocument)!=null?Fe:C.domElement)!=null?ye:null;M==null||M.addEventListener("keydown",G);let ne=L=>{L?f||g():f&&D()},N=()=>{},W=!1,ie=!1,U,He=L=>{var A;L._behaviors=O(E({},(A=L._behaviors)!=null?A:{}),{[m]:{attach:()=>U,props:{}}})};return U={show:w,hide:V,panelId:v,update(L){if(!ie&&(e=L.onDismiss,L.openState!==n&&(N(),n=L.openState,N=Se(n,ne,!1),n.get()&&g()),s=L.placement,t=L.content,a=L.keepOpenOnContentHover,b(t),He(t),d)){ie=!0;try{d.patch(t)}finally{ie=!1}}},destroy(){var L;W||(W=!0,u&&clearTimeout(u),u=null,l==null||l(),l=null,d==null||d.remove(),d=null,c=null,f=!1,N(),N=()=>{},(L=C.domElement)==null||L.removeEventListener("click",j),M==null||M.removeEventListener("keydown",G))}},He(t),N=Se(n,ne),U}function me(r){let{kind:o,placement:n,onDismiss:e}=r,s=at(r.open),t=`floating:${o}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},ri(t,ui,{kind:o,openState:s,onDismiss:e,placement:n,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}import{behavior as di,ElementNode as pi,rawHtml as hi,toState as fi}from"@domphy/core";import{themeColor as Ht,themeDensity as We,themeSize as gi,themeSpacing as Te}from"@domphy/theme";var yi='<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>',xt=1.5,bi=6/xt,Nn=2.5/xt,Si=1/xt,$n=4/xt,vi=1/xt;function Ft(r={}){var e;let{removable:o=!1}=r,n=fi((e=r.color)!=null?e:"neutral","color");return O(E({dataTone:"shift-2"},di("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:hi(yi),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>Te(We(l)*vi),width:l=>Te(We(l)*$n),height:l=>Te(We(l)*$n),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>Ht(l,"shift-4",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof pi&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:o})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>Te(We(s)*bi),paddingBlock:0,borderRadius:s=>Te(We(s)*999),paddingInlineStart:s=>Te(We(s)*Nn),paddingInlineEnd:s=>Te(We(s)*(o?Si:Nn)),gap:Te(1.5),fontSize:s=>gi(s,"decrease-1"),backgroundColor:s=>Ht(s,"inherit",n.get(s)),color:s=>Ht(s,"text",n.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${Ht(s,"border-strong",n.get(s))}`}})}function ou(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=Kt(r.value),i=Kt(s),{show:m,hide:u,anchorPartial:l}=me({kind:"combobox",open:i,onDismiss:r.onDismiss,placement:Kt(n),content:r.content}),c={onClick:(g,D)=>!t&&u(D),dataTone:"shift-14",style:{backgroundColor:g=>De(g,"inherit"),color:g=>De(g,"text"),borderRadius:g=>Pe(jt(g)*2),outline:g=>`1px solid ${De(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:R("medium")}};zo(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:Pe(6),marginInlineStart:Pe(2),fontSize:g=>An(g,"inherit"),color:g=>De(g,"text",e),backgroundColor:g=>De(g,"inherit",e)},f=g=>{var D,w;return(w=(D=g==null?void 0:g.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:w.query},h=g=>{let D=g;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return g},C={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:g=>i.get(g),ariaControls:g=>g!=null&&g.elementNode?J("combobox",h(g.elementNode)):void 0},v=g=>g?(zo(g,E({onFocus:(D,w)=>m(w),style:d,_key:"combobox-input"},C)),g):E({input:null,ariaLabel:"Filter options",onFocus:(D,w)=>m(w),value:D=>{var w,V;return(V=(w=f(D))==null?void 0:w.get(D))!=null?V:""},onInput:(D,w)=>{var V;(V=w.getBehavior("comboboxInner"))==null||V.query.set(D.target.value)},style:d,_key:"combobox-input"},C),p=g=>({div:D=>{i.get(D);let w=g.state.get(D),V=Array.isArray(w)?w:[w],G=g.options.filter(M=>V.includes(M.value)).map(M=>({span:M.label,$:[Ft({color:g.color,removable:!0})],_key:M.value,_onRemove:ne=>{let N=g.state.get(),ie=(Array.isArray(N)?N:[N]).filter(U=>U!==M.value);g.multiple?g.state.set(ie):g.state.set(ie[0])}}));return G.push(v(g.input)),G},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:Pe(1)}}),k=O(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,D)=>{D[g.tagName]=[p({options:o,multiple:t,color:e,state:a,input:r.input})]}},Ci("comboboxInner",(g,D)=>{let w=g.getMetadata("comboboxQuery");return w||(w=Kt(""),g.setMetadata("comboboxQuery",w)),{query:w,update(V){g.children.update([p(V)])}}},{options:o,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:Pe(32),outlineOffset:"-1px",outline:g=>`1px solid ${De(g,"border-strong","neutral")}`,paddingBlock:g=>Pe(jt(g)*1),paddingInline:g=>Pe(jt(g)*1),borderRadius:g=>Pe(jt(g)*1.5),fontSize:g=>An(g,"inherit"),color:g=>De(g,"text",e),backgroundColor:g=>De(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>S(g,e)}}});return zo(l,k),l}import{merge as xi,toState as Ei}from"@domphy/core";import{themeColor as ve,themeDensity as Wt,themeSize as Bn,themeSpacing as qt}from"@domphy/theme";function su(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,o)=>{xi(o,{_context:{command:{query:Ei("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function cu(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>Bn(e,"inherit"),paddingInline:e=>qt(Wt(e)*3),paddingBlock:e=>qt(Wt(e)*2),border:"none",borderBottom:e=>`1px solid ${ve(e,"border",o)}`,outline:"none",color:e=>ve(e,"shift-10",o),backgroundColor:e=>ve(e,"inherit",o),"&::placeholder":{color:e=>ve(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>ve(e,"shift-6",n),boxShadow:e=>S(e,n)}}}}function mu(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>Bn(e,"inherit"),height:e=>qt(6+Wt(e)*2),paddingInline:e=>qt(Wt(e)*3),border:"none",outline:"none",color:e=>ve(e,"shift-13",o),backgroundColor:e=>ve(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>ve(e,"shift-13",o),backgroundColor:e=>ve(e,"hover",o)},"&:focus-visible":{boxShadow:e=>S(e,n)}}}}import{behavior as ki,merge as wi,toState as ue}from"@domphy/core";import{themeColor as F,themeDensity as Ti,themeSize as it,themeSpacing as B}from"@domphy/theme";var H=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),qe=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Ro=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Et=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Vo=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Mo=(r,o)=>qe(r,-((r.getDay()-o+7)%7));function Di(r){var o,n;try{let e=new Intl.Locale(r),s=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function Pi(r,o){let n=o,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(n),{update(a){a.selectionIsCallerOwned||t(a.selection,n.selection),t(a.viewYear,n.viewYear),t(a.viewMonth,n.viewMonth),t(a.focused,n.focused),t(a.hovered,n.hovered),t(a.hour,n.hour),t(a.minute,n.minute),t(a.open,n.open),(a.selection!==n.selection||a.onChange!==n.onChange)&&s(a),n=a},destroy(){e==null||e(),e=null}}}function yu(r={}){var vn,Cn,xn,En;let{mode:o="single",time:n=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(vn=r.weekStartsOn)!=null?vn:Di(a),l=ue((Cn=r.accentColor)!=null?Cn:"primary","accentColor"),c=ue((xn=r.placement)!=null?xn:"bottom-start"),d=ue((En=r.value)!=null?En:o==="range"?[null,null]:null),f=(()=>{let y=d.get(),x=o==="range"?y==null?void 0:y[0]:y;return x instanceof Date?x:new Date})(),h=ue(f.getFullYear(),"viewYear"),C=ue(f.getMonth(),"viewMonth"),v=ue(H(f),"focused"),p=ue(null,"hovered"),b=ue(f.getHours(),"hour"),k=ue(f.getMinutes(),"minute"),g=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),w=new Intl.DateTimeFormat(a,{weekday:"short"}),V=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=y=>y?g.format(y):"",G=y=>{if(i)return i(y);if(o==="range"){let[x,T]=y!=null?y:[null,null];return x?`${j(x)} \u2013 ${j(T)}`:""}return j(y)},M=Array.from({length:7},(y,x)=>w.format(new Date(2023,0,1+(x+u)%7))),ne=y=>!!e&&H(y)<H(e)||!!s&&H(y)>H(s)||!!t&&t(y),N=y=>{if(!n)return H(y);let x=H(y);return x.setHours(b.get(),k.get(),0,0),x},W=(y,x)=>{var P;if(ne(y))return;if(o==="single"){d.set(N(y)),n||Z(x);return}let[T,I]=(P=d.get())!=null?P:[null,null];!T||T&&I?d.set([N(y),null]):H(y)<H(T)?(d.set([N(y),N(T)]),n||Z(x)):(d.set([T,N(y)]),n||Z(x))},ie=()=>{var y;if(n)if(o==="single"){let x=d.get();x&&d.set(N(x))}else{let[x,T]=(y=d.get())!=null?y:[null,null];d.set([x&&N(x),T&&N(T)])}},U=(y,x)=>{var ot;if(o!=="range")return!1;let[T,I]=(ot=d.get(x))!=null?ot:[null,null],P=I!=null?I:p.get(x);if(!T||!P)return!1;let z=H(T)<=H(P)?T:P,Q=H(T)<=H(P)?P:T,q=H(y);return q>=H(z)&&q<=H(Q)},He=(y,x)=>{let T=d.get(x);if(o==="range"){let[I,P]=T!=null?T:[null,null];return Et(y,I)||Et(y,P)}return Et(y,T)},ge=y=>{h.set(y.getFullYear()),C.set(y.getMonth())},le=y=>{let x=Ro(new Date(h.get(),C.get(),1),y);ge(x)},Fe=y=>h.set(h.get()+y),ye=y=>{var T;let x=(T=y==null?void 0:y.getRoot())==null?void 0:T.domElement;setTimeout(()=>{var I;(I=x==null?void 0:x.querySelector(`[data-date="${Vo(v.get())}"]`))==null||I.focus()},0)},L=ba(),A=ue(!1),{show:se,hide:Z,anchorPartial:yo}=me({kind:"datePicker",open:A,placement:c,content:L}),ga=E({type:"text",readonly:!0,value:y=>G(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>A.get(y),ariaControls:y=>y!=null&&y.elementNode?J("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,x)=>{bo(x)},onFocus:(y,x)=>{bo(x)},onKeyDown:(y,x)=>{let T=y.key;(T==="ArrowDown"||T==="Enter")&&(y.preventDefault(),bo(x))}},ki("datePicker",Pi,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:h,viewMonth:C,focused:v,hovered:p,hour:b,minute:k,open:A,onChange:m}));function bo(y){var T;let x=(T=ya())!=null?T:new Date;v.set(H(x)),ge(x),se(y),ye(y)}function ya(){var x;let y=d.get();return o==="range"?(x=y==null?void 0:y[0])!=null?x:null:y!=null?y:null}return wi(yo,ga),yo;function ba(){let y=(z,Q,q)=>({button:z,type:"button",ariaLabel:Q,onClick:q,style:Ii()}),x={div:[y("\xAB","Previous year",()=>Fe(-1)),y("\u2039","Previous month",()=>le(-1)),{div:z=>D.format(new Date(h.get(z),C.get(z),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:z=>it(z)}},y("\u203A","Next month",()=>le(1)),y("\xBB","Next year",()=>Fe(1))],style:{display:"flex",alignItems:"center",gap:B(1),marginBottom:B(2)}},T={div:M.map((z,Q)=>({div:z,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:q=>it(q,"decrease-1"),fontWeight:"bold",color:q=>F(q,"shift-7"),paddingBlock:B(1)},_key:Q})),role:"row",style:Hn()},I={div:z=>Sa(z),role:"grid",ariaLabel:"Calendar",onKeyDown:Ea,onMouseLeave:()=>o==="range"&&p.set(null),style:{display:"flex",flexDirection:"column",gap:B(.5)}},P=[x,T,I];return n&&P.push(Ca()),P.push(xa()),{div:P,role:"dialog",ariaModal:"false",dataTone:"shift-14",style:{minWidth:B(70),padding:B(3),borderRadius:z=>B(Ti(z)*2),backgroundColor:z=>F(z,"inherit"),color:z=>F(z,"text"),outline:z=>`1px solid ${F(z,"border-strong")}`,outlineOffset:"-1px",boxShadow:R("medium")}}}function Sa(y){let x=new Date(h.get(y),C.get(y),1),T=C.get(y),I=Mo(x,u),P=[];for(let z=0;z<6;z++){let Q=[];for(let q=0;q<7;q++){let ot=qe(I,z*7+q);Q.push(va(ot,T,y))}P.push({div:Q,role:"row",style:Hn(),_key:z})}return P}function va(y,x,T){let I=ne(y),P=He(y,T),z=U(y,T),Q=y.getMonth()!==x,q=Et(y,v.get(T)),ot=Et(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:q?0:-1,ariaSelected:P,ariaDisabled:I,disabled:I,ariaLabel:V.format(y),dataDate:Vo(y),onClick:(_,ka)=>W(y,ka),onMouseEnter:()=>o==="range"&&p.set(y),style:{appearance:"none",border:"none",cursor:I?"not-allowed":"pointer",aspectRatio:"1",borderRadius:B(1),fontSize:_=>it(_),fontFamily:"inherit",opacity:I?.35:Q?.5:1,backgroundColor:_=>P?F(_,"shift-7",l.get(_)):z?F(_,"hover",l.get(_)):"transparent",color:_=>P?F(_,"shift-0",l.get(_)):F(_,"text"),outline:ot?_=>`1px solid ${F(_,"shift-6",l.get(_))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:_=>P?F(_,"shift-7",l.get(_)):F(_,"shift-3",l.get(_))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:_=>S(_,l.get(_))}},_key:Vo(y)}}function Ca(){let y=(x,T,I)=>({select:Array.from({length:x},(P,z)=>({option:String(z).padStart(2,"0"),value:String(z),selected:Q=>T.get(Q)===z,_key:z})),ariaLabel:I,onChange:P=>{T.set(Number(P.target.value)),ie()},style:Oi()});return{div:[y(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},y(60,k,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:B(1),marginTop:B(3)}}}function xa(){let y=(x,T)=>({button:x,type:"button",onClick:(I,P)=>T(P),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:I=>it(I,"decrease-1"),color:I=>F(I,"muted",l.get(I)),padding:B(1)}});return{div:[y("Today",x=>{let T=new Date;v.set(H(T)),ge(T),ye(x)}),y("Clear",()=>{d.set(o==="range"?[null,null]:null),p.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:B(2),paddingTop:B(2),borderTop:x=>`1px solid ${F(x,"border")}`}}}function Ea(y,x){let T=y,I=v.get(),P=null;switch(T.key){case"ArrowLeft":P=qe(I,-1);break;case"ArrowRight":P=qe(I,1);break;case"ArrowUp":P=qe(I,-7);break;case"ArrowDown":P=qe(I,7);break;case"Home":P=Mo(I,u);break;case"End":P=qe(Mo(I,u),6);break;case"PageUp":P=Ro(I,T.shiftKey?-12:-1);break;case"PageDown":P=Ro(I,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),W(I,x);return;default:return}T.preventDefault(),v.set(P),ge(P),ye(x)}}function Hn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:B(.5)}}function Ii(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>it(r),color:r=>F(r,"muted"),width:B(7),height:B(7),borderRadius:B(1),"&:hover":{backgroundColor:r=>F(r,"shift-3")}}}function Oi(){return{fontFamily:"inherit",fontSize:r=>it(r),padding:B(1),borderRadius:B(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${F(r,"border-strong")}`,backgroundColor:r=>F(r,"inherit"),color:r=>F(r,"text")}}import{toState as Li}from"@domphy/core";import{themeColor as Fn,themeSize as Kn,themeSpacing as jn}from"@domphy/theme";function xu(r={}){var n;let o=Li((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${jn(24)}, max-content) 1fr`,columnGap:jn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>Kn(e,"inherit"),color:e=>Fn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>Kn(e,"inherit"),color:e=>Fn(e,"text",o.get(e))}}}}import{toState as Wn}from"@domphy/core";import{themeColor as Ye,themeDensity as kt,themeSize as qn,themeSpacing as te}from"@domphy/theme";function Du(r={}){var s,t;let{duration:o=240}=r,n=Wn((s=r.color)!=null?s:"neutral","color"),e=Wn((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>qn(a,"inherit"),color:a=>Ye(a,"text",n.get(a)),backgroundColor:a=>Ye(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>Ye(a,"shift-2",n.get(a)),color:a=>Ye(a,"shift-10",n.get(a)),fontSize:a=>qn(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:te(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>te(kt(a)*4),height:te(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:te(2),height:te(2),flexShrink:0,marginTop:te(-.5),borderInlineEnd:a=>`${te(.5)} solid ${Ye(a,"shift-9",n.get(a))}`,borderBottom:a=>`${te(.5)} solid ${Ye(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>Ye(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>te(kt(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>te(kt(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>te(kt(a)*1),paddingBottom:a=>te(kt(a)*3)}}}}import{behavior as zi}from"@domphy/core";import{themeColor as _o,themeDensity as Yn,themeSize as Ri,themeSpacing as Gn}from"@domphy/theme";var wt=0;function Yt(){wt++,wt===1&&(document.body.style.overflow="hidden")}function lt(){wt=Math.max(0,wt-1),wt===0&&(document.body.style.overflow="")}var Un='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function Vi(r,o){let{state:n,onDismiss:e}=o,s=null,t=!1,a=!1,i=null,m=r.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(lt(),a=!1),s==null||s.focus(),s=null},l=h=>{if(h.key!=="Tab")return;let C=Array.from(m.querySelectorAll(Un)).filter(b=>!b.closest("[aria-hidden='true']")&&b.offsetParent!==null);if(!C.length){h.preventDefault();return}let v=C[0],p=C[C.length-1];h.shiftKey?(document.activeElement===v||document.activeElement===m)&&(h.preventDefault(),p.focus()):document.activeElement===p&&(h.preventDefault(),v.focus())},c=h=>{h.preventDefault(),we(n,e)};m.addEventListener("cancel",c);let d=h=>{if(h)t=!1,i&&(clearTimeout(i),i=null),s=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(Yt(),a=!0),m.addEventListener("keydown",l),requestAnimationFrame(()=>{m.style.opacity="1";let C=m.querySelector(Un);C==null||C.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",l),!m.open){u();return}i=setTimeout(()=>{i=null,t&&u()},350)}},f=Se(n,d);return{requestClose:()=>we(n,e),onTransitionEnd:h=>{t&&h.target===m&&h.propertyName==="opacity"&&u()},update(h){e=h.onDismiss,h.state!==n&&(f(),n=h.state,f=Se(n,d,!1))},destroy(){i&&(clearTimeout(i),i=null),f(),m.removeEventListener("cancel",c),a&&(lt(),a=!1),m.removeEventListener("keydown",l),s==null||s.focus(),s=null}}}function Mu(r={}){let{color:o="neutral",open:n=!1,labelledBy:e,describedBy:s,onDismiss:t}=r,a=at(n);return O(E({_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},zi("dialog",Vi,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(i,m)=>{var c;if(i.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();i.clientX>=u.left&&i.clientX<=u.right&&i.clientY>=u.top&&i.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(i,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(i)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:i=>Ri(i,"inherit"),color:i=>_o(i,"shift-10",o),backgroundColor:i=>_o(i,"inherit",o),border:"none",borderRadius:i=>Gn(Yn(i)*2),padding:i=>Gn(Yn(i)*3),boxShadow:R("high"),"&::backdrop":{backgroundColor:i=>_o(i,"shift-2","neutral"),opacity:.75}}})}import{toState as Mi}from"@domphy/core";import{themeColor as Gt,themeSize as _i,themeSpacing as Ni}from"@domphy/theme";function Bu(r={}){var n;let o=Mi((n=r.color)!=null?n:"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:Ni(2),fontSize:e=>_i(e,"inherit"),backgroundColor:e=>Gt(e),color:e=>Gt(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Gt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Gt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{behavior as $i}from"@domphy/core";import{themeColor as No,themeDensity as Ai,themeSize as Bi,themeSpacing as Tt}from"@domphy/theme";var $o={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Jn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},st=r=>r==="left"||r==="right";function Xn(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function Hi(r,o){let{state:n,onDismiss:e,placement:s,size:t}=o,a=r.domElement;a.setAttribute("aria-modal","true");let i=p=>{p.preventDefault(),we(n,e)};a.addEventListener("cancel",i);let m=(p,b)=>{let g=(p==="start"||p==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),D=Xn(p,g),w=b!=null?b:st(D)?Tt(80):Tt(64);return a.style.margin=Jn[D],a.style.width=st(D)?w:"100dvw",a.style.height=st(D)?"100dvh":w,D},u=m(s,t),l=!1,c=!1,d=null,f=()=>{d=null,l&&(l=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(lt(),c=!1))},h=p=>{p.target===a&&p.propertyName==="transform"&&f()};a.addEventListener("transitionend",h);let C=p=>{if(p)l=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(Yt(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(l=!0,a.style.transform=$o[u],!a.open){f();return}d=setTimeout(f,350)}},v=Se(n,C);return{requestClose:()=>we(n,e),update(p){e=p.onDismiss,p.state!==n&&(v(),n=p.state,v=Se(n,C,!1)),(p.placement!==s||p.size!==t)&&(s=p.placement,t=p.size,u=m(s,t),n.get()||(a.style.transform=$o[u]))},destroy(){d&&(clearTimeout(d),d=null),v(),a.removeEventListener("cancel",i),a.removeEventListener("transitionend",h),c&&(lt(),c=!1)}}}function Yu(r={}){let{color:o="neutral",open:n=!1,onDismiss:e,placement:s="end",size:t}=r,a=at(n),i=Xn(s,!1),m=st(i)?Tt(80):Tt(64),u=t!=null?t:m;return O(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},$i("drawer",Hi,{state:a,onDismiss:e,placement:s,size:t})),{onClick:(l,c)=>{var h;if(l.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();l.clientX>=d.left&&l.clientX<=d.right&&l.clientY>=d.top&&l.clientY<=d.bottom||(h=c.getBehavior("drawer"))==null||h.requestClose()},style:{transform:$o[i],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:l=>Bi(l,"inherit"),color:l=>No(l,"shift-10",o),backgroundColor:l=>No(l,"inherit",o),border:"none",padding:l=>Tt(Ai(l)*3),margin:Jn[i],width:st(i)?u:"100dvw",height:st(i)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:R("high"),"&::backdrop":{backgroundColor:l=>No(l,"shift-2","neutral"),opacity:.75}}})}import{toState as Fi}from"@domphy/core";import{themeColor as Ki,themeSize as ji}from"@domphy/theme";function Zu(r={}){var n;let o=Fi((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>ji(e,"inherit"),fontStyle:"italic",color:e=>Ki(e,"shift-10",o.get(e))}}}import{toState as Wi}from"@domphy/core";import{themeColor as Ao,themeSpacing as Bo}from"@domphy/theme";function od(r={}){var n;let o=Wi((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:Bo(3),paddingBlock:Bo(12),paddingInline:Bo(6),textAlign:"center",color:e=>Ao(e,"muted",o.get(e)),"& > :first-child":{color:e=>Ao(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>Ao(e,"text",o.get(e))}}}}var Ho="errorBoundaryOriginal";function qi(r){var n;let o=r.getMetadata(Ho);if(typeof o=="function"){(n=r._childrenRelease)==null||n.call(r),r._setupFunctionChildren(o);return}if(o!=null){r.children.update(Array.isArray(o)?o:[o]);return}r.children.update([])}function rd(r={}){return{_onSchedule:(o,n)=>{o.getMetadata(Ho)===void 0&&o.setMetadata(Ho,n[o.tagName])},_onError:(o,n)=>{var t,a;(t=r.onError)==null||t.call(r,n);let e=()=>qi(o),s=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([s])}}}import{toState as Yi}from"@domphy/core";import{themeColor as Ut,themeSize as Gi,themeSpacing as Ui}from"@domphy/theme";var Ji={small:8,medium:10,large:14};function md(r={}){var e,s;let o=Yi((e=r.color)!=null?e:"primary","color"),n=Ui(Ji[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>Gi(t,"inherit"),backgroundColor:t=>Ut(t,"shift-13",o.get(t)),color:t=>Ut(t,"shift-0","neutral"),boxShadow:R("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>Ut(t,"shift-14",o.get(t)),boxShadow:R("medium")},"&:active:not([disabled])":{backgroundColor:t=>Ut(t,"shift-15",o.get(t)),boxShadow:R("low")},"&:focus-visible":{boxShadow:t=>`${R("medium")}, ${S(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Xi}from"@domphy/core";import{themeColor as Zn,themeSize as Zi,themeSpacing as Jt}from"@domphy/theme";function hd(r={}){var n;let o=Xi((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Jt(2),marginInline:0,marginTop:Jt(3),marginBottom:Jt(3),color:e=>Zn(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Jt(2)},"& figcaption":{fontSize:e=>Zi(e,"decrease-1"),color:e=>Zn(e,"muted",o.get(e)),lineHeight:1.45}}}}import{toState as Qi}from"@domphy/core";import{themeColor as Dt,themeDensity as ct,themeSize as Fo,themeSpacing as Ce}from"@domphy/theme";function bd(r={}){var s;let{layout:o="horizontal"}=r,n=Qi((s=r.color)!=null?s:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>Ce(ct(t)*3),paddingBlock:t=>Ce(ct(t)*3),border:"none",borderRadius:t=>Ce(ct(t)*2),fontSize:t=>Fo(t,"inherit"),backgroundColor:t=>Dt(t,"inherit",n.get(t)),color:t=>Dt(t,"text",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:Ce(4),rowGap:Ce(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>Fo(t,"inherit"),fontWeight:600,paddingBlock:t=>Ce(ct(t)*1),borderRadius:t=>Ce(ct(t)*2),color:t=>Dt(t,"text",n.get(t)),backgroundColor:t=>Dt(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:Ce(ct(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(${Ce(2)} * -1)`,fontSize:t=>Fo(t,"decrease-1"),color:t=>Dt(t,"text",n.get(t))}}}}import{themeDensity as el,themeSpacing as tl}from"@domphy/theme";function Cd(r={}){let{columns:o=1,gap:n=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof o=="number"?`repeat(${o}, minmax(0, 1fr))`:o,gap:s=>tl(el(s)*n)},e?{alignItems:e}:{})}}import{toState as ol}from"@domphy/core";import{themeColor as nl,themeSize as Qn,themeSpacing as rl}from"@domphy/theme";var al={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Td(r={}){var e;let o=ol((e=r.color)!=null?e:"neutral","color"),n=r.size;return{_onInsert:s=>{["h1","h2","h3","h4","h5","h6"].includes(s.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:s=>nl(s,"shift-11",o.get(s)),marginTop:0,marginBottom:rl(2),fontSize:s=>{if(n!==void 0)return Qn(s,n);let t=al[s.elementNode.tagName]||"inherit";return Qn(s,t)}}}}import{toState as il}from"@domphy/core";import{themeColor as er,themeSpacing as tr}from"@domphy/theme";function Od(r={}){var n;let o=il((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:tr(3),marginBottom:tr(3),backgroundColor:e=>er(e,"inherit",o.get(e)),color:e=>er(e,"text",o.get(e))}}}import{toState as ll}from"@domphy/core";import{themeColor as sl,themeSize as cl,themeSpacing as or}from"@domphy/theme";function Vd(r={}){var n;let o=ll((n=r.color)!=null?n:"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:or(4),height:or(4),flexShrink:"0",fontSize:e=>cl(e),backgroundColor:"transparent",color:e=>sl(e,"text",o.get(e))}}}import{toState as ml}from"@domphy/core";import{themeColor as nr,themeSpacing as ul}from"@domphy/theme";function $d(r={}){var n;let o=ml((n=r.color)!=null?n:"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:ul(2),backgroundColor:e=>nr(e,"inherit",o.get(e)),color:e=>nr(e,"text",o.get(e))}}}import{toState as rr}from"@domphy/core";import{themeColor as X,themeSize as dl,themeSpacing as Ge}from"@domphy/theme";function Kd(r={}){var e,s;let o=rr((e=r.color)!=null?e:"neutral","color"),n=rr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>dl(t,"inherit"),color:t=>X(t,"text",o.get(t)),display:"inline-flex",position:"relative",width:Ge(6),height:Ge(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:Ge(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${X(t,"border-strong",o.get(t))}`,color:t=>X(t,"text",o.get(t)),width:Ge(4),height:Ge(4)},"&:hover::before":{backgroundColor:t=>X(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${X(t,"shift-6",n.get(t))}`,backgroundColor:t=>X(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>X(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${Ge(.5)} solid ${X(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${X(t,"shift-6",n.get(t))}`,backgroundColor:t=>X(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>X(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>X(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:Ge(1.5),boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>X(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as pl}from"@domphy/core";import{themeColor as Ko,themeDensity as mt,themeSize as hl,themeSpacing as ut}from"@domphy/theme";function Gd(r={}){var n;let o=pl((n=r.color)!=null?n:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>hl(e,"inherit"),color:e=>Ko(e,"text",o.get(e)),paddingBlock:e=>ut(mt(e)*1),paddingInline:e=>ut(mt(e)*1),blockSize:e=>ut(6+mt(e)*2),inlineSize:e=>ut(6+mt(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>ut(mt(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>ut(mt(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>Ko(e,"shift-2","neutral"),outline:e=>`1px solid ${Ko(e,"border-strong","neutral")}`}}}}import{toState as ar}from"@domphy/core";import{themeColor as Ie,themeDensity as jo,themeSize as fl,themeSpacing as Xt}from"@domphy/theme";function Qd(r={}){var s,t;let{mode:o="datetime-local"}=r,n=ar((s=r.color)!=null?s:"neutral","color"),e=ar((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>fl(a,"inherit"),lineHeight:"inherit",color:a=>Ie(a,"text",n.get(a)),backgroundColor:a=>Ie(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Ie(a,"border-strong",n.get(a))}`,borderRadius:a=>Xt(jo(a)*1.5),paddingInline:a=>Xt(jo(a)*3),height:a=>Xt(6+jo(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 ${Ie(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>Ie(a,"muted","neutral"),backgroundColor:a=>Ie(a,"shift-2","neutral"),outline:a=>`1px solid ${Ie(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${Xt(.5)} solid ${Ie(a,"shift-6","error")}`}}}}import{toState as ir}from"@domphy/core";import{themeColor as re,themeDensity as Zt,themeSize as gl,themeSpacing as Ue}from"@domphy/theme";function rp(r={}){var e,s;let o=ir((e=r.color)!=null?e:"neutral","color"),n=ir((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>gl(t,"inherit"),lineHeight:"inherit",color:t=>re(t,"text",o.get(t)),backgroundColor:t=>re(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${re(t,"border-strong",o.get(t))}`,borderRadius:t=>Ue(Zt(t)*1.5),height:t=>Ue(6+Zt(t)*2),paddingInline:t=>Ue(Zt(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>Ue(Zt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:Ue(1),height:Ue(6),paddingInline:Ue(2),cursor:"pointer",color:t=>re(t,"shift-11",o.get(t)),backgroundColor:t=>re(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${re(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>re(t,"muted","neutral"),outline:t=>`1px solid ${re(t,"border-strong","neutral")}`,backgroundColor:t=>re(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>re(t,"muted","neutral"),backgroundColor:t=>re(t,"shift-3","neutral")}}}}import{toState as lr}from"@domphy/core";import{themeColor as Je,themeDensity as Qt,themeSize as yl,themeSpacing as Pt}from"@domphy/theme";function cp(r={}){var e,s;let o=lr((e=r.color)!=null?e:"neutral","color"),n=lr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Pt(10),paddingInlineStart:t=>Pt(Qt(t)*3),paddingInlineEnd:t=>Pt(Qt(t)*1.5),paddingBlock:t=>Pt(Qt(t)*1),borderRadius:t=>Pt(Qt(t)*1.5),fontSize:t=>yl(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Je(t,"border-strong",o.get(t))}`,color:t=>Je(t,"text",o.get(t)),backgroundColor:t=>Je(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 ${Je(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Je(t,"shift-2","neutral"),outline:t=>`1px solid ${Je(t,"border-strong","neutral")}`,color:t=>Je(t,"muted","neutral")}}}}import{themeSpacing as sr}from"@domphy/theme";function dp(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:sr(2),"& > *":{minWidth:`${sr(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let i=n(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=n(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,f,h;a.preventDefault();let i=(f=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?f:"",m=n(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((C,v)=>{let p=m[l+v];p&&(p.value=C,p.dispatchEvent(new Event("input",{bubbles:!0})),p.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(h=m[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",s),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",s),o.removeEventListener("paste",t)})}}}import{isState as bl,rawHtml as Sl,toState as Wo}from"@domphy/core";import{themeColor as eo,themeDensity as to,themeSize as vl,themeSpacing as oo}from"@domphy/theme";var Cl='<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>',xl='<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>',El=["name","value","onInput","disabled","required"];function cr(r){if(r!=null)return typeof r=="function"?r:bl(r)?o=>r.get(o):r}function yp(r={}){var t,a;let o=Wo((t=r.color)!=null?t:"neutral","color"),n=Wo((a=r.accentColor)!=null?a:"primary","accentColor"),e=Wo(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of El)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var C,v,p,b,k,g,D;let m=(C=r.name)!=null?C:s.name,u=cr((v=r.value)!=null?v:s.value),l=(p=r.onInput)!=null?p:s.onInput,c=cr((b=r.disabled)!=null?b:s.disabled),d=(k=r.required)!=null?k:s.required,f=O(E(E(E(E(E({input:null,type:w=>e.get(w)?"text":"password",ariaLabel:(g=r.ariaLabel)!=null?g:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),h={button:w=>Sl(e.get(w)?xl:Cl),type:"button",ariaLabel:w=>e.get(w)?"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(f),i.children.insert(h)},style:{display:"flex",alignItems:"center",gap:i=>oo(to(i)*1),paddingBlock:i=>oo(to(i)*1),paddingInline:i=>oo(to(i)*3),borderRadius:i=>oo(to(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${eo(i,"border-strong",o.get(i))}`,color:i=>eo(i,"text",o.get(i)),backgroundColor:i=>eo(i,"inherit",o.get(i)),fontSize:i=>vl(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${eo(i,"shift-5",n.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,n.get(i))}}}}import{toState as mr}from"@domphy/core";import{themeColor as Oe,themeSize as kl,themeSpacing as no}from"@domphy/theme";function Ep(r={}){var e,s;let o=mr((e=r.color)!=null?e:"neutral","color"),n=mr((s=r.accentColor)!=null?s:"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=>kl(t,"inherit"),color:t=>Oe(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:no(6),height:no(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 ${Oe(t,"border-strong",o.get(t))}`,color:t=>Oe(t,"text",o.get(t)),width:no(4),height:no(4)},"&:hover::before":{backgroundColor:t=>Oe(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${Oe(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>Oe(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>Oe(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>Oe(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as ur}from"@domphy/core";import{themeColor as qo,themeSpacing as xe}from"@domphy/theme";function Pp(r={}){var e,s;let o=ur((e=r.color)!=null?e:"neutral","color"),n=ur((s=r.accentColor)!=null?s:"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:xe(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:xe(1.5),borderRadius:xe(999),backgroundColor:t=>qo(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:xe(4),height:xe(4),borderRadius:xe(999),border:"none",marginTop:`calc((${xe(1.5)} - ${xe(4)}) / 2)`,backgroundColor:t=>qo(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>qo(t,"shift-10",n.get(t))},borderRadius:xe(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as dr}from"@domphy/core";import{themeColor as Le,themeDensity as Yo,themeSize as wl,themeSpacing as ro}from"@domphy/theme";function Rp(r={}){var e,s;let o=dr((e=r.color)!=null?e:"neutral","color"),n=dr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>wl(t,"inherit"),lineHeight:"inherit",color:t=>Le(t,"text",o.get(t)),backgroundColor:t=>Le(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Le(t,"border-strong",o.get(t))}`,borderRadius:t=>ro(Yo(t)*1.5),minWidth:ro(32),paddingInline:t=>ro(Yo(t)*3),paddingBlock:t=>ro(Yo(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>Le(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 ${Le(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Le(t,"muted","neutral"),backgroundColor:t=>Le(t,"shift-2","neutral"),outline:t=>`1px solid ${Le(t,"border-strong","neutral")}`}}}}import{toState as Tl}from"@domphy/core";import{themeColor as It,themeSize as pr,themeSpacing as de}from"@domphy/theme";function $p(r={}){var n;let o=Tl((n=r.accentColor)!=null?n:"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=>pr(e,"inherit"),backgroundColor:e=>It(e,"inherit"),color:e=>It(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:de(9),height:de(6),cursor:"pointer",margin:"0",paddingBlock:de(1),transition:"box-shadow 140ms ease",borderRadius:de(999),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>It(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${de(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:de(3),height:de(3),borderRadius:de(999),left:de(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>It(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:de(999),display:"inline-block",fontSize:e=>pr(e,"inherit"),lineHeight:1,backgroundColor:e=>It(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as hr}from"@domphy/core";import{themeColor as oe,themeDensity as Go,themeSize as Dl,themeSpacing as Xe}from"@domphy/theme";function Kp(r={}){var s,t;let{type:o="text"}=r,n=hr((s=r.color)!=null?s:"neutral","color"),e=hr((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Xe(10),paddingInline:a=>Xe(Go(a)*3),paddingBlock:a=>Xe(Go(a)*1),borderRadius:a=>Xe(Go(a)*1.5),fontSize:a=>Dl(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${oe(a,"border-strong",n.get(a))}`,color:a=>oe(a,"text",n.get(a)),backgroundColor:a=>oe(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>oe(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>oe(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${oe(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>oe(a,"shift-2","neutral"),outline:a=>`1px solid ${oe(a,"border-strong","neutral")}`,color:a=>oe(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${Xe(.5)} solid ${oe(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${Xe(.5)} solid ${oe(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${Xe(.5)} solid ${oe(a,"shift-6","warning")}`}}}}import{toState as Pl}from"@domphy/core";import{themeColor as Uo,themeDensity as Jo,themeSize as Il,themeSpacing as Xo}from"@domphy/theme";function Yp(r={}){var n;let o=Pl((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>Il(e,"inherit"),color:e=>Uo(e,"text",o.get(e)),backgroundColor:e=>Uo(e,"inherit",o.get(e)),paddingBlock:e=>Xo(Jo(e)*(.5/1.5)),paddingInline:e=>Xo(Jo(e)*(1.5/1.5)),borderRadius:e=>Xo(Jo(e)*(1/1.5)),outline:e=>`1px solid ${Uo(e,"border-strong",o.get(e))}`}}}import{toState as fr}from"@domphy/core";import{themeColor as Zo,themeSize as Ol,themeSpacing as Ll}from"@domphy/theme";function Xp(r={}){var e,s;let o=fr((e=r.color)!=null?e:"neutral","color"),n=fr((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Ll(2),fontSize:t=>Ol(t,"inherit"),color:t=>Zo(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>Zo(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>Zo(t,"muted","neutral")}}}}import{toState as gr}from"@domphy/core";import{themeColor as Ot,themeSize as zl,themeSpacing as Rl}from"@domphy/theme";function oh(r={}){var e,s;let o=gr((e=r.color)!=null?e:"primary","color"),n=gr((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>zl(t,"inherit"),backgroundColor:t=>Ot(t),color:t=>Ot(t,"shift-13",o.get(t)),textDecoration:"none","&:visited":{color:t=>Ot(t,"shift-13",n.get(t))},"&:hover:not([disabled])":{color:t=>Ot(t,"shift-14",o.get(t)),textDecoration:"underline"},borderRadius:Rl(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>Ot(t,"muted","neutral")}}}}import{toState as Vl}from"@domphy/core";import{themeColor as $,themeDensity as ze,themeSize as yr,themeSpacing as Re}from"@domphy/theme";var Ml={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},_l={small:.5,medium:1,large:1.5};function sh(r={}){var i,m,u;let o=(i=r.variant)!=null?i:"outline",n=Vl((m=r.color)!=null?m:o==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=nt[e];if(o==="ghost"){let l=_l[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>yr(c,s),textDecoration:"none",paddingBlock:c=>Re(ze(c)*l),paddingInline:c=>Re(ze(c)*l),borderRadius:c=>Re(ze(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>Re(ze(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=>$(c,"text",n.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>$(c,"text",n.get(c)),backgroundColor:c=>$(c,"hover",n.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>$(c,"text",n.get(c)),backgroundColor:c=>$(c,"increase-2",n.get(c))},"&:focus-visible":{boxShadow:c=>S(c,n.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>$(c,"border-strong","neutral")}}}}let t=o==="solid",a=Ml[e];return O(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>yr(l,s),textDecoration:"none",paddingBlock:l=>Re(ze(l)*a.block),paddingInline:l=>Re(ze(l)*a.inline),borderRadius:l=>Re(ze(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>Re(ze(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${$(l,"border-strong",n.get(l))}`,color:l=>t?$(l,"shift-0","neutral"):$(l,"shift-13",n.get(l)),backgroundColor:l=>t?$(l,"shift-13",n.get(l)):$(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?$(l,"shift-0","neutral"):$(l,"shift-14",n.get(l)),backgroundColor:l=>t?$(l,"shift-14",n.get(l)):$(l,"hover",n.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?$(l,"shift-15",n.get(l)):$(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>$(l,"shift-2","neutral"),outline:l=>`1px solid ${$(l,"border-strong","neutral")}`,color:l=>$(l,"muted","neutral")}}})}import{toState as Nl}from"@domphy/core";import{themeColor as Ve,themeDensity as Ze,themeSize as br,themeSpacing as Qe}from"@domphy/theme";function hh(r={}){var n;let o=(n=r.color)!=null?n:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>Ve(e,"inherit",o),color:e=>Ve(e,"text",o)}}}function fh(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>Qe(Ze(n)*2),paddingBlock:n=>Qe(o?1:Ze(n)*2),paddingInline:n=>Qe(Ze(n)*3),fontSize:n=>br(n,"inherit"),color:n=>Ve(n,"text")}}}function gh(r={}){var s,t;let o=Nl((s=r.color)!=null?s:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>Qe(Ze(a)*2),paddingBlock:a=>Qe(e?1:Ze(a)*2),paddingInline:a=>Qe(Ze(a)*3),fontSize:a=>br(a,"inherit"),color:a=>Ve(a,"text",o.get(a)),borderRadius:a=>Qe(Ze(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>Ve(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>Ve(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>Ve(a,"shift-3",n),color:a=>Ve(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>S(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as $l}from"@domphy/core";import{themeColor as Sr,themeDensity as Qo,themeSize as Al,themeSpacing as en}from"@domphy/theme";function vh(r={}){var n;let o=$l((n=r.accentColor)!=null?n:"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=>Al(e,"inherit"),color:e=>Sr(e,"text",o.get(e)),backgroundColor:e=>Sr(e,"inherit",o.get(e)),height:e=>en(Qo(e)*(6/1.5)),borderRadius:e=>en(Qo(e)*(1/1.5)),paddingInline:e=>en(Qo(e)*(1.5/1.5))}}}import{behavior as Bl,toState as Hl}from"@domphy/core";import{themeColor as Me,themeDensity as Lt,themeSize as vr,themeSpacing as dt}from"@domphy/theme";function Th(r={items:[]}){var l;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:s="primary"}=r,t=Hl((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let f=c.nodeId;return d.items.map((h,C)=>{var p;let v=(p=h.key)!=null?p:C;return O(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:v,type:"button",id:`menuitem${f}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=h.onClick)==null||b.call(h)},onKeyDown:b=>{var V;let k=b.key;if(k==="Enter"||k===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(k))return;b.preventDefault();let g=d.items.map((j,G)=>{var M;return(M=j.key)!=null?M:G}),D=g.indexOf(v),w=D;k==="ArrowDown"?w=(D+1)%g.length:k==="ArrowUp"?w=(D-1+g.length)%g.length:k==="Home"?w=0:k==="End"&&(w=g.length-1),(V=document.getElementById(`menuitem${f}${g[w]}`))==null||V.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:dt(2),width:"100%",fontSize:b=>vr(b,"inherit"),height:b=>dt(6+Lt(b)*2),paddingInline:b=>dt(Lt(b)*3),border:"none",outline:"none",color:b=>Me(b,"text",d.color),backgroundColor:b=>Me(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>Me(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>Me(b,"shift-3",d.accentColor),color:b=>Me(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let f=d;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),f=h,f.items.length!==0&&c.children.update(i(c,f))}}},u={items:o,activeKey:t,activeKeyIsCallerOwned:a,selectable:n,color:e,accentColor:s};return O(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{o.length!==0&&(d[c.tagName]=i(c,u))}},Bl("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>dt(Lt(c)*2),paddingInline:c=>dt(Lt(c)*2),fontSize:c=>vr(c,"inherit"),backgroundColor:c=>Me(c,"inherit",e),color:c=>Me(c,"text",e),borderRadius:c=>dt(Lt(c)*2),outline:c=>`1px solid ${Me(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:R("medium")}})}import{behavior as Fl}from"@domphy/core";var Cr=r=>!!r&&typeof r.get=="function"&&r._isState===!0,pe=r=>{let o={},n=[];for(let e in r){let s=r[e];e==="x"?n.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?n.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?n.push(`scale(${s})`):e==="rotate"?n.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):o[e]=s}return n.length&&(o.transform=n.join(" ")),o};function tn(r={}){var o,n,e,s;return{duration:(o=r.duration)!=null?o:300,delay:(n=r.delay)!=null?n:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function on(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function Kl(r,o){let n=r.domElement,e=o,s,t=i=>{s==null||s(),s=void 0,!(!n||!Cr(i))&&(s=i.addListener(m=>{on()?Object.assign(n.style,pe(m)):typeof n.animate=="function"&&n.animate([pe(m)],tn(e.transition))}))},a=(i,m)=>{if(!n)return;let u=Cr(i.animate)?i.animate.get():i.animate;if(on()){u?Object.assign(n.style,pe(u)):m==="enter"&&i.initial&&Object.assign(n.style,pe(i.initial));return}if(typeof n.animate=="function")if(u){let l=m==="enter"&&i.initial?[pe(i.initial),pe(u)]:[pe(u)];n.animate(l,tn(i.transition))}else m==="enter"&&i.initial&&Object.assign(n.style,pe(i.initial))};return a(o,"enter"),t(o.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function Oh(r={}){return O(E({},Fl("motion",(o,n)=>Kl(o,n),r)),{_onBeforeRemove:(o,n)=>{var a,i;let e=o.domElement,s=o.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return n();if(on())return Object.assign(e.style,pe(t)),n();e.animate([pe(t)],tn((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(n,n)}})}import{toState as jl}from"@domphy/core";import{themeColor as xr,themeSize as Wl,themeSpacing as ql}from"@domphy/theme";function Mh(r={}){var n;let o=jl((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Wl(e,"inherit"),backgroundColor:e=>xr(e),color:e=>xr(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ql(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{behavior as Yl,isState as Gl,toState as kr}from"@domphy/core";import{themeColor as et,themeDensity as zt,themeSize as Ul,themeSpacing as pt}from"@domphy/theme";function Jl(r,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];r>3&&n.push("...");let e=Math.max(2,r-1),s=Math.min(o-1,r+1);for(let t=e;t<=s;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function Xl(r,o,n,e){if(Gl(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=kr(n!=null?n:e),r.setMetadata(o,s)),s}function Er(r,o){let n=r.getMetadata("paginationTotal");return n||(n=kr(o),r.setMetadata("paginationTotal",n)),n}function Bh(r){let{total:o,color:n="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>pt(6+zt(a)*2),height:a=>pt(6+zt(a)*2),paddingInline:a=>pt(zt(a)*2),borderRadius:a=>pt(zt(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>Ul(a,"inherit"),backgroundColor:"transparent",color:a=>et(a,"shift-13",n),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>et(a,"shift-13",n),backgroundColor:a=>et(a,"hover",n)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=O(E({},s),{backgroundColor:a=>et(a,"shift-13",e),color:a=>et(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>et(a,"shift-13",e)}});return O(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=Xl(a,"paginationPage",r.value,1),m=Er(a,o),u={div:l=>{let c=i.get(l),d=m.get(l),f=[];f.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let h=0;for(let C of Jl(c,d))if(C==="...")f.push({span:"\u2026",_key:`ellipsis-${h++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>pt(zt(v)*2),color:v=>et(v,"shift-7",n)}});else{let v=C===c;f.push({button:String(C),_key:`page-${C}`,type:"button",ariaLabel:`Page ${C}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(C),style:v?t:s})}return f.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),f},style:{display:"flex",alignItems:"center",gap:pt(1)}};a.children.insert(u)}},Yl("pagination-total",a=>({update(i){Er(a,i.total).set(i.total)}}),{total:o})),{style:{display:"inline-flex"}})}import{toState as Zl}from"@domphy/core";import{themeColor as Ql,themeDensity as es,themeSpacing as ts}from"@domphy/theme";function Wh(r={}){var s;let{padding:o=4,divider:n=!1}=r,e=Zl((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>ts(es(t)*o)},n?{borderBottom:t=>`1px solid ${Ql(t,"border",e.get(t))}`}:{})}}import{toState as os}from"@domphy/core";import{themeColor as ns,themeSize as rs}from"@domphy/theme";function Jh(r={}){var n;let o=os((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>rs(e,"inherit"),color:e=>ns(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as as,toState as wr}from"@domphy/core";import{themeColor as nn,themeDensity as is,themeSpacing as ls}from"@domphy/theme";function of(r){var c;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,s=wr(o),t=wr(n),{show:a,hide:i,anchorPartial:m}=me({kind:"popover",open:s,onDismiss:r.onDismiss,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>nn(d,"inherit"),color:d=>nn(d,"text"),borderRadius:d=>ls(is(d)*2),outline:d=>`1px solid ${nn(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:R("medium")}};return(c=r.content).$||(c.$=[]),r.content.$.push(u),as(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?J("popover",d.elementNode):void 0,onMouseEnter:(d,f)=>e==="hover"&&a(f),onMouseLeave:(d,f)=>e==="hover"&&i(f),onClick:(d,f)=>{e==="click"&&(s.get()?i(f):a(f))},onKeyDown:(d,f)=>{d.key==="Escape"&&s.get()&&i(f)},onFocus:(d,f)=>e==="hover"&&a(f),onBlur:(d,f)=>{if(e!=="hover")return;let h=d.relatedTarget,v=f.getRoot().domElement.querySelector(`#${J("popover",f)}`);h&&(v!=null&&v.contains(h))||i(f)}}),m}import{toState as ss}from"@domphy/core";import{themeColor as ao,themeSize as cs,themeSpacing as rn}from"@domphy/theme";function Tr(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=rn(6),bordered:s=!0}=r,t=ss(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"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>cs(l),backgroundColor:l=>ao(l),color:l=>ao(l,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:rn(1.5),height:rn(1.5),backgroundColor:l=>ao(l,"inherit",n),borderWidth:s?"1px":0,borderColor:l=>ao(l,"border-strong",n),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",f=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${f}) rotate(45deg)`}}}}}import{toState as ms}from"@domphy/core";import{themeColor as Dr,themeDensity as an,themeSize as us,themeSpacing as ln}from"@domphy/theme";function mf(r={}){var n;let o=ms((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>us(e,"inherit"),color:e=>Dr(e,"text",o.get(e)),backgroundColor:e=>Dr(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>ln(an(e)*2),paddingInline:e=>ln(an(e)*3),borderRadius:e=>ln(an(e)*2)}}}import{toState as Pr}from"@domphy/core";import{themeColor as io,themeSpacing as lo}from"@domphy/theme";function hf(r={}){var e,s;let o=Pr((e=r.color)!=null?e:"neutral","color"),n=Pr((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:lo(2),border:0,borderRadius:lo(999),overflow:"hidden",backgroundColor:t=>io(t,"inherit",o.get(t)),color:t=>io(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>io(t,"inherit",o.get(t)),borderRadius:lo(999)},"&::-webkit-progress-value":{backgroundColor:t=>io(t,"shift-9",n.get(t)),borderRadius:lo(999),transition:"width 220ms ease"}}}}import{behavior as ds,isState as ps,rawHtml as hs,toState as Ir}from"@domphy/core";import{themeColor as fs,themeSize as gs,themeSpacing as Lr}from"@domphy/theme";var ys='<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>',bs='<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 Or(r,o){var n,e,s;r.onChange=o.onChange,r.readOnly=(n=o.readOnly)!=null?n:!1,r.max=(e=o.max)!=null?e:5,r.color=(s=o.color)!=null?s:"warning",ps(o.value)?o.value!==r.valueState&&r.valueState.set(o.value.get()):o.value!==void 0&&r.valueState.set(o.value)}function Ss(r,o,n,e){let s=a=>{let i=e.get(a);return i>0?i:n.valueState.get(a)},t={button:a=>hs(o<=s(a)?ys:bs),_key:o,type:"button",ariaLabel:`${o} star${o>1?"s":""}`,onClick:()=>{var i;if(n.readOnly)return;let a=o===n.valueState.get()?0:o;n.valueState.set(a),(i=n.onChange)==null||i.call(n,a),e.set(0)},onMouseEnter:()=>{n.readOnly||e.set(o)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(n.readOnly)return;let i=n.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(n.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;n.valueState.set(m),(l=n.onChange)==null||l.call(n,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:Lr(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,n.color)}}};r.children.insert(t)}function sn(r,o,n){let e=r.children.items;for(;e.length>o.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=o.max;s++)Ss(r,s,o,n)}function Sf(r={}){var e,s,t,a,i,m,u;let o={valueState:Ir((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},n=Ir(0);return O(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Lr(.5),fontSize:l=>gs(l,"increase-1"),cursor:o.readOnly?"default":"pointer",color:l=>fs(l,"muted",o.color)}},ds("rating",(l,c)=>(Or(o,c),sn(l,o,n),{update(d){Or(o,d),sn(l,o,n)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{sn(l,o,n)}})}import{toState as cn}from"@domphy/core";import{themeColor as mn,themeSpacing as zr}from"@domphy/theme";function kf(r={}){var m,u,l;let{size:o=16,thickness:n=.25}=r,e=cn((m=r.value)!=null?m:0,"value"),s=cn((u=r.color)!=null?u:"primary","color"),t=cn((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-n)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:zr(o),height:zr(o),borderRadius:"50%",color:c=>mn(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${mn(c,"shift-9",s.get(c))} ${e.get(c)}%, ${mn(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}import{themeDensity as vs,themeSpacing as Rr}from"@domphy/theme";function Vr(r={}){let{gap:o=4,align:n="center",justify:e,wrap:s=!1,density:t=!0}=r;return{style:E(E({display:"flex",alignItems:n,gap:t?a=>Rr(vs(a)*o):()=>Rr(o)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}import{toState as Cs}from"@domphy/core";import{themeColor as so,themeSpacing as co}from"@domphy/theme";function Lf(r={}){var n;let o=Cs((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>so(e,"text",o.get(e)),"&::-webkit-scrollbar":{width:co(2),height:co(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>so(e,"shift-5",o.get(e)),borderRadius:co(999),border:`${co(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>so(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${so(e,"shift-5",o.get(e))} transparent`}}}import{behavior as xs,isState as Es,toState as Nr}from"@domphy/core";import{themeColor as tt,themeSize as ks,themeSpacing as _e}from"@domphy/theme";function Mr(r,o,n,e){if(Es(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=Nr(n!=null?n:e),r.setMetadata(o,s)),s}function ws(r,o,n,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=o.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(n),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function _r(r,o,n,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>o.get(u)===a,tabIndex:u=>{var c,d;let l=o.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>o.set(a),onKeyDown:u=>ws(u,r,a,o),style:{cursor:"pointer",fontSize:u=>ks(u,"inherit"),height:_e(6),paddingBlock:_e(1),paddingInline:_e(3),border:"none",borderRadius:_e(10),color:u=>tt(u,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>tt(u,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>tt(u,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:u=>tt(u,"shift-0",e),color:u=>tt(u,"shift-10",e),boxShadow:R("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${R("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Nf(r={items:[]}){var t,a,i;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,s={items:o,color:n,accentColor:e};return O(E({role:"radiogroup",_context:{segmented:{value:Nr((i=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=Mr(m,"segmentedValue",r.value,(d=(c=o[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=_r(o,l,n,e)}},xs("segmented-items",m=>({update(u){var c,d;let l=Mr(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(_r(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:_e(1),paddingInline:_e(1),gap:_e(.5),borderRadius:_e(10),backgroundColor:m=>tt(m,"inherit",n),color:m=>tt(m,"text",n)}})}import{themeColor as Ee,themeColorToken as Ts,themeDensity as Rt,themeSize as Ds,themeSpacing as Ne}from"@domphy/theme";function Ff(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Ds(e,"inherit"),lineHeight:"inherit",color:e=>Ee(e,"text",o),backgroundColor:e=>Ee(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Ee(e,"border-strong",o)}`,borderRadius:e=>Ne(Rt(e)*1.5),paddingBlock:e=>Ne(Rt(e)*1),paddingLeft:e=>Ne(Rt(e)*3),paddingRight:e=>Ne(Rt(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Ts(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${Ne(2)} center`,backgroundSize:`${Ne(2.5)} ${Ne(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>Ne(6+Rt(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${Ee(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>S(e,n)},"& optgroup":{color:e=>Ee(e,"shift-11",o)},"& option[disabled]":{color:e=>Ee(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Ee(e,"muted","neutral"),outline:e=>`1px solid ${Ee(e,"border-strong","neutral")}`,backgroundColor:e=>Ee(e,"shift-2","neutral")}}}}import{behavior as Ps,merge as $r,toState as un}from"@domphy/core";import{themeColor as ht,themeDensity as mo,themeSize as Is,themeSpacing as ft}from"@domphy/theme";var Os=1e3;function Ls(r){let o=r.getMetadata("selectBoxTypeahead");return o||(o={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",o)),o}var Ar=(r,o)=>r.trim().toLowerCase().startsWith(o);function zs(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(o=>o.getAttribute("aria-disabled")!=="true"&&!o.hasAttribute("disabled")):[]}function Jf(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=un(r.value),i=un(s),{show:m,hide:u,anchorPartial:l}=me({kind:"selectBox",open:i,onDismiss:r.onDismiss,placement:un(n),content:r.content}),c={onClick:(p,b)=>!t&&u(b),dataTone:"shift-14",style:{backgroundColor:p=>ht(p,"inherit"),color:p=>ht(p,"text"),borderRadius:p=>ft(mo(p)*2),outline:p=>`1px solid ${ht(p,"border-strong")}`,outlineOffset:"-1px",boxShadow:R("medium")}};$r(r.content,c);let d=p=>({div:b=>{let k=p.state.get(b),g=Array.isArray(k)?k:[k];return p.options.filter(w=>g.includes(w.value)).map(w=>({span:w.label,$:[Ft({color:p.color,removable:p.multiple})],_key:w.value,_onRemove:V=>{let j=p.state.get(),M=(Array.isArray(j)?j:[j]).filter(ne=>ne!==w.value);p.multiple?p.state.set(M):p.state.set(M[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:ft(1),flex:1}}),f=(p,b)=>({update(k){p.children.update([d(k)])}}),h=p=>i.get()?u(p):m(p),C=(p,b)=>{var G,M,ne,N;let k=Ls(b);k.timer&&clearTimeout(k.timer),k.buffer+=p.toLowerCase(),k.timer=setTimeout(()=>{k.buffer=""},Os);let g=k.buffer.length>1&&new Set(k.buffer).size===1,D=g?k.buffer[0]:k.buffer;if(i.get()){let W=b.getRoot().domElement,ie=(G=W==null?void 0:W.querySelector(`#${J("selectBox",b)}`))!=null?G:null,U=zs(ie).filter(Fe=>{var ye;return Ar((ye=Fe.textContent)!=null?ye:"",D)});if(!U.length)return;let He=(ne=(M=b.domElement)==null?void 0:M.ownerDocument)==null?void 0:ne.activeElement,ge=g&&He?U.indexOf(He):-1,le=U[(ge+1)%U.length];le.focus(),(N=le.scrollIntoView)==null||N.call(le,{block:"nearest"});return}if(t)return;let w=o.filter(W=>Ar(W.label,D));if(!w.length)return;let V=g?w.findIndex(W=>W.value===a.get()):-1,j=w[(V+1)%w.length];a.set(j.value)},v=O(E({_onInsert:p=>{p.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(p,b)=>{b[p.tagName]=[d({options:o,multiple:t,color:e,state:a})]}},Ps("selectBoxInner",f,{options:o,multiple:t,color:e,state:a})),{onClick:(p,b)=>h(b),tabindex:0,role:"button",ariaExpanded:p=>i.get(p),ariaHaspopup:"listbox",ariaControls:p=>p!=null&&p.elementNode?J("selectBox",p.elementNode):void 0,onKeyDown:(p,b)=>{let k=p.key;if(k==="Escape"){u(b);return}if(k==="Enter"||k===" "){p.preventDefault(),h(b);return}if(k==="ArrowDown"&&!i.get()){p.preventDefault(),m(b);return}let g=p;k.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&C(k,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:p=>ft(6+mo(p)*2),minWidth:ft(32),outlineOffset:"-1px",outline:p=>`1px solid ${ht(p,"border-strong","neutral")}`,paddingInline:p=>ft(mo(p)*2),borderRadius:p=>ft(mo(p)*1.5),fontSize:p=>Is(p,"inherit"),color:p=>ht(p,"text",e),backgroundColor:p=>ht(p,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>S(p,e)}}});return $r(l,v),l}import{themeColor as Vt,themeDensity as Br,themeSize as Rs,themeSpacing as Hr}from"@domphy/theme";function tg(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Rs(t,"inherit"),height:t=>Hr(6+Br(t)*2),paddingInline:t=>Hr(Br(t)*3),border:"none",outline:"none",color:t=>Vt(t,"text",n),backgroundColor:t=>Vt(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>Vt(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>Vt(t,"shift-6",o),color:t=>Vt(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o)}}}}import{toState as Vs}from"@domphy/core";import{themeColor as Fr,themeDensity as Kr,themeSize as Ms,themeSpacing as jr}from"@domphy/theme";function ag(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=Vs((a=r.value)!=null?a:n?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:n?"true":void 0,_context:{select:{value:e,multiple:n}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>jr(Kr(i)*2),paddingInline:i=>jr(Kr(i)*2),fontSize:i=>Ms(i,"inherit"),backgroundColor:i=>Fr(i,"inherit",o),color:i=>Fr(i,"text",o)}}}import{hashString as _s,toState as Ns}from"@domphy/core";import{themeColor as Mt,themeSize as $s,themeSpacing as Wr}from"@domphy/theme";function cg(r={}){var s;let o=Ns((s=r.color)!=null?s:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=_s(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>$s(t),color:t=>Mt(t,"text",o.get(t)),height:Wr(6),display:"block",borderRadius:Wr(1),backgroundColor:t=>Mt(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${Mt(t,"inherit",o.get(t))} 0%, ${Mt(t,"shift-2",o.get(t))} 50%, ${Mt(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}import{toState as As}from"@domphy/core";import{themeColor as Bs,themeSize as Hs}from"@domphy/theme";function pg(r={}){var n;let o=As((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>Hs(e,"inherit"),color:e=>Bs(e,"shift-10",o.get(e))}}}import{hashString as Fs,toState as Ks}from"@domphy/core";import{themeColor as uo,themeSize as js,themeSpacing as dn}from"@domphy/theme";var Yr={to:{transform:"rotate(360deg)"}},qr=Fs(JSON.stringify(Yr));function yg(r={}){var n;let o=Ks((n=r.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>js(e),backgroundColor:e=>uo(e),color:e=>uo(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:dn(6),height:dn(6),borderRadius:"50%",border:e=>`${dn(.5)} solid ${uo(e,"border-strong",o.get(e))}`,borderTopColor:e=>uo(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${qr} 0.7s linear infinite`,[`@keyframes ${qr}`]:Yr}}}import{ElementNode as Ws,merge as qs,toState as Ys}from"@domphy/core";import{themeColor as po,themeSpacing as pn}from"@domphy/theme";function xg(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{qs(a,{_context:{splitter:{direction:o,size:Ys(n),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Gs(r){let o=r.parent;if(!o)return!0;for(let n of o.children.items)if(n instanceof Ws&&n.getMetadata("splitterPanel"))return n===r;return!0}function Eg(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal"?"width":"height",s=a=>{n.style[e]=`${Gs(r)?a:100-a}%`};s(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let t=o.size.addListener(s);r.addHook("Remove",()=>{var a;o.panelCount=Math.max(0,((a=o.panelCount)!=null?a:1)-1),t()})}}}function kg(){return{role:"separator",tabindex:0,_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize",n.setAttribute("aria-orientation",e?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(o.min)),n.setAttribute("aria-valuemax",String(o.max)),n.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let s=o.size.addListener(m=>{n.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowLeft"&&(l=Math.max(o.size.get()-u,o.min)):m.key==="ArrowDown"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowUp"&&(l=Math.max(o.size.get()-u,o.min)),m.key==="Home"?l=o.min:m.key==="End"&&(l=o.max),l!==null&&(m.preventDefault(),o.size.set(l))},a=null,i=m=>{m.preventDefault();let u=n.parentElement,l=d=>{let f=u.getBoundingClientRect(),h=e?(d.clientX-f.left)/f.width*100:(d.clientY-f.top)/f.height*100;o.size.set(Math.min(Math.max(h,o.min),o.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};n.addEventListener("keydown",t),n.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>po(r,"inherit"),color:r=>po(r,"text"),"&:hover":{backgroundColor:r=>po(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:pn(1),height:pn(1),borderRadius:pn(999),backgroundColor:r=>po(r,"shift-4")}}}}import{themeDensity as Us,themeSpacing as Gr}from"@domphy/theme";function Dg(r={}){let{gap:o=3,align:n,justify:e,density:s=!0}=r;return{style:E(E({display:"flex",flexDirection:"column",gap:s?t=>Gr(Us(t)*o):()=>Gr(o)},n?{alignItems:n}:{}),e?{justifyContent:e}:{})}}import{behavior as Js,isState as Xs,toState as Zr}from"@domphy/core";import{themeColor as K,themeSize as Ur,themeSpacing as ae}from"@domphy/theme";function Jr(r,o,n,e){if(Xs(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=Zr(n!=null?n:e),r.setMetadata(o,s)),s}function Zs(r,o,n){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:ae(3),top:ae(6),bottom:`-${ae(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>K(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>K(e,"shift-9",n)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:ae(3),right:`calc(50% + ${ae(3)})`,left:`calc(-50% + ${ae(3)})`,height:"2px",backgroundColor:e=>K(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>K(e,"shift-9",n)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>K(e,"shift-9",n)}}}function Xr(r,o,n,e,s){let t=n==="vertical",a=Zs(n,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=o.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>o.get(c)===m?"step":void 0,style:O(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:ae(1),flex:t?"none":"1",fontSize:c=>Ur(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:ae(6),height:ae(6),borderRadius:ae(999),fontSize:c=>Ur(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${K(c,"border-strong",e)}`,backgroundColor:c=>K(c,"inherit"),color:c=>K(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>K(c,"shift-9",s),borderColor:c=>K(c,"shift-9",s),color:c=>K(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${K(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>K(c,"shift-9",s),borderColor:c=>K(c,"shift-9",s),color:c=>K(c,"shift-0",s)},"&[data-status=pending]":{color:c=>K(c,"muted")},"&[data-status=active]":{color:c=>K(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>K(c,"text",e)}})}})}function zg(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:o,direction:n,color:e,accentColor:s};return O(E({_doctorDisable:"inline-typography",_context:{steps:{current:Zr((a=r.current)!=null?a:0),direction:n,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=Jr(i,"stepsCurrent",r.current,0);m[i.tagName]=Xr(o,u,n,e,s)}},Js("steps-items",i=>({update(m){let u=Jr(i,"stepsCurrent",r.current,0);i.children.update(Xr(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:ae(2),listStyle:"none",margin:"0",padding:"0"}})}import{toState as Qs}from"@domphy/core";import{themeColor as Qr,themeSize as ec}from"@domphy/theme";function Ng(r={}){var n;let o=Qs((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>ec(e,"inherit"),fontWeight:"bold",color:e=>Qr(e,"shift-11",o.get(e)),backgroundColor:e=>Qr(e)}}}import{toState as tc}from"@domphy/core";import{themeColor as oc,themeSize as nc}from"@domphy/theme";function Hg(r={}){var n;let o=tc((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>nc(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>oc(e,"text",o.get(e))}}}import{toState as rc}from"@domphy/core";import{themeColor as ac,themeSize as ic}from"@domphy/theme";function Wg(r={}){var n;let o=rc((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>ic(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>ac(e,"text",o.get(e))}}}import{toState as lc}from"@domphy/core";import{themeColor as he,themeDensity as gt,themeSize as ea,themeSpacing as yt}from"@domphy/theme";function Ug(r={}){var n;let o=lc((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>ea(e,"inherit"),color:e=>he(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>yt(gt(e)*3),paddingBlock:e=>yt(gt(e)*1),color:e=>he(e,"shift-10",o.get(e)),backgroundColor:e=>he(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>yt(gt(e)*3),paddingBlock:e=>yt(gt(e)*1),color:e=>he(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${he(e,"shift-3",o.get(e))}`,fontSize:e=>ea(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>yt(gt(e)*3),paddingBlock:e=>yt(gt(e)*1),color:e=>he(e,"shift-10",o.get(e)),backgroundColor:e=>he(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${he(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>he(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>he(e,"hover")}}}}import{behavior as sc,isState as cc,toState as mc}from"@domphy/core";import{themeColor as $e,themeDensity as ho,themeSize as uc,themeSpacing as Ae}from"@domphy/theme";function ta(r,o,n,e){if(cc(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=mc(n!=null?n:e),r.setMetadata(o,s)),s}function oa(r,o,n,e,s){let t=r.nodeId,i={div:o.map((u,l)=>{var f;let c=(f=u.key)!=null?f:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:h=>n.get(h)===c,tabIndex:h=>n.get(h)===c?0:-1,onClick:()=>n.set(c),onKeyDown:h=>{var g;let C=h.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(C))return;h.preventDefault();let v=o.map((D,w)=>{var V;return(V=D.key)!=null?V:w}),p=v.indexOf(c),b=p;C==="ArrowRight"?b=(p+1)%v.length:C==="ArrowLeft"?b=(p-1+v.length)%v.length:C==="Home"?b=0:C==="End"&&(b=v.length-1),n.set(v[b]);let k=h.target.closest("[role=tablist]");(g=k==null?void 0:k.querySelectorAll("[role=tab]")[b])==null||g.focus()},style:{cursor:"pointer",fontSize:h=>uc(h,"inherit"),height:h=>Ae(6+ho(h)*2),paddingInline:h=>Ae(ho(h)*4),border:"none",outline:"none",color:h=>$e(h,"shift-13"),backgroundColor:h=>$e(h,"inherit"),boxShadow:h=>`inset 0 ${Ae(-.5)} 0 0 ${$e(h,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:h=>$e(h,"shift-13"),boxShadow:h=>`inset 0 ${Ae(-.5)} 0 0 ${$e(h,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:h=>$e(h,"shift-13",e),boxShadow:h=>`inset 0 ${Ae(-.5)} 0 0 ${$e(h,"shift-8",e)}`},"&:focus-visible":{boxShadow:h=>S(h,e)},"&[aria-selected=true]:focus-visible":{boxShadow:h=>`${S(h,e)}, inset 0 ${Ae(-.5)} 0 0 ${$e(h,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=o.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:f=>n.get(f)!==c,style:{paddingBlock:f=>Ae(ho(f)*2),paddingInline:f=>Ae(ho(f)*2)}}});return[i,...m]}function ey(r={items:[]}){let{items:o=[],accentColor:n="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=ta(t,"tabsActiveKey",r.activeKey,(u=(m=o[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=oa(t,o,i,n,e)}},sc("tabs-items",t=>({update(a){var m,u;let i=ta(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(oa(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:o,accentColor:n,color:e}))}import{behavior as dc,toState as na}from"@domphy/core";import{themeColor as ke,themeDensity as hn,themeSize as pc,themeSpacing as fo}from"@domphy/theme";function iy(r={}){var s,t;let o=na((s=r.color)!=null?s:"neutral","color"),n=na((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return O(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},dc("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=!1,c,d,f=()=>{!u||l||(l=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,l=!1,u&&(d==null||d.observe(m)))},h=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(v=>{v.some(p=>p.isIntersecting)&&f()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{l||f()})),d.observe(m))},C=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",f),a.attributes.addListener("value",f),u&&(h(),f()),{resize:f,update(v){u=v.autoResize,a.attributes.addListener("value",f),u?(h(),f()):C()},destroy(){m.removeEventListener("input",f),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>fo(hn(a)*2),paddingBlock:a=>fo(hn(a)*1.5),border:"none",borderRadius:a=>fo(hn(a)*1.5),fontSize:a=>pc(a,"inherit"),color:a=>ke(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${ke(a,"border-strong",o.get(a))}`,backgroundColor:a=>ke(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>ke(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${ke(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,n.get(a))},"&:invalid":{outline:a=>`${fo(.5)} solid ${ke(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>ke(a,"muted","neutral"),outline:a=>`1px solid ${ke(a,"border-strong","neutral")}`,backgroundColor:a=>ke(a,"shift-2","neutral")}}})}import{toState as hc}from"@domphy/core";import{themeColor as ra,themeDensity as fn,themeSpacing as go}from"@domphy/theme";function uy(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function dy(r={}){var t,a,i;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=hc((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>go(fn(m)*2),paddingBottom:m=>o?"0":go(fn(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:go(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>ra(m,"shift-8",s.get(m)?e:n),opacity:m=>s.get(m)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>go(fn(m)*-4),width:"2px",backgroundColor:m=>ra(m,"shift-3",n)}})}}import{toState as fc}from"@domphy/core";import{themeColor as aa,themeDensity as gn,themeSize as gc,themeSpacing as bt}from"@domphy/theme";function yn(r){let o=r.getMetadata("toastOpen");return o||(o=fc(!1),r.setMetadata("toastOpen",o)),o}var ia=r=>{let o=r==null?void 0:r.elementNode;return o?yn(o).get(r):!1};function by(r={}){let{position:o="top-center",color:n="neutral"}=r,e=o.startsWith("top"),s=o.endsWith("center"),t=o.endsWith("right"),a={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:bt(4),zIndex:30,padding:bt(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${o}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:bt(32),pointerEvents:"auto",paddingBlock:i=>bt(gn(i)*2),paddingInline:i=>bt(gn(i)*4),borderRadius:i=>bt(gn(i)*2),fontSize:i=>gc(i,"inherit"),color:i=>aa(i,"text",n),backgroundColor:i=>aa(i,"inherit",n),boxShadow:R("medium"),opacity:i=>Number(ia(i)),transform:i=>ia(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>yn(i).set(!0)),_onBeforeRemove:(i,m)=>{var p,b;let u=!1,l=null,c=!1,d=i.getRoot(),f=(b=(p=i.domElement)==null?void 0:p.parentElement)!=null?b:null,h=()=>{var g;if(c||!f||f.id!==`domphy-toast-${o}`||f.childElementCount>0)return;c=!0;let k=(g=d.children)==null?void 0:g.items.find(D=>D.domElement===f);k?d.children.remove(k):f.remove()},C=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),h())},v=k=>{k.propertyName==="transform"&&C()};i.domElement.addEventListener("transitionend",v),l=setTimeout(C,350),i.addHook("Remove",()=>{var k;l&&(clearTimeout(l),l=null),(k=i.domElement)==null||k.removeEventListener("transitionend",v),h()}),yn(i).set(!1)}}}import{behavior as yc,isState as bc,toState as ca}from"@domphy/core";import{themeColor as fe,themeSize as ma,themeSpacing as Be}from"@domphy/theme";function la(r,o,n,e){if(bc(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=ca(n!=null?n:e),r.setMetadata(o,s)),s}function Sc(r,o){return Array.isArray(r)?r.includes(o):r===o}function vc(r,o,n,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=o.map((c,d)=>{var f;return(f=c.key)!=null?f:String(d)}),i=a.indexOf(n),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function sa(r,o,n,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>Sc(o.get(l),i),tabIndex:l=>{var d,f,h,C,v;let c=o.get(l);if(n){let b=(h=(f=(Array.isArray(c)?c:[])[0])!=null?f:(d=r[0])==null?void 0:d.key)!=null?h:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(C=r[0])==null?void 0:C.key)!=null?v:"0")?0:-1},onClick:()=>{let l=o.get();if(n){let c=Array.isArray(l)?[...l]:[];o.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else o.set(l===i?"":i)},onKeyDown:l=>vc(l,r,i,o,n),style:{cursor:"pointer",fontSize:l=>ma(l,"inherit"),height:Be(6),paddingBlock:Be(1),paddingInline:Be(2),border:"none",borderRadius:Be(1.5),color:l=>fe(l,"shift-13",e),backgroundColor:l=>fe(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>fe(l,"shift-13",e),backgroundColor:l=>fe(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>fe(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>fe(l,"shift-3",s),color:l=>fe(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Ey(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:o,multiple:n,color:e,accentColor:s};return O(E({role:"group",_context:{toggleGroup:{value:ca((a=r.value)!=null?a:n?[]:""),multiple:n}},_onSchedule:(i,m)=>{let u=la(i,"toggleGroupValue",r.value,n?[]:"");m[i.tagName]=sa(o,u,n,e,s)}},yc("toggle-items",i=>({update(m){let u=la(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(sa(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:Be(1),paddingInline:Be(1),gap:Be(1),borderRadius:Be(2),fontSize:i=>ma(i,"inherit"),backgroundColor:i=>fe(i,"inherit",e),color:i=>fe(i,"text",e),outline:i=>`1px solid ${fe(i,"border",e)}`,outlineOffset:"-1px"}})}function Dy(r={}){return Vr(r)}function Py(){return{div:null,style:{flex:"1 1 0"}}}import{merge as Cc,toState as ua}from"@domphy/core";import{themeColor as da,themeDensity as bn,themeSize as xc,themeSpacing as Sn}from"@domphy/theme";function My(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,s=ua(n),t=ua(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=me({kind:"tooltip",open:o,onDismiss:r.onDismiss,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>Sn(bn(d)*1),paddingInline:d=>Sn(bn(d)*3),borderRadius:d=>Sn(bn(d)*1.5),color:d=>da(d,"text"),backgroundColor:d=>da(d),fontSize:d=>xc(d,"inherit"),boxShadow:R("low")},$:[Tr({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),Cc(u,{ariaDescribedby:d=>d!=null&&d.elementNode?J("tooltip",d.elementNode):void 0,onMouseEnter:(d,f)=>i(f),onMouseLeave:(d,f)=>m(f),onFocus:(d,f)=>i(f),onBlur:(d,f)=>m(f),onKeyDown:(d,f)=>d.key==="Escape"&&m(f)}),u}import{ElementNode as pa}from"@domphy/core";function ha(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function $y(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof pa))return;let l=m.domElement;l&&e.set(ha(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof pa))return;let l=m.domElement;if(!l)return;let c=ha(m,u),d=e.get(c);if(!d)return;let f=l.getBoundingClientRect(),h=d.left-f.left,C=d.top-f.top;if(Math.abs(h)<.5&&Math.abs(C)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${h}px, ${C}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let p=!1,b=null,k=()=>{p||(p=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g),l.style.transition="",l.style.transform="")},g=w=>{w.propertyName==="transform"&&k()};s.set(l,()=>{p=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g)}),l.addEventListener("transitionend",g),b=setTimeout(k,o+n+34),t.add(b)}),e.clear()}}}import{toState as Ec}from"@domphy/core";import{themeColor as fa,themeSize as kc,themeSpacing as wc}from"@domphy/theme";function Fy(r={}){var n;let o=Ec((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>kc(e,"inherit"),backgroundColor:e=>fa(e),color:e=>fa(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:wc(3),listStyleType:"disc",listStylePosition:"outside"}}}function jy(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}export{Ic as abbreviation,_c as accordion,Bc as alert,jc as avatar,Gc as badge,Zc as blockquote,om as breadcrumb,lm as breadcrumbEllipsis,vm as button,Vn as buttonGhost,Tm as buttonSwitch,zm as card,_m as code,ou as combobox,su as command,mu as commandItem,cu as commandSearch,yu as datePicker,xu as descriptionList,Du as details,Mu as dialog,Bu as divider,Yu as drawer,R as elevation,Zu as emphasis,od as empty,rd as errorBoundary,md as fab,hd as figure,S as focusRing,bd as formGroup,Cd as grid,Td as heading,Od as horizontalRule,Vd as icon,$d as image,Kd as inputCheckbox,Gd as inputColor,Qd as inputDateTime,rp as inputFile,cp as inputNumber,dp as inputOTP,yp as inputPassword,Ep as inputRadio,Pp as inputRange,Rp as inputSearch,$p as inputSwitch,Kp as inputText,Yp as keyboard,Xp as label,oh as link,sh as linkButton,hh as list,fh as listItem,gh as listItemButton,vh as mark,Th as menu,Oh as motion,Mh as orderedList,Bh as pagination,Wh as panelSection,Jh as paragraph,of as popover,Tr as popoverArrow,mf as preformated,hf as progress,Sf as rating,kf as ringProgress,Vr as row,Lf as scrollArea,Nf as segmented,Ff as select,Jf as selectBox,tg as selectItem,ag as selectList,cg as skeleton,pg as small,yg as spinner,xg as splitter,kg as splitterHandle,Eg as splitterPanel,Dg as stack,zg as steps,Ng as strong,Hg as subscript,Wg as superscript,Ug as table,ey as tabs,Ft as tag,iy as textarea,uy as timeline,dy as timelineItem,by as toast,Ey as toggleGroup,Dy as toolbar,Py as toolbarSpacer,My as tooltip,$y as transitionGroup,Fy as unorderedList,jy as visuallyHidden};
1
+ var wa=Object.defineProperty,Ta=Object.defineProperties;var Da=Object.getOwnPropertyDescriptors;var kn=Object.getOwnPropertySymbols;var Pa=Object.prototype.hasOwnProperty,Ia=Object.prototype.propertyIsEnumerable;var wn=(r,o,n)=>o in r?wa(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,E=(r,o)=>{for(var n in o||(o={}))Pa.call(o,n)&&wn(r,n,o[n]);if(kn)for(var n of kn(o))Ia.call(o,n)&&wn(r,n,o[n]);return r},O=(r,o)=>Ta(r,Da(o));import{toState as Tn}from"@domphy/core";import{themeColor as St,themeSize as Oa,themeSpacing as La}from"@domphy/theme";function Oc(r={}){var e,s;let o=Tn((e=r.color)!=null?e:"neutral","color"),n=Tn((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Oa(t),backgroundColor:t=>St(t),color:t=>St(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>St(t,"shift-7",o.get(t)),textUnderlineOffset:La(.72),cursor:"help","&:hover":{color:t=>St(t,"shift-11",n.get(t)),textDecorationColor:t=>St(t,"shift-9",n.get(t))}}}}import{toState as Pn}from"@domphy/core";import{themeColor as So,themeDensity as za,themeSpacing as Ra}from"@domphy/theme";import{themeColor as Dn}from"@domphy/theme";function S(r,o="primary"){let n=Dn(r,"surface"),e=Dn(r,"shift-9",o);return`0 0 0 2px ${n}, 0 0 0 4px ${e}`}function Nc(r={}){var s,t;let{type:o="single"}=r,n=Pn((s=r.color)!=null?s:"neutral","color"),e=Pn((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>Ra(za(a)*1.5),outline:a=>`1px solid ${So(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>So(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${So(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}import{toState as Va}from"@domphy/core";import{themeColor as vo,themeDensity as Co,themeSize as Ma,themeSpacing as vt}from"@domphy/theme";function Hc(r={}){var n;let o=Va((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:vt(3),paddingBlock:e=>vt(Co(e)*2),paddingInline:e=>vt(Co(e)*4),borderRadius:e=>vt(Co(e)*1.5),boxShadow:e=>`inset ${vt(1)} 0 0 0 ${vo(e,"shift-8",o.get(e))}`,backgroundColor:e=>vo(e,"inherit",o.get(e)),color:e=>vo(e,"shift-10",o.get(e)),fontSize:e=>Ma(e,"inherit")}}}import{toState as _a}from"@domphy/core";import{themeColor as xo,themeSize as Na,themeSpacing as In}from"@domphy/theme";function Wc(r={}){var n;let o=_a((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:In(9),height:In(9),fontSize:e=>Na(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>xo(e,"inherit",o.get(e)),color:e=>xo(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${xo(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as On}from"@domphy/core";import{themeColor as Eo,themeDensity as ko,themeSize as $a,themeSpacing as _t}from"@domphy/theme";function Uc(r={}){var s;let{label:o=999}=r,n=On(o),e=On((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>_t(ko(t)*(1.5/1.5)),minWidth:_t(5),height:t=>_t(ko(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>$a(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>_t(ko(t)*999),backgroundColor:t=>Eo(t,"shift-9",e.get(t)),color:t=>Eo(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${Eo(t,"shift-0",e.get(t))}`}}}}import{toState as Aa}from"@domphy/core";import{themeColor as wo,themeDensity as Ln,themeSize as Ba,themeSpacing as To}from"@domphy/theme";function Qc(r={}){var n;let o=Aa((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Ba(e,"inherit"),backgroundColor:e=>wo(e,"inherit",o.get(e)),color:e=>wo(e,"text",o.get(e)),boxShadow:e=>`inset ${To(1)} 0 0 0 ${wo(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>To(Ln(e)*2),paddingInline:e=>To(Ln(e)*4),margin:0}}}import{toState as Ha}from"@domphy/core";import{themeColor as Ct,themeSize as Fa,themeSpacing as zn}from"@domphy/theme";function nm(r={}){var e;let{separator:o="/"}=r,n=Ha((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>Fa(s,"inherit"),gap:zn(1),color:s=>Ct(s,"text",n.get(s)),backgroundColor:s=>Ct(s,"inherit",n.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>Ct(s,"text",n.get(s))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:s=>Ct(s,"shift-4",n.get(s)),paddingInlineStart:zn(1)},"& > [aria-current=page]":{color:s=>Ct(s,"shift-10",n.get(s)),pointerEvents:"none"}}}}import{toState as Ka}from"@domphy/core";import{themeColor as Do,themeSize as ja,themeSpacing as Rn}from"@domphy/theme";function sm(r={}){var n;let o=Ka((n=r.color)!=null?n:"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=>ja(e,"inherit"),paddingInline:Rn(1),border:"none",background:"none",cursor:"pointer",color:e=>Do(e,"text",o.get(e)),borderRadius:Rn(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>Do(e,"shift-10",o.get(e)),backgroundColor:e=>Do(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>S(e,o.get(e))}}}}import{toState as Ga}from"@domphy/core";import{themeColor as Y,themeDensity as At,themeSize as Ua,themeSpacing as Bt}from"@domphy/theme";var nt={small:"decrease-1",medium:"inherit",large:"increase-1"};import{toState as Wa}from"@domphy/core";import{themeColor as rt,themeDensity as Nt,themeSize as qa,themeSpacing as $t}from"@domphy/theme";var Ya={small:.5,medium:1,large:1.5};function Vn(r={}){var s,t,a;let o=Wa((s=r.color)!=null?s:"neutral","color"),n=Ya[(t=r.size)!=null?t:"medium"],e=nt[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>qa(i,e),paddingBlock:i=>$t(Nt(i)*n),paddingInline:i=>$t(Nt(i)*n),borderRadius:i=>$t(Nt(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>$t(Nt(i)*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:i=>rt(i,"text",o.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>rt(i,"text",o.get(i)),backgroundColor:i=>rt(i,"hover",o.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>rt(i,"text",o.get(i)),backgroundColor:i=>rt(i,"increase-2",o.get(i))},"&:focus-visible":{boxShadow:i=>S(i,o.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>rt(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Ja={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Cm(r={}){var a,i,m,u;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return Vn({color:r.color,size:r.size});let n=Ga((i=r.color)!=null?i:"primary","color"),e=o==="solid",s=Ja[(m=r.size)!=null?m:"medium"],t=nt[(u=r.size)!=null?u:"medium"];return O(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>Ua(l,t),paddingBlock:l=>Bt(At(l)*s.block),paddingInline:l=>Bt(At(l)*s.inline),borderRadius:l=>Bt(At(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>Bt(At(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${Y(l,"border-strong",n.get(l))}`,color:l=>e?Y(l,"shift-0","neutral"):Y(l,"shift-13",n.get(l)),backgroundColor:l=>e?Y(l,"shift-13",n.get(l)):Y(l,"inherit",n.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?Y(l,"shift-0","neutral"):Y(l,"shift-14",n.get(l)),backgroundColor:l=>e?Y(l,"shift-14",n.get(l)):Y(l,"hover",n.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?Y(l,"shift-15",n.get(l)):Y(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>Y(l,"shift-2","neutral"),outline:l=>`1px solid ${Y(l,"border-strong","neutral")}`,color:l=>Y(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}import{toState as Po}from"@domphy/core";import{themeColor as Ke,themeSize as Xa,themeSpacing as ee}from"@domphy/theme";function Dm(r={}){var t,a;let{checked:o=!1}=r,n=Po(o),e=Po((t=r.color)!=null?t:"neutral","color"),s=Po((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>n.get(i),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>Xa(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${Ke(i,"border",e.get(i))}`,minWidth:ee(12),minHeight:ee(6),borderRadius:ee(999),paddingLeft:ee(7),paddingRight:ee(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>Ke(i,"inherit",e.get(i)),color:i=>Ke(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:ee(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:ee(5),height:ee(5),borderRadius:ee(999),color:i=>Ke(i,"text"),backgroundColor:i=>Ke(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>Ke(i,"increase-3",s.get(i)),outline:"none",color:i=>Ke(i,"decrease-2"),paddingLeft:ee(2),paddingRight:ee(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${ee(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Qa}from"@domphy/core";import{themeColor as je,themeDensity as be,themeSpacing as ce}from"@domphy/theme";var Za={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 R(r){return Za[r]}function Rm(r={}){var n;let o=Qa((n=r.color)!=null?n:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>ce(be(e)*2),backgroundColor:e=>je(e,"inherit",o.get(e)),color:e=>je(e,"shift-10",o.get(e)),outline:e=>`1px solid ${je(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:R("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>ce(be(e)*2),paddingInline:e=>ce(be(e)*4),fontWeight:"600",color:e=>je(e,"shift-11",o.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>ce(be(e)*4),paddingBottom:e=>ce(be(e)*2),color:e=>je(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>ce(be(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>ce(be(e)*4),color:e=>je(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:ce(2),paddingBlock:e=>ce(be(e)*2),paddingInline:e=>ce(be(e)*4),borderTop:e=>`1px solid ${je(e,"border",o.get(e))}`}}}}import{toState as ei}from"@domphy/core";import{themeColor as Mn,themeDensity as Io,themeSize as ti,themeSpacing as Oo}from"@domphy/theme";function Nm(r={}){var n;let o=ei((n=r.color)!=null?n:"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=>ti(e,"inherit"),color:e=>Mn(e,"text",o.get(e)),backgroundColor:e=>Mn(e,"inherit",o.get(e)),height:e=>Oo(Io(e)*(6/1.5)),paddingInline:e=>Oo(Io(e)*(1.5/1.5)),borderRadius:e=>Oo(Io(e)*(1/1.5))}}}import{behavior as Ci,merge as zo,toState as Kt}from"@domphy/core";import{themeColor as De,themeDensity as jt,themeSize as An,themeSpacing as Pe}from"@domphy/theme";import{behavior as ri,merge as ai}from"@domphy/core";import{autoUpdate as ii,computePosition as li,flip as si,offset as ci,shift as mi}from"@domphy/floating";import{effect as _n,toState as oi}from"@domphy/core";function ni(r){return typeof r.set=="function"}function Se(r,o,n=!0){if(typeof r.addListener=="function")return n&&o(r.get()),r.addListener(o);if(n)return _n(()=>{o(r.get())});let e=!0,s=_n(()=>{let t=r.get();e||o(t)});return e=!1,s}function Lo(r,o){ni(r)&&r.set(o)}function we(r,o){o==null||o(),Lo(r,!1)}function at(r){return oi(r!=null?r:!1)}function J(r,o){return`domphy-${r}-${o.nodeId}`}function ui(r,o){var ge,le,Fe,ye;let{openState:n,onDismiss:e,placement:s,content:t,keepOpenOnContentHover:a}=o,{kind:i}=o,m=`floating:${i}`,u=null,l=null,c=null,d=null,f=!1,h=r.domElement,C=r.getRoot(),v=J(i,r),p={style:{position:"fixed",pointerEvents:"auto",visibility:L=>n.get(L)?"visible":"hidden"},onKeyDown:L=>{L.key==="Escape"&&V()},onMouseEnter:()=>a&&w(),onMouseLeave:()=>a&&V(),_onMount:L=>{var A;if(c=L.domElement,c.id||(c.id=v),h&&c&&!c.hasAttribute("data-theme")){let se=(A=h.closest("[data-theme]"))==null?void 0:A.getAttribute("data-theme");se&&c.setAttribute("data-theme",se)}},_portal:L=>{let A=h.closest("dialog");if(A){let Z=A.querySelector(":scope > #domphy-floating");return Z||(Z=A.ownerDocument.createElement("div"),Z.id="domphy-floating",Object.assign(Z.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),A.appendChild(Z)),Z}let se=L.domElement.querySelector("#domphy-floating");if(!se){let Z={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};se=L.children.insert(Z).domElement}return se}},b=L=>ai(L,p);b(t);let k=()=>{f||(f=!0,d=C.children.insert(t),d._behaviorInstances.set(m,U))},g=()=>{f&&(!c||!c.isConnected)&&(l==null||l(),l=null,d=null,c=null,f=!1),k(),h&&c&&(l==null||l(),l=ii(h,c,()=>{li(h,c,{placement:s.get(),middleware:[ci(12),si(),mi()],strategy:"fixed"}).then(({x:L,y:A,placement:se})=>{c&&(Object.assign(c.style,{left:`${L}px`,top:`${A}px`}),s.set(se))})}),Lo(n,!0))},D=()=>{l==null||l(),l=null,d&&(d.remove(),d=null),c=null,f=!1,we(n,e)},w=()=>{u&&clearTimeout(u),u=setTimeout(g,100)},V=()=>{u&&clearTimeout(u),u=setTimeout(D,100)},j=L=>{if(!n.get()||!h||!c)return;let A=L.target;!h.contains(A)&&!c.contains(A)&&V()};(ge=C.domElement)==null||ge.addEventListener("click",j);let G=L=>{L.key==="Escape"&&n.get()&&V()},M=(ye=(Fe=(le=C.domElement)==null?void 0:le.ownerDocument)!=null?Fe:C.domElement)!=null?ye:null;M==null||M.addEventListener("keydown",G);let ne=L=>{L?f||g():f&&D()},N=()=>{},W=!1,ie=!1,U,He=L=>{var A;L._behaviors=O(E({},(A=L._behaviors)!=null?A:{}),{[m]:{attach:()=>U,props:{}}})};return U={show:w,hide:V,panelId:v,update(L){if(!ie&&(e=L.onDismiss,L.openState!==n&&(N(),n=L.openState,N=Se(n,ne,!1),n.get()&&g()),s=L.placement,t=L.content,a=L.keepOpenOnContentHover,b(t),He(t),d)){ie=!0;try{d.patch(t)}finally{ie=!1}}},destroy(){var L;W||(W=!0,u&&clearTimeout(u),u=null,l==null||l(),l=null,d==null||d.remove(),d=null,c=null,f=!1,N(),N=()=>{},(L=C.domElement)==null||L.removeEventListener("click",j),M==null||M.removeEventListener("keydown",G))}},He(t),N=Se(n,ne),U}function me(r){let{kind:o,placement:n,onDismiss:e}=r,s=at(r.open),t=`floating:${o}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},ri(t,ui,{kind:o,openState:s,onDismiss:e,placement:n,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}import{behavior as di,ElementNode as pi,rawHtml as hi,toState as fi}from"@domphy/core";import{themeColor as Ht,themeDensity as We,themeSize as gi,themeSpacing as Te}from"@domphy/theme";var yi='<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>',xt=1.5,bi=6/xt,Nn=2.5/xt,Si=1/xt,$n=4/xt,vi=1/xt;function Ft(r={}){var e;let{removable:o=!1}=r,n=fi((e=r.color)!=null?e:"neutral","color");return O(E({dataTone:"shift-2"},di("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:hi(yi),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>Te(We(l)*vi),width:l=>Te(We(l)*$n),height:l=>Te(We(l)*$n),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>Ht(l,"shift-4",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof pi&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:o})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>Te(We(s)*bi),paddingBlock:0,borderRadius:s=>Te(We(s)*999),paddingInlineStart:s=>Te(We(s)*Nn),paddingInlineEnd:s=>Te(We(s)*(o?Si:Nn)),gap:Te(1.5),fontSize:s=>gi(s,"decrease-1"),backgroundColor:s=>Ht(s,"inherit",n.get(s)),color:s=>Ht(s,"text",n.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${Ht(s,"border-strong",n.get(s))}`}})}function nu(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=Kt(r.value),i=Kt(s),{show:m,hide:u,anchorPartial:l}=me({kind:"combobox",open:i,onDismiss:r.onDismiss,placement:Kt(n),content:r.content}),c={onClick:(g,D)=>!t&&u(D),dataTone:"shift-0",style:{backgroundColor:g=>De(g,"inherit"),color:g=>De(g,"text"),borderRadius:g=>Pe(jt(g)*2),outline:g=>`1px solid ${De(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:R("medium")}};zo(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:Pe(6),marginInlineStart:Pe(2),fontSize:g=>An(g,"inherit"),color:g=>De(g,"text",e),backgroundColor:g=>De(g,"inherit",e)},f=g=>{var D,w;return(w=(D=g==null?void 0:g.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:w.query},h=g=>{let D=g;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return g},C={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:g=>i.get(g),ariaControls:g=>g!=null&&g.elementNode?J("combobox",h(g.elementNode)):void 0},v=g=>g?(zo(g,E({onFocus:(D,w)=>m(w),style:d,_key:"combobox-input"},C)),g):E({input:null,ariaLabel:"Filter options",onFocus:(D,w)=>m(w),value:D=>{var w,V;return(V=(w=f(D))==null?void 0:w.get(D))!=null?V:""},onInput:(D,w)=>{var V;(V=w.getBehavior("comboboxInner"))==null||V.query.set(D.target.value)},style:d,_key:"combobox-input"},C),p=g=>({div:D=>{i.get(D);let w=g.state.get(D),V=Array.isArray(w)?w:[w],G=g.options.filter(M=>V.includes(M.value)).map(M=>({span:M.label,$:[Ft({color:g.color,removable:!0})],_key:M.value,_onRemove:ne=>{let N=g.state.get(),ie=(Array.isArray(N)?N:[N]).filter(U=>U!==M.value);g.multiple?g.state.set(ie):g.state.set(ie[0])}}));return G.push(v(g.input)),G},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:Pe(1)}}),k=O(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,D)=>{D[g.tagName]=[p({options:o,multiple:t,color:e,state:a,input:r.input})]}},Ci("comboboxInner",(g,D)=>{let w=g.getMetadata("comboboxQuery");return w||(w=Kt(""),g.setMetadata("comboboxQuery",w)),{query:w,update(V){g.children.update([p(V)])}}},{options:o,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:Pe(32),outlineOffset:"-1px",outline:g=>`1px solid ${De(g,"border-strong","neutral")}`,paddingBlock:g=>Pe(jt(g)*1),paddingInline:g=>Pe(jt(g)*1),borderRadius:g=>Pe(jt(g)*1.5),fontSize:g=>An(g,"inherit"),color:g=>De(g,"text",e),backgroundColor:g=>De(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>S(g,e)}}});return zo(l,k),l}import{merge as xi,toState as Ei}from"@domphy/core";import{themeColor as ve,themeDensity as Wt,themeSize as Bn,themeSpacing as qt}from"@domphy/theme";function cu(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,o)=>{xi(o,{_context:{command:{query:Ei("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function mu(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>Bn(e,"inherit"),paddingInline:e=>qt(Wt(e)*3),paddingBlock:e=>qt(Wt(e)*2),border:"none",borderBottom:e=>`1px solid ${ve(e,"border",o)}`,outline:"none",color:e=>ve(e,"shift-10",o),backgroundColor:e=>ve(e,"inherit",o),"&::placeholder":{color:e=>ve(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>ve(e,"shift-6",n),boxShadow:e=>S(e,n)}}}}function uu(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>Bn(e,"inherit"),height:e=>qt(6+Wt(e)*2),paddingInline:e=>qt(Wt(e)*3),border:"none",outline:"none",color:e=>ve(e,"shift-13",o),backgroundColor:e=>ve(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>ve(e,"shift-13",o),backgroundColor:e=>ve(e,"hover",o)},"&:focus-visible":{boxShadow:e=>S(e,n)}}}}import{behavior as ki,merge as wi,toState as ue}from"@domphy/core";import{themeColor as F,themeDensity as Ti,themeSize as it,themeSpacing as B}from"@domphy/theme";var H=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),qe=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Ro=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Et=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Vo=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Mo=(r,o)=>qe(r,-((r.getDay()-o+7)%7));function Di(r){var o,n;try{let e=new Intl.Locale(r),s=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function Pi(r,o){let n=o,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(n),{update(a){a.selectionIsCallerOwned||t(a.selection,n.selection),t(a.viewYear,n.viewYear),t(a.viewMonth,n.viewMonth),t(a.focused,n.focused),t(a.hovered,n.hovered),t(a.hour,n.hour),t(a.minute,n.minute),t(a.open,n.open),(a.selection!==n.selection||a.onChange!==n.onChange)&&s(a),n=a},destroy(){e==null||e(),e=null}}}function bu(r={}){var vn,Cn,xn,En;let{mode:o="single",time:n=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(vn=r.weekStartsOn)!=null?vn:Di(a),l=ue((Cn=r.accentColor)!=null?Cn:"primary","accentColor"),c=ue((xn=r.placement)!=null?xn:"bottom-start"),d=ue((En=r.value)!=null?En:o==="range"?[null,null]:null),f=(()=>{let y=d.get(),x=o==="range"?y==null?void 0:y[0]:y;return x instanceof Date?x:new Date})(),h=ue(f.getFullYear(),"viewYear"),C=ue(f.getMonth(),"viewMonth"),v=ue(H(f),"focused"),p=ue(null,"hovered"),b=ue(f.getHours(),"hour"),k=ue(f.getMinutes(),"minute"),g=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),w=new Intl.DateTimeFormat(a,{weekday:"short"}),V=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=y=>y?g.format(y):"",G=y=>{if(i)return i(y);if(o==="range"){let[x,T]=y!=null?y:[null,null];return x?`${j(x)} \u2013 ${j(T)}`:""}return j(y)},M=Array.from({length:7},(y,x)=>w.format(new Date(2023,0,1+(x+u)%7))),ne=y=>!!e&&H(y)<H(e)||!!s&&H(y)>H(s)||!!t&&t(y),N=y=>{if(!n)return H(y);let x=H(y);return x.setHours(b.get(),k.get(),0,0),x},W=(y,x)=>{var P;if(ne(y))return;if(o==="single"){d.set(N(y)),n||Z(x);return}let[T,I]=(P=d.get())!=null?P:[null,null];!T||T&&I?d.set([N(y),null]):H(y)<H(T)?(d.set([N(y),N(T)]),n||Z(x)):(d.set([T,N(y)]),n||Z(x))},ie=()=>{var y;if(n)if(o==="single"){let x=d.get();x&&d.set(N(x))}else{let[x,T]=(y=d.get())!=null?y:[null,null];d.set([x&&N(x),T&&N(T)])}},U=(y,x)=>{var ot;if(o!=="range")return!1;let[T,I]=(ot=d.get(x))!=null?ot:[null,null],P=I!=null?I:p.get(x);if(!T||!P)return!1;let z=H(T)<=H(P)?T:P,Q=H(T)<=H(P)?P:T,q=H(y);return q>=H(z)&&q<=H(Q)},He=(y,x)=>{let T=d.get(x);if(o==="range"){let[I,P]=T!=null?T:[null,null];return Et(y,I)||Et(y,P)}return Et(y,T)},ge=y=>{h.set(y.getFullYear()),C.set(y.getMonth())},le=y=>{let x=Ro(new Date(h.get(),C.get(),1),y);ge(x)},Fe=y=>h.set(h.get()+y),ye=y=>{var T;let x=(T=y==null?void 0:y.getRoot())==null?void 0:T.domElement;setTimeout(()=>{var I;(I=x==null?void 0:x.querySelector(`[data-date="${Vo(v.get())}"]`))==null||I.focus()},0)},L=ba(),A=ue(!1),{show:se,hide:Z,anchorPartial:yo}=me({kind:"datePicker",open:A,placement:c,content:L}),ga=E({type:"text",readonly:!0,value:y=>G(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>A.get(y),ariaControls:y=>y!=null&&y.elementNode?J("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,x)=>{bo(x)},onFocus:(y,x)=>{bo(x)},onKeyDown:(y,x)=>{let T=y.key;(T==="ArrowDown"||T==="Enter")&&(y.preventDefault(),bo(x))}},ki("datePicker",Pi,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:h,viewMonth:C,focused:v,hovered:p,hour:b,minute:k,open:A,onChange:m}));function bo(y){var T;let x=(T=ya())!=null?T:new Date;v.set(H(x)),ge(x),se(y),ye(y)}function ya(){var x;let y=d.get();return o==="range"?(x=y==null?void 0:y[0])!=null?x:null:y!=null?y:null}return wi(yo,ga),yo;function ba(){let y=(z,Q,q)=>({button:z,type:"button",ariaLabel:Q,onClick:q,style:Ii()}),x={div:[y("\xAB","Previous year",()=>Fe(-1)),y("\u2039","Previous month",()=>le(-1)),{div:z=>D.format(new Date(h.get(z),C.get(z),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:z=>it(z)}},y("\u203A","Next month",()=>le(1)),y("\xBB","Next year",()=>Fe(1))],style:{display:"flex",alignItems:"center",gap:B(1),marginBottom:B(2)}},T={div:M.map((z,Q)=>({div:z,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:q=>it(q,"decrease-1"),fontWeight:"bold",color:q=>F(q,"shift-7"),paddingBlock:B(1)},_key:Q})),role:"row",style:Hn()},I={div:z=>Sa(z),role:"grid",ariaLabel:"Calendar",onKeyDown:Ea,onMouseLeave:()=>o==="range"&&p.set(null),style:{display:"flex",flexDirection:"column",gap:B(.5)}},P=[x,T,I];return n&&P.push(Ca()),P.push(xa()),{div:P,role:"dialog",ariaModal:"false",dataTone:"shift-0",style:{minWidth:B(70),padding:B(3),borderRadius:z=>B(Ti(z)*2),backgroundColor:z=>F(z,"inherit"),color:z=>F(z,"text"),outline:z=>`1px solid ${F(z,"border-strong")}`,outlineOffset:"-1px",boxShadow:R("medium")}}}function Sa(y){let x=new Date(h.get(y),C.get(y),1),T=C.get(y),I=Mo(x,u),P=[];for(let z=0;z<6;z++){let Q=[];for(let q=0;q<7;q++){let ot=qe(I,z*7+q);Q.push(va(ot,T,y))}P.push({div:Q,role:"row",style:Hn(),_key:z})}return P}function va(y,x,T){let I=ne(y),P=He(y,T),z=U(y,T),Q=y.getMonth()!==x,q=Et(y,v.get(T)),ot=Et(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:q?0:-1,ariaSelected:P,ariaDisabled:I,disabled:I,ariaLabel:V.format(y),dataDate:Vo(y),onClick:(_,ka)=>W(y,ka),onMouseEnter:()=>o==="range"&&p.set(y),style:{appearance:"none",border:"none",cursor:I?"not-allowed":"pointer",aspectRatio:"1",borderRadius:B(1),fontSize:_=>it(_),fontFamily:"inherit",opacity:I?.35:Q?.5:1,backgroundColor:_=>P?F(_,"shift-7",l.get(_)):z?F(_,"hover",l.get(_)):"transparent",color:_=>P?F(_,"shift-0",l.get(_)):F(_,"text"),outline:ot?_=>`1px solid ${F(_,"shift-6",l.get(_))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:_=>P?F(_,"shift-7",l.get(_)):F(_,"shift-3",l.get(_))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:_=>S(_,l.get(_))}},_key:Vo(y)}}function Ca(){let y=(x,T,I)=>({select:Array.from({length:x},(P,z)=>({option:String(z).padStart(2,"0"),value:String(z),selected:Q=>T.get(Q)===z,_key:z})),ariaLabel:I,onChange:P=>{T.set(Number(P.target.value)),ie()},style:Oi()});return{div:[y(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},y(60,k,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:B(1),marginTop:B(3)}}}function xa(){let y=(x,T)=>({button:x,type:"button",onClick:(I,P)=>T(P),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:I=>it(I,"decrease-1"),color:I=>F(I,"muted",l.get(I)),padding:B(1)}});return{div:[y("Today",x=>{let T=new Date;v.set(H(T)),ge(T),ye(x)}),y("Clear",()=>{d.set(o==="range"?[null,null]:null),p.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:B(2),paddingTop:B(2),borderTop:x=>`1px solid ${F(x,"border")}`}}}function Ea(y,x){let T=y,I=v.get(),P=null;switch(T.key){case"ArrowLeft":P=qe(I,-1);break;case"ArrowRight":P=qe(I,1);break;case"ArrowUp":P=qe(I,-7);break;case"ArrowDown":P=qe(I,7);break;case"Home":P=Mo(I,u);break;case"End":P=qe(Mo(I,u),6);break;case"PageUp":P=Ro(I,T.shiftKey?-12:-1);break;case"PageDown":P=Ro(I,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),W(I,x);return;default:return}T.preventDefault(),v.set(P),ge(P),ye(x)}}function Hn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:B(.5)}}function Ii(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>it(r),color:r=>F(r,"muted"),width:B(7),height:B(7),borderRadius:B(1),"&:hover":{backgroundColor:r=>F(r,"shift-3")}}}function Oi(){return{fontFamily:"inherit",fontSize:r=>it(r),padding:B(1),borderRadius:B(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${F(r,"border-strong")}`,backgroundColor:r=>F(r,"inherit"),color:r=>F(r,"text")}}import{toState as Li}from"@domphy/core";import{themeColor as Fn,themeSize as Kn,themeSpacing as jn}from"@domphy/theme";function Eu(r={}){var n;let o=Li((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${jn(24)}, max-content) 1fr`,columnGap:jn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>Kn(e,"inherit"),color:e=>Fn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>Kn(e,"inherit"),color:e=>Fn(e,"text",o.get(e))}}}}import{toState as Wn}from"@domphy/core";import{themeColor as Ye,themeDensity as kt,themeSize as qn,themeSpacing as te}from"@domphy/theme";function Pu(r={}){var s,t;let{duration:o=240}=r,n=Wn((s=r.color)!=null?s:"neutral","color"),e=Wn((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>qn(a,"inherit"),color:a=>Ye(a,"text",n.get(a)),backgroundColor:a=>Ye(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>Ye(a,"shift-2",n.get(a)),color:a=>Ye(a,"shift-10",n.get(a)),fontSize:a=>qn(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:te(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>te(kt(a)*4),height:te(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:te(2),height:te(2),flexShrink:0,marginTop:te(-.5),borderInlineEnd:a=>`${te(.5)} solid ${Ye(a,"shift-9",n.get(a))}`,borderBottom:a=>`${te(.5)} solid ${Ye(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>Ye(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>te(kt(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>te(kt(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>te(kt(a)*1),paddingBottom:a=>te(kt(a)*3)}}}}import{behavior as zi}from"@domphy/core";import{themeColor as _o,themeDensity as Yn,themeSize as Ri,themeSpacing as Gn}from"@domphy/theme";var wt=0;function Yt(){wt++,wt===1&&(document.body.style.overflow="hidden")}function lt(){wt=Math.max(0,wt-1),wt===0&&(document.body.style.overflow="")}var Un='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function Vi(r,o){let{state:n,onDismiss:e}=o,s=null,t=!1,a=!1,i=null,m=r.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(lt(),a=!1),s==null||s.focus(),s=null},l=h=>{if(h.key!=="Tab")return;let C=Array.from(m.querySelectorAll(Un)).filter(b=>!b.closest("[aria-hidden='true']")&&b.offsetParent!==null);if(!C.length){h.preventDefault();return}let v=C[0],p=C[C.length-1];h.shiftKey?(document.activeElement===v||document.activeElement===m)&&(h.preventDefault(),p.focus()):document.activeElement===p&&(h.preventDefault(),v.focus())},c=h=>{h.preventDefault(),we(n,e)};m.addEventListener("cancel",c);let d=h=>{if(h)t=!1,i&&(clearTimeout(i),i=null),s=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(Yt(),a=!0),m.addEventListener("keydown",l),requestAnimationFrame(()=>{m.style.opacity="1";let C=m.querySelector(Un);C==null||C.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",l),!m.open){u();return}i=setTimeout(()=>{i=null,t&&u()},350)}},f=Se(n,d);return{requestClose:()=>we(n,e),onTransitionEnd:h=>{t&&h.target===m&&h.propertyName==="opacity"&&u()},update(h){e=h.onDismiss,h.state!==n&&(f(),n=h.state,f=Se(n,d,!1))},destroy(){i&&(clearTimeout(i),i=null),f(),m.removeEventListener("cancel",c),a&&(lt(),a=!1),m.removeEventListener("keydown",l),s==null||s.focus(),s=null}}}function _u(r={}){let{color:o="neutral",open:n=!1,labelledBy:e,describedBy:s,onDismiss:t}=r,a=at(n);return O(E({_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},zi("dialog",Vi,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(i,m)=>{var c;if(i.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();i.clientX>=u.left&&i.clientX<=u.right&&i.clientY>=u.top&&i.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(i,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(i)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:i=>Ri(i,"inherit"),color:i=>_o(i,"shift-10",o),backgroundColor:i=>_o(i,"inherit",o),border:"none",borderRadius:i=>Gn(Yn(i)*2),padding:i=>Gn(Yn(i)*3),boxShadow:R("high"),"&::backdrop":{backgroundColor:i=>_o(i,"shift-2","neutral"),opacity:.75}}})}import{toState as Mi}from"@domphy/core";import{themeColor as Gt,themeSize as _i,themeSpacing as Ni}from"@domphy/theme";function Hu(r={}){var n;let o=Mi((n=r.color)!=null?n:"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:Ni(2),fontSize:e=>_i(e,"inherit"),backgroundColor:e=>Gt(e),color:e=>Gt(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Gt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Gt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{behavior as $i}from"@domphy/core";import{themeColor as No,themeDensity as Ai,themeSize as Bi,themeSpacing as Tt}from"@domphy/theme";var $o={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Jn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},st=r=>r==="left"||r==="right";function Xn(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function Hi(r,o){let{state:n,onDismiss:e,placement:s,size:t}=o,a=r.domElement;a.setAttribute("aria-modal","true");let i=p=>{p.preventDefault(),we(n,e)};a.addEventListener("cancel",i);let m=(p,b)=>{let g=(p==="start"||p==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),D=Xn(p,g),w=b!=null?b:st(D)?Tt(80):Tt(64);return a.style.margin=Jn[D],a.style.width=st(D)?w:"100dvw",a.style.height=st(D)?"100dvh":w,D},u=m(s,t),l=!1,c=!1,d=null,f=()=>{d=null,l&&(l=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(lt(),c=!1))},h=p=>{p.target===a&&p.propertyName==="transform"&&f()};a.addEventListener("transitionend",h);let C=p=>{if(p)l=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(Yt(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(l=!0,a.style.transform=$o[u],!a.open){f();return}d=setTimeout(f,350)}},v=Se(n,C);return{requestClose:()=>we(n,e),update(p){e=p.onDismiss,p.state!==n&&(v(),n=p.state,v=Se(n,C,!1)),(p.placement!==s||p.size!==t)&&(s=p.placement,t=p.size,u=m(s,t),n.get()||(a.style.transform=$o[u]))},destroy(){d&&(clearTimeout(d),d=null),v(),a.removeEventListener("cancel",i),a.removeEventListener("transitionend",h),c&&(lt(),c=!1)}}}function Gu(r={}){let{color:o="neutral",open:n=!1,onDismiss:e,placement:s="end",size:t}=r,a=at(n),i=Xn(s,!1),m=st(i)?Tt(80):Tt(64),u=t!=null?t:m;return O(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},$i("drawer",Hi,{state:a,onDismiss:e,placement:s,size:t})),{onClick:(l,c)=>{var h;if(l.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();l.clientX>=d.left&&l.clientX<=d.right&&l.clientY>=d.top&&l.clientY<=d.bottom||(h=c.getBehavior("drawer"))==null||h.requestClose()},style:{transform:$o[i],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:l=>Bi(l,"inherit"),color:l=>No(l,"shift-10",o),backgroundColor:l=>No(l,"inherit",o),border:"none",padding:l=>Tt(Ai(l)*3),margin:Jn[i],width:st(i)?u:"100dvw",height:st(i)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:R("high"),"&::backdrop":{backgroundColor:l=>No(l,"shift-2","neutral"),opacity:.75}}})}import{toState as Fi}from"@domphy/core";import{themeColor as Ki,themeSize as ji}from"@domphy/theme";function Qu(r={}){var n;let o=Fi((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>ji(e,"inherit"),fontStyle:"italic",color:e=>Ki(e,"shift-10",o.get(e))}}}import{toState as Wi}from"@domphy/core";import{themeColor as Ao,themeSpacing as Bo}from"@domphy/theme";function nd(r={}){var n;let o=Wi((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:Bo(3),paddingBlock:Bo(12),paddingInline:Bo(6),textAlign:"center",color:e=>Ao(e,"muted",o.get(e)),"& > :first-child":{color:e=>Ao(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>Ao(e,"text",o.get(e))}}}}var Ho="errorBoundaryOriginal";function qi(r){var n;let o=r.getMetadata(Ho);if(typeof o=="function"){(n=r._childrenRelease)==null||n.call(r),r._setupFunctionChildren(o);return}if(o!=null){r.children.update(Array.isArray(o)?o:[o]);return}r.children.update([])}function ad(r={}){return{_onSchedule:(o,n)=>{o.getMetadata(Ho)===void 0&&o.setMetadata(Ho,n[o.tagName])},_onError:(o,n)=>{var t,a;(t=r.onError)==null||t.call(r,n);let e=()=>qi(o),s=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([s])}}}import{toState as Yi}from"@domphy/core";import{themeColor as Ut,themeSize as Gi,themeSpacing as Ui}from"@domphy/theme";var Ji={small:8,medium:10,large:14};function ud(r={}){var e,s;let o=Yi((e=r.color)!=null?e:"primary","color"),n=Ui(Ji[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>Gi(t,"inherit"),backgroundColor:t=>Ut(t,"shift-13",o.get(t)),color:t=>Ut(t,"shift-0","neutral"),boxShadow:R("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>Ut(t,"shift-14",o.get(t)),boxShadow:R("medium")},"&:active:not([disabled])":{backgroundColor:t=>Ut(t,"shift-15",o.get(t)),boxShadow:R("low")},"&:focus-visible":{boxShadow:t=>`${R("medium")}, ${S(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Xi}from"@domphy/core";import{themeColor as Zn,themeSize as Zi,themeSpacing as Jt}from"@domphy/theme";function fd(r={}){var n;let o=Xi((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Jt(2),marginInline:0,marginTop:Jt(3),marginBottom:Jt(3),color:e=>Zn(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Jt(2)},"& figcaption":{fontSize:e=>Zi(e,"decrease-1"),color:e=>Zn(e,"muted",o.get(e)),lineHeight:1.45}}}}import{toState as Qi}from"@domphy/core";import{themeColor as Dt,themeDensity as ct,themeSize as Fo,themeSpacing as Ce}from"@domphy/theme";function Sd(r={}){var s;let{layout:o="horizontal"}=r,n=Qi((s=r.color)!=null?s:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>Ce(ct(t)*3),paddingBlock:t=>Ce(ct(t)*3),border:"none",borderRadius:t=>Ce(ct(t)*2),fontSize:t=>Fo(t,"inherit"),backgroundColor:t=>Dt(t,"inherit",n.get(t)),color:t=>Dt(t,"text",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:Ce(4),rowGap:Ce(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>Fo(t,"inherit"),fontWeight:600,paddingBlock:t=>Ce(ct(t)*1),borderRadius:t=>Ce(ct(t)*2),color:t=>Dt(t,"text",n.get(t)),backgroundColor:t=>Dt(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:Ce(ct(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(${Ce(2)} * -1)`,fontSize:t=>Fo(t,"decrease-1"),color:t=>Dt(t,"text",n.get(t))}}}}import{themeDensity as el,themeSpacing as tl}from"@domphy/theme";function xd(r={}){let{columns:o=1,gap:n=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof o=="number"?`repeat(${o}, minmax(0, 1fr))`:o,gap:s=>tl(el(s)*n)},e?{alignItems:e}:{})}}import{toState as ol}from"@domphy/core";import{themeColor as nl,themeSize as Qn,themeSpacing as rl}from"@domphy/theme";var al={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Dd(r={}){var e;let o=ol((e=r.color)!=null?e:"neutral","color"),n=r.size;return{_onInsert:s=>{["h1","h2","h3","h4","h5","h6"].includes(s.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:s=>nl(s,"shift-11",o.get(s)),marginTop:0,marginBottom:rl(2),fontSize:s=>{if(n!==void 0)return Qn(s,n);let t=al[s.elementNode.tagName]||"inherit";return Qn(s,t)}}}}import{toState as il}from"@domphy/core";import{themeColor as er,themeSpacing as tr}from"@domphy/theme";function Ld(r={}){var n;let o=il((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:tr(3),marginBottom:tr(3),backgroundColor:e=>er(e,"inherit",o.get(e)),color:e=>er(e,"text",o.get(e))}}}import{toState as ll}from"@domphy/core";import{themeColor as sl,themeSize as cl,themeSpacing as or}from"@domphy/theme";function Md(r={}){var n;let o=ll((n=r.color)!=null?n:"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:or(4),height:or(4),flexShrink:"0",fontSize:e=>cl(e),backgroundColor:"transparent",color:e=>sl(e,"text",o.get(e))}}}import{toState as ml}from"@domphy/core";import{themeColor as nr,themeSpacing as ul}from"@domphy/theme";function Ad(r={}){var n;let o=ml((n=r.color)!=null?n:"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:ul(2),backgroundColor:e=>nr(e,"inherit",o.get(e)),color:e=>nr(e,"text",o.get(e))}}}import{toState as rr}from"@domphy/core";import{themeColor as X,themeSize as dl,themeSpacing as Ge}from"@domphy/theme";function jd(r={}){var e,s;let o=rr((e=r.color)!=null?e:"neutral","color"),n=rr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>dl(t,"inherit"),color:t=>X(t,"text",o.get(t)),display:"inline-flex",position:"relative",width:Ge(6),height:Ge(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:Ge(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${X(t,"border-strong",o.get(t))}`,color:t=>X(t,"text",o.get(t)),width:Ge(4),height:Ge(4)},"&:hover::before":{backgroundColor:t=>X(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${X(t,"shift-6",n.get(t))}`,backgroundColor:t=>X(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>X(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${Ge(.5)} solid ${X(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${X(t,"shift-6",n.get(t))}`,backgroundColor:t=>X(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>X(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>X(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:Ge(1.5),boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>X(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as pl}from"@domphy/core";import{themeColor as Ko,themeDensity as mt,themeSize as hl,themeSpacing as ut}from"@domphy/theme";function Ud(r={}){var n;let o=pl((n=r.color)!=null?n:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>hl(e,"inherit"),color:e=>Ko(e,"text",o.get(e)),paddingBlock:e=>ut(mt(e)*1),paddingInline:e=>ut(mt(e)*1),blockSize:e=>ut(6+mt(e)*2),inlineSize:e=>ut(6+mt(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>ut(mt(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>ut(mt(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>Ko(e,"shift-2","neutral"),outline:e=>`1px solid ${Ko(e,"border-strong","neutral")}`}}}}import{toState as ar}from"@domphy/core";import{themeColor as Ie,themeDensity as jo,themeSize as fl,themeSpacing as Xt}from"@domphy/theme";function ep(r={}){var s,t;let{mode:o="datetime-local"}=r,n=ar((s=r.color)!=null?s:"neutral","color"),e=ar((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>fl(a,"inherit"),lineHeight:"inherit",color:a=>Ie(a,"text",n.get(a)),backgroundColor:a=>Ie(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Ie(a,"border-strong",n.get(a))}`,borderRadius:a=>Xt(jo(a)*1.5),paddingInline:a=>Xt(jo(a)*3),height:a=>Xt(6+jo(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 ${Ie(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>Ie(a,"muted","neutral"),backgroundColor:a=>Ie(a,"shift-2","neutral"),outline:a=>`1px solid ${Ie(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${Xt(.5)} solid ${Ie(a,"shift-6","error")}`}}}}import{toState as ir}from"@domphy/core";import{themeColor as re,themeDensity as Zt,themeSize as gl,themeSpacing as Ue}from"@domphy/theme";function ap(r={}){var e,s;let o=ir((e=r.color)!=null?e:"neutral","color"),n=ir((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>gl(t,"inherit"),lineHeight:"inherit",color:t=>re(t,"text",o.get(t)),backgroundColor:t=>re(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${re(t,"border-strong",o.get(t))}`,borderRadius:t=>Ue(Zt(t)*1.5),height:t=>Ue(6+Zt(t)*2),paddingInline:t=>Ue(Zt(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>Ue(Zt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:Ue(1),height:Ue(6),paddingInline:Ue(2),cursor:"pointer",color:t=>re(t,"shift-11",o.get(t)),backgroundColor:t=>re(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${re(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>re(t,"muted","neutral"),outline:t=>`1px solid ${re(t,"border-strong","neutral")}`,backgroundColor:t=>re(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>re(t,"muted","neutral"),backgroundColor:t=>re(t,"shift-3","neutral")}}}}import{toState as lr}from"@domphy/core";import{themeColor as Je,themeDensity as Qt,themeSize as yl,themeSpacing as Pt}from"@domphy/theme";function mp(r={}){var e,s;let o=lr((e=r.color)!=null?e:"neutral","color"),n=lr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Pt(10),paddingInlineStart:t=>Pt(Qt(t)*3),paddingInlineEnd:t=>Pt(Qt(t)*1.5),paddingBlock:t=>Pt(Qt(t)*1),borderRadius:t=>Pt(Qt(t)*1.5),fontSize:t=>yl(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Je(t,"border-strong",o.get(t))}`,color:t=>Je(t,"text",o.get(t)),backgroundColor:t=>Je(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 ${Je(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Je(t,"shift-2","neutral"),outline:t=>`1px solid ${Je(t,"border-strong","neutral")}`,color:t=>Je(t,"muted","neutral")}}}}import{themeSpacing as sr}from"@domphy/theme";function pp(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:sr(2),"& > *":{minWidth:`${sr(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let i=n(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=n(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,f,h;a.preventDefault();let i=(f=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?f:"",m=n(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((C,v)=>{let p=m[l+v];p&&(p.value=C,p.dispatchEvent(new Event("input",{bubbles:!0})),p.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(h=m[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",s),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",s),o.removeEventListener("paste",t)})}}}import{isState as bl,rawHtml as Sl,toState as Wo}from"@domphy/core";import{themeColor as eo,themeDensity as to,themeSize as vl,themeSpacing as oo}from"@domphy/theme";var Cl='<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>',xl='<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>',El=["name","value","onInput","disabled","required"];function cr(r){if(r!=null)return typeof r=="function"?r:bl(r)?o=>r.get(o):r}function bp(r={}){var t,a;let o=Wo((t=r.color)!=null?t:"neutral","color"),n=Wo((a=r.accentColor)!=null?a:"primary","accentColor"),e=Wo(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of El)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var C,v,p,b,k,g,D;let m=(C=r.name)!=null?C:s.name,u=cr((v=r.value)!=null?v:s.value),l=(p=r.onInput)!=null?p:s.onInput,c=cr((b=r.disabled)!=null?b:s.disabled),d=(k=r.required)!=null?k:s.required,f=O(E(E(E(E(E({input:null,type:w=>e.get(w)?"text":"password",ariaLabel:(g=r.ariaLabel)!=null?g:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),h={button:w=>Sl(e.get(w)?xl:Cl),type:"button",ariaLabel:w=>e.get(w)?"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(f),i.children.insert(h)},style:{display:"flex",alignItems:"center",gap:i=>oo(to(i)*1),paddingBlock:i=>oo(to(i)*1),paddingInline:i=>oo(to(i)*3),borderRadius:i=>oo(to(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${eo(i,"border-strong",o.get(i))}`,color:i=>eo(i,"text",o.get(i)),backgroundColor:i=>eo(i,"inherit",o.get(i)),fontSize:i=>vl(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${eo(i,"shift-5",n.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,n.get(i))}}}}import{toState as mr}from"@domphy/core";import{themeColor as Oe,themeSize as kl,themeSpacing as no}from"@domphy/theme";function kp(r={}){var e,s;let o=mr((e=r.color)!=null?e:"neutral","color"),n=mr((s=r.accentColor)!=null?s:"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=>kl(t,"inherit"),color:t=>Oe(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:no(6),height:no(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 ${Oe(t,"border-strong",o.get(t))}`,color:t=>Oe(t,"text",o.get(t)),width:no(4),height:no(4)},"&:hover::before":{backgroundColor:t=>Oe(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${Oe(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>Oe(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>Oe(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>Oe(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as ur}from"@domphy/core";import{themeColor as qo,themeSpacing as xe}from"@domphy/theme";function Ip(r={}){var e,s;let o=ur((e=r.color)!=null?e:"neutral","color"),n=ur((s=r.accentColor)!=null?s:"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:xe(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:xe(1.5),borderRadius:xe(999),backgroundColor:t=>qo(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:xe(4),height:xe(4),borderRadius:xe(999),border:"none",marginTop:`calc((${xe(1.5)} - ${xe(4)}) / 2)`,backgroundColor:t=>qo(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>qo(t,"shift-10",n.get(t))},borderRadius:xe(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as dr}from"@domphy/core";import{themeColor as Le,themeDensity as Yo,themeSize as wl,themeSpacing as ro}from"@domphy/theme";function Vp(r={}){var e,s;let o=dr((e=r.color)!=null?e:"neutral","color"),n=dr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>wl(t,"inherit"),lineHeight:"inherit",color:t=>Le(t,"text",o.get(t)),backgroundColor:t=>Le(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Le(t,"border-strong",o.get(t))}`,borderRadius:t=>ro(Yo(t)*1.5),minWidth:ro(32),paddingInline:t=>ro(Yo(t)*3),paddingBlock:t=>ro(Yo(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>Le(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 ${Le(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Le(t,"muted","neutral"),backgroundColor:t=>Le(t,"shift-2","neutral"),outline:t=>`1px solid ${Le(t,"border-strong","neutral")}`}}}}import{toState as Tl}from"@domphy/core";import{themeColor as It,themeSize as pr,themeSpacing as de}from"@domphy/theme";function Ap(r={}){var n;let o=Tl((n=r.accentColor)!=null?n:"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=>pr(e,"inherit"),backgroundColor:e=>It(e,"inherit"),color:e=>It(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:de(9),height:de(6),cursor:"pointer",margin:"0",paddingBlock:de(1),transition:"box-shadow 140ms ease",borderRadius:de(999),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>It(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${de(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:de(3),height:de(3),borderRadius:de(999),left:de(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>It(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:de(999),display:"inline-block",fontSize:e=>pr(e,"inherit"),lineHeight:1,backgroundColor:e=>It(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as hr}from"@domphy/core";import{themeColor as oe,themeDensity as Go,themeSize as Dl,themeSpacing as Xe}from"@domphy/theme";function jp(r={}){var s,t;let{type:o="text"}=r,n=hr((s=r.color)!=null?s:"neutral","color"),e=hr((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Xe(10),paddingInline:a=>Xe(Go(a)*3),paddingBlock:a=>Xe(Go(a)*1),borderRadius:a=>Xe(Go(a)*1.5),fontSize:a=>Dl(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${oe(a,"border-strong",n.get(a))}`,color:a=>oe(a,"text",n.get(a)),backgroundColor:a=>oe(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>oe(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>oe(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${oe(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>oe(a,"shift-2","neutral"),outline:a=>`1px solid ${oe(a,"border-strong","neutral")}`,color:a=>oe(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${Xe(.5)} solid ${oe(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${Xe(.5)} solid ${oe(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${Xe(.5)} solid ${oe(a,"shift-6","warning")}`}}}}import{toState as Pl}from"@domphy/core";import{themeColor as Uo,themeDensity as Jo,themeSize as Il,themeSpacing as Xo}from"@domphy/theme";function Gp(r={}){var n;let o=Pl((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>Il(e,"inherit"),color:e=>Uo(e,"text",o.get(e)),backgroundColor:e=>Uo(e,"inherit",o.get(e)),paddingBlock:e=>Xo(Jo(e)*(.5/1.5)),paddingInline:e=>Xo(Jo(e)*(1.5/1.5)),borderRadius:e=>Xo(Jo(e)*(1/1.5)),outline:e=>`1px solid ${Uo(e,"border-strong",o.get(e))}`}}}import{toState as fr}from"@domphy/core";import{themeColor as Zo,themeSize as Ol,themeSpacing as Ll}from"@domphy/theme";function Zp(r={}){var e,s;let o=fr((e=r.color)!=null?e:"neutral","color"),n=fr((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Ll(2),fontSize:t=>Ol(t,"inherit"),color:t=>Zo(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>Zo(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>Zo(t,"muted","neutral")}}}}import{toState as gr}from"@domphy/core";import{themeColor as Ot,themeSize as zl,themeSpacing as Rl}from"@domphy/theme";function nh(r={}){var e,s;let o=gr((e=r.color)!=null?e:"primary","color"),n=gr((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>zl(t,"inherit"),backgroundColor:t=>Ot(t),color:t=>Ot(t,"shift-13",o.get(t)),textDecoration:"none","&:visited":{color:t=>Ot(t,"shift-13",n.get(t))},"&:hover:not([disabled])":{color:t=>Ot(t,"shift-14",o.get(t)),textDecoration:"underline"},borderRadius:Rl(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>Ot(t,"muted","neutral")}}}}import{toState as Vl}from"@domphy/core";import{themeColor as $,themeDensity as ze,themeSize as yr,themeSpacing as Re}from"@domphy/theme";var Ml={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},_l={small:.5,medium:1,large:1.5};function ch(r={}){var i,m,u;let o=(i=r.variant)!=null?i:"outline",n=Vl((m=r.color)!=null?m:o==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=nt[e];if(o==="ghost"){let l=_l[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>yr(c,s),textDecoration:"none",paddingBlock:c=>Re(ze(c)*l),paddingInline:c=>Re(ze(c)*l),borderRadius:c=>Re(ze(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>Re(ze(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=>$(c,"text",n.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>$(c,"text",n.get(c)),backgroundColor:c=>$(c,"hover",n.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>$(c,"text",n.get(c)),backgroundColor:c=>$(c,"increase-2",n.get(c))},"&:focus-visible":{boxShadow:c=>S(c,n.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>$(c,"border-strong","neutral")}}}}let t=o==="solid",a=Ml[e];return O(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>yr(l,s),textDecoration:"none",paddingBlock:l=>Re(ze(l)*a.block),paddingInline:l=>Re(ze(l)*a.inline),borderRadius:l=>Re(ze(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>Re(ze(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${$(l,"border-strong",n.get(l))}`,color:l=>t?$(l,"shift-0","neutral"):$(l,"shift-13",n.get(l)),backgroundColor:l=>t?$(l,"shift-13",n.get(l)):$(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?$(l,"shift-0","neutral"):$(l,"shift-14",n.get(l)),backgroundColor:l=>t?$(l,"shift-14",n.get(l)):$(l,"hover",n.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?$(l,"shift-15",n.get(l)):$(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>$(l,"shift-2","neutral"),outline:l=>`1px solid ${$(l,"border-strong","neutral")}`,color:l=>$(l,"muted","neutral")}}})}import{toState as Nl}from"@domphy/core";import{themeColor as Ve,themeDensity as Ze,themeSize as br,themeSpacing as Qe}from"@domphy/theme";function fh(r={}){var n;let o=(n=r.color)!=null?n:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>Ve(e,"inherit",o),color:e=>Ve(e,"text",o)}}}function gh(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>Qe(Ze(n)*2),paddingBlock:n=>Qe(o?1:Ze(n)*2),paddingInline:n=>Qe(Ze(n)*3),fontSize:n=>br(n,"inherit"),color:n=>Ve(n,"text")}}}function yh(r={}){var s,t;let o=Nl((s=r.color)!=null?s:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>Qe(Ze(a)*2),paddingBlock:a=>Qe(e?1:Ze(a)*2),paddingInline:a=>Qe(Ze(a)*3),fontSize:a=>br(a,"inherit"),color:a=>Ve(a,"text",o.get(a)),borderRadius:a=>Qe(Ze(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>Ve(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>Ve(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>Ve(a,"shift-3",n),color:a=>Ve(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>S(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as $l}from"@domphy/core";import{themeColor as Sr,themeDensity as Qo,themeSize as Al,themeSpacing as en}from"@domphy/theme";function Ch(r={}){var n;let o=$l((n=r.accentColor)!=null?n:"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=>Al(e,"inherit"),color:e=>Sr(e,"text",o.get(e)),backgroundColor:e=>Sr(e,"inherit",o.get(e)),height:e=>en(Qo(e)*(6/1.5)),borderRadius:e=>en(Qo(e)*(1/1.5)),paddingInline:e=>en(Qo(e)*(1.5/1.5))}}}import{behavior as Bl,toState as Hl}from"@domphy/core";import{themeColor as Me,themeDensity as Lt,themeSize as vr,themeSpacing as dt}from"@domphy/theme";function Dh(r={items:[]}){var l;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:s="primary"}=r,t=Hl((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let f=c.nodeId;return d.items.map((h,C)=>{var p;let v=(p=h.key)!=null?p:C;return O(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:v,type:"button",id:`menuitem${f}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=h.onClick)==null||b.call(h)},onKeyDown:b=>{var V;let k=b.key;if(k==="Enter"||k===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(k))return;b.preventDefault();let g=d.items.map((j,G)=>{var M;return(M=j.key)!=null?M:G}),D=g.indexOf(v),w=D;k==="ArrowDown"?w=(D+1)%g.length:k==="ArrowUp"?w=(D-1+g.length)%g.length:k==="Home"?w=0:k==="End"&&(w=g.length-1),(V=document.getElementById(`menuitem${f}${g[w]}`))==null||V.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:dt(2),width:"100%",fontSize:b=>vr(b,"inherit"),height:b=>dt(6+Lt(b)*2),paddingInline:b=>dt(Lt(b)*3),border:"none",outline:"none",color:b=>Me(b,"text",d.color),backgroundColor:b=>Me(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>Me(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>Me(b,"shift-3",d.accentColor),color:b=>Me(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let f=d;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),f=h,f.items.length!==0&&c.children.update(i(c,f))}}},u={items:o,activeKey:t,activeKeyIsCallerOwned:a,selectable:n,color:e,accentColor:s};return O(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{o.length!==0&&(d[c.tagName]=i(c,u))}},Bl("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>dt(Lt(c)*2),paddingInline:c=>dt(Lt(c)*2),fontSize:c=>vr(c,"inherit"),backgroundColor:c=>Me(c,"inherit",e),color:c=>Me(c,"text",e),borderRadius:c=>dt(Lt(c)*2),outline:c=>`1px solid ${Me(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:R("medium")}})}import{behavior as Fl}from"@domphy/core";var Cr=r=>!!r&&typeof r.get=="function"&&r._isState===!0,pe=r=>{let o={},n=[];for(let e in r){let s=r[e];e==="x"?n.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?n.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?n.push(`scale(${s})`):e==="rotate"?n.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):o[e]=s}return n.length&&(o.transform=n.join(" ")),o};function tn(r={}){var o,n,e,s;return{duration:(o=r.duration)!=null?o:300,delay:(n=r.delay)!=null?n:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function on(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function Kl(r,o){let n=r.domElement,e=o,s,t=i=>{s==null||s(),s=void 0,!(!n||!Cr(i))&&(s=i.addListener(m=>{on()?Object.assign(n.style,pe(m)):typeof n.animate=="function"&&n.animate([pe(m)],tn(e.transition))}))},a=(i,m)=>{if(!n)return;let u=Cr(i.animate)?i.animate.get():i.animate;if(on()){u?Object.assign(n.style,pe(u)):m==="enter"&&i.initial&&Object.assign(n.style,pe(i.initial));return}if(typeof n.animate=="function")if(u){let l=m==="enter"&&i.initial?[pe(i.initial),pe(u)]:[pe(u)];n.animate(l,tn(i.transition))}else m==="enter"&&i.initial&&Object.assign(n.style,pe(i.initial))};return a(o,"enter"),t(o.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function Lh(r={}){return O(E({},Fl("motion",(o,n)=>Kl(o,n),r)),{_onBeforeRemove:(o,n)=>{var a,i;let e=o.domElement,s=o.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return n();if(on())return Object.assign(e.style,pe(t)),n();e.animate([pe(t)],tn((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(n,n)}})}import{toState as jl}from"@domphy/core";import{themeColor as xr,themeSize as Wl,themeSpacing as ql}from"@domphy/theme";function _h(r={}){var n;let o=jl((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Wl(e,"inherit"),backgroundColor:e=>xr(e),color:e=>xr(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ql(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{behavior as Yl,isState as Gl,toState as kr}from"@domphy/core";import{themeColor as et,themeDensity as zt,themeSize as Ul,themeSpacing as pt}from"@domphy/theme";function Jl(r,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];r>3&&n.push("...");let e=Math.max(2,r-1),s=Math.min(o-1,r+1);for(let t=e;t<=s;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function Xl(r,o,n,e){if(Gl(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=kr(n!=null?n:e),r.setMetadata(o,s)),s}function Er(r,o){let n=r.getMetadata("paginationTotal");return n||(n=kr(o),r.setMetadata("paginationTotal",n)),n}function Hh(r){let{total:o,color:n="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>pt(6+zt(a)*2),height:a=>pt(6+zt(a)*2),paddingInline:a=>pt(zt(a)*2),borderRadius:a=>pt(zt(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>Ul(a,"inherit"),backgroundColor:"transparent",color:a=>et(a,"shift-13",n),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>et(a,"shift-13",n),backgroundColor:a=>et(a,"hover",n)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=O(E({},s),{backgroundColor:a=>et(a,"shift-13",e),color:a=>et(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>et(a,"shift-13",e)}});return O(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=Xl(a,"paginationPage",r.value,1),m=Er(a,o),u={div:l=>{let c=i.get(l),d=m.get(l),f=[];f.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let h=0;for(let C of Jl(c,d))if(C==="...")f.push({span:"\u2026",_key:`ellipsis-${h++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>pt(zt(v)*2),color:v=>et(v,"shift-7",n)}});else{let v=C===c;f.push({button:String(C),_key:`page-${C}`,type:"button",ariaLabel:`Page ${C}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(C),style:v?t:s})}return f.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),f},style:{display:"flex",alignItems:"center",gap:pt(1)}};a.children.insert(u)}},Yl("pagination-total",a=>({update(i){Er(a,i.total).set(i.total)}}),{total:o})),{style:{display:"inline-flex"}})}import{toState as Zl}from"@domphy/core";import{themeColor as Ql,themeDensity as es,themeSpacing as ts}from"@domphy/theme";function qh(r={}){var s;let{padding:o=4,divider:n=!1}=r,e=Zl((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>ts(es(t)*o)},n?{borderBottom:t=>`1px solid ${Ql(t,"border",e.get(t))}`}:{})}}import{toState as os}from"@domphy/core";import{themeColor as ns,themeSize as rs}from"@domphy/theme";function Xh(r={}){var n;let o=os((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>rs(e,"inherit"),color:e=>ns(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as as,toState as wr}from"@domphy/core";import{themeColor as nn,themeDensity as is,themeSpacing as ls}from"@domphy/theme";function ss(r){if(typeof r.dataTone=="string")return!0;let n=r.$;return n?n.some(e=>e!=null&&typeof e.dataTone=="string"):!1}function nf(r){var c;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,s=wr(o),t=wr(n),{show:a,hide:i,anchorPartial:m}=me({kind:"popover",open:s,onDismiss:r.onDismiss,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-0",style:{backgroundColor:d=>nn(d,"inherit"),color:d=>nn(d,"text"),borderRadius:d=>ls(is(d)*2),outline:d=>`1px solid ${nn(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:R("medium")}};return ss(r.content)||((c=r.content).$||(c.$=[]),r.content.$.push(u)),as(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?J("popover",d.elementNode):void 0,onMouseEnter:(d,f)=>e==="hover"&&a(f),onMouseLeave:(d,f)=>e==="hover"&&i(f),onClick:(d,f)=>{e==="click"&&(s.get()?i(f):a(f))},onKeyDown:(d,f)=>{d.key==="Escape"&&s.get()&&i(f)},onFocus:(d,f)=>e==="hover"&&a(f),onBlur:(d,f)=>{if(e!=="hover")return;let h=d.relatedTarget,v=f.getRoot().domElement.querySelector(`#${J("popover",f)}`);h&&(v!=null&&v.contains(h))||i(f)}}),m}import{toState as cs}from"@domphy/core";import{themeColor as ao,themeSize as ms,themeSpacing as rn}from"@domphy/theme";function Tr(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=rn(6),bordered:s=!0}=r,t=cs(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"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>ms(l),backgroundColor:l=>ao(l),color:l=>ao(l,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:rn(1.5),height:rn(1.5),backgroundColor:l=>ao(l,"inherit",n),borderWidth:s?"1px":0,borderColor:l=>ao(l,"border-strong",n),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",f=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${f}) rotate(45deg)`}}}}}import{toState as us}from"@domphy/core";import{themeColor as Dr,themeDensity as an,themeSize as ds,themeSpacing as ln}from"@domphy/theme";function uf(r={}){var n;let o=us((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>ds(e,"inherit"),color:e=>Dr(e,"text",o.get(e)),backgroundColor:e=>Dr(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>ln(an(e)*2),paddingInline:e=>ln(an(e)*3),borderRadius:e=>ln(an(e)*2)}}}import{toState as Pr}from"@domphy/core";import{themeColor as io,themeSpacing as lo}from"@domphy/theme";function ff(r={}){var e,s;let o=Pr((e=r.color)!=null?e:"neutral","color"),n=Pr((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:lo(2),border:0,borderRadius:lo(999),overflow:"hidden",backgroundColor:t=>io(t,"inherit",o.get(t)),color:t=>io(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>io(t,"inherit",o.get(t)),borderRadius:lo(999)},"&::-webkit-progress-value":{backgroundColor:t=>io(t,"shift-9",n.get(t)),borderRadius:lo(999),transition:"width 220ms ease"}}}}import{behavior as ps,isState as hs,rawHtml as fs,toState as Ir}from"@domphy/core";import{themeColor as gs,themeSize as ys,themeSpacing as Lr}from"@domphy/theme";var bs='<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>',Ss='<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 Or(r,o){var n,e,s;r.onChange=o.onChange,r.readOnly=(n=o.readOnly)!=null?n:!1,r.max=(e=o.max)!=null?e:5,r.color=(s=o.color)!=null?s:"warning",hs(o.value)?o.value!==r.valueState&&r.valueState.set(o.value.get()):o.value!==void 0&&r.valueState.set(o.value)}function vs(r,o,n,e){let s=a=>{let i=e.get(a);return i>0?i:n.valueState.get(a)},t={button:a=>fs(o<=s(a)?bs:Ss),_key:o,type:"button",ariaLabel:`${o} star${o>1?"s":""}`,onClick:()=>{var i;if(n.readOnly)return;let a=o===n.valueState.get()?0:o;n.valueState.set(a),(i=n.onChange)==null||i.call(n,a),e.set(0)},onMouseEnter:()=>{n.readOnly||e.set(o)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(n.readOnly)return;let i=n.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(n.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;n.valueState.set(m),(l=n.onChange)==null||l.call(n,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:Lr(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,n.color)}}};r.children.insert(t)}function sn(r,o,n){let e=r.children.items;for(;e.length>o.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=o.max;s++)vs(r,s,o,n)}function vf(r={}){var e,s,t,a,i,m,u;let o={valueState:Ir((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},n=Ir(0);return O(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Lr(.5),fontSize:l=>ys(l,"increase-1"),cursor:o.readOnly?"default":"pointer",color:l=>gs(l,"muted",o.color)}},ps("rating",(l,c)=>(Or(o,c),sn(l,o,n),{update(d){Or(o,d),sn(l,o,n)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{sn(l,o,n)}})}import{toState as cn}from"@domphy/core";import{themeColor as mn,themeSpacing as zr}from"@domphy/theme";function wf(r={}){var m,u,l;let{size:o=16,thickness:n=.25}=r,e=cn((m=r.value)!=null?m:0,"value"),s=cn((u=r.color)!=null?u:"primary","color"),t=cn((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-n)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:zr(o),height:zr(o),borderRadius:"50%",color:c=>mn(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${mn(c,"shift-9",s.get(c))} ${e.get(c)}%, ${mn(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}import{themeDensity as Cs,themeSpacing as Rr}from"@domphy/theme";function Vr(r={}){let{gap:o=4,align:n="center",justify:e,wrap:s=!1,density:t=!0}=r;return{style:E(E({display:"flex",alignItems:n,gap:t?a=>Rr(Cs(a)*o):()=>Rr(o)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}import{toState as xs}from"@domphy/core";import{themeColor as so,themeSpacing as co}from"@domphy/theme";function zf(r={}){var n;let o=xs((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>so(e,"text",o.get(e)),"&::-webkit-scrollbar":{width:co(2),height:co(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>so(e,"shift-5",o.get(e)),borderRadius:co(999),border:`${co(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>so(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${so(e,"shift-5",o.get(e))} transparent`}}}import{behavior as Es,isState as ks,toState as Nr}from"@domphy/core";import{themeColor as tt,themeSize as ws,themeSpacing as _e}from"@domphy/theme";function Mr(r,o,n,e){if(ks(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=Nr(n!=null?n:e),r.setMetadata(o,s)),s}function Ts(r,o,n,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=o.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(n),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function _r(r,o,n,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>o.get(u)===a,tabIndex:u=>{var c,d;let l=o.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>o.set(a),onKeyDown:u=>Ts(u,r,a,o),style:{cursor:"pointer",fontSize:u=>ws(u,"inherit"),height:_e(6),paddingBlock:_e(1),paddingInline:_e(3),border:"none",borderRadius:_e(10),color:u=>tt(u,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>tt(u,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>tt(u,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:u=>tt(u,"shift-0",e),color:u=>tt(u,"shift-10",e),boxShadow:R("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${R("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function $f(r={items:[]}){var t,a,i;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,s={items:o,color:n,accentColor:e};return O(E({role:"radiogroup",_context:{segmented:{value:Nr((i=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=Mr(m,"segmentedValue",r.value,(d=(c=o[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=_r(o,l,n,e)}},Es("segmented-items",m=>({update(u){var c,d;let l=Mr(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(_r(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:_e(1),paddingInline:_e(1),gap:_e(.5),borderRadius:_e(10),backgroundColor:m=>tt(m,"inherit",n),color:m=>tt(m,"text",n)}})}import{themeColor as Ee,themeColorToken as Ds,themeDensity as Rt,themeSize as Ps,themeSpacing as Ne}from"@domphy/theme";function Kf(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Ps(e,"inherit"),lineHeight:"inherit",color:e=>Ee(e,"text",o),backgroundColor:e=>Ee(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Ee(e,"border-strong",o)}`,borderRadius:e=>Ne(Rt(e)*1.5),paddingBlock:e=>Ne(Rt(e)*1),paddingLeft:e=>Ne(Rt(e)*3),paddingRight:e=>Ne(Rt(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Ds(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${Ne(2)} center`,backgroundSize:`${Ne(2.5)} ${Ne(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>Ne(6+Rt(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${Ee(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>S(e,n)},"& optgroup":{color:e=>Ee(e,"shift-11",o)},"& option[disabled]":{color:e=>Ee(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Ee(e,"muted","neutral"),outline:e=>`1px solid ${Ee(e,"border-strong","neutral")}`,backgroundColor:e=>Ee(e,"shift-2","neutral")}}}}import{behavior as Is,merge as $r,toState as un}from"@domphy/core";import{themeColor as ht,themeDensity as mo,themeSize as Os,themeSpacing as ft}from"@domphy/theme";var Ls=1e3;function zs(r){let o=r.getMetadata("selectBoxTypeahead");return o||(o={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",o)),o}var Ar=(r,o)=>r.trim().toLowerCase().startsWith(o);function Rs(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(o=>o.getAttribute("aria-disabled")!=="true"&&!o.hasAttribute("disabled")):[]}function Xf(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=un(r.value),i=un(s),{show:m,hide:u,anchorPartial:l}=me({kind:"selectBox",open:i,onDismiss:r.onDismiss,placement:un(n),content:r.content}),c={onClick:(p,b)=>!t&&u(b),dataTone:"shift-0",style:{backgroundColor:p=>ht(p,"inherit"),color:p=>ht(p,"text"),borderRadius:p=>ft(mo(p)*2),outline:p=>`1px solid ${ht(p,"border-strong")}`,outlineOffset:"-1px",boxShadow:R("medium")}};$r(r.content,c);let d=p=>({div:b=>{let k=p.state.get(b),g=Array.isArray(k)?k:[k];return p.options.filter(w=>g.includes(w.value)).map(w=>({span:w.label,$:[Ft({color:p.color,removable:p.multiple})],_key:w.value,_onRemove:V=>{let j=p.state.get(),M=(Array.isArray(j)?j:[j]).filter(ne=>ne!==w.value);p.multiple?p.state.set(M):p.state.set(M[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:ft(1),flex:1}}),f=(p,b)=>({update(k){p.children.update([d(k)])}}),h=p=>i.get()?u(p):m(p),C=(p,b)=>{var G,M,ne,N;let k=zs(b);k.timer&&clearTimeout(k.timer),k.buffer+=p.toLowerCase(),k.timer=setTimeout(()=>{k.buffer=""},Ls);let g=k.buffer.length>1&&new Set(k.buffer).size===1,D=g?k.buffer[0]:k.buffer;if(i.get()){let W=b.getRoot().domElement,ie=(G=W==null?void 0:W.querySelector(`#${J("selectBox",b)}`))!=null?G:null,U=Rs(ie).filter(Fe=>{var ye;return Ar((ye=Fe.textContent)!=null?ye:"",D)});if(!U.length)return;let He=(ne=(M=b.domElement)==null?void 0:M.ownerDocument)==null?void 0:ne.activeElement,ge=g&&He?U.indexOf(He):-1,le=U[(ge+1)%U.length];le.focus(),(N=le.scrollIntoView)==null||N.call(le,{block:"nearest"});return}if(t)return;let w=o.filter(W=>Ar(W.label,D));if(!w.length)return;let V=g?w.findIndex(W=>W.value===a.get()):-1,j=w[(V+1)%w.length];a.set(j.value)},v=O(E({_onInsert:p=>{p.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(p,b)=>{b[p.tagName]=[d({options:o,multiple:t,color:e,state:a})]}},Is("selectBoxInner",f,{options:o,multiple:t,color:e,state:a})),{onClick:(p,b)=>h(b),tabindex:0,role:"button",ariaExpanded:p=>i.get(p),ariaHaspopup:"listbox",ariaControls:p=>p!=null&&p.elementNode?J("selectBox",p.elementNode):void 0,onKeyDown:(p,b)=>{let k=p.key;if(k==="Escape"){u(b);return}if(k==="Enter"||k===" "){p.preventDefault(),h(b);return}if(k==="ArrowDown"&&!i.get()){p.preventDefault(),m(b);return}let g=p;k.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&C(k,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:p=>ft(6+mo(p)*2),minWidth:ft(32),outlineOffset:"-1px",outline:p=>`1px solid ${ht(p,"border-strong","neutral")}`,paddingInline:p=>ft(mo(p)*2),borderRadius:p=>ft(mo(p)*1.5),fontSize:p=>Os(p,"inherit"),color:p=>ht(p,"text",e),backgroundColor:p=>ht(p,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>S(p,e)}}});return $r(l,v),l}import{themeColor as Vt,themeDensity as Br,themeSize as Vs,themeSpacing as Hr}from"@domphy/theme";function og(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Vs(t,"inherit"),height:t=>Hr(6+Br(t)*2),paddingInline:t=>Hr(Br(t)*3),border:"none",outline:"none",color:t=>Vt(t,"text",n),backgroundColor:t=>Vt(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>Vt(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>Vt(t,"shift-6",o),color:t=>Vt(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o)}}}}import{toState as Ms}from"@domphy/core";import{themeColor as Fr,themeDensity as Kr,themeSize as _s,themeSpacing as jr}from"@domphy/theme";function ig(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=Ms((a=r.value)!=null?a:n?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:n?"true":void 0,_context:{select:{value:e,multiple:n}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>jr(Kr(i)*2),paddingInline:i=>jr(Kr(i)*2),fontSize:i=>_s(i,"inherit"),backgroundColor:i=>Fr(i,"inherit",o),color:i=>Fr(i,"text",o)}}}import{hashString as Ns,toState as $s}from"@domphy/core";import{themeColor as Mt,themeSize as As,themeSpacing as Wr}from"@domphy/theme";function mg(r={}){var s;let o=$s((s=r.color)!=null?s:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=Ns(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>As(t),color:t=>Mt(t,"text",o.get(t)),height:Wr(6),display:"block",borderRadius:Wr(1),backgroundColor:t=>Mt(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${Mt(t,"inherit",o.get(t))} 0%, ${Mt(t,"shift-2",o.get(t))} 50%, ${Mt(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}import{toState as Bs}from"@domphy/core";import{themeColor as Hs,themeSize as Fs}from"@domphy/theme";function hg(r={}){var n;let o=Bs((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>Fs(e,"inherit"),color:e=>Hs(e,"shift-10",o.get(e))}}}import{hashString as Ks,toState as js}from"@domphy/core";import{themeColor as uo,themeSize as Ws,themeSpacing as dn}from"@domphy/theme";var Yr={to:{transform:"rotate(360deg)"}},qr=Ks(JSON.stringify(Yr));function bg(r={}){var n;let o=js((n=r.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>Ws(e),backgroundColor:e=>uo(e),color:e=>uo(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:dn(6),height:dn(6),borderRadius:"50%",border:e=>`${dn(.5)} solid ${uo(e,"border-strong",o.get(e))}`,borderTopColor:e=>uo(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${qr} 0.7s linear infinite`,[`@keyframes ${qr}`]:Yr}}}import{ElementNode as qs,merge as Ys,toState as Gs}from"@domphy/core";import{themeColor as po,themeSpacing as pn}from"@domphy/theme";function Eg(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{Ys(a,{_context:{splitter:{direction:o,size:Gs(n),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Us(r){let o=r.parent;if(!o)return!0;for(let n of o.children.items)if(n instanceof qs&&n.getMetadata("splitterPanel"))return n===r;return!0}function kg(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal"?"width":"height",s=a=>{n.style[e]=`${Us(r)?a:100-a}%`};s(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let t=o.size.addListener(s);r.addHook("Remove",()=>{var a;o.panelCount=Math.max(0,((a=o.panelCount)!=null?a:1)-1),t()})}}}function wg(){return{role:"separator",tabindex:0,_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize",n.setAttribute("aria-orientation",e?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(o.min)),n.setAttribute("aria-valuemax",String(o.max)),n.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let s=o.size.addListener(m=>{n.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowLeft"&&(l=Math.max(o.size.get()-u,o.min)):m.key==="ArrowDown"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowUp"&&(l=Math.max(o.size.get()-u,o.min)),m.key==="Home"?l=o.min:m.key==="End"&&(l=o.max),l!==null&&(m.preventDefault(),o.size.set(l))},a=null,i=m=>{m.preventDefault();let u=n.parentElement,l=d=>{let f=u.getBoundingClientRect(),h=e?(d.clientX-f.left)/f.width*100:(d.clientY-f.top)/f.height*100;o.size.set(Math.min(Math.max(h,o.min),o.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};n.addEventListener("keydown",t),n.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>po(r,"inherit"),color:r=>po(r,"text"),"&:hover":{backgroundColor:r=>po(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:pn(1),height:pn(1),borderRadius:pn(999),backgroundColor:r=>po(r,"shift-4")}}}}import{themeDensity as Js,themeSpacing as Gr}from"@domphy/theme";function Pg(r={}){let{gap:o=3,align:n,justify:e,density:s=!0}=r;return{style:E(E({display:"flex",flexDirection:"column",gap:s?t=>Gr(Js(t)*o):()=>Gr(o)},n?{alignItems:n}:{}),e?{justifyContent:e}:{})}}import{behavior as Xs,isState as Zs,toState as Zr}from"@domphy/core";import{themeColor as K,themeSize as Ur,themeSpacing as ae}from"@domphy/theme";function Jr(r,o,n,e){if(Zs(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=Zr(n!=null?n:e),r.setMetadata(o,s)),s}function Qs(r,o,n){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:ae(3),top:ae(6),bottom:`-${ae(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>K(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>K(e,"shift-9",n)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:ae(3),right:`calc(50% + ${ae(3)})`,left:`calc(-50% + ${ae(3)})`,height:"2px",backgroundColor:e=>K(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>K(e,"shift-9",n)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>K(e,"shift-9",n)}}}function Xr(r,o,n,e,s){let t=n==="vertical",a=Qs(n,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=o.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>o.get(c)===m?"step":void 0,style:O(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:ae(1),flex:t?"none":"1",fontSize:c=>Ur(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:ae(6),height:ae(6),borderRadius:ae(999),fontSize:c=>Ur(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${K(c,"border-strong",e)}`,backgroundColor:c=>K(c,"inherit"),color:c=>K(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>K(c,"shift-9",s),borderColor:c=>K(c,"shift-9",s),color:c=>K(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${K(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>K(c,"shift-9",s),borderColor:c=>K(c,"shift-9",s),color:c=>K(c,"shift-0",s)},"&[data-status=pending]":{color:c=>K(c,"muted")},"&[data-status=active]":{color:c=>K(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>K(c,"text",e)}})}})}function Rg(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:o,direction:n,color:e,accentColor:s};return O(E({_doctorDisable:"inline-typography",_context:{steps:{current:Zr((a=r.current)!=null?a:0),direction:n,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=Jr(i,"stepsCurrent",r.current,0);m[i.tagName]=Xr(o,u,n,e,s)}},Xs("steps-items",i=>({update(m){let u=Jr(i,"stepsCurrent",r.current,0);i.children.update(Xr(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:ae(2),listStyle:"none",margin:"0",padding:"0"}})}import{toState as ec}from"@domphy/core";import{themeColor as Qr,themeSize as tc}from"@domphy/theme";function $g(r={}){var n;let o=ec((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>tc(e,"inherit"),fontWeight:"bold",color:e=>Qr(e,"shift-11",o.get(e)),backgroundColor:e=>Qr(e)}}}import{toState as oc}from"@domphy/core";import{themeColor as nc,themeSize as rc}from"@domphy/theme";function Fg(r={}){var n;let o=oc((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>rc(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>nc(e,"text",o.get(e))}}}import{toState as ac}from"@domphy/core";import{themeColor as ic,themeSize as lc}from"@domphy/theme";function qg(r={}){var n;let o=ac((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>lc(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>ic(e,"text",o.get(e))}}}import{toState as sc}from"@domphy/core";import{themeColor as he,themeDensity as gt,themeSize as ea,themeSpacing as yt}from"@domphy/theme";function Jg(r={}){var n;let o=sc((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>ea(e,"inherit"),color:e=>he(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>yt(gt(e)*3),paddingBlock:e=>yt(gt(e)*1),color:e=>he(e,"shift-10",o.get(e)),backgroundColor:e=>he(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>yt(gt(e)*3),paddingBlock:e=>yt(gt(e)*1),color:e=>he(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${he(e,"shift-3",o.get(e))}`,fontSize:e=>ea(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>yt(gt(e)*3),paddingBlock:e=>yt(gt(e)*1),color:e=>he(e,"shift-10",o.get(e)),backgroundColor:e=>he(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${he(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>he(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>he(e,"hover")}}}}import{behavior as cc,isState as mc,toState as uc}from"@domphy/core";import{themeColor as $e,themeDensity as ho,themeSize as dc,themeSpacing as Ae}from"@domphy/theme";function ta(r,o,n,e){if(mc(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=uc(n!=null?n:e),r.setMetadata(o,s)),s}function oa(r,o,n,e,s){let t=r.nodeId,i={div:o.map((u,l)=>{var f;let c=(f=u.key)!=null?f:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:h=>n.get(h)===c,tabIndex:h=>n.get(h)===c?0:-1,onClick:()=>n.set(c),onKeyDown:h=>{var g;let C=h.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(C))return;h.preventDefault();let v=o.map((D,w)=>{var V;return(V=D.key)!=null?V:w}),p=v.indexOf(c),b=p;C==="ArrowRight"?b=(p+1)%v.length:C==="ArrowLeft"?b=(p-1+v.length)%v.length:C==="Home"?b=0:C==="End"&&(b=v.length-1),n.set(v[b]);let k=h.target.closest("[role=tablist]");(g=k==null?void 0:k.querySelectorAll("[role=tab]")[b])==null||g.focus()},style:{cursor:"pointer",fontSize:h=>dc(h,"inherit"),height:h=>Ae(6+ho(h)*2),paddingInline:h=>Ae(ho(h)*4),border:"none",outline:"none",color:h=>$e(h,"shift-13"),backgroundColor:h=>$e(h,"inherit"),boxShadow:h=>`inset 0 ${Ae(-.5)} 0 0 ${$e(h,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:h=>$e(h,"shift-13"),boxShadow:h=>`inset 0 ${Ae(-.5)} 0 0 ${$e(h,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:h=>$e(h,"shift-13",e),boxShadow:h=>`inset 0 ${Ae(-.5)} 0 0 ${$e(h,"shift-8",e)}`},"&:focus-visible":{boxShadow:h=>S(h,e)},"&[aria-selected=true]:focus-visible":{boxShadow:h=>`${S(h,e)}, inset 0 ${Ae(-.5)} 0 0 ${$e(h,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=o.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:f=>n.get(f)!==c,style:{paddingBlock:f=>Ae(ho(f)*2),paddingInline:f=>Ae(ho(f)*2)}}});return[i,...m]}function ty(r={items:[]}){let{items:o=[],accentColor:n="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=ta(t,"tabsActiveKey",r.activeKey,(u=(m=o[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=oa(t,o,i,n,e)}},cc("tabs-items",t=>({update(a){var m,u;let i=ta(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(oa(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:o,accentColor:n,color:e}))}import{behavior as pc,toState as na}from"@domphy/core";import{themeColor as ke,themeDensity as hn,themeSize as hc,themeSpacing as fo}from"@domphy/theme";function ly(r={}){var s,t;let o=na((s=r.color)!=null?s:"neutral","color"),n=na((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return O(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},pc("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=!1,c,d,f=()=>{!u||l||(l=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,l=!1,u&&(d==null||d.observe(m)))},h=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(v=>{v.some(p=>p.isIntersecting)&&f()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{l||f()})),d.observe(m))},C=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",f),a.attributes.addListener("value",f),u&&(h(),f()),{resize:f,update(v){u=v.autoResize,a.attributes.addListener("value",f),u?(h(),f()):C()},destroy(){m.removeEventListener("input",f),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>fo(hn(a)*2),paddingBlock:a=>fo(hn(a)*1.5),border:"none",borderRadius:a=>fo(hn(a)*1.5),fontSize:a=>hc(a,"inherit"),color:a=>ke(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${ke(a,"border-strong",o.get(a))}`,backgroundColor:a=>ke(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>ke(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${ke(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,n.get(a))},"&:invalid":{outline:a=>`${fo(.5)} solid ${ke(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>ke(a,"muted","neutral"),outline:a=>`1px solid ${ke(a,"border-strong","neutral")}`,backgroundColor:a=>ke(a,"shift-2","neutral")}}})}import{toState as fc}from"@domphy/core";import{themeColor as ra,themeDensity as fn,themeSpacing as go}from"@domphy/theme";function dy(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function py(r={}){var t,a,i;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=fc((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>go(fn(m)*2),paddingBottom:m=>o?"0":go(fn(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:go(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>ra(m,"shift-8",s.get(m)?e:n),opacity:m=>s.get(m)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>go(fn(m)*-4),width:"2px",backgroundColor:m=>ra(m,"shift-3",n)}})}}import{toState as gc}from"@domphy/core";import{themeColor as aa,themeDensity as gn,themeSize as yc,themeSpacing as bt}from"@domphy/theme";function yn(r){let o=r.getMetadata("toastOpen");return o||(o=gc(!1),r.setMetadata("toastOpen",o)),o}var ia=r=>{let o=r==null?void 0:r.elementNode;return o?yn(o).get(r):!1};function Sy(r={}){let{position:o="top-center",color:n="neutral"}=r,e=o.startsWith("top"),s=o.endsWith("center"),t=o.endsWith("right"),a={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:bt(4),zIndex:30,padding:bt(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${o}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:bt(32),pointerEvents:"auto",paddingBlock:i=>bt(gn(i)*2),paddingInline:i=>bt(gn(i)*4),borderRadius:i=>bt(gn(i)*2),fontSize:i=>yc(i,"inherit"),color:i=>aa(i,"text",n),backgroundColor:i=>aa(i,"inherit",n),boxShadow:R("medium"),opacity:i=>Number(ia(i)),transform:i=>ia(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>yn(i).set(!0)),_onBeforeRemove:(i,m)=>{var p,b;let u=!1,l=null,c=!1,d=i.getRoot(),f=(b=(p=i.domElement)==null?void 0:p.parentElement)!=null?b:null,h=()=>{var g;if(c||!f||f.id!==`domphy-toast-${o}`||f.childElementCount>0)return;c=!0;let k=(g=d.children)==null?void 0:g.items.find(D=>D.domElement===f);k?d.children.remove(k):f.remove()},C=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),h())},v=k=>{k.propertyName==="transform"&&C()};i.domElement.addEventListener("transitionend",v),l=setTimeout(C,350),i.addHook("Remove",()=>{var k;l&&(clearTimeout(l),l=null),(k=i.domElement)==null||k.removeEventListener("transitionend",v),h()}),yn(i).set(!1)}}}import{behavior as bc,isState as Sc,toState as ca}from"@domphy/core";import{themeColor as fe,themeSize as ma,themeSpacing as Be}from"@domphy/theme";function la(r,o,n,e){if(Sc(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=ca(n!=null?n:e),r.setMetadata(o,s)),s}function vc(r,o){return Array.isArray(r)?r.includes(o):r===o}function Cc(r,o,n,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=o.map((c,d)=>{var f;return(f=c.key)!=null?f:String(d)}),i=a.indexOf(n),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function sa(r,o,n,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>vc(o.get(l),i),tabIndex:l=>{var d,f,h,C,v;let c=o.get(l);if(n){let b=(h=(f=(Array.isArray(c)?c:[])[0])!=null?f:(d=r[0])==null?void 0:d.key)!=null?h:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(C=r[0])==null?void 0:C.key)!=null?v:"0")?0:-1},onClick:()=>{let l=o.get();if(n){let c=Array.isArray(l)?[...l]:[];o.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else o.set(l===i?"":i)},onKeyDown:l=>Cc(l,r,i,o,n),style:{cursor:"pointer",fontSize:l=>ma(l,"inherit"),height:Be(6),paddingBlock:Be(1),paddingInline:Be(2),border:"none",borderRadius:Be(1.5),color:l=>fe(l,"shift-13",e),backgroundColor:l=>fe(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>fe(l,"shift-13",e),backgroundColor:l=>fe(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>fe(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>fe(l,"shift-3",s),color:l=>fe(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function ky(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:o,multiple:n,color:e,accentColor:s};return O(E({role:"group",_context:{toggleGroup:{value:ca((a=r.value)!=null?a:n?[]:""),multiple:n}},_onSchedule:(i,m)=>{let u=la(i,"toggleGroupValue",r.value,n?[]:"");m[i.tagName]=sa(o,u,n,e,s)}},bc("toggle-items",i=>({update(m){let u=la(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(sa(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:Be(1),paddingInline:Be(1),gap:Be(1),borderRadius:Be(2),fontSize:i=>ma(i,"inherit"),backgroundColor:i=>fe(i,"inherit",e),color:i=>fe(i,"text",e),outline:i=>`1px solid ${fe(i,"border",e)}`,outlineOffset:"-1px"}})}function Py(r={}){return Vr(r)}function Iy(){return{div:null,style:{flex:"1 1 0"}}}import{merge as xc,toState as ua}from"@domphy/core";import{themeColor as da,themeDensity as bn,themeSize as Ec,themeSpacing as Sn}from"@domphy/theme";function _y(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,s=ua(n),t=ua(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=me({kind:"tooltip",open:o,onDismiss:r.onDismiss,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>Sn(bn(d)*1),paddingInline:d=>Sn(bn(d)*3),borderRadius:d=>Sn(bn(d)*1.5),color:d=>da(d,"text"),backgroundColor:d=>da(d),fontSize:d=>Ec(d,"inherit"),boxShadow:R("low")},$:[Tr({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),xc(u,{ariaDescribedby:d=>d!=null&&d.elementNode?J("tooltip",d.elementNode):void 0,onMouseEnter:(d,f)=>i(f),onMouseLeave:(d,f)=>m(f),onFocus:(d,f)=>i(f),onBlur:(d,f)=>m(f),onKeyDown:(d,f)=>d.key==="Escape"&&m(f)}),u}import{ElementNode as pa}from"@domphy/core";function ha(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function Ay(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof pa))return;let l=m.domElement;l&&e.set(ha(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof pa))return;let l=m.domElement;if(!l)return;let c=ha(m,u),d=e.get(c);if(!d)return;let f=l.getBoundingClientRect(),h=d.left-f.left,C=d.top-f.top;if(Math.abs(h)<.5&&Math.abs(C)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${h}px, ${C}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let p=!1,b=null,k=()=>{p||(p=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g),l.style.transition="",l.style.transform="")},g=w=>{w.propertyName==="transform"&&k()};s.set(l,()=>{p=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g)}),l.addEventListener("transitionend",g),b=setTimeout(k,o+n+34),t.add(b)}),e.clear()}}}import{toState as kc}from"@domphy/core";import{themeColor as fa,themeSize as wc,themeSpacing as Tc}from"@domphy/theme";function Ky(r={}){var n;let o=kc((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>wc(e,"inherit"),backgroundColor:e=>fa(e),color:e=>fa(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Tc(3),listStyleType:"disc",listStylePosition:"outside"}}}function Wy(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}export{Oc as abbreviation,Nc as accordion,Hc as alert,Wc as avatar,Uc as badge,Qc as blockquote,nm as breadcrumb,sm as breadcrumbEllipsis,Cm as button,Vn as buttonGhost,Dm as buttonSwitch,Rm as card,Nm as code,nu as combobox,cu as command,uu as commandItem,mu as commandSearch,bu as datePicker,Eu as descriptionList,Pu as details,_u as dialog,Hu as divider,Gu as drawer,R as elevation,Qu as emphasis,nd as empty,ad as errorBoundary,ud as fab,fd as figure,S as focusRing,Sd as formGroup,xd as grid,Dd as heading,Ld as horizontalRule,Md as icon,Ad as image,jd as inputCheckbox,Ud as inputColor,ep as inputDateTime,ap as inputFile,mp as inputNumber,pp as inputOTP,bp as inputPassword,kp as inputRadio,Ip as inputRange,Vp as inputSearch,Ap as inputSwitch,jp as inputText,Gp as keyboard,Zp as label,nh as link,ch as linkButton,fh as list,gh as listItem,yh as listItemButton,Ch as mark,Dh as menu,Lh as motion,_h as orderedList,Hh as pagination,qh as panelSection,Xh as paragraph,nf as popover,Tr as popoverArrow,uf as preformated,ff as progress,vf as rating,wf as ringProgress,Vr as row,zf as scrollArea,$f as segmented,Kf as select,Xf as selectBox,og as selectItem,ig as selectList,mg as skeleton,hg as small,bg as spinner,Eg as splitter,wg as splitterHandle,kg as splitterPanel,Pg as stack,Rg as steps,$g as strong,Fg as subscript,qg as superscript,Jg as table,ty as tabs,Ft as tag,ly as textarea,dy as timeline,py as timelineItem,Sy as toast,ky as toggleGroup,Py as toolbar,Iy as toolbarSpacer,_y as tooltip,Ay as transitionGroup,Ky as unorderedList,Wy as visuallyHidden};
2
2
  //# sourceMappingURL=index.js.map