@domphy/ui 0.20.7 → 0.20.9
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/CHANGELOG.md +39 -0
- package/dist/core-theme-ui.global.js +4 -4
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Pt=Object.defineProperty,tr=Object.defineProperties,or=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertyNames,Io=Object.getOwnPropertySymbols;var Vo=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable;var zo=(r,o,n)=>o in r?Pt(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,G=(r,o)=>{for(var n in o||(o={}))Vo.call(o,n)&&zo(r,n,o[n]);if(Io)for(var n of Io(o))ar.call(o,n)&&zo(r,n,o[n]);return r},Ve=(r,o)=>tr(r,nr(o));var ir=(r,o)=>{for(var n in o)Pt(r,n,{get:o[n],enumerable:!0})},lr=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of rr(o))!Vo.call(r,l)&&l!==n&&Pt(r,l,{get:()=>o[l],enumerable:!(e=or(o,l))||e.enumerable});return r};var sr=r=>lr(Pt({},"__esModule",{value:!0}),r);var mi={};ir(mi,{abbreviation:()=>cr,accordion:()=>mr,alert:()=>ur,avatar:()=>dr,badge:()=>pr,blockquote:()=>hr,breadcrumb:()=>gr,breadcrumbEllipsis:()=>fr,button:()=>Sr,buttonGhost:()=>Jt,buttonSwitch:()=>xr,card:()=>vr,code:()=>kr,combobox:()=>Tr,command:()=>Dr,commandItem:()=>Or,commandSearch:()=>Pr,datePicker:()=>Ir,descriptionList:()=>Rr,details:()=>$r,dialog:()=>_r,divider:()=>Mr,drawer:()=>Br,emphasis:()=>Nr,empty:()=>Ar,errorBoundary:()=>Hr,fab:()=>Wr,figure:()=>jr,formGroup:()=>Kr,heading:()=>Gr,horizontalRule:()=>qr,icon:()=>Ur,image:()=>Xr,inputCheckbox:()=>Zr,inputColor:()=>Jr,inputDateTime:()=>Qr,inputFile:()=>ea,inputNumber:()=>ta,inputOTP:()=>oa,inputPassword:()=>aa,inputRadio:()=>ia,inputRange:()=>la,inputSearch:()=>sa,inputSwitch:()=>ca,inputText:()=>ma,keyboard:()=>ua,label:()=>da,link:()=>pa,linkButton:()=>fa,list:()=>ya,listItem:()=>ba,listItemButton:()=>Sa,mark:()=>xa,menu:()=>Ca,motion:()=>va,orderedList:()=>ka,pagination:()=>wa,panelSection:()=>Ta,paragraph:()=>Da,popover:()=>Pa,popoverArrow:()=>yo,preformated:()=>Oa,progress:()=>La,rating:()=>Va,ringProgress:()=>Ra,row:()=>xo,scrollArea:()=>$a,segmented:()=>_a,select:()=>Ma,selectBox:()=>Ba,selectItem:()=>Na,selectList:()=>Aa,skeleton:()=>Ha,small:()=>Fa,spinner:()=>Wa,splitter:()=>ja,splitterHandle:()=>Ya,splitterPanel:()=>Ka,stack:()=>Ga,steps:()=>qa,strong:()=>Ua,subscript:()=>Xa,superscript:()=>Za,table:()=>Ja,tabs:()=>Qa,tag:()=>St,textarea:()=>ei,timeline:()=>ti,timelineItem:()=>oi,toast:()=>ni,toggleGroup:()=>ri,toolbar:()=>ai,toolbarSpacer:()=>ii,tooltip:()=>li,transitionGroup:()=>si,unorderedList:()=>ci});module.exports=sr(mi);var qt=require("@domphy/core"),Re=require("@domphy/theme");function cr(r={}){var e,l;let o=(0,qt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,qt.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Re.themeSize)(t),backgroundColor:t=>(0,Re.themeColor)(t),color:t=>(0,Re.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Re.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,Re.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Re.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,Re.themeColor)(t,"shift-9",n.get(t))}}}}var Xt=require("@domphy/core"),Qe=require("@domphy/theme");var Ut=require("@domphy/theme");function b(r,o="primary"){let n=(0,Ut.themeColor)(r,"surface"),e=(0,Ut.themeColor)(r,"shift-9",o);return`0 0 0 2px ${n}, 0 0 0 4px ${e}`}function mr(r={}){var l,t;let{type:o="single"}=r,n=(0,Xt.toState)((l=r.color)!=null?l:"neutral","color"),e=(0,Xt.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let s=a.domElement;if(!s)return;let c=d=>{let i=d.target.closest("summary");if(!i)return;let m=i.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};s.addEventListener("click",c),a.addHook("Remove",()=>s.removeEventListener("click",c))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,Qe.themeSpacing)((0,Qe.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,Qe.themeColor)(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>(0,Qe.themeColor)(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,Qe.themeColor)(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>b(a,e.get(a))}}}}var Ro=require("@domphy/core"),de=require("@domphy/theme");function ur(r={}){var n;let o=(0,Ro.toState)((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,de.themeSpacing)(3),paddingBlock:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*2),paddingInline:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*4),borderRadius:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,de.themeSpacing)(1)} 0 0 0 ${(0,de.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,de.themeColor)(e,"inherit",o.get(e)),color:e=>(0,de.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,de.themeSize)(e,"inherit")}}}var $o=require("@domphy/core"),We=require("@domphy/theme");function dr(r={}){var n;let o=(0,$o.toState)((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:(0,We.themeSpacing)(9),height:(0,We.themeSpacing)(9),fontSize:e=>(0,We.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,We.themeColor)(e,"inherit",o.get(e)),color:e=>(0,We.themeColor)(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${(0,We.themeColor)(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var Zt=require("@domphy/core"),De=require("@domphy/theme");function pr(r={}){var l;let{label:o=999}=r,n=(0,Zt.toState)(o),e=(0,Zt.toState)((l=r.color)!=null?l:"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:(0,De.themeSpacing)(1.5),minWidth:(0,De.themeSpacing)(5),height:(0,De.themeSpacing)(5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,De.themeSize)(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:(0,De.themeSpacing)(999),backgroundColor:t=>(0,De.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,De.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,De.themeColor)(t,"shift-0",e.get(t))}`}}}}var _o=require("@domphy/core"),be=require("@domphy/theme");function hr(r={}){var n;let o=(0,_o.toState)((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=>(0,be.themeSize)(e,"inherit"),backgroundColor:e=>(0,be.themeColor)(e,"inherit",o.get(e)),color:e=>(0,be.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset ${(0,be.themeSpacing)(1)} 0 0 0 ${(0,be.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*2),paddingInline:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*4),margin:0}}}var Mo=require("@domphy/core"),Pe=require("@domphy/theme");function gr(r={}){var e;let{separator:o="/"}=r,n=(0,Mo.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:l=>{l.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:l=>(0,Pe.themeSize)(l,"inherit"),gap:(0,Pe.themeSpacing)(1),color:l=>(0,Pe.themeColor)(l,"text",n.get(l)),backgroundColor:l=>(0,Pe.themeColor)(l,"inherit",n.get(l)),"& > *":{display:"inline-flex",alignItems:"center",color:l=>(0,Pe.themeColor)(l,"muted",n.get(l))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:l=>(0,Pe.themeColor)(l,"shift-4",n.get(l)),paddingInlineStart:(0,Pe.themeSpacing)(1)},"& > [aria-current=page]":{color:l=>(0,Pe.themeColor)(l,"shift-10",n.get(l)),pointerEvents:"none"}}}}var Bo=require("@domphy/core"),je=require("@domphy/theme");function fr(r={}){var n;let o=(0,Bo.toState)((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=>(0,je.themeSize)(e,"inherit"),paddingInline:(0,je.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,je.themeColor)(e,"muted",o.get(e)),borderRadius:(0,je.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,je.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,je.themeColor)(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>b(e,o.get(e))}}}}var Ao=require("@domphy/core"),B=require("@domphy/theme");var pt={small:"decrease-1",medium:"inherit",large:"increase-1"};var No=require("@domphy/core"),le=require("@domphy/theme");var yr={small:.5,medium:1,large:1.5};function Jt(r={}){var l,t,a;let o=(0,No.toState)((l=r.color)!=null?l:"neutral","color"),n=yr[(t=r.size)!=null?t:"medium"],e=pt[(a=r.size)!=null?a:"medium"];return{_onInsert:s=>{s.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:s=>(0,le.themeSize)(s,e),paddingBlock:s=>(0,le.themeSpacing)((0,le.themeDensity)(s)*n),paddingInline:s=>(0,le.themeSpacing)((0,le.themeDensity)(s)*n),borderRadius:s=>(0,le.themeSpacing)((0,le.themeDensity)(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>(0,le.themeSpacing)((0,le.themeDensity)(s)*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:s=>(0,le.themeColor)(s,"shift-6",o.get(s)),"&:hover:not([disabled]):not([aria-busy=true])":{color:s=>(0,le.themeColor)(s,"text",o.get(s)),backgroundColor:s=>(0,le.themeColor)(s,"hover",o.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{color:s=>(0,le.themeColor)(s,"text",o.get(s)),backgroundColor:s=>(0,le.themeColor)(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>b(s,o.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:s=>(0,le.themeColor)(s,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var br={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Sr(r={}){var a,s,c,d;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return Jt({color:r.color,size:r.size});let n=(0,Ao.toState)((s=r.color)!=null?s:"primary","color"),e=o==="solid",l=br[(c=r.size)!=null?c:"medium"],t=pt[(d=r.size)!=null?d:"medium"];return Ve(G({_onInsert:i=>{i.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:i=>(0,B.themeSize)(i,t),paddingBlock:i=>(0,B.themeSpacing)((0,B.themeDensity)(i)*l.block),paddingInline:i=>(0,B.themeSpacing)((0,B.themeDensity)(i)*l.inline),borderRadius:i=>(0,B.themeSpacing)((0,B.themeDensity)(i)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:i=>(0,B.themeSpacing)((0,B.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":i=>`1px solid ${(0,B.themeColor)(i,"border-strong",n.get(i))}`,color:i=>e?(0,B.themeColor)(i,"shift-0","neutral"):(0,B.themeColor)(i,"shift-13",n.get(i)),backgroundColor:i=>e?(0,B.themeColor)(i,"shift-8",n.get(i)):(0,B.themeColor)(i,"inherit",n.get(i)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:i=>e?(0,B.themeColor)(i,"shift-0","neutral"):(0,B.themeColor)(i,"shift-14",n.get(i)),backgroundColor:i=>e?(0,B.themeColor)(i,"shift-9",n.get(i)):(0,B.themeColor)(i,"hover",n.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:i=>e?(0,B.themeColor)(i,"shift-10",n.get(i)):(0,B.themeColor)(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>b(i,n.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:i=>(0,B.themeColor)(i,"shift-2","neutral"),outline:i=>`1px solid ${(0,B.themeColor)(i,"border-strong","neutral")}`,color:i=>(0,B.themeColor)(i,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}var Ot=require("@domphy/core"),q=require("@domphy/theme");function xr(r={}){var t,a;let{checked:o=!1}=r,n=(0,Ot.toState)(o),e=(0,Ot.toState)((t=r.color)!=null?t:"neutral","color"),l=(0,Ot.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>n.get(s),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>(0,q.themeSize)(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${(0,q.themeColor)(s,"border",e.get(s))}`,minWidth:(0,q.themeSpacing)(12),minHeight:(0,q.themeSpacing)(6),borderRadius:(0,q.themeSpacing)(999),paddingLeft:(0,q.themeSpacing)(7),paddingRight:(0,q.themeSpacing)(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:s=>(0,q.themeColor)(s,"inherit",e.get(s)),color:s=>(0,q.themeColor)(s,"text",e.get(s)),"&:focus-visible":{boxShadow:s=>b(s,l.get(s))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,q.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,q.themeSpacing)(5),height:(0,q.themeSpacing)(5),borderRadius:(0,q.themeSpacing)(999),color:s=>(0,q.themeColor)(s,"text"),backgroundColor:s=>(0,q.themeColor)(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>(0,q.themeColor)(s,"increase-3",l.get(s)),outline:"none",color:s=>(0,q.themeColor)(s,"decrease-2"),paddingLeft:(0,q.themeSpacing)(2),paddingRight:(0,q.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,q.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Ho=require("@domphy/core"),I=require("@domphy/theme");var Cr={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){return Cr[r]}function vr(r={}){var n;let o=(0,Ho.toState)((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=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),backgroundColor:e=>(0,I.themeColor)(e,"inherit",o.get(e)),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,I.themeColor)(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:_("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*4),fontWeight:"600",color:e=>(0,I.themeColor)(e,"shift-11",o.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*4),paddingBottom:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),color:e=>(0,I.themeColor)(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*4),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,I.themeSpacing)(2),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,I.themeColor)(e,"border",o.get(e))}`}}}}var Fo=require("@domphy/core"),Ke=require("@domphy/theme");function kr(r={}){var n;let o=(0,Fo.toState)((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=>(0,Ke.themeSize)(e,"inherit"),color:e=>(0,Ke.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Ke.themeColor)(e,"inherit",o.get(e)),height:(0,Ke.themeSpacing)(6),paddingInline:(0,Ke.themeSpacing)(1.5),borderRadius:(0,Ke.themeSpacing)(1)}}}var et=require("@domphy/core"),W=require("@domphy/theme");var ht=require("@domphy/core"),$e=require("@domphy/floating");function Er(r,o){var R;let{openState:n,placement:e,content:l,keepOpenOnContentHover:t}=o,a=null,s=null,c=null,d=null,i=!1,m=r.domElement,y=r.getRoot(),g={style:{position:"fixed",pointerEvents:"auto",visibility:w=>n.get(w)?"visible":"hidden"},onKeyDown:w=>{w.key==="Escape"&&C()},onMouseEnter:()=>t&&v(),onMouseLeave:()=>t&&C(),_onMount:w=>{var $;if(c=w.domElement,m&&c&&!c.hasAttribute("data-theme")){let Te=($=m.closest("[data-theme]"))==null?void 0:$.getAttribute("data-theme");Te&&c.setAttribute("data-theme",Te)}},_portal:w=>{let $=w.domElement.querySelector("#domphy-floating");if(!$){let Te={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};$=w.children.insert(Te).domElement}return $}},u=w=>(0,ht.merge)(w,g);u(l);let p=()=>{i||(i=!0,d=y.children.insert(l))},h=()=>{p(),m&&c&&(s==null||s(),s=(0,$e.autoUpdate)(m,c,()=>{(0,$e.computePosition)(m,c,{placement:e.get(),middleware:[(0,$e.offset)(12),(0,$e.flip)(),(0,$e.shift)()],strategy:"fixed"}).then(({x:w,y:$,placement:Te})=>{c&&(Object.assign(c.style,{left:`${w}px`,top:`${$}px`}),e.set(Te))})}),n.set(!0))},x=()=>{s==null||s(),s=null,d&&(d.remove(),d=null),c=null,i=!1,n.set(!1)},v=()=>{a&&clearTimeout(a),a=setTimeout(h,100)},C=()=>{a&&clearTimeout(a),a=setTimeout(x,100)},O=w=>{if(!n.get()||!m||!c)return;let $=w.target;!m.contains($)&&!c.contains($)&&C()};return(R=y.domElement)==null||R.addEventListener("click",O),{show:v,hide:C,update(w){n=w.openState,e=w.placement,l=w.content,t=w.keepOpenOnContentHover,u(l),d&&d.patch(l)},destroy(){var w;a&&clearTimeout(a),s==null||s(),d==null||d.remove(),(w=y.domElement)==null||w.removeEventListener("click",O)}}}function _e(r){let{kind:o,open:n=!1,placement:e}=r,l=(0,ht.toState)(n),t=`floating:${o}`,a=d=>{var i;return(i=d==null?void 0:d.getBehavior(t))==null?void 0:i.show()},s=d=>{var i;return(i=d==null?void 0:d.getBehavior(t))==null?void 0:i.hide()},c=G({onKeyDown:(d,i)=>d.key==="Escape"&&s(i)},(0,ht.behavior)(t,Er,{openState:l,placement:e,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:c}}var Wo=require("@domphy/core"),me=require("@domphy/theme");var wr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function St(r={}){var e;let{removable:o=!1}=r,n=(0,Wo.toState)((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:l=>{let t={span:wr,onClick:a=>{a.stopPropagation(),l.remove()},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:(0,me.themeSpacing)(1),width:(0,me.themeSpacing)(4),height:(0,me.themeSpacing)(4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:a=>(0,me.themeColor)(a,"shift-4",n.get(a))},"&:focus-visible":{boxShadow:a=>b(a,n.get(a))}}};o&&l.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:(0,me.themeSpacing)(6),paddingBlock:0,borderRadius:(0,me.themeSpacing)(999),paddingInlineStart:(0,me.themeSpacing)(2.5),paddingInlineEnd:o?(0,me.themeSpacing)(1):(0,me.themeSpacing)(2.5),gap:(0,me.themeSpacing)(1.5),fontSize:l=>(0,me.themeSize)(l,"decrease-1"),backgroundColor:l=>(0,me.themeColor)(l,"inherit",n.get(l)),color:l=>(0,me.themeColor)(l,"text",n.get(l)),border:"none",outlineOffset:"-1px",outline:l=>`1px solid ${(0,me.themeColor)(l,"border-strong",n.get(l))}`}}}function Tr(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:l=!1,multiple:t=!1}=r,a=(0,et.toState)(r.value),s=(0,et.toState)(l),{show:c,hide:d,anchorPartial:i}=_e({kind:"combobox",open:s,placement:(0,et.toState)(n),content:r.content}),m={onClick:(h,x)=>!t&&d(x),dataTone:"shift-14",style:{backgroundColor:h=>(0,W.themeColor)(h,"inherit"),borderRadius:h=>(0,W.themeSpacing)((0,W.themeDensity)(h)*2),outline:h=>`1px solid ${(0,W.themeColor)(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,et.merge)(r.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,W.themeSpacing)(6),marginInlineStart:(0,W.themeSpacing)(2),fontSize:h=>(0,W.themeSize)(h,"inherit"),color:h=>(0,W.themeColor)(h,"text",e),backgroundColor:h=>(0,W.themeColor)(h,"inherit",e)},g;if(r.input){let h={onFocus:(x,v)=>c(v),style:y,_key:"combobox-input"};(0,et.merge)(r.input,h),g=r.input}else g={input:null,onFocus:(h,x)=>c(x),value:h=>(a.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let x=a.get(h),v=Array.isArray(x)?x:[x],O=o.filter(R=>v.includes(R.value)).map(R=>({span:R.label,$:[St({color:e,removable:!0})],_key:R.value,_onRemove:w=>{let $=a.get(),nt=(Array.isArray($)?$:[$]).filter(Ze=>Ze!==R.value);t?a.set(nt):a.set(nt[0])}}));return O.push(g),O},style:{display:"flex",flexWrap:"wrap",gap:(0,W.themeSpacing)(1)}},p={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:(0,W.themeSpacing)(32),outlineOffset:"-1px",outline:h=>`1px solid ${(0,W.themeColor)(h,"border-strong","neutral")}`,paddingBlock:h=>(0,W.themeSpacing)((0,W.themeDensity)(h)*1),paddingInline:h=>(0,W.themeSpacing)((0,W.themeDensity)(h)*1),borderRadius:h=>(0,W.themeSpacing)((0,W.themeDensity)(h)*1.5),fontSize:h=>(0,W.themeSize)(h,"inherit"),color:h=>(0,W.themeColor)(h,"text",e),backgroundColor:h=>(0,W.themeColor)(h,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:h=>b(h,e)}}};return(0,et.merge)(i,p),i}var Lt=require("@domphy/core"),X=require("@domphy/theme");function Dr(){return{_onSchedule:(r,o)=>{(0,Lt.merge)(o,{_context:{command:{query:(0,Lt.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Pr(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 l=e.getContext("command");if(!l){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>l.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,X.themeSize)(e,"inherit"),paddingInline:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*3),paddingBlock:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,X.themeColor)(e,"border",o)}`,outline:"none",color:e=>(0,X.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,X.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,X.themeColor)(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,X.themeColor)(e,"shift-6",n),boxShadow:e=>b(e,n)}}}}function Or(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{role:"option",_onMount:e=>{var d,i;let l=e.getContext("command");if(!l){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(i=(d=t.textContent)==null?void 0:d.toLowerCase())!=null?i:"",s=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};s(l.query.get());let c=l.query.addListener(s);e.addHook("Remove",c)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,X.themeSize)(e,"inherit"),height:e=>(0,X.themeSpacing)(6+(0,X.themeDensity)(e)*2),paddingInline:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,X.themeColor)(e,"text",o),backgroundColor:e=>(0,X.themeColor)(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:e=>(0,X.themeColor)(e,"hover",o)},"&:focus-visible":{boxShadow:e=>b(e,n)}}}}var ve=require("@domphy/core"),k=require("@domphy/theme");var ce=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),rt=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Qt=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),xt=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),eo=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,to=(r,o)=>rt(r,-((r.getDay()-o+7)%7));function Lr(r){var o,n;try{let e=new Intl.Locale(r),l=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(l!=null&&l.firstDay)return l.firstDay%7}catch(e){}return 0}function Ir(r={}){var Do,Po,Oo,Lo;let{mode:o="single",time:n=!1,min:e,max:l,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:c}=r,d=(Do=r.weekStartsOn)!=null?Do:Lr(a),i=(0,ve.toState)((Po=r.accentColor)!=null?Po:"primary","accentColor"),m=(0,ve.toState)((Oo=r.placement)!=null?Oo:"bottom-start"),y=(0,ve.toState)((Lo=r.value)!=null?Lo:o==="range"?[null,null]:null),g=c?y.addListener(f=>c(f)):null,u=(()=>{let f=y.get(),S=o==="range"?f==null?void 0:f[0]:f;return S instanceof Date?S:new Date})(),p=(0,ve.toState)(u.getFullYear(),"viewYear"),h=(0,ve.toState)(u.getMonth(),"viewMonth"),x=(0,ve.toState)(ce(u),"focused"),v=(0,ve.toState)(null,"hovered"),C=(0,ve.toState)(u.getHours(),"hour"),O=(0,ve.toState)(u.getMinutes(),"minute"),R=null,w=new Intl.DateTimeFormat(a,G({dateStyle:"medium"},n?{timeStyle:"short"}:{})),$=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),Te=new Intl.DateTimeFormat(a,{weekday:"short"}),nt=new Intl.DateTimeFormat(a,{dateStyle:"full"}),Ze=f=>f?w.format(f):"",Nn=f=>{if(s)return s(f);if(o==="range"){let[S,E]=f!=null?f:[null,null];return S?`${Ze(S)} \u2013 ${Ze(E)}`:""}return Ze(f)},An=Array.from({length:7},(f,S)=>Te.format(new Date(2023,0,1+(S+d)%7))),ko=f=>!!e&&ce(f)<ce(e)||!!l&&ce(f)>ce(l)||!!t&&t(f),Je=f=>{if(!n)return ce(f);let S=ce(f);return S.setHours(C.get(),O.get(),0,0),S},Eo=f=>{var D;if(ko(f))return;if(o==="single"){y.set(Je(f)),n||Yt();return}let[S,E]=(D=y.get())!=null?D:[null,null];!S||S&&E?y.set([Je(f),null]):ce(f)<ce(S)?(y.set([Je(f),Je(S)]),n||Yt()):(y.set([S,Je(f)]),n||Yt())},Hn=()=>{var f;if(n)if(o==="single"){let S=y.get();S&&y.set(Je(S))}else{let[S,E]=(f=y.get())!=null?f:[null,null];y.set([S&&Je(S),E&&Je(E)])}},Fn=(f,S)=>{var dt;if(o!=="range")return!1;let[E,D]=(dt=y.get(S))!=null?dt:[null,null],U=D!=null?D:v.get(S);if(!E||!U)return!1;let P=ce(E)<=ce(U)?E:U,Ce=ce(E)<=ce(U)?U:E,ge=ce(f);return ge>=ce(P)&&ge<=ce(Ce)},Wn=(f,S)=>{let E=y.get(S);if(o==="range"){let[D,U]=E!=null?E:[null,null];return xt(f,D)||xt(f,U)}return xt(f,E)},Dt=f=>{p.set(f.getFullYear()),h.set(f.getMonth())},wo=f=>{let S=Qt(new Date(p.get(),h.get(),1),f);Dt(S)},To=f=>p.set(p.get()+f),jt=()=>{setTimeout(()=>{var f;(f=R==null?void 0:R.querySelector(`[data-date="${eo(x.get())}"]`))==null||f.focus()},0)},jn=Un(),{show:Kn,hide:Yn,anchorPartial:Kt}=_e({kind:"datePicker",open:!1,placement:m,content:jn});function Yt(){Yn()}Kt.onClick=()=>{};let Gn={type:"text",readonly:!0,value:f=>Nn(y.get(f)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(f,S)=>{Gt(S)},onFocus:(f,S)=>{Gt(S)},onKeyDown:(f,S)=>{let E=f.key;(E==="ArrowDown"||E==="Enter")&&(f.preventDefault(),Gt(S))},_onMount:f=>g&&f.addHook("Remove",()=>{g()})};function Gt(f){var E;let S=(E=qn())!=null?E:new Date;x.set(ce(S)),Dt(S),Kn(f),jt()}function qn(){var S;let f=y.get();return o==="range"?(S=f==null?void 0:f[0])!=null?S:null:f!=null?f:null}return(0,ve.merge)(Kt,Gn),Kt;function Un(){let f=(P,Ce,ge)=>({button:P,type:"button",ariaLabel:Ce,onClick:ge,style:zr()}),S={div:[f("\xAB","Previous year",()=>To(-1)),f("\u2039","Previous month",()=>wo(-1)),{div:P=>$.format(new Date(p.get(P),h.get(P),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:P=>(0,k.themeSize)(P)}},f("\u203A","Next month",()=>wo(1)),f("\xBB","Next year",()=>To(1))],style:{display:"flex",alignItems:"center",gap:(0,k.themeSpacing)(1),marginBottom:(0,k.themeSpacing)(2)}},E={div:An.map((P,Ce)=>({div:P,style:{textAlign:"center",fontSize:ge=>(0,k.themeSize)(ge,"decrease-1"),fontWeight:"bold",color:ge=>(0,k.themeColor)(ge,"shift-7"),paddingBlock:(0,k.themeSpacing)(1)},_key:Ce})),role:"row",style:jo()},D={div:P=>Xn(P),role:"grid",ariaLabel:"Calendar",onKeyDown:er,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:(0,k.themeSpacing)(.5)}},U=[S,E,D];return n&&U.push(Jn()),U.push(Qn()),{div:U,role:"dialog",ariaModal:"false",_onMount:P=>{R=P.domElement},style:{minWidth:(0,k.themeSpacing)(70),padding:(0,k.themeSpacing)(3),borderRadius:P=>(0,k.themeSpacing)((0,k.themeDensity)(P)*2),backgroundColor:P=>(0,k.themeColor)(P,"base"),color:P=>(0,k.themeColor)(P,"shift-10"),border:P=>`1px solid ${(0,k.themeColor)(P,"border-strong")}`,boxShadow:_("medium")}}}function Xn(f){let S=new Date(p.get(f),h.get(f),1),E=h.get(f),D=to(S,d),U=[];for(let P=0;P<6;P++){let Ce=[];for(let ge=0;ge<7;ge++){let dt=rt(D,P*7+ge);Ce.push(Zn(dt,E,f))}U.push({div:Ce,role:"row",style:jo(),_key:P})}return U}function Zn(f,S,E){let D=ko(f),U=Wn(f,E),P=Fn(f,E),Ce=f.getMonth()!==S,ge=xt(f,x.get(E)),dt=xt(f,new Date);return{button:String(f.getDate()),type:"button",role:"gridcell",tabIndex:ge?0:-1,ariaSelected:U,ariaDisabled:D,disabled:D,ariaLabel:nt.format(f),dataDate:eo(f),onClick:()=>Eo(f),onMouseEnter:()=>o==="range"&&v.set(f),style:{appearance:"none",border:"none",cursor:D?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,k.themeSpacing)(1),fontSize:Q=>(0,k.themeSize)(Q),fontFamily:"inherit",opacity:D?.35:Ce?.5:1,backgroundColor:Q=>U?(0,k.themeColor)(Q,"shift-7",i.get(Q)):P?(0,k.themeColor)(Q,"hover",i.get(Q)):"transparent",color:Q=>U?(0,k.themeColor)(Q,"shift-0",i.get(Q)):(0,k.themeColor)(Q,"text"),outline:dt?Q=>`1px solid ${(0,k.themeColor)(Q,"shift-6",i.get(Q))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:Q=>U?(0,k.themeColor)(Q,"shift-7",i.get(Q)):(0,k.themeColor)(Q,"shift-3",i.get(Q))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:Q=>b(Q,i.get(Q))}},_key:eo(f)}}function Jn(){let f=(S,E,D)=>({select:Array.from({length:S},(U,P)=>({option:String(P).padStart(2,"0"),value:String(P),selected:Ce=>E.get(Ce)===P,_key:P})),ariaLabel:D,onChange:U=>{E.set(Number(U.target.value)),Hn()},style:Vr()});return{div:[f(24,C,"Hour"),{span:":",style:{fontWeight:"bold"}},f(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,k.themeSpacing)(1),marginTop:(0,k.themeSpacing)(3)}}}function Qn(){let f=(S,E)=>({button:S,type:"button",onClick:E,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:D=>(0,k.themeSize)(D,"decrease-1"),color:D=>(0,k.themeColor)(D,"muted",i.get(D)),padding:(0,k.themeSpacing)(1)}});return{div:[f("Today",()=>{let S=new Date;x.set(ce(S)),Dt(S),jt()}),f("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,k.themeSpacing)(2),paddingTop:(0,k.themeSpacing)(2),borderTop:S=>`1px solid ${(0,k.themeColor)(S,"border")}`}}}function er(f){let S=f,E=x.get(),D=null;switch(S.key){case"ArrowLeft":D=rt(E,-1);break;case"ArrowRight":D=rt(E,1);break;case"ArrowUp":D=rt(E,-7);break;case"ArrowDown":D=rt(E,7);break;case"Home":D=to(E,d);break;case"End":D=rt(to(E,d),6);break;case"PageUp":D=Qt(E,S.shiftKey?-12:-1);break;case"PageDown":D=Qt(E,S.shiftKey?12:1);break;case"Enter":case" ":S.preventDefault(),Eo(E);return;default:return}S.preventDefault(),x.set(D),Dt(D),jt()}}function jo(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,k.themeSpacing)(.5)}}function zr(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,k.themeSize)(r),color:r=>(0,k.themeColor)(r,"muted"),width:(0,k.themeSpacing)(7),height:(0,k.themeSpacing)(7),borderRadius:(0,k.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,k.themeColor)(r,"shift-3")}}}function Vr(){return{fontFamily:"inherit",fontSize:r=>(0,k.themeSize)(r),padding:(0,k.themeSpacing)(1),borderRadius:(0,k.themeSpacing)(1),border:r=>`1px solid ${(0,k.themeColor)(r,"border-strong")}`,backgroundColor:r=>(0,k.themeColor)(r,"base"),color:r=>(0,k.themeColor)(r,"text")}}var Ko=require("@domphy/core"),Ye=require("@domphy/theme");function Rr(r={}){var n;let o=(0,Ko.toState)((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(${(0,Ye.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,Ye.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,Ye.themeSize)(e,"inherit"),color:e=>(0,Ye.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,Ye.themeSize)(e,"inherit"),color:e=>(0,Ye.themeColor)(e,"text",o.get(e))}}}}var oo=require("@domphy/core"),L=require("@domphy/theme");function $r(r={}){var l,t;let{duration:o=240}=r,n=(0,oo.toState)((l=r.color)!=null?l:"neutral","color"),e=(0,oo.toState)((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=>(0,L.themeSize)(a,"inherit"),color:a=>(0,L.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,L.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,L.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,L.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,L.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,L.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*4),height:(0,L.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,L.themeSpacing)(2),height:(0,L.themeSpacing)(2),flexShrink:0,marginTop:`-${(0,L.themeSpacing)(.5)}`,borderInlineEnd:a=>`${(0,L.themeSpacing)(.5)} solid ${(0,L.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,L.themeSpacing)(.5)} solid ${(0,L.themeColor)(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,L.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*2),boxShadow:a=>b(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:(0,L.themeSpacing)(250),opacity:1,paddingTop:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*1),paddingBottom:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*3)}}}}var Go=require("@domphy/core"),ke=require("@domphy/theme");var Ct=0;function It(){Ct++,Ct===1&&(document.body.style.overflow="hidden")}function gt(){Ct=Math.max(0,Ct-1),Ct===0&&(document.body.style.overflow="")}var Yo='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function _r(r={}){let{color:o="neutral",open:n=!1}=r,e=(0,Go.toState)(n),l=null,t=!1,a=!1,s=c=>{t=!1,typeof c.close=="function"&&c.close(),c.style.visibility="hidden",c.style.pointerEvents="none",a&&(gt(),a=!1),l==null||l.focus(),l=null};return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(c,d)=>{if(c.target!==d.domElement)return;let i=d.domElement.getBoundingClientRect();c.clientX>=i.left&&c.clientX<=i.right&&c.clientY>=i.top&&c.clientY<=i.bottom||e.set(!1)},onTransitionEnd:(c,d)=>{t&&c.target===d.domElement&&c.propertyName==="opacity"&&s(d.domElement)},_onMount:c=>{let d=c.domElement;d.setAttribute("aria-modal","true");let i=null,m=p=>{if(p.key!=="Tab")return;let h=Array.from(d.querySelectorAll(Yo)).filter(C=>!C.closest("[aria-hidden='true']")&&C.offsetParent!==null);if(!h.length){p.preventDefault();return}let x=h[0],v=h[h.length-1];p.shiftKey?(document.activeElement===x||document.activeElement===d)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),x.focus())},y=p=>{p.preventDefault(),e.set(!1)};d.addEventListener("cancel",y);let g=p=>{p?(l=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),a||(It(),a=!0),d.addEventListener("keydown",m),requestAnimationFrame(()=>{d.style.opacity="1";let h=d.querySelector(Yo);h==null||h.focus()})):(t=!0,d.style.opacity="0",d.removeEventListener("keydown",m),i=setTimeout(()=>{i=null,t&&s(d)},350))};g(e.get());let u=e.addListener(g);c.addHook("Remove",()=>{i&&(clearTimeout(i),i=null),u(),d.removeEventListener("cancel",y),a&&(gt(),a=!1),d.removeEventListener("keydown",m),l==null||l.focus(),l=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:c=>(0,ke.themeSize)(c,"inherit"),color:c=>(0,ke.themeColor)(c,"shift-10",o),backgroundColor:c=>(0,ke.themeColor)(c,"inherit",o),border:"none",borderRadius:c=>(0,ke.themeSpacing)((0,ke.themeDensity)(c)*2),padding:c=>(0,ke.themeSpacing)((0,ke.themeDensity)(c)*3),boxShadow:_("high"),"&::backdrop":{backgroundColor:c=>(0,ke.themeColor)(c,"shift-2","neutral"),opacity:.75}}}}var qo=require("@domphy/core"),Ge=require("@domphy/theme");function Mr(r={}){var n;let o=(0,qo.toState)((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:(0,Ge.themeSpacing)(2),fontSize:e=>(0,Ge.themeSize)(e,"inherit"),backgroundColor:e=>(0,Ge.themeColor)(e),color:e=>(0,Ge.themeColor)(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,Ge.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,Ge.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var Zo=require("@domphy/core"),Ee=require("@domphy/theme");var no={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Uo={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},vt=r=>r==="left"||r==="right";function Xo(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function Br(r={}){let{color:o="neutral",open:n=!1,placement:e="end",size:l}=r,t=(0,Zo.toState)(n),a=e==="start"||e==="end",s=Xo(e,!1),c=vt(s)?(0,Ee.themeSpacing)(80):(0,Ee.themeSpacing)(64),d=l!=null?l:c;return{_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(i,m)=>{i.target===m.domElement&&t.set(!1)},_onMount:i=>{let m=i.domElement;m.setAttribute("aria-modal","true");let y=w=>{w.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let g=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=Xo(e,g);a&&(m.style.transform=no[u],m.style.margin=Uo[u],m.style.width=vt(u)?d:"100dvw",m.style.height=vt(u)?"100dvh":d);let p=!1,h=!1,x=null,v=()=>{x=null,p&&(p=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",h&&(gt(),h=!1))},C=w=>{w.target===m&&w.propertyName==="transform"&&v()};m.addEventListener("transitionend",C);let O=w=>{w?(p=!1,m.style.visibility="visible",m.style.pointerEvents="auto",typeof m.showModal=="function"&&m.showModal(),h||(It(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(p=!0,m.style.transform=no[u],x=setTimeout(v,350))};O(t.get());let R=t.addListener(O);i.addHook("Remove",()=>{x&&(clearTimeout(x),x=null),R(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",C),h&&(gt(),h=!1)})},style:{transform:no[s],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:i=>(0,Ee.themeSize)(i,"inherit"),color:i=>(0,Ee.themeColor)(i,"shift-10",o),backgroundColor:i=>(0,Ee.themeColor)(i,"inherit",o),border:"none",padding:i=>(0,Ee.themeSpacing)((0,Ee.themeDensity)(i)*3),margin:Uo[s],width:vt(s)?d:"100dvw",height:vt(s)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:_("high"),"&::backdrop":{backgroundColor:i=>(0,Ee.themeColor)(i,"shift-2","neutral"),opacity:.75}}}}var Jo=require("@domphy/core"),zt=require("@domphy/theme");function Nr(r={}){var n;let o=(0,Jo.toState)((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=>(0,zt.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,zt.themeColor)(e,"shift-10",o.get(e))}}}var Qo=require("@domphy/core"),tt=require("@domphy/theme");function Ar(r={}){var n;let o=(0,Qo.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,tt.themeSpacing)(3),paddingBlock:(0,tt.themeSpacing)(12),paddingInline:(0,tt.themeSpacing)(6),textAlign:"center",color:e=>(0,tt.themeColor)(e,"muted",o.get(e)),"& > :first-child":{color:e=>(0,tt.themeColor)(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,tt.themeColor)(e,"text",o.get(e))}}}}function Hr(r={}){return{_onError:(o,n,e)=>{var t,a;(t=r.onError)==null||t.call(r,n);let l=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([l])}}}var en=require("@domphy/core"),qe=require("@domphy/theme");var Fr={small:8,medium:10,large:14};function Wr(r={}){var e,l;let o=(0,en.toState)((e=r.color)!=null?e:"primary","color"),n=(0,qe.themeSpacing)(Fr[(l=r.size)!=null?l:"medium"]);return{_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=>(0,qe.themeSize)(t,"inherit"),backgroundColor:t=>(0,qe.themeColor)(t,"shift-8",o.get(t)),color:t=>(0,qe.themeColor)(t,"shift-0","neutral"),boxShadow:_("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,qe.themeColor)(t,"shift-9",o.get(t)),boxShadow:_("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,qe.themeColor)(t,"shift-10",o.get(t)),boxShadow:_("low")},"&:focus-visible":{boxShadow:t=>`${_("medium")}, ${b(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var tn=require("@domphy/core"),Me=require("@domphy/theme");function jr(r={}){var n;let o=(0,tn.toState)((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:(0,Me.themeSpacing)(2),marginInline:0,marginTop:(0,Me.themeSpacing)(3),marginBottom:(0,Me.themeSpacing)(3),color:e=>(0,Me.themeColor)(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,Me.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,Me.themeSize)(e,"decrease-1"),color:e=>(0,Me.themeColor)(e,"muted",o.get(e)),lineHeight:1.45}}}}var on=require("@domphy/core"),N=require("@domphy/theme");function Kr(r={}){var l;let{layout:o="horizontal"}=r,n=(0,on.toState)((l=r.color)!=null?l:"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=>(0,N.themeSpacing)((0,N.themeDensity)(t)*3),paddingBlock:t=>(0,N.themeSpacing)((0,N.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,N.themeSpacing)((0,N.themeDensity)(t)*2),fontSize:t=>(0,N.themeSize)(t,"inherit"),backgroundColor:t=>(0,N.themeColor)(t,"inherit",n.get(t)),color:t=>(0,N.themeColor)(t,"text",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,N.themeSpacing)(4),rowGap:(0,N.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,N.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,N.themeSpacing)((0,N.themeDensity)(t)*1),borderRadius:t=>(0,N.themeSpacing)((0,N.themeDensity)(t)*2),color:t=>(0,N.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,N.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:(0,N.themeSpacing)((0,N.themeDensity)(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(${(0,N.themeSpacing)(2)} * -1)`,fontSize:t=>(0,N.themeSize)(t,"decrease-1"),color:t=>(0,N.themeColor)(t,"text",n.get(t))}}}}var nn=require("@domphy/core"),ft=require("@domphy/theme"),Yr={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Gr(r={}){var n;let o=(0,nn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>(0,ft.themeColor)(e,"shift-11",o.get(e)),marginTop:0,marginBottom:(0,ft.themeSpacing)(2),fontSize:e=>{let l=Yr[e.elementNode.tagName]||"inherit";return(0,ft.themeSize)(e,l)}}}}var rn=require("@domphy/core"),yt=require("@domphy/theme");function qr(r={}){var n;let o=(0,rn.toState)((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:(0,yt.themeSpacing)(3),marginBottom:(0,yt.themeSpacing)(3),backgroundColor:e=>(0,yt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,yt.themeColor)(e,"text",o.get(e))}}}var an=require("@domphy/core"),at=require("@domphy/theme");function Ur(r={}){var n;let o=(0,an.toState)((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:(0,at.themeSpacing)(4),height:(0,at.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,at.themeSize)(e),backgroundColor:"transparent",color:e=>(0,at.themeColor)(e,"text",o.get(e))}}}var ln=require("@domphy/core"),kt=require("@domphy/theme");function Xr(r={}){var n;let o=(0,ln.toState)((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:(0,kt.themeSpacing)(2),backgroundColor:e=>(0,kt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,kt.themeColor)(e,"text",o.get(e))}}}var ro=require("@domphy/core"),K=require("@domphy/theme");function Zr(r={}){var e,l;let o=(0,ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ro.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,K.themeSize)(t,"inherit"),color:t=>(0,K.themeColor)(t,"text",o.get(t)),display:"inline-flex",position:"relative",width:(0,K.themeSpacing)(6),height:(0,K.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,K.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,K.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,K.themeColor)(t,"text",o.get(t)),width:(0,K.themeSpacing)(4),height:(0,K.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,K.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,K.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,K.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,K.themeColor)(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,K.themeSpacing)(.5)} solid ${(0,K.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,K.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,K.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,K.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,K.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,K.themeSpacing)(1.5),boxShadow:t=>b(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,K.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var sn=require("@domphy/core"),oe=require("@domphy/theme");function Jr(r={}){var n;let o=(0,sn.toState)((n=r.color)!=null?n:"neutral","color");return{type:"color",_onSchedule:(e,l)=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),l.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,oe.themeSize)(e,"inherit"),color:e=>(0,oe.themeColor)(e,"text",o.get(e)),paddingBlock:e=>(0,oe.themeSpacing)((0,oe.themeDensity)(e)*1),paddingInline:e=>(0,oe.themeSpacing)((0,oe.themeDensity)(e)*1),blockSize:e=>(0,oe.themeSpacing)(6+(0,oe.themeDensity)(e)*2),inlineSize:e=>(0,oe.themeSpacing)(6+(0,oe.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,oe.themeSpacing)((0,oe.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>b(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,oe.themeSpacing)((0,oe.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,oe.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,oe.themeColor)(e,"border-strong","neutral")}`}}}}var ao=require("@domphy/core"),ne=require("@domphy/theme");function Qr(r={}){var l,t;let{mode:o="datetime-local"}=r,n=(0,ao.toState)((l=r.color)!=null?l:"neutral","color"),e=(0,ao.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=o},style:{fontFamily:"inherit",fontSize:a=>(0,ne.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,ne.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,ne.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ne.themeColor)(a,"border-strong",n.get(a))}`,borderRadius:a=>(0,ne.themeSpacing)((0,ne.themeDensity)(a)*1.5),paddingInline:a=>(0,ne.themeSpacing)((0,ne.themeDensity)(a)*3),height:a=>(0,ne.themeSpacing)(6+(0,ne.themeDensity)(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 ${(0,ne.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>b(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,ne.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,ne.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,ne.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,ne.themeSpacing)(.5)} solid ${(0,ne.themeColor)(a,"shift-6","error")}`}}}}var io=require("@domphy/core"),A=require("@domphy/theme");function ea(r={}){var e,l;let o=(0,io.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,io.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,A.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,A.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,A.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,A.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,A.themeSpacing)((0,A.themeDensity)(t)*1.5),height:t=>(0,A.themeSpacing)(6+(0,A.themeDensity)(t)*2),paddingInline:t=>(0,A.themeSpacing)((0,A.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,A.themeSpacing)((0,A.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,A.themeSpacing)(1),height:(0,A.themeSpacing)(6),paddingInline:(0,A.themeSpacing)(2),cursor:"pointer",color:t=>(0,A.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,A.themeColor)(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,A.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,A.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,A.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,A.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,A.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,A.themeColor)(t,"shift-3","neutral")}}}}var lo=require("@domphy/core"),ee=require("@domphy/theme");function ta(r={}){var e,l;let o=(0,lo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,lo.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,ee.themeSpacing)(10),paddingInlineStart:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*3),paddingInlineEnd:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1.5),paddingBlock:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1),borderRadius:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1.5),fontSize:t=>(0,ee.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ee.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,ee.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,ee.themeColor)(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 ${(0,ee.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,ee.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ee.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,ee.themeColor)(t,"muted","neutral")}}}}var so=require("@domphy/theme");function oa(){return{style:{display:"flex",alignItems:"center",gap:(0,so.themeSpacing)(2),"& > *":{minWidth:`${(0,so.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let s=n(),c=a.target,d=s.indexOf(c);c.value&&d<s.length-1&&s[d+1].focus()},l=a=>{let s=n(),c=a.target,d=s.indexOf(c);a.key==="Backspace"&&!c.value&&d>0&&s[d-1].focus(),a.key==="ArrowLeft"&&d>0&&s[d-1].focus(),a.key==="ArrowRight"&&d<s.length-1&&s[d+1].focus()},t=a=>{var y,g,u;a.preventDefault();let s=(g=(y=a.clipboardData)==null?void 0:y.getData("text"))!=null?g:"",c=n(),d=c.indexOf(a.target),i=d===-1?0:d;[...s].forEach((p,h)=>{c[i+h]&&(c[i+h].value=p)});let m=Math.min(i+s.length-1,c.length-1);(u=c[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",l),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",l),o.removeEventListener("paste",t)})}}}var Vt=require("@domphy/core"),ue=require("@domphy/theme");var na='<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>',ra='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function aa(r={}){var l,t;let o=(0,Vt.toState)((l=r.color)!=null?l:"neutral","color"),n=(0,Vt.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),e=(0,Vt.toState)(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type:d=>e.get(d)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},c={button:d=>e.get(d)?ra:na,type:"button",ariaLabel:d=>e.get(d)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(s),a.children.insert(c)},style:{display:"flex",alignItems:"center",gap:a=>(0,ue.themeSpacing)((0,ue.themeDensity)(a)*1),paddingBlock:a=>(0,ue.themeSpacing)((0,ue.themeDensity)(a)*1),paddingInline:a=>(0,ue.themeSpacing)((0,ue.themeDensity)(a)*3),borderRadius:a=>(0,ue.themeSpacing)((0,ue.themeDensity)(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ue.themeColor)(a,"border-strong",o.get(a))}`,color:a=>(0,ue.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,ue.themeColor)(a,"inherit",o.get(a)),fontSize:a=>(0,ue.themeSize)(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${(0,ue.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-within":{boxShadow:a=>b(a,n.get(a))}}}}var co=require("@domphy/core"),pe=require("@domphy/theme");function ia(r={}){var e,l;let o=(0,co.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,co.toState)((l=r.accentColor)!=null?l:"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=>(0,pe.themeSize)(t,"inherit"),color:t=>(0,pe.themeColor)(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,pe.themeSpacing)(6),height:(0,pe.themeSpacing)(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 ${(0,pe.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,pe.themeColor)(t,"text",o.get(t)),width:(0,pe.themeSpacing)(4),height:(0,pe.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,pe.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,pe.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,pe.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,pe.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>b(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,pe.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var mo=require("@domphy/core"),fe=require("@domphy/theme");function la(r={}){var e,l;let o=(0,mo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,mo.toState)((l=r.accentColor)!=null?l:"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:(0,fe.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,fe.themeSpacing)(1.5),borderRadius:(0,fe.themeSpacing)(999),backgroundColor:t=>(0,fe.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,fe.themeSpacing)(4),height:(0,fe.themeSpacing)(4),borderRadius:(0,fe.themeSpacing)(999),border:"none",marginTop:`calc((${(0,fe.themeSpacing)(1.5)} - ${(0,fe.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,fe.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,fe.themeColor)(t,"shift-10",n.get(t))},borderRadius:(0,fe.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var uo=require("@domphy/core"),re=require("@domphy/theme");function sa(r={}){var e,l;let o=(0,uo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,uo.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>(0,re.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,re.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,re.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,re.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,re.themeSpacing)((0,re.themeDensity)(t)*1.5),minWidth:(0,re.themeSpacing)(32),paddingInline:t=>(0,re.themeSpacing)((0,re.themeDensity)(t)*3),paddingBlock:t=>(0,re.themeSpacing)((0,re.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,re.themeColor)(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 ${(0,re.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,re.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,re.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,re.themeColor)(t,"border-strong","neutral")}`}}}}var cn=require("@domphy/core"),ae=require("@domphy/theme");function ca(r={}){var n;let o=(0,cn.toState)((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=>(0,ae.themeSize)(e,"inherit"),backgroundColor:e=>(0,ae.themeColor)(e,"inherit"),color:e=>(0,ae.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,ae.themeSpacing)(9),height:(0,ae.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,ae.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,ae.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>b(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,ae.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,ae.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,ae.themeSpacing)(3),height:(0,ae.themeSpacing)(3),borderRadius:(0,ae.themeSpacing)(999),left:(0,ae.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,ae.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,ae.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,ae.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,ae.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var po=require("@domphy/core"),H=require("@domphy/theme");function ma(r={}){var e,l;let o=(0,po.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,po.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,H.themeSpacing)(10),paddingInline:t=>(0,H.themeSpacing)((0,H.themeDensity)(t)*3),paddingBlock:t=>(0,H.themeSpacing)((0,H.themeDensity)(t)*1),borderRadius:t=>(0,H.themeSpacing)((0,H.themeDensity)(t)*1.5),fontSize:t=>(0,H.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,H.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,H.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,H.themeColor)(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,H.themeColor)(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>(0,H.themeColor)(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,H.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,H.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,H.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,H.themeColor)(t,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(t,"shift-6","warning")}`}}}}var mn=require("@domphy/core"),Be=require("@domphy/theme");function ua(r={}){var n;let o=(0,mn.toState)((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=>(0,Be.themeSize)(e,"inherit"),color:e=>(0,Be.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Be.themeColor)(e,"inherit",o.get(e)),paddingBlock:(0,Be.themeSpacing)(.5),paddingInline:(0,Be.themeSpacing)(1.5),borderRadius:(0,Be.themeSpacing)(1),outline:e=>`1px solid ${(0,Be.themeColor)(e,"border-strong",o.get(e))}`}}}var ho=require("@domphy/core"),ot=require("@domphy/theme");function da(r={}){var e,l;let o=(0,ho.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ho.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,ot.themeSpacing)(2),fontSize:t=>(0,ot.themeSize)(t,"inherit"),color:t=>(0,ot.themeColor)(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,ot.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,ot.themeColor)(t,"muted","neutral")}}}}var go=require("@domphy/core"),Ne=require("@domphy/theme");function pa(r={}){var e,l;let o=(0,go.toState)((e=r.color)!=null?e:"primary","color"),n=(0,go.toState)((l=r.accentColor)!=null?l:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>(0,Ne.themeSize)(t,"inherit"),backgroundColor:t=>(0,Ne.themeColor)(t),color:t=>(0,Ne.themeColor)(t,"shift-13",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,Ne.themeColor)(t,"shift-13",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,Ne.themeColor)(t,"shift-14",o.get(t)),textDecoration:"underline"},borderRadius:(0,Ne.themeSpacing)(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,Ne.themeColor)(t,"muted","neutral")}}}}var un=require("@domphy/core"),T=require("@domphy/theme");var ha={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},ga={small:.5,medium:1,large:1.5};function fa(r={}){var s,c,d;let o=(s=r.variant)!=null?s:"outline",n=(0,un.toState)((c=r.color)!=null?c:o==="ghost"?"neutral":"primary","color"),e=(d=r.size)!=null?d:"medium",l=pt[e];if(o==="ghost"){let i=ga[e];return{_onInsert:m=>{m.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:m=>(0,T.themeSize)(m,l),textDecoration:"none",paddingBlock:m=>(0,T.themeSpacing)((0,T.themeDensity)(m)*i),paddingInline:m=>(0,T.themeSpacing)((0,T.themeDensity)(m)*i),borderRadius:m=>(0,T.themeSpacing)((0,T.themeDensity)(m)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:m=>(0,T.themeSpacing)((0,T.themeDensity)(m)*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:m=>(0,T.themeColor)(m,"shift-6",n.get(m)),"&:hover:not([aria-disabled=true])":{color:m=>(0,T.themeColor)(m,"text",n.get(m)),backgroundColor:m=>(0,T.themeColor)(m,"hover",n.get(m)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:m=>(0,T.themeColor)(m,"text",n.get(m)),backgroundColor:m=>(0,T.themeColor)(m,"increase-2",n.get(m))},"&:focus-visible":{boxShadow:m=>b(m,n.get(m))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:m=>(0,T.themeColor)(m,"border-strong","neutral")}}}}let t=o==="solid",a=ha[e];return Ve(G({_onInsert:i=>{i.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:i=>(0,T.themeSize)(i,l),textDecoration:"none",paddingBlock:i=>(0,T.themeSpacing)((0,T.themeDensity)(i)*a.block),paddingInline:i=>(0,T.themeSpacing)((0,T.themeDensity)(i)*a.inline),borderRadius:i=>(0,T.themeSpacing)((0,T.themeDensity)(i)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>(0,T.themeSpacing)((0,T.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":i=>`1px solid ${(0,T.themeColor)(i,"border-strong",n.get(i))}`,color:i=>t?(0,T.themeColor)(i,"shift-0","neutral"):(0,T.themeColor)(i,"shift-13",n.get(i)),backgroundColor:i=>t?(0,T.themeColor)(i,"shift-8",n.get(i)):(0,T.themeColor)(i,"inherit",n.get(i)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:i=>t?(0,T.themeColor)(i,"shift-0","neutral"):(0,T.themeColor)(i,"shift-14",n.get(i)),backgroundColor:i=>t?(0,T.themeColor)(i,"shift-9",n.get(i)):(0,T.themeColor)(i,"hover",n.get(i))},"&:active:not([aria-disabled=true])":{backgroundColor:i=>t?(0,T.themeColor)(i,"shift-10",n.get(i)):(0,T.themeColor)(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>b(i,n.get(i))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:i=>(0,T.themeColor)(i,"shift-2","neutral"),outline:i=>`1px solid ${(0,T.themeColor)(i,"border-strong","neutral")}`,color:i=>(0,T.themeColor)(i,"muted","neutral")}}})}var dn=require("@domphy/core"),F=require("@domphy/theme");function ya(r={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function ba(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,F.themeSpacing)((0,F.themeDensity)(n)*2),paddingBlock:n=>(0,F.themeSpacing)(o?1:(0,F.themeDensity)(n)*2),paddingInline:n=>(0,F.themeSpacing)((0,F.themeDensity)(n)*3),fontSize:n=>(0,F.themeSize)(n,"inherit"),color:n=>(0,F.themeColor)(n,"text")}}}function Sa(r={}){var l,t;let o=(0,dn.toState)((l=r.color)!=null?l:"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=>(0,F.themeSpacing)((0,F.themeDensity)(a)*2),paddingBlock:a=>(0,F.themeSpacing)(e?1:(0,F.themeDensity)(a)*2),paddingInline:a=>(0,F.themeSpacing)((0,F.themeDensity)(a)*3),fontSize:a=>(0,F.themeSize)(a,"inherit"),color:a=>(0,F.themeColor)(a,"text",o.get(a)),borderRadius:a=>(0,F.themeSpacing)((0,F.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,F.themeColor)(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>(0,F.themeColor)(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,F.themeColor)(a,"shift-3",n),color:a=>(0,F.themeColor)(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>b(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var pn=require("@domphy/core"),Ue=require("@domphy/theme");function xa(r={}){var n;let o=(0,pn.toState)((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=>(0,Ue.themeSize)(e,"inherit"),color:e=>(0,Ue.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Ue.themeColor)(e,"inherit",o.get(e)),height:(0,Ue.themeSpacing)(6),borderRadius:(0,Ue.themeSpacing)(1),paddingInline:(0,Ue.themeSpacing)(1.5)}}}var hn=require("@domphy/core"),j=require("@domphy/theme");function Ca(r={items:[]}){var a;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:l="primary"}=r,t=(0,hn.toState)((a=r.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,c)=>{if(o.length===0)return;let d=s.nodeId,i=o.map((m,y)=>{var u;let g=(u=m.key)!=null?u:y;return Ve(G({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:g,type:"button",id:`menuitem${d}${g}`,role:"menuitem"},n?{ariaCurrent:p=>t.get(p)===g||void 0}:{}),{onClick:()=>{var p;n&&t.set(g),(p=m.onClick)==null||p.call(m)},onKeyDown:p=>{var O;let h=p.key;if(h==="Enter"||h===" "){p.preventDefault(),p.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;p.preventDefault();let x=o.map((R,w)=>{var $;return($=R.key)!=null?$:w}),v=x.indexOf(g),C=v;h==="ArrowDown"?C=(v+1)%x.length:h==="ArrowUp"?C=(v-1+x.length)%x.length:h==="Home"?C=0:h==="End"&&(C=x.length-1),(O=document.getElementById(`menuitem${d}${x[C]}`))==null||O.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,j.themeSpacing)(2),width:"100%",fontSize:p=>(0,j.themeSize)(p,"inherit"),height:p=>(0,j.themeSpacing)(6+(0,j.themeDensity)(p)*2),paddingInline:p=>(0,j.themeSpacing)((0,j.themeDensity)(p)*3),border:"none",outline:"none",color:p=>(0,j.themeColor)(p,"text",e),backgroundColor:p=>(0,j.themeColor)(p,"inherit",e),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:p=>(0,j.themeColor)(p,"hover",e)},"&[aria-current=true]":{backgroundColor:p=>(0,j.themeColor)(p,"shift-3",l),color:p=>(0,j.themeColor)(p,"shift-10")},"&:focus-visible":{boxShadow:p=>b(p,l)}}})});c[s.tagName]=i},style:{display:"flex",flexDirection:"column",paddingBlock:s=>(0,j.themeSpacing)((0,j.themeDensity)(s)*2),paddingInline:s=>(0,j.themeSpacing)((0,j.themeDensity)(s)*2),fontSize:s=>(0,j.themeSize)(s,"inherit"),backgroundColor:s=>(0,j.themeColor)(s,"inherit",e),color:s=>(0,j.themeColor)(s,"text",e),borderRadius:s=>(0,j.themeSpacing)((0,j.themeDensity)(s)*2),outline:s=>`1px solid ${(0,j.themeColor)(s,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:_("medium")}}}var fo=r=>!!r&&typeof r.get=="function"&&r._isState===!0,Ae=r=>{let o={},n=[];for(let e in r){let l=r[e];e==="x"?n.push(`translateX(${typeof l=="number"?`${l}px`:l})`):e==="y"?n.push(`translateY(${typeof l=="number"?`${l}px`:l})`):e==="scale"?n.push(`scale(${l})`):e==="rotate"?n.push(`rotate(${typeof l=="number"?`${l}deg`:l})`):o[e]=l}return n.length&&(o.transform=n.join(" ")),o};function gn(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function va(r={}){var a,s,c,d;let{initial:o,animate:n,exit:e,transition:l={}}=r,t={duration:(a=l.duration)!=null?a:300,delay:(s=l.delay)!=null?s:0,easing:(c=l.easing)!=null?c:"ease",iterations:(d=l.iterations)!=null?d:1,fill:"both"};return{_onMount:i=>{let m=i.domElement;if(!m||typeof m.animate!="function")return;let y=fo(n)?n.get():n;if(gn()){if(y?Object.assign(m.style,Ae(y)):o&&Object.assign(m.style,Ae(o)),fo(n)){let g=n.addListener(u=>{Object.assign(m.style,Ae(u))});i.setMetadata("motionRelease",g)}return}if(y?m.animate(o?[Ae(o),Ae(y)]:[Ae(y)],t):o&&Object.assign(m.style,Ae(o)),fo(n)){let g=n.addListener(u=>{m.animate([Ae(u)],t)});i.setMetadata("motionRelease",g)}},_onBeforeRemove:(i,m)=>{let y=i.domElement;if(!y||!e||typeof y.animate!="function")return m();if(gn())return Object.assign(y.style,Ae(e)),m();y.animate([Ae(e)],t).finished.then(m,m)},_onRemove:i=>{let m=i.getMetadata("motionRelease");m==null||m()}}}var fn=require("@domphy/core"),it=require("@domphy/theme");function ka(r={}){var n;let o=(0,fn.toState)((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=>(0,it.themeSize)(e,"inherit"),backgroundColor:e=>(0,it.themeColor)(e),color:e=>(0,it.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,it.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var yn=require("@domphy/core"),Z=require("@domphy/theme");function Ea(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),l=Math.min(o-1,r+1);for(let t=e;t<=l;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function wa(r){var s;let{total:o,color:n="neutral",accentColor:e="primary"}=r,l=(0,yn.toState)((s=r.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:c=>(0,Z.themeSpacing)(6+(0,Z.themeDensity)(c)*2),height:c=>(0,Z.themeSpacing)(6+(0,Z.themeDensity)(c)*2),paddingInline:c=>(0,Z.themeSpacing)((0,Z.themeDensity)(c)*2),borderRadius:c=>(0,Z.themeSpacing)((0,Z.themeDensity)(c)*1.5),border:"none",cursor:"pointer",fontSize:c=>(0,Z.themeSize)(c,"inherit"),backgroundColor:"transparent",color:c=>(0,Z.themeColor)(c,"text",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:c=>(0,Z.themeColor)(c,"hover",n)},"&:focus-visible":{boxShadow:c=>b(c,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Ve(G({},t),{backgroundColor:c=>(0,Z.themeColor)(c,"shift-6",e),color:c=>(0,Z.themeColor)(c,"shift-11",e),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:c=>(0,Z.themeColor)(c,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:c=>{c.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:c=>{let d={div:i=>{let m=l.get(i),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&l.set(m-1),style:t});let g=0;for(let u of Ea(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${g++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:p=>(0,Z.themeSpacing)((0,Z.themeDensity)(p)*2),color:p=>(0,Z.themeColor)(p,"shift-7",n)}});else{let p=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:p?"page":void 0,disabled:p,onClick:()=>l.set(u),style:p?a:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&l.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:(0,Z.themeSpacing)(1)}};c.children.insert(d)},style:{display:"inline-flex"}}}var bn=require("@domphy/core"),bt=require("@domphy/theme");function Ta(r={}){var l;let{padding:o=4,divider:n=!1}=r,e=(0,bn.toState)((l=r.color)!=null?l:"neutral","color");return{style:G({padding:t=>(0,bt.themeSpacing)((0,bt.themeDensity)(t)*o)},n?{borderBottom:t=>`1px solid ${(0,bt.themeColor)(t,"border",e.get(t))}`}:{})}}var Sn=require("@domphy/core"),Rt=require("@domphy/theme");function Da(r={}){var n;let o=(0,Sn.toState)((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=>(0,Rt.themeSize)(e,"inherit"),color:e=>(0,Rt.themeColor)(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var Et=require("@domphy/core"),lt=require("@domphy/theme");function Pa(r){var y;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,l=null,t=(0,Et.toState)(o),a=(0,Et.toState)(n),{show:s,hide:c,anchorPartial:d}=_e({kind:"popover",open:t,placement:a,content:r.content,keepOpenOnContentHover:e==="hover"}),i={role:"dialog",dataTone:"shift-14",style:{backgroundColor:g=>(0,lt.themeColor)(g,"inherit"),borderRadius:g=>(0,lt.themeSpacing)((0,lt.themeDensity)(g)*2),outline:g=>`1px solid ${(0,lt.themeColor)(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")},_onInsert:g=>{let u=g.attributes.get("id");l=u||g.nodeId,!u&&g.attributes.set("id",l)}};return(y=r.content).$||(y.$=[]),r.content.$.push(i),(0,Et.merge)(d,{ariaHaspopup:"dialog",ariaExpanded:g=>t.get(g),onMouseEnter:(g,u)=>e==="hover"&&s(u),onMouseLeave:(g,u)=>e==="hover"&&c(u),onClick:(g,u)=>{e==="click"&&(t.get()?c(u):s(u))},onKeyDown:(g,u)=>{g.key==="Escape"&&t.get()&&c(u)},onFocus:(g,u)=>e==="hover"&&s(u),onBlur:(g,u)=>{let p=g.relatedTarget,h=u.getRoot().domElement,x=l?h.querySelector(`#${CSS.escape(l)}`):null;p&&(x!=null&&x.contains(p))||c(u)},_onMount:g=>l&&g.attributes.set("ariaControls",l)}),d}var xn=require("@domphy/core"),Oe=require("@domphy/theme");function yo(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,Oe.themeSpacing)(6),bordered:l=!0}=r,t=(0,xn.toState)(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"},s=i=>{var m;return(m=a[t.get(i)])!=null?m:a["bottom-end"]},c=i=>i.includes("start")?e:i.includes("end")?"auto":"50%",d=i=>i.includes("end")?e:i.includes("start")?"auto":"50%";return{style:{fontSize:i=>(0,Oe.themeSize)(i),backgroundColor:i=>(0,Oe.themeColor)(i),color:i=>(0,Oe.themeColor)(i,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,Oe.themeSpacing)(1.5),height:(0,Oe.themeSpacing)(1.5),backgroundColor:i=>(0,Oe.themeColor)(i,"inherit",n),borderWidth:l?"1px":0,borderColor:i=>(0,Oe.themeColor)(i,"inherit",n),borderTopStyle:i=>{let m=s(i);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:i=>{let m=s(i);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:i=>{let m=s(i);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:i=>{let m=s(i);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:i=>{let m=s(i);return m.includes("top")?0:m.includes("bottom")?"auto":c(m)},right:i=>{let m=s(i);return m.includes("right")?0:m.includes("left")?"auto":d(m)},bottom:i=>{let m=s(i);return m.includes("bottom")?0:m.includes("top")?"auto":d(m)},left:i=>{let m=s(i);return m.includes("left")?0:m.includes("right")?"auto":c(m)},transform:i=>{let m=s(i),y=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",g=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${y},${g}) rotate(45deg)`}}}}}var Cn=require("@domphy/core"),Se=require("@domphy/theme");function Oa(r={}){var n;let o=(0,Cn.toState)((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=>(0,Se.themeSize)(e,"inherit"),color:e=>(0,Se.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Se.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,Se.themeSpacing)((0,Se.themeDensity)(e)*2),paddingInline:e=>(0,Se.themeSpacing)((0,Se.themeDensity)(e)*3),borderRadius:e=>(0,Se.themeSpacing)((0,Se.themeDensity)(e)*2)}}}var bo=require("@domphy/core"),He=require("@domphy/theme");function La(r={}){var e,l;let o=(0,bo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,bo.toState)((l=r.accentColor)!=null?l:"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:(0,He.themeSpacing)(2),border:0,borderRadius:(0,He.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,He.themeColor)(t,"inherit",o.get(t)),color:t=>(0,He.themeColor)(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,He.themeColor)(t,"inherit",o.get(t)),borderRadius:(0,He.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,He.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,He.themeSpacing)(999),transition:"width 220ms ease"}}}}var So=require("@domphy/core"),st=require("@domphy/theme");var Ia='<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>',za='<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 Va(r={}){var c,d;let{max:o=5,readOnly:n=!1,onChange:e}=r,l=(c=r.color)!=null?c:"warning",t=(0,So.toState)((d=r.value)!=null?d:0),a=(0,So.toState)(0),s=i=>{let m=a.get(i);return m>0?m:t.get(i)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,st.themeSpacing)(.5),fontSize:i=>(0,st.themeSize)(i,"increase-1"),cursor:n?"default":"pointer",color:i=>(0,st.themeColor)(i,"muted",l)},_onInit:i=>{for(let m=1;m<=o;m++){let y=m,g=n?{}:{onClick:()=>{let p=y===t.get()?0:y;t.set(p),e==null||e(p),a.set(0)},onMouseEnter:()=>a.set(y),onMouseLeave:()=>a.set(0),onKeyDown:p=>{var C,O;let h=t.get(),x=h;if(p.key==="ArrowRight"||p.key==="ArrowUp")x=Math.min(o,h+1),p.preventDefault();else if(p.key==="ArrowLeft"||p.key==="ArrowDown")x=Math.max(0,h-1),p.preventDefault();else return;t.set(x),e==null||e(x);let v=x>0?x-1:0;(O=(C=i.domElement)==null?void 0:C.children[v])==null||O.focus()}},u=Ve(G({button:p=>y<=s(p)?Ia:za,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},g),{style:{background:"none",border:"none",outline:"none",borderRadius:(0,st.themeSpacing)(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>b(p,l)}}});i.children.insert(u)}}}}var $t=require("@domphy/core"),ct=require("@domphy/theme");function Ra(r={}){var c,d,i;let{size:o=16,thickness:n=.25}=r,e=(0,$t.toState)((c=r.value)!=null?c:0,"value"),l=(0,$t.toState)((d=r.color)!=null?d:"primary","color"),t=(0,$t.toState)((i=r.trackColor)!=null?i:"neutral","trackColor"),a=Math.round((1-n)*100),s=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:m=>String(Math.round(e.get(m))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:m=>{m.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,ct.themeSpacing)(o),height:(0,ct.themeSpacing)(o),borderRadius:"50%",color:m=>(0,ct.themeColor)(m,"shift-9",l.get(m)),background:m=>`conic-gradient(from -90deg, ${(0,ct.themeColor)(m,"shift-9",l.get(m))} ${e.get(m)}%, ${(0,ct.themeColor)(m,"shift-3",t.get(m))} 0%)`,WebkitMask:s,mask:s}}}var _t=require("@domphy/theme");function xo(r={}){let{gap:o=4,align:n="center",justify:e,wrap:l=!1}=r;return{style:G(G({display:"flex",alignItems:n,gap:t=>(0,_t.themeSpacing)((0,_t.themeDensity)(t)*o)},e?{justifyContent:e}:{}),l?{flexWrap:"wrap"}:{})}}var vn=require("@domphy/core"),Fe=require("@domphy/theme");function $a(r={}){var n;let o=(0,vn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>(0,Fe.themeColor)(e,"text",o.get(e)),"&::-webkit-scrollbar":{width:(0,Fe.themeSpacing)(2),height:(0,Fe.themeSpacing)(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>(0,Fe.themeColor)(e,"shift-5",o.get(e)),borderRadius:(0,Fe.themeSpacing)(999),border:`${(0,Fe.themeSpacing)(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>(0,Fe.themeColor)(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,Fe.themeColor)(e,"shift-5",o.get(e))} transparent`}}}var kn=require("@domphy/core"),se=require("@domphy/theme");function _a(r={items:[]}){var t,a,s;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,l=(0,kn.toState)((s=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:l}},_onSchedule:(c,d)=>{let i=o.map((m,y)=>{var p;let g=(p=m.key)!=null?p:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,type:"button",role:"radio",ariaChecked:h=>l.get(h)===g,onClick:()=>l.set(g),style:{cursor:"pointer",fontSize:h=>(0,se.themeSize)(h,"inherit"),height:(0,se.themeSpacing)(6),paddingBlock:(0,se.themeSpacing)(1),paddingInline:(0,se.themeSpacing)(3),border:"none",borderRadius:(0,se.themeSpacing)(10),color:h=>(0,se.themeColor)(h,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>(0,se.themeColor)(h,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>(0,se.themeColor)(h,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:h=>(0,se.themeColor)(h,"shift-0",e),color:h=>(0,se.themeColor)(h,"shift-10",e),boxShadow:_("low")},"&:focus-visible":{boxShadow:h=>b(h,e)},"&[aria-checked=true]:focus-visible":{boxShadow:h=>`${_("low")}, ${b(h,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[c.tagName]=i},dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,se.themeSpacing)(1),paddingInline:(0,se.themeSpacing)(1),gap:(0,se.themeSpacing)(.5),borderRadius:(0,se.themeSpacing)(10),backgroundColor:c=>(0,se.themeColor)(c,"inherit",n),color:c=>(0,se.themeColor)(c,"text",n)}}}var z=require("@domphy/theme");function Ma(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=>(0,z.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,z.themeColor)(e,"text",o),backgroundColor:e=>(0,z.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,z.themeColor)(e,"border-strong",o)}`,borderRadius:e=>(0,z.themeSpacing)((0,z.themeDensity)(e)*1.5),paddingBlock:e=>(0,z.themeSpacing)((0,z.themeDensity)(e)*1),paddingLeft:e=>(0,z.themeSpacing)((0,z.themeDensity)(e)*3),paddingRight:e=>(0,z.themeSpacing)((0,z.themeDensity)(e)*5),backgroundImage:e=>{let l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,z.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(l)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,z.themeSpacing)(2)} center`,backgroundSize:`${(0,z.themeSpacing)(2.5)} ${(0,z.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,z.themeSpacing)(6+(0,z.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,z.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>b(e,n)},"& optgroup":{color:e=>(0,z.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,z.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,z.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,z.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,z.themeColor)(e,"shift-2","neutral")}}}}var mt=require("@domphy/core"),ie=require("@domphy/theme");function Ba(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:l=!1,multiple:t=!1}=r,a=(0,mt.toState)(r.value),s=(0,mt.toState)(l),{show:c,hide:d,anchorPartial:i}=_e({kind:"selectBox",open:s,placement:(0,mt.toState)(n),content:r.content}),m={onClick:(u,p)=>!t&&d(p),dataTone:"shift-14",style:{backgroundColor:u=>(0,ie.themeColor)(u,"inherit"),borderRadius:u=>(0,ie.themeSpacing)((0,ie.themeDensity)(u)*2),outline:u=>`1px solid ${(0,ie.themeColor)(u,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,mt.merge)(r.content,m);let y={div:u=>{let p=a.get(u),h=Array.isArray(p)?p:[p];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[St({color:e,removable:t})],_key:v.value,_onRemove:C=>{let O=a.get(),w=(Array.isArray(O)?O:[O]).filter($=>$!==v.value);t?a.set(w):a.set(w[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:(0,ie.themeSpacing)(1),flex:1}},g={_onInsert:u=>{u.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:u=>u.children.insert(y),onClick:(u,p)=>s.get()?d(p):c(p),tabindex:0,style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>(0,ie.themeSpacing)(6+(0,ie.themeDensity)(u)*2),minWidth:(0,ie.themeSpacing)(32),outlineOffset:"-1px",outline:u=>`1px solid ${(0,ie.themeColor)(u,"border-strong","neutral")}`,paddingInline:u=>(0,ie.themeSpacing)((0,ie.themeDensity)(u)*2),borderRadius:u=>(0,ie.themeSpacing)((0,ie.themeDensity)(u)*1.5),fontSize:u=>(0,ie.themeSize)(u,"inherit"),color:u=>(0,ie.themeColor)(u,"text",e),backgroundColor:u=>(0,ie.themeColor)(u,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:u=>b(u,e)}}};return(0,mt.merge)(i,g),i}var ye=require("@domphy/theme");function Na(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let s=a.value;t.attributes.set("ariaSelected",c=>{let d=s.get(c);return a.multiple?d.includes(e):d===e}),t.addEvent("click",()=>{let c=s.get();a.multiple?c.includes(e)?s.set(c.filter(d=>d!==e)):s.set(c.concat([e])):c!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,ye.themeSize)(t,"inherit"),height:t=>(0,ye.themeSpacing)(6+(0,ye.themeDensity)(t)*2),paddingInline:t=>(0,ye.themeSpacing)((0,ye.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,ye.themeColor)(t,"text",n),backgroundColor:t=>(0,ye.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,ye.themeColor)(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,ye.themeColor)(t,"shift-6",o),color:t=>(0,ye.themeColor)(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,o)}}}}var En=require("@domphy/core"),Le=require("@domphy/theme");function Aa(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,En.toState)((a=r.value)!=null?a:n?[]:null),l={div:s=>{let c=e.get(s);return(Array.isArray(c)?c:[c]).map(i=>({input:null,name:r.name,value:i==null?"":String(i)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:n}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(l)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>(0,Le.themeSpacing)((0,Le.themeDensity)(s)*2),paddingInline:s=>(0,Le.themeSpacing)((0,Le.themeDensity)(s)*2),fontSize:s=>(0,Le.themeSize)(s,"inherit"),backgroundColor:s=>(0,Le.themeColor)(s,"inherit",o),color:s=>(0,Le.themeColor)(s,"text",o)}}}var Mt=require("@domphy/core"),Ie=require("@domphy/theme");function Ha(r={}){var l;let o=(0,Mt.toState)((l=r.color)!=null?l:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,Mt.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>(0,Ie.themeSize)(t),color:t=>(0,Ie.themeColor)(t,"text",o.get(t)),height:(0,Ie.themeSpacing)(6),display:"block",borderRadius:(0,Ie.themeSpacing)(1),backgroundColor:t=>(0,Ie.themeColor)(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,Ie.themeColor)(t,"inherit",o.get(t))} 0%, ${(0,Ie.themeColor)(t,"shift-4",o.get(t))} 50%, ${(0,Ie.themeColor)(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var wn=require("@domphy/core"),Bt=require("@domphy/theme");function Fa(r={}){var n;let o=(0,wn.toState)((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=>(0,Bt.themeSize)(e,"inherit"),color:e=>(0,Bt.themeColor)(e,"shift-10",o.get(e))}}}var Nt=require("@domphy/core"),ze=require("@domphy/theme"),Dn={to:{transform:"rotate(360deg)"}},Tn=(0,Nt.hashString)(JSON.stringify(Dn));function Wa(r={}){var n;let o=(0,Nt.toState)((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=>(0,ze.themeSize)(e),backgroundColor:e=>(0,ze.themeColor)(e),color:e=>(0,ze.themeColor)(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,ze.themeSpacing)(6),height:(0,ze.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,ze.themeSpacing)(.5)} solid ${(0,ze.themeColor)(e,"border-strong",o.get(e))}`,borderTopColor:e=>(0,ze.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${Tn} 0.7s linear infinite`,[`@keyframes ${Tn}`]:Dn}}}var At=require("@domphy/core"),Xe=require("@domphy/theme");function ja(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:l=90}=r;return{_onSchedule:(t,a)=>{(0,At.merge)(a,{_context:{splitter:{direction:o,size:(0,At.toState)(n),min:e,max:l,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Ka(){return{_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",l=o.panelCount++===0,t=s=>{n.style[e]=`${l?s:100-s}%`};t(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=o.size.addListener(t);r.addHook("Remove",a)}}}function Ya(){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 l=o.size.addListener(c=>{n.setAttribute("aria-valuenow",String(Math.round(c)))}),t=c=>{let d=c.shiftKey?10:1,i=null;e?c.key==="ArrowRight"?i=Math.min(o.size.get()+d,o.max):c.key==="ArrowLeft"&&(i=Math.max(o.size.get()-d,o.min)):c.key==="ArrowDown"?i=Math.min(o.size.get()+d,o.max):c.key==="ArrowUp"&&(i=Math.max(o.size.get()-d,o.min)),c.key==="Home"?i=o.min:c.key==="End"&&(i=o.max),i!==null&&(c.preventDefault(),o.size.set(i))},a=null,s=c=>{c.preventDefault();let d=n.parentElement,i=y=>{let g=d.getBoundingClientRect(),u=e?(y.clientX-g.left)/g.width*100:(y.clientY-g.top)/g.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",i),document.addEventListener("mouseup",m)};n.addEventListener("keydown",t),n.addEventListener("mousedown",s),r.addHook("Remove",()=>{a==null||a(),l(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",s)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,Xe.themeColor)(r,"inherit"),color:r=>(0,Xe.themeColor)(r,"text"),"&:hover":{backgroundColor:r=>(0,Xe.themeColor)(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>b(r,"primary")},"&::after":{content:'""',width:(0,Xe.themeSpacing)(1),height:(0,Xe.themeSpacing)(1),borderRadius:(0,Xe.themeSpacing)(999),backgroundColor:r=>(0,Xe.themeColor)(r,"shift-4")}}}}var Ht=require("@domphy/theme");function Ga(r={}){let{gap:o=3,align:n}=r;return{style:G({display:"flex",flexDirection:"column",gap:e=>(0,Ht.themeSpacing)((0,Ht.themeDensity)(e)*o)},n?{alignItems:n}:{})}}var Pn=require("@domphy/core"),V=require("@domphy/theme");function qa(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:l="primary"}=r,t=(0,Pn.toState)((a=r.current)!=null?a:0);return{_doctorDisable:"inline-typography",_context:{steps:{current:t,direction:n,color:e,accentColor:l}},_onSchedule:(s,c)=>{let d=o.map((i,m)=>{var g;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(g=i.key)!=null?g:m,dataStep:String(m+1),dataStatus:u=>{let p=t.get(u);return m<p?"done":m===p?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:(0,V.themeSpacing)(1),flex:"1",fontSize:u=>(0,V.themeSize)(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,V.themeSpacing)(6),height:(0,V.themeSpacing)(6),borderRadius:(0,V.themeSpacing)(999),fontSize:u=>(0,V.themeSize)(u,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:u=>`2px solid ${(0,V.themeColor)(u,"border-strong",e)}`,backgroundColor:u=>(0,V.themeColor)(u,"inherit"),color:u=>(0,V.themeColor)(u,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,V.themeSpacing)(3),right:`calc(50% + ${(0,V.themeSpacing)(3)})`,left:`calc(-50% + ${(0,V.themeSpacing)(3)})`,height:"2px",backgroundColor:u=>(0,V.themeColor)(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>(0,V.themeColor)(u,"shift-9",l),borderColor:u=>(0,V.themeColor)(u,"shift-9",l),color:u=>(0,V.themeColor)(u,"shift-0",l),boxShadow:u=>`0 0 0 3px ${(0,V.themeColor)(u,"shift-3",l)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>(0,V.themeColor)(u,"shift-9",l),borderColor:u=>(0,V.themeColor)(u,"shift-9",l),color:u=>(0,V.themeColor)(u,"shift-0",l)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>(0,V.themeColor)(u,"shift-9",l)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>(0,V.themeColor)(u,"shift-9",l)},"&[data-status=pending]":{color:u=>(0,V.themeColor)(u,"muted")},"&[data-status=active]":{color:u=>(0,V.themeColor)(u,"shift-11",l),fontWeight:"bold"},"&[data-status=done]":{color:u=>(0,V.themeColor)(u,"text",e)}}}});c[s.tagName]=d},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:(0,V.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}}}var On=require("@domphy/core"),wt=require("@domphy/theme");function Ua(r={}){var n;let o=(0,On.toState)((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=>(0,wt.themeSize)(e,"inherit"),fontWeight:"bold",color:e=>(0,wt.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,wt.themeColor)(e)}}}var Ln=require("@domphy/core"),Ft=require("@domphy/theme");function Xa(r={}){var n;let o=(0,Ln.toState)((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=>(0,Ft.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,Ft.themeColor)(e,"text",o.get(e))}}}var In=require("@domphy/core"),Wt=require("@domphy/theme");function Za(r={}){var n;let o=(0,In.toState)((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=>(0,Wt.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,Wt.themeColor)(e,"text",o.get(e))}}}var zn=require("@domphy/core"),M=require("@domphy/theme");function Ja(r={}){var n;let o=(0,zn.toState)((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=>(0,M.themeSize)(e,"inherit"),color:e=>(0,M.themeColor)(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*3),paddingBlock:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*1),color:e=>(0,M.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,M.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*3),paddingBlock:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*1),color:e=>(0,M.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,M.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,M.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*3),paddingBlock:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*1),color:e=>(0,M.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,M.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,M.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,M.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,M.themeColor)(e,"hover")}}}}var Vn=require("@domphy/core"),Y=require("@domphy/theme");function Qa(r={items:[]}){var t,a,s;let{items:o=[],accentColor:n="primary",color:e="neutral"}=r,l=(0,Vn.toState)((s=(a=r.activeKey)!=null?a:(t=o[0])==null?void 0:t.key)!=null?s:0);return{_onSchedule:(c,d)=>{let i=c.nodeId,y={div:o.map((u,p)=>{var v;let h=(v=u.key)!=null?v:p;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,type:"button",role:"tab",id:`tab${i}${h}`,ariaControls:`panel${i}${h}`,ariaSelected:C=>l.get(C)===h,onClick:()=>l.set(h),onKeyDown:C=>{let O=C.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;C.preventDefault();let R=o.map((Te,nt)=>{var Ze;return(Ze=Te.key)!=null?Ze:nt}),w=R.indexOf(h),$=w;O==="ArrowRight"?$=(w+1)%R.length:O==="ArrowLeft"?$=(w-1+R.length)%R.length:O==="Home"?$=0:O==="End"&&($=R.length-1),l.set(R[$])},style:{cursor:"pointer",fontSize:C=>(0,Y.themeSize)(C,"inherit"),height:C=>(0,Y.themeSpacing)(6+(0,Y.themeDensity)(C)*2),paddingInline:C=>(0,Y.themeSpacing)((0,Y.themeDensity)(C)*4),border:"none",outline:"none",color:C=>(0,Y.themeColor)(C,"text"),backgroundColor:C=>(0,Y.themeColor)(C,"inherit"),boxShadow:C=>`inset 0 -${(0,Y.themeSpacing)(.5)} 0 0 ${(0,Y.themeColor)(C,"shift-1",e)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{boxShadow:C=>`inset 0 -${(0,Y.themeSpacing)(.5)} 0 0 ${(0,Y.themeColor)(C,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{color:C=>(0,Y.themeColor)(C,"shift-12",n),boxShadow:C=>`inset 0 -${(0,Y.themeSpacing)(.5)} 0 0 ${(0,Y.themeColor)(C,"shift-6",n)}`},"&:focus-visible":{boxShadow:C=>b(C,n)},"&[aria-selected=true]:focus-visible":{boxShadow:C=>`${b(C,n)}, inset 0 -${(0,Y.themeSpacing)(.5)} 0 0 ${(0,Y.themeColor)(C,"shift-6",n)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},g=o.map((u,p)=>{var x;let h=(x=u.key)!=null?x:p;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${i}${h}`,ariaLabelledby:`tab${i}${h}`,hidden:v=>l.get(v)!==h,style:{paddingBlock:v=>(0,Y.themeSpacing)((0,Y.themeDensity)(v)*2),paddingInline:v=>(0,Y.themeSpacing)((0,Y.themeDensity)(v)*2)}}});d[c.tagName]=[y,...g]}}}var Co=require("@domphy/core"),te=require("@domphy/theme");function ei(r={}){var l,t;let o=(0,Co.toState)((l=r.color)!=null?l:"neutral","color"),n=(0,Co.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let s=a.domElement;s.style.overflow="hidden";let c=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",c),c(),a.addHook("Remove",()=>s.removeEventListener("input",c))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*2),paddingBlock:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*1.5),fontSize:a=>(0,te.themeSize)(a,"inherit"),color:a=>(0,te.themeColor)(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,te.themeColor)(a,"border-strong",o.get(a))}`,backgroundColor:a=>(0,te.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,te.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,te.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>b(a,n.get(a))},"&:invalid":{outline:a=>`${(0,te.themeSpacing)(.5)} solid ${(0,te.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,te.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,te.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,te.themeColor)(a,"shift-2","neutral")}}}}var Rn=require("@domphy/core"),we=require("@domphy/theme");function ti(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function oi(r={}){var t,a,s;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",l=(0,Rn.toState)((s=r.active)!=null?s:!1);return{style:G({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:c=>(0,we.themeSpacing)((0,we.themeDensity)(c)*2),paddingBottom:c=>o?"0":(0,we.themeSpacing)((0,we.themeDensity)(c)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,we.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:c=>(0,we.themeColor)(c,"shift-8",l.get(c)?e:n),opacity:c=>l.get(c)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:c=>`-${(0,we.themeSpacing)((0,we.themeDensity)(c)*4)}`,width:"2px",backgroundColor:c=>(0,we.themeColor)(c,"shift-3",n)}})}}var $n=require("@domphy/core"),he=require("@domphy/theme");function ni(r={}){let{position:o="top-center",color:n="neutral"}=r,e=(0,$n.toState)(!1),l=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:l?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:(0,he.themeSpacing)(4),zIndex:30,padding:(0,he.themeSpacing)(6),pointerEvents:"none"}};return{_portal:c=>{let d=c.domElement.querySelector(`#domphy-toast-${o}`);return d||(d=c.children.insert(s).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,he.themeSpacing)(32),pointerEvents:"auto",paddingBlock:c=>(0,he.themeSpacing)((0,he.themeDensity)(c)*2),paddingInline:c=>(0,he.themeSpacing)((0,he.themeDensity)(c)*4),borderRadius:c=>(0,he.themeSpacing)((0,he.themeDensity)(c)*2),fontSize:c=>(0,he.themeSize)(c,"inherit"),color:c=>(0,he.themeColor)(c,"text",n),backgroundColor:c=>(0,he.themeColor)(c,"inherit",n),boxShadow:_("medium"),opacity:c=>Number(e.get(c)),transform:c=>e.get(c)?"translateY(0)":l?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(c,d)=>{let i=!1,m=null,y=()=>{i||(i=!0,m&&(clearTimeout(m),m=null),c.domElement.removeEventListener("transitionend",g),d())},g=u=>{u.propertyName==="transform"&&y()};c.domElement.addEventListener("transitionend",g),m=setTimeout(y,350),c.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=c.domElement)==null||u.removeEventListener("transitionend",g)}),e.set(!1)}}}var _n=require("@domphy/core"),J=require("@domphy/theme");function ri(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:l="primary"}=r,t=(0,_n.toState)((a=r.value)!=null?a:n?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:n}},_onSchedule:(s,c)=>{let d=o.map((i,m)=>{var u;let y=(u=i.key)!=null?u:String(m);return{button:[typeof i.label=="string"?{span:i.label}:i.label],_key:y,type:"button",role:"button",ariaPressed:p=>{let h=t.get(p);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let p=t.get();if(n){let h=Array.isArray(p)?[...p]:[];t.set(h.includes(y)?h.filter(x=>x!==y):[...h,y])}else t.set(p===y?"":y)},style:{cursor:"pointer",fontSize:p=>(0,J.themeSize)(p,"inherit"),height:(0,J.themeSpacing)(6),paddingBlock:(0,J.themeSpacing)(1),paddingInline:(0,J.themeSpacing)(2),border:"none",borderRadius:(0,J.themeSpacing)(1.5),color:p=>(0,J.themeColor)(p,"text",e),backgroundColor:p=>(0,J.themeColor)(p,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{backgroundColor:p=>(0,J.themeColor)(p,"hover",e)},"&:active:not([disabled])":{backgroundColor:p=>(0,J.themeColor)(p,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:p=>(0,J.themeColor)(p,"shift-3",l),color:p=>(0,J.themeColor)(p,"shift-12",l)},"&:focus-visible":{boxShadow:p=>b(p,l)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});c[s.tagName]=d},style:{display:"flex",paddingBlock:(0,J.themeSpacing)(1),paddingInline:(0,J.themeSpacing)(1),gap:(0,J.themeSpacing)(1),borderRadius:(0,J.themeSpacing)(2),fontSize:s=>(0,J.themeSize)(s,"inherit"),backgroundColor:s=>(0,J.themeColor)(s,"inherit",e),color:s=>(0,J.themeColor)(s,"text",e),outline:s=>`1px solid ${(0,J.themeColor)(s,"border",e)}`,outlineOffset:"-1px"}}}function ai(r={}){return xo({gap:r.gap})}function ii(){return{div:null,style:{flex:"1 1 0"}}}var Tt=require("@domphy/core"),xe=require("@domphy/theme");function li(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,l=(0,Tt.toState)(n),t=(0,Tt.toState)(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:g=>t.get(g),id:a},{show:c,hide:d,anchorPartial:i}=_e({kind:"tooltip",open:o,placement:l,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>(0,xe.themeSpacing)((0,xe.themeDensity)(g)*1),paddingInline:g=>(0,xe.themeSpacing)((0,xe.themeDensity)(g)*3),borderRadius:g=>(0,xe.themeSpacing)((0,xe.themeDensity)(g)*1.5),color:g=>(0,xe.themeColor)(g,"text"),backgroundColor:g=>(0,xe.themeColor)(g),fontSize:g=>(0,xe.themeSize)(g,"inherit"),boxShadow:_("low")},$:[yo({placement:l,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),(0,Tt.merge)(i,{ariaDescribedby:a,onMouseEnter:(g,u)=>c(u),onMouseLeave:(g,u)=>d(u),onFocus:(g,u)=>c(u),onBlur:(g,u)=>d(u),onKeyDown:(g,u)=>g.key==="Escape"&&d(u)}),i}var vo=require("@domphy/core");function Mn(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function si(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,l=new Map,t=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let c of Array.from(l.values()))c();l.clear();for(let c of t)clearTimeout(c);t.clear();for(let c of a)cancelAnimationFrame(c);a.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((c,d)=>{if(!(c instanceof vo.ElementNode))return;let i=c.domElement;i&&e.set(Mn(c,d),i.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((c,d)=>{var R;if(!(c instanceof vo.ElementNode))return;let i=c.domElement;if(!i)return;let m=Mn(c,d),y=e.get(m);if(!y)return;let g=i.getBoundingClientRect(),u=y.left-g.left,p=y.top-g.top;if(Math.abs(u)<.5&&Math.abs(p)<.5)return;(R=l.get(i))==null||R(),i.style.transition="none",i.style.transform=`translate(${u}px, ${p}px)`,i.getBoundingClientRect();let h=requestAnimationFrame(()=>{a.delete(h),i.style.transition=`transform ${o}ms ease ${n}ms`,i.style.transform="translate(0px, 0px)"});a.add(h);let x=!1,v=null,C=()=>{x||(x=!0,v&&(t.delete(v),v=null),l.delete(i),i.removeEventListener("transitionend",O),i.style.transition="",i.style.transform="")},O=w=>{w.propertyName==="transform"&&C()};l.set(i,()=>{x=!0,v&&(clearTimeout(v),t.delete(v),v=null),l.delete(i),i.removeEventListener("transitionend",O)}),i.addEventListener("transitionend",O),v=setTimeout(C,o+n+34),t.add(v)}),e.clear()}}}var Bn=require("@domphy/core"),ut=require("@domphy/theme");function ci(r={}){var n;let o=(0,Bn.toState)((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=>(0,ut.themeSize)(e,"inherit"),backgroundColor:e=>(0,ut.themeColor)(e),color:e=>(0,ut.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,ut.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}0&&(module.exports={abbreviation,accordion,alert,avatar,badge,blockquote,breadcrumb,breadcrumbEllipsis,button,buttonGhost,buttonSwitch,card,code,combobox,command,commandItem,commandSearch,datePicker,descriptionList,details,dialog,divider,drawer,emphasis,empty,errorBoundary,fab,figure,formGroup,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputPassword,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,linkButton,list,listItem,listItemButton,mark,menu,motion,orderedList,pagination,panelSection,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,row,scrollArea,segmented,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stack,steps,strong,subscript,superscript,table,tabs,tag,textarea,timeline,timelineItem,toast,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList});
|
|
1
|
+
"use strict";var Lt=Object.defineProperty,tr=Object.defineProperties,or=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyDescriptors,rr=Object.getOwnPropertyNames,zo=Object.getOwnPropertySymbols;var Ro=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable;var Vo=(r,o,n)=>o in r?Lt(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,G=(r,o)=>{for(var n in o||(o={}))Ro.call(o,n)&&Vo(r,n,o[n]);if(zo)for(var n of zo(o))ar.call(o,n)&&Vo(r,n,o[n]);return r},Ve=(r,o)=>tr(r,nr(o));var ir=(r,o)=>{for(var n in o)Lt(r,n,{get:o[n],enumerable:!0})},lr=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of rr(o))!Ro.call(r,l)&&l!==n&&Lt(r,l,{get:()=>o[l],enumerable:!(e=or(o,l))||e.enumerable});return r};var sr=r=>lr(Lt({},"__esModule",{value:!0}),r);var mi={};ir(mi,{abbreviation:()=>cr,accordion:()=>mr,alert:()=>ur,avatar:()=>dr,badge:()=>pr,blockquote:()=>hr,breadcrumb:()=>gr,breadcrumbEllipsis:()=>fr,button:()=>Sr,buttonGhost:()=>eo,buttonSwitch:()=>xr,card:()=>vr,code:()=>kr,combobox:()=>Tr,command:()=>Dr,commandItem:()=>Or,commandSearch:()=>Pr,datePicker:()=>Ir,descriptionList:()=>Rr,details:()=>$r,dialog:()=>_r,divider:()=>Mr,drawer:()=>Br,emphasis:()=>Nr,empty:()=>Hr,errorBoundary:()=>Ar,fab:()=>Wr,figure:()=>jr,formGroup:()=>Kr,heading:()=>Gr,horizontalRule:()=>qr,icon:()=>Ur,image:()=>Xr,inputCheckbox:()=>Zr,inputColor:()=>Jr,inputDateTime:()=>Qr,inputFile:()=>ea,inputNumber:()=>ta,inputOTP:()=>oa,inputPassword:()=>aa,inputRadio:()=>ia,inputRange:()=>la,inputSearch:()=>sa,inputSwitch:()=>ca,inputText:()=>ma,keyboard:()=>ua,label:()=>da,link:()=>pa,linkButton:()=>fa,list:()=>ya,listItem:()=>ba,listItemButton:()=>Sa,mark:()=>xa,menu:()=>Ca,motion:()=>va,orderedList:()=>ka,pagination:()=>wa,panelSection:()=>Ta,paragraph:()=>Da,popover:()=>Pa,popoverArrow:()=>So,preformated:()=>Oa,progress:()=>La,rating:()=>Va,ringProgress:()=>Ra,row:()=>Co,scrollArea:()=>$a,segmented:()=>_a,select:()=>Ma,selectBox:()=>Ba,selectItem:()=>Na,selectList:()=>Ha,skeleton:()=>Aa,small:()=>Fa,spinner:()=>Wa,splitter:()=>ja,splitterHandle:()=>Ya,splitterPanel:()=>Ka,stack:()=>Ga,steps:()=>qa,strong:()=>Ua,subscript:()=>Xa,superscript:()=>Za,table:()=>Ja,tabs:()=>Qa,tag:()=>xt,textarea:()=>ei,timeline:()=>ti,timelineItem:()=>oi,toast:()=>ni,toggleGroup:()=>ri,toolbar:()=>ai,toolbarSpacer:()=>ii,tooltip:()=>li,transitionGroup:()=>si,unorderedList:()=>ci});module.exports=sr(mi);var Xt=require("@domphy/core"),Re=require("@domphy/theme");function cr(r={}){var e,l;let o=(0,Xt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Xt.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Re.themeSize)(t),backgroundColor:t=>(0,Re.themeColor)(t),color:t=>(0,Re.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Re.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,Re.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Re.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,Re.themeColor)(t,"shift-9",n.get(t))}}}}var Jt=require("@domphy/core"),Qe=require("@domphy/theme");var Zt=require("@domphy/theme");function b(r,o="primary"){let n=(0,Zt.themeColor)(r,"surface"),e=(0,Zt.themeColor)(r,"shift-9",o);return`0 0 0 2px ${n}, 0 0 0 4px ${e}`}function mr(r={}){var l,t;let{type:o="single"}=r,n=(0,Jt.toState)((l=r.color)!=null?l:"neutral","color"),e=(0,Jt.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let s=a.domElement;if(!s)return;let c=d=>{let i=d.target.closest("summary");if(!i)return;let m=i.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};s.addEventListener("click",c),a.addHook("Remove",()=>s.removeEventListener("click",c))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,Qe.themeSpacing)((0,Qe.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,Qe.themeColor)(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>(0,Qe.themeColor)(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,Qe.themeColor)(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>b(a,e.get(a))}}}}var $o=require("@domphy/core"),de=require("@domphy/theme");function ur(r={}){var n;let o=(0,$o.toState)((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,de.themeSpacing)(3),paddingBlock:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*2),paddingInline:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*4),borderRadius:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,de.themeSpacing)(1)} 0 0 0 ${(0,de.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,de.themeColor)(e,"inherit",o.get(e)),color:e=>(0,de.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,de.themeSize)(e,"inherit")}}}var _o=require("@domphy/core"),We=require("@domphy/theme");function dr(r={}){var n;let o=(0,_o.toState)((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:(0,We.themeSpacing)(9),height:(0,We.themeSpacing)(9),fontSize:e=>(0,We.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,We.themeColor)(e,"inherit",o.get(e)),color:e=>(0,We.themeColor)(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${(0,We.themeColor)(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var Qt=require("@domphy/core"),De=require("@domphy/theme");function pr(r={}){var l;let{label:o=999}=r,n=(0,Qt.toState)(o),e=(0,Qt.toState)((l=r.color)!=null?l:"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:(0,De.themeSpacing)(1.5),minWidth:(0,De.themeSpacing)(5),height:(0,De.themeSpacing)(5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,De.themeSize)(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:(0,De.themeSpacing)(999),backgroundColor:t=>(0,De.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,De.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,De.themeColor)(t,"shift-0",e.get(t))}`}}}}var Mo=require("@domphy/core"),be=require("@domphy/theme");function hr(r={}){var n;let o=(0,Mo.toState)((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=>(0,be.themeSize)(e,"inherit"),backgroundColor:e=>(0,be.themeColor)(e,"inherit",o.get(e)),color:e=>(0,be.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset ${(0,be.themeSpacing)(1)} 0 0 0 ${(0,be.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*2),paddingInline:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*4),margin:0}}}var Bo=require("@domphy/core"),Pe=require("@domphy/theme");function gr(r={}){var e;let{separator:o="/"}=r,n=(0,Bo.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:l=>{l.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:l=>(0,Pe.themeSize)(l,"inherit"),gap:(0,Pe.themeSpacing)(1),color:l=>(0,Pe.themeColor)(l,"text",n.get(l)),backgroundColor:l=>(0,Pe.themeColor)(l,"inherit",n.get(l)),"& > *":{display:"inline-flex",alignItems:"center",color:l=>(0,Pe.themeColor)(l,"muted",n.get(l))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:l=>(0,Pe.themeColor)(l,"shift-4",n.get(l)),paddingInlineStart:(0,Pe.themeSpacing)(1)},"& > [aria-current=page]":{color:l=>(0,Pe.themeColor)(l,"shift-10",n.get(l)),pointerEvents:"none"}}}}var No=require("@domphy/core"),je=require("@domphy/theme");function fr(r={}){var n;let o=(0,No.toState)((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=>(0,je.themeSize)(e,"inherit"),paddingInline:(0,je.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,je.themeColor)(e,"muted",o.get(e)),borderRadius:(0,je.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,je.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,je.themeColor)(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>b(e,o.get(e))}}}}var Ao=require("@domphy/core"),B=require("@domphy/theme");var pt={small:"decrease-1",medium:"inherit",large:"increase-1"};var Ho=require("@domphy/core"),le=require("@domphy/theme");var yr={small:.5,medium:1,large:1.5};function eo(r={}){var l,t,a;let o=(0,Ho.toState)((l=r.color)!=null?l:"neutral","color"),n=yr[(t=r.size)!=null?t:"medium"],e=pt[(a=r.size)!=null?a:"medium"];return{_onInsert:s=>{s.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:s=>(0,le.themeSize)(s,e),paddingBlock:s=>(0,le.themeSpacing)((0,le.themeDensity)(s)*n),paddingInline:s=>(0,le.themeSpacing)((0,le.themeDensity)(s)*n),borderRadius:s=>(0,le.themeSpacing)((0,le.themeDensity)(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>(0,le.themeSpacing)((0,le.themeDensity)(s)*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:s=>(0,le.themeColor)(s,"shift-6",o.get(s)),"&:hover:not([disabled]):not([aria-busy=true])":{color:s=>(0,le.themeColor)(s,"text",o.get(s)),backgroundColor:s=>(0,le.themeColor)(s,"hover",o.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{color:s=>(0,le.themeColor)(s,"text",o.get(s)),backgroundColor:s=>(0,le.themeColor)(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>b(s,o.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:s=>(0,le.themeColor)(s,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var br={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Sr(r={}){var a,s,c,d;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return eo({color:r.color,size:r.size});let n=(0,Ao.toState)((s=r.color)!=null?s:"primary","color"),e=o==="solid",l=br[(c=r.size)!=null?c:"medium"],t=pt[(d=r.size)!=null?d:"medium"];return Ve(G({_onInsert:i=>{i.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:i=>(0,B.themeSize)(i,t),paddingBlock:i=>(0,B.themeSpacing)((0,B.themeDensity)(i)*l.block),paddingInline:i=>(0,B.themeSpacing)((0,B.themeDensity)(i)*l.inline),borderRadius:i=>(0,B.themeSpacing)((0,B.themeDensity)(i)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:i=>(0,B.themeSpacing)((0,B.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":i=>`1px solid ${(0,B.themeColor)(i,"border-strong",n.get(i))}`,color:i=>e?(0,B.themeColor)(i,"shift-0","neutral"):(0,B.themeColor)(i,"shift-13",n.get(i)),backgroundColor:i=>e?(0,B.themeColor)(i,"shift-13",n.get(i)):(0,B.themeColor)(i,"inherit",n.get(i)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:i=>e?(0,B.themeColor)(i,"shift-0","neutral"):(0,B.themeColor)(i,"shift-14",n.get(i)),backgroundColor:i=>e?(0,B.themeColor)(i,"shift-14",n.get(i)):(0,B.themeColor)(i,"hover",n.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:i=>e?(0,B.themeColor)(i,"shift-15",n.get(i)):(0,B.themeColor)(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>b(i,n.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:i=>(0,B.themeColor)(i,"shift-2","neutral"),outline:i=>`1px solid ${(0,B.themeColor)(i,"border-strong","neutral")}`,color:i=>(0,B.themeColor)(i,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}var It=require("@domphy/core"),q=require("@domphy/theme");function xr(r={}){var t,a;let{checked:o=!1}=r,n=(0,It.toState)(o),e=(0,It.toState)((t=r.color)!=null?t:"neutral","color"),l=(0,It.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>n.get(s),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>(0,q.themeSize)(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${(0,q.themeColor)(s,"border",e.get(s))}`,minWidth:(0,q.themeSpacing)(12),minHeight:(0,q.themeSpacing)(6),borderRadius:(0,q.themeSpacing)(999),paddingLeft:(0,q.themeSpacing)(7),paddingRight:(0,q.themeSpacing)(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:s=>(0,q.themeColor)(s,"inherit",e.get(s)),color:s=>(0,q.themeColor)(s,"text",e.get(s)),"&:focus-visible":{boxShadow:s=>b(s,l.get(s))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,q.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,q.themeSpacing)(5),height:(0,q.themeSpacing)(5),borderRadius:(0,q.themeSpacing)(999),color:s=>(0,q.themeColor)(s,"text"),backgroundColor:s=>(0,q.themeColor)(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>(0,q.themeColor)(s,"increase-3",l.get(s)),outline:"none",color:s=>(0,q.themeColor)(s,"decrease-2"),paddingLeft:(0,q.themeSpacing)(2),paddingRight:(0,q.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,q.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Fo=require("@domphy/core"),I=require("@domphy/theme");var Cr={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){return Cr[r]}function vr(r={}){var n;let o=(0,Fo.toState)((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=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),backgroundColor:e=>(0,I.themeColor)(e,"inherit",o.get(e)),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,I.themeColor)(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:_("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*4),fontWeight:"600",color:e=>(0,I.themeColor)(e,"shift-11",o.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*4),paddingBottom:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),color:e=>(0,I.themeColor)(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*4),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,I.themeSpacing)(2),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*2),paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,I.themeColor)(e,"border",o.get(e))}`}}}}var Wo=require("@domphy/core"),Ke=require("@domphy/theme");function kr(r={}){var n;let o=(0,Wo.toState)((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=>(0,Ke.themeSize)(e,"inherit"),color:e=>(0,Ke.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Ke.themeColor)(e,"inherit",o.get(e)),height:(0,Ke.themeSpacing)(6),paddingInline:(0,Ke.themeSpacing)(1.5),borderRadius:(0,Ke.themeSpacing)(1)}}}var et=require("@domphy/core"),W=require("@domphy/theme");var ht=require("@domphy/core"),$e=require("@domphy/floating");function Er(r,o){var R;let{openState:n,placement:e,content:l,keepOpenOnContentHover:t}=o,a=null,s=null,c=null,d=null,i=!1,m=r.domElement,y=r.getRoot(),g={style:{position:"fixed",pointerEvents:"auto",visibility:w=>n.get(w)?"visible":"hidden"},onKeyDown:w=>{w.key==="Escape"&&x()},onMouseEnter:()=>t&&v(),onMouseLeave:()=>t&&x(),_onMount:w=>{var $;if(c=w.domElement,m&&c&&!c.hasAttribute("data-theme")){let Te=($=m.closest("[data-theme]"))==null?void 0:$.getAttribute("data-theme");Te&&c.setAttribute("data-theme",Te)}},_portal:w=>{let $=w.domElement.querySelector("#domphy-floating");if(!$){let Te={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};$=w.children.insert(Te).domElement}return $}},u=w=>(0,ht.merge)(w,g);u(l);let p=()=>{i||(i=!0,d=y.children.insert(l))},h=()=>{p(),m&&c&&(s==null||s(),s=(0,$e.autoUpdate)(m,c,()=>{(0,$e.computePosition)(m,c,{placement:e.get(),middleware:[(0,$e.offset)(12),(0,$e.flip)(),(0,$e.shift)()],strategy:"fixed"}).then(({x:w,y:$,placement:Te})=>{c&&(Object.assign(c.style,{left:`${w}px`,top:`${$}px`}),e.set(Te))})}),n.set(!0))},C=()=>{s==null||s(),s=null,d&&(d.remove(),d=null),c=null,i=!1,n.set(!1)},v=()=>{a&&clearTimeout(a),a=setTimeout(h,100)},x=()=>{a&&clearTimeout(a),a=setTimeout(C,100)},O=w=>{if(!n.get()||!m||!c)return;let $=w.target;!m.contains($)&&!c.contains($)&&x()};return(R=y.domElement)==null||R.addEventListener("click",O),{show:v,hide:x,update(w){n=w.openState,e=w.placement,l=w.content,t=w.keepOpenOnContentHover,u(l),d&&d.patch(l)},destroy(){var w;a&&clearTimeout(a),s==null||s(),d==null||d.remove(),(w=y.domElement)==null||w.removeEventListener("click",O)}}}function _e(r){let{kind:o,open:n=!1,placement:e}=r,l=(0,ht.toState)(n),t=`floating:${o}`,a=d=>{var i;return(i=d==null?void 0:d.getBehavior(t))==null?void 0:i.show()},s=d=>{var i;return(i=d==null?void 0:d.getBehavior(t))==null?void 0:i.hide()},c=G({onKeyDown:(d,i)=>d.key==="Escape"&&s(i)},(0,ht.behavior)(t,Er,{openState:l,placement:e,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:c}}var zt=require("@domphy/core"),me=require("@domphy/theme");var wr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function xt(r={}){var e;let{removable:o=!1}=r,n=(0,zt.toState)((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:l=>{let t={span:(0,zt.rawHtml)(wr),onClick:a=>{a.stopPropagation(),l.remove()},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:(0,me.themeSpacing)(1),width:(0,me.themeSpacing)(4),height:(0,me.themeSpacing)(4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:a=>(0,me.themeColor)(a,"shift-4",n.get(a))},"&:focus-visible":{boxShadow:a=>b(a,n.get(a))}}};o&&l.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:(0,me.themeSpacing)(6),paddingBlock:0,borderRadius:(0,me.themeSpacing)(999),paddingInlineStart:(0,me.themeSpacing)(2.5),paddingInlineEnd:o?(0,me.themeSpacing)(1):(0,me.themeSpacing)(2.5),gap:(0,me.themeSpacing)(1.5),fontSize:l=>(0,me.themeSize)(l,"decrease-1"),backgroundColor:l=>(0,me.themeColor)(l,"inherit",n.get(l)),color:l=>(0,me.themeColor)(l,"text",n.get(l)),border:"none",outlineOffset:"-1px",outline:l=>`1px solid ${(0,me.themeColor)(l,"border-strong",n.get(l))}`}}}function Tr(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:l=!1,multiple:t=!1}=r,a=(0,et.toState)(r.value),s=(0,et.toState)(l),{show:c,hide:d,anchorPartial:i}=_e({kind:"combobox",open:s,placement:(0,et.toState)(n),content:r.content}),m={onClick:(h,C)=>!t&&d(C),dataTone:"shift-14",style:{backgroundColor:h=>(0,W.themeColor)(h,"inherit"),borderRadius:h=>(0,W.themeSpacing)((0,W.themeDensity)(h)*2),outline:h=>`1px solid ${(0,W.themeColor)(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,et.merge)(r.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,W.themeSpacing)(6),marginInlineStart:(0,W.themeSpacing)(2),fontSize:h=>(0,W.themeSize)(h,"inherit"),color:h=>(0,W.themeColor)(h,"text",e),backgroundColor:h=>(0,W.themeColor)(h,"inherit",e)},g;if(r.input){let h={onFocus:(C,v)=>c(v),style:y,_key:"combobox-input"};(0,et.merge)(r.input,h),g=r.input}else g={input:null,onFocus:(h,C)=>c(C),value:h=>(a.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let C=a.get(h),v=Array.isArray(C)?C:[C],O=o.filter(R=>v.includes(R.value)).map(R=>({span:R.label,$:[xt({color:e,removable:!0})],_key:R.value,_onRemove:w=>{let $=a.get(),nt=(Array.isArray($)?$:[$]).filter(Ze=>Ze!==R.value);t?a.set(nt):a.set(nt[0])}}));return O.push(g),O},style:{display:"flex",flexWrap:"wrap",gap:(0,W.themeSpacing)(1)}},p={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:(0,W.themeSpacing)(32),outlineOffset:"-1px",outline:h=>`1px solid ${(0,W.themeColor)(h,"border-strong","neutral")}`,paddingBlock:h=>(0,W.themeSpacing)((0,W.themeDensity)(h)*1),paddingInline:h=>(0,W.themeSpacing)((0,W.themeDensity)(h)*1),borderRadius:h=>(0,W.themeSpacing)((0,W.themeDensity)(h)*1.5),fontSize:h=>(0,W.themeSize)(h,"inherit"),color:h=>(0,W.themeColor)(h,"text",e),backgroundColor:h=>(0,W.themeColor)(h,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:h=>b(h,e)}}};return(0,et.merge)(i,p),i}var Vt=require("@domphy/core"),U=require("@domphy/theme");function Dr(){return{_onSchedule:(r,o)=>{(0,Vt.merge)(o,{_context:{command:{query:(0,Vt.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Pr(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 l=e.getContext("command");if(!l){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>l.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,U.themeSize)(e,"inherit"),paddingInline:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*3),paddingBlock:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,U.themeColor)(e,"border",o)}`,outline:"none",color:e=>(0,U.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,U.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,U.themeColor)(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,U.themeColor)(e,"shift-6",n),boxShadow:e=>b(e,n)}}}}function Or(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{role:"option",_onMount:e=>{var d,i;let l=e.getContext("command");if(!l){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(i=(d=t.textContent)==null?void 0:d.toLowerCase())!=null?i:"",s=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};s(l.query.get());let c=l.query.addListener(s);e.addHook("Remove",c)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,U.themeSize)(e,"inherit"),height:e=>(0,U.themeSpacing)(6+(0,U.themeDensity)(e)*2),paddingInline:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,U.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,U.themeColor)(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>(0,U.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,U.themeColor)(e,"hover",o)},"&:focus-visible":{boxShadow:e=>b(e,n)}}}}var ve=require("@domphy/core"),k=require("@domphy/theme");var ce=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),rt=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),to=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Ct=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),oo=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,no=(r,o)=>rt(r,-((r.getDay()-o+7)%7));function Lr(r){var o,n;try{let e=new Intl.Locale(r),l=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(l!=null&&l.firstDay)return l.firstDay%7}catch(e){}return 0}function Ir(r={}){var Po,Oo,Lo,Io;let{mode:o="single",time:n=!1,min:e,max:l,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:c}=r,d=(Po=r.weekStartsOn)!=null?Po:Lr(a),i=(0,ve.toState)((Oo=r.accentColor)!=null?Oo:"primary","accentColor"),m=(0,ve.toState)((Lo=r.placement)!=null?Lo:"bottom-start"),y=(0,ve.toState)((Io=r.value)!=null?Io:o==="range"?[null,null]:null),g=c?y.addListener(f=>c(f)):null,u=(()=>{let f=y.get(),S=o==="range"?f==null?void 0:f[0]:f;return S instanceof Date?S:new Date})(),p=(0,ve.toState)(u.getFullYear(),"viewYear"),h=(0,ve.toState)(u.getMonth(),"viewMonth"),C=(0,ve.toState)(ce(u),"focused"),v=(0,ve.toState)(null,"hovered"),x=(0,ve.toState)(u.getHours(),"hour"),O=(0,ve.toState)(u.getMinutes(),"minute"),R=null,w=new Intl.DateTimeFormat(a,G({dateStyle:"medium"},n?{timeStyle:"short"}:{})),$=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),Te=new Intl.DateTimeFormat(a,{weekday:"short"}),nt=new Intl.DateTimeFormat(a,{dateStyle:"full"}),Ze=f=>f?w.format(f):"",Nn=f=>{if(s)return s(f);if(o==="range"){let[S,E]=f!=null?f:[null,null];return S?`${Ze(S)} \u2013 ${Ze(E)}`:""}return Ze(f)},Hn=Array.from({length:7},(f,S)=>Te.format(new Date(2023,0,1+(S+d)%7))),Eo=f=>!!e&&ce(f)<ce(e)||!!l&&ce(f)>ce(l)||!!t&&t(f),Je=f=>{if(!n)return ce(f);let S=ce(f);return S.setHours(x.get(),O.get(),0,0),S},wo=f=>{var D;if(Eo(f))return;if(o==="single"){y.set(Je(f)),n||qt();return}let[S,E]=(D=y.get())!=null?D:[null,null];!S||S&&E?y.set([Je(f),null]):ce(f)<ce(S)?(y.set([Je(f),Je(S)]),n||qt()):(y.set([S,Je(f)]),n||qt())},An=()=>{var f;if(n)if(o==="single"){let S=y.get();S&&y.set(Je(S))}else{let[S,E]=(f=y.get())!=null?f:[null,null];y.set([S&&Je(S),E&&Je(E)])}},Fn=(f,S)=>{var dt;if(o!=="range")return!1;let[E,D]=(dt=y.get(S))!=null?dt:[null,null],J=D!=null?D:v.get(S);if(!E||!J)return!1;let P=ce(E)<=ce(J)?E:J,Ce=ce(E)<=ce(J)?J:E,ge=ce(f);return ge>=ce(P)&&ge<=ce(Ce)},Wn=(f,S)=>{let E=y.get(S);if(o==="range"){let[D,J]=E!=null?E:[null,null];return Ct(f,D)||Ct(f,J)}return Ct(f,E)},Ot=f=>{p.set(f.getFullYear()),h.set(f.getMonth())},To=f=>{let S=to(new Date(p.get(),h.get(),1),f);Ot(S)},Do=f=>p.set(p.get()+f),Yt=()=>{setTimeout(()=>{var f;(f=R==null?void 0:R.querySelector(`[data-date="${oo(C.get())}"]`))==null||f.focus()},0)},jn=Un(),{show:Kn,hide:Yn,anchorPartial:Gt}=_e({kind:"datePicker",open:!1,placement:m,content:jn});function qt(){Yn()}Gt.onClick=()=>{};let Gn={type:"text",readonly:!0,value:f=>Nn(y.get(f)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(f,S)=>{Ut(S)},onFocus:(f,S)=>{Ut(S)},onKeyDown:(f,S)=>{let E=f.key;(E==="ArrowDown"||E==="Enter")&&(f.preventDefault(),Ut(S))},_onMount:f=>g&&f.addHook("Remove",()=>{g()})};function Ut(f){var E;let S=(E=qn())!=null?E:new Date;C.set(ce(S)),Ot(S),Kn(f),Yt()}function qn(){var S;let f=y.get();return o==="range"?(S=f==null?void 0:f[0])!=null?S:null:f!=null?f:null}return(0,ve.merge)(Gt,Gn),Gt;function Un(){let f=(P,Ce,ge)=>({button:P,type:"button",ariaLabel:Ce,onClick:ge,style:zr()}),S={div:[f("\xAB","Previous year",()=>Do(-1)),f("\u2039","Previous month",()=>To(-1)),{div:P=>$.format(new Date(p.get(P),h.get(P),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:P=>(0,k.themeSize)(P)}},f("\u203A","Next month",()=>To(1)),f("\xBB","Next year",()=>Do(1))],style:{display:"flex",alignItems:"center",gap:(0,k.themeSpacing)(1),marginBottom:(0,k.themeSpacing)(2)}},E={div:Hn.map((P,Ce)=>({div:P,style:{textAlign:"center",fontSize:ge=>(0,k.themeSize)(ge,"decrease-1"),fontWeight:"bold",color:ge=>(0,k.themeColor)(ge,"shift-7"),paddingBlock:(0,k.themeSpacing)(1)},_key:Ce})),role:"row",style:jo()},D={div:P=>Xn(P),role:"grid",ariaLabel:"Calendar",onKeyDown:er,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:(0,k.themeSpacing)(.5)}},J=[S,E,D];return n&&J.push(Jn()),J.push(Qn()),{div:J,role:"dialog",ariaModal:"false",_onMount:P=>{R=P.domElement},style:{minWidth:(0,k.themeSpacing)(70),padding:(0,k.themeSpacing)(3),borderRadius:P=>(0,k.themeSpacing)((0,k.themeDensity)(P)*2),backgroundColor:P=>(0,k.themeColor)(P,"base"),color:P=>(0,k.themeColor)(P,"shift-10"),border:P=>`1px solid ${(0,k.themeColor)(P,"border-strong")}`,boxShadow:_("medium")}}}function Xn(f){let S=new Date(p.get(f),h.get(f),1),E=h.get(f),D=no(S,d),J=[];for(let P=0;P<6;P++){let Ce=[];for(let ge=0;ge<7;ge++){let dt=rt(D,P*7+ge);Ce.push(Zn(dt,E,f))}J.push({div:Ce,role:"row",style:jo(),_key:P})}return J}function Zn(f,S,E){let D=Eo(f),J=Wn(f,E),P=Fn(f,E),Ce=f.getMonth()!==S,ge=Ct(f,C.get(E)),dt=Ct(f,new Date);return{button:String(f.getDate()),type:"button",role:"gridcell",tabIndex:ge?0:-1,ariaSelected:J,ariaDisabled:D,disabled:D,ariaLabel:nt.format(f),dataDate:oo(f),onClick:()=>wo(f),onMouseEnter:()=>o==="range"&&v.set(f),style:{appearance:"none",border:"none",cursor:D?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,k.themeSpacing)(1),fontSize:Q=>(0,k.themeSize)(Q),fontFamily:"inherit",opacity:D?.35:Ce?.5:1,backgroundColor:Q=>J?(0,k.themeColor)(Q,"shift-7",i.get(Q)):P?(0,k.themeColor)(Q,"hover",i.get(Q)):"transparent",color:Q=>J?(0,k.themeColor)(Q,"shift-0",i.get(Q)):(0,k.themeColor)(Q,"text"),outline:dt?Q=>`1px solid ${(0,k.themeColor)(Q,"shift-6",i.get(Q))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:Q=>J?(0,k.themeColor)(Q,"shift-7",i.get(Q)):(0,k.themeColor)(Q,"shift-3",i.get(Q))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:Q=>b(Q,i.get(Q))}},_key:oo(f)}}function Jn(){let f=(S,E,D)=>({select:Array.from({length:S},(J,P)=>({option:String(P).padStart(2,"0"),value:String(P),selected:Ce=>E.get(Ce)===P,_key:P})),ariaLabel:D,onChange:J=>{E.set(Number(J.target.value)),An()},style:Vr()});return{div:[f(24,x,"Hour"),{span:":",style:{fontWeight:"bold"}},f(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,k.themeSpacing)(1),marginTop:(0,k.themeSpacing)(3)}}}function Qn(){let f=(S,E)=>({button:S,type:"button",onClick:E,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:D=>(0,k.themeSize)(D,"decrease-1"),color:D=>(0,k.themeColor)(D,"muted",i.get(D)),padding:(0,k.themeSpacing)(1)}});return{div:[f("Today",()=>{let S=new Date;C.set(ce(S)),Ot(S),Yt()}),f("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,k.themeSpacing)(2),paddingTop:(0,k.themeSpacing)(2),borderTop:S=>`1px solid ${(0,k.themeColor)(S,"border")}`}}}function er(f){let S=f,E=C.get(),D=null;switch(S.key){case"ArrowLeft":D=rt(E,-1);break;case"ArrowRight":D=rt(E,1);break;case"ArrowUp":D=rt(E,-7);break;case"ArrowDown":D=rt(E,7);break;case"Home":D=no(E,d);break;case"End":D=rt(no(E,d),6);break;case"PageUp":D=to(E,S.shiftKey?-12:-1);break;case"PageDown":D=to(E,S.shiftKey?12:1);break;case"Enter":case" ":S.preventDefault(),wo(E);return;default:return}S.preventDefault(),C.set(D),Ot(D),Yt()}}function jo(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,k.themeSpacing)(.5)}}function zr(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,k.themeSize)(r),color:r=>(0,k.themeColor)(r,"muted"),width:(0,k.themeSpacing)(7),height:(0,k.themeSpacing)(7),borderRadius:(0,k.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,k.themeColor)(r,"shift-3")}}}function Vr(){return{fontFamily:"inherit",fontSize:r=>(0,k.themeSize)(r),padding:(0,k.themeSpacing)(1),borderRadius:(0,k.themeSpacing)(1),border:r=>`1px solid ${(0,k.themeColor)(r,"border-strong")}`,backgroundColor:r=>(0,k.themeColor)(r,"base"),color:r=>(0,k.themeColor)(r,"text")}}var Ko=require("@domphy/core"),Ye=require("@domphy/theme");function Rr(r={}){var n;let o=(0,Ko.toState)((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(${(0,Ye.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,Ye.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,Ye.themeSize)(e,"inherit"),color:e=>(0,Ye.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,Ye.themeSize)(e,"inherit"),color:e=>(0,Ye.themeColor)(e,"text",o.get(e))}}}}var ro=require("@domphy/core"),L=require("@domphy/theme");function $r(r={}){var l,t;let{duration:o=240}=r,n=(0,ro.toState)((l=r.color)!=null?l:"neutral","color"),e=(0,ro.toState)((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=>(0,L.themeSize)(a,"inherit"),color:a=>(0,L.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,L.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,L.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,L.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,L.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,L.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*4),height:(0,L.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,L.themeSpacing)(2),height:(0,L.themeSpacing)(2),flexShrink:0,marginTop:`-${(0,L.themeSpacing)(.5)}`,borderInlineEnd:a=>`${(0,L.themeSpacing)(.5)} solid ${(0,L.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,L.themeSpacing)(.5)} solid ${(0,L.themeColor)(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,L.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*2),boxShadow:a=>b(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:(0,L.themeSpacing)(250),opacity:1,paddingTop:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*1),paddingBottom:a=>(0,L.themeSpacing)((0,L.themeDensity)(a)*3)}}}}var Go=require("@domphy/core"),ke=require("@domphy/theme");var vt=0;function Rt(){vt++,vt===1&&(document.body.style.overflow="hidden")}function gt(){vt=Math.max(0,vt-1),vt===0&&(document.body.style.overflow="")}var Yo='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function _r(r={}){let{color:o="neutral",open:n=!1}=r,e=(0,Go.toState)(n),l=null,t=!1,a=!1,s=c=>{t=!1,typeof c.close=="function"&&c.close(),c.style.visibility="hidden",c.style.pointerEvents="none",a&&(gt(),a=!1),l==null||l.focus(),l=null};return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(c,d)=>{if(c.target!==d.domElement)return;let i=d.domElement.getBoundingClientRect();c.clientX>=i.left&&c.clientX<=i.right&&c.clientY>=i.top&&c.clientY<=i.bottom||e.set(!1)},onTransitionEnd:(c,d)=>{t&&c.target===d.domElement&&c.propertyName==="opacity"&&s(d.domElement)},_onMount:c=>{let d=c.domElement;d.setAttribute("aria-modal","true");let i=null,m=p=>{if(p.key!=="Tab")return;let h=Array.from(d.querySelectorAll(Yo)).filter(x=>!x.closest("[aria-hidden='true']")&&x.offsetParent!==null);if(!h.length){p.preventDefault();return}let C=h[0],v=h[h.length-1];p.shiftKey?(document.activeElement===C||document.activeElement===d)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),C.focus())},y=p=>{p.preventDefault(),e.set(!1)};d.addEventListener("cancel",y);let g=p=>{p?(l=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),a||(Rt(),a=!0),d.addEventListener("keydown",m),requestAnimationFrame(()=>{d.style.opacity="1";let h=d.querySelector(Yo);h==null||h.focus()})):(t=!0,d.style.opacity="0",d.removeEventListener("keydown",m),i=setTimeout(()=>{i=null,t&&s(d)},350))};g(e.get());let u=e.addListener(g);c.addHook("Remove",()=>{i&&(clearTimeout(i),i=null),u(),d.removeEventListener("cancel",y),a&&(gt(),a=!1),d.removeEventListener("keydown",m),l==null||l.focus(),l=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:c=>(0,ke.themeSize)(c,"inherit"),color:c=>(0,ke.themeColor)(c,"shift-10",o),backgroundColor:c=>(0,ke.themeColor)(c,"inherit",o),border:"none",borderRadius:c=>(0,ke.themeSpacing)((0,ke.themeDensity)(c)*2),padding:c=>(0,ke.themeSpacing)((0,ke.themeDensity)(c)*3),boxShadow:_("high"),"&::backdrop":{backgroundColor:c=>(0,ke.themeColor)(c,"shift-2","neutral"),opacity:.75}}}}var qo=require("@domphy/core"),Ge=require("@domphy/theme");function Mr(r={}){var n;let o=(0,qo.toState)((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:(0,Ge.themeSpacing)(2),fontSize:e=>(0,Ge.themeSize)(e,"inherit"),backgroundColor:e=>(0,Ge.themeColor)(e),color:e=>(0,Ge.themeColor)(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,Ge.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,Ge.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var Zo=require("@domphy/core"),Ee=require("@domphy/theme");var ao={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Uo={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},kt=r=>r==="left"||r==="right";function Xo(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function Br(r={}){let{color:o="neutral",open:n=!1,placement:e="end",size:l}=r,t=(0,Zo.toState)(n),a=e==="start"||e==="end",s=Xo(e,!1),c=kt(s)?(0,Ee.themeSpacing)(80):(0,Ee.themeSpacing)(64),d=l!=null?l:c;return{_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(i,m)=>{i.target===m.domElement&&t.set(!1)},_onMount:i=>{let m=i.domElement;m.setAttribute("aria-modal","true");let y=w=>{w.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let g=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=Xo(e,g);a&&(m.style.transform=ao[u],m.style.margin=Uo[u],m.style.width=kt(u)?d:"100dvw",m.style.height=kt(u)?"100dvh":d);let p=!1,h=!1,C=null,v=()=>{C=null,p&&(p=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",h&&(gt(),h=!1))},x=w=>{w.target===m&&w.propertyName==="transform"&&v()};m.addEventListener("transitionend",x);let O=w=>{w?(p=!1,m.style.visibility="visible",m.style.pointerEvents="auto",typeof m.showModal=="function"&&m.showModal(),h||(Rt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(p=!0,m.style.transform=ao[u],C=setTimeout(v,350))};O(t.get());let R=t.addListener(O);i.addHook("Remove",()=>{C&&(clearTimeout(C),C=null),R(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",x),h&&(gt(),h=!1)})},style:{transform:ao[s],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:i=>(0,Ee.themeSize)(i,"inherit"),color:i=>(0,Ee.themeColor)(i,"shift-10",o),backgroundColor:i=>(0,Ee.themeColor)(i,"inherit",o),border:"none",padding:i=>(0,Ee.themeSpacing)((0,Ee.themeDensity)(i)*3),margin:Uo[s],width:kt(s)?d:"100dvw",height:kt(s)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:_("high"),"&::backdrop":{backgroundColor:i=>(0,Ee.themeColor)(i,"shift-2","neutral"),opacity:.75}}}}var Jo=require("@domphy/core"),$t=require("@domphy/theme");function Nr(r={}){var n;let o=(0,Jo.toState)((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=>(0,$t.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,$t.themeColor)(e,"shift-10",o.get(e))}}}var Qo=require("@domphy/core"),tt=require("@domphy/theme");function Hr(r={}){var n;let o=(0,Qo.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,tt.themeSpacing)(3),paddingBlock:(0,tt.themeSpacing)(12),paddingInline:(0,tt.themeSpacing)(6),textAlign:"center",color:e=>(0,tt.themeColor)(e,"muted",o.get(e)),"& > :first-child":{color:e=>(0,tt.themeColor)(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,tt.themeColor)(e,"text",o.get(e))}}}}function Ar(r={}){return{_onError:(o,n,e)=>{var t,a;(t=r.onError)==null||t.call(r,n);let l=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([l])}}}var en=require("@domphy/core"),qe=require("@domphy/theme");var Fr={small:8,medium:10,large:14};function Wr(r={}){var e,l;let o=(0,en.toState)((e=r.color)!=null?e:"primary","color"),n=(0,qe.themeSpacing)(Fr[(l=r.size)!=null?l:"medium"]);return{_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=>(0,qe.themeSize)(t,"inherit"),backgroundColor:t=>(0,qe.themeColor)(t,"shift-13",o.get(t)),color:t=>(0,qe.themeColor)(t,"shift-0","neutral"),boxShadow:_("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,qe.themeColor)(t,"shift-14",o.get(t)),boxShadow:_("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,qe.themeColor)(t,"shift-15",o.get(t)),boxShadow:_("low")},"&:focus-visible":{boxShadow:t=>`${_("medium")}, ${b(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var tn=require("@domphy/core"),Me=require("@domphy/theme");function jr(r={}){var n;let o=(0,tn.toState)((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:(0,Me.themeSpacing)(2),marginInline:0,marginTop:(0,Me.themeSpacing)(3),marginBottom:(0,Me.themeSpacing)(3),color:e=>(0,Me.themeColor)(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,Me.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,Me.themeSize)(e,"decrease-1"),color:e=>(0,Me.themeColor)(e,"muted",o.get(e)),lineHeight:1.45}}}}var on=require("@domphy/core"),N=require("@domphy/theme");function Kr(r={}){var l;let{layout:o="horizontal"}=r,n=(0,on.toState)((l=r.color)!=null?l:"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=>(0,N.themeSpacing)((0,N.themeDensity)(t)*3),paddingBlock:t=>(0,N.themeSpacing)((0,N.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,N.themeSpacing)((0,N.themeDensity)(t)*2),fontSize:t=>(0,N.themeSize)(t,"inherit"),backgroundColor:t=>(0,N.themeColor)(t,"inherit",n.get(t)),color:t=>(0,N.themeColor)(t,"text",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,N.themeSpacing)(4),rowGap:(0,N.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,N.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,N.themeSpacing)((0,N.themeDensity)(t)*1),borderRadius:t=>(0,N.themeSpacing)((0,N.themeDensity)(t)*2),color:t=>(0,N.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,N.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:(0,N.themeSpacing)((0,N.themeDensity)(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(${(0,N.themeSpacing)(2)} * -1)`,fontSize:t=>(0,N.themeSize)(t,"decrease-1"),color:t=>(0,N.themeColor)(t,"text",n.get(t))}}}}var nn=require("@domphy/core"),ft=require("@domphy/theme"),Yr={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Gr(r={}){var n;let o=(0,nn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>(0,ft.themeColor)(e,"shift-11",o.get(e)),marginTop:0,marginBottom:(0,ft.themeSpacing)(2),fontSize:e=>{let l=Yr[e.elementNode.tagName]||"inherit";return(0,ft.themeSize)(e,l)}}}}var rn=require("@domphy/core"),yt=require("@domphy/theme");function qr(r={}){var n;let o=(0,rn.toState)((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:(0,yt.themeSpacing)(3),marginBottom:(0,yt.themeSpacing)(3),backgroundColor:e=>(0,yt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,yt.themeColor)(e,"text",o.get(e))}}}var an=require("@domphy/core"),at=require("@domphy/theme");function Ur(r={}){var n;let o=(0,an.toState)((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:(0,at.themeSpacing)(4),height:(0,at.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,at.themeSize)(e),backgroundColor:"transparent",color:e=>(0,at.themeColor)(e,"text",o.get(e))}}}var ln=require("@domphy/core"),Et=require("@domphy/theme");function Xr(r={}){var n;let o=(0,ln.toState)((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:(0,Et.themeSpacing)(2),backgroundColor:e=>(0,Et.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Et.themeColor)(e,"text",o.get(e))}}}var io=require("@domphy/core"),Y=require("@domphy/theme");function Zr(r={}){var e,l;let o=(0,io.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,io.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,Y.themeSize)(t,"inherit"),color:t=>(0,Y.themeColor)(t,"text",o.get(t)),display:"inline-flex",position:"relative",width:(0,Y.themeSpacing)(6),height:(0,Y.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,Y.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,Y.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,Y.themeColor)(t,"text",o.get(t)),width:(0,Y.themeSpacing)(4),height:(0,Y.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,Y.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,Y.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,Y.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,Y.themeColor)(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,Y.themeSpacing)(.5)} solid ${(0,Y.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,Y.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,Y.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,Y.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,Y.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,Y.themeSpacing)(1.5),boxShadow:t=>b(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,Y.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var sn=require("@domphy/core"),oe=require("@domphy/theme");function Jr(r={}){var n;let o=(0,sn.toState)((n=r.color)!=null?n:"neutral","color");return{type:"color",_onSchedule:(e,l)=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),l.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,oe.themeSize)(e,"inherit"),color:e=>(0,oe.themeColor)(e,"text",o.get(e)),paddingBlock:e=>(0,oe.themeSpacing)((0,oe.themeDensity)(e)*1),paddingInline:e=>(0,oe.themeSpacing)((0,oe.themeDensity)(e)*1),blockSize:e=>(0,oe.themeSpacing)(6+(0,oe.themeDensity)(e)*2),inlineSize:e=>(0,oe.themeSpacing)(6+(0,oe.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,oe.themeSpacing)((0,oe.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>b(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,oe.themeSpacing)((0,oe.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,oe.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,oe.themeColor)(e,"border-strong","neutral")}`}}}}var lo=require("@domphy/core"),ne=require("@domphy/theme");function Qr(r={}){var l,t;let{mode:o="datetime-local"}=r,n=(0,lo.toState)((l=r.color)!=null?l:"neutral","color"),e=(0,lo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=o},style:{fontFamily:"inherit",fontSize:a=>(0,ne.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,ne.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,ne.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ne.themeColor)(a,"border-strong",n.get(a))}`,borderRadius:a=>(0,ne.themeSpacing)((0,ne.themeDensity)(a)*1.5),paddingInline:a=>(0,ne.themeSpacing)((0,ne.themeDensity)(a)*3),height:a=>(0,ne.themeSpacing)(6+(0,ne.themeDensity)(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 ${(0,ne.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>b(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,ne.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,ne.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,ne.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,ne.themeSpacing)(.5)} solid ${(0,ne.themeColor)(a,"shift-6","error")}`}}}}var so=require("@domphy/core"),H=require("@domphy/theme");function ea(r={}){var e,l;let o=(0,so.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,so.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,H.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,H.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,H.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,H.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,H.themeSpacing)((0,H.themeDensity)(t)*1.5),height:t=>(0,H.themeSpacing)(6+(0,H.themeDensity)(t)*2),paddingInline:t=>(0,H.themeSpacing)((0,H.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,H.themeSpacing)((0,H.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,H.themeSpacing)(1),height:(0,H.themeSpacing)(6),paddingInline:(0,H.themeSpacing)(2),cursor:"pointer",color:t=>(0,H.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,H.themeColor)(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,H.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,H.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,H.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,H.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,H.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,H.themeColor)(t,"shift-3","neutral")}}}}var co=require("@domphy/core"),ee=require("@domphy/theme");function ta(r={}){var e,l;let o=(0,co.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,co.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,ee.themeSpacing)(10),paddingInlineStart:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*3),paddingInlineEnd:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1.5),paddingBlock:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1),borderRadius:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1.5),fontSize:t=>(0,ee.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ee.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,ee.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,ee.themeColor)(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 ${(0,ee.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,ee.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ee.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,ee.themeColor)(t,"muted","neutral")}}}}var mo=require("@domphy/theme");function oa(){return{style:{display:"flex",alignItems:"center",gap:(0,mo.themeSpacing)(2),"& > *":{minWidth:`${(0,mo.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let s=n(),c=a.target,d=s.indexOf(c);c.value&&d<s.length-1&&s[d+1].focus()},l=a=>{let s=n(),c=a.target,d=s.indexOf(c);a.key==="Backspace"&&!c.value&&d>0&&s[d-1].focus(),a.key==="ArrowLeft"&&d>0&&s[d-1].focus(),a.key==="ArrowRight"&&d<s.length-1&&s[d+1].focus()},t=a=>{var y,g,u;a.preventDefault();let s=(g=(y=a.clipboardData)==null?void 0:y.getData("text"))!=null?g:"",c=n(),d=c.indexOf(a.target),i=d===-1?0:d;[...s].forEach((p,h)=>{c[i+h]&&(c[i+h].value=p)});let m=Math.min(i+s.length-1,c.length-1);(u=c[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",l),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",l),o.removeEventListener("paste",t)})}}}var bt=require("@domphy/core"),ue=require("@domphy/theme");var na='<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>',ra='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function aa(r={}){var l,t;let o=(0,bt.toState)((l=r.color)!=null?l:"neutral","color"),n=(0,bt.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),e=(0,bt.toState)(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type:d=>e.get(d)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},c={button:d=>(0,bt.rawHtml)(e.get(d)?ra:na),type:"button",ariaLabel:d=>e.get(d)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(s),a.children.insert(c)},style:{display:"flex",alignItems:"center",gap:a=>(0,ue.themeSpacing)((0,ue.themeDensity)(a)*1),paddingBlock:a=>(0,ue.themeSpacing)((0,ue.themeDensity)(a)*1),paddingInline:a=>(0,ue.themeSpacing)((0,ue.themeDensity)(a)*3),borderRadius:a=>(0,ue.themeSpacing)((0,ue.themeDensity)(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ue.themeColor)(a,"border-strong",o.get(a))}`,color:a=>(0,ue.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,ue.themeColor)(a,"inherit",o.get(a)),fontSize:a=>(0,ue.themeSize)(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${(0,ue.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-within":{boxShadow:a=>b(a,n.get(a))}}}}var uo=require("@domphy/core"),pe=require("@domphy/theme");function ia(r={}){var e,l;let o=(0,uo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,uo.toState)((l=r.accentColor)!=null?l:"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=>(0,pe.themeSize)(t,"inherit"),color:t=>(0,pe.themeColor)(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,pe.themeSpacing)(6),height:(0,pe.themeSpacing)(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 ${(0,pe.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,pe.themeColor)(t,"text",o.get(t)),width:(0,pe.themeSpacing)(4),height:(0,pe.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,pe.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,pe.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,pe.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,pe.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>b(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,pe.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var po=require("@domphy/core"),fe=require("@domphy/theme");function la(r={}){var e,l;let o=(0,po.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,po.toState)((l=r.accentColor)!=null?l:"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:(0,fe.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,fe.themeSpacing)(1.5),borderRadius:(0,fe.themeSpacing)(999),backgroundColor:t=>(0,fe.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,fe.themeSpacing)(4),height:(0,fe.themeSpacing)(4),borderRadius:(0,fe.themeSpacing)(999),border:"none",marginTop:`calc((${(0,fe.themeSpacing)(1.5)} - ${(0,fe.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,fe.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,fe.themeColor)(t,"shift-10",n.get(t))},borderRadius:(0,fe.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var ho=require("@domphy/core"),re=require("@domphy/theme");function sa(r={}){var e,l;let o=(0,ho.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ho.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>(0,re.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,re.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,re.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,re.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,re.themeSpacing)((0,re.themeDensity)(t)*1.5),minWidth:(0,re.themeSpacing)(32),paddingInline:t=>(0,re.themeSpacing)((0,re.themeDensity)(t)*3),paddingBlock:t=>(0,re.themeSpacing)((0,re.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,re.themeColor)(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 ${(0,re.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,re.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,re.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,re.themeColor)(t,"border-strong","neutral")}`}}}}var cn=require("@domphy/core"),ae=require("@domphy/theme");function ca(r={}){var n;let o=(0,cn.toState)((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=>(0,ae.themeSize)(e,"inherit"),backgroundColor:e=>(0,ae.themeColor)(e,"inherit"),color:e=>(0,ae.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,ae.themeSpacing)(9),height:(0,ae.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,ae.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,ae.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>b(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,ae.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,ae.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,ae.themeSpacing)(3),height:(0,ae.themeSpacing)(3),borderRadius:(0,ae.themeSpacing)(999),left:(0,ae.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,ae.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,ae.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,ae.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,ae.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var go=require("@domphy/core"),A=require("@domphy/theme");function ma(r={}){var e,l;let o=(0,go.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,go.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,A.themeSpacing)(10),paddingInline:t=>(0,A.themeSpacing)((0,A.themeDensity)(t)*3),paddingBlock:t=>(0,A.themeSpacing)((0,A.themeDensity)(t)*1),borderRadius:t=>(0,A.themeSpacing)((0,A.themeDensity)(t)*1.5),fontSize:t=>(0,A.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,A.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,A.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,A.themeColor)(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,A.themeColor)(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>(0,A.themeColor)(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,A.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,A.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,A.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,A.themeColor)(t,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${(0,A.themeSpacing)(.5)} solid ${(0,A.themeColor)(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${(0,A.themeSpacing)(.5)} solid ${(0,A.themeColor)(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${(0,A.themeSpacing)(.5)} solid ${(0,A.themeColor)(t,"shift-6","warning")}`}}}}var mn=require("@domphy/core"),Be=require("@domphy/theme");function ua(r={}){var n;let o=(0,mn.toState)((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=>(0,Be.themeSize)(e,"inherit"),color:e=>(0,Be.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Be.themeColor)(e,"inherit",o.get(e)),paddingBlock:(0,Be.themeSpacing)(.5),paddingInline:(0,Be.themeSpacing)(1.5),borderRadius:(0,Be.themeSpacing)(1),outline:e=>`1px solid ${(0,Be.themeColor)(e,"border-strong",o.get(e))}`}}}var fo=require("@domphy/core"),ot=require("@domphy/theme");function da(r={}){var e,l;let o=(0,fo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,fo.toState)((l=r.accentColor)!=null?l:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,ot.themeSpacing)(2),fontSize:t=>(0,ot.themeSize)(t,"inherit"),color:t=>(0,ot.themeColor)(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,ot.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,ot.themeColor)(t,"muted","neutral")}}}}var yo=require("@domphy/core"),Ne=require("@domphy/theme");function pa(r={}){var e,l;let o=(0,yo.toState)((e=r.color)!=null?e:"primary","color"),n=(0,yo.toState)((l=r.accentColor)!=null?l:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>(0,Ne.themeSize)(t,"inherit"),backgroundColor:t=>(0,Ne.themeColor)(t),color:t=>(0,Ne.themeColor)(t,"shift-13",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,Ne.themeColor)(t,"shift-13",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,Ne.themeColor)(t,"shift-14",o.get(t)),textDecoration:"underline"},borderRadius:(0,Ne.themeSpacing)(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,Ne.themeColor)(t,"muted","neutral")}}}}var un=require("@domphy/core"),T=require("@domphy/theme");var ha={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},ga={small:.5,medium:1,large:1.5};function fa(r={}){var s,c,d;let o=(s=r.variant)!=null?s:"outline",n=(0,un.toState)((c=r.color)!=null?c:o==="ghost"?"neutral":"primary","color"),e=(d=r.size)!=null?d:"medium",l=pt[e];if(o==="ghost"){let i=ga[e];return{_onInsert:m=>{m.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:m=>(0,T.themeSize)(m,l),textDecoration:"none",paddingBlock:m=>(0,T.themeSpacing)((0,T.themeDensity)(m)*i),paddingInline:m=>(0,T.themeSpacing)((0,T.themeDensity)(m)*i),borderRadius:m=>(0,T.themeSpacing)((0,T.themeDensity)(m)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:m=>(0,T.themeSpacing)((0,T.themeDensity)(m)*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:m=>(0,T.themeColor)(m,"shift-6",n.get(m)),"&:hover:not([aria-disabled=true])":{color:m=>(0,T.themeColor)(m,"text",n.get(m)),backgroundColor:m=>(0,T.themeColor)(m,"hover",n.get(m)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:m=>(0,T.themeColor)(m,"text",n.get(m)),backgroundColor:m=>(0,T.themeColor)(m,"increase-2",n.get(m))},"&:focus-visible":{boxShadow:m=>b(m,n.get(m))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:m=>(0,T.themeColor)(m,"border-strong","neutral")}}}}let t=o==="solid",a=ha[e];return Ve(G({_onInsert:i=>{i.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:i=>(0,T.themeSize)(i,l),textDecoration:"none",paddingBlock:i=>(0,T.themeSpacing)((0,T.themeDensity)(i)*a.block),paddingInline:i=>(0,T.themeSpacing)((0,T.themeDensity)(i)*a.inline),borderRadius:i=>(0,T.themeSpacing)((0,T.themeDensity)(i)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>(0,T.themeSpacing)((0,T.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":i=>`1px solid ${(0,T.themeColor)(i,"border-strong",n.get(i))}`,color:i=>t?(0,T.themeColor)(i,"shift-0","neutral"):(0,T.themeColor)(i,"shift-13",n.get(i)),backgroundColor:i=>t?(0,T.themeColor)(i,"shift-13",n.get(i)):(0,T.themeColor)(i,"inherit",n.get(i)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:i=>t?(0,T.themeColor)(i,"shift-0","neutral"):(0,T.themeColor)(i,"shift-14",n.get(i)),backgroundColor:i=>t?(0,T.themeColor)(i,"shift-14",n.get(i)):(0,T.themeColor)(i,"hover",n.get(i))},"&:active:not([aria-disabled=true])":{backgroundColor:i=>t?(0,T.themeColor)(i,"shift-15",n.get(i)):(0,T.themeColor)(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>b(i,n.get(i))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:i=>(0,T.themeColor)(i,"shift-2","neutral"),outline:i=>`1px solid ${(0,T.themeColor)(i,"border-strong","neutral")}`,color:i=>(0,T.themeColor)(i,"muted","neutral")}}})}var dn=require("@domphy/core"),F=require("@domphy/theme");function ya(r={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function ba(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,F.themeSpacing)((0,F.themeDensity)(n)*2),paddingBlock:n=>(0,F.themeSpacing)(o?1:(0,F.themeDensity)(n)*2),paddingInline:n=>(0,F.themeSpacing)((0,F.themeDensity)(n)*3),fontSize:n=>(0,F.themeSize)(n,"inherit"),color:n=>(0,F.themeColor)(n,"text")}}}function Sa(r={}){var l,t;let o=(0,dn.toState)((l=r.color)!=null?l:"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=>(0,F.themeSpacing)((0,F.themeDensity)(a)*2),paddingBlock:a=>(0,F.themeSpacing)(e?1:(0,F.themeDensity)(a)*2),paddingInline:a=>(0,F.themeSpacing)((0,F.themeDensity)(a)*3),fontSize:a=>(0,F.themeSize)(a,"inherit"),color:a=>(0,F.themeColor)(a,"text",o.get(a)),borderRadius:a=>(0,F.themeSpacing)((0,F.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,F.themeColor)(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>(0,F.themeColor)(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,F.themeColor)(a,"shift-3",n),color:a=>(0,F.themeColor)(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>b(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var pn=require("@domphy/core"),Ue=require("@domphy/theme");function xa(r={}){var n;let o=(0,pn.toState)((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=>(0,Ue.themeSize)(e,"inherit"),color:e=>(0,Ue.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Ue.themeColor)(e,"inherit",o.get(e)),height:(0,Ue.themeSpacing)(6),borderRadius:(0,Ue.themeSpacing)(1),paddingInline:(0,Ue.themeSpacing)(1.5)}}}var hn=require("@domphy/core"),j=require("@domphy/theme");function Ca(r={items:[]}){var a;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:l="primary"}=r,t=(0,hn.toState)((a=r.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,c)=>{if(o.length===0)return;let d=s.nodeId,i=o.map((m,y)=>{var u;let g=(u=m.key)!=null?u:y;return Ve(G({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:g,type:"button",id:`menuitem${d}${g}`,role:"menuitem"},n?{ariaCurrent:p=>t.get(p)===g||void 0}:{}),{onClick:()=>{var p;n&&t.set(g),(p=m.onClick)==null||p.call(m)},onKeyDown:p=>{var O;let h=p.key;if(h==="Enter"||h===" "){p.preventDefault(),p.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;p.preventDefault();let C=o.map((R,w)=>{var $;return($=R.key)!=null?$:w}),v=C.indexOf(g),x=v;h==="ArrowDown"?x=(v+1)%C.length:h==="ArrowUp"?x=(v-1+C.length)%C.length:h==="Home"?x=0:h==="End"&&(x=C.length-1),(O=document.getElementById(`menuitem${d}${C[x]}`))==null||O.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,j.themeSpacing)(2),width:"100%",fontSize:p=>(0,j.themeSize)(p,"inherit"),height:p=>(0,j.themeSpacing)(6+(0,j.themeDensity)(p)*2),paddingInline:p=>(0,j.themeSpacing)((0,j.themeDensity)(p)*3),border:"none",outline:"none",color:p=>(0,j.themeColor)(p,"shift-17",e),backgroundColor:p=>(0,j.themeColor)(p,"inherit",e),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:p=>(0,j.themeColor)(p,"hover",e)},"&[aria-current=true]":{backgroundColor:p=>(0,j.themeColor)(p,"shift-3",l),color:p=>(0,j.themeColor)(p,"shift-13",l)},"&:focus-visible":{boxShadow:p=>b(p,l)}}})});c[s.tagName]=i},style:{display:"flex",flexDirection:"column",paddingBlock:s=>(0,j.themeSpacing)((0,j.themeDensity)(s)*2),paddingInline:s=>(0,j.themeSpacing)((0,j.themeDensity)(s)*2),fontSize:s=>(0,j.themeSize)(s,"inherit"),backgroundColor:s=>(0,j.themeColor)(s,"inherit",e),color:s=>(0,j.themeColor)(s,"text",e),borderRadius:s=>(0,j.themeSpacing)((0,j.themeDensity)(s)*2),outline:s=>`1px solid ${(0,j.themeColor)(s,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:_("medium")}}}var bo=r=>!!r&&typeof r.get=="function"&&r._isState===!0,He=r=>{let o={},n=[];for(let e in r){let l=r[e];e==="x"?n.push(`translateX(${typeof l=="number"?`${l}px`:l})`):e==="y"?n.push(`translateY(${typeof l=="number"?`${l}px`:l})`):e==="scale"?n.push(`scale(${l})`):e==="rotate"?n.push(`rotate(${typeof l=="number"?`${l}deg`:l})`):o[e]=l}return n.length&&(o.transform=n.join(" ")),o};function gn(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function va(r={}){var a,s,c,d;let{initial:o,animate:n,exit:e,transition:l={}}=r,t={duration:(a=l.duration)!=null?a:300,delay:(s=l.delay)!=null?s:0,easing:(c=l.easing)!=null?c:"ease",iterations:(d=l.iterations)!=null?d:1,fill:"both"};return{_onMount:i=>{let m=i.domElement;if(!m||typeof m.animate!="function")return;let y=bo(n)?n.get():n;if(gn()){if(y?Object.assign(m.style,He(y)):o&&Object.assign(m.style,He(o)),bo(n)){let g=n.addListener(u=>{Object.assign(m.style,He(u))});i.setMetadata("motionRelease",g)}return}if(y?m.animate(o?[He(o),He(y)]:[He(y)],t):o&&Object.assign(m.style,He(o)),bo(n)){let g=n.addListener(u=>{m.animate([He(u)],t)});i.setMetadata("motionRelease",g)}},_onBeforeRemove:(i,m)=>{let y=i.domElement;if(!y||!e||typeof y.animate!="function")return m();if(gn())return Object.assign(y.style,He(e)),m();y.animate([He(e)],t).finished.then(m,m)},_onRemove:i=>{let m=i.getMetadata("motionRelease");m==null||m()}}}var fn=require("@domphy/core"),it=require("@domphy/theme");function ka(r={}){var n;let o=(0,fn.toState)((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=>(0,it.themeSize)(e,"inherit"),backgroundColor:e=>(0,it.themeColor)(e),color:e=>(0,it.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,it.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var yn=require("@domphy/core"),X=require("@domphy/theme");function Ea(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),l=Math.min(o-1,r+1);for(let t=e;t<=l;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function wa(r){var s;let{total:o,color:n="neutral",accentColor:e="primary"}=r,l=(0,yn.toState)((s=r.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:c=>(0,X.themeSpacing)(6+(0,X.themeDensity)(c)*2),height:c=>(0,X.themeSpacing)(6+(0,X.themeDensity)(c)*2),paddingInline:c=>(0,X.themeSpacing)((0,X.themeDensity)(c)*2),borderRadius:c=>(0,X.themeSpacing)((0,X.themeDensity)(c)*1.5),border:"none",cursor:"pointer",fontSize:c=>(0,X.themeSize)(c,"inherit"),backgroundColor:"transparent",color:c=>(0,X.themeColor)(c,"shift-13",n),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:c=>(0,X.themeColor)(c,"shift-13",n),backgroundColor:c=>(0,X.themeColor)(c,"hover",n)},"&:focus-visible":{boxShadow:c=>b(c,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Ve(G({},t),{backgroundColor:c=>(0,X.themeColor)(c,"shift-13",e),color:c=>(0,X.themeColor)(c,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:c=>(0,X.themeColor)(c,"shift-13",e)}});return{role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:c=>{c.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:c=>{let d={div:i=>{let m=l.get(i),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&l.set(m-1),style:t});let g=0;for(let u of Ea(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${g++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:p=>(0,X.themeSpacing)((0,X.themeDensity)(p)*2),color:p=>(0,X.themeColor)(p,"shift-7",n)}});else{let p=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:p?"page":void 0,disabled:p,onClick:()=>l.set(u),style:p?a:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&l.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:(0,X.themeSpacing)(1)}};c.children.insert(d)},style:{display:"inline-flex"}}}var bn=require("@domphy/core"),St=require("@domphy/theme");function Ta(r={}){var l;let{padding:o=4,divider:n=!1}=r,e=(0,bn.toState)((l=r.color)!=null?l:"neutral","color");return{style:G({padding:t=>(0,St.themeSpacing)((0,St.themeDensity)(t)*o)},n?{borderBottom:t=>`1px solid ${(0,St.themeColor)(t,"border",e.get(t))}`}:{})}}var Sn=require("@domphy/core"),_t=require("@domphy/theme");function Da(r={}){var n;let o=(0,Sn.toState)((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=>(0,_t.themeSize)(e,"inherit"),color:e=>(0,_t.themeColor)(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var wt=require("@domphy/core"),lt=require("@domphy/theme");function Pa(r){var y;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,l=null,t=(0,wt.toState)(o),a=(0,wt.toState)(n),{show:s,hide:c,anchorPartial:d}=_e({kind:"popover",open:t,placement:a,content:r.content,keepOpenOnContentHover:e==="hover"}),i={role:"dialog",dataTone:"shift-14",style:{backgroundColor:g=>(0,lt.themeColor)(g,"inherit"),borderRadius:g=>(0,lt.themeSpacing)((0,lt.themeDensity)(g)*2),outline:g=>`1px solid ${(0,lt.themeColor)(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")},_onInsert:g=>{let u=g.attributes.get("id");l=u||g.nodeId,!u&&g.attributes.set("id",l)}};return(y=r.content).$||(y.$=[]),r.content.$.push(i),(0,wt.merge)(d,{ariaHaspopup:"dialog",ariaExpanded:g=>t.get(g),onMouseEnter:(g,u)=>e==="hover"&&s(u),onMouseLeave:(g,u)=>e==="hover"&&c(u),onClick:(g,u)=>{e==="click"&&(t.get()?c(u):s(u))},onKeyDown:(g,u)=>{g.key==="Escape"&&t.get()&&c(u)},onFocus:(g,u)=>e==="hover"&&s(u),onBlur:(g,u)=>{let p=g.relatedTarget,h=u.getRoot().domElement,C=l?h.querySelector(`#${CSS.escape(l)}`):null;p&&(C!=null&&C.contains(p))||c(u)},_onMount:g=>l&&g.attributes.set("ariaControls",l)}),d}var xn=require("@domphy/core"),Oe=require("@domphy/theme");function So(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,Oe.themeSpacing)(6),bordered:l=!0}=r,t=(0,xn.toState)(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"},s=i=>{var m;return(m=a[t.get(i)])!=null?m:a["bottom-end"]},c=i=>i.includes("start")?e:i.includes("end")?"auto":"50%",d=i=>i.includes("end")?e:i.includes("start")?"auto":"50%";return{style:{fontSize:i=>(0,Oe.themeSize)(i),backgroundColor:i=>(0,Oe.themeColor)(i),color:i=>(0,Oe.themeColor)(i,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,Oe.themeSpacing)(1.5),height:(0,Oe.themeSpacing)(1.5),backgroundColor:i=>(0,Oe.themeColor)(i,"inherit",n),borderWidth:l?"1px":0,borderColor:i=>(0,Oe.themeColor)(i,"inherit",n),borderTopStyle:i=>{let m=s(i);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:i=>{let m=s(i);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:i=>{let m=s(i);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:i=>{let m=s(i);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:i=>{let m=s(i);return m.includes("top")?0:m.includes("bottom")?"auto":c(m)},right:i=>{let m=s(i);return m.includes("right")?0:m.includes("left")?"auto":d(m)},bottom:i=>{let m=s(i);return m.includes("bottom")?0:m.includes("top")?"auto":d(m)},left:i=>{let m=s(i);return m.includes("left")?0:m.includes("right")?"auto":c(m)},transform:i=>{let m=s(i),y=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",g=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${y},${g}) rotate(45deg)`}}}}}var Cn=require("@domphy/core"),Se=require("@domphy/theme");function Oa(r={}){var n;let o=(0,Cn.toState)((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=>(0,Se.themeSize)(e,"inherit"),color:e=>(0,Se.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Se.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,Se.themeSpacing)((0,Se.themeDensity)(e)*2),paddingInline:e=>(0,Se.themeSpacing)((0,Se.themeDensity)(e)*3),borderRadius:e=>(0,Se.themeSpacing)((0,Se.themeDensity)(e)*2)}}}var xo=require("@domphy/core"),Ae=require("@domphy/theme");function La(r={}){var e,l;let o=(0,xo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,xo.toState)((l=r.accentColor)!=null?l:"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:(0,Ae.themeSpacing)(2),border:0,borderRadius:(0,Ae.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,Ae.themeColor)(t,"inherit",o.get(t)),color:t=>(0,Ae.themeColor)(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,Ae.themeColor)(t,"inherit",o.get(t)),borderRadius:(0,Ae.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,Ae.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,Ae.themeSpacing)(999),transition:"width 220ms ease"}}}}var Tt=require("@domphy/core"),st=require("@domphy/theme");var Ia='<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>',za='<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 Va(r={}){var c,d;let{max:o=5,readOnly:n=!1,onChange:e}=r,l=(c=r.color)!=null?c:"warning",t=(0,Tt.toState)((d=r.value)!=null?d:0),a=(0,Tt.toState)(0),s=i=>{let m=a.get(i);return m>0?m:t.get(i)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,st.themeSpacing)(.5),fontSize:i=>(0,st.themeSize)(i,"increase-1"),cursor:n?"default":"pointer",color:i=>(0,st.themeColor)(i,"muted",l)},_onInit:i=>{for(let m=1;m<=o;m++){let y=m,g=n?{}:{onClick:()=>{let p=y===t.get()?0:y;t.set(p),e==null||e(p),a.set(0)},onMouseEnter:()=>a.set(y),onMouseLeave:()=>a.set(0),onKeyDown:p=>{var x,O;let h=t.get(),C=h;if(p.key==="ArrowRight"||p.key==="ArrowUp")C=Math.min(o,h+1),p.preventDefault();else if(p.key==="ArrowLeft"||p.key==="ArrowDown")C=Math.max(0,h-1),p.preventDefault();else return;t.set(C),e==null||e(C);let v=C>0?C-1:0;(O=(x=i.domElement)==null?void 0:x.children[v])==null||O.focus()}},u=Ve(G({button:p=>(0,Tt.rawHtml)(y<=s(p)?Ia:za),_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},g),{style:{background:"none",border:"none",outline:"none",borderRadius:(0,st.themeSpacing)(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>b(p,l)}}});i.children.insert(u)}}}}var Mt=require("@domphy/core"),ct=require("@domphy/theme");function Ra(r={}){var c,d,i;let{size:o=16,thickness:n=.25}=r,e=(0,Mt.toState)((c=r.value)!=null?c:0,"value"),l=(0,Mt.toState)((d=r.color)!=null?d:"primary","color"),t=(0,Mt.toState)((i=r.trackColor)!=null?i:"neutral","trackColor"),a=Math.round((1-n)*100),s=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:m=>String(Math.round(e.get(m))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:m=>{m.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,ct.themeSpacing)(o),height:(0,ct.themeSpacing)(o),borderRadius:"50%",color:m=>(0,ct.themeColor)(m,"shift-9",l.get(m)),background:m=>`conic-gradient(from -90deg, ${(0,ct.themeColor)(m,"shift-9",l.get(m))} ${e.get(m)}%, ${(0,ct.themeColor)(m,"shift-3",t.get(m))} 0%)`,WebkitMask:s,mask:s}}}var Bt=require("@domphy/theme");function Co(r={}){let{gap:o=4,align:n="center",justify:e,wrap:l=!1}=r;return{style:G(G({display:"flex",alignItems:n,gap:t=>(0,Bt.themeSpacing)((0,Bt.themeDensity)(t)*o)},e?{justifyContent:e}:{}),l?{flexWrap:"wrap"}:{})}}var vn=require("@domphy/core"),Fe=require("@domphy/theme");function $a(r={}){var n;let o=(0,vn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>(0,Fe.themeColor)(e,"text",o.get(e)),"&::-webkit-scrollbar":{width:(0,Fe.themeSpacing)(2),height:(0,Fe.themeSpacing)(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>(0,Fe.themeColor)(e,"shift-5",o.get(e)),borderRadius:(0,Fe.themeSpacing)(999),border:`${(0,Fe.themeSpacing)(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>(0,Fe.themeColor)(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,Fe.themeColor)(e,"shift-5",o.get(e))} transparent`}}}var kn=require("@domphy/core"),se=require("@domphy/theme");function _a(r={items:[]}){var t,a,s;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,l=(0,kn.toState)((s=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:l}},_onSchedule:(c,d)=>{let i=o.map((m,y)=>{var p;let g=(p=m.key)!=null?p:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,type:"button",role:"radio",ariaChecked:h=>l.get(h)===g,onClick:()=>l.set(g),style:{cursor:"pointer",fontSize:h=>(0,se.themeSize)(h,"inherit"),height:(0,se.themeSpacing)(6),paddingBlock:(0,se.themeSpacing)(1),paddingInline:(0,se.themeSpacing)(3),border:"none",borderRadius:(0,se.themeSpacing)(10),color:h=>(0,se.themeColor)(h,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>(0,se.themeColor)(h,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>(0,se.themeColor)(h,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:h=>(0,se.themeColor)(h,"shift-0",e),color:h=>(0,se.themeColor)(h,"shift-10",e),boxShadow:_("low")},"&:focus-visible":{boxShadow:h=>b(h,e)},"&[aria-checked=true]:focus-visible":{boxShadow:h=>`${_("low")}, ${b(h,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[c.tagName]=i},dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,se.themeSpacing)(1),paddingInline:(0,se.themeSpacing)(1),gap:(0,se.themeSpacing)(.5),borderRadius:(0,se.themeSpacing)(10),backgroundColor:c=>(0,se.themeColor)(c,"inherit",n),color:c=>(0,se.themeColor)(c,"text",n)}}}var z=require("@domphy/theme");function Ma(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=>(0,z.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,z.themeColor)(e,"text",o),backgroundColor:e=>(0,z.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,z.themeColor)(e,"border-strong",o)}`,borderRadius:e=>(0,z.themeSpacing)((0,z.themeDensity)(e)*1.5),paddingBlock:e=>(0,z.themeSpacing)((0,z.themeDensity)(e)*1),paddingLeft:e=>(0,z.themeSpacing)((0,z.themeDensity)(e)*3),paddingRight:e=>(0,z.themeSpacing)((0,z.themeDensity)(e)*5),backgroundImage:e=>{let l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,z.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(l)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,z.themeSpacing)(2)} center`,backgroundSize:`${(0,z.themeSpacing)(2.5)} ${(0,z.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,z.themeSpacing)(6+(0,z.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,z.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>b(e,n)},"& optgroup":{color:e=>(0,z.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,z.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,z.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,z.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,z.themeColor)(e,"shift-2","neutral")}}}}var mt=require("@domphy/core"),ie=require("@domphy/theme");function Ba(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:l=!1,multiple:t=!1}=r,a=(0,mt.toState)(r.value),s=(0,mt.toState)(l),{show:c,hide:d,anchorPartial:i}=_e({kind:"selectBox",open:s,placement:(0,mt.toState)(n),content:r.content}),m={onClick:(u,p)=>!t&&d(p),dataTone:"shift-14",style:{backgroundColor:u=>(0,ie.themeColor)(u,"inherit"),borderRadius:u=>(0,ie.themeSpacing)((0,ie.themeDensity)(u)*2),outline:u=>`1px solid ${(0,ie.themeColor)(u,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,mt.merge)(r.content,m);let y={div:u=>{let p=a.get(u),h=Array.isArray(p)?p:[p];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[xt({color:e,removable:t})],_key:v.value,_onRemove:x=>{let O=a.get(),w=(Array.isArray(O)?O:[O]).filter($=>$!==v.value);t?a.set(w):a.set(w[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:(0,ie.themeSpacing)(1),flex:1}},g={_onInsert:u=>{u.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:u=>u.children.insert(y),onClick:(u,p)=>s.get()?d(p):c(p),tabindex:0,style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>(0,ie.themeSpacing)(6+(0,ie.themeDensity)(u)*2),minWidth:(0,ie.themeSpacing)(32),outlineOffset:"-1px",outline:u=>`1px solid ${(0,ie.themeColor)(u,"border-strong","neutral")}`,paddingInline:u=>(0,ie.themeSpacing)((0,ie.themeDensity)(u)*2),borderRadius:u=>(0,ie.themeSpacing)((0,ie.themeDensity)(u)*1.5),fontSize:u=>(0,ie.themeSize)(u,"inherit"),color:u=>(0,ie.themeColor)(u,"text",e),backgroundColor:u=>(0,ie.themeColor)(u,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:u=>b(u,e)}}};return(0,mt.merge)(i,g),i}var ye=require("@domphy/theme");function Na(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let s=a.value;t.attributes.set("ariaSelected",c=>{let d=s.get(c);return a.multiple?d.includes(e):d===e}),t.addEvent("click",()=>{let c=s.get();a.multiple?c.includes(e)?s.set(c.filter(d=>d!==e)):s.set(c.concat([e])):c!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,ye.themeSize)(t,"inherit"),height:t=>(0,ye.themeSpacing)(6+(0,ye.themeDensity)(t)*2),paddingInline:t=>(0,ye.themeSpacing)((0,ye.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,ye.themeColor)(t,"text",n),backgroundColor:t=>(0,ye.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,ye.themeColor)(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,ye.themeColor)(t,"shift-6",o),color:t=>(0,ye.themeColor)(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,o)}}}}var En=require("@domphy/core"),Le=require("@domphy/theme");function Ha(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,En.toState)((a=r.value)!=null?a:n?[]:null),l={div:s=>{let c=e.get(s);return(Array.isArray(c)?c:[c]).map(i=>({input:null,name:r.name,value:i==null?"":String(i)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:n}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(l)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>(0,Le.themeSpacing)((0,Le.themeDensity)(s)*2),paddingInline:s=>(0,Le.themeSpacing)((0,Le.themeDensity)(s)*2),fontSize:s=>(0,Le.themeSize)(s,"inherit"),backgroundColor:s=>(0,Le.themeColor)(s,"inherit",o),color:s=>(0,Le.themeColor)(s,"text",o)}}}var Nt=require("@domphy/core"),Ie=require("@domphy/theme");function Aa(r={}){var l;let o=(0,Nt.toState)((l=r.color)!=null?l:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,Nt.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>(0,Ie.themeSize)(t),color:t=>(0,Ie.themeColor)(t,"text",o.get(t)),height:(0,Ie.themeSpacing)(6),display:"block",borderRadius:(0,Ie.themeSpacing)(1),backgroundColor:t=>(0,Ie.themeColor)(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,Ie.themeColor)(t,"inherit",o.get(t))} 0%, ${(0,Ie.themeColor)(t,"shift-4",o.get(t))} 50%, ${(0,Ie.themeColor)(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var wn=require("@domphy/core"),Ht=require("@domphy/theme");function Fa(r={}){var n;let o=(0,wn.toState)((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=>(0,Ht.themeSize)(e,"inherit"),color:e=>(0,Ht.themeColor)(e,"shift-10",o.get(e))}}}var At=require("@domphy/core"),ze=require("@domphy/theme"),Dn={to:{transform:"rotate(360deg)"}},Tn=(0,At.hashString)(JSON.stringify(Dn));function Wa(r={}){var n;let o=(0,At.toState)((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=>(0,ze.themeSize)(e),backgroundColor:e=>(0,ze.themeColor)(e),color:e=>(0,ze.themeColor)(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,ze.themeSpacing)(6),height:(0,ze.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,ze.themeSpacing)(.5)} solid ${(0,ze.themeColor)(e,"border-strong",o.get(e))}`,borderTopColor:e=>(0,ze.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${Tn} 0.7s linear infinite`,[`@keyframes ${Tn}`]:Dn}}}var Ft=require("@domphy/core"),Xe=require("@domphy/theme");function ja(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:l=90}=r;return{_onSchedule:(t,a)=>{(0,Ft.merge)(a,{_context:{splitter:{direction:o,size:(0,Ft.toState)(n),min:e,max:l,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Ka(){return{_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",l=o.panelCount++===0,t=s=>{n.style[e]=`${l?s:100-s}%`};t(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=o.size.addListener(t);r.addHook("Remove",a)}}}function Ya(){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 l=o.size.addListener(c=>{n.setAttribute("aria-valuenow",String(Math.round(c)))}),t=c=>{let d=c.shiftKey?10:1,i=null;e?c.key==="ArrowRight"?i=Math.min(o.size.get()+d,o.max):c.key==="ArrowLeft"&&(i=Math.max(o.size.get()-d,o.min)):c.key==="ArrowDown"?i=Math.min(o.size.get()+d,o.max):c.key==="ArrowUp"&&(i=Math.max(o.size.get()-d,o.min)),c.key==="Home"?i=o.min:c.key==="End"&&(i=o.max),i!==null&&(c.preventDefault(),o.size.set(i))},a=null,s=c=>{c.preventDefault();let d=n.parentElement,i=y=>{let g=d.getBoundingClientRect(),u=e?(y.clientX-g.left)/g.width*100:(y.clientY-g.top)/g.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",i),document.addEventListener("mouseup",m)};n.addEventListener("keydown",t),n.addEventListener("mousedown",s),r.addHook("Remove",()=>{a==null||a(),l(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",s)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,Xe.themeColor)(r,"inherit"),color:r=>(0,Xe.themeColor)(r,"text"),"&:hover":{backgroundColor:r=>(0,Xe.themeColor)(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>b(r,"primary")},"&::after":{content:'""',width:(0,Xe.themeSpacing)(1),height:(0,Xe.themeSpacing)(1),borderRadius:(0,Xe.themeSpacing)(999),backgroundColor:r=>(0,Xe.themeColor)(r,"shift-4")}}}}var Wt=require("@domphy/theme");function Ga(r={}){let{gap:o=3,align:n}=r;return{style:G({display:"flex",flexDirection:"column",gap:e=>(0,Wt.themeSpacing)((0,Wt.themeDensity)(e)*o)},n?{alignItems:n}:{})}}var Pn=require("@domphy/core"),V=require("@domphy/theme");function qa(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:l="primary"}=r,t=(0,Pn.toState)((a=r.current)!=null?a:0);return{_doctorDisable:"inline-typography",_context:{steps:{current:t,direction:n,color:e,accentColor:l}},_onSchedule:(s,c)=>{let d=o.map((i,m)=>{var g;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(g=i.key)!=null?g:m,dataStep:String(m+1),dataStatus:u=>{let p=t.get(u);return m<p?"done":m===p?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:(0,V.themeSpacing)(1),flex:"1",fontSize:u=>(0,V.themeSize)(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,V.themeSpacing)(6),height:(0,V.themeSpacing)(6),borderRadius:(0,V.themeSpacing)(999),fontSize:u=>(0,V.themeSize)(u,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:u=>`2px solid ${(0,V.themeColor)(u,"border-strong",e)}`,backgroundColor:u=>(0,V.themeColor)(u,"inherit"),color:u=>(0,V.themeColor)(u,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,V.themeSpacing)(3),right:`calc(50% + ${(0,V.themeSpacing)(3)})`,left:`calc(-50% + ${(0,V.themeSpacing)(3)})`,height:"2px",backgroundColor:u=>(0,V.themeColor)(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>(0,V.themeColor)(u,"shift-9",l),borderColor:u=>(0,V.themeColor)(u,"shift-9",l),color:u=>(0,V.themeColor)(u,"shift-0",l),boxShadow:u=>`0 0 0 3px ${(0,V.themeColor)(u,"shift-3",l)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>(0,V.themeColor)(u,"shift-9",l),borderColor:u=>(0,V.themeColor)(u,"shift-9",l),color:u=>(0,V.themeColor)(u,"shift-0",l)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>(0,V.themeColor)(u,"shift-9",l)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>(0,V.themeColor)(u,"shift-9",l)},"&[data-status=pending]":{color:u=>(0,V.themeColor)(u,"muted")},"&[data-status=active]":{color:u=>(0,V.themeColor)(u,"shift-11",l),fontWeight:"bold"},"&[data-status=done]":{color:u=>(0,V.themeColor)(u,"text",e)}}}});c[s.tagName]=d},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:(0,V.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}}}var On=require("@domphy/core"),Dt=require("@domphy/theme");function Ua(r={}){var n;let o=(0,On.toState)((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=>(0,Dt.themeSize)(e,"inherit"),fontWeight:"bold",color:e=>(0,Dt.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,Dt.themeColor)(e)}}}var Ln=require("@domphy/core"),jt=require("@domphy/theme");function Xa(r={}){var n;let o=(0,Ln.toState)((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=>(0,jt.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,jt.themeColor)(e,"text",o.get(e))}}}var In=require("@domphy/core"),Kt=require("@domphy/theme");function Za(r={}){var n;let o=(0,In.toState)((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=>(0,Kt.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,Kt.themeColor)(e,"text",o.get(e))}}}var zn=require("@domphy/core"),M=require("@domphy/theme");function Ja(r={}){var n;let o=(0,zn.toState)((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=>(0,M.themeSize)(e,"inherit"),color:e=>(0,M.themeColor)(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*3),paddingBlock:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*1),color:e=>(0,M.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,M.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*3),paddingBlock:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*1),color:e=>(0,M.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,M.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,M.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*3),paddingBlock:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*1),color:e=>(0,M.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,M.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,M.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,M.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,M.themeColor)(e,"hover")}}}}var Vn=require("@domphy/core"),K=require("@domphy/theme");function Qa(r={items:[]}){var t,a,s;let{items:o=[],accentColor:n="primary",color:e="neutral"}=r,l=(0,Vn.toState)((s=(a=r.activeKey)!=null?a:(t=o[0])==null?void 0:t.key)!=null?s:0);return{_onSchedule:(c,d)=>{let i=c.nodeId,y={div:o.map((u,p)=>{var v;let h=(v=u.key)!=null?v:p;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,type:"button",role:"tab",id:`tab${i}${h}`,ariaControls:`panel${i}${h}`,ariaSelected:x=>l.get(x)===h,onClick:()=>l.set(h),onKeyDown:x=>{let O=x.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;x.preventDefault();let R=o.map((Te,nt)=>{var Ze;return(Ze=Te.key)!=null?Ze:nt}),w=R.indexOf(h),$=w;O==="ArrowRight"?$=(w+1)%R.length:O==="ArrowLeft"?$=(w-1+R.length)%R.length:O==="Home"?$=0:O==="End"&&($=R.length-1),l.set(R[$])},style:{cursor:"pointer",fontSize:x=>(0,K.themeSize)(x,"inherit"),height:x=>(0,K.themeSpacing)(6+(0,K.themeDensity)(x)*2),paddingInline:x=>(0,K.themeSpacing)((0,K.themeDensity)(x)*4),border:"none",outline:"none",color:x=>(0,K.themeColor)(x,"shift-13"),backgroundColor:x=>(0,K.themeColor)(x,"inherit"),boxShadow:x=>`inset 0 -${(0,K.themeSpacing)(.5)} 0 0 ${(0,K.themeColor)(x,"shift-1",e)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:x=>(0,K.themeColor)(x,"shift-13"),boxShadow:x=>`inset 0 -${(0,K.themeSpacing)(.5)} 0 0 ${(0,K.themeColor)(x,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{color:x=>(0,K.themeColor)(x,"shift-13",n),boxShadow:x=>`inset 0 -${(0,K.themeSpacing)(.5)} 0 0 ${(0,K.themeColor)(x,"shift-8",n)}`},"&:focus-visible":{boxShadow:x=>b(x,n)},"&[aria-selected=true]:focus-visible":{boxShadow:x=>`${b(x,n)}, inset 0 -${(0,K.themeSpacing)(.5)} 0 0 ${(0,K.themeColor)(x,"shift-6",n)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},g=o.map((u,p)=>{var C;let h=(C=u.key)!=null?C:p;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${i}${h}`,ariaLabelledby:`tab${i}${h}`,hidden:v=>l.get(v)!==h,style:{paddingBlock:v=>(0,K.themeSpacing)((0,K.themeDensity)(v)*2),paddingInline:v=>(0,K.themeSpacing)((0,K.themeDensity)(v)*2)}}});d[c.tagName]=[y,...g]}}}var vo=require("@domphy/core"),te=require("@domphy/theme");function ei(r={}){var l,t;let o=(0,vo.toState)((l=r.color)!=null?l:"neutral","color"),n=(0,vo.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let s=a.domElement;s.style.overflow="hidden";let c=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",c),c(),a.addHook("Remove",()=>s.removeEventListener("input",c))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*2),paddingBlock:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*1.5),fontSize:a=>(0,te.themeSize)(a,"inherit"),color:a=>(0,te.themeColor)(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,te.themeColor)(a,"border-strong",o.get(a))}`,backgroundColor:a=>(0,te.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,te.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,te.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>b(a,n.get(a))},"&:invalid":{outline:a=>`${(0,te.themeSpacing)(.5)} solid ${(0,te.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,te.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,te.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,te.themeColor)(a,"shift-2","neutral")}}}}var Rn=require("@domphy/core"),we=require("@domphy/theme");function ti(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function oi(r={}){var t,a,s;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",l=(0,Rn.toState)((s=r.active)!=null?s:!1);return{style:G({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:c=>(0,we.themeSpacing)((0,we.themeDensity)(c)*2),paddingBottom:c=>o?"0":(0,we.themeSpacing)((0,we.themeDensity)(c)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,we.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:c=>(0,we.themeColor)(c,"shift-8",l.get(c)?e:n),opacity:c=>l.get(c)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:c=>`-${(0,we.themeSpacing)((0,we.themeDensity)(c)*4)}`,width:"2px",backgroundColor:c=>(0,we.themeColor)(c,"shift-3",n)}})}}var $n=require("@domphy/core"),he=require("@domphy/theme");function ni(r={}){let{position:o="top-center",color:n="neutral"}=r,e=(0,$n.toState)(!1),l=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:l?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:(0,he.themeSpacing)(4),zIndex:30,padding:(0,he.themeSpacing)(6),pointerEvents:"none"}};return{_portal:c=>{let d=c.domElement.querySelector(`#domphy-toast-${o}`);return d||(d=c.children.insert(s).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,he.themeSpacing)(32),pointerEvents:"auto",paddingBlock:c=>(0,he.themeSpacing)((0,he.themeDensity)(c)*2),paddingInline:c=>(0,he.themeSpacing)((0,he.themeDensity)(c)*4),borderRadius:c=>(0,he.themeSpacing)((0,he.themeDensity)(c)*2),fontSize:c=>(0,he.themeSize)(c,"inherit"),color:c=>(0,he.themeColor)(c,"text",n),backgroundColor:c=>(0,he.themeColor)(c,"inherit",n),boxShadow:_("medium"),opacity:c=>Number(e.get(c)),transform:c=>e.get(c)?"translateY(0)":l?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(c,d)=>{let i=!1,m=null,y=()=>{i||(i=!0,m&&(clearTimeout(m),m=null),c.domElement.removeEventListener("transitionend",g),d())},g=u=>{u.propertyName==="transform"&&y()};c.domElement.addEventListener("transitionend",g),m=setTimeout(y,350),c.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=c.domElement)==null||u.removeEventListener("transitionend",g)}),e.set(!1)}}}var _n=require("@domphy/core"),Z=require("@domphy/theme");function ri(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:l="primary"}=r,t=(0,_n.toState)((a=r.value)!=null?a:n?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:n}},_onSchedule:(s,c)=>{let d=o.map((i,m)=>{var u;let y=(u=i.key)!=null?u:String(m);return{button:[typeof i.label=="string"?{span:i.label}:i.label],_key:y,type:"button",role:"button",ariaPressed:p=>{let h=t.get(p);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let p=t.get();if(n){let h=Array.isArray(p)?[...p]:[];t.set(h.includes(y)?h.filter(C=>C!==y):[...h,y])}else t.set(p===y?"":y)},style:{cursor:"pointer",fontSize:p=>(0,Z.themeSize)(p,"inherit"),height:(0,Z.themeSpacing)(6),paddingBlock:(0,Z.themeSpacing)(1),paddingInline:(0,Z.themeSpacing)(2),border:"none",borderRadius:(0,Z.themeSpacing)(1.5),color:p=>(0,Z.themeColor)(p,"shift-13",e),backgroundColor:p=>(0,Z.themeColor)(p,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:p=>(0,Z.themeColor)(p,"shift-13",e),backgroundColor:p=>(0,Z.themeColor)(p,"hover",e)},"&:active:not([disabled])":{backgroundColor:p=>(0,Z.themeColor)(p,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:p=>(0,Z.themeColor)(p,"shift-3",l),color:p=>(0,Z.themeColor)(p,"shift-13",l)},"&:focus-visible":{boxShadow:p=>b(p,l)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});c[s.tagName]=d},style:{display:"flex",paddingBlock:(0,Z.themeSpacing)(1),paddingInline:(0,Z.themeSpacing)(1),gap:(0,Z.themeSpacing)(1),borderRadius:(0,Z.themeSpacing)(2),fontSize:s=>(0,Z.themeSize)(s,"inherit"),backgroundColor:s=>(0,Z.themeColor)(s,"inherit",e),color:s=>(0,Z.themeColor)(s,"text",e),outline:s=>`1px solid ${(0,Z.themeColor)(s,"border",e)}`,outlineOffset:"-1px"}}}function ai(r={}){return Co({gap:r.gap})}function ii(){return{div:null,style:{flex:"1 1 0"}}}var Pt=require("@domphy/core"),xe=require("@domphy/theme");function li(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,l=(0,Pt.toState)(n),t=(0,Pt.toState)(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:g=>t.get(g),id:a},{show:c,hide:d,anchorPartial:i}=_e({kind:"tooltip",open:o,placement:l,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>(0,xe.themeSpacing)((0,xe.themeDensity)(g)*1),paddingInline:g=>(0,xe.themeSpacing)((0,xe.themeDensity)(g)*3),borderRadius:g=>(0,xe.themeSpacing)((0,xe.themeDensity)(g)*1.5),color:g=>(0,xe.themeColor)(g,"text"),backgroundColor:g=>(0,xe.themeColor)(g),fontSize:g=>(0,xe.themeSize)(g,"inherit"),boxShadow:_("low")},$:[So({placement:l,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),(0,Pt.merge)(i,{ariaDescribedby:a,onMouseEnter:(g,u)=>c(u),onMouseLeave:(g,u)=>d(u),onFocus:(g,u)=>c(u),onBlur:(g,u)=>d(u),onKeyDown:(g,u)=>g.key==="Escape"&&d(u)}),i}var ko=require("@domphy/core");function Mn(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function si(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,l=new Map,t=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let c of Array.from(l.values()))c();l.clear();for(let c of t)clearTimeout(c);t.clear();for(let c of a)cancelAnimationFrame(c);a.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((c,d)=>{if(!(c instanceof ko.ElementNode))return;let i=c.domElement;i&&e.set(Mn(c,d),i.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((c,d)=>{var R;if(!(c instanceof ko.ElementNode))return;let i=c.domElement;if(!i)return;let m=Mn(c,d),y=e.get(m);if(!y)return;let g=i.getBoundingClientRect(),u=y.left-g.left,p=y.top-g.top;if(Math.abs(u)<.5&&Math.abs(p)<.5)return;(R=l.get(i))==null||R(),i.style.transition="none",i.style.transform=`translate(${u}px, ${p}px)`,i.getBoundingClientRect();let h=requestAnimationFrame(()=>{a.delete(h),i.style.transition=`transform ${o}ms ease ${n}ms`,i.style.transform="translate(0px, 0px)"});a.add(h);let C=!1,v=null,x=()=>{C||(C=!0,v&&(t.delete(v),v=null),l.delete(i),i.removeEventListener("transitionend",O),i.style.transition="",i.style.transform="")},O=w=>{w.propertyName==="transform"&&x()};l.set(i,()=>{C=!0,v&&(clearTimeout(v),t.delete(v),v=null),l.delete(i),i.removeEventListener("transitionend",O)}),i.addEventListener("transitionend",O),v=setTimeout(x,o+n+34),t.add(v)}),e.clear()}}}var Bn=require("@domphy/core"),ut=require("@domphy/theme");function ci(r={}){var n;let o=(0,Bn.toState)((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=>(0,ut.themeSize)(e,"inherit"),backgroundColor:e=>(0,ut.themeColor)(e),color:e=>(0,ut.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,ut.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}0&&(module.exports={abbreviation,accordion,alert,avatar,badge,blockquote,breadcrumb,breadcrumbEllipsis,button,buttonGhost,buttonSwitch,card,code,combobox,command,commandItem,commandSearch,datePicker,descriptionList,details,dialog,divider,drawer,emphasis,empty,errorBoundary,fab,figure,formGroup,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputPassword,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,linkButton,list,listItem,listItemButton,mark,menu,motion,orderedList,pagination,panelSection,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,row,scrollArea,segmented,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stack,steps,strong,subscript,superscript,table,tabs,tag,textarea,timeline,timelineItem,toast,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|