@domphy/ui 0.18.10 → 0.18.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-theme-ui.global.js +1 -1
- 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 +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var vt=Object.defineProperty,Un=Object.defineProperties,Xn=Object.getOwnPropertyDescriptor,Jn=Object.getOwnPropertyDescriptors,Zn=Object.getOwnPropertyNames,To=Object.getOwnPropertySymbols;var Oo=Object.prototype.hasOwnProperty,Qn=Object.prototype.propertyIsEnumerable;var Po=(r,o,n)=>o in r?vt(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,it=(r,o)=>{for(var n in o||(o={}))Oo.call(o,n)&&Po(r,n,o[n]);if(To)for(var n of To(o))Qn.call(o,n)&&Po(r,n,o[n]);return r},Do=(r,o)=>Un(r,Jn(o));var er=(r,o)=>{for(var n in o)vt(r,n,{get:o[n],enumerable:!0})},tr=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Zn(o))!Oo.call(r,i)&&i!==n&&vt(r,i,{get:()=>o[i],enumerable:!(e=Xn(o,i))||e.enumerable});return r};var or=r=>tr(vt({},"__esModule",{value:!0}),r);var oi={};er(oi,{abbreviation:()=>nr,accordion:()=>rr,alert:()=>ar,avatar:()=>ir,badge:()=>lr,blockquote:()=>sr,breadcrumb:()=>cr,breadcrumbEllipsis:()=>mr,button:()=>ur,buttonGhost:()=>dr,buttonSwitch:()=>pr,card:()=>hr,code:()=>fr,combobox:()=>yr,command:()=>br,commandItem:()=>Cr,commandSearch:()=>Sr,datePicker:()=>Er,descriptionList:()=>wr,details:()=>Tr,dialog:()=>Pr,divider:()=>Or,drawer:()=>Dr,emphasis:()=>$r,empty:()=>Ir,errorBoundary:()=>zr,fab:()=>Lr,figure:()=>Mr,formGroup:()=>Rr,heading:()=>Nr,horizontalRule:()=>Hr,icon:()=>Ar,image:()=>Br,inputCheckbox:()=>Fr,inputColor:()=>Kr,inputDateTime:()=>Wr,inputFile:()=>jr,inputNumber:()=>Yr,inputOTP:()=>Ur,inputPassword:()=>Gr,inputRadio:()=>Xr,inputRange:()=>Jr,inputSearch:()=>Zr,inputSwitch:()=>Qr,inputText:()=>ea,keyboard:()=>ta,label:()=>oa,link:()=>na,linkButton:()=>ra,list:()=>aa,listItem:()=>ia,listItemButton:()=>la,mark:()=>sa,menu:()=>ca,menuItem:()=>ma,motion:()=>ua,orderedList:()=>da,pagination:()=>ha,paragraph:()=>fa,popover:()=>ga,popoverArrow:()=>mo,preformated:()=>ya,progress:()=>ba,rating:()=>va,ringProgress:()=>Ea,scrollArea:()=>xa,segmented:()=>ka,segmentedItem:()=>wa,select:()=>Ta,selectBox:()=>Pa,selectItem:()=>Oa,selectList:()=>Da,skeleton:()=>$a,small:()=>Ia,spinner:()=>za,splitter:()=>Va,splitterHandle:()=>Ma,splitterPanel:()=>La,stepItem:()=>Ra,steps:()=>_a,strong:()=>Na,subscript:()=>Ha,superscript:()=>Aa,tab:()=>Ba,tabPanel:()=>Ka,table:()=>Fa,tabs:()=>Wa,tag:()=>dt,textarea:()=>ja,timeline:()=>Ya,timelineItem:()=>qa,toast:()=>Ga,toggle:()=>Ua,toggleGroup:()=>Xa,toolbar:()=>Ja,toolbarSpacer:()=>Za,tooltip:()=>Qa,transitionGroup:()=>ei,unorderedList:()=>ti});module.exports=or(oi);var Wt=require("@domphy/core"),Pe=require("@domphy/theme");function nr(r={}){var e,i;let o=(0,Wt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Wt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Pe.themeSize)(t),backgroundColor:t=>(0,Pe.themeColor)(t),color:t=>(0,Pe.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Pe.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,Pe.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Pe.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,Pe.themeColor)(t,"shift-9",n.get(t))}}}}var jt=require("@domphy/core"),Me=require("@domphy/theme");function rr(r={}){var i,t;let{type:o="single"}=r,n=(0,jt.toState)((i=r.color)!=null?i:"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 l=u=>{let c=u.target.closest("summary");if(!c)return;let m=c.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(h=>{h!==m&&(h.open=!1)})};s.addEventListener("click",l),a.addHook("Remove",()=>s.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,Me.themeSpacing)((0,Me.themeDensity)(a)*1),outline:a=>`1px solid ${(0,Me.themeColor)(a,"shift-4",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,Me.themeColor)(a,"shift-4",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${(0,Me.themeSpacing)(.5)} solid ${(0,Me.themeColor)(a,"shift-6",e.get(a))}`}}}}var $o=require("@domphy/core"),he=require("@domphy/theme");function ar(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,he.themeSpacing)(3),paddingBlock:e=>(0,he.themeSpacing)((0,he.themeDensity)(e)*2),paddingInline:e=>(0,he.themeSpacing)((0,he.themeDensity)(e)*4),boxShadow:e=>`inset ${(0,he.themeSpacing)(1)} 0 0 0 ${(0,he.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,he.themeColor)(e,"inherit",o.get(e)),color:e=>(0,he.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,he.themeSize)(e,"inherit")}}}var Io=require("@domphy/core"),Ye=require("@domphy/theme");function ir(r={}){var n;let o=(0,Io.toState)((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,Ye.themeSpacing)(9),height:(0,Ye.themeSpacing)(9),fontSize:e=>(0,Ye.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,Ye.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Ye.themeColor)(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var Yt=require("@domphy/core"),Re=require("@domphy/theme");function lr(r={}){var i;let{label:o=999}=r,n=(0,Yt.toState)(o),e=(0,Yt.toState)((i=r.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:(0,Re.themeSpacing)(1),minWidth:(0,Re.themeSpacing)(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Re.themeSize)(t,"decrease-1"),borderRadius:(0,Re.themeSpacing)(999),backgroundColor:t=>(0,Re.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Re.themeColor)(t,"shift-0",e.get(t))}}}}var zo=require("@domphy/core"),Ce=require("@domphy/theme");function sr(r={}){var n;let o=(0,zo.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,Ce.themeSize)(e,"inherit"),backgroundColor:e=>(0,Ce.themeColor)(e,"inherit",o.get(e)),boxShadow:e=>`inset ${(0,Ce.themeSpacing)(1)} 0 0 0 ${(0,Ce.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(e)*2),paddingInline:e=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(e)*4),margin:0}}}var Vo=require("@domphy/core"),xe=require("@domphy/theme");function cr(r={}){var e;let{separator:o="/"}=r,n=(0,Vo.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>(0,xe.themeSize)(i,"inherit"),gap:(0,xe.themeSpacing)(1),color:i=>(0,xe.themeColor)(i,"shift-9",n.get(i)),backgroundColor:i=>(0,xe.themeColor)(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>(0,xe.themeColor)(i,"shift-8",n.get(i))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:i=>(0,xe.themeColor)(i,"shift-4",n.get(i)),paddingInlineStart:(0,xe.themeSpacing)(1)},"& > [aria-current=page]":{color:i=>(0,xe.themeColor)(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}var Lo=require("@domphy/core"),ve=require("@domphy/theme");function mr(r={}){var n;let o=(0,Lo.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,ve.themeSize)(e,"inherit"),paddingInline:(0,ve.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,ve.themeColor)(e,"shift-8",o.get(e)),borderRadius:(0,ve.themeSpacing)(1),"&:hover":{color:e=>(0,ve.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,ve.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${(0,ve.themeSpacing)(.5)} solid ${(0,ve.themeColor)(e,"shift-6",o.get(e))}`,outlineOffset:(0,ve.themeSpacing)(.5)}}}}var Mo=require("@domphy/core"),A=require("@domphy/theme");function ur(r={}){var n;let o=(0,Mo.toState)((n=r.color)!=null?n:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>(0,A.themeSize)(e,"inherit"),paddingBlock:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),paddingInline:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*3),borderRadius:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-4",o.get(e))}`,color:e=>(0,A.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,A.themeColor)(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>(0,A.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,A.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,A.themeSpacing)(.5)} ${(0,A.themeColor)(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,A.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-4","neutral")}`,color:e=>(0,A.themeColor)(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Ro=require("@domphy/core"),X=require("@domphy/theme");function dr(r={}){var n;let o=(0,Ro.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>(0,X.themeSize)(e,"inherit"),paddingBlock:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*1),paddingInline:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*1),borderRadius:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>(0,X.themeColor)(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>(0,X.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,X.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,X.themeSpacing)(.5)} ${(0,X.themeColor)(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,X.themeColor)(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Et=require("@domphy/core"),K=require("@domphy/theme");function pr(r={}){var t,a;let{checked:o=!1}=r,n=(0,Et.toState)(o),e=(0,Et.toState)((t=r.color)!=null?t:"neutral","color"),i=(0,Et.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,K.themeSize)(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${(0,K.themeColor)(s,"shift-3",e.get(s))}`,minWidth:(0,K.themeSpacing)(12),minHeight:(0,K.themeSpacing)(6),borderRadius:(0,K.themeSpacing)(999),paddingLeft:(0,K.themeSpacing)(7),paddingRight:(0,K.themeSpacing)(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>(0,K.themeColor)(s,"inherit",e.get(s)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,K.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,K.themeSpacing)(5),height:(0,K.themeSpacing)(5),borderRadius:(0,K.themeSpacing)(999),color:s=>(0,K.themeColor)(s,"shift-9"),backgroundColor:s=>(0,K.themeColor)(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>(0,K.themeColor)(s,"increase-3",i.get(s)),outline:"none",color:s=>(0,K.themeColor)(s,"decrease-2"),paddingLeft:(0,K.themeSpacing)(2),paddingRight:(0,K.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,K.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var _o=require("@domphy/core"),L=require("@domphy/theme");function hr(r={}){var n;let o=(0,_o.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),backgroundColor:e=>(0,L.themeColor)(e,"inherit",o.get(e)),color:e=>(0,L.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,L.themeColor)(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),color:e=>(0,L.themeColor)(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),color:e=>(0,L.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,L.themeSpacing)(2),paddingBlock:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,L.themeColor)(e,"shift-3",o.get(e))}`}}}}var No=require("@domphy/core"),_e=require("@domphy/theme");function fr(r={}){var n;let o=(0,No.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,_e.themeSize)(e,"inherit"),color:e=>(0,_e.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,_e.themeColor)(e,"inherit",o.get(e)),height:(0,_e.themeSpacing)(6),paddingInline:(0,_e.themeSpacing)(1.5),borderRadius:(0,_e.themeSpacing)(1)}}}var qe=require("@domphy/core"),q=require("@domphy/theme");var xt=require("@domphy/core"),Oe=require("@domphy/floating");function De(r){let{open:o=!1,placement:n}=r,e=null,i=null,t=null,a=null,s=null,l=null,u=!1,c=(0,xt.toState)(o),m=()=>{u||!l||(u=!0,s=l.children.insert(r.content))},h=()=>{m(),t&&a&&(i&&i(),i=(0,Oe.autoUpdate)(t,a,()=>{(0,Oe.computePosition)(t,a,{placement:n.get(),middleware:[(0,Oe.offset)(12),(0,Oe.flip)(),(0,Oe.shift)()],strategy:"fixed"}).then(({x:b,y:z,placement:O})=>{Object.assign(a.style,{left:`${b}px`,top:`${z}px`}),n.set(O)})}),c.set(!0))},d=()=>{i&&i(),i=null,c.set(!1)},f=()=>{e&&clearTimeout(e),e=setTimeout(h,100)},S=()=>{e&&clearTimeout(e),e=setTimeout(d,100)},g={style:{position:"fixed",pointerEvents:"auto",visibility:b=>c.get(b)?"visible":"hidden"},_onMount:b=>a=b.domElement,_portal:b=>{var O;let z=b.domElement.querySelector("#domphy-floating");if(!z){let w={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};z=b.children.insert(w).domElement}if(t&&z instanceof HTMLElement&&!z.hasAttribute("data-theme")){let w=(O=t.closest("[data-theme]"))==null?void 0:O.getAttribute("data-theme");w&&z.setAttribute("data-theme",w)}return z}};return(0,xt.merge)(r.content,g),{show:f,hide:S,anchorPartial:{onKeyDown:b=>b.key==="Escape"&&S(),_onMount:b=>{l=b.getRoot(),t=b.domElement;let z=O=>{if(!c.get()||!t||!a)return;let w=O.target;!t.contains(w)&&!a.contains(w)&&S()};b.getRoot().domElement.addEventListener("click",z),b.addHook("BeforeRemove",()=>{e&&clearTimeout(e),i&&(i(),i=null),s&&s.remove(),b.getRoot().domElement.removeEventListener("click",z)})}}}}var Ho=require("@domphy/core"),oe=require("@domphy/theme"),gr='<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 dt(r={}){var e;let{removable:o=!1}=r,n=(0,Ho.toState)((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let t={span:gr,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:(0,oe.themeSpacing)(1),width:(0,oe.themeSpacing)(4),height:(0,oe.themeSpacing)(4),flexShrink:0,"&:hover":{backgroundColor:a=>(0,oe.themeColor)(a,"shift-4",n.get(a))}}};o&&i.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:(0,oe.themeSpacing)(6),paddingBlock:"0px",borderRadius:(0,oe.themeSpacing)(1),paddingInlineStart:(0,oe.themeSpacing)(2),paddingInlineEnd:o?(0,oe.themeSpacing)(1):(0,oe.themeSpacing)(2),gap:(0,oe.themeSpacing)(2),fontSize:i=>(0,oe.themeSize)(i,"inherit"),backgroundColor:i=>(0,oe.themeColor)(i,"inherit",n.get(i)),color:i=>(0,oe.themeColor)(i,"shift-9",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,oe.themeColor)(i,"shift-4",n.get(i))}`}}}function yr(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=r,a=(0,qe.toState)(r.value),s=(0,qe.toState)(i),{show:l,hide:u,anchorPartial:c}=De({open:s,placement:(0,qe.toState)(n),content:r.content}),m={onClick:()=>!t&&u()};(0,qe.merge)(r.content,m);let h={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,q.themeSpacing)(6),marginInlineStart:(0,q.themeSpacing)(2),fontSize:g=>(0,q.themeSize)(g,"inherit"),color:g=>(0,q.themeColor)(g,"shift-9",e),backgroundColor:g=>(0,q.themeColor)(g,"inherit",e)},d;r.input?((0,qe.merge)(r.input,{onFocus:()=>l(),style:h,_key:"combobox-input"}),d=r.input):d={input:null,onFocus:()=>l(),value:g=>(a.get(g),""),style:h,_key:"combobox-input"};let f={div:g=>{let E=a.get(g),b=Array.isArray(E)?E:[E],O=o.filter(w=>b.includes(w.value)).map(w=>({span:w.label,$:[dt({color:e,removable:!0})],_key:w.value,_onRemove:We=>{let Xe=a.get(),St=(Array.isArray(Xe)?Xe:[Xe]).filter(ut=>ut!==w.value);t?a.set(St):a.set(St[0])}}));return O.push(d),O},style:{display:"flex",flexWrap:"wrap",gap:(0,q.themeSpacing)(1)}},S={_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:g=>g.children.insert(f),style:{minWidth:(0,q.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,q.themeColor)(g,"shift-4","neutral")}`,paddingBlock:g=>(0,q.themeSpacing)((0,q.themeDensity)(g)*1),paddingInline:g=>(0,q.themeSpacing)((0,q.themeDensity)(g)*1),borderRadius:g=>(0,q.themeSpacing)((0,q.themeDensity)(g)*1),fontSize:g=>(0,q.themeSize)(g,"inherit"),color:g=>(0,q.themeColor)(g,"shift-9",e),backgroundColor:g=>(0,q.themeColor)(g,"inherit",e)}};return(0,qe.merge)(c,S),c}var kt=require("@domphy/core"),R=require("@domphy/theme");function br(){return{_onSchedule:(r,o)=>{(0,kt.merge)(o,{_context:{command:{query:(0,kt.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Sr(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 i=e.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>i.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,R.themeSize)(e,"inherit"),paddingInline:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*3),paddingBlock:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,R.themeColor)(e,"shift-3",o)}`,outline:"none",color:e=>(0,R.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,R.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,R.themeColor)(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>(0,R.themeColor)(e,"shift-6",n)}}}}function Cr(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{role:"option",_onMount:e=>{var u,c;let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(c=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?c:"",s=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};s(i.query.get());let l=i.query.addListener(s);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,R.themeSize)(e,"inherit"),height:e=>(0,R.themeSpacing)(6+(0,R.themeDensity)(e)*2),paddingInline:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,R.themeColor)(e,"shift-9",o),backgroundColor:e=>(0,R.themeColor)(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>(0,R.themeColor)(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${(0,R.themeSpacing)(.5)} solid ${(0,R.themeColor)(e,"shift-6",n)}`,outlineOffset:`-${(0,R.themeSpacing)(.5)}`}}}}var Ee=require("@domphy/core"),C=require("@domphy/theme");var Q=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),Je=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),qt=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),pt=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Gt=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Ut=(r,o)=>Je(r,-((r.getDay()-o+7)%7));function vr(r){var o,n;try{let e=new Intl.Locale(r),i=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function Er(r={}){var Eo,xo,ko,wo;let{mode:o="single",time:n=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:l}=r,u=(Eo=r.weekStartsOn)!=null?Eo:vr(a),c=(0,Ee.toState)((xo=r.accentColor)!=null?xo:"primary","accentColor"),m=(0,Ee.toState)((ko=r.placement)!=null?ko:"bottom-start"),h=(0,Ee.toState)((wo=r.value)!=null?wo:o==="range"?[null,null]:null),d=l?h.addListener(p=>l(p)):null,f=(()=>{let p=h.get(),y=o==="range"?p==null?void 0:p[0]:p;return y instanceof Date?y:new Date})(),S=(0,Ee.toState)(f.getFullYear(),"viewYear"),g=(0,Ee.toState)(f.getMonth(),"viewMonth"),E=(0,Ee.toState)(Q(f),"focused"),b=(0,Ee.toState)(null,"hovered"),z=(0,Ee.toState)(f.getHours(),"hour"),O=(0,Ee.toState)(f.getMinutes(),"minute"),w=null,We=new Intl.DateTimeFormat(a,it({dateStyle:"medium"},n?{timeStyle:"short"}:{})),Xe=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),yo=new Intl.DateTimeFormat(a,{weekday:"short"}),St=new Intl.DateTimeFormat(a,{dateStyle:"full"}),ut=p=>p?We.format(p):"",Vn=p=>{if(s)return s(p);if(o==="range"){let[y,v]=p!=null?p:[null,null];return y?`${ut(y)} \u2013 ${ut(v)}`:""}return ut(p)},Ln=Array.from({length:7},(p,y)=>yo.format(new Date(2023,0,1+(y+u)%7))),bo=p=>!!e&&Q(p)<Q(e)||!!i&&Q(p)>Q(i)||!!t&&t(p),je=p=>{if(!n)return Q(p);let y=Q(p);return y.setHours(z.get(),O.get(),0,0),y},So=p=>{var x;if(bo(p))return;if(o==="single"){h.set(je(p)),n||Ft();return}let[y,v]=(x=h.get())!=null?x:[null,null];!y||y&&v?h.set([je(p),null]):Q(p)<Q(y)?(h.set([je(p),je(y)]),n||Ft()):(h.set([y,je(p)]),n||Ft())},Mn=()=>{var p;if(n)if(o==="single"){let y=h.get();y&&h.set(je(y))}else{let[y,v]=(p=h.get())!=null?p:[null,null];h.set([y&&je(y),v&&je(v)])}},Rn=(p,y)=>{var at;if(o!=="range")return!1;let[v,x]=(at=h.get(y))!=null?at:[null,null],F=x!=null?x:b.get(y);if(!v||!F)return!1;let T=Q(v)<=Q(F)?v:F,Se=Q(v)<=Q(F)?F:v,pe=Q(p);return pe>=Q(T)&&pe<=Q(Se)},_n=(p,y)=>{let v=h.get(y);if(o==="range"){let[x,F]=v!=null?v:[null,null];return pt(p,x)||pt(p,F)}return pt(p,v)},Ct=p=>{S.set(p.getFullYear()),g.set(p.getMonth())},Co=p=>{let y=qt(new Date(S.get(),g.get(),1),p);Ct(y)},vo=p=>S.set(S.get()+p),At=()=>{setTimeout(()=>{var p;(p=w==null?void 0:w.querySelector(`[data-date="${Gt(E.get())}"]`))==null||p.focus()},0)},Nn=Kn(),{show:Hn,hide:An,anchorPartial:Bt}=De({open:!1,placement:m,content:Nn});function Ft(){An()}Bt.onClick=()=>{};let Bn={type:"text",readonly:!0,value:p=>Vn(h.get(p)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:()=>{Kt()},onFocus:()=>{Kt()},onKeyDown:p=>{let y=p.key;(y==="ArrowDown"||y==="Enter")&&(p.preventDefault(),Kt())},_onMount:p=>d&&p.addHook("Remove",()=>{d()})};function Kt(){var y;let p=(y=Fn())!=null?y:new Date;E.set(Q(p)),Ct(p),Hn(),At()}function Fn(){var y;let p=h.get();return o==="range"?(y=p==null?void 0:p[0])!=null?y:null:p!=null?p:null}return(0,Ee.merge)(Bt,Bn),Bt;function Kn(){let p=(T,Se,pe)=>({button:T,type:"button",ariaLabel:Se,onClick:pe,style:xr()}),y={div:[p("\xAB","Previous year",()=>vo(-1)),p("\u2039","Previous month",()=>Co(-1)),{div:T=>Xe.format(new Date(S.get(T),g.get(T),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:T=>(0,C.themeSize)(T)}},p("\u203A","Next month",()=>Co(1)),p("\xBB","Next year",()=>vo(1))],style:{display:"flex",alignItems:"center",gap:(0,C.themeSpacing)(1),marginBottom:(0,C.themeSpacing)(2)}},v={div:Ln.map((T,Se)=>({div:T,style:{textAlign:"center",fontSize:pe=>(0,C.themeSize)(pe,"decrease-1"),fontWeight:"600",color:pe=>(0,C.themeColor)(pe,"shift-7"),paddingBlock:(0,C.themeSpacing)(1)},_key:Se})),role:"row",style:Ao()},x={div:T=>Wn(T),role:"grid",ariaLabel:"Calendar",onKeyDown:Gn,onMouseLeave:()=>o==="range"&&b.set(null),style:{display:"flex",flexDirection:"column",gap:(0,C.themeSpacing)(.5)}},F=[y,v,x];return n&&F.push(Yn()),F.push(qn()),{div:F,role:"dialog",ariaModal:"false",_onMount:T=>{w=T.domElement},style:{minWidth:(0,C.themeSpacing)(70),padding:(0,C.themeSpacing)(3),borderRadius:(0,C.themeSpacing)(2),backgroundColor:T=>(0,C.themeColor)(T,"base"),color:T=>(0,C.themeColor)(T,"shift-10"),border:T=>`1px solid ${(0,C.themeColor)(T,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Wn(p){let y=new Date(S.get(p),g.get(p),1),v=g.get(p),x=Ut(y,u),F=[];for(let T=0;T<6;T++){let Se=[];for(let pe=0;pe<7;pe++){let at=Je(x,T*7+pe);Se.push(jn(at,v,p))}F.push({div:Se,role:"row",style:Ao(),_key:T})}return F}function jn(p,y,v){let x=bo(p),F=_n(p,v),T=Rn(p,v),Se=p.getMonth()!==y,pe=pt(p,E.get(v)),at=pt(p,new Date);return{button:String(p.getDate()),type:"button",role:"gridcell",tabIndex:pe?0:-1,ariaSelected:F,ariaDisabled:x,disabled:x,ariaLabel:St.format(p),dataDate:Gt(p),onClick:()=>So(p),onMouseEnter:()=>o==="range"&&b.set(p),style:{appearance:"none",border:"none",cursor:x?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,C.themeSpacing)(1),fontSize:Y=>(0,C.themeSize)(Y),fontFamily:"inherit",opacity:x?.35:Se?.5:1,backgroundColor:Y=>F?(0,C.themeColor)(Y,"shift-7",c.get(Y)):T?(0,C.themeColor)(Y,"shift-2",c.get(Y)):"transparent",color:Y=>F?(0,C.themeColor)(Y,"shift-0",c.get(Y)):(0,C.themeColor)(Y,"shift-9"),outline:at?Y=>`1px solid ${(0,C.themeColor)(Y,"shift-6",c.get(Y))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:Y=>F?(0,C.themeColor)(Y,"shift-7",c.get(Y)):(0,C.themeColor)(Y,"shift-3",c.get(Y))},"&:focus-visible":{outline:Y=>`2px solid ${(0,C.themeColor)(Y,"shift-6",c.get(Y))}`}},_key:Gt(p)}}function Yn(){let p=(y,v,x)=>({select:Array.from({length:y},(F,T)=>({option:String(T).padStart(2,"0"),value:String(T),selected:Se=>v.get(Se)===T,_key:T})),ariaLabel:x,onChange:F=>{v.set(Number(F.target.value)),Mn()},style:kr()});return{div:[p(24,z,"Hour"),{span:":",style:{fontWeight:"600"}},p(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,C.themeSpacing)(1),marginTop:(0,C.themeSpacing)(3)}}}function qn(){let p=(y,v)=>({button:y,type:"button",onClick:v,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:x=>(0,C.themeSize)(x,"decrease-1"),color:x=>(0,C.themeColor)(x,"shift-8",c.get(x)),padding:(0,C.themeSpacing)(1)}});return{div:[p("Today",()=>{let y=new Date;E.set(Q(y)),Ct(y),At()}),p("Clear",()=>{h.set(o==="range"?[null,null]:null),b.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,C.themeSpacing)(2),paddingTop:(0,C.themeSpacing)(2),borderTop:y=>`1px solid ${(0,C.themeColor)(y,"shift-3")}`}}}function Gn(p){let y=p,v=E.get(),x=null;switch(y.key){case"ArrowLeft":x=Je(v,-1);break;case"ArrowRight":x=Je(v,1);break;case"ArrowUp":x=Je(v,-7);break;case"ArrowDown":x=Je(v,7);break;case"Home":x=Ut(v,u);break;case"End":x=Je(Ut(v,u),6);break;case"PageUp":x=qt(v,y.shiftKey?-12:-1);break;case"PageDown":x=qt(v,y.shiftKey?12:1);break;case"Enter":case" ":y.preventDefault(),So(v);return;default:return}y.preventDefault(),E.set(x),Ct(x),At()}}function Ao(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,C.themeSpacing)(.5)}}function xr(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,C.themeSize)(r),color:r=>(0,C.themeColor)(r,"shift-8"),width:(0,C.themeSpacing)(7),height:(0,C.themeSpacing)(7),borderRadius:(0,C.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,C.themeColor)(r,"shift-3")}}}function kr(){return{fontFamily:"inherit",fontSize:r=>(0,C.themeSize)(r),padding:(0,C.themeSpacing)(1),borderRadius:(0,C.themeSpacing)(1),border:r=>`1px solid ${(0,C.themeColor)(r,"shift-4")}`,backgroundColor:r=>(0,C.themeColor)(r,"base"),color:r=>(0,C.themeColor)(r,"shift-9")}}var Bo=require("@domphy/core"),Ne=require("@domphy/theme");function wr(r={}){var n;let o=(0,Bo.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${(0,Ne.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,Ne.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,Ne.themeSize)(e,"inherit"),color:e=>(0,Ne.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,Ne.themeSize)(e,"inherit"),color:e=>(0,Ne.themeColor)(e,"shift-9",o.get(e))}}}}var Xt=require("@domphy/core"),k=require("@domphy/theme");function Tr(r={}){var i,t;let{duration:o=240}=r,n=(0,Xt.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Xt.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>(0,k.themeSize)(a,"inherit"),color:a=>(0,k.themeColor)(a,"shift-9",n.get(a)),backgroundColor:a=>(0,k.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,k.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,k.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,k.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,k.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*4),height:(0,k.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,k.themeSpacing)(2),height:(0,k.themeSpacing)(2),flexShrink:0,marginTop:`-${(0,k.themeSpacing)(.5)}`,borderInlineEnd:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.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,k.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*2),outlineOffset:`-${(0,k.themeSpacing)(.5)}`,outline:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.themeColor)(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>(0,k.themeSpacing)((0,k.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,k.themeSpacing)(250),opacity:1,paddingTop:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*1),paddingBottom:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*3)}}}}var Ko=require("@domphy/core"),fe=require("@domphy/theme"),Fo='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function Pr(r={}){let{color:o="neutral",open:n=!1}=r,e=(0,Ko.toState)(n),i=null,t=!1;return{_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(a,s)=>{if(a.target!==s.domElement)return;let l=s.domElement.getBoundingClientRect();a.clientX>=l.left&&a.clientX<=l.right&&a.clientY>=l.top&&a.clientY<=l.bottom||e.set(!1)},onTransitionEnd:(a,s)=>{if(!t)return;t=!1,s.domElement.close(),document.body.style.overflow="",i==null||i.focus(),i=null},_onMount:a=>{let s=a.domElement;s.setAttribute("aria-modal","true");let l=null,u=d=>{if(d.key!=="Tab")return;let f=Array.from(s.querySelectorAll(Fo)).filter(E=>!E.closest("[aria-hidden='true']")&&E.offsetParent!==null);if(!f.length){d.preventDefault();return}let S=f[0],g=f[f.length-1];d.shiftKey?(document.activeElement===S||document.activeElement===s)&&(d.preventDefault(),g.focus()):document.activeElement===g&&(d.preventDefault(),S.focus())},c=d=>{d.preventDefault(),e.set(!1)};s.addEventListener("cancel",c);let m=d=>{d?(i=document.activeElement,s.showModal(),document.body.style.overflow="hidden",s.addEventListener("keydown",u),requestAnimationFrame(()=>{s.style.opacity="1";let f=s.querySelector(Fo);f==null||f.focus()})):(t=!0,s.style.opacity="0",s.removeEventListener("keydown",u),l=setTimeout(()=>{l=null,t&&(t=!1,s.close(),document.body.style.overflow="",i==null||i.focus(),i=null)},350))};m(e.get());let h=e.addListener(m);a.addHook("Remove",()=>{l&&(clearTimeout(l),l=null),h(),s.removeEventListener("cancel",c),document.body.style.overflow="",s.removeEventListener("keydown",u),i==null||i.focus(),i=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:a=>(0,fe.themeSize)(a,"inherit"),color:a=>(0,fe.themeColor)(a,"shift-10",o),backgroundColor:a=>(0,fe.themeColor)(a,"inherit",o),border:"none",padding:a=>(0,fe.themeSpacing)((0,fe.themeDensity)(a)*3),boxShadow:a=>`0 ${(0,fe.themeSpacing)(9)} ${(0,fe.themeSpacing)(16)} ${(0,fe.themeColor)(a,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:a=>(0,fe.themeColor)(a,"shift-2","neutral"),opacity:.75}}}}var Wo=require("@domphy/core"),He=require("@domphy/theme");function Or(r={}){var n;let o=(0,Wo.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,He.themeSpacing)(2),fontSize:e=>(0,He.themeSize)(e,"inherit"),backgroundColor:e=>(0,He.themeColor)(e),color:e=>(0,He.themeColor)(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,He.themeColor)(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,He.themeColor)(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var qo=require("@domphy/core"),me=require("@domphy/theme"),Jt={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},jo={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},ht=r=>r==="left"||r==="right";function Yo(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function Dr(r={}){let{color:o="neutral",open:n=!1,placement:e="end",size:i}=r,t=(0,qo.toState)(n),a=e==="start"||e==="end",s=Yo(e,!1),l=ht(s)?(0,me.themeSpacing)(80):(0,me.themeSpacing)(64),u=i!=null?i:l;return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(c,m)=>{c.target===m.domElement&&t.set(!1)},_onMount:c=>{let m=c.domElement;m.setAttribute("aria-modal","true");let h=w=>{w.preventDefault(),t.set(!1)};m.addEventListener("cancel",h);let d=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),f=Yo(e,d);a&&(m.style.transform=Jt[f],m.style.margin=jo[f],m.style.width=ht(f)?u:"100dvw",m.style.height=ht(f)?"100dvh":u);let S=!1,g=null,E=()=>{g=null,S&&(S=!1,m.close(),document.body.style.overflow="")},b=w=>{w.target===m&&w.propertyName==="transform"&&E()};m.addEventListener("transitionend",b);let z=w=>{w?(S=!1,m.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(S=!0,m.style.transform=Jt[f],g=setTimeout(E,350))};z(t.get());let O=t.addListener(z);c.addHook("Remove",()=>{g&&(clearTimeout(g),g=null),O(),m.removeEventListener("cancel",h),m.removeEventListener("transitionend",b),document.body.style.overflow=""})},style:{transform:Jt[s],transition:"transform 0.25s ease",fontSize:c=>(0,me.themeSize)(c,"inherit"),color:c=>(0,me.themeColor)(c,"shift-10",o),backgroundColor:c=>(0,me.themeColor)(c,"inherit",o),border:"none",padding:c=>(0,me.themeSpacing)((0,me.themeDensity)(c)*3),margin:jo[s],width:ht(s)?u:"100dvw",height:ht(s)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:c=>`0 ${(0,me.themeSpacing)(4)} ${(0,me.themeSpacing)(12)} ${(0,me.themeColor)(c,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:c=>(0,me.themeColor)(c,"shift-2","neutral"),opacity:.75}}}}var Go=require("@domphy/core"),wt=require("@domphy/theme");function $r(r={}){var n;let o=(0,Go.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,wt.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,wt.themeColor)(e,"shift-10",o.get(e))}}}var Uo=require("@domphy/core"),Ze=require("@domphy/theme");function Ir(r={}){var n;let o=(0,Uo.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,Ze.themeSpacing)(3),paddingBlock:(0,Ze.themeSpacing)(12),paddingInline:(0,Ze.themeSpacing)(6),textAlign:"center",color:e=>(0,Ze.themeColor)(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>(0,Ze.themeColor)(e,"shift-5",o.get(e))}}}}function zr(r={}){return{_onError:(o,n,e)=>{var t,a;(t=r.onError)==null||t.call(r,n);let i=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([i])}}}var Xo=require("@domphy/core"),ue=require("@domphy/theme"),Vr={small:8,medium:10,large:14};function Lr(r={}){var e,i;let o=(0,Xo.toState)((e=r.color)!=null?e:"primary","color"),n=(0,ue.themeSpacing)(Vr[(i=r.size)!=null?i:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>(0,ue.themeSize)(t,"inherit"),backgroundColor:t=>(0,ue.themeColor)(t,"shift-9",o.get(t)),color:t=>(0,ue.themeColor)(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${(0,ue.themeSpacing)(1)} ${(0,ue.themeSpacing)(4)} ${(0,ue.themeColor)(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,ue.themeColor)(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${(0,ue.themeSpacing)(2)} ${(0,ue.themeSpacing)(6)} ${(0,ue.themeColor)(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${(0,ue.themeColor)(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Jo=require("@domphy/core"),$e=require("@domphy/theme");function Mr(r={}){var n;let o=(0,Jo.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,$e.themeSpacing)(2),marginInline:0,marginTop:(0,$e.themeSpacing)(3),marginBottom:(0,$e.themeSpacing)(3),color:e=>(0,$e.themeColor)(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,$e.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,$e.themeSize)(e,"decrease-1"),color:e=>(0,$e.themeColor)(e,"shift-8",o.get(e)),lineHeight:1.45}}}}var Zo=require("@domphy/core"),M=require("@domphy/theme");function Rr(r={}){var i;let{layout:o="horizontal"}=r,n=(0,Zo.toState)((i=r.color)!=null?i:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*3),paddingBlock:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*2),fontSize:t=>(0,M.themeSize)(t,"inherit"),backgroundColor:t=>(0,M.themeColor)(t,"inherit",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,M.themeSpacing)(4),rowGap:(0,M.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,M.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*1),borderRadius:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*2),color:t=>(0,M.themeColor)(t,"shift-9",n.get(t)),backgroundColor:t=>(0,M.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":(0,M.themeSpacing)((0,M.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,M.themeSpacing)(2)} * -1)`,fontSize:t=>(0,M.themeSize)(t,"decrease-1"),color:t=>(0,M.themeColor)(t,"shift-9",n.get(t))}}}}var Qo=require("@domphy/core"),lt=require("@domphy/theme"),_r={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Nr(r={}){var n;let o=(0,Qo.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,lt.themeColor)(e,"shift-11",o.get(e)),marginTop:0,marginBottom:(0,lt.themeSpacing)(2),fontSize:e=>{let i=_r[e.elementNode.tagName]||"inherit";return(0,lt.themeSize)(e,i)}}}}var en=require("@domphy/core"),ft=require("@domphy/theme");function Hr(r={}){var n;let o=(0,en.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:(0,ft.themeSpacing)(3),marginBottom:(0,ft.themeSpacing)(3),backgroundColor:e=>(0,ft.themeColor)(e,"shift-4",o.get(e))}}}var tn=require("@domphy/core"),Qe=require("@domphy/theme");function Ar(r={}){var n;let o=(0,tn.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,Qe.themeSpacing)(4),height:(0,Qe.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Qe.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Qe.themeColor)(e,"shift-9",o.get(e))}}}var on=require("@domphy/core"),Tt=require("@domphy/theme");function Br(r={}){var n;let o=(0,on.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,Tt.themeSpacing)(2),backgroundColor:e=>(0,Tt.themeColor)(e,"inherit",o.get(e))}}}var Zt=require("@domphy/core"),_=require("@domphy/theme");function Fr(r={}){var e,i;let o=(0,Zt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Zt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,_.themeSize)(t,"inherit"),display:"inline-flex",position:"relative",width:(0,_.themeSpacing)(6),height:(0,_.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,_.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,_.themeColor)(t,"shift-9",o.get(t)),width:(0,_.themeSpacing)(4),height:(0,_.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,_.themeColor)(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,_.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,_.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,_.themeSpacing)(.5)} solid ${(0,_.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,_.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,_.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,_.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,_.themeSpacing)(1.5),outline:t=>`${(0,_.themeSpacing)(.5)} solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,_.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var ne=require("@domphy/theme");function Kr(r={}){return{type:"color",_onSchedule:(o,n)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),n.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>(0,ne.themeSize)(o,"inherit"),paddingBlock:o=>(0,ne.themeSpacing)((0,ne.themeDensity)(o)*1),paddingInline:o=>(0,ne.themeSpacing)((0,ne.themeDensity)(o)*1),blockSize:o=>(0,ne.themeSpacing)(6+(0,ne.themeDensity)(o)*2),inlineSize:o=>(0,ne.themeSpacing)(6+(0,ne.themeDensity)(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>(0,ne.themeSpacing)((0,ne.themeDensity)(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>(0,ne.themeColor)(o,"shift-2","neutral"),outline:o=>`1px solid ${(0,ne.themeColor)(o,"shift-4","neutral")}`}}}}var Qt=require("@domphy/core"),G=require("@domphy/theme");function Wr(r={}){var i,t;let{mode:o="datetime-local"}=r,n=(0,Qt.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Qt.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,G.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,G.themeColor)(a,"shift-9",n.get(a)),backgroundColor:a=>(0,G.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,G.themeColor)(a,"shift-4",n.get(a))}`,borderRadius:a=>(0,G.themeSpacing)((0,G.themeDensity)(a)*1),paddingInline:a=>(0,G.themeSpacing)((0,G.themeDensity)(a)*3),height:a=>(0,G.themeSpacing)(6+(0,G.themeDensity)(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${(0,G.themeSpacing)(.5)} solid ${(0,G.themeColor)(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,G.themeColor)(a,"shift-8","neutral"),backgroundColor:a=>(0,G.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,G.themeColor)(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${(0,G.themeSpacing)(.5)} solid ${(0,G.themeColor)(a,"shift-6","error")}`}}}}var eo=require("@domphy/core"),D=require("@domphy/theme");function jr(r={}){var e,i;let o=(0,eo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,eo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,D.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,D.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,D.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,D.themeColor)(t,"shift-4",o.get(t))}`,borderRadius:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*1),height:t=>(0,D.themeSpacing)(6+(0,D.themeDensity)(t)*2),paddingInline:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,D.themeSpacing)(1),height:(0,D.themeSpacing)(6),paddingInline:(0,D.themeSpacing)(2),cursor:"pointer",color:t=>(0,D.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,D.themeColor)(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,D.themeSpacing)(.5)} solid ${(0,D.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,D.themeColor)(t,"shift-8","neutral"),outline:t=>`1px solid ${(0,D.themeColor)(t,"shift-4","neutral")}`,backgroundColor:t=>(0,D.themeColor)(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,D.themeColor)(t,"shift-8","neutral"),backgroundColor:t=>(0,D.themeColor)(t,"shift-3","neutral")}}}}var to=require("@domphy/core"),W=require("@domphy/theme");function Yr(r={}){var e,i;let o=(0,to.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,to.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,W.themeSpacing)(10),paddingInlineStart:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*3),paddingInlineEnd:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1.5),paddingBlock:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1),borderRadius:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1),fontSize:t=>(0,W.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,W.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,W.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,W.themeColor)(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,W.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,W.themeColor)(t,"shift-4","neutral")}`,color:t=>(0,W.themeColor)(t,"shift-8","neutral")}}}}var oo=require("@domphy/core"),ee=require("@domphy/theme"),nn='<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>',qr='<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 Gr(r={}){var e,i;let o=(0,oo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,oo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onMount:t=>{let a=t.domElement,s=!1,l=document.createElement("input");l.type="password",l.style.cssText="flex:1;min-width:0;border:none;outline:none;background:transparent;padding:0;margin:0;font:inherit;color:inherit;";let u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Show password"),u.style.cssText="background:none;border:none;padding:0;margin:0;cursor:pointer;color:inherit;display:flex;align-items:center;flex-shrink:0;opacity:0.6;",u.innerHTML=nn;let c=()=>{s=!s,l.type=s?"text":"password",u.innerHTML=s?qr:nn,u.setAttribute("aria-label",s?"Hide password":"Show password")};u.addEventListener("click",c),a.appendChild(l),a.appendChild(u),t.addHook("Remove",()=>{u.removeEventListener("click",c)})},style:{display:"flex",alignItems:"center",gap:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1),paddingBlock:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1),paddingInline:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*3),borderRadius:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ee.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,ee.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,ee.themeColor)(t,"inherit",o.get(t)),fontSize:t=>(0,ee.themeSize)(t,"inherit"),"&:focus-within":{outline:t=>`${(0,ee.themeSpacing)(.5)} solid ${(0,ee.themeColor)(t,"shift-6",n.get(t))}`}}}}var no=require("@domphy/theme");function Ur(){return{style:{display:"flex",alignItems:"center",gap:(0,no.themeSpacing)(2),"& > *":{minWidth:`${(0,no.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let s=n(),l=a.target,u=s.indexOf(l);l.value&&u<s.length-1&&s[u+1].focus()},i=a=>{let s=n(),l=a.target,u=s.indexOf(l);a.key==="Backspace"&&!l.value&&u>0&&s[u-1].focus(),a.key==="ArrowLeft"&&u>0&&s[u-1].focus(),a.key==="ArrowRight"&&u<s.length-1&&s[u+1].focus()},t=a=>{var h,d,f;a.preventDefault();let s=(d=(h=a.clipboardData)==null?void 0:h.getData("text"))!=null?d:"",l=n(),u=l.indexOf(a.target),c=u===-1?0:u;[...s].forEach((S,g)=>{l[c+g]&&(l[c+g].value=S)});let m=Math.min(c+s.length-1,l.length-1);(f=l[m])==null||f.focus()};o.addEventListener("input",e),o.addEventListener("keydown",i),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",i),o.removeEventListener("paste",t)})}}}var ro=require("@domphy/core"),re=require("@domphy/theme");function Xr(r={}){var e,i;let o=(0,ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ro.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>(0,re.themeSize)(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:(0,re.themeSpacing)(6),height:(0,re.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,re.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,re.themeColor)(t,"shift-9",o.get(t)),width:(0,re.themeSpacing)(4),height:(0,re.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,re.themeColor)(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,re.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,re.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,re.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${(0,re.themeSpacing)(.5)} solid ${(0,re.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,re.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var ao=require("@domphy/core"),ae=require("@domphy/theme");function Jr(r={}){var e,i;let o=(0,ao.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ao.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:(0,ae.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,ae.themeSpacing)(1.5),borderRadius:(0,ae.themeSpacing)(999),backgroundColor:t=>(0,ae.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,ae.themeSpacing)(4),height:(0,ae.themeSpacing)(4),borderRadius:(0,ae.themeSpacing)(999),border:"none",marginTop:`calc((${(0,ae.themeSpacing)(1.5)} - ${(0,ae.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,ae.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,ae.themeColor)(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:(0,ae.themeSpacing)(1),borderRadius:(0,ae.themeSpacing)(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var io=require("@domphy/core"),U=require("@domphy/theme");function Zr(r={}){var e,i;let o=(0,io.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,io.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>(0,U.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,U.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,U.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,U.themeColor)(t,"shift-4",o.get(t))}`,borderRadius:t=>(0,U.themeSpacing)((0,U.themeDensity)(t)*1),minWidth:(0,U.themeSpacing)(32),paddingInline:t=>(0,U.themeSpacing)((0,U.themeDensity)(t)*3),paddingBlock:t=>(0,U.themeSpacing)((0,U.themeDensity)(t)*1),"&::placeholder":{color:t=>(0,U.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]), &:focus-visible":{outline:t=>`${(0,U.themeSpacing)(.5)} solid ${(0,U.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,U.themeColor)(t,"shift-8","neutral"),backgroundColor:t=>(0,U.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,U.themeColor)(t,"shift-4","neutral")}`}}}}var rn=require("@domphy/core"),ie=require("@domphy/theme");function Qr(r={}){var n;let o=(0,rn.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,ie.themeSize)(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:(0,ie.themeSpacing)(9),height:(0,ie.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,ie.themeSpacing)(1),"&:checked":{"&::before":{backgroundColor:e=>(0,ie.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,ie.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,ie.themeSpacing)(3),height:(0,ie.themeSpacing)(3),borderRadius:(0,ie.themeSpacing)(999),left:(0,ie.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,ie.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,ie.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,ie.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,ie.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var lo=require("@domphy/core"),$=require("@domphy/theme");function ea(r={}){var e,i;let o=(0,lo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,lo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,$.themeSpacing)(10),paddingInline:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*3),paddingBlock:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*1),borderRadius:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*1),fontSize:t=>(0,$.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,$.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,$.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,$.themeColor)(t,"inherit",o.get(t)),"&::placeholder":{color:t=>(0,$.themeColor)(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>(0,$.themeColor)(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,$.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,$.themeColor)(t,"shift-4","neutral")}`,color:t=>(0,$.themeColor)(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","warning")}`}}}}var an=require("@domphy/core"),Ie=require("@domphy/theme");function ta(r={}){var n;let o=(0,an.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,Ie.themeSize)(e,"inherit"),color:e=>(0,Ie.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,Ie.themeColor)(e,"inherit",o.get(e)),paddingBlock:(0,Ie.themeSpacing)(.5),paddingInline:(0,Ie.themeSpacing)(1.5),borderRadius:(0,Ie.themeSpacing)(1),outline:e=>`1px solid ${(0,Ie.themeColor)(e,"shift-4",o.get(e))}`}}}var so=require("@domphy/core"),Ge=require("@domphy/theme");function oa(r={}){var e,i;let o=(0,so.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,so.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,Ge.themeSpacing)(2),fontSize:t=>(0,Ge.themeSize)(t,"inherit"),color:t=>(0,Ge.themeColor)(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,Ge.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,Ge.themeColor)(t,"shift-8","neutral")}}}}var co=require("@domphy/core"),ge=require("@domphy/theme");function na(r={}){var e,i;let o=(0,co.toState)((e=r.color)!=null?e:"primary","color"),n=(0,co.toState)((i=r.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>(0,ge.themeSize)(t,"inherit"),backgroundColor:t=>(0,ge.themeColor)(t),color:t=>(0,ge.themeColor)(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,ge.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,ge.themeColor)(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:(0,ge.themeSpacing)(1),outlineOffset:(0,ge.themeSpacing)(1),outline:t=>`${(0,ge.themeSpacing)(.5)} solid ${(0,ge.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,ge.themeColor)(t,"shift-8","neutral")}}}}var ln=require("@domphy/core"),B=require("@domphy/theme");function ra(r={}){var n;let o=(0,ln.toState)((n=r.color)!=null?n:"primary","color");return{_onInsert:e=>{e.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:e=>(0,B.themeSize)(e,"inherit"),textDecoration:"none",paddingBlock:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1),paddingInline:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*3),borderRadius:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${(0,B.themeColor)(e,"shift-4",o.get(e))}`,color:e=>(0,B.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,B.themeColor)(e,"inherit",o.get(e)),"&:hover":{color:e=>(0,B.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,B.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,B.themeSpacing)(.5)} ${(0,B.themeColor)(e,"shift-6",o.get(e))}`},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>(0,B.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,B.themeColor)(e,"shift-4","neutral")}`,color:e=>(0,B.themeColor)(e,"shift-8","neutral")}}}}var sn=require("@domphy/core"),N=require("@domphy/theme");function aa(r={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function ia(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,N.themeSpacing)((0,N.themeDensity)(n)*2),paddingBlock:n=>(0,N.themeSpacing)(o?1:(0,N.themeDensity)(n)*2),paddingInline:n=>(0,N.themeSpacing)((0,N.themeDensity)(n)*3),fontSize:n=>(0,N.themeSize)(n,"inherit")}}}function la(r={}){var i,t;let o=(0,sn.toState)((i=r.color)!=null?i:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{cursor:"pointer",style:{appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*2),paddingBlock:a=>(0,N.themeSpacing)(e?1:(0,N.themeDensity)(a)*2),paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3),fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"shift-9",o.get(a)),borderRadius:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",n),color:a=>(0,N.themeColor)(a,"shift-12",n)},"&:focus-visible":{outline:a=>`2px solid ${(0,N.themeColor)(a,"shift-6",n)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var cn=require("@domphy/core"),Ae=require("@domphy/theme");function sa(r={}){var n;let o=(0,cn.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,Ae.themeSize)(e,"inherit"),color:e=>(0,Ae.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,Ae.themeColor)(e,"inherit",o.get(e)),height:(0,Ae.themeSpacing)(6),borderRadius:(0,Ae.themeSpacing)(1),paddingInline:(0,Ae.themeSpacing)(1.5)}}}var Pt=require("@domphy/core"),ze=require("@domphy/theme");function ca(r={}){let{color:o="neutral",selectable:n=!0}=r;return{role:"menu",dataTone:"shift-17",_onSchedule:(i,t)=>{var s;let a={_context:{menu:{activeKey:(0,Pt.toState)((s=r.activeKey)!=null?s:null),selectable:n}}};(0,Pt.merge)(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,ze.themeSpacing)((0,ze.themeDensity)(i)*2),paddingInline:i=>(0,ze.themeSpacing)((0,ze.themeDensity)(i)*2),fontSize:i=>(0,ze.themeSize)(i,"inherit"),backgroundColor:i=>(0,ze.themeColor)(i,"inherit",o)}}}var te=require("@domphy/theme");function ma(r={}){let{accentColor:o="primary",color:n="neutral"}=r;return{role:"menuitem",_onInsert:i=>{var l,u;i.tagName!=="button"&&console.warn('"menuItem" patch must use button tag');let t=i.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(u=(l=i.parent)==null?void 0:l.children.items)!=null?u:[];a=a.filter(c=>c.type==="ElementNode"&&c.attributes.get("role")==="menuitem");let s=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i);t.selectable&&(i.attributes.set("ariaCurrent",c=>t.activeKey.get(c)===s||void 0),i.addEvent("click",()=>t.activeKey.set(s)))},onKeyDown:(i,t)=>{var c,m,h,d;let a=i.key;if(a==="Enter"||a===" "){i.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;i.preventDefault();let s=((h=(m=t.parent)==null?void 0:m.children.items)!=null?h:[]).filter(f=>f.type==="ElementNode"&&f.attributes.get("role")==="menuitem");if(!s.length)return;let l=s.indexOf(t),u=l;a==="ArrowDown"?u=(l+1)%s.length:a==="ArrowUp"?u=(l-1+s.length)%s.length:a==="Home"?u=0:a==="End"&&(u=s.length-1),(d=s[u].domElement)==null||d.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:i=>(0,te.themeSpacing)(2),width:"100%",fontSize:i=>(0,te.themeSize)(i,"inherit"),height:i=>(0,te.themeSpacing)(6+(0,te.themeDensity)(i)*2),paddingInline:i=>(0,te.themeSpacing)((0,te.themeDensity)(i)*3),border:"none",outline:"none",color:i=>(0,te.themeColor)(i,"shift-9",n),backgroundColor:i=>(0,te.themeColor)(i,"inherit",n),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:i=>(0,te.themeColor)(i,"shift-2",n)},"&[aria-current=true]":{backgroundColor:i=>(0,te.themeColor)(i,"shift-3",o),color:i=>(0,te.themeColor)(i,"shift-10")},"&:focus-visible":{outline:i=>`${(0,te.themeSpacing)(.5)} solid ${(0,te.themeColor)(i,"shift-6",o)}`,outlineOffset:`-${(0,te.themeSpacing)(.5)}`}}}}var mn=r=>!!r&&typeof r.get=="function"&&r._isState===!0,st=r=>{let o={},n=[];for(let e in r){let i=r[e];e==="x"?n.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?n.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?n.push(`scale(${i})`):e==="rotate"?n.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):o[e]=i}return n.length&&(o.transform=n.join(" ")),o};function ua(r={}){var a,s,l,u;let{initial:o,animate:n,exit:e,transition:i={}}=r,t={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s:0,easing:(l=i.easing)!=null?l:"ease",iterations:(u=i.iterations)!=null?u:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let h=mn(n)?n.get():n;if(h?m.animate(o?[st(o),st(h)]:[st(h)],t):o&&Object.assign(m.style,st(o)),mn(n)){let d=n.addListener(f=>{m.animate([st(f)],t)});c.setMetadata("motionRelease",d)}},_onBeforeRemove:(c,m)=>{let h=c.domElement;if(!h||!e||typeof h.animate!="function")return m();h.animate([st(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}var un=require("@domphy/core"),et=require("@domphy/theme");function da(r={}){var n;let o=(0,un.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,et.themeSize)(e,"inherit"),backgroundColor:e=>(0,et.themeColor)(e),color:e=>(0,et.themeColor)(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,et.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var dn=require("@domphy/core"),j=require("@domphy/theme");function pa(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),i=Math.min(o-1,r+1);for(let t=e;t<=i;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function ha(r){var s;let{total:o,color:n="neutral",accentColor:e="primary"}=r,i=(0,dn.toState)((s=r.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>(0,j.themeSpacing)(6+(0,j.themeDensity)(l)*2),height:l=>(0,j.themeSpacing)(6+(0,j.themeDensity)(l)*2),paddingInline:l=>(0,j.themeSpacing)((0,j.themeDensity)(l)*2),borderRadius:l=>(0,j.themeSpacing)((0,j.themeDensity)(l)*1),border:"none",cursor:"pointer",fontSize:l=>(0,j.themeSize)(l,"inherit"),backgroundColor:"transparent",color:l=>(0,j.themeColor)(l,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:l=>(0,j.themeColor)(l,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Do(it({},t),{backgroundColor:l=>(0,j.themeColor)(l,"shift-6",e),color:l=>(0,j.themeColor)(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>(0,j.themeColor)(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let u={div:c=>{let m=i.get(c),h=[];h.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&i.set(m-1),style:t});for(let d of pa(m,o))if(d==="...")h.push({span:"\u2026",ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:f=>(0,j.themeSpacing)((0,j.themeDensity)(f)*2),color:f=>(0,j.themeColor)(f,"shift-7",n)}});else{let f=d===m;h.push({button:String(d),type:"button",ariaLabel:`Page ${d}`,ariaCurrent:f?"page":void 0,disabled:f,onClick:()=>i.set(d),style:f?a:t})}return h.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&i.set(m+1),style:t}),h},style:{display:"flex",alignItems:"center",gap:(0,j.themeSpacing)(1)}};l.children.insert(u)},style:{display:"inline-flex"}}}var pn=require("@domphy/core"),Ot=require("@domphy/theme");function fa(r={}){var n;let o=(0,pn.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,Ot.themeSize)(e,"inherit"),color:e=>(0,Ot.themeColor)(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var gt=require("@domphy/core"),tt=require("@domphy/theme");function ga(r){var h;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,i=null,t=(0,gt.toState)(o),a=(0,gt.toState)(n),{show:s,hide:l,anchorPartial:u}=De({open:t,placement:a,content:r.content}),c={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>(0,tt.themeColor)(d,"inherit"),borderRadius:d=>(0,tt.themeSpacing)((0,tt.themeDensity)(d)*2),boxShadow:d=>`0 4px 20px ${(0,tt.themeColor)(d,"shift-6")}`},onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),_onInsert:d=>{let f=d.attributes.get("id");i=f||d.nodeId,!f&&d.attributes.set("id",i)}};return(h=r.content).$||(h.$=[]),r.content.$.push(c),(0,gt.merge)(u,{ariaHaspopup:"dialog",ariaExpanded:d=>t.get(d),onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),onClick:()=>{e==="click"&&(t.get()?l():s())},onKeyDown:d=>{d.key==="Escape"&&t.get()&&l()},onFocus:()=>e==="hover"&&s(),onBlur:(d,f)=>{let S=d.relatedTarget,g=f.getRoot().domElement,E=i?g.querySelector(`#${CSS.escape(i)}`):null;S&&(E!=null&&E.contains(S))||l()},_onMount:d=>i&&d.attributes.set("ariaControls",i)}),u}var hn=require("@domphy/core"),ke=require("@domphy/theme");function mo(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,ke.themeSpacing)(6),bordered:i=!0}=r,t=(0,hn.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=c=>{var m;return(m=a[t.get(c)])!=null?m:a["bottom-end"]},l=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",u=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>(0,ke.themeSize)(c),backgroundColor:c=>(0,ke.themeColor)(c),color:c=>(0,ke.themeColor)(c,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,ke.themeSpacing)(1.5),height:(0,ke.themeSpacing)(1.5),backgroundColor:c=>(0,ke.themeColor)(c,"inherit",n),borderWidth:i?"1px":"0px",borderColor:c=>(0,ke.themeColor)(c,"inherit",n),borderTopStyle:c=>{let m=s(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=s(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=s(c);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:c=>{let m=s(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=s(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=s(c);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:c=>{let m=s(c),h=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",d=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${h},${d}) rotate(45deg)`}}}}}var fn=require("@domphy/core"),ye=require("@domphy/theme");function ya(r={}){var n;let o=(0,fn.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,ye.themeSize)(e,"inherit"),color:e=>(0,ye.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,ye.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*2),paddingInline:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*3),borderRadius:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*2)}}}var uo=require("@domphy/core"),Be=require("@domphy/theme");function ba(r={}){var e,i;let o=(0,uo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,uo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:(0,Be.themeSpacing)(2),border:0,borderRadius:(0,Be.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,Be.themeColor)(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,Be.themeColor)(t,"shift-3",o.get(t)),borderRadius:(0,Be.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,Be.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,Be.themeSpacing)(999),transition:"width 220ms ease"}}}}var gn=require("@domphy/core"),Dt=require("@domphy/theme"),Sa='<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>',Ca='<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 a,s;let{max:o=5,readOnly:n=!1,onChange:e}=r,i=(a=r.color)!=null?a:"warning",t=(0,gn.toState)((s=r.value)!=null?s:0);return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,Dt.themeSpacing)(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:l=>(0,Dt.themeColor)(l,"shift-8",i)},_onMount:l=>{let u=l.domElement,c=t.get(),m=0,h=()=>{let f=m>0?m:c;Array.from(u.children).forEach((S,g)=>{S.innerHTML=g<f?Sa:Ca})};u.innerHTML="";for(let f=1;f<=o;f++){let S=document.createElement("button");if(S.type="button",S.setAttribute("aria-label",`${f} star${f>1?"s":""}`),S.style.cssText="background:none;border:none;padding:0;cursor:inherit;color:inherit;font-size:inherit;display:flex;align-items:center;",!n){let g=f;S.addEventListener("click",()=>{let E=g===c?0:g;c=E,t.set(E),e==null||e(E),m=0,h()}),S.addEventListener("mouseenter",()=>{m=g,h()}),S.addEventListener("mouseleave",()=>{m=0,h()}),S.addEventListener("keydown",E=>{var O;let b=c;if(E.key==="ArrowRight"||E.key==="ArrowUp")b=Math.min(o,c+1),E.preventDefault();else if(E.key==="ArrowLeft"||E.key==="ArrowDown")b=Math.max(0,c-1),E.preventDefault();else return;c=b,t.set(b),e==null||e(b),h();let z=b>0?b-1:0;(O=u.children[z])==null||O.focus()})}u.appendChild(S)}h();let d=t.addListener(f=>{c=f,m===0&&h()});l.addHook("Remove",d)}}}var $t=require("@domphy/core"),ct=require("@domphy/theme");function Ea(r={}){var l,u,c;let{size:o=16,thickness:n=.25}=r,e=(0,$t.toState)((l=r.value)!=null?l:0,"value"),i=(0,$t.toState)((u=r.color)!=null?u:"primary","color"),t=(0,$t.toState)((c=r.trackColor)!=null?c:"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%",background:m=>`conic-gradient(from -90deg, ${(0,ct.themeColor)(m,"shift-9",i.get(m))} ${e.get(m)}%, ${(0,ct.themeColor)(m,"shift-3",t.get(m))} 0%)`,WebkitMask:s,mask:s}}}var yn=require("@domphy/core"),Fe=require("@domphy/theme");function xa(r={}){var n;let o=(0,yn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto","&::-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 bn=require("@domphy/core"),ot=require("@domphy/theme");function ka(r={}){var n;let{color:o="neutral"}=r;return{role:"radiogroup",_context:{segmented:{value:(0,bn.toState)((n=r.value)!=null?n:"")}},style:{display:"inline-flex",paddingBlock:(0,ot.themeSpacing)(1),paddingInline:(0,ot.themeSpacing)(1),gap:(0,ot.themeSpacing)(.5),borderRadius:(0,ot.themeSpacing)(10),backgroundColor:e=>(0,ot.themeColor)(e,"shift-2",o)}}}var po=require("@domphy/core"),de=require("@domphy/theme");function wa(r={}){var e,i;let o=(0,po.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,po.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{role:"radio",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"segmentedItem" patch must use button tag');let a=t.getContext("segmented");if(!a){console.warn('"segmentedItem" patch must be used inside a "segmented"');return}let l=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="radio"),u=t.key!==null&&t.key!==void 0?String(t.key):String(l.indexOf(t));t.attributes.set("ariaChecked",h=>a.value.get(h)===u),t.addEvent("click",()=>a.value.set(u))},style:{cursor:"pointer",fontSize:t=>(0,de.themeSize)(t,"inherit"),height:(0,de.themeSpacing)(6),paddingBlock:(0,de.themeSpacing)(1),paddingInline:(0,de.themeSpacing)(3),border:"none",borderRadius:(0,de.themeSpacing)(10),color:t=>(0,de.themeColor)(t,"shift-9",o.get(t)),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:t=>(0,de.themeColor)(t,"shift-3",o.get(t))},"&[aria-checked=true]":{backgroundColor:t=>(0,de.themeColor)(t,"shift-0",n.get(t)),color:t=>(0,de.themeColor)(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${(0,de.themeSpacing)(.5)} solid ${(0,de.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:`-${(0,de.themeSpacing)(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var P=require("@domphy/theme");function Ta(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,P.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,P.themeColor)(e,"shift-9",o),backgroundColor:e=>(0,P.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,P.themeColor)(e,"shift-4",o)}`,borderRadius:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*1),paddingBlock:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*1),paddingLeft:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*3),paddingRight:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*5),backgroundImage:e=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,P.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,P.themeSpacing)(2)} center`,backgroundSize:`${(0,P.themeSpacing)(2.5)} ${(0,P.themeSpacing)(1.5)}`,"&:not([multiple])":{height:e=>(0,P.themeSpacing)(6+(0,P.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${(0,P.themeSpacing)(.5)} solid ${(0,P.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{outline:e=>`${(0,P.themeSpacing)(.5)} solid ${(0,P.themeColor)(e,"shift-6",n)}`},"& optgroup":{color:e=>(0,P.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,P.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,P.themeColor)(e,"shift-8","neutral"),outline:e=>`1px solid ${(0,P.themeColor)(e,"shift-4","neutral")}`,backgroundColor:e=>(0,P.themeColor)(e,"shift-2","neutral")}}}}var nt=require("@domphy/core"),se=require("@domphy/theme");function Pa(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=r,a=(0,nt.toState)(r.value),s=(0,nt.toState)(i),{show:l,hide:u,anchorPartial:c}=De({open:s,placement:(0,nt.toState)(n),content:r.content}),m={onClick:()=>!t&&u()};(0,nt.merge)(r.content,m);let h={div:f=>{let S=a.get(f),g=Array.isArray(S)?S:[S];return o.filter(b=>g.includes(b.value)).map(b=>({span:b.label,$:[dt({color:e,removable:t})],_key:b.value,_onRemove:z=>{let O=a.get(),We=(Array.isArray(O)?O:[O]).filter(Xe=>Xe!==b.value);t?a.set(We):a.set(We[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:(0,se.themeSpacing)(1),flex:1}},d={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(h),onClick:()=>s.get()?u():l(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>(0,se.themeSpacing)(6+(0,se.themeDensity)(f)*2),minWidth:(0,se.themeSpacing)(32),outlineOffset:"-1px",outline:f=>`1px solid ${(0,se.themeColor)(f,"shift-4","neutral")}`,paddingInline:f=>(0,se.themeSpacing)((0,se.themeDensity)(f)*2),borderRadius:f=>(0,se.themeSpacing)((0,se.themeDensity)(f)*1),fontSize:f=>(0,se.themeSize)(f,"inherit"),color:f=>(0,se.themeColor)(f,"shift-9",e),backgroundColor:f=>(0,se.themeColor)(f,"inherit",e)}};return(0,nt.merge)(c,d),c}var le=require("@domphy/theme");function Oa(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",l=>{let u=s.get(l);return a.multiple?u.includes(e):u===e}),t.addEvent("click",()=>{let l=s.get();a.multiple?l.includes(e)?s.set(l.filter(u=>u!==e)):s.set(l.concat([e])):l!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,le.themeSize)(t,"inherit"),height:t=>(0,le.themeSpacing)(6+(0,le.themeDensity)(t)*2),paddingInline:t=>(0,le.themeSpacing)((0,le.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,le.themeColor)(t,"shift-9",n),backgroundColor:t=>(0,le.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,le.themeColor)(t,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,le.themeColor)(t,"shift-6",o),color:t=>(0,le.themeColor)(t,"shift-11")},"&:focus-visible":{outline:t=>`${(0,le.themeSpacing)(.5)} solid ${(0,le.themeColor)(t,"shift-6",o)}`,outlineOffset:`-${(0,le.themeSpacing)(.5)}`}}}}var Sn=require("@domphy/core"),Ve=require("@domphy/theme");function Da(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,Sn.toState)((a=r.value)!=null?a:n?[]:null),i={div:s=>{let l=e.get(s);return(Array.isArray(l)?l:[l]).map(c=>({input:null,name:r.name,value:c==null?"":String(c)}))},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(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(s)*2),paddingInline:s=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(s)*2),fontSize:s=>(0,Ve.themeSize)(s,"inherit"),backgroundColor:s=>(0,Ve.themeColor)(s,"inherit",o)}}}var It=require("@domphy/core"),Ue=require("@domphy/theme");function $a(r={}){var i;let o=(0,It.toState)((i=r.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=(0,It.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>(0,Ue.themeSize)(t),color:t=>(0,Ue.themeColor)(t,"shift-9",o.get(t)),height:(0,Ue.themeSpacing)(6),display:"block",borderRadius:(0,Ue.themeSpacing)(1),backgroundColor:t=>(0,Ue.themeColor)(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var Cn=require("@domphy/core"),zt=require("@domphy/theme");function Ia(r={}){var n;let o=(0,Cn.toState)((n=r.color)!=null?n:"neutral","color");return{dataSize:"decrease-1",style:{fontSize:e=>(0,zt.themeSize)(e,"inherit"),color:e=>(0,zt.themeColor)(e,"shift-9",o.get(e))}}}var Vt=require("@domphy/core"),we=require("@domphy/theme"),En={to:{transform:"rotate(360deg)"}},vn=(0,Vt.hashString)(JSON.stringify(En));function za(r={}){var n;let o=(0,Vt.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,we.themeSize)(e),backgroundColor:e=>(0,we.themeColor)(e),color:e=>(0,we.themeColor)(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,we.themeSpacing)(6),height:(0,we.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,we.themeSpacing)(.5)} solid ${(0,we.themeColor)(e,"shift-4",o.get(e))}`,borderTopColor:e=>(0,we.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${vn} 0.7s linear infinite`,[`@keyframes ${vn}`]:En}}}var Lt=require("@domphy/core"),Ke=require("@domphy/theme");function Va(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:i=90}=r;return{_onSchedule:(t,a)=>{(0,Lt.merge)(a,{_context:{splitter:{direction:o,size:(0,Lt.toState)(n),min:e,max:i}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function La(){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";n.style[e]=`${o.size.get()}%`,n.style.flexShrink="0",n.style.overflow="auto";let i=o.size.addListener(t=>{n.style[e]=`${t}%`});r.addHook("Remove",i)}}}function Ma(){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 i=o.size.addListener(l=>{n.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let u=l.shiftKey?10:1,c=null;e?l.key==="ArrowRight"?c=Math.min(o.size.get()+u,o.max):l.key==="ArrowLeft"&&(c=Math.max(o.size.get()-u,o.min)):l.key==="ArrowDown"?c=Math.min(o.size.get()+u,o.max):l.key==="ArrowUp"&&(c=Math.max(o.size.get()-u,o.min)),l.key==="Home"?c=o.min:l.key==="End"&&(c=o.max),c!==null&&(l.preventDefault(),o.size.set(c))},a=null,s=l=>{l.preventDefault();let u=n.parentElement,c=h=>{let d=u.getBoundingClientRect(),f=e?(h.clientX-d.left)/d.width*100:(h.clientY-d.top)/d.height*100;o.size.set(Math.min(Math.max(f,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",c),document.addEventListener("mouseup",m)};n.addEventListener("keydown",t),n.addEventListener("mousedown",s),r.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,Ke.themeColor)(r,"shift-2"),"&:hover":{backgroundColor:r=>(0,Ke.themeColor)(r,"shift-3")},"&:focus-visible":{outline:r=>`2px solid ${(0,Ke.themeColor)(r,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:(0,Ke.themeSpacing)(1),height:(0,Ke.themeSpacing)(1),borderRadius:(0,Ke.themeSpacing)(999),backgroundColor:r=>(0,Ke.themeColor)(r,"shift-4")}}}}var V=require("@domphy/theme");function Ra(){let r="neutral",o="primary";return{_onInsert:n=>{var s,l;let e=n.getContext("steps");if(!e){console.warn('"stepItem" patch must be used inside a "steps"');return}r=e.color,o=e.accentColor;let a=((l=(s=n.parent)==null?void 0:s.children.items)!=null?l:[]).filter(u=>u.type==="ElementNode").indexOf(n);n.domElement&&(n.domElement.dataset.step=String(a+1)),n.attributes.set("dataStatus",u=>{let c=e.current.get(u);return a<c?"done":a===c?"active":"pending"}),n.attributes.set("ariaCurrent",u=>e.current.get(u)===a?"step":void 0)},style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:(0,V.themeSpacing)(1),flex:"1",fontSize:n=>(0,V.themeSize)(n,"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:n=>(0,V.themeSize)(n,"decrease-1"),fontWeight:"600",flexShrink:"0",border:n=>`2px solid ${(0,V.themeColor)(n,"shift-4",r)}`,backgroundColor:n=>(0,V.themeColor)(n,"inherit"),color:n=>(0,V.themeColor)(n,"shift-8"),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:n=>(0,V.themeColor)(n,"shift-3",r),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:n=>(0,V.themeColor)(n,"shift-6",o),borderColor:n=>(0,V.themeColor)(n,"shift-6",o),color:n=>(0,V.themeColor)(n,"shift-15",o)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:n=>(0,V.themeColor)(n,"shift-3",r),borderColor:n=>(0,V.themeColor)(n,"shift-3",r),color:n=>(0,V.themeColor)(n,"shift-9",r)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:n=>(0,V.themeColor)(n,"shift-3",r)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:n=>(0,V.themeColor)(n,"shift-6",o)},"&[data-status=pending]":{color:n=>(0,V.themeColor)(n,"shift-7")},"&[data-status=active]":{color:n=>(0,V.themeColor)(n,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:n=>(0,V.themeColor)(n,"shift-8")}}}}var Mt=require("@domphy/core"),xn=require("@domphy/theme");function _a(r={}){var t,a,s;let o=(t=r.direction)!=null?t:"horizontal",n=(a=r.color)!=null?a:"neutral",e=(s=r.accentColor)!=null?s:"primary";return{_onSchedule:(l,u)=>{var m;let c={_context:{steps:{current:(0,Mt.toState)((m=r.current)!=null?m:0),direction:o,color:n,accentColor:e}}};(0,Mt.merge)(u,c)},style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:(0,xn.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}}}var kn=require("@domphy/core"),yt=require("@domphy/theme");function Na(r={}){var n;let o=(0,kn.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,yt.themeSize)(e,"inherit"),fontWeight:700,color:e=>(0,yt.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,yt.themeColor)(e)}}}var wn=require("@domphy/core"),Rt=require("@domphy/theme");function Ha(r={}){var n;let o=(0,wn.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,Rt.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,Rt.themeColor)(e,"shift-9",o.get(e))}}}var Tn=require("@domphy/core"),_t=require("@domphy/theme");function Aa(r={}){var n;let o=(0,Tn.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,_t.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,_t.themeColor)(e,"shift-9",o.get(e))}}}var J=require("@domphy/theme");function Ba(r={}){let{accentColor:o="primary",color:n="neutral"}=r;return{role:"tab",_onInsert:i=>{var u,c;i.tagName!=="button"&&console.warn('"tab" patch must use button tag');let t=i.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(c=(u=i.parent)==null?void 0:u.children.items)!=null?c:[];a=a.filter(m=>m.type==="ElementNode"&&m.attributes.get("role")==="tab");let s=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i),l={id:`tab${i.parent.nodeId}${s}`,ariaControls:`tabpanel${i.parent.nodeId}${s}`,ariaSelected:m=>t.activeKey.get(m)===s,onClick:()=>t.activeKey.set(s),onKeyDown:m=>{var E,b,z,O;let h=m.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(h))return;m.preventDefault();let d=((b=(E=i.parent)==null?void 0:E.children.items)!=null?b:[]).filter(w=>w.type==="ElementNode"&&w.attributes.get("role")==="tab");if(!d.length)return;let f=d.indexOf(i),S=f;h==="ArrowRight"?S=(f+1)%d.length:h==="ArrowLeft"?S=(f-1+d.length)%d.length:h==="Home"?S=0:h==="End"&&(S=d.length-1);let g=d[S];t.activeKey.set((z=g.key)!=null?z:S),(O=g.domElement)==null||O.focus()}};i.merge(l)},style:{cursor:"pointer",fontSize:i=>(0,J.themeSize)(i,"inherit"),height:i=>(0,J.themeSpacing)(6+(0,J.themeDensity)(i)*2),paddingInline:i=>(0,J.themeSpacing)((0,J.themeDensity)(i)*4),border:"none",outline:"none",color:i=>(0,J.themeColor)(i,"shift-9"),backgroundColor:i=>(0,J.themeColor)(i,"inherit"),boxShadow:i=>`inset 0 -${(0,J.themeSpacing)(.5)} 0 0 ${(0,J.themeColor)(i,"shift-1",n)}`,"&:hover:not([disabled])":{boxShadow:i=>`inset 0 -${(0,J.themeSpacing)(.5)} 0 0 ${(0,J.themeColor)(i,"shift-2",n)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:i=>`inset 0 -${(0,J.themeSpacing)(.5)} 0 0 ${(0,J.themeColor)(i,"shift-6",o)}`},"&:focus-visible":{boxShadow:i=>`inset 0 -${(0,J.themeSpacing)(.5)} 0 0 ${(0,J.themeColor)(i,"shift-6",o)}`}}}}var Pn=require("@domphy/core"),I=require("@domphy/theme");function Fa(r={}){var n;let o=(0,Pn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>(0,I.themeSize)(e,"inherit"),color:e=>(0,I.themeColor)(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,I.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,I.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,I.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,I.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,I.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,I.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>`${(0,I.themeColor)(e,"shift-2")}!important`}}}}var mt=require("@domphy/theme");function Ka(){return{role:"tabpanel",style:{paddingBlock:o=>(0,mt.themeSpacing)((0,mt.themeDensity)(o)*2),paddingInline:o=>(0,mt.themeSpacing)((0,mt.themeDensity)(o)*2)},_onInsert:o=>{var a,s;let n=o.getContext("tabs");if(!n){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(s=(a=o.parent)==null?void 0:a.children.items)!=null?s:[];e=e.filter(l=>l.type==="ElementNode"&&l.attributes.get("role")==="tabpanel");let i=o.key!==null&&o.key!==void 0?o.key:e.indexOf(o),t={id:`tabpanel${o.parent.nodeId}${i}`,ariaLabelledby:`tab${o.parent.nodeId}${i}`,hidden:l=>n.activeKey.get(l)!==i};o.merge(t)}}}var Nt=require("@domphy/core");function Wa(r={}){return{role:"tablist",ariaOrientation:"horizontal",_onSchedule:(n,e)=>{var t;let i={_context:{tabs:{activeKey:(0,Nt.toState)((t=r.activeKey)!=null?t:0)}}};(0,Nt.merge)(e,i)}}}var ho=require("@domphy/core"),H=require("@domphy/theme");function ja(r={}){var i,t;let o=(0,ho.toState)((i=r.color)!=null?i:"neutral","color"),n=(0,ho.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 l=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",l),l(),a.addHook("Remove",()=>s.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*2),paddingBlock:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*1.5),fontSize:a=>(0,H.themeSize)(a,"inherit"),color:a=>(0,H.themeColor)(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,H.themeColor)(a,"shift-4",o.get(a))}`,backgroundColor:a=>(0,H.themeColor)(a,"inherit",o.get(a)),"&::placeholder":{color:a=>(0,H.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,H.themeColor)(a,"shift-8","neutral"),outline:a=>`1px solid ${(0,H.themeColor)(a,"shift-4","neutral")}`,backgroundColor:a=>(0,H.themeColor)(a,"shift-2","neutral")}}}}var On=require("@domphy/core"),Te=require("@domphy/theme");function Ya(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function qa(r={}){var t,a,s;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",i=(0,On.toState)((s=r.active)!=null?s:!1);return{style:it({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>(0,Te.themeSpacing)((0,Te.themeDensity)(l)*2),paddingBottom:l=>o?"0":(0,Te.themeSpacing)((0,Te.themeDensity)(l)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:l=>(0,Te.themeColor)(l,"shift-8",i.get(l)?e:n),opacity:l=>i.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${(0,Te.themeSpacing)((0,Te.themeDensity)(l)*4)}`,width:"2px",backgroundColor:l=>(0,Te.themeColor)(l,"shift-3",n)}})}}var Dn=require("@domphy/core"),Z=require("@domphy/theme");function Ga(r={}){let{position:o="top-center",color:n="neutral"}=r,e=(0,Dn.toState)(!1),i=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:(0,Z.themeSpacing)(4),zIndex:30,padding:(0,Z.themeSpacing)(6),pointerEvents:"none"}};return{_portal:l=>{let u=l.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=l.children.insert(s).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,Z.themeSpacing)(32),pointerEvents:"auto",paddingBlock:l=>(0,Z.themeSpacing)((0,Z.themeDensity)(l)*2),paddingInline:l=>(0,Z.themeSpacing)((0,Z.themeDensity)(l)*4),borderRadius:l=>(0,Z.themeSpacing)((0,Z.themeDensity)(l)*2),fontSize:l=>(0,Z.themeSize)(l,"inherit"),color:l=>(0,Z.themeColor)(l,"shift-9",n),backgroundColor:l=>(0,Z.themeColor)(l,"inherit",n),boxShadow:l=>`0 ${(0,Z.themeSpacing)(2)} ${(0,Z.themeSpacing)(9)} ${(0,Z.themeColor)(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,u)=>{let c=!1,m=null,h=()=>{c||(c=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",d),u())},d=f=>{f.propertyName==="transform"&&h()};l.domElement.addEventListener("transitionend",d),m=setTimeout(h,350),l.addHook("Remove",()=>{var f;m&&(clearTimeout(m),m=null),(f=l.domElement)==null||f.removeEventListener("transitionend",d)}),e.set(!1)}}}var fo=require("@domphy/core"),ce=require("@domphy/theme");function Ua(r={}){var e,i;let o=(0,fo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,fo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=t.getContext("toggleGroup");if(!a){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let l=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="button"),u=t.key!==null&&t.key!==void 0?String(t.key):String(l.indexOf(t));t.attributes.set("ariaPressed",h=>{let d=a.value.get(h);return Array.isArray(d)?d.includes(u):d===u}),t.addEvent("click",()=>{let h=a.value.get();if(a.multiple){let d=Array.isArray(h)?[...h]:[];a.value.set(d.includes(u)?d.filter(f=>f!==u):[...d,u])}else a.value.set(h===u?"":u)})},style:{cursor:"pointer",fontSize:t=>(0,ce.themeSize)(t,"inherit"),height:(0,ce.themeSpacing)(6),paddingBlock:(0,ce.themeSpacing)(1),paddingInline:(0,ce.themeSpacing)(2),border:"none",borderRadius:(0,ce.themeSpacing)(1),color:t=>(0,ce.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,ce.themeColor)(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,ce.themeColor)(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>(0,ce.themeColor)(t,"shift-3",n.get(t)),color:t=>(0,ce.themeColor)(t,"shift-12",n.get(t))},"&:focus-visible":{outline:t=>`${(0,ce.themeSpacing)(.5)} solid ${(0,ce.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:`-${(0,ce.themeSpacing)(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var $n=require("@domphy/core"),Le=require("@domphy/theme");function Xa(r={}){var e;let{multiple:o=!1,color:n="neutral"}=r;return{role:"group",_context:{toggleGroup:{value:(0,$n.toState)((e=r.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:(0,Le.themeSpacing)(1),paddingInline:(0,Le.themeSpacing)(1),gap:(0,Le.themeSpacing)(1),borderRadius:(0,Le.themeSpacing)(2),fontSize:i=>(0,Le.themeSize)(i,"inherit"),backgroundColor:i=>(0,Le.themeColor)(i,"inherit",n),outline:i=>`1px solid ${(0,Le.themeColor)(i,"shift-3",n)}`,outlineOffset:"-1px"}}}var Ht=require("@domphy/theme");function Ja(r={}){var n;let o=(n=r.gap)!=null?n:4;return{style:{display:"flex",alignItems:"center",gap:e=>(0,Ht.themeSpacing)((0,Ht.themeDensity)(e)*o)}}}function Za(){return{div:null,style:{flex:"1 1 0"}}}var bt=require("@domphy/core"),be=require("@domphy/theme");function Qa(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,i=(0,bt.toState)(n),t=(0,bt.toState)(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:d=>t.get(d),id:a},{show:l,hide:u,anchorPartial:c}=De({open:o,placement:i,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>(0,be.themeSpacing)((0,be.themeDensity)(d)*1),paddingInline:d=>(0,be.themeSpacing)((0,be.themeDensity)(d)*3),borderRadius:d=>(0,be.themeSpacing)((0,be.themeDensity)(d)*1),color:d=>(0,be.themeColor)(d,"shift-9"),backgroundColor:d=>(0,be.themeColor)(d),fontSize:d=>(0,be.themeSize)(d,"inherit")},$:[mo({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),(0,bt.merge)(c,{ariaDescribedby:a,onMouseEnter:()=>l(),onMouseLeave:()=>u(),onFocus:()=>l(),onBlur:()=>u(),onKeyDown:d=>d.key==="Escape"&&u()}),c}var go=require("@domphy/core");function In(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function ei(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let l of Array.from(i.values()))l();i.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of a)cancelAnimationFrame(l);a.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((l,u)=>{if(!(l instanceof go.ElementNode))return;let c=l.domElement;c&&e.set(In(l,u),c.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((l,u)=>{var w;if(!(l instanceof go.ElementNode))return;let c=l.domElement;if(!c)return;let m=In(l,u),h=e.get(m);if(!h)return;let d=c.getBoundingClientRect(),f=h.left-d.left,S=h.top-d.top;if(Math.abs(f)<.5&&Math.abs(S)<.5)return;(w=i.get(c))==null||w(),c.style.transition="none",c.style.transform=`translate(${f}px, ${S}px)`,c.getBoundingClientRect();let g=requestAnimationFrame(()=>{a.delete(g),c.style.transition=`transform ${o}ms ease ${n}ms`,c.style.transform="translate(0px, 0px)"});a.add(g);let E=!1,b=null,z=()=>{E||(E=!0,b&&(t.delete(b),b=null),i.delete(c),c.removeEventListener("transitionend",O),c.style.transition="",c.style.transform="")},O=We=>{We.propertyName==="transform"&&z()};i.set(c,()=>{E=!0,b&&(clearTimeout(b),t.delete(b),b=null),i.delete(c),c.removeEventListener("transitionend",O)}),c.addEventListener("transitionend",O),b=setTimeout(z,o+n+34),t.add(b)}),e.clear()}}}var zn=require("@domphy/core"),rt=require("@domphy/theme");function ti(r={}){var n;let o=(0,zn.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,rt.themeSize)(e,"inherit"),backgroundColor:e=>(0,rt.themeColor)(e),color:e=>(0,rt.themeColor)(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,rt.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,menuItem,motion,orderedList,pagination,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,scrollArea,segmented,segmentedItem,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stepItem,steps,strong,subscript,superscript,tab,tabPanel,table,tabs,tag,textarea,timeline,timelineItem,toast,toggle,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList});
|
|
1
|
+
"use strict";var Ct=Object.defineProperty,Un=Object.defineProperties,Xn=Object.getOwnPropertyDescriptor,Jn=Object.getOwnPropertyDescriptors,Zn=Object.getOwnPropertyNames,To=Object.getOwnPropertySymbols;var Oo=Object.prototype.hasOwnProperty,Qn=Object.prototype.propertyIsEnumerable;var Po=(r,o,n)=>o in r?Ct(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,at=(r,o)=>{for(var n in o||(o={}))Oo.call(o,n)&&Po(r,n,o[n]);if(To)for(var n of To(o))Qn.call(o,n)&&Po(r,n,o[n]);return r},Do=(r,o)=>Un(r,Jn(o));var er=(r,o)=>{for(var n in o)Ct(r,n,{get:o[n],enumerable:!0})},tr=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Zn(o))!Oo.call(r,i)&&i!==n&&Ct(r,i,{get:()=>o[i],enumerable:!(e=Xn(o,i))||e.enumerable});return r};var or=r=>tr(Ct({},"__esModule",{value:!0}),r);var oi={};er(oi,{abbreviation:()=>nr,accordion:()=>rr,alert:()=>ar,avatar:()=>ir,badge:()=>lr,blockquote:()=>sr,breadcrumb:()=>cr,breadcrumbEllipsis:()=>mr,button:()=>ur,buttonGhost:()=>dr,buttonSwitch:()=>pr,card:()=>hr,code:()=>fr,combobox:()=>yr,command:()=>br,commandItem:()=>Cr,commandSearch:()=>Sr,datePicker:()=>Er,descriptionList:()=>wr,details:()=>Tr,dialog:()=>Pr,divider:()=>Or,drawer:()=>Dr,emphasis:()=>$r,empty:()=>Ir,errorBoundary:()=>zr,fab:()=>Lr,figure:()=>Mr,formGroup:()=>Rr,heading:()=>Nr,horizontalRule:()=>Hr,icon:()=>Ar,image:()=>Br,inputCheckbox:()=>Fr,inputColor:()=>Kr,inputDateTime:()=>Wr,inputFile:()=>jr,inputNumber:()=>Yr,inputOTP:()=>Ur,inputPassword:()=>Gr,inputRadio:()=>Xr,inputRange:()=>Jr,inputSearch:()=>Zr,inputSwitch:()=>Qr,inputText:()=>ea,keyboard:()=>ta,label:()=>oa,link:()=>na,linkButton:()=>ra,list:()=>aa,listItem:()=>ia,listItemButton:()=>la,mark:()=>sa,menu:()=>ca,menuItem:()=>ma,motion:()=>ua,orderedList:()=>da,pagination:()=>ha,paragraph:()=>fa,popover:()=>ga,popoverArrow:()=>mo,preformated:()=>ya,progress:()=>ba,rating:()=>va,ringProgress:()=>Ea,scrollArea:()=>xa,segmented:()=>ka,segmentedItem:()=>wa,select:()=>Ta,selectBox:()=>Pa,selectItem:()=>Oa,selectList:()=>Da,skeleton:()=>$a,small:()=>Ia,spinner:()=>za,splitter:()=>Va,splitterHandle:()=>Ma,splitterPanel:()=>La,stepItem:()=>Ra,steps:()=>_a,strong:()=>Na,subscript:()=>Ha,superscript:()=>Aa,tab:()=>Ba,tabPanel:()=>Ka,table:()=>Fa,tabs:()=>Wa,tag:()=>ut,textarea:()=>ja,timeline:()=>Ya,timelineItem:()=>qa,toast:()=>Ga,toggle:()=>Ua,toggleGroup:()=>Xa,toolbar:()=>Ja,toolbarSpacer:()=>Za,tooltip:()=>Qa,transitionGroup:()=>ei,unorderedList:()=>ti});module.exports=or(oi);var Kt=require("@domphy/core"),Pe=require("@domphy/theme");function nr(r={}){var e,i;let o=(0,Kt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Kt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Pe.themeSize)(t),backgroundColor:t=>(0,Pe.themeColor)(t),color:t=>(0,Pe.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Pe.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,Pe.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Pe.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,Pe.themeColor)(t,"shift-9",n.get(t))}}}}var Wt=require("@domphy/core"),Me=require("@domphy/theme");function rr(r={}){var i,t;let{type:o="single"}=r,n=(0,Wt.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Wt.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let s=a.domElement;if(!s)return;let l=u=>{let c=u.target.closest("summary");if(!c)return;let m=c.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(h=>{h!==m&&(h.open=!1)})};s.addEventListener("click",l),a.addHook("Remove",()=>s.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,Me.themeSpacing)((0,Me.themeDensity)(a)*1),outline:a=>`1px solid ${(0,Me.themeColor)(a,"shift-4",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,Me.themeColor)(a,"shift-4",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${(0,Me.themeSpacing)(.5)} solid ${(0,Me.themeColor)(a,"shift-6",e.get(a))}`}}}}var $o=require("@domphy/core"),he=require("@domphy/theme");function ar(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,he.themeSpacing)(3),paddingBlock:e=>(0,he.themeSpacing)((0,he.themeDensity)(e)*2),paddingInline:e=>(0,he.themeSpacing)((0,he.themeDensity)(e)*4),boxShadow:e=>`inset ${(0,he.themeSpacing)(1)} 0 0 0 ${(0,he.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,he.themeColor)(e,"inherit",o.get(e)),color:e=>(0,he.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,he.themeSize)(e,"inherit")}}}var Io=require("@domphy/core"),Ye=require("@domphy/theme");function ir(r={}){var n;let o=(0,Io.toState)((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,Ye.themeSpacing)(9),height:(0,Ye.themeSpacing)(9),fontSize:e=>(0,Ye.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,Ye.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Ye.themeColor)(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var jt=require("@domphy/core"),Re=require("@domphy/theme");function lr(r={}){var i;let{label:o=999}=r,n=(0,jt.toState)(o),e=(0,jt.toState)((i=r.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:(0,Re.themeSpacing)(1),minWidth:(0,Re.themeSpacing)(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Re.themeSize)(t,"decrease-1"),borderRadius:(0,Re.themeSpacing)(999),backgroundColor:t=>(0,Re.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Re.themeColor)(t,"shift-0",e.get(t))}}}}var zo=require("@domphy/core"),Ce=require("@domphy/theme");function sr(r={}){var n;let o=(0,zo.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,Ce.themeSize)(e,"inherit"),backgroundColor:e=>(0,Ce.themeColor)(e,"inherit",o.get(e)),boxShadow:e=>`inset ${(0,Ce.themeSpacing)(1)} 0 0 0 ${(0,Ce.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(e)*2),paddingInline:e=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(e)*4),margin:0}}}var Vo=require("@domphy/core"),xe=require("@domphy/theme");function cr(r={}){var e;let{separator:o="/"}=r,n=(0,Vo.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>(0,xe.themeSize)(i,"inherit"),gap:(0,xe.themeSpacing)(1),color:i=>(0,xe.themeColor)(i,"shift-9",n.get(i)),backgroundColor:i=>(0,xe.themeColor)(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>(0,xe.themeColor)(i,"shift-8",n.get(i))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:i=>(0,xe.themeColor)(i,"shift-4",n.get(i)),paddingInlineStart:(0,xe.themeSpacing)(1)},"& > [aria-current=page]":{color:i=>(0,xe.themeColor)(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}var Lo=require("@domphy/core"),ve=require("@domphy/theme");function mr(r={}){var n;let o=(0,Lo.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,ve.themeSize)(e,"inherit"),paddingInline:(0,ve.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,ve.themeColor)(e,"shift-8",o.get(e)),borderRadius:(0,ve.themeSpacing)(1),"&:hover":{color:e=>(0,ve.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,ve.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${(0,ve.themeSpacing)(.5)} solid ${(0,ve.themeColor)(e,"shift-6",o.get(e))}`,outlineOffset:(0,ve.themeSpacing)(.5)}}}}var Mo=require("@domphy/core"),A=require("@domphy/theme");function ur(r={}){var n;let o=(0,Mo.toState)((n=r.color)!=null?n:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>(0,A.themeSize)(e,"inherit"),paddingBlock:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),paddingInline:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*3),borderRadius:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-4",o.get(e))}`,color:e=>(0,A.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,A.themeColor)(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>(0,A.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,A.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,A.themeSpacing)(.5)} ${(0,A.themeColor)(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,A.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-4","neutral")}`,color:e=>(0,A.themeColor)(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Ro=require("@domphy/core"),X=require("@domphy/theme");function dr(r={}){var n;let o=(0,Ro.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>(0,X.themeSize)(e,"inherit"),paddingBlock:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*1),paddingInline:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*1),borderRadius:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>(0,X.themeSpacing)((0,X.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>(0,X.themeColor)(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>(0,X.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,X.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,X.themeSpacing)(.5)} ${(0,X.themeColor)(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,X.themeColor)(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var vt=require("@domphy/core"),K=require("@domphy/theme");function pr(r={}){var t,a;let{checked:o=!1}=r,n=(0,vt.toState)(o),e=(0,vt.toState)((t=r.color)!=null?t:"neutral","color"),i=(0,vt.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,K.themeSize)(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${(0,K.themeColor)(s,"shift-3",e.get(s))}`,minWidth:(0,K.themeSpacing)(12),minHeight:(0,K.themeSpacing)(6),borderRadius:(0,K.themeSpacing)(999),paddingLeft:(0,K.themeSpacing)(7),paddingRight:(0,K.themeSpacing)(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>(0,K.themeColor)(s,"inherit",e.get(s)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,K.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,K.themeSpacing)(5),height:(0,K.themeSpacing)(5),borderRadius:(0,K.themeSpacing)(999),color:s=>(0,K.themeColor)(s,"shift-9"),backgroundColor:s=>(0,K.themeColor)(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>(0,K.themeColor)(s,"increase-3",i.get(s)),outline:"none",color:s=>(0,K.themeColor)(s,"decrease-2"),paddingLeft:(0,K.themeSpacing)(2),paddingRight:(0,K.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,K.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var _o=require("@domphy/core"),L=require("@domphy/theme");function hr(r={}){var n;let o=(0,_o.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),backgroundColor:e=>(0,L.themeColor)(e,"inherit",o.get(e)),color:e=>(0,L.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,L.themeColor)(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),color:e=>(0,L.themeColor)(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),color:e=>(0,L.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,L.themeSpacing)(2),paddingBlock:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,L.themeColor)(e,"shift-3",o.get(e))}`}}}}var No=require("@domphy/core"),_e=require("@domphy/theme");function fr(r={}){var n;let o=(0,No.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,_e.themeSize)(e,"inherit"),color:e=>(0,_e.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,_e.themeColor)(e,"inherit",o.get(e)),height:(0,_e.themeSpacing)(6),paddingInline:(0,_e.themeSpacing)(1.5),borderRadius:(0,_e.themeSpacing)(1)}}}var qe=require("@domphy/core"),q=require("@domphy/theme");var Et=require("@domphy/core"),Oe=require("@domphy/floating");function De(r){let{open:o=!1,placement:n}=r,e=null,i=null,t=null,a=null,s=null,l=null,u=!1,c=(0,Et.toState)(o),m=()=>{u||!l||(u=!0,s=l.children.insert(r.content))},h=()=>{m(),t&&a&&(i&&i(),i=(0,Oe.autoUpdate)(t,a,()=>{(0,Oe.computePosition)(t,a,{placement:n.get(),middleware:[(0,Oe.offset)(12),(0,Oe.flip)(),(0,Oe.shift)()],strategy:"fixed"}).then(({x:b,y:z,placement:O})=>{Object.assign(a.style,{left:`${b}px`,top:`${z}px`}),n.set(O)})}),c.set(!0))},d=()=>{i&&i(),i=null,c.set(!1)},f=()=>{e&&clearTimeout(e),e=setTimeout(h,100)},S=()=>{e&&clearTimeout(e),e=setTimeout(d,100)},g={style:{position:"fixed",pointerEvents:"auto",visibility:b=>c.get(b)?"visible":"hidden"},_onMount:b=>a=b.domElement,_portal:b=>{var O;let z=b.domElement.querySelector("#domphy-floating");if(!z){let w={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};z=b.children.insert(w).domElement}if(t&&z instanceof HTMLElement&&!z.hasAttribute("data-theme")){let w=(O=t.closest("[data-theme]"))==null?void 0:O.getAttribute("data-theme");w&&z.setAttribute("data-theme",w)}return z}};return(0,Et.merge)(r.content,g),{show:f,hide:S,anchorPartial:{onKeyDown:b=>b.key==="Escape"&&S(),_onMount:b=>{l=b.getRoot(),t=b.domElement;let z=O=>{if(!c.get()||!t||!a)return;let w=O.target;!t.contains(w)&&!a.contains(w)&&S()};b.getRoot().domElement.addEventListener("click",z),b.addHook("BeforeRemove",()=>{e&&clearTimeout(e),i&&(i(),i=null),s&&s.remove(),b.getRoot().domElement.removeEventListener("click",z)})}}}}var Ho=require("@domphy/core"),oe=require("@domphy/theme"),gr='<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 ut(r={}){var e;let{removable:o=!1}=r,n=(0,Ho.toState)((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let t={span:gr,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:(0,oe.themeSpacing)(1),width:(0,oe.themeSpacing)(4),height:(0,oe.themeSpacing)(4),flexShrink:0,"&:hover":{backgroundColor:a=>(0,oe.themeColor)(a,"shift-4",n.get(a))}}};o&&i.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:(0,oe.themeSpacing)(6),paddingBlock:"0px",borderRadius:(0,oe.themeSpacing)(1),paddingInlineStart:(0,oe.themeSpacing)(2),paddingInlineEnd:o?(0,oe.themeSpacing)(1):(0,oe.themeSpacing)(2),gap:(0,oe.themeSpacing)(2),fontSize:i=>(0,oe.themeSize)(i,"inherit"),backgroundColor:i=>(0,oe.themeColor)(i,"inherit",n.get(i)),color:i=>(0,oe.themeColor)(i,"shift-9",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,oe.themeColor)(i,"shift-4",n.get(i))}`}}}function yr(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=r,a=(0,qe.toState)(r.value),s=(0,qe.toState)(i),{show:l,hide:u,anchorPartial:c}=De({open:s,placement:(0,qe.toState)(n),content:r.content}),m={onClick:()=>!t&&u()};(0,qe.merge)(r.content,m);let h={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,q.themeSpacing)(6),marginInlineStart:(0,q.themeSpacing)(2),fontSize:g=>(0,q.themeSize)(g,"inherit"),color:g=>(0,q.themeColor)(g,"shift-9",e),backgroundColor:g=>(0,q.themeColor)(g,"inherit",e)},d;r.input?((0,qe.merge)(r.input,{onFocus:()=>l(),style:h,_key:"combobox-input"}),d=r.input):d={input:null,onFocus:()=>l(),value:g=>(a.get(g),""),style:h,_key:"combobox-input"};let f={div:g=>{let E=a.get(g),b=Array.isArray(E)?E:[E],O=o.filter(w=>b.includes(w.value)).map(w=>({span:w.label,$:[ut({color:e,removable:!0})],_key:w.value,_onRemove:We=>{let Xe=a.get(),bt=(Array.isArray(Xe)?Xe:[Xe]).filter(mt=>mt!==w.value);t?a.set(bt):a.set(bt[0])}}));return O.push(d),O},style:{display:"flex",flexWrap:"wrap",gap:(0,q.themeSpacing)(1)}},S={_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:g=>g.children.insert(f),style:{minWidth:(0,q.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,q.themeColor)(g,"shift-4","neutral")}`,paddingBlock:g=>(0,q.themeSpacing)((0,q.themeDensity)(g)*1),paddingInline:g=>(0,q.themeSpacing)((0,q.themeDensity)(g)*1),borderRadius:g=>(0,q.themeSpacing)((0,q.themeDensity)(g)*1),fontSize:g=>(0,q.themeSize)(g,"inherit"),color:g=>(0,q.themeColor)(g,"shift-9",e),backgroundColor:g=>(0,q.themeColor)(g,"inherit",e)}};return(0,qe.merge)(c,S),c}var xt=require("@domphy/core"),R=require("@domphy/theme");function br(){return{_onSchedule:(r,o)=>{(0,xt.merge)(o,{_context:{command:{query:(0,xt.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Sr(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 i=e.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>i.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,R.themeSize)(e,"inherit"),paddingInline:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*3),paddingBlock:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,R.themeColor)(e,"shift-3",o)}`,outline:"none",color:e=>(0,R.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,R.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,R.themeColor)(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>(0,R.themeColor)(e,"shift-6",n)}}}}function Cr(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{role:"option",_onMount:e=>{var u,c;let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(c=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?c:"",s=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};s(i.query.get());let l=i.query.addListener(s);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,R.themeSize)(e,"inherit"),height:e=>(0,R.themeSpacing)(6+(0,R.themeDensity)(e)*2),paddingInline:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,R.themeColor)(e,"shift-9",o),backgroundColor:e=>(0,R.themeColor)(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>(0,R.themeColor)(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${(0,R.themeSpacing)(.5)} solid ${(0,R.themeColor)(e,"shift-6",n)}`,outlineOffset:`-${(0,R.themeSpacing)(.5)}`}}}}var Ee=require("@domphy/core"),C=require("@domphy/theme");var Q=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),Je=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Yt=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),dt=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),qt=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Gt=(r,o)=>Je(r,-((r.getDay()-o+7)%7));function vr(r){var o,n;try{let e=new Intl.Locale(r),i=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function Er(r={}){var Eo,xo,ko,wo;let{mode:o="single",time:n=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:l}=r,u=(Eo=r.weekStartsOn)!=null?Eo:vr(a),c=(0,Ee.toState)((xo=r.accentColor)!=null?xo:"primary","accentColor"),m=(0,Ee.toState)((ko=r.placement)!=null?ko:"bottom-start"),h=(0,Ee.toState)((wo=r.value)!=null?wo:o==="range"?[null,null]:null),d=l?h.addListener(p=>l(p)):null,f=(()=>{let p=h.get(),y=o==="range"?p==null?void 0:p[0]:p;return y instanceof Date?y:new Date})(),S=(0,Ee.toState)(f.getFullYear(),"viewYear"),g=(0,Ee.toState)(f.getMonth(),"viewMonth"),E=(0,Ee.toState)(Q(f),"focused"),b=(0,Ee.toState)(null,"hovered"),z=(0,Ee.toState)(f.getHours(),"hour"),O=(0,Ee.toState)(f.getMinutes(),"minute"),w=null,We=new Intl.DateTimeFormat(a,at({dateStyle:"medium"},n?{timeStyle:"short"}:{})),Xe=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),yo=new Intl.DateTimeFormat(a,{weekday:"short"}),bt=new Intl.DateTimeFormat(a,{dateStyle:"full"}),mt=p=>p?We.format(p):"",Vn=p=>{if(s)return s(p);if(o==="range"){let[y,v]=p!=null?p:[null,null];return y?`${mt(y)} \u2013 ${mt(v)}`:""}return mt(p)},Ln=Array.from({length:7},(p,y)=>yo.format(new Date(2023,0,1+(y+u)%7))),bo=p=>!!e&&Q(p)<Q(e)||!!i&&Q(p)>Q(i)||!!t&&t(p),je=p=>{if(!n)return Q(p);let y=Q(p);return y.setHours(z.get(),O.get(),0,0),y},So=p=>{var x;if(bo(p))return;if(o==="single"){h.set(je(p)),n||Bt();return}let[y,v]=(x=h.get())!=null?x:[null,null];!y||y&&v?h.set([je(p),null]):Q(p)<Q(y)?(h.set([je(p),je(y)]),n||Bt()):(h.set([y,je(p)]),n||Bt())},Mn=()=>{var p;if(n)if(o==="single"){let y=h.get();y&&h.set(je(y))}else{let[y,v]=(p=h.get())!=null?p:[null,null];h.set([y&&je(y),v&&je(v)])}},Rn=(p,y)=>{var rt;if(o!=="range")return!1;let[v,x]=(rt=h.get(y))!=null?rt:[null,null],F=x!=null?x:b.get(y);if(!v||!F)return!1;let T=Q(v)<=Q(F)?v:F,Se=Q(v)<=Q(F)?F:v,pe=Q(p);return pe>=Q(T)&&pe<=Q(Se)},_n=(p,y)=>{let v=h.get(y);if(o==="range"){let[x,F]=v!=null?v:[null,null];return dt(p,x)||dt(p,F)}return dt(p,v)},St=p=>{S.set(p.getFullYear()),g.set(p.getMonth())},Co=p=>{let y=Yt(new Date(S.get(),g.get(),1),p);St(y)},vo=p=>S.set(S.get()+p),Ht=()=>{setTimeout(()=>{var p;(p=w==null?void 0:w.querySelector(`[data-date="${qt(E.get())}"]`))==null||p.focus()},0)},Nn=Kn(),{show:Hn,hide:An,anchorPartial:At}=De({open:!1,placement:m,content:Nn});function Bt(){An()}At.onClick=()=>{};let Bn={type:"text",readonly:!0,value:p=>Vn(h.get(p)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:()=>{Ft()},onFocus:()=>{Ft()},onKeyDown:p=>{let y=p.key;(y==="ArrowDown"||y==="Enter")&&(p.preventDefault(),Ft())},_onMount:p=>d&&p.addHook("Remove",()=>{d()})};function Ft(){var y;let p=(y=Fn())!=null?y:new Date;E.set(Q(p)),St(p),Hn(),Ht()}function Fn(){var y;let p=h.get();return o==="range"?(y=p==null?void 0:p[0])!=null?y:null:p!=null?p:null}return(0,Ee.merge)(At,Bn),At;function Kn(){let p=(T,Se,pe)=>({button:T,type:"button",ariaLabel:Se,onClick:pe,style:xr()}),y={div:[p("\xAB","Previous year",()=>vo(-1)),p("\u2039","Previous month",()=>Co(-1)),{div:T=>Xe.format(new Date(S.get(T),g.get(T),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:T=>(0,C.themeSize)(T)}},p("\u203A","Next month",()=>Co(1)),p("\xBB","Next year",()=>vo(1))],style:{display:"flex",alignItems:"center",gap:(0,C.themeSpacing)(1),marginBottom:(0,C.themeSpacing)(2)}},v={div:Ln.map((T,Se)=>({div:T,style:{textAlign:"center",fontSize:pe=>(0,C.themeSize)(pe,"decrease-1"),fontWeight:"600",color:pe=>(0,C.themeColor)(pe,"shift-7"),paddingBlock:(0,C.themeSpacing)(1)},_key:Se})),role:"row",style:Ao()},x={div:T=>Wn(T),role:"grid",ariaLabel:"Calendar",onKeyDown:Gn,onMouseLeave:()=>o==="range"&&b.set(null),style:{display:"flex",flexDirection:"column",gap:(0,C.themeSpacing)(.5)}},F=[y,v,x];return n&&F.push(Yn()),F.push(qn()),{div:F,role:"dialog",ariaModal:"false",_onMount:T=>{w=T.domElement},style:{minWidth:(0,C.themeSpacing)(70),padding:(0,C.themeSpacing)(3),borderRadius:(0,C.themeSpacing)(2),backgroundColor:T=>(0,C.themeColor)(T,"base"),color:T=>(0,C.themeColor)(T,"shift-10"),border:T=>`1px solid ${(0,C.themeColor)(T,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Wn(p){let y=new Date(S.get(p),g.get(p),1),v=g.get(p),x=Gt(y,u),F=[];for(let T=0;T<6;T++){let Se=[];for(let pe=0;pe<7;pe++){let rt=Je(x,T*7+pe);Se.push(jn(rt,v,p))}F.push({div:Se,role:"row",style:Ao(),_key:T})}return F}function jn(p,y,v){let x=bo(p),F=_n(p,v),T=Rn(p,v),Se=p.getMonth()!==y,pe=dt(p,E.get(v)),rt=dt(p,new Date);return{button:String(p.getDate()),type:"button",role:"gridcell",tabIndex:pe?0:-1,ariaSelected:F,ariaDisabled:x,disabled:x,ariaLabel:bt.format(p),dataDate:qt(p),onClick:()=>So(p),onMouseEnter:()=>o==="range"&&b.set(p),style:{appearance:"none",border:"none",cursor:x?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,C.themeSpacing)(1),fontSize:Y=>(0,C.themeSize)(Y),fontFamily:"inherit",opacity:x?.35:Se?.5:1,backgroundColor:Y=>F?(0,C.themeColor)(Y,"shift-7",c.get(Y)):T?(0,C.themeColor)(Y,"shift-2",c.get(Y)):"transparent",color:Y=>F?(0,C.themeColor)(Y,"shift-0",c.get(Y)):(0,C.themeColor)(Y,"shift-9"),outline:rt?Y=>`1px solid ${(0,C.themeColor)(Y,"shift-6",c.get(Y))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:Y=>F?(0,C.themeColor)(Y,"shift-7",c.get(Y)):(0,C.themeColor)(Y,"shift-3",c.get(Y))},"&:focus-visible":{outline:Y=>`2px solid ${(0,C.themeColor)(Y,"shift-6",c.get(Y))}`}},_key:qt(p)}}function Yn(){let p=(y,v,x)=>({select:Array.from({length:y},(F,T)=>({option:String(T).padStart(2,"0"),value:String(T),selected:Se=>v.get(Se)===T,_key:T})),ariaLabel:x,onChange:F=>{v.set(Number(F.target.value)),Mn()},style:kr()});return{div:[p(24,z,"Hour"),{span:":",style:{fontWeight:"600"}},p(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,C.themeSpacing)(1),marginTop:(0,C.themeSpacing)(3)}}}function qn(){let p=(y,v)=>({button:y,type:"button",onClick:v,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:x=>(0,C.themeSize)(x,"decrease-1"),color:x=>(0,C.themeColor)(x,"shift-8",c.get(x)),padding:(0,C.themeSpacing)(1)}});return{div:[p("Today",()=>{let y=new Date;E.set(Q(y)),St(y),Ht()}),p("Clear",()=>{h.set(o==="range"?[null,null]:null),b.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,C.themeSpacing)(2),paddingTop:(0,C.themeSpacing)(2),borderTop:y=>`1px solid ${(0,C.themeColor)(y,"shift-3")}`}}}function Gn(p){let y=p,v=E.get(),x=null;switch(y.key){case"ArrowLeft":x=Je(v,-1);break;case"ArrowRight":x=Je(v,1);break;case"ArrowUp":x=Je(v,-7);break;case"ArrowDown":x=Je(v,7);break;case"Home":x=Gt(v,u);break;case"End":x=Je(Gt(v,u),6);break;case"PageUp":x=Yt(v,y.shiftKey?-12:-1);break;case"PageDown":x=Yt(v,y.shiftKey?12:1);break;case"Enter":case" ":y.preventDefault(),So(v);return;default:return}y.preventDefault(),E.set(x),St(x),Ht()}}function Ao(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,C.themeSpacing)(.5)}}function xr(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,C.themeSize)(r),color:r=>(0,C.themeColor)(r,"shift-8"),width:(0,C.themeSpacing)(7),height:(0,C.themeSpacing)(7),borderRadius:(0,C.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,C.themeColor)(r,"shift-3")}}}function kr(){return{fontFamily:"inherit",fontSize:r=>(0,C.themeSize)(r),padding:(0,C.themeSpacing)(1),borderRadius:(0,C.themeSpacing)(1),border:r=>`1px solid ${(0,C.themeColor)(r,"shift-4")}`,backgroundColor:r=>(0,C.themeColor)(r,"base"),color:r=>(0,C.themeColor)(r,"shift-9")}}var Bo=require("@domphy/core"),Ne=require("@domphy/theme");function wr(r={}){var n;let o=(0,Bo.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${(0,Ne.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,Ne.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,Ne.themeSize)(e,"inherit"),color:e=>(0,Ne.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,Ne.themeSize)(e,"inherit"),color:e=>(0,Ne.themeColor)(e,"shift-9",o.get(e))}}}}var Ut=require("@domphy/core"),k=require("@domphy/theme");function Tr(r={}){var i,t;let{duration:o=240}=r,n=(0,Ut.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Ut.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>(0,k.themeSize)(a,"inherit"),color:a=>(0,k.themeColor)(a,"shift-9",n.get(a)),backgroundColor:a=>(0,k.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,k.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,k.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,k.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,k.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*4),height:(0,k.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,k.themeSpacing)(2),height:(0,k.themeSpacing)(2),flexShrink:0,marginTop:`-${(0,k.themeSpacing)(.5)}`,borderInlineEnd:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.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,k.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*2),outlineOffset:`-${(0,k.themeSpacing)(.5)}`,outline:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.themeColor)(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>(0,k.themeSpacing)((0,k.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,k.themeSpacing)(250),opacity:1,paddingTop:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*1),paddingBottom:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*3)}}}}var Ko=require("@domphy/core"),fe=require("@domphy/theme"),Fo='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function Pr(r={}){let{color:o="neutral",open:n=!1}=r,e=(0,Ko.toState)(n),i=null,t=!1;return{_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(a,s)=>{if(a.target!==s.domElement)return;let l=s.domElement.getBoundingClientRect();a.clientX>=l.left&&a.clientX<=l.right&&a.clientY>=l.top&&a.clientY<=l.bottom||e.set(!1)},onTransitionEnd:(a,s)=>{if(!t)return;t=!1,s.domElement.close(),document.body.style.overflow="",i==null||i.focus(),i=null},_onMount:a=>{let s=a.domElement;s.setAttribute("aria-modal","true");let l=null,u=d=>{if(d.key!=="Tab")return;let f=Array.from(s.querySelectorAll(Fo)).filter(E=>!E.closest("[aria-hidden='true']")&&E.offsetParent!==null);if(!f.length){d.preventDefault();return}let S=f[0],g=f[f.length-1];d.shiftKey?(document.activeElement===S||document.activeElement===s)&&(d.preventDefault(),g.focus()):document.activeElement===g&&(d.preventDefault(),S.focus())},c=d=>{d.preventDefault(),e.set(!1)};s.addEventListener("cancel",c);let m=d=>{d?(i=document.activeElement,s.showModal(),document.body.style.overflow="hidden",s.addEventListener("keydown",u),requestAnimationFrame(()=>{s.style.opacity="1";let f=s.querySelector(Fo);f==null||f.focus()})):(t=!0,s.style.opacity="0",s.removeEventListener("keydown",u),l=setTimeout(()=>{l=null,t&&(t=!1,s.close(),document.body.style.overflow="",i==null||i.focus(),i=null)},350))};m(e.get());let h=e.addListener(m);a.addHook("Remove",()=>{l&&(clearTimeout(l),l=null),h(),s.removeEventListener("cancel",c),document.body.style.overflow="",s.removeEventListener("keydown",u),i==null||i.focus(),i=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:a=>(0,fe.themeSize)(a,"inherit"),color:a=>(0,fe.themeColor)(a,"shift-10",o),backgroundColor:a=>(0,fe.themeColor)(a,"inherit",o),border:"none",padding:a=>(0,fe.themeSpacing)((0,fe.themeDensity)(a)*3),boxShadow:a=>`0 ${(0,fe.themeSpacing)(9)} ${(0,fe.themeSpacing)(16)} ${(0,fe.themeColor)(a,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:a=>(0,fe.themeColor)(a,"shift-2","neutral"),opacity:.75}}}}var Wo=require("@domphy/core"),He=require("@domphy/theme");function Or(r={}){var n;let o=(0,Wo.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,He.themeSpacing)(2),fontSize:e=>(0,He.themeSize)(e,"inherit"),backgroundColor:e=>(0,He.themeColor)(e),color:e=>(0,He.themeColor)(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,He.themeColor)(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,He.themeColor)(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var qo=require("@domphy/core"),me=require("@domphy/theme"),Xt={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},jo={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},pt=r=>r==="left"||r==="right";function Yo(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function Dr(r={}){let{color:o="neutral",open:n=!1,placement:e="end",size:i}=r,t=(0,qo.toState)(n),a=e==="start"||e==="end",s=Yo(e,!1),l=pt(s)?(0,me.themeSpacing)(80):(0,me.themeSpacing)(64),u=i!=null?i:l;return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(c,m)=>{c.target===m.domElement&&t.set(!1)},_onMount:c=>{let m=c.domElement;m.setAttribute("aria-modal","true");let h=w=>{w.preventDefault(),t.set(!1)};m.addEventListener("cancel",h);let d=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),f=Yo(e,d);a&&(m.style.transform=Xt[f],m.style.margin=jo[f],m.style.width=pt(f)?u:"100dvw",m.style.height=pt(f)?"100dvh":u);let S=!1,g=null,E=()=>{g=null,S&&(S=!1,m.close(),document.body.style.overflow="")},b=w=>{w.target===m&&w.propertyName==="transform"&&E()};m.addEventListener("transitionend",b);let z=w=>{w?(S=!1,m.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(S=!0,m.style.transform=Xt[f],g=setTimeout(E,350))};z(t.get());let O=t.addListener(z);c.addHook("Remove",()=>{g&&(clearTimeout(g),g=null),O(),m.removeEventListener("cancel",h),m.removeEventListener("transitionend",b),document.body.style.overflow=""})},style:{transform:Xt[s],transition:"transform 0.25s ease",fontSize:c=>(0,me.themeSize)(c,"inherit"),color:c=>(0,me.themeColor)(c,"shift-10",o),backgroundColor:c=>(0,me.themeColor)(c,"inherit",o),border:"none",padding:c=>(0,me.themeSpacing)((0,me.themeDensity)(c)*3),margin:jo[s],width:pt(s)?u:"100dvw",height:pt(s)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:c=>`0 ${(0,me.themeSpacing)(4)} ${(0,me.themeSpacing)(12)} ${(0,me.themeColor)(c,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:c=>(0,me.themeColor)(c,"shift-2","neutral"),opacity:.75}}}}var Go=require("@domphy/core"),kt=require("@domphy/theme");function $r(r={}){var n;let o=(0,Go.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,kt.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,kt.themeColor)(e,"shift-10",o.get(e))}}}var Uo=require("@domphy/core"),Ze=require("@domphy/theme");function Ir(r={}){var n;let o=(0,Uo.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,Ze.themeSpacing)(3),paddingBlock:(0,Ze.themeSpacing)(12),paddingInline:(0,Ze.themeSpacing)(6),textAlign:"center",color:e=>(0,Ze.themeColor)(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>(0,Ze.themeColor)(e,"shift-5",o.get(e))}}}}function zr(r={}){return{_onError:(o,n,e)=>{var t,a;(t=r.onError)==null||t.call(r,n);let i=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([i])}}}var Xo=require("@domphy/core"),ue=require("@domphy/theme"),Vr={small:8,medium:10,large:14};function Lr(r={}){var e,i;let o=(0,Xo.toState)((e=r.color)!=null?e:"primary","color"),n=(0,ue.themeSpacing)(Vr[(i=r.size)!=null?i:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>(0,ue.themeSize)(t,"inherit"),backgroundColor:t=>(0,ue.themeColor)(t,"shift-9",o.get(t)),color:t=>(0,ue.themeColor)(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${(0,ue.themeSpacing)(1)} ${(0,ue.themeSpacing)(4)} ${(0,ue.themeColor)(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,ue.themeColor)(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${(0,ue.themeSpacing)(2)} ${(0,ue.themeSpacing)(6)} ${(0,ue.themeColor)(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${(0,ue.themeColor)(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Jo=require("@domphy/core"),$e=require("@domphy/theme");function Mr(r={}){var n;let o=(0,Jo.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,$e.themeSpacing)(2),marginInline:0,marginTop:(0,$e.themeSpacing)(3),marginBottom:(0,$e.themeSpacing)(3),color:e=>(0,$e.themeColor)(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,$e.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,$e.themeSize)(e,"decrease-1"),color:e=>(0,$e.themeColor)(e,"shift-8",o.get(e)),lineHeight:1.45}}}}var Zo=require("@domphy/core"),M=require("@domphy/theme");function Rr(r={}){var i;let{layout:o="horizontal"}=r,n=(0,Zo.toState)((i=r.color)!=null?i:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*3),paddingBlock:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*2),fontSize:t=>(0,M.themeSize)(t,"inherit"),backgroundColor:t=>(0,M.themeColor)(t,"inherit",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,M.themeSpacing)(4),rowGap:(0,M.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,M.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*1),borderRadius:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*2),color:t=>(0,M.themeColor)(t,"shift-9",n.get(t)),backgroundColor:t=>(0,M.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":(0,M.themeSpacing)((0,M.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,M.themeSpacing)(2)} * -1)`,fontSize:t=>(0,M.themeSize)(t,"decrease-1"),color:t=>(0,M.themeColor)(t,"shift-9",n.get(t))}}}}var Qo=require("@domphy/core"),it=require("@domphy/theme"),_r={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Nr(r={}){var n;let o=(0,Qo.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,it.themeColor)(e,"shift-11",o.get(e)),marginTop:0,marginBottom:(0,it.themeSpacing)(2),fontSize:e=>{let i=_r[e.elementNode.tagName]||"inherit";return(0,it.themeSize)(e,i)}}}}var en=require("@domphy/core"),ht=require("@domphy/theme");function Hr(r={}){var n;let o=(0,en.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:(0,ht.themeSpacing)(3),marginBottom:(0,ht.themeSpacing)(3),backgroundColor:e=>(0,ht.themeColor)(e,"shift-4",o.get(e))}}}var tn=require("@domphy/core"),Qe=require("@domphy/theme");function Ar(r={}){var n;let o=(0,tn.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,Qe.themeSpacing)(4),height:(0,Qe.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Qe.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Qe.themeColor)(e,"shift-9",o.get(e))}}}var on=require("@domphy/core"),wt=require("@domphy/theme");function Br(r={}){var n;let o=(0,on.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,wt.themeSpacing)(2),backgroundColor:e=>(0,wt.themeColor)(e,"inherit",o.get(e))}}}var Jt=require("@domphy/core"),_=require("@domphy/theme");function Fr(r={}){var e,i;let o=(0,Jt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Jt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,_.themeSize)(t,"inherit"),display:"inline-flex",position:"relative",width:(0,_.themeSpacing)(6),height:(0,_.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,_.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,_.themeColor)(t,"shift-9",o.get(t)),width:(0,_.themeSpacing)(4),height:(0,_.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,_.themeColor)(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,_.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,_.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,_.themeSpacing)(.5)} solid ${(0,_.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,_.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,_.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,_.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,_.themeSpacing)(1.5),outline:t=>`${(0,_.themeSpacing)(.5)} solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,_.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var ne=require("@domphy/theme");function Kr(r={}){return{type:"color",_onSchedule:(o,n)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),n.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>(0,ne.themeSize)(o,"inherit"),paddingBlock:o=>(0,ne.themeSpacing)((0,ne.themeDensity)(o)*1),paddingInline:o=>(0,ne.themeSpacing)((0,ne.themeDensity)(o)*1),blockSize:o=>(0,ne.themeSpacing)(6+(0,ne.themeDensity)(o)*2),inlineSize:o=>(0,ne.themeSpacing)(6+(0,ne.themeDensity)(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>(0,ne.themeSpacing)((0,ne.themeDensity)(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>(0,ne.themeColor)(o,"shift-2","neutral"),outline:o=>`1px solid ${(0,ne.themeColor)(o,"shift-4","neutral")}`}}}}var Zt=require("@domphy/core"),G=require("@domphy/theme");function Wr(r={}){var i,t;let{mode:o="datetime-local"}=r,n=(0,Zt.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Zt.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,G.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,G.themeColor)(a,"shift-9",n.get(a)),backgroundColor:a=>(0,G.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,G.themeColor)(a,"shift-4",n.get(a))}`,borderRadius:a=>(0,G.themeSpacing)((0,G.themeDensity)(a)*1),paddingInline:a=>(0,G.themeSpacing)((0,G.themeDensity)(a)*3),height:a=>(0,G.themeSpacing)(6+(0,G.themeDensity)(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${(0,G.themeSpacing)(.5)} solid ${(0,G.themeColor)(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,G.themeColor)(a,"shift-8","neutral"),backgroundColor:a=>(0,G.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,G.themeColor)(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${(0,G.themeSpacing)(.5)} solid ${(0,G.themeColor)(a,"shift-6","error")}`}}}}var Qt=require("@domphy/core"),D=require("@domphy/theme");function jr(r={}){var e,i;let o=(0,Qt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Qt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,D.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,D.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,D.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,D.themeColor)(t,"shift-4",o.get(t))}`,borderRadius:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*1),height:t=>(0,D.themeSpacing)(6+(0,D.themeDensity)(t)*2),paddingInline:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,D.themeSpacing)(1),height:(0,D.themeSpacing)(6),paddingInline:(0,D.themeSpacing)(2),cursor:"pointer",color:t=>(0,D.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,D.themeColor)(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,D.themeSpacing)(.5)} solid ${(0,D.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,D.themeColor)(t,"shift-8","neutral"),outline:t=>`1px solid ${(0,D.themeColor)(t,"shift-4","neutral")}`,backgroundColor:t=>(0,D.themeColor)(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,D.themeColor)(t,"shift-8","neutral"),backgroundColor:t=>(0,D.themeColor)(t,"shift-3","neutral")}}}}var eo=require("@domphy/core"),W=require("@domphy/theme");function Yr(r={}){var e,i;let o=(0,eo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,eo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,W.themeSpacing)(10),paddingInlineStart:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*3),paddingInlineEnd:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1.5),paddingBlock:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1),borderRadius:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1),fontSize:t=>(0,W.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,W.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,W.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,W.themeColor)(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,W.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,W.themeColor)(t,"shift-4","neutral")}`,color:t=>(0,W.themeColor)(t,"shift-8","neutral")}}}}var to=require("@domphy/core"),ee=require("@domphy/theme"),nn='<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>',qr='<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 Gr(r={}){var e,i;let o=(0,to.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,to.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onMount:t=>{let a=t.domElement,s=!1,l=document.createElement("input");l.type="password",l.style.cssText="flex:1;min-width:0;border:none;outline:none;background:transparent;padding:0;margin:0;font:inherit;color:inherit;";let u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Show password"),u.style.cssText="background:none;border:none;padding:0;margin:0;cursor:pointer;color:inherit;display:flex;align-items:center;flex-shrink:0;opacity:0.6;",u.innerHTML=nn;let c=()=>{s=!s,l.type=s?"text":"password",u.innerHTML=s?qr:nn,u.setAttribute("aria-label",s?"Hide password":"Show password")};u.addEventListener("click",c),a.appendChild(l),a.appendChild(u),t.addHook("Remove",()=>{u.removeEventListener("click",c)})},style:{display:"flex",alignItems:"center",gap:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1),paddingBlock:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1),paddingInline:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*3),borderRadius:t=>(0,ee.themeSpacing)((0,ee.themeDensity)(t)*1),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ee.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,ee.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,ee.themeColor)(t,"inherit",o.get(t)),fontSize:t=>(0,ee.themeSize)(t,"inherit"),"&:focus-within":{outline:t=>`${(0,ee.themeSpacing)(.5)} solid ${(0,ee.themeColor)(t,"shift-6",n.get(t))}`}}}}var oo=require("@domphy/theme");function Ur(){return{style:{display:"flex",alignItems:"center",gap:(0,oo.themeSpacing)(2),"& > *":{minWidth:`${(0,oo.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let s=n(),l=a.target,u=s.indexOf(l);l.value&&u<s.length-1&&s[u+1].focus()},i=a=>{let s=n(),l=a.target,u=s.indexOf(l);a.key==="Backspace"&&!l.value&&u>0&&s[u-1].focus(),a.key==="ArrowLeft"&&u>0&&s[u-1].focus(),a.key==="ArrowRight"&&u<s.length-1&&s[u+1].focus()},t=a=>{var h,d,f;a.preventDefault();let s=(d=(h=a.clipboardData)==null?void 0:h.getData("text"))!=null?d:"",l=n(),u=l.indexOf(a.target),c=u===-1?0:u;[...s].forEach((S,g)=>{l[c+g]&&(l[c+g].value=S)});let m=Math.min(c+s.length-1,l.length-1);(f=l[m])==null||f.focus()};o.addEventListener("input",e),o.addEventListener("keydown",i),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",i),o.removeEventListener("paste",t)})}}}var no=require("@domphy/core"),re=require("@domphy/theme");function Xr(r={}){var e,i;let o=(0,no.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,no.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>(0,re.themeSize)(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:(0,re.themeSpacing)(6),height:(0,re.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,re.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,re.themeColor)(t,"shift-9",o.get(t)),width:(0,re.themeSpacing)(4),height:(0,re.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,re.themeColor)(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,re.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,re.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,re.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${(0,re.themeSpacing)(.5)} solid ${(0,re.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,re.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var ro=require("@domphy/core"),ae=require("@domphy/theme");function Jr(r={}){var e,i;let o=(0,ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ro.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:(0,ae.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,ae.themeSpacing)(1.5),borderRadius:(0,ae.themeSpacing)(999),backgroundColor:t=>(0,ae.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,ae.themeSpacing)(4),height:(0,ae.themeSpacing)(4),borderRadius:(0,ae.themeSpacing)(999),border:"none",marginTop:`calc((${(0,ae.themeSpacing)(1.5)} - ${(0,ae.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,ae.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,ae.themeColor)(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:(0,ae.themeSpacing)(1),borderRadius:(0,ae.themeSpacing)(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var ao=require("@domphy/core"),U=require("@domphy/theme");function Zr(r={}){var e,i;let o=(0,ao.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ao.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>(0,U.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,U.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,U.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,U.themeColor)(t,"shift-4",o.get(t))}`,borderRadius:t=>(0,U.themeSpacing)((0,U.themeDensity)(t)*1),minWidth:(0,U.themeSpacing)(32),paddingInline:t=>(0,U.themeSpacing)((0,U.themeDensity)(t)*3),paddingBlock:t=>(0,U.themeSpacing)((0,U.themeDensity)(t)*1),"&::placeholder":{color:t=>(0,U.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]), &:focus-visible":{outline:t=>`${(0,U.themeSpacing)(.5)} solid ${(0,U.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,U.themeColor)(t,"shift-8","neutral"),backgroundColor:t=>(0,U.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,U.themeColor)(t,"shift-4","neutral")}`}}}}var rn=require("@domphy/core"),ie=require("@domphy/theme");function Qr(r={}){var n;let o=(0,rn.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,ie.themeSize)(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:(0,ie.themeSpacing)(9),height:(0,ie.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,ie.themeSpacing)(1),"&:checked":{"&::before":{backgroundColor:e=>(0,ie.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,ie.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,ie.themeSpacing)(3),height:(0,ie.themeSpacing)(3),borderRadius:(0,ie.themeSpacing)(999),left:(0,ie.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,ie.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,ie.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,ie.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,ie.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var io=require("@domphy/core"),$=require("@domphy/theme");function ea(r={}){var e,i;let o=(0,io.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,io.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,$.themeSpacing)(10),paddingInline:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*3),paddingBlock:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*1),borderRadius:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*1),fontSize:t=>(0,$.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,$.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,$.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,$.themeColor)(t,"inherit",o.get(t)),"&::placeholder":{color:t=>(0,$.themeColor)(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>(0,$.themeColor)(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,$.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,$.themeColor)(t,"shift-4","neutral")}`,color:t=>(0,$.themeColor)(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","warning")}`}}}}var an=require("@domphy/core"),Ie=require("@domphy/theme");function ta(r={}){var n;let o=(0,an.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,Ie.themeSize)(e,"inherit"),color:e=>(0,Ie.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,Ie.themeColor)(e,"inherit",o.get(e)),paddingBlock:(0,Ie.themeSpacing)(.5),paddingInline:(0,Ie.themeSpacing)(1.5),borderRadius:(0,Ie.themeSpacing)(1),outline:e=>`1px solid ${(0,Ie.themeColor)(e,"shift-4",o.get(e))}`}}}var lo=require("@domphy/core"),Ge=require("@domphy/theme");function oa(r={}){var e,i;let o=(0,lo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,lo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,Ge.themeSpacing)(2),fontSize:t=>(0,Ge.themeSize)(t,"inherit"),color:t=>(0,Ge.themeColor)(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,Ge.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,Ge.themeColor)(t,"shift-8","neutral")}}}}var so=require("@domphy/core"),ge=require("@domphy/theme");function na(r={}){var e,i;let o=(0,so.toState)((e=r.color)!=null?e:"primary","color"),n=(0,so.toState)((i=r.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>(0,ge.themeSize)(t,"inherit"),backgroundColor:t=>(0,ge.themeColor)(t),color:t=>(0,ge.themeColor)(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,ge.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,ge.themeColor)(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:(0,ge.themeSpacing)(1),outlineOffset:(0,ge.themeSpacing)(1),outline:t=>`${(0,ge.themeSpacing)(.5)} solid ${(0,ge.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,ge.themeColor)(t,"shift-8","neutral")}}}}var ln=require("@domphy/core"),B=require("@domphy/theme");function ra(r={}){var n;let o=(0,ln.toState)((n=r.color)!=null?n:"primary","color");return{_onInsert:e=>{e.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:e=>(0,B.themeSize)(e,"inherit"),textDecoration:"none",paddingBlock:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1),paddingInline:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*3),borderRadius:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${(0,B.themeColor)(e,"shift-4",o.get(e))}`,color:e=>(0,B.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,B.themeColor)(e,"inherit",o.get(e)),"&:hover":{color:e=>(0,B.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,B.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,B.themeSpacing)(.5)} ${(0,B.themeColor)(e,"shift-6",o.get(e))}`},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>(0,B.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,B.themeColor)(e,"shift-4","neutral")}`,color:e=>(0,B.themeColor)(e,"shift-8","neutral")}}}}var sn=require("@domphy/core"),N=require("@domphy/theme");function aa(r={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function ia(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,N.themeSpacing)((0,N.themeDensity)(n)*2),paddingBlock:n=>(0,N.themeSpacing)(o?1:(0,N.themeDensity)(n)*2),paddingInline:n=>(0,N.themeSpacing)((0,N.themeDensity)(n)*3),fontSize:n=>(0,N.themeSize)(n,"inherit")}}}function la(r={}){var i,t;let o=(0,sn.toState)((i=r.color)!=null?i:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{cursor:"pointer",style:{appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*2),paddingBlock:a=>(0,N.themeSpacing)(e?1:(0,N.themeDensity)(a)*2),paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3),fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"shift-9",o.get(a)),borderRadius:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",n),color:a=>(0,N.themeColor)(a,"shift-12",n)},"&:focus-visible":{outline:a=>`2px solid ${(0,N.themeColor)(a,"shift-6",n)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var cn=require("@domphy/core"),Ae=require("@domphy/theme");function sa(r={}){var n;let o=(0,cn.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,Ae.themeSize)(e,"inherit"),color:e=>(0,Ae.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,Ae.themeColor)(e,"inherit",o.get(e)),height:(0,Ae.themeSpacing)(6),borderRadius:(0,Ae.themeSpacing)(1),paddingInline:(0,Ae.themeSpacing)(1.5)}}}var Tt=require("@domphy/core"),ze=require("@domphy/theme");function ca(r={}){let{color:o="neutral",selectable:n=!0}=r;return{role:"menu",dataTone:"shift-17",_onSchedule:(i,t)=>{var s;let a={_context:{menu:{activeKey:(0,Tt.toState)((s=r.activeKey)!=null?s:null),selectable:n}}};(0,Tt.merge)(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,ze.themeSpacing)((0,ze.themeDensity)(i)*2),paddingInline:i=>(0,ze.themeSpacing)((0,ze.themeDensity)(i)*2),fontSize:i=>(0,ze.themeSize)(i,"inherit"),backgroundColor:i=>(0,ze.themeColor)(i,"inherit",o)}}}var te=require("@domphy/theme");function ma(r={}){let{accentColor:o="primary",color:n="neutral"}=r;return{role:"menuitem",_onInsert:i=>{var l,u;i.tagName!=="button"&&console.warn('"menuItem" patch must use button tag');let t=i.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(u=(l=i.parent)==null?void 0:l.children.items)!=null?u:[];a=a.filter(c=>c.type==="ElementNode"&&c.attributes.get("role")==="menuitem");let s=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i);t.selectable&&(i.attributes.set("ariaCurrent",c=>t.activeKey.get(c)===s||void 0),i.addEvent("click",()=>t.activeKey.set(s)))},onKeyDown:(i,t)=>{var c,m,h,d;let a=i.key;if(a==="Enter"||a===" "){i.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;i.preventDefault();let s=((h=(m=t.parent)==null?void 0:m.children.items)!=null?h:[]).filter(f=>f.type==="ElementNode"&&f.attributes.get("role")==="menuitem");if(!s.length)return;let l=s.indexOf(t),u=l;a==="ArrowDown"?u=(l+1)%s.length:a==="ArrowUp"?u=(l-1+s.length)%s.length:a==="Home"?u=0:a==="End"&&(u=s.length-1),(d=s[u].domElement)==null||d.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:i=>(0,te.themeSpacing)(2),width:"100%",fontSize:i=>(0,te.themeSize)(i,"inherit"),height:i=>(0,te.themeSpacing)(6+(0,te.themeDensity)(i)*2),paddingInline:i=>(0,te.themeSpacing)((0,te.themeDensity)(i)*3),border:"none",outline:"none",color:i=>(0,te.themeColor)(i,"shift-9",n),backgroundColor:i=>(0,te.themeColor)(i,"inherit",n),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:i=>(0,te.themeColor)(i,"shift-2",n)},"&[aria-current=true]":{backgroundColor:i=>(0,te.themeColor)(i,"shift-3",o),color:i=>(0,te.themeColor)(i,"shift-10")},"&:focus-visible":{outline:i=>`${(0,te.themeSpacing)(.5)} solid ${(0,te.themeColor)(i,"shift-6",o)}`,outlineOffset:`-${(0,te.themeSpacing)(.5)}`}}}}var mn=r=>!!r&&typeof r.get=="function"&&r._isState===!0,lt=r=>{let o={},n=[];for(let e in r){let i=r[e];e==="x"?n.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?n.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?n.push(`scale(${i})`):e==="rotate"?n.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):o[e]=i}return n.length&&(o.transform=n.join(" ")),o};function ua(r={}){var a,s,l,u;let{initial:o,animate:n,exit:e,transition:i={}}=r,t={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s:0,easing:(l=i.easing)!=null?l:"ease",iterations:(u=i.iterations)!=null?u:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let h=mn(n)?n.get():n;if(h?m.animate(o?[lt(o),lt(h)]:[lt(h)],t):o&&Object.assign(m.style,lt(o)),mn(n)){let d=n.addListener(f=>{m.animate([lt(f)],t)});c.setMetadata("motionRelease",d)}},_onBeforeRemove:(c,m)=>{let h=c.domElement;if(!h||!e||typeof h.animate!="function")return m();h.animate([lt(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}var un=require("@domphy/core"),et=require("@domphy/theme");function da(r={}){var n;let o=(0,un.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,et.themeSize)(e,"inherit"),backgroundColor:e=>(0,et.themeColor)(e),color:e=>(0,et.themeColor)(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,et.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var dn=require("@domphy/core"),j=require("@domphy/theme");function pa(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),i=Math.min(o-1,r+1);for(let t=e;t<=i;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function ha(r){var s;let{total:o,color:n="neutral",accentColor:e="primary"}=r,i=(0,dn.toState)((s=r.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>(0,j.themeSpacing)(6+(0,j.themeDensity)(l)*2),height:l=>(0,j.themeSpacing)(6+(0,j.themeDensity)(l)*2),paddingInline:l=>(0,j.themeSpacing)((0,j.themeDensity)(l)*2),borderRadius:l=>(0,j.themeSpacing)((0,j.themeDensity)(l)*1),border:"none",cursor:"pointer",fontSize:l=>(0,j.themeSize)(l,"inherit"),backgroundColor:"transparent",color:l=>(0,j.themeColor)(l,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:l=>(0,j.themeColor)(l,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Do(at({},t),{backgroundColor:l=>(0,j.themeColor)(l,"shift-6",e),color:l=>(0,j.themeColor)(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>(0,j.themeColor)(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let u={div:c=>{let m=i.get(c),h=[];h.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&i.set(m-1),style:t});for(let d of pa(m,o))if(d==="...")h.push({span:"\u2026",ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:f=>(0,j.themeSpacing)((0,j.themeDensity)(f)*2),color:f=>(0,j.themeColor)(f,"shift-7",n)}});else{let f=d===m;h.push({button:String(d),type:"button",ariaLabel:`Page ${d}`,ariaCurrent:f?"page":void 0,disabled:f,onClick:()=>i.set(d),style:f?a:t})}return h.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&i.set(m+1),style:t}),h},style:{display:"flex",alignItems:"center",gap:(0,j.themeSpacing)(1)}};l.children.insert(u)},style:{display:"inline-flex"}}}var pn=require("@domphy/core"),Pt=require("@domphy/theme");function fa(r={}){var n;let o=(0,pn.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,Pt.themeSize)(e,"inherit"),color:e=>(0,Pt.themeColor)(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var ft=require("@domphy/core"),co=require("@domphy/theme");function ga(r){var h;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,i=null,t=(0,ft.toState)(o),a=(0,ft.toState)(n),{show:s,hide:l,anchorPartial:u}=De({open:t,placement:a,content:r.content}),c={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>(0,co.themeColor)(d,"inherit"),boxShadow:d=>`0 4px 20px ${(0,co.themeColor)(d,"shift-6")}`},onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),_onInsert:d=>{let f=d.attributes.get("id");i=f||d.nodeId,!f&&d.attributes.set("id",i)}};return(h=r.content).$||(h.$=[]),r.content.$.push(c),(0,ft.merge)(u,{ariaHaspopup:"dialog",ariaExpanded:d=>t.get(d),onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),onClick:()=>{e==="click"&&(t.get()?l():s())},onKeyDown:d=>{d.key==="Escape"&&t.get()&&l()},onFocus:()=>e==="hover"&&s(),onBlur:(d,f)=>{let S=d.relatedTarget,g=f.getRoot().domElement,E=i?g.querySelector(`#${CSS.escape(i)}`):null;S&&(E!=null&&E.contains(S))||l()},_onMount:d=>i&&d.attributes.set("ariaControls",i)}),u}var hn=require("@domphy/core"),ke=require("@domphy/theme");function mo(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,ke.themeSpacing)(6),bordered:i=!0}=r,t=(0,hn.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=c=>{var m;return(m=a[t.get(c)])!=null?m:a["bottom-end"]},l=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",u=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>(0,ke.themeSize)(c),backgroundColor:c=>(0,ke.themeColor)(c),color:c=>(0,ke.themeColor)(c,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,ke.themeSpacing)(1.5),height:(0,ke.themeSpacing)(1.5),backgroundColor:c=>(0,ke.themeColor)(c,"inherit",n),borderWidth:i?"1px":"0px",borderColor:c=>(0,ke.themeColor)(c,"inherit",n),borderTopStyle:c=>{let m=s(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=s(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=s(c);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:c=>{let m=s(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=s(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=s(c);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:c=>{let m=s(c),h=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",d=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${h},${d}) rotate(45deg)`}}}}}var fn=require("@domphy/core"),ye=require("@domphy/theme");function ya(r={}){var n;let o=(0,fn.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,ye.themeSize)(e,"inherit"),color:e=>(0,ye.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,ye.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*2),paddingInline:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*3),borderRadius:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*2)}}}var uo=require("@domphy/core"),Be=require("@domphy/theme");function ba(r={}){var e,i;let o=(0,uo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,uo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:(0,Be.themeSpacing)(2),border:0,borderRadius:(0,Be.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,Be.themeColor)(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,Be.themeColor)(t,"shift-3",o.get(t)),borderRadius:(0,Be.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,Be.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,Be.themeSpacing)(999),transition:"width 220ms ease"}}}}var gn=require("@domphy/core"),Ot=require("@domphy/theme"),Sa='<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>',Ca='<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 a,s;let{max:o=5,readOnly:n=!1,onChange:e}=r,i=(a=r.color)!=null?a:"warning",t=(0,gn.toState)((s=r.value)!=null?s:0);return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,Ot.themeSpacing)(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:l=>(0,Ot.themeColor)(l,"shift-8",i)},_onMount:l=>{let u=l.domElement,c=t.get(),m=0,h=()=>{let f=m>0?m:c;Array.from(u.children).forEach((S,g)=>{S.innerHTML=g<f?Sa:Ca})};u.innerHTML="";for(let f=1;f<=o;f++){let S=document.createElement("button");if(S.type="button",S.setAttribute("aria-label",`${f} star${f>1?"s":""}`),S.style.cssText="background:none;border:none;padding:0;cursor:inherit;color:inherit;font-size:inherit;display:flex;align-items:center;",!n){let g=f;S.addEventListener("click",()=>{let E=g===c?0:g;c=E,t.set(E),e==null||e(E),m=0,h()}),S.addEventListener("mouseenter",()=>{m=g,h()}),S.addEventListener("mouseleave",()=>{m=0,h()}),S.addEventListener("keydown",E=>{var O;let b=c;if(E.key==="ArrowRight"||E.key==="ArrowUp")b=Math.min(o,c+1),E.preventDefault();else if(E.key==="ArrowLeft"||E.key==="ArrowDown")b=Math.max(0,c-1),E.preventDefault();else return;c=b,t.set(b),e==null||e(b),h();let z=b>0?b-1:0;(O=u.children[z])==null||O.focus()})}u.appendChild(S)}h();let d=t.addListener(f=>{c=f,m===0&&h()});l.addHook("Remove",d)}}}var Dt=require("@domphy/core"),st=require("@domphy/theme");function Ea(r={}){var l,u,c;let{size:o=16,thickness:n=.25}=r,e=(0,Dt.toState)((l=r.value)!=null?l:0,"value"),i=(0,Dt.toState)((u=r.color)!=null?u:"primary","color"),t=(0,Dt.toState)((c=r.trackColor)!=null?c:"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,st.themeSpacing)(o),height:(0,st.themeSpacing)(o),borderRadius:"50%",background:m=>`conic-gradient(from -90deg, ${(0,st.themeColor)(m,"shift-9",i.get(m))} ${e.get(m)}%, ${(0,st.themeColor)(m,"shift-3",t.get(m))} 0%)`,WebkitMask:s,mask:s}}}var yn=require("@domphy/core"),Fe=require("@domphy/theme");function xa(r={}){var n;let o=(0,yn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto","&::-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 bn=require("@domphy/core"),tt=require("@domphy/theme");function ka(r={}){var n;let{color:o="neutral"}=r;return{role:"radiogroup",_context:{segmented:{value:(0,bn.toState)((n=r.value)!=null?n:"")}},style:{display:"inline-flex",paddingBlock:(0,tt.themeSpacing)(1),paddingInline:(0,tt.themeSpacing)(1),gap:(0,tt.themeSpacing)(.5),borderRadius:(0,tt.themeSpacing)(10),backgroundColor:e=>(0,tt.themeColor)(e,"shift-2",o)}}}var po=require("@domphy/core"),de=require("@domphy/theme");function wa(r={}){var e,i;let o=(0,po.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,po.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{role:"radio",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"segmentedItem" patch must use button tag');let a=t.getContext("segmented");if(!a){console.warn('"segmentedItem" patch must be used inside a "segmented"');return}let l=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="radio"),u=t.key!==null&&t.key!==void 0?String(t.key):String(l.indexOf(t));t.attributes.set("ariaChecked",h=>a.value.get(h)===u),t.addEvent("click",()=>a.value.set(u))},style:{cursor:"pointer",fontSize:t=>(0,de.themeSize)(t,"inherit"),height:(0,de.themeSpacing)(6),paddingBlock:(0,de.themeSpacing)(1),paddingInline:(0,de.themeSpacing)(3),border:"none",borderRadius:(0,de.themeSpacing)(10),color:t=>(0,de.themeColor)(t,"shift-9",o.get(t)),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:t=>(0,de.themeColor)(t,"shift-3",o.get(t))},"&[aria-checked=true]":{backgroundColor:t=>(0,de.themeColor)(t,"shift-0",n.get(t)),color:t=>(0,de.themeColor)(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${(0,de.themeSpacing)(.5)} solid ${(0,de.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:`-${(0,de.themeSpacing)(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var P=require("@domphy/theme");function Ta(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,P.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,P.themeColor)(e,"shift-9",o),backgroundColor:e=>(0,P.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,P.themeColor)(e,"shift-4",o)}`,borderRadius:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*1),paddingBlock:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*1),paddingLeft:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*3),paddingRight:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*5),backgroundImage:e=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,P.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,P.themeSpacing)(2)} center`,backgroundSize:`${(0,P.themeSpacing)(2.5)} ${(0,P.themeSpacing)(1.5)}`,"&:not([multiple])":{height:e=>(0,P.themeSpacing)(6+(0,P.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${(0,P.themeSpacing)(.5)} solid ${(0,P.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{outline:e=>`${(0,P.themeSpacing)(.5)} solid ${(0,P.themeColor)(e,"shift-6",n)}`},"& optgroup":{color:e=>(0,P.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,P.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,P.themeColor)(e,"shift-8","neutral"),outline:e=>`1px solid ${(0,P.themeColor)(e,"shift-4","neutral")}`,backgroundColor:e=>(0,P.themeColor)(e,"shift-2","neutral")}}}}var ot=require("@domphy/core"),se=require("@domphy/theme");function Pa(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=r,a=(0,ot.toState)(r.value),s=(0,ot.toState)(i),{show:l,hide:u,anchorPartial:c}=De({open:s,placement:(0,ot.toState)(n),content:r.content}),m={onClick:()=>!t&&u()};(0,ot.merge)(r.content,m);let h={div:f=>{let S=a.get(f),g=Array.isArray(S)?S:[S];return o.filter(b=>g.includes(b.value)).map(b=>({span:b.label,$:[ut({color:e,removable:t})],_key:b.value,_onRemove:z=>{let O=a.get(),We=(Array.isArray(O)?O:[O]).filter(Xe=>Xe!==b.value);t?a.set(We):a.set(We[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:(0,se.themeSpacing)(1),flex:1}},d={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(h),onClick:()=>s.get()?u():l(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>(0,se.themeSpacing)(6+(0,se.themeDensity)(f)*2),minWidth:(0,se.themeSpacing)(32),outlineOffset:"-1px",outline:f=>`1px solid ${(0,se.themeColor)(f,"shift-4","neutral")}`,paddingInline:f=>(0,se.themeSpacing)((0,se.themeDensity)(f)*2),borderRadius:f=>(0,se.themeSpacing)((0,se.themeDensity)(f)*1),fontSize:f=>(0,se.themeSize)(f,"inherit"),color:f=>(0,se.themeColor)(f,"shift-9",e),backgroundColor:f=>(0,se.themeColor)(f,"inherit",e)}};return(0,ot.merge)(c,d),c}var le=require("@domphy/theme");function Oa(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",l=>{let u=s.get(l);return a.multiple?u.includes(e):u===e}),t.addEvent("click",()=>{let l=s.get();a.multiple?l.includes(e)?s.set(l.filter(u=>u!==e)):s.set(l.concat([e])):l!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,le.themeSize)(t,"inherit"),height:t=>(0,le.themeSpacing)(6+(0,le.themeDensity)(t)*2),paddingInline:t=>(0,le.themeSpacing)((0,le.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,le.themeColor)(t,"shift-9",n),backgroundColor:t=>(0,le.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,le.themeColor)(t,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,le.themeColor)(t,"shift-6",o),color:t=>(0,le.themeColor)(t,"shift-11")},"&:focus-visible":{outline:t=>`${(0,le.themeSpacing)(.5)} solid ${(0,le.themeColor)(t,"shift-6",o)}`,outlineOffset:`-${(0,le.themeSpacing)(.5)}`}}}}var Sn=require("@domphy/core"),Ve=require("@domphy/theme");function Da(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,Sn.toState)((a=r.value)!=null?a:n?[]:null),i={div:s=>{let l=e.get(s);return(Array.isArray(l)?l:[l]).map(c=>({input:null,name:r.name,value:c==null?"":String(c)}))},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(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(s)*2),paddingInline:s=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(s)*2),fontSize:s=>(0,Ve.themeSize)(s,"inherit"),backgroundColor:s=>(0,Ve.themeColor)(s,"inherit",o)}}}var $t=require("@domphy/core"),Ue=require("@domphy/theme");function $a(r={}){var i;let o=(0,$t.toState)((i=r.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=(0,$t.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>(0,Ue.themeSize)(t),color:t=>(0,Ue.themeColor)(t,"shift-9",o.get(t)),height:(0,Ue.themeSpacing)(6),display:"block",borderRadius:(0,Ue.themeSpacing)(1),backgroundColor:t=>(0,Ue.themeColor)(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var Cn=require("@domphy/core"),It=require("@domphy/theme");function Ia(r={}){var n;let o=(0,Cn.toState)((n=r.color)!=null?n:"neutral","color");return{dataSize:"decrease-1",style:{fontSize:e=>(0,It.themeSize)(e,"inherit"),color:e=>(0,It.themeColor)(e,"shift-9",o.get(e))}}}var zt=require("@domphy/core"),we=require("@domphy/theme"),En={to:{transform:"rotate(360deg)"}},vn=(0,zt.hashString)(JSON.stringify(En));function za(r={}){var n;let o=(0,zt.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,we.themeSize)(e),backgroundColor:e=>(0,we.themeColor)(e),color:e=>(0,we.themeColor)(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,we.themeSpacing)(6),height:(0,we.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,we.themeSpacing)(.5)} solid ${(0,we.themeColor)(e,"shift-4",o.get(e))}`,borderTopColor:e=>(0,we.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${vn} 0.7s linear infinite`,[`@keyframes ${vn}`]:En}}}var Vt=require("@domphy/core"),Ke=require("@domphy/theme");function Va(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:i=90}=r;return{_onSchedule:(t,a)=>{(0,Vt.merge)(a,{_context:{splitter:{direction:o,size:(0,Vt.toState)(n),min:e,max:i}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function La(){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";n.style[e]=`${o.size.get()}%`,n.style.flexShrink="0",n.style.overflow="auto";let i=o.size.addListener(t=>{n.style[e]=`${t}%`});r.addHook("Remove",i)}}}function Ma(){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 i=o.size.addListener(l=>{n.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let u=l.shiftKey?10:1,c=null;e?l.key==="ArrowRight"?c=Math.min(o.size.get()+u,o.max):l.key==="ArrowLeft"&&(c=Math.max(o.size.get()-u,o.min)):l.key==="ArrowDown"?c=Math.min(o.size.get()+u,o.max):l.key==="ArrowUp"&&(c=Math.max(o.size.get()-u,o.min)),l.key==="Home"?c=o.min:l.key==="End"&&(c=o.max),c!==null&&(l.preventDefault(),o.size.set(c))},a=null,s=l=>{l.preventDefault();let u=n.parentElement,c=h=>{let d=u.getBoundingClientRect(),f=e?(h.clientX-d.left)/d.width*100:(h.clientY-d.top)/d.height*100;o.size.set(Math.min(Math.max(f,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",c),document.addEventListener("mouseup",m)};n.addEventListener("keydown",t),n.addEventListener("mousedown",s),r.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,Ke.themeColor)(r,"shift-2"),"&:hover":{backgroundColor:r=>(0,Ke.themeColor)(r,"shift-3")},"&:focus-visible":{outline:r=>`2px solid ${(0,Ke.themeColor)(r,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:(0,Ke.themeSpacing)(1),height:(0,Ke.themeSpacing)(1),borderRadius:(0,Ke.themeSpacing)(999),backgroundColor:r=>(0,Ke.themeColor)(r,"shift-4")}}}}var V=require("@domphy/theme");function Ra(){let r="neutral",o="primary";return{_onInsert:n=>{var s,l;let e=n.getContext("steps");if(!e){console.warn('"stepItem" patch must be used inside a "steps"');return}r=e.color,o=e.accentColor;let a=((l=(s=n.parent)==null?void 0:s.children.items)!=null?l:[]).filter(u=>u.type==="ElementNode").indexOf(n);n.domElement&&(n.domElement.dataset.step=String(a+1)),n.attributes.set("dataStatus",u=>{let c=e.current.get(u);return a<c?"done":a===c?"active":"pending"}),n.attributes.set("ariaCurrent",u=>e.current.get(u)===a?"step":void 0)},style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:(0,V.themeSpacing)(1),flex:"1",fontSize:n=>(0,V.themeSize)(n,"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:n=>(0,V.themeSize)(n,"decrease-1"),fontWeight:"600",flexShrink:"0",border:n=>`2px solid ${(0,V.themeColor)(n,"shift-4",r)}`,backgroundColor:n=>(0,V.themeColor)(n,"inherit"),color:n=>(0,V.themeColor)(n,"shift-8"),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:n=>(0,V.themeColor)(n,"shift-3",r),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:n=>(0,V.themeColor)(n,"shift-6",o),borderColor:n=>(0,V.themeColor)(n,"shift-6",o),color:n=>(0,V.themeColor)(n,"shift-15",o)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:n=>(0,V.themeColor)(n,"shift-3",r),borderColor:n=>(0,V.themeColor)(n,"shift-3",r),color:n=>(0,V.themeColor)(n,"shift-9",r)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:n=>(0,V.themeColor)(n,"shift-3",r)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:n=>(0,V.themeColor)(n,"shift-6",o)},"&[data-status=pending]":{color:n=>(0,V.themeColor)(n,"shift-7")},"&[data-status=active]":{color:n=>(0,V.themeColor)(n,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:n=>(0,V.themeColor)(n,"shift-8")}}}}var Lt=require("@domphy/core"),xn=require("@domphy/theme");function _a(r={}){var t,a,s;let o=(t=r.direction)!=null?t:"horizontal",n=(a=r.color)!=null?a:"neutral",e=(s=r.accentColor)!=null?s:"primary";return{_onSchedule:(l,u)=>{var m;let c={_context:{steps:{current:(0,Lt.toState)((m=r.current)!=null?m:0),direction:o,color:n,accentColor:e}}};(0,Lt.merge)(u,c)},style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:(0,xn.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}}}var kn=require("@domphy/core"),gt=require("@domphy/theme");function Na(r={}){var n;let o=(0,kn.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,gt.themeSize)(e,"inherit"),fontWeight:700,color:e=>(0,gt.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,gt.themeColor)(e)}}}var wn=require("@domphy/core"),Mt=require("@domphy/theme");function Ha(r={}){var n;let o=(0,wn.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,Mt.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,Mt.themeColor)(e,"shift-9",o.get(e))}}}var Tn=require("@domphy/core"),Rt=require("@domphy/theme");function Aa(r={}){var n;let o=(0,Tn.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,Rt.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,Rt.themeColor)(e,"shift-9",o.get(e))}}}var J=require("@domphy/theme");function Ba(r={}){let{accentColor:o="primary",color:n="neutral"}=r;return{role:"tab",_onInsert:i=>{var u,c;i.tagName!=="button"&&console.warn('"tab" patch must use button tag');let t=i.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(c=(u=i.parent)==null?void 0:u.children.items)!=null?c:[];a=a.filter(m=>m.type==="ElementNode"&&m.attributes.get("role")==="tab");let s=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i),l={id:`tab${i.parent.nodeId}${s}`,ariaControls:`tabpanel${i.parent.nodeId}${s}`,ariaSelected:m=>t.activeKey.get(m)===s,onClick:()=>t.activeKey.set(s),onKeyDown:m=>{var E,b,z,O;let h=m.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(h))return;m.preventDefault();let d=((b=(E=i.parent)==null?void 0:E.children.items)!=null?b:[]).filter(w=>w.type==="ElementNode"&&w.attributes.get("role")==="tab");if(!d.length)return;let f=d.indexOf(i),S=f;h==="ArrowRight"?S=(f+1)%d.length:h==="ArrowLeft"?S=(f-1+d.length)%d.length:h==="Home"?S=0:h==="End"&&(S=d.length-1);let g=d[S];t.activeKey.set((z=g.key)!=null?z:S),(O=g.domElement)==null||O.focus()}};i.merge(l)},style:{cursor:"pointer",fontSize:i=>(0,J.themeSize)(i,"inherit"),height:i=>(0,J.themeSpacing)(6+(0,J.themeDensity)(i)*2),paddingInline:i=>(0,J.themeSpacing)((0,J.themeDensity)(i)*4),border:"none",outline:"none",color:i=>(0,J.themeColor)(i,"shift-9"),backgroundColor:i=>(0,J.themeColor)(i,"inherit"),boxShadow:i=>`inset 0 -${(0,J.themeSpacing)(.5)} 0 0 ${(0,J.themeColor)(i,"shift-1",n)}`,"&:hover:not([disabled])":{boxShadow:i=>`inset 0 -${(0,J.themeSpacing)(.5)} 0 0 ${(0,J.themeColor)(i,"shift-2",n)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:i=>`inset 0 -${(0,J.themeSpacing)(.5)} 0 0 ${(0,J.themeColor)(i,"shift-6",o)}`},"&:focus-visible":{boxShadow:i=>`inset 0 -${(0,J.themeSpacing)(.5)} 0 0 ${(0,J.themeColor)(i,"shift-6",o)}`}}}}var Pn=require("@domphy/core"),I=require("@domphy/theme");function Fa(r={}){var n;let o=(0,Pn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>(0,I.themeSize)(e,"inherit"),color:e=>(0,I.themeColor)(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,I.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,I.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,I.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,I.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,I.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,I.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>`${(0,I.themeColor)(e,"shift-2")}!important`}}}}var ct=require("@domphy/theme");function Ka(){return{role:"tabpanel",style:{paddingBlock:o=>(0,ct.themeSpacing)((0,ct.themeDensity)(o)*2),paddingInline:o=>(0,ct.themeSpacing)((0,ct.themeDensity)(o)*2)},_onInsert:o=>{var a,s;let n=o.getContext("tabs");if(!n){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(s=(a=o.parent)==null?void 0:a.children.items)!=null?s:[];e=e.filter(l=>l.type==="ElementNode"&&l.attributes.get("role")==="tabpanel");let i=o.key!==null&&o.key!==void 0?o.key:e.indexOf(o),t={id:`tabpanel${o.parent.nodeId}${i}`,ariaLabelledby:`tab${o.parent.nodeId}${i}`,hidden:l=>n.activeKey.get(l)!==i};o.merge(t)}}}var _t=require("@domphy/core");function Wa(r={}){return{role:"tablist",ariaOrientation:"horizontal",_onSchedule:(n,e)=>{var t;let i={_context:{tabs:{activeKey:(0,_t.toState)((t=r.activeKey)!=null?t:0)}}};(0,_t.merge)(e,i)}}}var ho=require("@domphy/core"),H=require("@domphy/theme");function ja(r={}){var i,t;let o=(0,ho.toState)((i=r.color)!=null?i:"neutral","color"),n=(0,ho.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 l=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",l),l(),a.addHook("Remove",()=>s.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*2),paddingBlock:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*1.5),fontSize:a=>(0,H.themeSize)(a,"inherit"),color:a=>(0,H.themeColor)(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,H.themeColor)(a,"shift-4",o.get(a))}`,backgroundColor:a=>(0,H.themeColor)(a,"inherit",o.get(a)),"&::placeholder":{color:a=>(0,H.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,H.themeColor)(a,"shift-8","neutral"),outline:a=>`1px solid ${(0,H.themeColor)(a,"shift-4","neutral")}`,backgroundColor:a=>(0,H.themeColor)(a,"shift-2","neutral")}}}}var On=require("@domphy/core"),Te=require("@domphy/theme");function Ya(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function qa(r={}){var t,a,s;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",i=(0,On.toState)((s=r.active)!=null?s:!1);return{style:at({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>(0,Te.themeSpacing)((0,Te.themeDensity)(l)*2),paddingBottom:l=>o?"0":(0,Te.themeSpacing)((0,Te.themeDensity)(l)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:l=>(0,Te.themeColor)(l,"shift-8",i.get(l)?e:n),opacity:l=>i.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${(0,Te.themeSpacing)((0,Te.themeDensity)(l)*4)}`,width:"2px",backgroundColor:l=>(0,Te.themeColor)(l,"shift-3",n)}})}}var Dn=require("@domphy/core"),Z=require("@domphy/theme");function Ga(r={}){let{position:o="top-center",color:n="neutral"}=r,e=(0,Dn.toState)(!1),i=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:(0,Z.themeSpacing)(4),zIndex:30,padding:(0,Z.themeSpacing)(6),pointerEvents:"none"}};return{_portal:l=>{let u=l.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=l.children.insert(s).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,Z.themeSpacing)(32),pointerEvents:"auto",paddingBlock:l=>(0,Z.themeSpacing)((0,Z.themeDensity)(l)*2),paddingInline:l=>(0,Z.themeSpacing)((0,Z.themeDensity)(l)*4),borderRadius:l=>(0,Z.themeSpacing)((0,Z.themeDensity)(l)*2),fontSize:l=>(0,Z.themeSize)(l,"inherit"),color:l=>(0,Z.themeColor)(l,"shift-9",n),backgroundColor:l=>(0,Z.themeColor)(l,"inherit",n),boxShadow:l=>`0 ${(0,Z.themeSpacing)(2)} ${(0,Z.themeSpacing)(9)} ${(0,Z.themeColor)(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,u)=>{let c=!1,m=null,h=()=>{c||(c=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",d),u())},d=f=>{f.propertyName==="transform"&&h()};l.domElement.addEventListener("transitionend",d),m=setTimeout(h,350),l.addHook("Remove",()=>{var f;m&&(clearTimeout(m),m=null),(f=l.domElement)==null||f.removeEventListener("transitionend",d)}),e.set(!1)}}}var fo=require("@domphy/core"),ce=require("@domphy/theme");function Ua(r={}){var e,i;let o=(0,fo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,fo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=t.getContext("toggleGroup");if(!a){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let l=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="button"),u=t.key!==null&&t.key!==void 0?String(t.key):String(l.indexOf(t));t.attributes.set("ariaPressed",h=>{let d=a.value.get(h);return Array.isArray(d)?d.includes(u):d===u}),t.addEvent("click",()=>{let h=a.value.get();if(a.multiple){let d=Array.isArray(h)?[...h]:[];a.value.set(d.includes(u)?d.filter(f=>f!==u):[...d,u])}else a.value.set(h===u?"":u)})},style:{cursor:"pointer",fontSize:t=>(0,ce.themeSize)(t,"inherit"),height:(0,ce.themeSpacing)(6),paddingBlock:(0,ce.themeSpacing)(1),paddingInline:(0,ce.themeSpacing)(2),border:"none",borderRadius:(0,ce.themeSpacing)(1),color:t=>(0,ce.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,ce.themeColor)(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,ce.themeColor)(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>(0,ce.themeColor)(t,"shift-3",n.get(t)),color:t=>(0,ce.themeColor)(t,"shift-12",n.get(t))},"&:focus-visible":{outline:t=>`${(0,ce.themeSpacing)(.5)} solid ${(0,ce.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:`-${(0,ce.themeSpacing)(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var $n=require("@domphy/core"),Le=require("@domphy/theme");function Xa(r={}){var e;let{multiple:o=!1,color:n="neutral"}=r;return{role:"group",_context:{toggleGroup:{value:(0,$n.toState)((e=r.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:(0,Le.themeSpacing)(1),paddingInline:(0,Le.themeSpacing)(1),gap:(0,Le.themeSpacing)(1),borderRadius:(0,Le.themeSpacing)(2),fontSize:i=>(0,Le.themeSize)(i,"inherit"),backgroundColor:i=>(0,Le.themeColor)(i,"inherit",n),outline:i=>`1px solid ${(0,Le.themeColor)(i,"shift-3",n)}`,outlineOffset:"-1px"}}}var Nt=require("@domphy/theme");function Ja(r={}){var n;let o=(n=r.gap)!=null?n:4;return{style:{display:"flex",alignItems:"center",gap:e=>(0,Nt.themeSpacing)((0,Nt.themeDensity)(e)*o)}}}function Za(){return{div:null,style:{flex:"1 1 0"}}}var yt=require("@domphy/core"),be=require("@domphy/theme");function Qa(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,i=(0,yt.toState)(n),t=(0,yt.toState)(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:d=>t.get(d),id:a},{show:l,hide:u,anchorPartial:c}=De({open:o,placement:i,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>(0,be.themeSpacing)((0,be.themeDensity)(d)*1),paddingInline:d=>(0,be.themeSpacing)((0,be.themeDensity)(d)*3),borderRadius:d=>(0,be.themeSpacing)((0,be.themeDensity)(d)*1),color:d=>(0,be.themeColor)(d,"shift-9"),backgroundColor:d=>(0,be.themeColor)(d),fontSize:d=>(0,be.themeSize)(d,"inherit")},$:[mo({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),(0,yt.merge)(c,{ariaDescribedby:a,onMouseEnter:()=>l(),onMouseLeave:()=>u(),onFocus:()=>l(),onBlur:()=>u(),onKeyDown:d=>d.key==="Escape"&&u()}),c}var go=require("@domphy/core");function In(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function ei(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let l of Array.from(i.values()))l();i.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of a)cancelAnimationFrame(l);a.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((l,u)=>{if(!(l instanceof go.ElementNode))return;let c=l.domElement;c&&e.set(In(l,u),c.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((l,u)=>{var w;if(!(l instanceof go.ElementNode))return;let c=l.domElement;if(!c)return;let m=In(l,u),h=e.get(m);if(!h)return;let d=c.getBoundingClientRect(),f=h.left-d.left,S=h.top-d.top;if(Math.abs(f)<.5&&Math.abs(S)<.5)return;(w=i.get(c))==null||w(),c.style.transition="none",c.style.transform=`translate(${f}px, ${S}px)`,c.getBoundingClientRect();let g=requestAnimationFrame(()=>{a.delete(g),c.style.transition=`transform ${o}ms ease ${n}ms`,c.style.transform="translate(0px, 0px)"});a.add(g);let E=!1,b=null,z=()=>{E||(E=!0,b&&(t.delete(b),b=null),i.delete(c),c.removeEventListener("transitionend",O),c.style.transition="",c.style.transform="")},O=We=>{We.propertyName==="transform"&&z()};i.set(c,()=>{E=!0,b&&(clearTimeout(b),t.delete(b),b=null),i.delete(c),c.removeEventListener("transitionend",O)}),c.addEventListener("transitionend",O),b=setTimeout(z,o+n+34),t.add(b)}),e.clear()}}}var zn=require("@domphy/core"),nt=require("@domphy/theme");function ti(r={}){var n;let o=(0,zn.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,nt.themeSize)(e,"inherit"),backgroundColor:e=>(0,nt.themeColor)(e),color:e=>(0,nt.themeColor)(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,nt.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,menuItem,motion,orderedList,pagination,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,scrollArea,segmented,segmentedItem,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stepItem,steps,strong,subscript,superscript,tab,tabPanel,table,tabs,tag,textarea,timeline,timelineItem,toast,toggle,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|