@domphy/ui 0.21.3 → 0.21.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/core-theme-ui.global.js +5 -5
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -8
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Zt=Object.defineProperty,vr=Object.defineProperties,Cr=Object.getOwnPropertyDescriptor,xr=Object.getOwnPropertyDescriptors,Er=Object.getOwnPropertyNames,Jo=Object.getOwnPropertySymbols;var en=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable;var Qo=(r,n,o)=>n in r?Zt(r,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[n]=o,E=(r,n)=>{for(var o in n||(n={}))en.call(n,o)&&Qo(r,o,n[o]);if(Jo)for(var o of Jo(n))kr.call(n,o)&&Qo(r,o,n[o]);return r},V=(r,n)=>vr(r,xr(n));var wr=(r,n)=>{for(var o in n)Zt(r,o,{get:n[o],enumerable:!0})},Tr=(r,n,o,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Er(n))!en.call(r,s)&&s!==o&&Zt(r,s,{get:()=>n[s],enumerable:!(e=Cr(n,s))||e.enumerable});return r};var Dr=r=>Tr(Zt({},"__esModule",{value:!0}),r);var Yi={};wr(Yi,{abbreviation:()=>Pr,accordion:()=>Ir,alert:()=>Lr,avatar:()=>Or,badge:()=>zr,blockquote:()=>Vr,breadcrumb:()=>Rr,breadcrumbEllipsis:()=>Mr,button:()=>$r,buttonGhost:()=>Co,buttonSwitch:()=>Br,card:()=>Hr,code:()=>Fr,combobox:()=>jr,command:()=>qr,commandItem:()=>Gr,commandSearch:()=>Yr,datePicker:()=>Zr,descriptionList:()=>ea,details:()=>ta,dialog:()=>na,divider:()=>ra,drawer:()=>ia,elevation:()=>_,emphasis:()=>la,empty:()=>sa,errorBoundary:()=>ma,fab:()=>da,figure:()=>pa,focusRing:()=>S,formGroup:()=>ha,grid:()=>ga,heading:()=>ya,horizontalRule:()=>ba,icon:()=>Sa,image:()=>va,inputCheckbox:()=>Ca,inputColor:()=>xa,inputDateTime:()=>Ea,inputFile:()=>ka,inputNumber:()=>wa,inputOTP:()=>Ta,inputPassword:()=>La,inputRadio:()=>Oa,inputRange:()=>za,inputSearch:()=>Va,inputSwitch:()=>Ra,inputText:()=>Ma,keyboard:()=>_a,label:()=>Na,link:()=>$a,linkButton:()=>Ha,list:()=>Fa,listItem:()=>Ka,listItemButton:()=>Wa,mark:()=>ja,menu:()=>qa,motion:()=>Ga,orderedList:()=>Ua,pagination:()=>Ja,panelSection:()=>Qa,paragraph:()=>ei,popover:()=>ti,popoverArrow:()=>Ho,preformated:()=>oi,progress:()=>ni,rating:()=>li,ringProgress:()=>si,row:()=>Wo,scrollArea:()=>ci,segmented:()=>ui,select:()=>di,selectBox:()=>fi,selectItem:()=>yi,selectList:()=>bi,skeleton:()=>Si,small:()=>vi,spinner:()=>Ci,splitter:()=>xi,splitterHandle:()=>wi,splitterPanel:()=>ki,stack:()=>Ti,steps:()=>Pi,strong:()=>Ii,subscript:()=>Li,superscript:()=>Oi,table:()=>zi,tabs:()=>Vi,tag:()=>Ft,textarea:()=>Ri,timeline:()=>Mi,timelineItem:()=>_i,toast:()=>Ni,toggleGroup:()=>Ai,toolbar:()=>Hi,toolbarSpacer:()=>Fi,tooltip:()=>Ki,transitionGroup:()=>Wi,unorderedList:()=>ji,visuallyHidden:()=>qi});module.exports=Dr(Yi);var yo=require("@domphy/core"),Ze=require("@domphy/theme");function Pr(r={}){var e,s;let n=(0,yo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,yo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Ze.themeSize)(t),backgroundColor:t=>(0,Ze.themeColor)(t),color:t=>(0,Ze.themeColor)(t,"shift-10",n.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Ze.themeColor)(t,"shift-7",n.get(t)),textUnderlineOffset:(0,Ze.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Ze.themeColor)(t,"shift-11",o.get(t)),textDecorationColor:t=>(0,Ze.themeColor)(t,"shift-9",o.get(t))}}}}var So=require("@domphy/core"),ht=require("@domphy/theme");var bo=require("@domphy/theme");function S(r,n="primary"){let o=(0,bo.themeColor)(r,"surface"),e=(0,bo.themeColor)(r,"shift-9",n);return`0 0 0 2px ${o}, 0 0 0 4px ${e}`}function Ir(r={}){var s,t;let{type:n="single"}=r,o=(0,So.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,So.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(n!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,ht.themeSpacing)((0,ht.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,ht.themeColor)(a,"border-strong",o.get(a))}`,outlineOffset:"-1px",color:a=>(0,ht.themeColor)(a,"text",o.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,ht.themeColor)(a,"border-strong",o.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}var tn=require("@domphy/core"),be=require("@domphy/theme");function Lr(r={}){var o;let n=(0,tn.toState)((o=r.color)!=null?o:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,be.themeSpacing)(3),paddingBlock:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*2),paddingInline:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*4),borderRadius:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,be.themeSpacing)(1)} 0 0 0 ${(0,be.themeColor)(e,"shift-8",n.get(e))}`,backgroundColor:e=>(0,be.themeColor)(e,"inherit",n.get(e)),color:e=>(0,be.themeColor)(e,"shift-10",n.get(e)),fontSize:e=>(0,be.themeSize)(e,"inherit")}}}var on=require("@domphy/core"),it=require("@domphy/theme");function Or(r={}){var o;let n=(0,on.toState)((o=r.color)!=null?o:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,it.themeSpacing)(9),height:(0,it.themeSpacing)(9),fontSize:e=>(0,it.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,it.themeColor)(e,"inherit",n.get(e)),color:e=>(0,it.themeColor)(e,"shift-11",n.get(e)),boxShadow:e=>`0 0 0 1px ${(0,it.themeColor)(e,"border",n.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var vo=require("@domphy/core"),Ee=require("@domphy/theme");function zr(r={}){var s;let{label:n=999}=r,o=(0,vo.toState)(n),e=(0,vo.toState)((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${o.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>(0,Ee.themeSpacing)((0,Ee.themeDensity)(t)*1.5),minWidth:(0,Ee.themeSpacing)(5),height:t=>(0,Ee.themeSpacing)((0,Ee.themeDensity)(t)*5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Ee.themeSize)(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>(0,Ee.themeSpacing)((0,Ee.themeDensity)(t)*999),backgroundColor:t=>(0,Ee.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Ee.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,Ee.themeColor)(t,"shift-0",e.get(t))}`}}}}var nn=require("@domphy/core"),Oe=require("@domphy/theme");function Vr(r={}){var o;let n=(0,nn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>(0,Oe.themeSize)(e,"inherit"),backgroundColor:e=>(0,Oe.themeColor)(e,"inherit",n.get(e)),color:e=>(0,Oe.themeColor)(e,"text",n.get(e)),boxShadow:e=>`inset ${(0,Oe.themeSpacing)(1)} 0 0 0 ${(0,Oe.themeColor)(e,"shift-4",n.get(e))}`,border:"none",paddingBlock:e=>(0,Oe.themeSpacing)((0,Oe.themeDensity)(e)*2),paddingInline:e=>(0,Oe.themeSpacing)((0,Oe.themeDensity)(e)*4),margin:0}}}var rn=require("@domphy/core"),Ke=require("@domphy/theme");function Rr(r={}){var e;let{separator:n="/"}=r,o=(0,rn.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>(0,Ke.themeSize)(s,"inherit"),gap:(0,Ke.themeSpacing)(1),color:s=>(0,Ke.themeColor)(s,"text",o.get(s)),backgroundColor:s=>(0,Ke.themeColor)(s,"inherit",o.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>(0,Ke.themeColor)(s,"text",o.get(s))},"& > *:not(:last-child)::after":{content:`"${n}"`,color:s=>(0,Ke.themeColor)(s,"shift-4",o.get(s)),paddingInlineStart:(0,Ke.themeSpacing)(1)},"& > [aria-current=page]":{color:s=>(0,Ke.themeColor)(s,"shift-10",o.get(s)),pointerEvents:"none"}}}}var an=require("@domphy/core"),lt=require("@domphy/theme");function Mr(r={}){var o;let n=(0,an.toState)((o=r.color)!=null?o:"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,lt.themeSize)(e,"inherit"),paddingInline:(0,lt.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,lt.themeColor)(e,"text",n.get(e)),borderRadius:(0,lt.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,lt.themeColor)(e,"shift-10",n.get(e)),backgroundColor:e=>(0,lt.themeColor)(e,"hover",n.get(e))},"&:focus-visible":{boxShadow:e=>S(e,n.get(e))}}}}var sn=require("@domphy/core"),F=require("@domphy/theme");var Vt={small:"decrease-1",medium:"inherit",large:"increase-1"};var ln=require("@domphy/core"),ue=require("@domphy/theme");var _r={small:.5,medium:1,large:1.5};function Co(r={}){var s,t,a;let n=(0,ln.toState)((s=r.color)!=null?s:"neutral","color"),o=_r[(t=r.size)!=null?t:"medium"],e=Vt[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>(0,ue.themeSize)(i,e),paddingBlock:i=>(0,ue.themeSpacing)((0,ue.themeDensity)(i)*o),paddingInline:i=>(0,ue.themeSpacing)((0,ue.themeDensity)(i)*o),borderRadius:i=>(0,ue.themeSpacing)((0,ue.themeDensity)(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>(0,ue.themeSpacing)((0,ue.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:i=>(0,ue.themeColor)(i,"text",n.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>(0,ue.themeColor)(i,"text",n.get(i)),backgroundColor:i=>(0,ue.themeColor)(i,"hover",n.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>(0,ue.themeColor)(i,"text",n.get(i)),backgroundColor:i=>(0,ue.themeColor)(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>S(i,n.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>(0,ue.themeColor)(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Nr={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function $r(r={}){var a,i,m,u;let n=(a=r.variant)!=null?a:"outline";if(n==="ghost")return Co({color:r.color,size:r.size});let o=(0,sn.toState)((i=r.color)!=null?i:"primary","color"),e=n==="solid",s=Nr[(m=r.size)!=null?m:"medium"],t=Vt[(u=r.size)!=null?u:"medium"];return V(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>(0,F.themeSize)(l,t),paddingBlock:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.block),paddingInline:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.inline),borderRadius:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${(0,F.themeColor)(l,"border-strong",o.get(l))}`,color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-13",o.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-13",o.get(l)):(0,F.themeColor)(l,"inherit",o.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-14",o.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-14",o.get(l)):(0,F.themeColor)(l,"hover",o.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?(0,F.themeColor)(l,"shift-15",o.get(l)):(0,F.themeColor)(l,"increase-2",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>(0,F.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,F.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,F.themeColor)(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}var Jt=require("@domphy/core"),J=require("@domphy/theme");function Br(r={}){var t,a;let{checked:n=!1}=r,o=(0,Jt.toState)(n),e=(0,Jt.toState)((t=r.color)!=null?t:"neutral","color"),s=(0,Jt.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>o.get(i),dataTone:"shift-2",onClick:()=>o.set(!o.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>(0,J.themeSize)(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${(0,J.themeColor)(i,"border",e.get(i))}`,minWidth:(0,J.themeSpacing)(12),minHeight:(0,J.themeSpacing)(6),borderRadius:(0,J.themeSpacing)(999),paddingLeft:(0,J.themeSpacing)(7),paddingRight:(0,J.themeSpacing)(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>(0,J.themeColor)(i,"inherit",e.get(i)),color:i=>(0,J.themeColor)(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,J.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,J.themeSpacing)(5),height:(0,J.themeSpacing)(5),borderRadius:(0,J.themeSpacing)(999),color:i=>(0,J.themeColor)(i,"text"),backgroundColor:i=>(0,J.themeColor)(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>(0,J.themeColor)(i,"increase-3",s.get(i)),outline:"none",color:i=>(0,J.themeColor)(i,"decrease-2"),paddingLeft:(0,J.themeSpacing)(2),paddingRight:(0,J.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,J.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var cn=require("@domphy/core"),$=require("@domphy/theme");var Ar={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function _(r){return Ar[r]}function Hr(r={}){var o;let n=(0,cn.toState)((o=r.color)!=null?o:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),backgroundColor:e=>(0,$.themeColor)(e,"inherit",n.get(e)),color:e=>(0,$.themeColor)(e,"shift-10",n.get(e)),outline:e=>`1px solid ${(0,$.themeColor)(e,"border-strong",n.get(e))}`,outlineOffset:"-1px",boxShadow:_("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),fontWeight:"600",color:e=>(0,$.themeColor)(e,"shift-11",n.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),paddingBottom:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),color:e=>(0,$.themeColor)(e,"text",n.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),color:e=>(0,$.themeColor)(e,"shift-10",n.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,$.themeSpacing)(2),paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,$.themeColor)(e,"border",n.get(e))}`}}}}var mn=require("@domphy/core"),ze=require("@domphy/theme");function Fr(r={}){var o;let n=(0,mn.toState)((o=r.color)!=null?o:"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,ze.themeSize)(e,"inherit"),color:e=>(0,ze.themeColor)(e,"text",n.get(e)),backgroundColor:e=>(0,ze.themeColor)(e,"inherit",n.get(e)),height:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*6),paddingInline:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*1.5),borderRadius:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*1)}}}var We=require("@domphy/core"),q=require("@domphy/theme");var Rt=require("@domphy/core"),Je=require("@domphy/floating");function Ve(r,n){return`domphy-${r}-${n.nodeId}`}function Kr(r,n){var vt,at,Ue,Ct;let{openState:o,placement:e,content:s,keepOpenOnContentHover:t}=n,{kind:a}=n,i=`floating:${a}`,m=null,u=null,l=null,c=null,d=!1,p=r.domElement,y=r.getRoot(),T=Ve(a,r),v={style:{position:"fixed",pointerEvents:"auto",visibility:O=>o.get(O)?"visible":"hidden"},onKeyDown:O=>{O.key==="Escape"&&k()},onMouseEnter:()=>t&&D(),onMouseLeave:()=>t&&k(),_onMount:O=>{var fe;if(l=O.domElement,l.id||(l.id=T),p&&l&&!l.hasAttribute("data-theme")){let Ne=(fe=p.closest("[data-theme]"))==null?void 0:fe.getAttribute("data-theme");Ne&&l.setAttribute("data-theme",Ne)}},_portal:O=>{let fe=p.closest("dialog");if(fe){let Xe=fe.querySelector(":scope > #domphy-floating");return Xe||(Xe=fe.ownerDocument.createElement("div"),Xe.id="domphy-floating",Object.assign(Xe.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),fe.appendChild(Xe)),Xe}let Ne=O.domElement.querySelector("#domphy-floating");if(!Ne){let Xe={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};Ne=O.children.insert(Xe).domElement}return Ne}},f=O=>(0,Rt.merge)(O,v);f(s);let b=()=>{d||(d=!0,c=y.children.insert(s),c._behaviorInstances.set(i,He))},x=()=>{d&&(!l||!l.isConnected)&&(u==null||u(),u=null,c=null,l=null,d=!1),b(),p&&l&&(u==null||u(),u=(0,Je.autoUpdate)(p,l,()=>{(0,Je.computePosition)(p,l,{placement:e.get(),middleware:[(0,Je.offset)(12),(0,Je.flip)(),(0,Je.shift)()],strategy:"fixed"}).then(({x:O,y:fe,placement:Ne})=>{l&&(Object.assign(l.style,{left:`${O}px`,top:`${fe}px`}),e.set(Ne))})}),o.set(!0))},h=()=>{u==null||u(),u=null,c&&(c.remove(),c=null),l=null,d=!1,o.set(!1)},D=()=>{m&&clearTimeout(m),m=setTimeout(x,100)},k=()=>{m&&clearTimeout(m),m=setTimeout(h,100)},Z=O=>{if(!o.get()||!p||!l)return;let fe=O.target;!p.contains(fe)&&!l.contains(fe)&&k()};(vt=y.domElement)==null||vt.addEventListener("click",Z);let Ce=O=>{O.key==="Escape"&&o.get()&&k()},ge=(Ct=(Ue=(at=y.domElement)==null?void 0:at.ownerDocument)!=null?Ue:y.domElement)!=null?Ct:null;ge==null||ge.addEventListener("keydown",Ce);let ie=O=>{O?d||x():d&&h()},Le=o.addListener(ie),pe=!1,xe=!1,He,Fe=O=>{var fe;O._behaviors=V(E({},(fe=O._behaviors)!=null?fe:{}),{[i]:{attach:()=>He,props:{}}})};return He={show:D,hide:k,panelId:T,update(O){if(!xe&&(O.openState!==o&&(Le(),o=O.openState,Le=o.addListener(ie),o.get()&&x()),e=O.placement,s=O.content,t=O.keepOpenOnContentHover,f(s),Fe(s),c)){xe=!0;try{c.patch(s)}finally{xe=!1}}},destroy(){var O;pe||(pe=!0,m&&clearTimeout(m),m=null,u==null||u(),u=null,c==null||c.remove(),c=null,l=null,d=!1,Le(),Le=()=>{},(O=y.domElement)==null||O.removeEventListener("click",Z),ge==null||ge.removeEventListener("keydown",Ce))}},Fe(s),ie(o.get()),He}function Qe(r){let{kind:n,open:o=!1,placement:e}=r,s=(0,Rt.toState)(o),t=`floating:${n}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},(0,Rt.behavior)(t,Kr,{kind:n,openState:s,placement:e,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}var gt=require("@domphy/core"),U=require("@domphy/theme");var Wr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function Ft(r={}){var e;let{removable:n=!1}=r,o=(0,gt.toState)((e=r.color)!=null?e:"neutral","color");return V(E({dataTone:"shift-2"},(0,gt.behavior)("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:(0,gt.rawHtml)(Wr),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>(0,U.themeSpacing)((0,U.themeDensity)(l)*1),width:l=>(0,U.themeSpacing)((0,U.themeDensity)(l)*4),height:l=>(0,U.themeSpacing)((0,U.themeDensity)(l)*4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>(0,U.themeColor)(l,"shift-4",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof gt.ElementNode&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:n})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>(0,U.themeSpacing)((0,U.themeDensity)(s)*6),paddingBlock:0,borderRadius:s=>(0,U.themeSpacing)((0,U.themeDensity)(s)*999),paddingInlineStart:s=>(0,U.themeSpacing)((0,U.themeDensity)(s)*2.5),paddingInlineEnd:s=>(0,U.themeSpacing)((0,U.themeDensity)(s)*(n?1:2.5)),gap:(0,U.themeSpacing)(1.5),fontSize:s=>(0,U.themeSize)(s,"decrease-1"),backgroundColor:s=>(0,U.themeColor)(s,"inherit",o.get(s)),color:s=>(0,U.themeColor)(s,"text",o.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${(0,U.themeColor)(s,"border-strong",o.get(s))}`}})}function jr(r){let{options:n=[],placement:o="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,We.toState)(r.value),i=(0,We.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"combobox",open:i,placement:(0,We.toState)(o),content:r.content}),c={onClick:(h,D)=>!t&&u(D),dataTone:"shift-14",style:{backgroundColor:h=>(0,q.themeColor)(h,"inherit"),color:h=>(0,q.themeColor)(h,"text"),borderRadius:h=>(0,q.themeSpacing)((0,q.themeDensity)(h)*2),outline:h=>`1px solid ${(0,q.themeColor)(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,We.merge)(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,q.themeSpacing)(6),marginInlineStart:(0,q.themeSpacing)(2),fontSize:h=>(0,q.themeSize)(h,"inherit"),color:h=>(0,q.themeColor)(h,"text",e),backgroundColor:h=>(0,q.themeColor)(h,"inherit",e)},p=h=>{var D,k;return(k=(D=h==null?void 0:h.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:k.query},y=h=>{let D=h;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return h},T={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:h=>i.get(h),ariaControls:h=>h!=null&&h.elementNode?Ve("combobox",y(h.elementNode)):void 0},v=h=>h?((0,We.merge)(h,E({onFocus:(D,k)=>m(k),style:d,_key:"combobox-input"},T)),h):E({input:null,ariaLabel:"Filter options",onFocus:(D,k)=>m(k),value:D=>{var k,Z;return(Z=(k=p(D))==null?void 0:k.get(D))!=null?Z:""},onInput:(D,k)=>{var Z;(Z=k.getBehavior("comboboxInner"))==null||Z.query.set(D.target.value)},style:d,_key:"combobox-input"},T),f=h=>({div:D=>{i.get(D);let k=h.state.get(D),Z=Array.isArray(k)?k:[k],ge=h.options.filter(ie=>Z.includes(ie.value)).map(ie=>({span:ie.label,$:[Ft({color:h.color,removable:!0})],_key:ie.value,_onRemove:Le=>{let pe=h.state.get(),He=(Array.isArray(pe)?pe:[pe]).filter(Fe=>Fe!==ie.value);h.multiple?h.state.set(He):h.state.set(He[0])}}));return ge.push(v(h.input)),ge},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,q.themeSpacing)(1)}}),x=V(E({_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(h,D)=>{D[h.tagName]=[f({options:n,multiple:t,color:e,state:a,input:r.input})]}},(0,We.behavior)("comboboxInner",(h,D)=>{let k=h.getMetadata("comboboxQuery");return k||(k=(0,We.toState)(""),h.setMetadata("comboboxQuery",k)),{query:k,update(Z){h.children.update([f(Z)])}}},{options:n,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:(0,q.themeSpacing)(32),outlineOffset:"-1px",outline:h=>`1px solid ${(0,q.themeColor)(h,"border-strong","neutral")}`,paddingBlock:h=>(0,q.themeSpacing)((0,q.themeDensity)(h)*1),paddingInline:h=>(0,q.themeSpacing)((0,q.themeDensity)(h)*1),borderRadius:h=>(0,q.themeSpacing)((0,q.themeDensity)(h)*1.5),fontSize:h=>(0,q.themeSize)(h,"inherit"),color:h=>(0,q.themeColor)(h,"text",e),backgroundColor:h=>(0,q.themeColor)(h,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:h=>S(h,e)}}});return(0,We.merge)(l,x),l}var Qt=require("@domphy/core"),Q=require("@domphy/theme");function qr(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,n)=>{(0,Qt.merge)(n,{_context:{command:{query:(0,Qt.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Yr(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,Q.themeSize)(e,"inherit"),paddingInline:e=>(0,Q.themeSpacing)((0,Q.themeDensity)(e)*3),paddingBlock:e=>(0,Q.themeSpacing)((0,Q.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,Q.themeColor)(e,"border",n)}`,outline:"none",color:e=>(0,Q.themeColor)(e,"shift-10",n),backgroundColor:e=>(0,Q.themeColor)(e,"inherit",n),"&::placeholder":{color:e=>(0,Q.themeColor)(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,Q.themeColor)(e,"shift-6",o),boxShadow:e=>S(e,o)}}}}function Gr(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,Q.themeSize)(e,"inherit"),height:e=>(0,Q.themeSpacing)(6+(0,Q.themeDensity)(e)*2),paddingInline:e=>(0,Q.themeSpacing)((0,Q.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,Q.themeColor)(e,"shift-13",n),backgroundColor:e=>(0,Q.themeColor)(e,"inherit",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>(0,Q.themeColor)(e,"shift-13",n),backgroundColor:e=>(0,Q.themeColor)(e,"hover",n)},"&:focus-visible":{boxShadow:e=>S(e,o)}}}}var ke=require("@domphy/core"),P=require("@domphy/theme");var he=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),xt=(r,n)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+n),xo=(r,n)=>new Date(r.getFullYear(),r.getMonth()+n,r.getDate()),Kt=(r,n)=>!!r&&!!n&&r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate(),Eo=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,ko=(r,n)=>xt(r,-((r.getDay()-n+7)%7));function Ur(r){var n,o;try{let e=new Intl.Locale(r),s=(o=(n=e.getWeekInfo)==null?void 0:n.call(e))!=null?o:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function Xr(r,n){let o=n,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(o),{update(a){a.selectionIsCallerOwned||t(a.selection,o.selection),t(a.viewYear,o.viewYear),t(a.viewMonth,o.viewMonth),t(a.focused,o.focused),t(a.hovered,o.hovered),t(a.hour,o.hour),t(a.minute,o.minute),t(a.open,o.open),(a.selection!==o.selection||a.onChange!==o.onChange)&&s(a),o=a},destroy(){e==null||e(),e=null}}}function Zr(r={}){var Go,Uo,Xo,Zo;let{mode:n="single",time:o=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(Go=r.weekStartsOn)!=null?Go:Ur(a),l=(0,ke.toState)((Uo=r.accentColor)!=null?Uo:"primary","accentColor"),c=(0,ke.toState)((Xo=r.placement)!=null?Xo:"bottom-start"),d=(0,ke.toState)((Zo=r.value)!=null?Zo:n==="range"?[null,null]:null),p=(()=>{let g=d.get(),C=n==="range"?g==null?void 0:g[0]:g;return C instanceof Date?C:new Date})(),y=(0,ke.toState)(p.getFullYear(),"viewYear"),T=(0,ke.toState)(p.getMonth(),"viewMonth"),v=(0,ke.toState)(he(p),"focused"),f=(0,ke.toState)(null,"hovered"),b=(0,ke.toState)(p.getHours(),"hour"),x=(0,ke.toState)(p.getMinutes(),"minute"),h=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},o?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),k=new Intl.DateTimeFormat(a,{weekday:"short"}),Z=new Intl.DateTimeFormat(a,{dateStyle:"full"}),Ce=g=>g?h.format(g):"",ge=g=>{if(i)return i(g);if(n==="range"){let[C,w]=g!=null?g:[null,null];return C?`${Ce(C)} \u2013 ${Ce(w)}`:""}return Ce(g)},ie=Array.from({length:7},(g,C)=>k.format(new Date(2023,0,1+(C+u)%7))),Le=g=>!!e&&he(g)<he(e)||!!s&&he(g)>he(s)||!!t&&t(g),pe=g=>{if(!o)return he(g);let C=he(g);return C.setHours(b.get(),x.get(),0,0),C},xe=(g,C)=>{var L;if(Le(g))return;if(n==="single"){d.set(pe(g)),o||Xt(C);return}let[w,z]=(L=d.get())!=null?L:[null,null];!w||w&&z?d.set([pe(g),null]):he(g)<he(w)?(d.set([pe(g),pe(w)]),o||Xt(C)):(d.set([w,pe(g)]),o||Xt(C))},He=()=>{var g;if(o)if(n==="single"){let C=d.get();C&&d.set(pe(C))}else{let[C,w]=(g=d.get())!=null?g:[null,null];d.set([C&&pe(C),w&&pe(w)])}},Fe=(g,C)=>{var zt;if(n!=="range")return!1;let[w,z]=(zt=d.get(C))!=null?zt:[null,null],L=z!=null?z:f.get(C);if(!w||!L)return!1;let M=he(w)<=he(L)?w:L,$e=he(w)<=he(L)?L:w,we=he(g);return we>=he(M)&&we<=he($e)},vt=(g,C)=>{let w=d.get(C);if(n==="range"){let[z,L]=w!=null?w:[null,null];return Kt(g,z)||Kt(g,L)}return Kt(g,w)},at=g=>{y.set(g.getFullYear()),T.set(g.getMonth())},Ue=g=>{let C=xo(new Date(y.get(),T.get(),1),g);at(C)},Ct=g=>y.set(y.get()+g),O=g=>{var w;let C=(w=g==null?void 0:g.getRoot())==null?void 0:w.domElement;setTimeout(()=>{var z;(z=C==null?void 0:C.querySelector(`[data-date="${Eo(v.get())}"]`))==null||z.focus()},0)},fe=pr(),Ne=(0,ke.toState)(!1),{show:Xe,hide:Xt,anchorPartial:Yo}=Qe({kind:"datePicker",open:Ne,placement:c,content:fe}),ur=E({type:"text",readonly:!0,value:g=>ge(d.get(g)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:g=>Ne.get(g),ariaControls:g=>g!=null&&g.elementNode?Ve("datePicker",g.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(g,C)=>{fo(C)},onFocus:(g,C)=>{fo(C)},onKeyDown:(g,C)=>{let w=g.key;(w==="ArrowDown"||w==="Enter")&&(g.preventDefault(),fo(C))}},(0,ke.behavior)("datePicker",Xr,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:y,viewMonth:T,focused:v,hovered:f,hour:b,minute:x,open:Ne,onChange:m}));function fo(g){var w;let C=(w=dr())!=null?w:new Date;v.set(he(C)),at(C),Xe(g),O(g)}function dr(){var C;let g=d.get();return n==="range"?(C=g==null?void 0:g[0])!=null?C:null:g!=null?g:null}return(0,ke.merge)(Yo,ur),Yo;function pr(){let g=(M,$e,we)=>({button:M,type:"button",ariaLabel:$e,onClick:we,style:Jr()}),C={div:[g("\xAB","Previous year",()=>Ct(-1)),g("\u2039","Previous month",()=>Ue(-1)),{div:M=>D.format(new Date(y.get(M),T.get(M),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:M=>(0,P.themeSize)(M)}},g("\u203A","Next month",()=>Ue(1)),g("\xBB","Next year",()=>Ct(1))],style:{display:"flex",alignItems:"center",gap:(0,P.themeSpacing)(1),marginBottom:(0,P.themeSpacing)(2)}},w={div:ie.map((M,$e)=>({div:M,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:we=>(0,P.themeSize)(we,"decrease-1"),fontWeight:"bold",color:we=>(0,P.themeColor)(we,"shift-7"),paddingBlock:(0,P.themeSpacing)(1)},_key:$e})),role:"row",style:un()},z={div:M=>hr(M),role:"grid",ariaLabel:"Calendar",onKeyDown:br,onMouseLeave:()=>n==="range"&&f.set(null),style:{display:"flex",flexDirection:"column",gap:(0,P.themeSpacing)(.5)}},L=[C,w,z];return o&&L.push(fr()),L.push(yr()),{div:L,role:"dialog",ariaModal:"false",dataTone:"shift-14",style:{minWidth:(0,P.themeSpacing)(70),padding:(0,P.themeSpacing)(3),borderRadius:M=>(0,P.themeSpacing)((0,P.themeDensity)(M)*2),backgroundColor:M=>(0,P.themeColor)(M,"inherit"),color:M=>(0,P.themeColor)(M,"text"),outline:M=>`1px solid ${(0,P.themeColor)(M,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}}}function hr(g){let C=new Date(y.get(g),T.get(g),1),w=T.get(g),z=ko(C,u),L=[];for(let M=0;M<6;M++){let $e=[];for(let we=0;we<7;we++){let zt=xt(z,M*7+we);$e.push(gr(zt,w,g))}L.push({div:$e,role:"row",style:un(),_key:M})}return L}function gr(g,C,w){let z=Le(g),L=vt(g,w),M=Fe(g,w),$e=g.getMonth()!==C,we=Kt(g,v.get(w)),zt=Kt(g,new Date);return{button:String(g.getDate()),type:"button",role:"gridcell",tabIndex:we?0:-1,ariaSelected:L,ariaDisabled:z,disabled:z,ariaLabel:Z.format(g),dataDate:Eo(g),onClick:(oe,Sr)=>xe(g,Sr),onMouseEnter:()=>n==="range"&&f.set(g),style:{appearance:"none",border:"none",cursor:z?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,P.themeSpacing)(1),fontSize:oe=>(0,P.themeSize)(oe),fontFamily:"inherit",opacity:z?.35:$e?.5:1,backgroundColor:oe=>L?(0,P.themeColor)(oe,"shift-7",l.get(oe)):M?(0,P.themeColor)(oe,"hover",l.get(oe)):"transparent",color:oe=>L?(0,P.themeColor)(oe,"shift-0",l.get(oe)):(0,P.themeColor)(oe,"text"),outline:zt?oe=>`1px solid ${(0,P.themeColor)(oe,"shift-6",l.get(oe))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:oe=>L?(0,P.themeColor)(oe,"shift-7",l.get(oe)):(0,P.themeColor)(oe,"shift-3",l.get(oe))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:oe=>S(oe,l.get(oe))}},_key:Eo(g)}}function fr(){let g=(C,w,z)=>({select:Array.from({length:C},(L,M)=>({option:String(M).padStart(2,"0"),value:String(M),selected:$e=>w.get($e)===M,_key:M})),ariaLabel:z,onChange:L=>{w.set(Number(L.target.value)),He()},style:Qr()});return{div:[g(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},g(60,x,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,P.themeSpacing)(1),marginTop:(0,P.themeSpacing)(3)}}}function yr(){let g=(C,w)=>({button:C,type:"button",onClick:(z,L)=>w(L),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:z=>(0,P.themeSize)(z,"decrease-1"),color:z=>(0,P.themeColor)(z,"muted",l.get(z)),padding:(0,P.themeSpacing)(1)}});return{div:[g("Today",C=>{let w=new Date;v.set(he(w)),at(w),O(C)}),g("Clear",()=>{d.set(n==="range"?[null,null]:null),f.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,P.themeSpacing)(2),paddingTop:(0,P.themeSpacing)(2),borderTop:C=>`1px solid ${(0,P.themeColor)(C,"border")}`}}}function br(g,C){let w=g,z=v.get(),L=null;switch(w.key){case"ArrowLeft":L=xt(z,-1);break;case"ArrowRight":L=xt(z,1);break;case"ArrowUp":L=xt(z,-7);break;case"ArrowDown":L=xt(z,7);break;case"Home":L=ko(z,u);break;case"End":L=xt(ko(z,u),6);break;case"PageUp":L=xo(z,w.shiftKey?-12:-1);break;case"PageDown":L=xo(z,w.shiftKey?12:1);break;case"Enter":case" ":w.preventDefault(),xe(z,C);return;default:return}w.preventDefault(),v.set(L),at(L),O(C)}}function un(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,P.themeSpacing)(.5)}}function Jr(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),color:r=>(0,P.themeColor)(r,"muted"),width:(0,P.themeSpacing)(7),height:(0,P.themeSpacing)(7),borderRadius:(0,P.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,P.themeColor)(r,"shift-3")}}}function Qr(){return{fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),padding:(0,P.themeSpacing)(1),borderRadius:(0,P.themeSpacing)(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${(0,P.themeColor)(r,"border-strong")}`,backgroundColor:r=>(0,P.themeColor)(r,"inherit"),color:r=>(0,P.themeColor)(r,"text")}}var dn=require("@domphy/core"),st=require("@domphy/theme");function ea(r={}){var o;let n=(0,dn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${(0,st.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,st.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,st.themeSize)(e,"inherit"),color:e=>(0,st.themeColor)(e,"shift-10",n.get(e))},"& dd":{margin:0,fontSize:e=>(0,st.themeSize)(e,"inherit"),color:e=>(0,st.themeColor)(e,"text",n.get(e))}}}}var wo=require("@domphy/core"),N=require("@domphy/theme");function ta(r={}){var s,t;let{duration:n=240}=r,o=(0,wo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,wo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,N.themeColor)(a,"inherit",o.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",o.get(a)),color:a=>(0,N.themeColor)(a,"shift-10",o.get(a)),fontSize:a=>(0,N.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,N.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*4),height:(0,N.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,N.themeSpacing)(2),height:(0,N.themeSpacing)(2),flexShrink:0,marginTop:(0,N.themeSpacing)(-.5),borderInlineEnd:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",o.get(a))}`,borderBottom:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",o.get(a))}`,transform:"rotate(45deg)",transition:`transform ${n}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",o.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${n}ms ease, opacity ${n}ms ease, padding ${n}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*1),paddingBottom:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3)}}}}var to=require("@domphy/core"),Be=require("@domphy/theme");var Wt=0;function eo(){Wt++,Wt===1&&(document.body.style.overflow="hidden")}function Mt(){Wt=Math.max(0,Wt-1),Wt===0&&(document.body.style.overflow="")}var pn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function oa(r,n){let{state:o}=n,e=null,s=!1,t=!1,a=null,i=r.domElement;i.setAttribute("aria-modal","true");let m=()=>{s=!1,typeof i.close=="function"&&i.close(),i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="none",t&&(Mt(),t=!1),e==null||e.focus(),e=null},u=p=>{if(p.key!=="Tab")return;let y=Array.from(i.querySelectorAll(pn)).filter(f=>!f.closest("[aria-hidden='true']")&&f.offsetParent!==null);if(!y.length){p.preventDefault();return}let T=y[0],v=y[y.length-1];p.shiftKey?(document.activeElement===T||document.activeElement===i)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),T.focus())},l=p=>{p.preventDefault(),o.set(!1)};i.addEventListener("cancel",l);let c=p=>{if(p)s=!1,a&&(clearTimeout(a),a=null),e=document.activeElement,i.style.visibility="visible",i.style.pointerEvents="auto",i.style.display="",typeof i.showModal=="function"&&!i.open&&i.showModal(),t||(eo(),t=!0),i.addEventListener("keydown",u),requestAnimationFrame(()=>{i.style.opacity="1";let y=i.querySelector(pn);y==null||y.focus()});else{if(s=!0,i.style.opacity="0",i.removeEventListener("keydown",u),!i.open){m();return}a=setTimeout(()=>{a=null,s&&m()},350)}};c(o.get());let d=o.addListener(c);return{requestClose:()=>o.set(!1),onTransitionEnd:p=>{s&&p.target===i&&p.propertyName==="opacity"&&m()},update(p){p.state!==o&&(d(),o=p.state,d=o.addListener(c))},destroy(){a&&(clearTimeout(a),a=null),d(),i.removeEventListener("cancel",l),t&&(Mt(),t=!1),i.removeEventListener("keydown",u),e==null||e.focus(),e=null}}}function na(r={}){let{color:n="neutral",open:o=!1,labelledBy:e,describedBy:s}=r,t=(0,to.toState)(o);return V(E({_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},(0,to.behavior)("dialog",oa,{state:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(a,i)=>{var l;if(a.target!==i.domElement)return;let m=i.domElement.getBoundingClientRect();a.clientX>=m.left&&a.clientX<=m.right&&a.clientY>=m.top&&a.clientY<=m.bottom||(l=i.getBehavior("dialog"))==null||l.requestClose()},onTransitionEnd:(a,i)=>{var m;return(m=i.getBehavior("dialog"))==null?void 0:m.onTransitionEnd(a)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:a=>(0,Be.themeSize)(a,"inherit"),color:a=>(0,Be.themeColor)(a,"shift-10",n),backgroundColor:a=>(0,Be.themeColor)(a,"inherit",n),border:"none",borderRadius:a=>(0,Be.themeSpacing)((0,Be.themeDensity)(a)*2),padding:a=>(0,Be.themeSpacing)((0,Be.themeDensity)(a)*3),boxShadow:_("high"),"&::backdrop":{backgroundColor:a=>(0,Be.themeColor)(a,"shift-2","neutral"),opacity:.75}}})}var hn=require("@domphy/core"),ct=require("@domphy/theme");function ra(r={}){var o;let n=(0,hn.toState)((o=r.color)!=null?o:"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,ct.themeSpacing)(2),fontSize:e=>(0,ct.themeSize)(e,"inherit"),backgroundColor:e=>(0,ct.themeColor)(e),color:e=>(0,ct.themeColor)(e,"text",n.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,ct.themeColor)(e,"border-strong",n.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,ct.themeColor)(e,"border-strong",n.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var oo=require("@domphy/core"),Te=require("@domphy/theme");var To={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},gn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},_t=r=>r==="left"||r==="right";function fn(r,n){return r==="start"?n?"right":"left":r==="end"?n?"left":"right":r}function aa(r,n){let{state:o,placement:e,size:s}=n,t=r.domElement;t.setAttribute("aria-modal","true");let a=v=>{v.preventDefault(),o.set(!1)};t.addEventListener("cancel",a);let i=(v,f)=>{let x=(v==="start"||v==="end")&&(t.ownerDocument.documentElement.dir==="rtl"||t.ownerDocument.dir==="rtl"),h=fn(v,x),D=f!=null?f:_t(h)?(0,Te.themeSpacing)(80):(0,Te.themeSpacing)(64);return t.style.margin=gn[h],t.style.width=_t(h)?D:"100dvw",t.style.height=_t(h)?"100dvh":D,h},m=i(e,s),u=!1,l=!1,c=null,d=()=>{c=null,u&&(u=!1,typeof t.close=="function"&&t.close(),t.style.visibility="hidden",t.style.pointerEvents="none",t.style.display="none",l&&(Mt(),l=!1))},p=v=>{v.target===t&&v.propertyName==="transform"&&d()};t.addEventListener("transitionend",p);let y=v=>{if(v)u=!1,c&&(clearTimeout(c),c=null),t.style.visibility="visible",t.style.pointerEvents="auto",t.style.display="",typeof t.showModal=="function"&&!t.open&&t.showModal(),l||(eo(),l=!0),requestAnimationFrame(()=>{t.style.transform="translate(0, 0)"});else{if(u=!0,t.style.transform=To[m],!t.open){d();return}c=setTimeout(d,350)}};y(o.get());let T=o.addListener(y);return{requestClose:()=>o.set(!1),update(v){v.state!==o&&(T(),o=v.state,T=o.addListener(y)),(v.placement!==e||v.size!==s)&&(e=v.placement,s=v.size,m=i(e,s),o.get()||(t.style.transform=To[m]))},destroy(){c&&(clearTimeout(c),c=null),T(),t.removeEventListener("cancel",a),t.removeEventListener("transitionend",p),l&&(Mt(),l=!1)}}}function ia(r={}){let{color:n="neutral",open:o=!1,placement:e="end",size:s}=r,t=(0,oo.toState)(o),a=fn(e,!1),i=_t(a)?(0,Te.themeSpacing)(80):(0,Te.themeSpacing)(64),m=s!=null?s:i;return V(E({_onInsert:u=>{u.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},(0,oo.behavior)("drawer",aa,{state:t,placement:e,size:s})),{onClick:(u,l)=>{var p;if(u.target!==l.domElement)return;let c=l.domElement.getBoundingClientRect();u.clientX>=c.left&&u.clientX<=c.right&&u.clientY>=c.top&&u.clientY<=c.bottom||(p=l.getBehavior("drawer"))==null||p.requestClose()},style:{transform:To[a],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:u=>(0,Te.themeSize)(u,"inherit"),color:u=>(0,Te.themeColor)(u,"shift-10",n),backgroundColor:u=>(0,Te.themeColor)(u,"inherit",n),border:"none",padding:u=>(0,Te.themeSpacing)((0,Te.themeDensity)(u)*3),margin:gn[a],width:_t(a)?m:"100dvw",height:_t(a)?"100dvh":m,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:_("high"),"&::backdrop":{backgroundColor:u=>(0,Te.themeColor)(u,"shift-2","neutral"),opacity:.75}}})}var yn=require("@domphy/core"),no=require("@domphy/theme");function la(r={}){var o;let n=(0,yn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>(0,no.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,no.themeColor)(e,"shift-10",n.get(e))}}}var bn=require("@domphy/core"),ft=require("@domphy/theme");function sa(r={}){var o;let n=(0,bn.toState)((o=r.color)!=null?o:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,ft.themeSpacing)(3),paddingBlock:(0,ft.themeSpacing)(12),paddingInline:(0,ft.themeSpacing)(6),textAlign:"center",color:e=>(0,ft.themeColor)(e,"muted",n.get(e)),"& > :first-child":{color:e=>(0,ft.themeColor)(e,"shift-5",n.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,ft.themeColor)(e,"text",n.get(e))}}}}var Do="errorBoundaryOriginal";function ca(r){var o;let n=r.getMetadata(Do);if(typeof n=="function"){(o=r._childrenRelease)==null||o.call(r),r._setupFunctionChildren(n);return}if(n!=null){r.children.update(Array.isArray(n)?n:[n]);return}r.children.update([])}function ma(r={}){return{_onSchedule:(n,o)=>{n.getMetadata(Do)===void 0&&n.setMetadata(Do,o[n.tagName])},_onError:(n,o)=>{var t,a;(t=r.onError)==null||t.call(r,o);let e=()=>ca(n),s=typeof r.fallback=="function"?r.fallback(o,e):(a=r.fallback)!=null?a:{div:"An error occurred."};n.children.update([s])}}}var Sn=require("@domphy/core"),mt=require("@domphy/theme");var ua={small:8,medium:10,large:14};function da(r={}){var e,s;let n=(0,Sn.toState)((e=r.color)!=null?e:"primary","color"),o=(0,mt.themeSpacing)(ua[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:o,height:o,borderRadius:"50%",fontSize:t=>(0,mt.themeSize)(t,"inherit"),backgroundColor:t=>(0,mt.themeColor)(t,"shift-13",n.get(t)),color:t=>(0,mt.themeColor)(t,"shift-0","neutral"),boxShadow:_("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,mt.themeColor)(t,"shift-14",n.get(t)),boxShadow:_("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,mt.themeColor)(t,"shift-15",n.get(t)),boxShadow:_("low")},"&:focus-visible":{boxShadow:t=>`${_("medium")}, ${S(t,n.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var vn=require("@domphy/core"),et=require("@domphy/theme");function pa(r={}){var o;let n=(0,vn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:(0,et.themeSpacing)(2),marginInline:0,marginTop:(0,et.themeSpacing)(3),marginBottom:(0,et.themeSpacing)(3),color:e=>(0,et.themeColor)(e,"text",n.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,et.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,et.themeSize)(e,"decrease-1"),color:e=>(0,et.themeColor)(e,"muted",n.get(e)),lineHeight:1.45}}}}var Cn=require("@domphy/core"),K=require("@domphy/theme");function ha(r={}){var s;let{layout:n="horizontal"}=r,o=(0,Cn.toState)((s=r.color)!=null?s:"neutral","color"),e=n==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),fontSize:t=>(0,K.themeSize)(t,"inherit"),backgroundColor:t=>(0,K.themeColor)(t,"inherit",o.get(t)),color:t=>(0,K.themeColor)(t,"text",o.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,K.themeSpacing)(4),rowGap:(0,K.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,K.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),color:t=>(0,K.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,K.themeColor)(t,"inherit",o.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:(0,K.themeSpacing)((0,K.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,K.themeSpacing)(2)} * -1)`,fontSize:t=>(0,K.themeSize)(t,"decrease-1"),color:t=>(0,K.themeColor)(t,"text",o.get(t))}}}}var ro=require("@domphy/theme");function ga(r={}){let{columns:n=1,gap:o=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof n=="number"?`repeat(${n}, minmax(0, 1fr))`:n,gap:s=>(0,ro.themeSpacing)((0,ro.themeDensity)(s)*o)},e?{alignItems:e}:{})}}var xn=require("@domphy/core"),Nt=require("@domphy/theme"),fa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function ya(r={}){var o;let n=(0,xn.toState)((o=r.color)!=null?o:"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,Nt.themeColor)(e,"shift-11",n.get(e)),marginTop:0,marginBottom:(0,Nt.themeSpacing)(2),fontSize:e=>{let s=fa[e.elementNode.tagName]||"inherit";return(0,Nt.themeSize)(e,s)}}}}var En=require("@domphy/core"),$t=require("@domphy/theme");function ba(r={}){var o;let n=(0,En.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:(0,$t.themeSpacing)(3),marginBottom:(0,$t.themeSpacing)(3),backgroundColor:e=>(0,$t.themeColor)(e,"inherit",n.get(e)),color:e=>(0,$t.themeColor)(e,"text",n.get(e))}}}var kn=require("@domphy/core"),Et=require("@domphy/theme");function Sa(r={}){var o;let n=(0,kn.toState)((o=r.color)!=null?o:"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,Et.themeSpacing)(4),height:(0,Et.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Et.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Et.themeColor)(e,"text",n.get(e))}}}var wn=require("@domphy/core"),jt=require("@domphy/theme");function va(r={}){var o;let n=(0,wn.toState)((o=r.color)!=null?o:"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,jt.themeSpacing)(2),backgroundColor:e=>(0,jt.themeColor)(e,"inherit",n.get(e)),color:e=>(0,jt.themeColor)(e,"text",n.get(e))}}}var Po=require("@domphy/core"),X=require("@domphy/theme");function Ca(r={}){var e,s;let n=(0,Po.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Po.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,X.themeSize)(t,"inherit"),color:t=>(0,X.themeColor)(t,"text",n.get(t)),display:"inline-flex",position:"relative",width:(0,X.themeSpacing)(6),height:(0,X.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,X.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,X.themeColor)(t,"border-strong",n.get(t))}`,color:t=>(0,X.themeColor)(t,"text",n.get(t)),width:(0,X.themeSpacing)(4),height:(0,X.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,X.themeColor)(t,"hover",n.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",o.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",o.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,X.themeSpacing)(.5)} solid ${(0,X.themeColor)(t,"inherit",o.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",o.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-3",o.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,X.themeColor)(t,"shift-8",o.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:(0,X.themeSpacing)(1.5),boxShadow:t=>S(t,o.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,X.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Tn=require("@domphy/core"),le=require("@domphy/theme");function xa(r={}){var o;let n=(0,Tn.toState)((o=r.color)!=null?o:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,le.themeSize)(e,"inherit"),color:e=>(0,le.themeColor)(e,"text",n.get(e)),paddingBlock:e=>(0,le.themeSpacing)((0,le.themeDensity)(e)*1),paddingInline:e=>(0,le.themeSpacing)((0,le.themeDensity)(e)*1),blockSize:e=>(0,le.themeSpacing)(6+(0,le.themeDensity)(e)*2),inlineSize:e=>(0,le.themeSpacing)(6+(0,le.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,le.themeSpacing)((0,le.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,n.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,le.themeSpacing)((0,le.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,le.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,le.themeColor)(e,"border-strong","neutral")}`}}}}var Io=require("@domphy/core"),se=require("@domphy/theme");function Ea(r={}){var s,t;let{mode:n="datetime-local"}=r,o=(0,Io.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Io.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:n,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>(0,se.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,se.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,se.themeColor)(a,"inherit",o.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,se.themeColor)(a,"border-strong",o.get(a))}`,borderRadius:a=>(0,se.themeSpacing)((0,se.themeDensity)(a)*1.5),paddingInline:a=>(0,se.themeSpacing)((0,se.themeDensity)(a)*3),height:a=>(0,se.themeSpacing)(6+(0,se.themeDensity)(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,se.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,se.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,se.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,se.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,se.themeSpacing)(.5)} solid ${(0,se.themeColor)(a,"shift-6","error")}`}}}}var Lo=require("@domphy/core"),W=require("@domphy/theme");function ka(r={}){var e,s;let n=(0,Lo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Lo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,W.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,W.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,W.themeColor)(t,"inherit",n.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,W.themeColor)(t,"border-strong",n.get(t))}`,borderRadius:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1.5),height:t=>(0,W.themeSpacing)(6+(0,W.themeDensity)(t)*2),paddingInline:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,W.themeSpacing)(1),height:(0,W.themeSpacing)(6),paddingInline:(0,W.themeSpacing)(2),cursor:"pointer",color:t=>(0,W.themeColor)(t,"shift-11",n.get(t)),backgroundColor:t=>(0,W.themeColor)(t,"surface",n.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,W.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,W.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,W.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,W.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,W.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,W.themeColor)(t,"shift-3","neutral")}}}}var Oo=require("@domphy/core"),ne=require("@domphy/theme");function wa(r={}){var e,s;let n=(0,Oo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Oo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,ne.themeSpacing)(10),paddingInlineStart:t=>(0,ne.themeSpacing)((0,ne.themeDensity)(t)*3),paddingInlineEnd:t=>(0,ne.themeSpacing)((0,ne.themeDensity)(t)*1.5),paddingBlock:t=>(0,ne.themeSpacing)((0,ne.themeDensity)(t)*1),borderRadius:t=>(0,ne.themeSpacing)((0,ne.themeDensity)(t)*1.5),fontSize:t=>(0,ne.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ne.themeColor)(t,"border-strong",n.get(t))}`,color:t=>(0,ne.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,ne.themeColor)(t,"inherit",n.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,ne.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,ne.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ne.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,ne.themeColor)(t,"muted","neutral")}}}}var zo=require("@domphy/theme");function Ta(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:(0,zo.themeSpacing)(2),"& > *":{minWidth:`${(0,zo.themeSpacing)(9)}!important`}},_onMount:r=>{let n=r.domElement,o=()=>Array.from(n.querySelectorAll("input")),e=a=>{let i=o(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=o(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,p,y;a.preventDefault();let i=(p=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?p:"",m=o(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((T,v)=>{let f=m[l+v];f&&(f.value=T,f.dispatchEvent(new Event("input",{bubbles:!0})),f.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(y=m[c])==null||y.focus()};n.addEventListener("input",e),n.addEventListener("keydown",s),n.addEventListener("paste",t),r.addHook("Remove",()=>{n.removeEventListener("input",e),n.removeEventListener("keydown",s),n.removeEventListener("paste",t)})}}}var yt=require("@domphy/core"),ye=require("@domphy/theme");var Da='<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>',Pa='<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>',Ia=["name","value","onInput","disabled","required"];function Dn(r){if(r!=null)return typeof r=="function"?r:(0,yt.isState)(r)?n=>r.get(n):r}function La(r={}){var t,a;let n=(0,yt.toState)((t=r.color)!=null?t:"neutral","color"),o=(0,yt.toState)((a=r.accentColor)!=null?a:"primary","accentColor"),e=(0,yt.toState)(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of Ia)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var T,v,f,b,x,h,D;let m=(T=r.name)!=null?T:s.name,u=Dn((v=r.value)!=null?v:s.value),l=(f=r.onInput)!=null?f:s.onInput,c=Dn((b=r.disabled)!=null?b:s.disabled),d=(x=r.required)!=null?x:s.required,p=V(E(E(E(E(E({input:null,type:k=>e.get(k)?"text":"password",ariaLabel:(h=r.ariaLabel)!=null?h:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),y={button:k=>(0,yt.rawHtml)(e.get(k)?Pa:Da),type:"button",ariaLabel:k=>e.get(k)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(p),i.children.insert(y)},style:{display:"flex",alignItems:"center",gap:i=>(0,ye.themeSpacing)((0,ye.themeDensity)(i)*1),paddingBlock:i=>(0,ye.themeSpacing)((0,ye.themeDensity)(i)*1),paddingInline:i=>(0,ye.themeSpacing)((0,ye.themeDensity)(i)*3),borderRadius:i=>(0,ye.themeSpacing)((0,ye.themeDensity)(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ye.themeColor)(i,"border-strong",n.get(i))}`,color:i=>(0,ye.themeColor)(i,"text",n.get(i)),backgroundColor:i=>(0,ye.themeColor)(i,"inherit",n.get(i)),fontSize:i=>(0,ye.themeSize)(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${(0,ye.themeColor)(i,"shift-5",o.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,o.get(i))}}}}var Vo=require("@domphy/core"),Se=require("@domphy/theme");function Oa(r={}){var e,s;let n=(0,Vo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Vo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>(0,Se.themeSize)(t,"inherit"),color:t=>(0,Se.themeColor)(t,"text",n.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,Se.themeSpacing)(6),height:(0,Se.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,Se.themeColor)(t,"border-strong",n.get(t))}`,color:t=>(0,Se.themeColor)(t,"text",n.get(t)),width:(0,Se.themeSpacing)(4),height:(0,Se.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,Se.themeColor)(t,"hover",n.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,Se.themeColor)(t,"shift-6",o.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,Se.themeColor)(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,Se.themeColor)(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,o.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,Se.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Ro=require("@domphy/core"),De=require("@domphy/theme");function za(r={}){var e,s;let n=(0,Ro.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Ro.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:(0,De.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,De.themeSpacing)(1.5),borderRadius:(0,De.themeSpacing)(999),backgroundColor:t=>(0,De.themeColor)(t,"shift-3",n.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,De.themeSpacing)(4),height:(0,De.themeSpacing)(4),borderRadius:(0,De.themeSpacing)(999),border:"none",marginTop:`calc((${(0,De.themeSpacing)(1.5)} - ${(0,De.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,De.themeColor)(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,De.themeColor)(t,"shift-10",o.get(t))},borderRadius:(0,De.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Mo=require("@domphy/core"),ce=require("@domphy/theme");function Va(r={}){var e,s;let n=(0,Mo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Mo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>(0,ce.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,ce.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,ce.themeColor)(t,"inherit",n.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ce.themeColor)(t,"border-strong",n.get(t))}`,borderRadius:t=>(0,ce.themeSpacing)((0,ce.themeDensity)(t)*1.5),minWidth:(0,ce.themeSpacing)(32),paddingInline:t=>(0,ce.themeSpacing)((0,ce.themeDensity)(t)*3),paddingBlock:t=>(0,ce.themeSpacing)((0,ce.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,ce.themeColor)(t,"shift-7",n.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,ce.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,ce.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,ce.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ce.themeColor)(t,"border-strong","neutral")}`}}}}var Pn=require("@domphy/core"),me=require("@domphy/theme");function Ra(r={}){var o;let n=(0,Pn.toState)((o=r.accentColor)!=null?o:"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,me.themeSize)(e,"inherit"),backgroundColor:e=>(0,me.themeColor)(e,"inherit"),color:e=>(0,me.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,me.themeSpacing)(9),height:(0,me.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,me.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,me.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>S(e,n.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,me.themeColor)(e,"increase-3",n.get(e))},"&::after":{left:`calc(100% - ${(0,me.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,me.themeSpacing)(3),height:(0,me.themeSpacing)(3),borderRadius:(0,me.themeSpacing)(999),left:(0,me.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,me.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,me.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,me.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,me.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var _o=require("@domphy/core"),j=require("@domphy/theme");function Ma(r={}){var s,t;let{type:n="text"}=r,o=(0,_o.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,_o.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:n,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,j.themeSpacing)(10),paddingInline:a=>(0,j.themeSpacing)((0,j.themeDensity)(a)*3),paddingBlock:a=>(0,j.themeSpacing)((0,j.themeDensity)(a)*1),borderRadius:a=>(0,j.themeSpacing)((0,j.themeDensity)(a)*1.5),fontSize:a=>(0,j.themeSize)(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,j.themeColor)(a,"border-strong",o.get(a))}`,color:a=>(0,j.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,j.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,j.themeColor)(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>(0,j.themeColor)(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,j.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>(0,j.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,j.themeColor)(a,"border-strong","neutral")}`,color:a=>(0,j.themeColor)(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${(0,j.themeSpacing)(.5)} solid ${(0,j.themeColor)(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${(0,j.themeSpacing)(.5)} solid ${(0,j.themeColor)(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${(0,j.themeSpacing)(.5)} solid ${(0,j.themeColor)(a,"shift-6","warning")}`}}}}var In=require("@domphy/core"),Pe=require("@domphy/theme");function _a(r={}){var o;let n=(0,In.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>(0,Pe.themeSize)(e,"inherit"),color:e=>(0,Pe.themeColor)(e,"text",n.get(e)),backgroundColor:e=>(0,Pe.themeColor)(e,"inherit",n.get(e)),paddingBlock:e=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(e)*.5),paddingInline:e=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(e)*1.5),borderRadius:e=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(e)*1),outline:e=>`1px solid ${(0,Pe.themeColor)(e,"border-strong",n.get(e))}`}}}var No=require("@domphy/core"),bt=require("@domphy/theme");function Na(r={}){var e,s;let n=(0,No.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,No.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,bt.themeSpacing)(2),fontSize:t=>(0,bt.themeSize)(t,"inherit"),color:t=>(0,bt.themeColor)(t,"text",n.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,bt.themeColor)(t,"shift-10",o.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,bt.themeColor)(t,"muted","neutral")}}}}var $o=require("@domphy/core"),tt=require("@domphy/theme");function $a(r={}){var e,s;let n=(0,$o.toState)((e=r.color)!=null?e:"primary","color"),o=(0,$o.toState)((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>(0,tt.themeSize)(t,"inherit"),backgroundColor:t=>(0,tt.themeColor)(t),color:t=>(0,tt.themeColor)(t,"shift-13",n.get(t)),textDecoration:"none","&:visited":{color:t=>(0,tt.themeColor)(t,"shift-13",o.get(t))},"&:hover:not([disabled])":{color:t=>(0,tt.themeColor)(t,"shift-14",n.get(t)),textDecoration:"underline"},borderRadius:(0,tt.themeSpacing)(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>(0,tt.themeColor)(t,"muted","neutral")}}}}var Ln=require("@domphy/core"),I=require("@domphy/theme");var Ba={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},Aa={small:.5,medium:1,large:1.5};function Ha(r={}){var i,m,u;let n=(i=r.variant)!=null?i:"outline",o=(0,Ln.toState)((m=r.color)!=null?m:n==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=Vt[e];if(n==="ghost"){let l=Aa[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>(0,I.themeSize)(c,s),textDecoration:"none",paddingBlock:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),paddingInline:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),borderRadius:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>(0,I.themeColor)(c,"text",o.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",o.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"hover",o.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",o.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"increase-2",o.get(c))},"&:focus-visible":{boxShadow:c=>S(c,o.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>(0,I.themeColor)(c,"border-strong","neutral")}}}}let t=n==="solid",a=Ba[e];return V(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>(0,I.themeSize)(l,s),textDecoration:"none",paddingBlock:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.block),paddingInline:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.inline),borderRadius:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${(0,I.themeColor)(l,"border-strong",o.get(l))}`,color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-13",o.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-13",o.get(l)):(0,I.themeColor)(l,"inherit",o.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-14",o.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-14",o.get(l)):(0,I.themeColor)(l,"hover",o.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?(0,I.themeColor)(l,"shift-15",o.get(l)):(0,I.themeColor)(l,"increase-2",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>(0,I.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,I.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,I.themeColor)(l,"muted","neutral")}}})}var On=require("@domphy/core"),A=require("@domphy/theme");function Fa(r={}){var o;let n=(o=r.color)!=null?o:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>(0,A.themeColor)(e,"inherit",n),color:e=>(0,A.themeColor)(e,"text",n)}}}function Ka(r={}){let{dense:n=!1}=r;return{style:{display:"flex",alignItems:"center",gap:o=>(0,A.themeSpacing)((0,A.themeDensity)(o)*2),paddingBlock:o=>(0,A.themeSpacing)(n?1:(0,A.themeDensity)(o)*2),paddingInline:o=>(0,A.themeSpacing)((0,A.themeDensity)(o)*3),fontSize:o=>(0,A.themeSize)(o,"inherit"),color:o=>(0,A.themeColor)(o,"text")}}}function Wa(r={}){var s,t;let n=(0,On.toState)((s=r.color)!=null?s:"neutral","color"),o=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,A.themeSpacing)((0,A.themeDensity)(a)*2),paddingBlock:a=>(0,A.themeSpacing)(e?1:(0,A.themeDensity)(a)*2),paddingInline:a=>(0,A.themeSpacing)((0,A.themeDensity)(a)*3),fontSize:a=>(0,A.themeSize)(a,"inherit"),color:a=>(0,A.themeColor)(a,"text",n.get(a)),borderRadius:a=>(0,A.themeSpacing)((0,A.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,A.themeColor)(a,"hover",n.get(a))},"&:active:not([disabled])":{backgroundColor:a=>(0,A.themeColor)(a,"increase-2",n.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,A.themeColor)(a,"shift-3",o),color:a=>(0,A.themeColor)(a,"shift-12",o)},"&:focus-visible":{boxShadow:a=>S(a,o)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var zn=require("@domphy/core"),Re=require("@domphy/theme");function ja(r={}){var o;let n=(0,zn.toState)((o=r.accentColor)!=null?o:"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,Re.themeSize)(e,"inherit"),color:e=>(0,Re.themeColor)(e,"text",n.get(e)),backgroundColor:e=>(0,Re.themeColor)(e,"inherit",n.get(e)),height:e=>(0,Re.themeSpacing)((0,Re.themeDensity)(e)*6),borderRadius:e=>(0,Re.themeSpacing)((0,Re.themeDensity)(e)*1),paddingInline:e=>(0,Re.themeSpacing)((0,Re.themeDensity)(e)*1.5)}}}var ao=require("@domphy/core"),Y=require("@domphy/theme");function qa(r={items:[]}){var l;let{items:n=[],selectable:o=!0,color:e="neutral",accentColor:s="primary"}=r,t=(0,ao.toState)((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let p=c.nodeId;return d.items.map((y,T)=>{var f;let v=(f=y.key)!=null?f:T;return V(E({button:typeof y.label=="string"?[{span:y.label}]:[y.label],_key:v,type:"button",id:`menuitem${p}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=y.onClick)==null||b.call(y)},onKeyDown:b=>{var Z;let x=b.key;if(x==="Enter"||x===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(x))return;b.preventDefault();let h=d.items.map((Ce,ge)=>{var ie;return(ie=Ce.key)!=null?ie:ge}),D=h.indexOf(v),k=D;x==="ArrowDown"?k=(D+1)%h.length:x==="ArrowUp"?k=(D-1+h.length)%h.length:x==="Home"?k=0:x==="End"&&(k=h.length-1),(Z=document.getElementById(`menuitem${p}${h[k]}`))==null||Z.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,Y.themeSpacing)(2),width:"100%",fontSize:b=>(0,Y.themeSize)(b,"inherit"),height:b=>(0,Y.themeSpacing)(6+(0,Y.themeDensity)(b)*2),paddingInline:b=>(0,Y.themeSpacing)((0,Y.themeDensity)(b)*3),border:"none",outline:"none",color:b=>(0,Y.themeColor)(b,"text",d.color),backgroundColor:b=>(0,Y.themeColor)(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>(0,Y.themeColor)(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>(0,Y.themeColor)(b,"shift-3",d.accentColor),color:b=>(0,Y.themeColor)(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let p=d;return{update(y){y.activeKey!==p.activeKey&&!y.activeKeyIsCallerOwned&&y.activeKey.set(p.activeKey.get()),p=y,p.items.length!==0&&c.children.update(i(c,p))}}},u={items:n,activeKey:t,activeKeyIsCallerOwned:a,selectable:o,color:e,accentColor:s};return V(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{n.length!==0&&(d[c.tagName]=i(c,u))}},(0,ao.behavior)("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>(0,Y.themeSpacing)((0,Y.themeDensity)(c)*2),paddingInline:c=>(0,Y.themeSpacing)((0,Y.themeDensity)(c)*2),fontSize:c=>(0,Y.themeSize)(c,"inherit"),backgroundColor:c=>(0,Y.themeColor)(c,"inherit",e),color:c=>(0,Y.themeColor)(c,"text",e),borderRadius:c=>(0,Y.themeSpacing)((0,Y.themeDensity)(c)*2),outline:c=>`1px solid ${(0,Y.themeColor)(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:_("medium")}})}var Rn=require("@domphy/core");var Vn=r=>!!r&&typeof r.get=="function"&&r._isState===!0,ot=r=>{let n={},o=[];for(let e in r){let s=r[e];e==="x"?o.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?o.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?o.push(`scale(${s})`):e==="rotate"?o.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):n[e]=s}return o.length&&(n.transform=o.join(" ")),n};function Bo(r={}){var n,o,e,s;return{duration:(n=r.duration)!=null?n:300,delay:(o=r.delay)!=null?o:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function Ao(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function Ya(r,n){let o=r.domElement,e=n,s,t=i=>{s==null||s(),s=void 0,!(!o||!Vn(i))&&(s=i.addListener(m=>{Ao()?Object.assign(o.style,ot(m)):typeof o.animate=="function"&&o.animate([ot(m)],Bo(e.transition))}))},a=(i,m)=>{if(!o)return;let u=Vn(i.animate)?i.animate.get():i.animate;if(Ao()){u?Object.assign(o.style,ot(u)):m==="enter"&&i.initial&&Object.assign(o.style,ot(i.initial));return}if(typeof o.animate=="function")if(u){let l=m==="enter"&&i.initial?[ot(i.initial),ot(u)]:[ot(u)];o.animate(l,Bo(i.transition))}else m==="enter"&&i.initial&&Object.assign(o.style,ot(i.initial))};return a(n,"enter"),t(n.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function Ga(r={}){return V(E({},(0,Rn.behavior)("motion",(n,o)=>Ya(n,o),r)),{_onBeforeRemove:(n,o)=>{var a,i;let e=n.domElement,s=n.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return o();if(Ao())return Object.assign(e.style,ot(t)),o();e.animate([ot(t)],Bo((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(o,o)}})}var Mn=require("@domphy/core"),kt=require("@domphy/theme");function Ua(r={}){var o;let n=(0,Mn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>(0,kt.themeSize)(e,"inherit"),backgroundColor:e=>(0,kt.themeColor)(e),color:e=>(0,kt.themeColor)(e,"text",n.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,kt.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var wt=require("@domphy/core"),ee=require("@domphy/theme");function Xa(r,n){if(n<=7)return Array.from({length:n},(t,a)=>a+1);let o=[1];r>3&&o.push("...");let e=Math.max(2,r-1),s=Math.min(n-1,r+1);for(let t=e;t<=s;t++)o.push(t);return r<n-2&&o.push("..."),o.push(n),o}function Za(r,n,o,e){if((0,wt.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,wt.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function _n(r,n){let o=r.getMetadata("paginationTotal");return o||(o=(0,wt.toState)(n),r.setMetadata("paginationTotal",o)),o}function Ja(r){let{total:n,color:o="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(a)*2),height:a=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(a)*2),paddingInline:a=>(0,ee.themeSpacing)((0,ee.themeDensity)(a)*2),borderRadius:a=>(0,ee.themeSpacing)((0,ee.themeDensity)(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>(0,ee.themeSize)(a,"inherit"),backgroundColor:"transparent",color:a=>(0,ee.themeColor)(a,"shift-13",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>(0,ee.themeColor)(a,"shift-13",o),backgroundColor:a=>(0,ee.themeColor)(a,"hover",o)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=V(E({},s),{backgroundColor:a=>(0,ee.themeColor)(a,"shift-13",e),color:a=>(0,ee.themeColor)(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>(0,ee.themeColor)(a,"shift-13",e)}});return V(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=Za(a,"paginationPage",r.value,1),m=_n(a,n),u={div:l=>{let c=i.get(l),d=m.get(l),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let y=0;for(let T of Xa(c,d))if(T==="...")p.push({span:"\u2026",_key:`ellipsis-${y++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>(0,ee.themeSpacing)((0,ee.themeDensity)(v)*2),color:v=>(0,ee.themeColor)(v,"shift-7",o)}});else{let v=T===c;p.push({button:String(T),_key:`page-${T}`,type:"button",ariaLabel:`Page ${T}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(T),style:v?t:s})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),p},style:{display:"flex",alignItems:"center",gap:(0,ee.themeSpacing)(1)}};a.children.insert(u)}},(0,wt.behavior)("pagination-total",a=>({update(i){_n(a,i.total).set(i.total)}}),{total:n})),{style:{display:"inline-flex"}})}var Nn=require("@domphy/core"),Bt=require("@domphy/theme");function Qa(r={}){var s;let{padding:n=4,divider:o=!1}=r,e=(0,Nn.toState)((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>(0,Bt.themeSpacing)((0,Bt.themeDensity)(t)*n)},o?{borderBottom:t=>`1px solid ${(0,Bt.themeColor)(t,"border",e.get(t))}`}:{})}}var $n=require("@domphy/core"),io=require("@domphy/theme");function ei(r={}){var o;let n=(0,$n.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>(0,io.themeSize)(e,"inherit"),color:e=>(0,io.themeColor)(e,"text",n.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var qt=require("@domphy/core"),St=require("@domphy/theme");function ti(r){var c;let{open:n=!1,placement:o="bottom",openOn:e="click"}=r,s=(0,qt.toState)(n),t=(0,qt.toState)(o),{show:a,hide:i,anchorPartial:m}=Qe({kind:"popover",open:s,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>(0,St.themeColor)(d,"inherit"),color:d=>(0,St.themeColor)(d,"text"),borderRadius:d=>(0,St.themeSpacing)((0,St.themeDensity)(d)*2),outline:d=>`1px solid ${(0,St.themeColor)(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};return(c=r.content).$||(c.$=[]),r.content.$.push(u),(0,qt.merge)(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?Ve("popover",d.elementNode):void 0,onMouseEnter:(d,p)=>e==="hover"&&a(p),onMouseLeave:(d,p)=>e==="hover"&&i(p),onClick:(d,p)=>{e==="click"&&(s.get()?i(p):a(p))},onKeyDown:(d,p)=>{d.key==="Escape"&&s.get()&&i(p)},onFocus:(d,p)=>e==="hover"&&a(p),onBlur:(d,p)=>{if(e!=="hover")return;let y=d.relatedTarget,v=p.getRoot().domElement.querySelector(`#${Ve("popover",p)}`);y&&(v!=null&&v.contains(y))||i(p)}}),m}var Bn=require("@domphy/core"),je=require("@domphy/theme");function Ho(r={}){let{placement:n="bottom-end",color:o="neutral",sideOffset:e=(0,je.themeSpacing)(6),bordered:s=!0}=r,t=(0,Bn.toState)(n),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>(0,je.themeSize)(l),backgroundColor:l=>(0,je.themeColor)(l),color:l=>(0,je.themeColor)(l,"text",o),position:"relative","&::after":{content:'""',position:"absolute",width:(0,je.themeSpacing)(1.5),height:(0,je.themeSpacing)(1.5),backgroundColor:l=>(0,je.themeColor)(l,"inherit",o),borderWidth:s?"1px":0,borderColor:l=>(0,je.themeColor)(l,"border-strong",o),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",p=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${p}) rotate(45deg)`}}}}}var An=require("@domphy/core"),Me=require("@domphy/theme");function oi(r={}){var o;let n=(0,An.toState)((o=r.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>(0,Me.themeSize)(e,"inherit"),color:e=>(0,Me.themeColor)(e,"text",n.get(e)),backgroundColor:e=>(0,Me.themeColor)(e,"inherit",n.get(e)),border:"none",paddingBlock:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2),paddingInline:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*3),borderRadius:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2)}}}var Fo=require("@domphy/core"),nt=require("@domphy/theme");function ni(r={}){var e,s;let n=(0,Fo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Fo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:(0,nt.themeSpacing)(2),border:0,borderRadius:(0,nt.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,nt.themeColor)(t,"inherit",n.get(t)),color:t=>(0,nt.themeColor)(t,"text",n.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,nt.themeColor)(t,"inherit",n.get(t)),borderRadius:(0,nt.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,nt.themeColor)(t,"shift-9",o.get(t)),borderRadius:(0,nt.themeSpacing)(999),transition:"width 220ms ease"}}}}var ut=require("@domphy/core"),Tt=require("@domphy/theme");var ri='<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>',ai='<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 Hn(r,n){var o,e,s;r.onChange=n.onChange,r.readOnly=(o=n.readOnly)!=null?o:!1,r.max=(e=n.max)!=null?e:5,r.color=(s=n.color)!=null?s:"warning",(0,ut.isState)(n.value)?n.value!==r.valueState&&r.valueState.set(n.value.get()):n.value!==void 0&&r.valueState.set(n.value)}function ii(r,n,o,e){let s=a=>{let i=e.get(a);return i>0?i:o.valueState.get(a)},t={button:a=>(0,ut.rawHtml)(n<=s(a)?ri:ai),_key:n,type:"button",ariaLabel:`${n} star${n>1?"s":""}`,onClick:()=>{var i;if(o.readOnly)return;let a=n===o.valueState.get()?0:n;o.valueState.set(a),(i=o.onChange)==null||i.call(o,a),e.set(0)},onMouseEnter:()=>{o.readOnly||e.set(n)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(o.readOnly)return;let i=o.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(o.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;o.valueState.set(m),(l=o.onChange)==null||l.call(o,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:(0,Tt.themeSpacing)(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,o.color)}}};r.children.insert(t)}function Ko(r,n,o){let e=r.children.items;for(;e.length>n.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=n.max;s++)ii(r,s,n,o)}function li(r={}){var e,s,t,a,i,m,u;let n={valueState:(0,ut.toState)((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},o=(0,ut.toState)(0);return V(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,Tt.themeSpacing)(.5),fontSize:l=>(0,Tt.themeSize)(l,"increase-1"),cursor:n.readOnly?"default":"pointer",color:l=>(0,Tt.themeColor)(l,"muted",n.color)}},(0,ut.behavior)("rating",(l,c)=>(Hn(n,c),Ko(l,n,o),{update(d){Hn(n,d),Ko(l,n,o)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{Ko(l,n,o)}})}var lo=require("@domphy/core"),Dt=require("@domphy/theme");function si(r={}){var m,u,l;let{size:n=16,thickness:o=.25}=r,e=(0,lo.toState)((m=r.value)!=null?m:0,"value"),s=(0,lo.toState)((u=r.color)!=null?u:"primary","color"),t=(0,lo.toState)((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-o)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,Dt.themeSpacing)(n),height:(0,Dt.themeSpacing)(n),borderRadius:"50%",color:c=>(0,Dt.themeColor)(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${(0,Dt.themeColor)(c,"shift-9",s.get(c))} ${e.get(c)}%, ${(0,Dt.themeColor)(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}var so=require("@domphy/theme");function Wo(r={}){let{gap:n=4,align:o="center",justify:e,wrap:s=!1}=r;return{style:E(E({display:"flex",alignItems:o,gap:t=>(0,so.themeSpacing)((0,so.themeDensity)(t)*n)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}var Fn=require("@domphy/core"),rt=require("@domphy/theme");function ci(r={}){var o;let n=(0,Fn.toState)((o=r.color)!=null?o:"neutral","color");return{style:{overflow:"auto",color:e=>(0,rt.themeColor)(e,"text",n.get(e)),"&::-webkit-scrollbar":{width:(0,rt.themeSpacing)(2),height:(0,rt.themeSpacing)(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-5",n.get(e)),borderRadius:(0,rt.themeSpacing)(999),border:`${(0,rt.themeSpacing)(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-7",n.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,rt.themeColor)(e,"shift-5",n.get(e))} transparent`}}}var Pt=require("@domphy/core"),de=require("@domphy/theme");function Kn(r,n,o,e){if((0,Pt.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,Pt.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function mi(r,n,o,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=n.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(o),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function Wn(r,n,o,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>n.get(u)===a,tabIndex:u=>{var c,d;let l=n.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>n.set(a),onKeyDown:u=>mi(u,r,a,n),style:{cursor:"pointer",fontSize:u=>(0,de.themeSize)(u,"inherit"),height:(0,de.themeSpacing)(6),paddingBlock:(0,de.themeSpacing)(1),paddingInline:(0,de.themeSpacing)(3),border:"none",borderRadius:(0,de.themeSpacing)(10),color:u=>(0,de.themeColor)(u,"text",o),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,de.themeColor)(u,"shift-3",o)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,de.themeColor)(u,"increase-2",o)},"&[aria-checked=true]":{backgroundColor:u=>(0,de.themeColor)(u,"shift-0",e),color:u=>(0,de.themeColor)(u,"shift-10",e),boxShadow:_("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${_("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function ui(r={items:[]}){var t,a,i;let{items:n=[],color:o="neutral",accentColor:e="primary"}=r,s={items:n,color:o,accentColor:e};return V(E({role:"radiogroup",_context:{segmented:{value:(0,Pt.toState)((i=(a=r.value)!=null?a:(t=n[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=Kn(m,"segmentedValue",r.value,(d=(c=n[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=Wn(n,l,o,e)}},(0,Pt.behavior)("segmented-items",m=>({update(u){var c,d;let l=Kn(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(Wn(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,de.themeSpacing)(1),paddingInline:(0,de.themeSpacing)(1),gap:(0,de.themeSpacing)(.5),borderRadius:(0,de.themeSpacing)(10),backgroundColor:m=>(0,de.themeColor)(m,"inherit",o),color:m=>(0,de.themeColor)(m,"text",o)}})}var B=require("@domphy/theme");function di(r={}){let{color:n="neutral",accentColor:o="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,B.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,B.themeColor)(e,"text",n),backgroundColor:e=>(0,B.themeColor)(e,"inherit",n),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,B.themeColor)(e,"border-strong",n)}`,borderRadius:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1.5),paddingBlock:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1),paddingLeft:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*3),paddingRight:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,B.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,B.themeSpacing)(2)} center`,backgroundSize:`${(0,B.themeSpacing)(2.5)} ${(0,B.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,B.themeSpacing)(6+(0,B.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,B.themeColor)(e,"shift-5",o)}`},"&:focus-visible":{boxShadow:e=>S(e,o)},"& optgroup":{color:e=>(0,B.themeColor)(e,"shift-11",n)},"& option[disabled]":{color:e=>(0,B.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,B.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,B.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,B.themeColor)(e,"shift-2","neutral")}}}}var dt=require("@domphy/core"),re=require("@domphy/theme");var pi=1e3;function hi(r){let n=r.getMetadata("selectBoxTypeahead");return n||(n={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",n)),n}var jn=(r,n)=>r.trim().toLowerCase().startsWith(n);function gi(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(n=>n.getAttribute("aria-disabled")!=="true"&&!n.hasAttribute("disabled")):[]}function fi(r){let{options:n=[],placement:o="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,dt.toState)(r.value),i=(0,dt.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"selectBox",open:i,placement:(0,dt.toState)(o),content:r.content}),c={onClick:(f,b)=>!t&&u(b),dataTone:"shift-14",style:{backgroundColor:f=>(0,re.themeColor)(f,"inherit"),color:f=>(0,re.themeColor)(f,"text"),borderRadius:f=>(0,re.themeSpacing)((0,re.themeDensity)(f)*2),outline:f=>`1px solid ${(0,re.themeColor)(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,dt.merge)(r.content,c);let d=f=>({div:b=>{let x=f.state.get(b),h=Array.isArray(x)?x:[x];return f.options.filter(k=>h.includes(k.value)).map(k=>({span:k.label,$:[Ft({color:f.color,removable:f.multiple})],_key:k.value,_onRemove:Z=>{let Ce=f.state.get(),ie=(Array.isArray(Ce)?Ce:[Ce]).filter(Le=>Le!==k.value);f.multiple?f.state.set(ie):f.state.set(ie[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,re.themeSpacing)(1),flex:1}}),p=(f,b)=>({update(x){f.children.update([d(x)])}}),y=f=>i.get()?u(f):m(f),T=(f,b)=>{var ge,ie,Le,pe;let x=hi(b);x.timer&&clearTimeout(x.timer),x.buffer+=f.toLowerCase(),x.timer=setTimeout(()=>{x.buffer=""},pi);let h=x.buffer.length>1&&new Set(x.buffer).size===1,D=h?x.buffer[0]:x.buffer;if(i.get()){let xe=b.getRoot().domElement,He=(ge=xe==null?void 0:xe.querySelector(`#${Ve("selectBox",b)}`))!=null?ge:null,Fe=gi(He).filter(Ct=>{var O;return jn((O=Ct.textContent)!=null?O:"",D)});if(!Fe.length)return;let vt=(Le=(ie=b.domElement)==null?void 0:ie.ownerDocument)==null?void 0:Le.activeElement,at=h&&vt?Fe.indexOf(vt):-1,Ue=Fe[(at+1)%Fe.length];Ue.focus(),(pe=Ue.scrollIntoView)==null||pe.call(Ue,{block:"nearest"});return}if(t)return;let k=n.filter(xe=>jn(xe.label,D));if(!k.length)return;let Z=h?k.findIndex(xe=>xe.value===a.get()):-1,Ce=k[(Z+1)%k.length];a.set(Ce.value)},v=V(E({_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(f,b)=>{b[f.tagName]=[d({options:n,multiple:t,color:e,state:a})]}},(0,dt.behavior)("selectBoxInner",p,{options:n,multiple:t,color:e,state:a})),{onClick:(f,b)=>y(b),tabindex:0,role:"button",ariaExpanded:f=>i.get(f),ariaHaspopup:"listbox",ariaControls:f=>f!=null&&f.elementNode?Ve("selectBox",f.elementNode):void 0,onKeyDown:(f,b)=>{let x=f.key;if(x==="Escape"){u(b);return}if(x==="Enter"||x===" "){f.preventDefault(),y(b);return}if(x==="ArrowDown"&&!i.get()){f.preventDefault(),m(b);return}let h=f;x.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&T(x,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>(0,re.themeSpacing)(6+(0,re.themeDensity)(f)*2),minWidth:(0,re.themeSpacing)(32),outlineOffset:"-1px",outline:f=>`1px solid ${(0,re.themeColor)(f,"border-strong","neutral")}`,paddingInline:f=>(0,re.themeSpacing)((0,re.themeDensity)(f)*2),borderRadius:f=>(0,re.themeSpacing)((0,re.themeDensity)(f)*1.5),fontSize:f=>(0,re.themeSize)(f,"inherit"),color:f=>(0,re.themeColor)(f,"text",e),backgroundColor:f=>(0,re.themeColor)(f,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:f=>S(f,e)}}});return(0,dt.merge)(l,v),l}var Ie=require("@domphy/theme");function yi(r={}){let{accentColor:n="primary",color:o="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,Ie.themeSize)(t,"inherit"),height:t=>(0,Ie.themeSpacing)(6+(0,Ie.themeDensity)(t)*2),paddingInline:t=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,Ie.themeColor)(t,"text",o),backgroundColor:t=>(0,Ie.themeColor)(t,"inherit",o),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,Ie.themeColor)(t,"hover",o)},"&[aria-selected=true]":{backgroundColor:t=>(0,Ie.themeColor)(t,"shift-6",n),color:t=>(0,Ie.themeColor)(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n)}}}}var qn=require("@domphy/core"),qe=require("@domphy/theme");function bi(r={}){var a;let{color:n="neutral",multiple:o=!1}=r,e=(0,qn.toState)((a=r.value)!=null?a:o?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:o?"true":void 0,_context:{select:{value:e,multiple:o}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,qe.themeSpacing)((0,qe.themeDensity)(i)*2),paddingInline:i=>(0,qe.themeSpacing)((0,qe.themeDensity)(i)*2),fontSize:i=>(0,qe.themeSize)(i,"inherit"),backgroundColor:i=>(0,qe.themeColor)(i,"inherit",n),color:i=>(0,qe.themeColor)(i,"text",n)}}}var co=require("@domphy/core"),Ye=require("@domphy/theme");function Si(r={}){var s;let n=(0,co.toState)((s=r.color)!=null?s:"neutral","color"),o={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,co.hashString)(JSON.stringify(o));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>(0,Ye.themeSize)(t),color:t=>(0,Ye.themeColor)(t,"text",n.get(t)),height:(0,Ye.themeSpacing)(6),display:"block",borderRadius:(0,Ye.themeSpacing)(1),backgroundColor:t=>(0,Ye.themeColor)(t,"inherit",n.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,Ye.themeColor)(t,"inherit",n.get(t))} 0%, ${(0,Ye.themeColor)(t,"shift-2",n.get(t))} 50%, ${(0,Ye.themeColor)(t,"inherit",n.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:o}}}var Yn=require("@domphy/core"),mo=require("@domphy/theme");function vi(r={}){var o;let n=(0,Yn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>(0,mo.themeSize)(e,"inherit"),color:e=>(0,mo.themeColor)(e,"shift-10",n.get(e))}}}var uo=require("@domphy/core"),Ge=require("@domphy/theme"),Un={to:{transform:"rotate(360deg)"}},Gn=(0,uo.hashString)(JSON.stringify(Un));function Ci(r={}){var o;let n=(0,uo.toState)((o=r.color)!=null?o:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>(0,Ge.themeSize)(e),backgroundColor:e=>(0,Ge.themeColor)(e),color:e=>(0,Ge.themeColor)(e,"text",n.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,Ge.themeSpacing)(6),height:(0,Ge.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,Ge.themeSpacing)(.5)} solid ${(0,Ge.themeColor)(e,"border-strong",n.get(e))}`,borderTopColor:e=>(0,Ge.themeColor)(e,"shift-9",n.get(e)),boxSizing:"border-box",padding:0,animation:`${Gn} 0.7s linear infinite`,[`@keyframes ${Gn}`]:Un}}}var At=require("@domphy/core"),pt=require("@domphy/theme");function xi(r={}){let{direction:n="horizontal",defaultSize:o=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{(0,At.merge)(a,{_context:{splitter:{direction:n,size:(0,At.toState)(o),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:n==="horizontal"?"row":"column",overflow:"hidden"}}}function Ei(r){let n=r.parent;if(!n)return!0;for(let o of n.children.items)if(o instanceof At.ElementNode&&o.getMetadata("splitterPanel"))return o===r;return!0}function ki(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let n=r.getContext("splitter");if(!n){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let o=r.domElement,e=n.direction==="horizontal"?"width":"height",s=a=>{o.style[e]=`${Ei(r)?a:100-a}%`};s(n.size.get()),o.style.flexShrink="0",o.style.overflow="auto";let t=n.size.addListener(s);r.addHook("Remove",()=>{var a;n.panelCount=Math.max(0,((a=n.panelCount)!=null?a:1)-1),t()})}}}function wi(){return{role:"separator",tabindex:0,_onMount:r=>{let n=r.getContext("splitter");if(!n){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let o=r.domElement,e=n.direction==="horizontal";o.style.cursor=e?"col-resize":"row-resize",o.setAttribute("aria-orientation",e?"vertical":"horizontal"),o.setAttribute("aria-valuemin",String(n.min)),o.setAttribute("aria-valuemax",String(n.max)),o.setAttribute("aria-valuenow",String(Math.round(n.size.get())));let s=n.size.addListener(m=>{o.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(n.size.get()+u,n.max):m.key==="ArrowLeft"&&(l=Math.max(n.size.get()-u,n.min)):m.key==="ArrowDown"?l=Math.min(n.size.get()+u,n.max):m.key==="ArrowUp"&&(l=Math.max(n.size.get()-u,n.min)),m.key==="Home"?l=n.min:m.key==="End"&&(l=n.max),l!==null&&(m.preventDefault(),n.size.set(l))},a=null,i=m=>{m.preventDefault();let u=o.parentElement,l=d=>{let p=u.getBoundingClientRect(),y=e?(d.clientX-p.left)/p.width*100:(d.clientY-p.top)/p.height*100;n.size.set(Math.min(Math.max(y,n.min),n.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};o.addEventListener("keydown",t),o.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),o.removeEventListener("keydown",t),o.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,pt.themeColor)(r,"inherit"),color:r=>(0,pt.themeColor)(r,"text"),"&:hover":{backgroundColor:r=>(0,pt.themeColor)(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:(0,pt.themeSpacing)(1),height:(0,pt.themeSpacing)(1),borderRadius:(0,pt.themeSpacing)(999),backgroundColor:r=>(0,pt.themeColor)(r,"shift-4")}}}}var po=require("@domphy/theme");function Ti(r={}){let{gap:n=3,align:o}=r;return{style:E({display:"flex",flexDirection:"column",gap:e=>(0,po.themeSpacing)((0,po.themeDensity)(e)*n)},o?{alignItems:o}:{})}}var It=require("@domphy/core"),R=require("@domphy/theme");function Xn(r,n,o,e){if((0,It.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,It.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function Di(r,n,o){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:(0,R.themeSpacing)(3),top:(0,R.themeSpacing)(6),bottom:`-${(0,R.themeSpacing)(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",n),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",o)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,R.themeSpacing)(3),right:`calc(50% + ${(0,R.themeSpacing)(3)})`,left:`calc(-50% + ${(0,R.themeSpacing)(3)})`,height:"2px",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",n),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",o)}}}function Zn(r,n,o,e,s){let t=o==="vertical",a=Di(o,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=n.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>n.get(c)===m?"step":void 0,style:V(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:(0,R.themeSpacing)(1),flex:t?"none":"1",fontSize:c=>(0,R.themeSize)(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,R.themeSpacing)(6),height:(0,R.themeSpacing)(6),borderRadius:(0,R.themeSpacing)(999),fontSize:c=>(0,R.themeSize)(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${(0,R.themeColor)(c,"border-strong",e)}`,backgroundColor:c=>(0,R.themeColor)(c,"inherit"),color:c=>(0,R.themeColor)(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${(0,R.themeColor)(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s)},"&[data-status=pending]":{color:c=>(0,R.themeColor)(c,"muted")},"&[data-status=active]":{color:c=>(0,R.themeColor)(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>(0,R.themeColor)(c,"text",e)}})}})}function Pi(r={items:[]}){var a;let{items:n=[],direction:o="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:n,direction:o,color:e,accentColor:s};return V(E({_doctorDisable:"inline-typography",_context:{steps:{current:(0,It.toState)((a=r.current)!=null?a:0),direction:o,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=Xn(i,"stepsCurrent",r.current,0);m[i.tagName]=Zn(n,u,o,e,s)}},(0,It.behavior)("steps-items",i=>({update(m){let u=Xn(i,"stepsCurrent",r.current,0);i.children.update(Zn(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:(0,R.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}})}var Jn=require("@domphy/core"),Yt=require("@domphy/theme");function Ii(r={}){var o;let n=(0,Jn.toState)((o=r.color)!=null?o:"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:"bold",color:e=>(0,Yt.themeColor)(e,"shift-11",n.get(e)),backgroundColor:e=>(0,Yt.themeColor)(e)}}}var Qn=require("@domphy/core"),ho=require("@domphy/theme");function Li(r={}){var o;let n=(0,Qn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>(0,ho.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,ho.themeColor)(e,"text",n.get(e))}}}var er=require("@domphy/core"),go=require("@domphy/theme");function Oi(r={}){var o;let n=(0,er.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>(0,go.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,go.themeColor)(e,"text",n.get(e))}}}var tr=require("@domphy/core"),H=require("@domphy/theme");function zi(r={}){var o;let n=(0,tr.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>(0,H.themeSize)(e,"inherit"),color:e=>(0,H.themeColor)(e,"text",n.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",n.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"text",n.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,H.themeColor)(e,"shift-3",n.get(e))}`,fontSize:e=>(0,H.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",n.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,H.themeColor)(e,"shift-4",n.get(e))}`},"& tr":{backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,H.themeColor)(e,"hover")}}}}var Ht=require("@domphy/core"),G=require("@domphy/theme");function or(r,n,o,e){if((0,Ht.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,Ht.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function nr(r,n,o,e,s){let t=r.nodeId,i={div:n.map((u,l)=>{var p;let c=(p=u.key)!=null?p:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:y=>o.get(y)===c,tabIndex:y=>o.get(y)===c?0:-1,onClick:()=>o.set(c),onKeyDown:y=>{var h;let T=y.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(T))return;y.preventDefault();let v=n.map((D,k)=>{var Z;return(Z=D.key)!=null?Z:k}),f=v.indexOf(c),b=f;T==="ArrowRight"?b=(f+1)%v.length:T==="ArrowLeft"?b=(f-1+v.length)%v.length:T==="Home"?b=0:T==="End"&&(b=v.length-1),o.set(v[b]);let x=y.target.closest("[role=tablist]");(h=x==null?void 0:x.querySelectorAll("[role=tab]")[b])==null||h.focus()},style:{cursor:"pointer",fontSize:y=>(0,G.themeSize)(y,"inherit"),height:y=>(0,G.themeSpacing)(6+(0,G.themeDensity)(y)*2),paddingInline:y=>(0,G.themeSpacing)((0,G.themeDensity)(y)*4),border:"none",outline:"none",color:y=>(0,G.themeColor)(y,"shift-13"),backgroundColor:y=>(0,G.themeColor)(y,"inherit"),boxShadow:y=>`inset 0 ${(0,G.themeSpacing)(-.5)} 0 0 ${(0,G.themeColor)(y,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:y=>(0,G.themeColor)(y,"shift-13"),boxShadow:y=>`inset 0 ${(0,G.themeSpacing)(-.5)} 0 0 ${(0,G.themeColor)(y,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:y=>(0,G.themeColor)(y,"shift-13",e),boxShadow:y=>`inset 0 ${(0,G.themeSpacing)(-.5)} 0 0 ${(0,G.themeColor)(y,"shift-8",e)}`},"&:focus-visible":{boxShadow:y=>S(y,e)},"&[aria-selected=true]:focus-visible":{boxShadow:y=>`${S(y,e)}, inset 0 ${(0,G.themeSpacing)(-.5)} 0 0 ${(0,G.themeColor)(y,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=n.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:p=>o.get(p)!==c,style:{paddingBlock:p=>(0,G.themeSpacing)((0,G.themeDensity)(p)*2),paddingInline:p=>(0,G.themeSpacing)((0,G.themeDensity)(p)*2)}}});return[i,...m]}function Vi(r={items:[]}){let{items:n=[],accentColor:o="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=or(t,"tabsActiveKey",r.activeKey,(u=(m=n[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=nr(t,n,i,o,e)}},(0,Ht.behavior)("tabs-items",t=>({update(a){var m,u;let i=or(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(nr(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:n,accentColor:o,color:e}))}var Gt=require("@domphy/core"),ae=require("@domphy/theme");function Ri(r={}){var s,t;let n=(0,Gt.toState)((s=r.color)!=null?s:"neutral","color"),o=(0,Gt.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return V(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},(0,Gt.behavior)("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=()=>{u&&(m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`)};return m.addEventListener("input",l),a.attributes.addListener("value",l),u&&l(),{resize:l,update(c){u=c.autoResize,a.attributes.addListener("value",l),u&&l()},destroy(){m.removeEventListener("input",l)}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*2),paddingBlock:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*1.5),fontSize:a=>(0,ae.themeSize)(a,"inherit"),color:a=>(0,ae.themeColor)(a,"text",n.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,ae.themeColor)(a,"border-strong",n.get(a))}`,backgroundColor:a=>(0,ae.themeColor)(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,ae.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,ae.themeColor)(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,o.get(a))},"&:invalid":{outline:a=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,ae.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,ae.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,ae.themeColor)(a,"shift-2","neutral")}}})}var rr=require("@domphy/core"),Ae=require("@domphy/theme");function Mi(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function _i(r={}){var t,a,i;let{last:n=!1}=r,o=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=(0,rr.toState)((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(m)*2),paddingBottom:m=>n?"0":(0,Ae.themeSpacing)((0,Ae.themeDensity)(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,Ae.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>(0,Ae.themeColor)(m,"shift-8",s.get(m)?e:o),opacity:m=>s.get(m)?"1":"0.4"}},n?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(m)*-4),width:"2px",backgroundColor:m=>(0,Ae.themeColor)(m,"shift-3",o)}})}}var ir=require("@domphy/core"),ve=require("@domphy/theme");function jo(r){let n=r.getMetadata("toastOpen");return n||(n=(0,ir.toState)(!1),r.setMetadata("toastOpen",n)),n}var ar=r=>{let n=r==null?void 0:r.elementNode;return n?jo(n).get(r):!1};function Ni(r={}){let{position:n="top-center",color:o="neutral"}=r,e=n.startsWith("top"),s=n.endsWith("center"),t=n.endsWith("right"),a={div:[],id:`domphy-toast-${n}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:(0,ve.themeSpacing)(4),zIndex:30,padding:(0,ve.themeSpacing)(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${n}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,ve.themeSpacing)(32),pointerEvents:"auto",paddingBlock:i=>(0,ve.themeSpacing)((0,ve.themeDensity)(i)*2),paddingInline:i=>(0,ve.themeSpacing)((0,ve.themeDensity)(i)*4),borderRadius:i=>(0,ve.themeSpacing)((0,ve.themeDensity)(i)*2),fontSize:i=>(0,ve.themeSize)(i,"inherit"),color:i=>(0,ve.themeColor)(i,"text",o),backgroundColor:i=>(0,ve.themeColor)(i,"inherit",o),boxShadow:_("medium"),opacity:i=>Number(ar(i)),transform:i=>ar(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>jo(i).set(!0)),_onBeforeRemove:(i,m)=>{var f,b;let u=!1,l=null,c=!1,d=i.getRoot(),p=(b=(f=i.domElement)==null?void 0:f.parentElement)!=null?b:null,y=()=>{var h;if(c||!p||p.id!==`domphy-toast-${n}`||p.childElementCount>0)return;c=!0;let x=(h=d.children)==null?void 0:h.items.find(D=>D.domElement===p);x?d.children.remove(x):p.remove()},T=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),y())},v=x=>{x.propertyName==="transform"&&T()};i.domElement.addEventListener("transitionend",v),l=setTimeout(T,350),i.addHook("Remove",()=>{var x;l&&(clearTimeout(l),l=null),(x=i.domElement)==null||x.removeEventListener("transitionend",v),y()}),jo(i).set(!1)}}}var Lt=require("@domphy/core"),te=require("@domphy/theme");function lr(r,n,o,e){if((0,Lt.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,Lt.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function $i(r,n){return Array.isArray(r)?r.includes(n):r===n}function Bi(r,n,o,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=n.map((c,d)=>{var p;return(p=c.key)!=null?p:String(d)}),i=a.indexOf(o),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function sr(r,n,o,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>$i(n.get(l),i),tabIndex:l=>{var d,p,y,T,v;let c=n.get(l);if(o){let b=(y=(p=(Array.isArray(c)?c:[])[0])!=null?p:(d=r[0])==null?void 0:d.key)!=null?y:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(T=r[0])==null?void 0:T.key)!=null?v:"0")?0:-1},onClick:()=>{let l=n.get();if(o){let c=Array.isArray(l)?[...l]:[];n.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else n.set(l===i?"":i)},onKeyDown:l=>Bi(l,r,i,n,o),style:{cursor:"pointer",fontSize:l=>(0,te.themeSize)(l,"inherit"),height:(0,te.themeSpacing)(6),paddingBlock:(0,te.themeSpacing)(1),paddingInline:(0,te.themeSpacing)(2),border:"none",borderRadius:(0,te.themeSpacing)(1.5),color:l=>(0,te.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,te.themeColor)(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>(0,te.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,te.themeColor)(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>(0,te.themeColor)(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>(0,te.themeColor)(l,"shift-3",s),color:l=>(0,te.themeColor)(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Ai(r={items:[]}){var a;let{items:n=[],multiple:o=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:n,multiple:o,color:e,accentColor:s};return V(E({role:"group",_context:{toggleGroup:{value:(0,Lt.toState)((a=r.value)!=null?a:o?[]:""),multiple:o}},_onSchedule:(i,m)=>{let u=lr(i,"toggleGroupValue",r.value,o?[]:"");m[i.tagName]=sr(n,u,o,e,s)}},(0,Lt.behavior)("toggle-items",i=>({update(m){let u=lr(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(sr(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:(0,te.themeSpacing)(1),paddingInline:(0,te.themeSpacing)(1),gap:(0,te.themeSpacing)(1),borderRadius:(0,te.themeSpacing)(2),fontSize:i=>(0,te.themeSize)(i,"inherit"),backgroundColor:i=>(0,te.themeColor)(i,"inherit",e),color:i=>(0,te.themeColor)(i,"text",e),outline:i=>`1px solid ${(0,te.themeColor)(i,"border",e)}`,outlineOffset:"-1px"}})}function Hi(r={}){return Wo({gap:r.gap})}function Fi(){return{div:null,style:{flex:"1 1 0"}}}var Ut=require("@domphy/core"),_e=require("@domphy/theme");function Ki(r={}){let{open:n=!1,placement:o="top",content:e="Tooltip Content"}=r,s=(0,Ut.toState)(o),t=(0,Ut.toState)(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=Qe({kind:"tooltip",open:n,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1),paddingInline:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*3),borderRadius:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1.5),color:d=>(0,_e.themeColor)(d,"text"),backgroundColor:d=>(0,_e.themeColor)(d),fontSize:d=>(0,_e.themeSize)(d,"inherit"),boxShadow:_("low")},$:[Ho({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),(0,Ut.merge)(u,{ariaDescribedby:d=>d!=null&&d.elementNode?Ve("tooltip",d.elementNode):void 0,onMouseEnter:(d,p)=>i(p),onMouseLeave:(d,p)=>m(p),onFocus:(d,p)=>i(p),onBlur:(d,p)=>m(p),onKeyDown:(d,p)=>d.key==="Escape"&&m(p)}),u}var qo=require("@domphy/core");function cr(r,n){return r.key!==void 0&&r.key!==null?String(r.key):`index-${n}`}function Wi(r={}){let{duration:n=300,delay:o=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof qo.ElementNode))return;let l=m.domElement;l&&e.set(cr(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof qo.ElementNode))return;let l=m.domElement;if(!l)return;let c=cr(m,u),d=e.get(c);if(!d)return;let p=l.getBoundingClientRect(),y=d.left-p.left,T=d.top-p.top;if(Math.abs(y)<.5&&Math.abs(T)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${y}px, ${T}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${n}ms ease ${o}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let f=!1,b=null,x=()=>{f||(f=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",h),l.style.transition="",l.style.transform="")},h=k=>{k.propertyName==="transform"&&x()};s.set(l,()=>{f=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",h)}),l.addEventListener("transitionend",h),b=setTimeout(x,n+o+34),t.add(b)}),e.clear()}}}var mr=require("@domphy/core"),Ot=require("@domphy/theme");function ji(r={}){var o;let n=(0,mr.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>(0,Ot.themeSize)(e,"inherit"),backgroundColor:e=>(0,Ot.themeColor)(e),color:e=>(0,Ot.themeColor)(e,"text",n.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Ot.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}function qi(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}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,elevation,emphasis,empty,errorBoundary,fab,figure,focusRing,formGroup,grid,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputPassword,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,linkButton,list,listItem,listItemButton,mark,menu,motion,orderedList,pagination,panelSection,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,row,scrollArea,segmented,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stack,steps,strong,subscript,superscript,table,tabs,tag,textarea,timeline,timelineItem,toast,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList,visuallyHidden});
|
|
1
|
+
"use strict";var Jt=Object.defineProperty,Er=Object.defineProperties,kr=Object.getOwnPropertyDescriptor,wr=Object.getOwnPropertyDescriptors,Tr=Object.getOwnPropertyNames,Qo=Object.getOwnPropertySymbols;var tn=Object.prototype.hasOwnProperty,Dr=Object.prototype.propertyIsEnumerable;var en=(r,n,o)=>n in r?Jt(r,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[n]=o,E=(r,n)=>{for(var o in n||(n={}))tn.call(n,o)&&en(r,o,n[o]);if(Qo)for(var o of Qo(n))Dr.call(n,o)&&en(r,o,n[o]);return r},V=(r,n)=>Er(r,wr(n));var Pr=(r,n)=>{for(var o in n)Jt(r,o,{get:n[o],enumerable:!0})},Ir=(r,n,o,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Tr(n))!tn.call(r,s)&&s!==o&&Jt(r,s,{get:()=>n[s],enumerable:!(e=kr(n,s))||e.enumerable});return r};var Lr=r=>Ir(Jt({},"__esModule",{value:!0}),r);var Qi={};Pr(Qi,{abbreviation:()=>Or,accordion:()=>zr,alert:()=>Vr,avatar:()=>Rr,badge:()=>Mr,blockquote:()=>_r,breadcrumb:()=>Nr,breadcrumbEllipsis:()=>$r,button:()=>Hr,buttonGhost:()=>xo,buttonSwitch:()=>Fr,card:()=>Wr,code:()=>jr,combobox:()=>Zr,command:()=>Jr,commandItem:()=>ea,commandSearch:()=>Qr,datePicker:()=>na,descriptionList:()=>ia,details:()=>la,dialog:()=>ca,divider:()=>ma,drawer:()=>da,elevation:()=>_,emphasis:()=>pa,empty:()=>ha,errorBoundary:()=>fa,fab:()=>ba,figure:()=>Sa,focusRing:()=>S,formGroup:()=>va,grid:()=>Ca,heading:()=>Ea,horizontalRule:()=>ka,icon:()=>wa,image:()=>Ta,inputCheckbox:()=>Da,inputColor:()=>Pa,inputDateTime:()=>Ia,inputFile:()=>La,inputNumber:()=>Oa,inputOTP:()=>za,inputPassword:()=>_a,inputRadio:()=>Na,inputRange:()=>$a,inputSearch:()=>Ba,inputSwitch:()=>Aa,inputText:()=>Ha,keyboard:()=>Fa,label:()=>Ka,link:()=>Wa,linkButton:()=>Ya,list:()=>Ga,listItem:()=>Ua,listItemButton:()=>Xa,mark:()=>Za,menu:()=>Ja,motion:()=>ei,orderedList:()=>ti,pagination:()=>ri,panelSection:()=>ai,paragraph:()=>ii,popover:()=>li,popoverArrow:()=>Fo,preformated:()=>si,progress:()=>ci,rating:()=>pi,ringProgress:()=>hi,row:()=>jo,scrollArea:()=>gi,segmented:()=>yi,select:()=>bi,selectBox:()=>xi,selectItem:()=>Ei,selectList:()=>ki,skeleton:()=>wi,small:()=>Ti,spinner:()=>Di,splitter:()=>Pi,splitterHandle:()=>Oi,splitterPanel:()=>Li,stack:()=>zi,steps:()=>Ri,strong:()=>Mi,subscript:()=>_i,superscript:()=>Ni,table:()=>$i,tabs:()=>Bi,tag:()=>Kt,textarea:()=>Ai,timeline:()=>Hi,timelineItem:()=>Fi,toast:()=>Ki,toggleGroup:()=>qi,toolbar:()=>Yi,toolbarSpacer:()=>Gi,tooltip:()=>Ui,transitionGroup:()=>Xi,unorderedList:()=>Zi,visuallyHidden:()=>Ji});module.exports=Lr(Qi);var bo=require("@domphy/core"),Ze=require("@domphy/theme");function Or(r={}){var e,s;let n=(0,bo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,bo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Ze.themeSize)(t),backgroundColor:t=>(0,Ze.themeColor)(t),color:t=>(0,Ze.themeColor)(t,"shift-10",n.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Ze.themeColor)(t,"shift-7",n.get(t)),textUnderlineOffset:(0,Ze.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Ze.themeColor)(t,"shift-11",o.get(t)),textDecorationColor:t=>(0,Ze.themeColor)(t,"shift-9",o.get(t))}}}}var vo=require("@domphy/core"),ht=require("@domphy/theme");var So=require("@domphy/theme");function S(r,n="primary"){let o=(0,So.themeColor)(r,"surface"),e=(0,So.themeColor)(r,"shift-9",n);return`0 0 0 2px ${o}, 0 0 0 4px ${e}`}function zr(r={}){var s,t;let{type:n="single"}=r,o=(0,vo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,vo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(n!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,ht.themeSpacing)((0,ht.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,ht.themeColor)(a,"border-strong",o.get(a))}`,outlineOffset:"-1px",color:a=>(0,ht.themeColor)(a,"text",o.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,ht.themeColor)(a,"border-strong",o.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}var on=require("@domphy/core"),be=require("@domphy/theme");function Vr(r={}){var o;let n=(0,on.toState)((o=r.color)!=null?o:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,be.themeSpacing)(3),paddingBlock:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*2),paddingInline:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*4),borderRadius:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,be.themeSpacing)(1)} 0 0 0 ${(0,be.themeColor)(e,"shift-8",n.get(e))}`,backgroundColor:e=>(0,be.themeColor)(e,"inherit",n.get(e)),color:e=>(0,be.themeColor)(e,"shift-10",n.get(e)),fontSize:e=>(0,be.themeSize)(e,"inherit")}}}var nn=require("@domphy/core"),it=require("@domphy/theme");function Rr(r={}){var o;let n=(0,nn.toState)((o=r.color)!=null?o:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,it.themeSpacing)(9),height:(0,it.themeSpacing)(9),fontSize:e=>(0,it.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,it.themeColor)(e,"inherit",n.get(e)),color:e=>(0,it.themeColor)(e,"shift-11",n.get(e)),boxShadow:e=>`0 0 0 1px ${(0,it.themeColor)(e,"border",n.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var Co=require("@domphy/core"),Ee=require("@domphy/theme");function Mr(r={}){var s;let{label:n=999}=r,o=(0,Co.toState)(n),e=(0,Co.toState)((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${o.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>(0,Ee.themeSpacing)((0,Ee.themeDensity)(t)*(1.5/1.5)),minWidth:(0,Ee.themeSpacing)(5),height:t=>(0,Ee.themeSpacing)((0,Ee.themeDensity)(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Ee.themeSize)(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>(0,Ee.themeSpacing)((0,Ee.themeDensity)(t)*999),backgroundColor:t=>(0,Ee.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Ee.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,Ee.themeColor)(t,"shift-0",e.get(t))}`}}}}var rn=require("@domphy/core"),Oe=require("@domphy/theme");function _r(r={}){var o;let n=(0,rn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>(0,Oe.themeSize)(e,"inherit"),backgroundColor:e=>(0,Oe.themeColor)(e,"inherit",n.get(e)),color:e=>(0,Oe.themeColor)(e,"text",n.get(e)),boxShadow:e=>`inset ${(0,Oe.themeSpacing)(1)} 0 0 0 ${(0,Oe.themeColor)(e,"shift-4",n.get(e))}`,border:"none",paddingBlock:e=>(0,Oe.themeSpacing)((0,Oe.themeDensity)(e)*2),paddingInline:e=>(0,Oe.themeSpacing)((0,Oe.themeDensity)(e)*4),margin:0}}}var an=require("@domphy/core"),Ke=require("@domphy/theme");function Nr(r={}){var e;let{separator:n="/"}=r,o=(0,an.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>(0,Ke.themeSize)(s,"inherit"),gap:(0,Ke.themeSpacing)(1),color:s=>(0,Ke.themeColor)(s,"text",o.get(s)),backgroundColor:s=>(0,Ke.themeColor)(s,"inherit",o.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>(0,Ke.themeColor)(s,"text",o.get(s))},"& > *:not(:last-child)::after":{content:`"${n}"`,color:s=>(0,Ke.themeColor)(s,"shift-4",o.get(s)),paddingInlineStart:(0,Ke.themeSpacing)(1)},"& > [aria-current=page]":{color:s=>(0,Ke.themeColor)(s,"shift-10",o.get(s)),pointerEvents:"none"}}}}var ln=require("@domphy/core"),lt=require("@domphy/theme");function $r(r={}){var o;let n=(0,ln.toState)((o=r.color)!=null?o:"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,lt.themeSize)(e,"inherit"),paddingInline:(0,lt.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,lt.themeColor)(e,"text",n.get(e)),borderRadius:(0,lt.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,lt.themeColor)(e,"shift-10",n.get(e)),backgroundColor:e=>(0,lt.themeColor)(e,"hover",n.get(e))},"&:focus-visible":{boxShadow:e=>S(e,n.get(e))}}}}var cn=require("@domphy/core"),F=require("@domphy/theme");var Vt={small:"decrease-1",medium:"inherit",large:"increase-1"};var sn=require("@domphy/core"),ue=require("@domphy/theme");var Br={small:.5,medium:1,large:1.5};function xo(r={}){var s,t,a;let n=(0,sn.toState)((s=r.color)!=null?s:"neutral","color"),o=Br[(t=r.size)!=null?t:"medium"],e=Vt[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>(0,ue.themeSize)(i,e),paddingBlock:i=>(0,ue.themeSpacing)((0,ue.themeDensity)(i)*o),paddingInline:i=>(0,ue.themeSpacing)((0,ue.themeDensity)(i)*o),borderRadius:i=>(0,ue.themeSpacing)((0,ue.themeDensity)(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>(0,ue.themeSpacing)((0,ue.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:i=>(0,ue.themeColor)(i,"text",n.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>(0,ue.themeColor)(i,"text",n.get(i)),backgroundColor:i=>(0,ue.themeColor)(i,"hover",n.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>(0,ue.themeColor)(i,"text",n.get(i)),backgroundColor:i=>(0,ue.themeColor)(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>S(i,n.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>(0,ue.themeColor)(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Ar={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Hr(r={}){var a,i,m,u;let n=(a=r.variant)!=null?a:"outline";if(n==="ghost")return xo({color:r.color,size:r.size});let o=(0,cn.toState)((i=r.color)!=null?i:"primary","color"),e=n==="solid",s=Ar[(m=r.size)!=null?m:"medium"],t=Vt[(u=r.size)!=null?u:"medium"];return V(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>(0,F.themeSize)(l,t),paddingBlock:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.block),paddingInline:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.inline),borderRadius:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${(0,F.themeColor)(l,"border-strong",o.get(l))}`,color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-13",o.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-13",o.get(l)):(0,F.themeColor)(l,"inherit",o.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-14",o.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-14",o.get(l)):(0,F.themeColor)(l,"hover",o.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?(0,F.themeColor)(l,"shift-15",o.get(l)):(0,F.themeColor)(l,"increase-2",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>(0,F.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,F.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,F.themeColor)(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}var Qt=require("@domphy/core"),J=require("@domphy/theme");function Fr(r={}){var t,a;let{checked:n=!1}=r,o=(0,Qt.toState)(n),e=(0,Qt.toState)((t=r.color)!=null?t:"neutral","color"),s=(0,Qt.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>o.get(i),dataTone:"shift-2",onClick:()=>o.set(!o.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>(0,J.themeSize)(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${(0,J.themeColor)(i,"border",e.get(i))}`,minWidth:(0,J.themeSpacing)(12),minHeight:(0,J.themeSpacing)(6),borderRadius:(0,J.themeSpacing)(999),paddingLeft:(0,J.themeSpacing)(7),paddingRight:(0,J.themeSpacing)(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>(0,J.themeColor)(i,"inherit",e.get(i)),color:i=>(0,J.themeColor)(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,J.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,J.themeSpacing)(5),height:(0,J.themeSpacing)(5),borderRadius:(0,J.themeSpacing)(999),color:i=>(0,J.themeColor)(i,"text"),backgroundColor:i=>(0,J.themeColor)(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>(0,J.themeColor)(i,"increase-3",s.get(i)),outline:"none",color:i=>(0,J.themeColor)(i,"decrease-2"),paddingLeft:(0,J.themeSpacing)(2),paddingRight:(0,J.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,J.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var mn=require("@domphy/core"),$=require("@domphy/theme");var Kr={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function _(r){return Kr[r]}function Wr(r={}){var o;let n=(0,mn.toState)((o=r.color)!=null?o:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),backgroundColor:e=>(0,$.themeColor)(e,"inherit",n.get(e)),color:e=>(0,$.themeColor)(e,"shift-10",n.get(e)),outline:e=>`1px solid ${(0,$.themeColor)(e,"border-strong",n.get(e))}`,outlineOffset:"-1px",boxShadow:_("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),fontWeight:"600",color:e=>(0,$.themeColor)(e,"shift-11",n.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),paddingBottom:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),color:e=>(0,$.themeColor)(e,"text",n.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),color:e=>(0,$.themeColor)(e,"shift-10",n.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,$.themeSpacing)(2),paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,$.themeColor)(e,"border",n.get(e))}`}}}}var un=require("@domphy/core"),ze=require("@domphy/theme");function jr(r={}){var o;let n=(0,un.toState)((o=r.color)!=null?o:"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,ze.themeSize)(e,"inherit"),color:e=>(0,ze.themeColor)(e,"text",n.get(e)),backgroundColor:e=>(0,ze.themeColor)(e,"inherit",n.get(e)),height:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(6/1.5)),paddingInline:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(1/1.5))}}}var We=require("@domphy/core"),q=require("@domphy/theme");var Rt=require("@domphy/core"),Je=require("@domphy/floating");function Ve(r,n){return`domphy-${r}-${n.nodeId}`}function qr(r,n){var vt,at,Ue,Ct;let{openState:o,placement:e,content:s,keepOpenOnContentHover:t}=n,{kind:a}=n,i=`floating:${a}`,m=null,u=null,l=null,c=null,d=!1,p=r.domElement,y=r.getRoot(),T=Ve(a,r),v={style:{position:"fixed",pointerEvents:"auto",visibility:O=>o.get(O)?"visible":"hidden"},onKeyDown:O=>{O.key==="Escape"&&k()},onMouseEnter:()=>t&&D(),onMouseLeave:()=>t&&k(),_onMount:O=>{var fe;if(l=O.domElement,l.id||(l.id=T),p&&l&&!l.hasAttribute("data-theme")){let Ne=(fe=p.closest("[data-theme]"))==null?void 0:fe.getAttribute("data-theme");Ne&&l.setAttribute("data-theme",Ne)}},_portal:O=>{let fe=p.closest("dialog");if(fe){let Xe=fe.querySelector(":scope > #domphy-floating");return Xe||(Xe=fe.ownerDocument.createElement("div"),Xe.id="domphy-floating",Object.assign(Xe.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),fe.appendChild(Xe)),Xe}let Ne=O.domElement.querySelector("#domphy-floating");if(!Ne){let Xe={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};Ne=O.children.insert(Xe).domElement}return Ne}},f=O=>(0,Rt.merge)(O,v);f(s);let b=()=>{d||(d=!0,c=y.children.insert(s),c._behaviorInstances.set(i,He))},x=()=>{d&&(!l||!l.isConnected)&&(u==null||u(),u=null,c=null,l=null,d=!1),b(),p&&l&&(u==null||u(),u=(0,Je.autoUpdate)(p,l,()=>{(0,Je.computePosition)(p,l,{placement:e.get(),middleware:[(0,Je.offset)(12),(0,Je.flip)(),(0,Je.shift)()],strategy:"fixed"}).then(({x:O,y:fe,placement:Ne})=>{l&&(Object.assign(l.style,{left:`${O}px`,top:`${fe}px`}),e.set(Ne))})}),o.set(!0))},h=()=>{u==null||u(),u=null,c&&(c.remove(),c=null),l=null,d=!1,o.set(!1)},D=()=>{m&&clearTimeout(m),m=setTimeout(x,100)},k=()=>{m&&clearTimeout(m),m=setTimeout(h,100)},Z=O=>{if(!o.get()||!p||!l)return;let fe=O.target;!p.contains(fe)&&!l.contains(fe)&&k()};(vt=y.domElement)==null||vt.addEventListener("click",Z);let Ce=O=>{O.key==="Escape"&&o.get()&&k()},ge=(Ct=(Ue=(at=y.domElement)==null?void 0:at.ownerDocument)!=null?Ue:y.domElement)!=null?Ct:null;ge==null||ge.addEventListener("keydown",Ce);let ie=O=>{O?d||x():d&&h()},Le=o.addListener(ie),pe=!1,xe=!1,He,Fe=O=>{var fe;O._behaviors=V(E({},(fe=O._behaviors)!=null?fe:{}),{[i]:{attach:()=>He,props:{}}})};return He={show:D,hide:k,panelId:T,update(O){if(!xe&&(O.openState!==o&&(Le(),o=O.openState,Le=o.addListener(ie),o.get()&&x()),e=O.placement,s=O.content,t=O.keepOpenOnContentHover,f(s),Fe(s),c)){xe=!0;try{c.patch(s)}finally{xe=!1}}},destroy(){var O;pe||(pe=!0,m&&clearTimeout(m),m=null,u==null||u(),u=null,c==null||c.remove(),c=null,l=null,d=!1,Le(),Le=()=>{},(O=y.domElement)==null||O.removeEventListener("click",Z),ge==null||ge.removeEventListener("keydown",Ce))}},Fe(s),ie(o.get()),He}function Qe(r){let{kind:n,open:o=!1,placement:e}=r,s=(0,Rt.toState)(o),t=`floating:${n}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},(0,Rt.behavior)(t,qr,{kind:n,openState:s,placement:e,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}var gt=require("@domphy/core"),U=require("@domphy/theme");var Yr='<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>',Ft=1.5,Gr=6/Ft,dn=2.5/Ft,Ur=1/Ft,pn=4/Ft,Xr=1/Ft;function Kt(r={}){var e;let{removable:n=!1}=r,o=(0,gt.toState)((e=r.color)!=null?e:"neutral","color");return V(E({dataTone:"shift-2"},(0,gt.behavior)("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:(0,gt.rawHtml)(Yr),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>(0,U.themeSpacing)((0,U.themeDensity)(l)*Xr),width:l=>(0,U.themeSpacing)((0,U.themeDensity)(l)*pn),height:l=>(0,U.themeSpacing)((0,U.themeDensity)(l)*pn),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>(0,U.themeColor)(l,"shift-4",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof gt.ElementNode&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:n})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>(0,U.themeSpacing)((0,U.themeDensity)(s)*Gr),paddingBlock:0,borderRadius:s=>(0,U.themeSpacing)((0,U.themeDensity)(s)*999),paddingInlineStart:s=>(0,U.themeSpacing)((0,U.themeDensity)(s)*dn),paddingInlineEnd:s=>(0,U.themeSpacing)((0,U.themeDensity)(s)*(n?Ur:dn)),gap:(0,U.themeSpacing)(1.5),fontSize:s=>(0,U.themeSize)(s,"decrease-1"),backgroundColor:s=>(0,U.themeColor)(s,"inherit",o.get(s)),color:s=>(0,U.themeColor)(s,"text",o.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${(0,U.themeColor)(s,"border-strong",o.get(s))}`}})}function Zr(r){let{options:n=[],placement:o="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,We.toState)(r.value),i=(0,We.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"combobox",open:i,placement:(0,We.toState)(o),content:r.content}),c={onClick:(h,D)=>!t&&u(D),dataTone:"shift-14",style:{backgroundColor:h=>(0,q.themeColor)(h,"inherit"),color:h=>(0,q.themeColor)(h,"text"),borderRadius:h=>(0,q.themeSpacing)((0,q.themeDensity)(h)*2),outline:h=>`1px solid ${(0,q.themeColor)(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,We.merge)(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,q.themeSpacing)(6),marginInlineStart:(0,q.themeSpacing)(2),fontSize:h=>(0,q.themeSize)(h,"inherit"),color:h=>(0,q.themeColor)(h,"text",e),backgroundColor:h=>(0,q.themeColor)(h,"inherit",e)},p=h=>{var D,k;return(k=(D=h==null?void 0:h.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:k.query},y=h=>{let D=h;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return h},T={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:h=>i.get(h),ariaControls:h=>h!=null&&h.elementNode?Ve("combobox",y(h.elementNode)):void 0},v=h=>h?((0,We.merge)(h,E({onFocus:(D,k)=>m(k),style:d,_key:"combobox-input"},T)),h):E({input:null,ariaLabel:"Filter options",onFocus:(D,k)=>m(k),value:D=>{var k,Z;return(Z=(k=p(D))==null?void 0:k.get(D))!=null?Z:""},onInput:(D,k)=>{var Z;(Z=k.getBehavior("comboboxInner"))==null||Z.query.set(D.target.value)},style:d,_key:"combobox-input"},T),f=h=>({div:D=>{i.get(D);let k=h.state.get(D),Z=Array.isArray(k)?k:[k],ge=h.options.filter(ie=>Z.includes(ie.value)).map(ie=>({span:ie.label,$:[Kt({color:h.color,removable:!0})],_key:ie.value,_onRemove:Le=>{let pe=h.state.get(),He=(Array.isArray(pe)?pe:[pe]).filter(Fe=>Fe!==ie.value);h.multiple?h.state.set(He):h.state.set(He[0])}}));return ge.push(v(h.input)),ge},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,q.themeSpacing)(1)}}),x=V(E({_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(h,D)=>{D[h.tagName]=[f({options:n,multiple:t,color:e,state:a,input:r.input})]}},(0,We.behavior)("comboboxInner",(h,D)=>{let k=h.getMetadata("comboboxQuery");return k||(k=(0,We.toState)(""),h.setMetadata("comboboxQuery",k)),{query:k,update(Z){h.children.update([f(Z)])}}},{options:n,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:(0,q.themeSpacing)(32),outlineOffset:"-1px",outline:h=>`1px solid ${(0,q.themeColor)(h,"border-strong","neutral")}`,paddingBlock:h=>(0,q.themeSpacing)((0,q.themeDensity)(h)*1),paddingInline:h=>(0,q.themeSpacing)((0,q.themeDensity)(h)*1),borderRadius:h=>(0,q.themeSpacing)((0,q.themeDensity)(h)*1.5),fontSize:h=>(0,q.themeSize)(h,"inherit"),color:h=>(0,q.themeColor)(h,"text",e),backgroundColor:h=>(0,q.themeColor)(h,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:h=>S(h,e)}}});return(0,We.merge)(l,x),l}var eo=require("@domphy/core"),Q=require("@domphy/theme");function Jr(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,n)=>{(0,eo.merge)(n,{_context:{command:{query:(0,eo.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Qr(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,Q.themeSize)(e,"inherit"),paddingInline:e=>(0,Q.themeSpacing)((0,Q.themeDensity)(e)*3),paddingBlock:e=>(0,Q.themeSpacing)((0,Q.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,Q.themeColor)(e,"border",n)}`,outline:"none",color:e=>(0,Q.themeColor)(e,"shift-10",n),backgroundColor:e=>(0,Q.themeColor)(e,"inherit",n),"&::placeholder":{color:e=>(0,Q.themeColor)(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,Q.themeColor)(e,"shift-6",o),boxShadow:e=>S(e,o)}}}}function ea(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,Q.themeSize)(e,"inherit"),height:e=>(0,Q.themeSpacing)(6+(0,Q.themeDensity)(e)*2),paddingInline:e=>(0,Q.themeSpacing)((0,Q.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,Q.themeColor)(e,"shift-13",n),backgroundColor:e=>(0,Q.themeColor)(e,"inherit",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>(0,Q.themeColor)(e,"shift-13",n),backgroundColor:e=>(0,Q.themeColor)(e,"hover",n)},"&:focus-visible":{boxShadow:e=>S(e,o)}}}}var ke=require("@domphy/core"),P=require("@domphy/theme");var he=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),xt=(r,n)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+n),Eo=(r,n)=>new Date(r.getFullYear(),r.getMonth()+n,r.getDate()),Wt=(r,n)=>!!r&&!!n&&r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate(),ko=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,wo=(r,n)=>xt(r,-((r.getDay()-n+7)%7));function ta(r){var n,o;try{let e=new Intl.Locale(r),s=(o=(n=e.getWeekInfo)==null?void 0:n.call(e))!=null?o:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function oa(r,n){let o=n,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(o),{update(a){a.selectionIsCallerOwned||t(a.selection,o.selection),t(a.viewYear,o.viewYear),t(a.viewMonth,o.viewMonth),t(a.focused,o.focused),t(a.hovered,o.hovered),t(a.hour,o.hour),t(a.minute,o.minute),t(a.open,o.open),(a.selection!==o.selection||a.onChange!==o.onChange)&&s(a),o=a},destroy(){e==null||e(),e=null}}}function na(r={}){var Uo,Xo,Zo,Jo;let{mode:n="single",time:o=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(Uo=r.weekStartsOn)!=null?Uo:ta(a),l=(0,ke.toState)((Xo=r.accentColor)!=null?Xo:"primary","accentColor"),c=(0,ke.toState)((Zo=r.placement)!=null?Zo:"bottom-start"),d=(0,ke.toState)((Jo=r.value)!=null?Jo:n==="range"?[null,null]:null),p=(()=>{let g=d.get(),C=n==="range"?g==null?void 0:g[0]:g;return C instanceof Date?C:new Date})(),y=(0,ke.toState)(p.getFullYear(),"viewYear"),T=(0,ke.toState)(p.getMonth(),"viewMonth"),v=(0,ke.toState)(he(p),"focused"),f=(0,ke.toState)(null,"hovered"),b=(0,ke.toState)(p.getHours(),"hour"),x=(0,ke.toState)(p.getMinutes(),"minute"),h=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},o?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),k=new Intl.DateTimeFormat(a,{weekday:"short"}),Z=new Intl.DateTimeFormat(a,{dateStyle:"full"}),Ce=g=>g?h.format(g):"",ge=g=>{if(i)return i(g);if(n==="range"){let[C,w]=g!=null?g:[null,null];return C?`${Ce(C)} \u2013 ${Ce(w)}`:""}return Ce(g)},ie=Array.from({length:7},(g,C)=>k.format(new Date(2023,0,1+(C+u)%7))),Le=g=>!!e&&he(g)<he(e)||!!s&&he(g)>he(s)||!!t&&t(g),pe=g=>{if(!o)return he(g);let C=he(g);return C.setHours(b.get(),x.get(),0,0),C},xe=(g,C)=>{var L;if(Le(g))return;if(n==="single"){d.set(pe(g)),o||Zt(C);return}let[w,z]=(L=d.get())!=null?L:[null,null];!w||w&&z?d.set([pe(g),null]):he(g)<he(w)?(d.set([pe(g),pe(w)]),o||Zt(C)):(d.set([w,pe(g)]),o||Zt(C))},He=()=>{var g;if(o)if(n==="single"){let C=d.get();C&&d.set(pe(C))}else{let[C,w]=(g=d.get())!=null?g:[null,null];d.set([C&&pe(C),w&&pe(w)])}},Fe=(g,C)=>{var zt;if(n!=="range")return!1;let[w,z]=(zt=d.get(C))!=null?zt:[null,null],L=z!=null?z:f.get(C);if(!w||!L)return!1;let M=he(w)<=he(L)?w:L,$e=he(w)<=he(L)?L:w,we=he(g);return we>=he(M)&&we<=he($e)},vt=(g,C)=>{let w=d.get(C);if(n==="range"){let[z,L]=w!=null?w:[null,null];return Wt(g,z)||Wt(g,L)}return Wt(g,w)},at=g=>{y.set(g.getFullYear()),T.set(g.getMonth())},Ue=g=>{let C=Eo(new Date(y.get(),T.get(),1),g);at(C)},Ct=g=>y.set(y.get()+g),O=g=>{var w;let C=(w=g==null?void 0:g.getRoot())==null?void 0:w.domElement;setTimeout(()=>{var z;(z=C==null?void 0:C.querySelector(`[data-date="${ko(v.get())}"]`))==null||z.focus()},0)},fe=fr(),Ne=(0,ke.toState)(!1),{show:Xe,hide:Zt,anchorPartial:Go}=Qe({kind:"datePicker",open:Ne,placement:c,content:fe}),hr=E({type:"text",readonly:!0,value:g=>ge(d.get(g)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:g=>Ne.get(g),ariaControls:g=>g!=null&&g.elementNode?Ve("datePicker",g.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(g,C)=>{yo(C)},onFocus:(g,C)=>{yo(C)},onKeyDown:(g,C)=>{let w=g.key;(w==="ArrowDown"||w==="Enter")&&(g.preventDefault(),yo(C))}},(0,ke.behavior)("datePicker",oa,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:y,viewMonth:T,focused:v,hovered:f,hour:b,minute:x,open:Ne,onChange:m}));function yo(g){var w;let C=(w=gr())!=null?w:new Date;v.set(he(C)),at(C),Xe(g),O(g)}function gr(){var C;let g=d.get();return n==="range"?(C=g==null?void 0:g[0])!=null?C:null:g!=null?g:null}return(0,ke.merge)(Go,hr),Go;function fr(){let g=(M,$e,we)=>({button:M,type:"button",ariaLabel:$e,onClick:we,style:ra()}),C={div:[g("\xAB","Previous year",()=>Ct(-1)),g("\u2039","Previous month",()=>Ue(-1)),{div:M=>D.format(new Date(y.get(M),T.get(M),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:M=>(0,P.themeSize)(M)}},g("\u203A","Next month",()=>Ue(1)),g("\xBB","Next year",()=>Ct(1))],style:{display:"flex",alignItems:"center",gap:(0,P.themeSpacing)(1),marginBottom:(0,P.themeSpacing)(2)}},w={div:ie.map((M,$e)=>({div:M,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:we=>(0,P.themeSize)(we,"decrease-1"),fontWeight:"bold",color:we=>(0,P.themeColor)(we,"shift-7"),paddingBlock:(0,P.themeSpacing)(1)},_key:$e})),role:"row",style:hn()},z={div:M=>yr(M),role:"grid",ariaLabel:"Calendar",onKeyDown:Cr,onMouseLeave:()=>n==="range"&&f.set(null),style:{display:"flex",flexDirection:"column",gap:(0,P.themeSpacing)(.5)}},L=[C,w,z];return o&&L.push(Sr()),L.push(vr()),{div:L,role:"dialog",ariaModal:"false",dataTone:"shift-14",style:{minWidth:(0,P.themeSpacing)(70),padding:(0,P.themeSpacing)(3),borderRadius:M=>(0,P.themeSpacing)((0,P.themeDensity)(M)*2),backgroundColor:M=>(0,P.themeColor)(M,"inherit"),color:M=>(0,P.themeColor)(M,"text"),outline:M=>`1px solid ${(0,P.themeColor)(M,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}}}function yr(g){let C=new Date(y.get(g),T.get(g),1),w=T.get(g),z=wo(C,u),L=[];for(let M=0;M<6;M++){let $e=[];for(let we=0;we<7;we++){let zt=xt(z,M*7+we);$e.push(br(zt,w,g))}L.push({div:$e,role:"row",style:hn(),_key:M})}return L}function br(g,C,w){let z=Le(g),L=vt(g,w),M=Fe(g,w),$e=g.getMonth()!==C,we=Wt(g,v.get(w)),zt=Wt(g,new Date);return{button:String(g.getDate()),type:"button",role:"gridcell",tabIndex:we?0:-1,ariaSelected:L,ariaDisabled:z,disabled:z,ariaLabel:Z.format(g),dataDate:ko(g),onClick:(oe,xr)=>xe(g,xr),onMouseEnter:()=>n==="range"&&f.set(g),style:{appearance:"none",border:"none",cursor:z?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,P.themeSpacing)(1),fontSize:oe=>(0,P.themeSize)(oe),fontFamily:"inherit",opacity:z?.35:$e?.5:1,backgroundColor:oe=>L?(0,P.themeColor)(oe,"shift-7",l.get(oe)):M?(0,P.themeColor)(oe,"hover",l.get(oe)):"transparent",color:oe=>L?(0,P.themeColor)(oe,"shift-0",l.get(oe)):(0,P.themeColor)(oe,"text"),outline:zt?oe=>`1px solid ${(0,P.themeColor)(oe,"shift-6",l.get(oe))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:oe=>L?(0,P.themeColor)(oe,"shift-7",l.get(oe)):(0,P.themeColor)(oe,"shift-3",l.get(oe))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:oe=>S(oe,l.get(oe))}},_key:ko(g)}}function Sr(){let g=(C,w,z)=>({select:Array.from({length:C},(L,M)=>({option:String(M).padStart(2,"0"),value:String(M),selected:$e=>w.get($e)===M,_key:M})),ariaLabel:z,onChange:L=>{w.set(Number(L.target.value)),He()},style:aa()});return{div:[g(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},g(60,x,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,P.themeSpacing)(1),marginTop:(0,P.themeSpacing)(3)}}}function vr(){let g=(C,w)=>({button:C,type:"button",onClick:(z,L)=>w(L),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:z=>(0,P.themeSize)(z,"decrease-1"),color:z=>(0,P.themeColor)(z,"muted",l.get(z)),padding:(0,P.themeSpacing)(1)}});return{div:[g("Today",C=>{let w=new Date;v.set(he(w)),at(w),O(C)}),g("Clear",()=>{d.set(n==="range"?[null,null]:null),f.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,P.themeSpacing)(2),paddingTop:(0,P.themeSpacing)(2),borderTop:C=>`1px solid ${(0,P.themeColor)(C,"border")}`}}}function Cr(g,C){let w=g,z=v.get(),L=null;switch(w.key){case"ArrowLeft":L=xt(z,-1);break;case"ArrowRight":L=xt(z,1);break;case"ArrowUp":L=xt(z,-7);break;case"ArrowDown":L=xt(z,7);break;case"Home":L=wo(z,u);break;case"End":L=xt(wo(z,u),6);break;case"PageUp":L=Eo(z,w.shiftKey?-12:-1);break;case"PageDown":L=Eo(z,w.shiftKey?12:1);break;case"Enter":case" ":w.preventDefault(),xe(z,C);return;default:return}w.preventDefault(),v.set(L),at(L),O(C)}}function hn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,P.themeSpacing)(.5)}}function ra(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),color:r=>(0,P.themeColor)(r,"muted"),width:(0,P.themeSpacing)(7),height:(0,P.themeSpacing)(7),borderRadius:(0,P.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,P.themeColor)(r,"shift-3")}}}function aa(){return{fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),padding:(0,P.themeSpacing)(1),borderRadius:(0,P.themeSpacing)(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${(0,P.themeColor)(r,"border-strong")}`,backgroundColor:r=>(0,P.themeColor)(r,"inherit"),color:r=>(0,P.themeColor)(r,"text")}}var gn=require("@domphy/core"),st=require("@domphy/theme");function ia(r={}){var o;let n=(0,gn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${(0,st.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,st.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,st.themeSize)(e,"inherit"),color:e=>(0,st.themeColor)(e,"shift-10",n.get(e))},"& dd":{margin:0,fontSize:e=>(0,st.themeSize)(e,"inherit"),color:e=>(0,st.themeColor)(e,"text",n.get(e))}}}}var To=require("@domphy/core"),N=require("@domphy/theme");function la(r={}){var s,t;let{duration:n=240}=r,o=(0,To.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,To.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,N.themeColor)(a,"inherit",o.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",o.get(a)),color:a=>(0,N.themeColor)(a,"shift-10",o.get(a)),fontSize:a=>(0,N.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,N.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*4),height:(0,N.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,N.themeSpacing)(2),height:(0,N.themeSpacing)(2),flexShrink:0,marginTop:(0,N.themeSpacing)(-.5),borderInlineEnd:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",o.get(a))}`,borderBottom:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",o.get(a))}`,transform:"rotate(45deg)",transition:`transform ${n}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",o.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${n}ms ease, opacity ${n}ms ease, padding ${n}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*1),paddingBottom:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3)}}}}var oo=require("@domphy/core"),Be=require("@domphy/theme");var jt=0;function to(){jt++,jt===1&&(document.body.style.overflow="hidden")}function Mt(){jt=Math.max(0,jt-1),jt===0&&(document.body.style.overflow="")}var fn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function sa(r,n){let{state:o}=n,e=null,s=!1,t=!1,a=null,i=r.domElement;i.setAttribute("aria-modal","true");let m=()=>{s=!1,typeof i.close=="function"&&i.close(),i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="none",t&&(Mt(),t=!1),e==null||e.focus(),e=null},u=p=>{if(p.key!=="Tab")return;let y=Array.from(i.querySelectorAll(fn)).filter(f=>!f.closest("[aria-hidden='true']")&&f.offsetParent!==null);if(!y.length){p.preventDefault();return}let T=y[0],v=y[y.length-1];p.shiftKey?(document.activeElement===T||document.activeElement===i)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),T.focus())},l=p=>{p.preventDefault(),o.set(!1)};i.addEventListener("cancel",l);let c=p=>{if(p)s=!1,a&&(clearTimeout(a),a=null),e=document.activeElement,i.style.visibility="visible",i.style.pointerEvents="auto",i.style.display="",typeof i.showModal=="function"&&!i.open&&i.showModal(),t||(to(),t=!0),i.addEventListener("keydown",u),requestAnimationFrame(()=>{i.style.opacity="1";let y=i.querySelector(fn);y==null||y.focus()});else{if(s=!0,i.style.opacity="0",i.removeEventListener("keydown",u),!i.open){m();return}a=setTimeout(()=>{a=null,s&&m()},350)}};c(o.get());let d=o.addListener(c);return{requestClose:()=>o.set(!1),onTransitionEnd:p=>{s&&p.target===i&&p.propertyName==="opacity"&&m()},update(p){p.state!==o&&(d(),o=p.state,d=o.addListener(c))},destroy(){a&&(clearTimeout(a),a=null),d(),i.removeEventListener("cancel",l),t&&(Mt(),t=!1),i.removeEventListener("keydown",u),e==null||e.focus(),e=null}}}function ca(r={}){let{color:n="neutral",open:o=!1,labelledBy:e,describedBy:s}=r,t=(0,oo.toState)(o);return V(E({_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},(0,oo.behavior)("dialog",sa,{state:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(a,i)=>{var l;if(a.target!==i.domElement)return;let m=i.domElement.getBoundingClientRect();a.clientX>=m.left&&a.clientX<=m.right&&a.clientY>=m.top&&a.clientY<=m.bottom||(l=i.getBehavior("dialog"))==null||l.requestClose()},onTransitionEnd:(a,i)=>{var m;return(m=i.getBehavior("dialog"))==null?void 0:m.onTransitionEnd(a)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:a=>(0,Be.themeSize)(a,"inherit"),color:a=>(0,Be.themeColor)(a,"shift-10",n),backgroundColor:a=>(0,Be.themeColor)(a,"inherit",n),border:"none",borderRadius:a=>(0,Be.themeSpacing)((0,Be.themeDensity)(a)*2),padding:a=>(0,Be.themeSpacing)((0,Be.themeDensity)(a)*3),boxShadow:_("high"),"&::backdrop":{backgroundColor:a=>(0,Be.themeColor)(a,"shift-2","neutral"),opacity:.75}}})}var yn=require("@domphy/core"),ct=require("@domphy/theme");function ma(r={}){var o;let n=(0,yn.toState)((o=r.color)!=null?o:"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,ct.themeSpacing)(2),fontSize:e=>(0,ct.themeSize)(e,"inherit"),backgroundColor:e=>(0,ct.themeColor)(e),color:e=>(0,ct.themeColor)(e,"text",n.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,ct.themeColor)(e,"border-strong",n.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,ct.themeColor)(e,"border-strong",n.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var no=require("@domphy/core"),Te=require("@domphy/theme");var Do={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},bn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},_t=r=>r==="left"||r==="right";function Sn(r,n){return r==="start"?n?"right":"left":r==="end"?n?"left":"right":r}function ua(r,n){let{state:o,placement:e,size:s}=n,t=r.domElement;t.setAttribute("aria-modal","true");let a=v=>{v.preventDefault(),o.set(!1)};t.addEventListener("cancel",a);let i=(v,f)=>{let x=(v==="start"||v==="end")&&(t.ownerDocument.documentElement.dir==="rtl"||t.ownerDocument.dir==="rtl"),h=Sn(v,x),D=f!=null?f:_t(h)?(0,Te.themeSpacing)(80):(0,Te.themeSpacing)(64);return t.style.margin=bn[h],t.style.width=_t(h)?D:"100dvw",t.style.height=_t(h)?"100dvh":D,h},m=i(e,s),u=!1,l=!1,c=null,d=()=>{c=null,u&&(u=!1,typeof t.close=="function"&&t.close(),t.style.visibility="hidden",t.style.pointerEvents="none",t.style.display="none",l&&(Mt(),l=!1))},p=v=>{v.target===t&&v.propertyName==="transform"&&d()};t.addEventListener("transitionend",p);let y=v=>{if(v)u=!1,c&&(clearTimeout(c),c=null),t.style.visibility="visible",t.style.pointerEvents="auto",t.style.display="",typeof t.showModal=="function"&&!t.open&&t.showModal(),l||(to(),l=!0),requestAnimationFrame(()=>{t.style.transform="translate(0, 0)"});else{if(u=!0,t.style.transform=Do[m],!t.open){d();return}c=setTimeout(d,350)}};y(o.get());let T=o.addListener(y);return{requestClose:()=>o.set(!1),update(v){v.state!==o&&(T(),o=v.state,T=o.addListener(y)),(v.placement!==e||v.size!==s)&&(e=v.placement,s=v.size,m=i(e,s),o.get()||(t.style.transform=Do[m]))},destroy(){c&&(clearTimeout(c),c=null),T(),t.removeEventListener("cancel",a),t.removeEventListener("transitionend",p),l&&(Mt(),l=!1)}}}function da(r={}){let{color:n="neutral",open:o=!1,placement:e="end",size:s}=r,t=(0,no.toState)(o),a=Sn(e,!1),i=_t(a)?(0,Te.themeSpacing)(80):(0,Te.themeSpacing)(64),m=s!=null?s:i;return V(E({_onInsert:u=>{u.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},(0,no.behavior)("drawer",ua,{state:t,placement:e,size:s})),{onClick:(u,l)=>{var p;if(u.target!==l.domElement)return;let c=l.domElement.getBoundingClientRect();u.clientX>=c.left&&u.clientX<=c.right&&u.clientY>=c.top&&u.clientY<=c.bottom||(p=l.getBehavior("drawer"))==null||p.requestClose()},style:{transform:Do[a],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:u=>(0,Te.themeSize)(u,"inherit"),color:u=>(0,Te.themeColor)(u,"shift-10",n),backgroundColor:u=>(0,Te.themeColor)(u,"inherit",n),border:"none",padding:u=>(0,Te.themeSpacing)((0,Te.themeDensity)(u)*3),margin:bn[a],width:_t(a)?m:"100dvw",height:_t(a)?"100dvh":m,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:_("high"),"&::backdrop":{backgroundColor:u=>(0,Te.themeColor)(u,"shift-2","neutral"),opacity:.75}}})}var vn=require("@domphy/core"),ro=require("@domphy/theme");function pa(r={}){var o;let n=(0,vn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>(0,ro.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,ro.themeColor)(e,"shift-10",n.get(e))}}}var Cn=require("@domphy/core"),ft=require("@domphy/theme");function ha(r={}){var o;let n=(0,Cn.toState)((o=r.color)!=null?o:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,ft.themeSpacing)(3),paddingBlock:(0,ft.themeSpacing)(12),paddingInline:(0,ft.themeSpacing)(6),textAlign:"center",color:e=>(0,ft.themeColor)(e,"muted",n.get(e)),"& > :first-child":{color:e=>(0,ft.themeColor)(e,"shift-5",n.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,ft.themeColor)(e,"text",n.get(e))}}}}var Po="errorBoundaryOriginal";function ga(r){var o;let n=r.getMetadata(Po);if(typeof n=="function"){(o=r._childrenRelease)==null||o.call(r),r._setupFunctionChildren(n);return}if(n!=null){r.children.update(Array.isArray(n)?n:[n]);return}r.children.update([])}function fa(r={}){return{_onSchedule:(n,o)=>{n.getMetadata(Po)===void 0&&n.setMetadata(Po,o[n.tagName])},_onError:(n,o)=>{var t,a;(t=r.onError)==null||t.call(r,o);let e=()=>ga(n),s=typeof r.fallback=="function"?r.fallback(o,e):(a=r.fallback)!=null?a:{div:"An error occurred."};n.children.update([s])}}}var xn=require("@domphy/core"),mt=require("@domphy/theme");var ya={small:8,medium:10,large:14};function ba(r={}){var e,s;let n=(0,xn.toState)((e=r.color)!=null?e:"primary","color"),o=(0,mt.themeSpacing)(ya[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:o,height:o,borderRadius:"50%",fontSize:t=>(0,mt.themeSize)(t,"inherit"),backgroundColor:t=>(0,mt.themeColor)(t,"shift-13",n.get(t)),color:t=>(0,mt.themeColor)(t,"shift-0","neutral"),boxShadow:_("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,mt.themeColor)(t,"shift-14",n.get(t)),boxShadow:_("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,mt.themeColor)(t,"shift-15",n.get(t)),boxShadow:_("low")},"&:focus-visible":{boxShadow:t=>`${_("medium")}, ${S(t,n.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var En=require("@domphy/core"),et=require("@domphy/theme");function Sa(r={}){var o;let n=(0,En.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:(0,et.themeSpacing)(2),marginInline:0,marginTop:(0,et.themeSpacing)(3),marginBottom:(0,et.themeSpacing)(3),color:e=>(0,et.themeColor)(e,"text",n.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,et.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,et.themeSize)(e,"decrease-1"),color:e=>(0,et.themeColor)(e,"muted",n.get(e)),lineHeight:1.45}}}}var kn=require("@domphy/core"),K=require("@domphy/theme");function va(r={}){var s;let{layout:n="horizontal"}=r,o=(0,kn.toState)((s=r.color)!=null?s:"neutral","color"),e=n==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),fontSize:t=>(0,K.themeSize)(t,"inherit"),backgroundColor:t=>(0,K.themeColor)(t,"inherit",o.get(t)),color:t=>(0,K.themeColor)(t,"text",o.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,K.themeSpacing)(4),rowGap:(0,K.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,K.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),color:t=>(0,K.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,K.themeColor)(t,"inherit",o.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:(0,K.themeSpacing)((0,K.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,K.themeSpacing)(2)} * -1)`,fontSize:t=>(0,K.themeSize)(t,"decrease-1"),color:t=>(0,K.themeColor)(t,"text",o.get(t))}}}}var ao=require("@domphy/theme");function Ca(r={}){let{columns:n=1,gap:o=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof n=="number"?`repeat(${n}, minmax(0, 1fr))`:n,gap:s=>(0,ao.themeSpacing)((0,ao.themeDensity)(s)*o)},e?{alignItems:e}:{})}}var wn=require("@domphy/core"),Nt=require("@domphy/theme"),xa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ea(r={}){var o;let n=(0,wn.toState)((o=r.color)!=null?o:"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,Nt.themeColor)(e,"shift-11",n.get(e)),marginTop:0,marginBottom:(0,Nt.themeSpacing)(2),fontSize:e=>{let s=xa[e.elementNode.tagName]||"inherit";return(0,Nt.themeSize)(e,s)}}}}var Tn=require("@domphy/core"),$t=require("@domphy/theme");function ka(r={}){var o;let n=(0,Tn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:(0,$t.themeSpacing)(3),marginBottom:(0,$t.themeSpacing)(3),backgroundColor:e=>(0,$t.themeColor)(e,"inherit",n.get(e)),color:e=>(0,$t.themeColor)(e,"text",n.get(e))}}}var Dn=require("@domphy/core"),Et=require("@domphy/theme");function wa(r={}){var o;let n=(0,Dn.toState)((o=r.color)!=null?o:"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,Et.themeSpacing)(4),height:(0,Et.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Et.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Et.themeColor)(e,"text",n.get(e))}}}var Pn=require("@domphy/core"),qt=require("@domphy/theme");function Ta(r={}){var o;let n=(0,Pn.toState)((o=r.color)!=null?o:"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,qt.themeSpacing)(2),backgroundColor:e=>(0,qt.themeColor)(e,"inherit",n.get(e)),color:e=>(0,qt.themeColor)(e,"text",n.get(e))}}}var Io=require("@domphy/core"),X=require("@domphy/theme");function Da(r={}){var e,s;let n=(0,Io.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Io.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,X.themeSize)(t,"inherit"),color:t=>(0,X.themeColor)(t,"text",n.get(t)),display:"inline-flex",position:"relative",width:(0,X.themeSpacing)(6),height:(0,X.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,X.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,X.themeColor)(t,"border-strong",n.get(t))}`,color:t=>(0,X.themeColor)(t,"text",n.get(t)),width:(0,X.themeSpacing)(4),height:(0,X.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,X.themeColor)(t,"hover",n.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",o.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",o.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,X.themeSpacing)(.5)} solid ${(0,X.themeColor)(t,"inherit",o.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",o.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-3",o.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,X.themeColor)(t,"shift-8",o.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:(0,X.themeSpacing)(1.5),boxShadow:t=>S(t,o.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,X.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var In=require("@domphy/core"),le=require("@domphy/theme");function Pa(r={}){var o;let n=(0,In.toState)((o=r.color)!=null?o:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,le.themeSize)(e,"inherit"),color:e=>(0,le.themeColor)(e,"text",n.get(e)),paddingBlock:e=>(0,le.themeSpacing)((0,le.themeDensity)(e)*1),paddingInline:e=>(0,le.themeSpacing)((0,le.themeDensity)(e)*1),blockSize:e=>(0,le.themeSpacing)(6+(0,le.themeDensity)(e)*2),inlineSize:e=>(0,le.themeSpacing)(6+(0,le.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,le.themeSpacing)((0,le.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,n.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,le.themeSpacing)((0,le.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,le.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,le.themeColor)(e,"border-strong","neutral")}`}}}}var Lo=require("@domphy/core"),se=require("@domphy/theme");function Ia(r={}){var s,t;let{mode:n="datetime-local"}=r,o=(0,Lo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Lo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:n,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>(0,se.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,se.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,se.themeColor)(a,"inherit",o.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,se.themeColor)(a,"border-strong",o.get(a))}`,borderRadius:a=>(0,se.themeSpacing)((0,se.themeDensity)(a)*1.5),paddingInline:a=>(0,se.themeSpacing)((0,se.themeDensity)(a)*3),height:a=>(0,se.themeSpacing)(6+(0,se.themeDensity)(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,se.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,se.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,se.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,se.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,se.themeSpacing)(.5)} solid ${(0,se.themeColor)(a,"shift-6","error")}`}}}}var Oo=require("@domphy/core"),W=require("@domphy/theme");function La(r={}){var e,s;let n=(0,Oo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Oo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,W.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,W.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,W.themeColor)(t,"inherit",n.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,W.themeColor)(t,"border-strong",n.get(t))}`,borderRadius:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1.5),height:t=>(0,W.themeSpacing)(6+(0,W.themeDensity)(t)*2),paddingInline:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,W.themeSpacing)(1),height:(0,W.themeSpacing)(6),paddingInline:(0,W.themeSpacing)(2),cursor:"pointer",color:t=>(0,W.themeColor)(t,"shift-11",n.get(t)),backgroundColor:t=>(0,W.themeColor)(t,"surface",n.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,W.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,W.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,W.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,W.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,W.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,W.themeColor)(t,"shift-3","neutral")}}}}var zo=require("@domphy/core"),ne=require("@domphy/theme");function Oa(r={}){var e,s;let n=(0,zo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,zo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,ne.themeSpacing)(10),paddingInlineStart:t=>(0,ne.themeSpacing)((0,ne.themeDensity)(t)*3),paddingInlineEnd:t=>(0,ne.themeSpacing)((0,ne.themeDensity)(t)*1.5),paddingBlock:t=>(0,ne.themeSpacing)((0,ne.themeDensity)(t)*1),borderRadius:t=>(0,ne.themeSpacing)((0,ne.themeDensity)(t)*1.5),fontSize:t=>(0,ne.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ne.themeColor)(t,"border-strong",n.get(t))}`,color:t=>(0,ne.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,ne.themeColor)(t,"inherit",n.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,ne.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,ne.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ne.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,ne.themeColor)(t,"muted","neutral")}}}}var Vo=require("@domphy/theme");function za(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:(0,Vo.themeSpacing)(2),"& > *":{minWidth:`${(0,Vo.themeSpacing)(9)}!important`}},_onMount:r=>{let n=r.domElement,o=()=>Array.from(n.querySelectorAll("input")),e=a=>{let i=o(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=o(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,p,y;a.preventDefault();let i=(p=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?p:"",m=o(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((T,v)=>{let f=m[l+v];f&&(f.value=T,f.dispatchEvent(new Event("input",{bubbles:!0})),f.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(y=m[c])==null||y.focus()};n.addEventListener("input",e),n.addEventListener("keydown",s),n.addEventListener("paste",t),r.addHook("Remove",()=>{n.removeEventListener("input",e),n.removeEventListener("keydown",s),n.removeEventListener("paste",t)})}}}var yt=require("@domphy/core"),ye=require("@domphy/theme");var Va='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',Ra='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>',Ma=["name","value","onInput","disabled","required"];function Ln(r){if(r!=null)return typeof r=="function"?r:(0,yt.isState)(r)?n=>r.get(n):r}function _a(r={}){var t,a;let n=(0,yt.toState)((t=r.color)!=null?t:"neutral","color"),o=(0,yt.toState)((a=r.accentColor)!=null?a:"primary","accentColor"),e=(0,yt.toState)(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of Ma)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var T,v,f,b,x,h,D;let m=(T=r.name)!=null?T:s.name,u=Ln((v=r.value)!=null?v:s.value),l=(f=r.onInput)!=null?f:s.onInput,c=Ln((b=r.disabled)!=null?b:s.disabled),d=(x=r.required)!=null?x:s.required,p=V(E(E(E(E(E({input:null,type:k=>e.get(k)?"text":"password",ariaLabel:(h=r.ariaLabel)!=null?h:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),y={button:k=>(0,yt.rawHtml)(e.get(k)?Ra:Va),type:"button",ariaLabel:k=>e.get(k)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(p),i.children.insert(y)},style:{display:"flex",alignItems:"center",gap:i=>(0,ye.themeSpacing)((0,ye.themeDensity)(i)*1),paddingBlock:i=>(0,ye.themeSpacing)((0,ye.themeDensity)(i)*1),paddingInline:i=>(0,ye.themeSpacing)((0,ye.themeDensity)(i)*3),borderRadius:i=>(0,ye.themeSpacing)((0,ye.themeDensity)(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ye.themeColor)(i,"border-strong",n.get(i))}`,color:i=>(0,ye.themeColor)(i,"text",n.get(i)),backgroundColor:i=>(0,ye.themeColor)(i,"inherit",n.get(i)),fontSize:i=>(0,ye.themeSize)(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${(0,ye.themeColor)(i,"shift-5",o.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,o.get(i))}}}}var Ro=require("@domphy/core"),Se=require("@domphy/theme");function Na(r={}){var e,s;let n=(0,Ro.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Ro.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>(0,Se.themeSize)(t,"inherit"),color:t=>(0,Se.themeColor)(t,"text",n.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,Se.themeSpacing)(6),height:(0,Se.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,Se.themeColor)(t,"border-strong",n.get(t))}`,color:t=>(0,Se.themeColor)(t,"text",n.get(t)),width:(0,Se.themeSpacing)(4),height:(0,Se.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,Se.themeColor)(t,"hover",n.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,Se.themeColor)(t,"shift-6",o.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,Se.themeColor)(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,Se.themeColor)(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,o.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,Se.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Mo=require("@domphy/core"),De=require("@domphy/theme");function $a(r={}){var e,s;let n=(0,Mo.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Mo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:(0,De.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,De.themeSpacing)(1.5),borderRadius:(0,De.themeSpacing)(999),backgroundColor:t=>(0,De.themeColor)(t,"shift-3",n.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,De.themeSpacing)(4),height:(0,De.themeSpacing)(4),borderRadius:(0,De.themeSpacing)(999),border:"none",marginTop:`calc((${(0,De.themeSpacing)(1.5)} - ${(0,De.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,De.themeColor)(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,De.themeColor)(t,"shift-10",o.get(t))},borderRadius:(0,De.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var _o=require("@domphy/core"),ce=require("@domphy/theme");function Ba(r={}){var e,s;let n=(0,_o.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,_o.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>(0,ce.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,ce.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,ce.themeColor)(t,"inherit",n.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ce.themeColor)(t,"border-strong",n.get(t))}`,borderRadius:t=>(0,ce.themeSpacing)((0,ce.themeDensity)(t)*1.5),minWidth:(0,ce.themeSpacing)(32),paddingInline:t=>(0,ce.themeSpacing)((0,ce.themeDensity)(t)*3),paddingBlock:t=>(0,ce.themeSpacing)((0,ce.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,ce.themeColor)(t,"shift-7",n.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,ce.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,ce.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,ce.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ce.themeColor)(t,"border-strong","neutral")}`}}}}var On=require("@domphy/core"),me=require("@domphy/theme");function Aa(r={}){var o;let n=(0,On.toState)((o=r.accentColor)!=null?o:"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,me.themeSize)(e,"inherit"),backgroundColor:e=>(0,me.themeColor)(e,"inherit"),color:e=>(0,me.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,me.themeSpacing)(9),height:(0,me.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,me.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,me.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>S(e,n.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,me.themeColor)(e,"increase-3",n.get(e))},"&::after":{left:`calc(100% - ${(0,me.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,me.themeSpacing)(3),height:(0,me.themeSpacing)(3),borderRadius:(0,me.themeSpacing)(999),left:(0,me.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,me.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,me.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,me.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,me.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var No=require("@domphy/core"),j=require("@domphy/theme");function Ha(r={}){var s,t;let{type:n="text"}=r,o=(0,No.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,No.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:n,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,j.themeSpacing)(10),paddingInline:a=>(0,j.themeSpacing)((0,j.themeDensity)(a)*3),paddingBlock:a=>(0,j.themeSpacing)((0,j.themeDensity)(a)*1),borderRadius:a=>(0,j.themeSpacing)((0,j.themeDensity)(a)*1.5),fontSize:a=>(0,j.themeSize)(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,j.themeColor)(a,"border-strong",o.get(a))}`,color:a=>(0,j.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,j.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,j.themeColor)(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>(0,j.themeColor)(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,j.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>(0,j.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,j.themeColor)(a,"border-strong","neutral")}`,color:a=>(0,j.themeColor)(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${(0,j.themeSpacing)(.5)} solid ${(0,j.themeColor)(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${(0,j.themeSpacing)(.5)} solid ${(0,j.themeColor)(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${(0,j.themeSpacing)(.5)} solid ${(0,j.themeColor)(a,"shift-6","warning")}`}}}}var zn=require("@domphy/core"),Pe=require("@domphy/theme");function Fa(r={}){var o;let n=(0,zn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>(0,Pe.themeSize)(e,"inherit"),color:e=>(0,Pe.themeColor)(e,"text",n.get(e)),backgroundColor:e=>(0,Pe.themeColor)(e,"inherit",n.get(e)),paddingBlock:e=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(e)*(.5/1.5)),paddingInline:e=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(e)*(1/1.5)),outline:e=>`1px solid ${(0,Pe.themeColor)(e,"border-strong",n.get(e))}`}}}var $o=require("@domphy/core"),bt=require("@domphy/theme");function Ka(r={}){var e,s;let n=(0,$o.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,$o.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,bt.themeSpacing)(2),fontSize:t=>(0,bt.themeSize)(t,"inherit"),color:t=>(0,bt.themeColor)(t,"text",n.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,bt.themeColor)(t,"shift-10",o.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,bt.themeColor)(t,"muted","neutral")}}}}var Bo=require("@domphy/core"),tt=require("@domphy/theme");function Wa(r={}){var e,s;let n=(0,Bo.toState)((e=r.color)!=null?e:"primary","color"),o=(0,Bo.toState)((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>(0,tt.themeSize)(t,"inherit"),backgroundColor:t=>(0,tt.themeColor)(t),color:t=>(0,tt.themeColor)(t,"shift-13",n.get(t)),textDecoration:"none","&:visited":{color:t=>(0,tt.themeColor)(t,"shift-13",o.get(t))},"&:hover:not([disabled])":{color:t=>(0,tt.themeColor)(t,"shift-14",n.get(t)),textDecoration:"underline"},borderRadius:(0,tt.themeSpacing)(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>(0,tt.themeColor)(t,"muted","neutral")}}}}var Vn=require("@domphy/core"),I=require("@domphy/theme");var ja={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},qa={small:.5,medium:1,large:1.5};function Ya(r={}){var i,m,u;let n=(i=r.variant)!=null?i:"outline",o=(0,Vn.toState)((m=r.color)!=null?m:n==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=Vt[e];if(n==="ghost"){let l=qa[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>(0,I.themeSize)(c,s),textDecoration:"none",paddingBlock:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),paddingInline:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),borderRadius:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>(0,I.themeColor)(c,"text",o.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",o.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"hover",o.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",o.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"increase-2",o.get(c))},"&:focus-visible":{boxShadow:c=>S(c,o.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>(0,I.themeColor)(c,"border-strong","neutral")}}}}let t=n==="solid",a=ja[e];return V(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>(0,I.themeSize)(l,s),textDecoration:"none",paddingBlock:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.block),paddingInline:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.inline),borderRadius:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${(0,I.themeColor)(l,"border-strong",o.get(l))}`,color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-13",o.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-13",o.get(l)):(0,I.themeColor)(l,"inherit",o.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-14",o.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-14",o.get(l)):(0,I.themeColor)(l,"hover",o.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?(0,I.themeColor)(l,"shift-15",o.get(l)):(0,I.themeColor)(l,"increase-2",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>(0,I.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,I.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,I.themeColor)(l,"muted","neutral")}}})}var Rn=require("@domphy/core"),A=require("@domphy/theme");function Ga(r={}){var o;let n=(o=r.color)!=null?o:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>(0,A.themeColor)(e,"inherit",n),color:e=>(0,A.themeColor)(e,"text",n)}}}function Ua(r={}){let{dense:n=!1}=r;return{style:{display:"flex",alignItems:"center",gap:o=>(0,A.themeSpacing)((0,A.themeDensity)(o)*2),paddingBlock:o=>(0,A.themeSpacing)(n?1:(0,A.themeDensity)(o)*2),paddingInline:o=>(0,A.themeSpacing)((0,A.themeDensity)(o)*3),fontSize:o=>(0,A.themeSize)(o,"inherit"),color:o=>(0,A.themeColor)(o,"text")}}}function Xa(r={}){var s,t;let n=(0,Rn.toState)((s=r.color)!=null?s:"neutral","color"),o=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,A.themeSpacing)((0,A.themeDensity)(a)*2),paddingBlock:a=>(0,A.themeSpacing)(e?1:(0,A.themeDensity)(a)*2),paddingInline:a=>(0,A.themeSpacing)((0,A.themeDensity)(a)*3),fontSize:a=>(0,A.themeSize)(a,"inherit"),color:a=>(0,A.themeColor)(a,"text",n.get(a)),borderRadius:a=>(0,A.themeSpacing)((0,A.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,A.themeColor)(a,"hover",n.get(a))},"&:active:not([disabled])":{backgroundColor:a=>(0,A.themeColor)(a,"increase-2",n.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,A.themeColor)(a,"shift-3",o),color:a=>(0,A.themeColor)(a,"shift-12",o)},"&:focus-visible":{boxShadow:a=>S(a,o)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Mn=require("@domphy/core"),Re=require("@domphy/theme");function Za(r={}){var o;let n=(0,Mn.toState)((o=r.accentColor)!=null?o:"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,Re.themeSize)(e,"inherit"),color:e=>(0,Re.themeColor)(e,"text",n.get(e)),backgroundColor:e=>(0,Re.themeColor)(e,"inherit",n.get(e)),height:e=>(0,Re.themeSpacing)((0,Re.themeDensity)(e)*(6/1.5)),borderRadius:e=>(0,Re.themeSpacing)((0,Re.themeDensity)(e)*(1/1.5)),paddingInline:e=>(0,Re.themeSpacing)((0,Re.themeDensity)(e)*(1.5/1.5))}}}var io=require("@domphy/core"),Y=require("@domphy/theme");function Ja(r={items:[]}){var l;let{items:n=[],selectable:o=!0,color:e="neutral",accentColor:s="primary"}=r,t=(0,io.toState)((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let p=c.nodeId;return d.items.map((y,T)=>{var f;let v=(f=y.key)!=null?f:T;return V(E({button:typeof y.label=="string"?[{span:y.label}]:[y.label],_key:v,type:"button",id:`menuitem${p}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=y.onClick)==null||b.call(y)},onKeyDown:b=>{var Z;let x=b.key;if(x==="Enter"||x===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(x))return;b.preventDefault();let h=d.items.map((Ce,ge)=>{var ie;return(ie=Ce.key)!=null?ie:ge}),D=h.indexOf(v),k=D;x==="ArrowDown"?k=(D+1)%h.length:x==="ArrowUp"?k=(D-1+h.length)%h.length:x==="Home"?k=0:x==="End"&&(k=h.length-1),(Z=document.getElementById(`menuitem${p}${h[k]}`))==null||Z.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,Y.themeSpacing)(2),width:"100%",fontSize:b=>(0,Y.themeSize)(b,"inherit"),height:b=>(0,Y.themeSpacing)(6+(0,Y.themeDensity)(b)*2),paddingInline:b=>(0,Y.themeSpacing)((0,Y.themeDensity)(b)*3),border:"none",outline:"none",color:b=>(0,Y.themeColor)(b,"text",d.color),backgroundColor:b=>(0,Y.themeColor)(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>(0,Y.themeColor)(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>(0,Y.themeColor)(b,"shift-3",d.accentColor),color:b=>(0,Y.themeColor)(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let p=d;return{update(y){y.activeKey!==p.activeKey&&!y.activeKeyIsCallerOwned&&y.activeKey.set(p.activeKey.get()),p=y,p.items.length!==0&&c.children.update(i(c,p))}}},u={items:n,activeKey:t,activeKeyIsCallerOwned:a,selectable:o,color:e,accentColor:s};return V(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{n.length!==0&&(d[c.tagName]=i(c,u))}},(0,io.behavior)("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>(0,Y.themeSpacing)((0,Y.themeDensity)(c)*2),paddingInline:c=>(0,Y.themeSpacing)((0,Y.themeDensity)(c)*2),fontSize:c=>(0,Y.themeSize)(c,"inherit"),backgroundColor:c=>(0,Y.themeColor)(c,"inherit",e),color:c=>(0,Y.themeColor)(c,"text",e),borderRadius:c=>(0,Y.themeSpacing)((0,Y.themeDensity)(c)*2),outline:c=>`1px solid ${(0,Y.themeColor)(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:_("medium")}})}var Nn=require("@domphy/core");var _n=r=>!!r&&typeof r.get=="function"&&r._isState===!0,ot=r=>{let n={},o=[];for(let e in r){let s=r[e];e==="x"?o.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?o.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?o.push(`scale(${s})`):e==="rotate"?o.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):n[e]=s}return o.length&&(n.transform=o.join(" ")),n};function Ao(r={}){var n,o,e,s;return{duration:(n=r.duration)!=null?n:300,delay:(o=r.delay)!=null?o:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function Ho(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function Qa(r,n){let o=r.domElement,e=n,s,t=i=>{s==null||s(),s=void 0,!(!o||!_n(i))&&(s=i.addListener(m=>{Ho()?Object.assign(o.style,ot(m)):typeof o.animate=="function"&&o.animate([ot(m)],Ao(e.transition))}))},a=(i,m)=>{if(!o)return;let u=_n(i.animate)?i.animate.get():i.animate;if(Ho()){u?Object.assign(o.style,ot(u)):m==="enter"&&i.initial&&Object.assign(o.style,ot(i.initial));return}if(typeof o.animate=="function")if(u){let l=m==="enter"&&i.initial?[ot(i.initial),ot(u)]:[ot(u)];o.animate(l,Ao(i.transition))}else m==="enter"&&i.initial&&Object.assign(o.style,ot(i.initial))};return a(n,"enter"),t(n.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function ei(r={}){return V(E({},(0,Nn.behavior)("motion",(n,o)=>Qa(n,o),r)),{_onBeforeRemove:(n,o)=>{var a,i;let e=n.domElement,s=n.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return o();if(Ho())return Object.assign(e.style,ot(t)),o();e.animate([ot(t)],Ao((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(o,o)}})}var $n=require("@domphy/core"),kt=require("@domphy/theme");function ti(r={}){var o;let n=(0,$n.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>(0,kt.themeSize)(e,"inherit"),backgroundColor:e=>(0,kt.themeColor)(e),color:e=>(0,kt.themeColor)(e,"text",n.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,kt.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var wt=require("@domphy/core"),ee=require("@domphy/theme");function oi(r,n){if(n<=7)return Array.from({length:n},(t,a)=>a+1);let o=[1];r>3&&o.push("...");let e=Math.max(2,r-1),s=Math.min(n-1,r+1);for(let t=e;t<=s;t++)o.push(t);return r<n-2&&o.push("..."),o.push(n),o}function ni(r,n,o,e){if((0,wt.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,wt.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function Bn(r,n){let o=r.getMetadata("paginationTotal");return o||(o=(0,wt.toState)(n),r.setMetadata("paginationTotal",o)),o}function ri(r){let{total:n,color:o="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(a)*2),height:a=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(a)*2),paddingInline:a=>(0,ee.themeSpacing)((0,ee.themeDensity)(a)*2),borderRadius:a=>(0,ee.themeSpacing)((0,ee.themeDensity)(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>(0,ee.themeSize)(a,"inherit"),backgroundColor:"transparent",color:a=>(0,ee.themeColor)(a,"shift-13",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>(0,ee.themeColor)(a,"shift-13",o),backgroundColor:a=>(0,ee.themeColor)(a,"hover",o)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=V(E({},s),{backgroundColor:a=>(0,ee.themeColor)(a,"shift-13",e),color:a=>(0,ee.themeColor)(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>(0,ee.themeColor)(a,"shift-13",e)}});return V(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=ni(a,"paginationPage",r.value,1),m=Bn(a,n),u={div:l=>{let c=i.get(l),d=m.get(l),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let y=0;for(let T of oi(c,d))if(T==="...")p.push({span:"\u2026",_key:`ellipsis-${y++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>(0,ee.themeSpacing)((0,ee.themeDensity)(v)*2),color:v=>(0,ee.themeColor)(v,"shift-7",o)}});else{let v=T===c;p.push({button:String(T),_key:`page-${T}`,type:"button",ariaLabel:`Page ${T}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(T),style:v?t:s})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),p},style:{display:"flex",alignItems:"center",gap:(0,ee.themeSpacing)(1)}};a.children.insert(u)}},(0,wt.behavior)("pagination-total",a=>({update(i){Bn(a,i.total).set(i.total)}}),{total:n})),{style:{display:"inline-flex"}})}var An=require("@domphy/core"),Bt=require("@domphy/theme");function ai(r={}){var s;let{padding:n=4,divider:o=!1}=r,e=(0,An.toState)((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>(0,Bt.themeSpacing)((0,Bt.themeDensity)(t)*n)},o?{borderBottom:t=>`1px solid ${(0,Bt.themeColor)(t,"border",e.get(t))}`}:{})}}var Hn=require("@domphy/core"),lo=require("@domphy/theme");function ii(r={}){var o;let n=(0,Hn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>(0,lo.themeSize)(e,"inherit"),color:e=>(0,lo.themeColor)(e,"text",n.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var Yt=require("@domphy/core"),St=require("@domphy/theme");function li(r){var c;let{open:n=!1,placement:o="bottom",openOn:e="click"}=r,s=(0,Yt.toState)(n),t=(0,Yt.toState)(o),{show:a,hide:i,anchorPartial:m}=Qe({kind:"popover",open:s,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>(0,St.themeColor)(d,"inherit"),color:d=>(0,St.themeColor)(d,"text"),borderRadius:d=>(0,St.themeSpacing)((0,St.themeDensity)(d)*2),outline:d=>`1px solid ${(0,St.themeColor)(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};return(c=r.content).$||(c.$=[]),r.content.$.push(u),(0,Yt.merge)(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?Ve("popover",d.elementNode):void 0,onMouseEnter:(d,p)=>e==="hover"&&a(p),onMouseLeave:(d,p)=>e==="hover"&&i(p),onClick:(d,p)=>{e==="click"&&(s.get()?i(p):a(p))},onKeyDown:(d,p)=>{d.key==="Escape"&&s.get()&&i(p)},onFocus:(d,p)=>e==="hover"&&a(p),onBlur:(d,p)=>{if(e!=="hover")return;let y=d.relatedTarget,v=p.getRoot().domElement.querySelector(`#${Ve("popover",p)}`);y&&(v!=null&&v.contains(y))||i(p)}}),m}var Fn=require("@domphy/core"),je=require("@domphy/theme");function Fo(r={}){let{placement:n="bottom-end",color:o="neutral",sideOffset:e=(0,je.themeSpacing)(6),bordered:s=!0}=r,t=(0,Fn.toState)(n),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>(0,je.themeSize)(l),backgroundColor:l=>(0,je.themeColor)(l),color:l=>(0,je.themeColor)(l,"text",o),position:"relative","&::after":{content:'""',position:"absolute",width:(0,je.themeSpacing)(1.5),height:(0,je.themeSpacing)(1.5),backgroundColor:l=>(0,je.themeColor)(l,"inherit",o),borderWidth:s?"1px":0,borderColor:l=>(0,je.themeColor)(l,"border-strong",o),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",p=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${p}) rotate(45deg)`}}}}}var Kn=require("@domphy/core"),Me=require("@domphy/theme");function si(r={}){var o;let n=(0,Kn.toState)((o=r.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>(0,Me.themeSize)(e,"inherit"),color:e=>(0,Me.themeColor)(e,"text",n.get(e)),backgroundColor:e=>(0,Me.themeColor)(e,"inherit",n.get(e)),border:"none",paddingBlock:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2),paddingInline:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*3),borderRadius:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2)}}}var Ko=require("@domphy/core"),nt=require("@domphy/theme");function ci(r={}){var e,s;let n=(0,Ko.toState)((e=r.color)!=null?e:"neutral","color"),o=(0,Ko.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:(0,nt.themeSpacing)(2),border:0,borderRadius:(0,nt.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,nt.themeColor)(t,"inherit",n.get(t)),color:t=>(0,nt.themeColor)(t,"text",n.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,nt.themeColor)(t,"inherit",n.get(t)),borderRadius:(0,nt.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,nt.themeColor)(t,"shift-9",o.get(t)),borderRadius:(0,nt.themeSpacing)(999),transition:"width 220ms ease"}}}}var ut=require("@domphy/core"),Tt=require("@domphy/theme");var mi='<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>',ui='<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 Wn(r,n){var o,e,s;r.onChange=n.onChange,r.readOnly=(o=n.readOnly)!=null?o:!1,r.max=(e=n.max)!=null?e:5,r.color=(s=n.color)!=null?s:"warning",(0,ut.isState)(n.value)?n.value!==r.valueState&&r.valueState.set(n.value.get()):n.value!==void 0&&r.valueState.set(n.value)}function di(r,n,o,e){let s=a=>{let i=e.get(a);return i>0?i:o.valueState.get(a)},t={button:a=>(0,ut.rawHtml)(n<=s(a)?mi:ui),_key:n,type:"button",ariaLabel:`${n} star${n>1?"s":""}`,onClick:()=>{var i;if(o.readOnly)return;let a=n===o.valueState.get()?0:n;o.valueState.set(a),(i=o.onChange)==null||i.call(o,a),e.set(0)},onMouseEnter:()=>{o.readOnly||e.set(n)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(o.readOnly)return;let i=o.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(o.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;o.valueState.set(m),(l=o.onChange)==null||l.call(o,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:(0,Tt.themeSpacing)(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,o.color)}}};r.children.insert(t)}function Wo(r,n,o){let e=r.children.items;for(;e.length>n.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=n.max;s++)di(r,s,n,o)}function pi(r={}){var e,s,t,a,i,m,u;let n={valueState:(0,ut.toState)((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},o=(0,ut.toState)(0);return V(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,Tt.themeSpacing)(.5),fontSize:l=>(0,Tt.themeSize)(l,"increase-1"),cursor:n.readOnly?"default":"pointer",color:l=>(0,Tt.themeColor)(l,"muted",n.color)}},(0,ut.behavior)("rating",(l,c)=>(Wn(n,c),Wo(l,n,o),{update(d){Wn(n,d),Wo(l,n,o)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{Wo(l,n,o)}})}var so=require("@domphy/core"),Dt=require("@domphy/theme");function hi(r={}){var m,u,l;let{size:n=16,thickness:o=.25}=r,e=(0,so.toState)((m=r.value)!=null?m:0,"value"),s=(0,so.toState)((u=r.color)!=null?u:"primary","color"),t=(0,so.toState)((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-o)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,Dt.themeSpacing)(n),height:(0,Dt.themeSpacing)(n),borderRadius:"50%",color:c=>(0,Dt.themeColor)(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${(0,Dt.themeColor)(c,"shift-9",s.get(c))} ${e.get(c)}%, ${(0,Dt.themeColor)(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}var co=require("@domphy/theme");function jo(r={}){let{gap:n=4,align:o="center",justify:e,wrap:s=!1}=r;return{style:E(E({display:"flex",alignItems:o,gap:t=>(0,co.themeSpacing)((0,co.themeDensity)(t)*n)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}var jn=require("@domphy/core"),rt=require("@domphy/theme");function gi(r={}){var o;let n=(0,jn.toState)((o=r.color)!=null?o:"neutral","color");return{style:{overflow:"auto",color:e=>(0,rt.themeColor)(e,"text",n.get(e)),"&::-webkit-scrollbar":{width:(0,rt.themeSpacing)(2),height:(0,rt.themeSpacing)(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-5",n.get(e)),borderRadius:(0,rt.themeSpacing)(999),border:`${(0,rt.themeSpacing)(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-7",n.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,rt.themeColor)(e,"shift-5",n.get(e))} transparent`}}}var Pt=require("@domphy/core"),de=require("@domphy/theme");function qn(r,n,o,e){if((0,Pt.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,Pt.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function fi(r,n,o,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=n.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(o),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function Yn(r,n,o,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>n.get(u)===a,tabIndex:u=>{var c,d;let l=n.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>n.set(a),onKeyDown:u=>fi(u,r,a,n),style:{cursor:"pointer",fontSize:u=>(0,de.themeSize)(u,"inherit"),height:(0,de.themeSpacing)(6),paddingBlock:(0,de.themeSpacing)(1),paddingInline:(0,de.themeSpacing)(3),border:"none",borderRadius:(0,de.themeSpacing)(10),color:u=>(0,de.themeColor)(u,"text",o),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,de.themeColor)(u,"shift-3",o)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,de.themeColor)(u,"increase-2",o)},"&[aria-checked=true]":{backgroundColor:u=>(0,de.themeColor)(u,"shift-0",e),color:u=>(0,de.themeColor)(u,"shift-10",e),boxShadow:_("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${_("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function yi(r={items:[]}){var t,a,i;let{items:n=[],color:o="neutral",accentColor:e="primary"}=r,s={items:n,color:o,accentColor:e};return V(E({role:"radiogroup",_context:{segmented:{value:(0,Pt.toState)((i=(a=r.value)!=null?a:(t=n[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=qn(m,"segmentedValue",r.value,(d=(c=n[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=Yn(n,l,o,e)}},(0,Pt.behavior)("segmented-items",m=>({update(u){var c,d;let l=qn(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(Yn(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,de.themeSpacing)(1),paddingInline:(0,de.themeSpacing)(1),gap:(0,de.themeSpacing)(.5),borderRadius:(0,de.themeSpacing)(10),backgroundColor:m=>(0,de.themeColor)(m,"inherit",o),color:m=>(0,de.themeColor)(m,"text",o)}})}var B=require("@domphy/theme");function bi(r={}){let{color:n="neutral",accentColor:o="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,B.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,B.themeColor)(e,"text",n),backgroundColor:e=>(0,B.themeColor)(e,"inherit",n),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,B.themeColor)(e,"border-strong",n)}`,borderRadius:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1.5),paddingBlock:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*1),paddingLeft:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*3),paddingRight:e=>(0,B.themeSpacing)((0,B.themeDensity)(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,B.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,B.themeSpacing)(2)} center`,backgroundSize:`${(0,B.themeSpacing)(2.5)} ${(0,B.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,B.themeSpacing)(6+(0,B.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,B.themeColor)(e,"shift-5",o)}`},"&:focus-visible":{boxShadow:e=>S(e,o)},"& optgroup":{color:e=>(0,B.themeColor)(e,"shift-11",n)},"& option[disabled]":{color:e=>(0,B.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,B.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,B.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,B.themeColor)(e,"shift-2","neutral")}}}}var dt=require("@domphy/core"),re=require("@domphy/theme");var Si=1e3;function vi(r){let n=r.getMetadata("selectBoxTypeahead");return n||(n={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",n)),n}var Gn=(r,n)=>r.trim().toLowerCase().startsWith(n);function Ci(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(n=>n.getAttribute("aria-disabled")!=="true"&&!n.hasAttribute("disabled")):[]}function xi(r){let{options:n=[],placement:o="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,dt.toState)(r.value),i=(0,dt.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"selectBox",open:i,placement:(0,dt.toState)(o),content:r.content}),c={onClick:(f,b)=>!t&&u(b),dataTone:"shift-14",style:{backgroundColor:f=>(0,re.themeColor)(f,"inherit"),color:f=>(0,re.themeColor)(f,"text"),borderRadius:f=>(0,re.themeSpacing)((0,re.themeDensity)(f)*2),outline:f=>`1px solid ${(0,re.themeColor)(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,dt.merge)(r.content,c);let d=f=>({div:b=>{let x=f.state.get(b),h=Array.isArray(x)?x:[x];return f.options.filter(k=>h.includes(k.value)).map(k=>({span:k.label,$:[Kt({color:f.color,removable:f.multiple})],_key:k.value,_onRemove:Z=>{let Ce=f.state.get(),ie=(Array.isArray(Ce)?Ce:[Ce]).filter(Le=>Le!==k.value);f.multiple?f.state.set(ie):f.state.set(ie[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,re.themeSpacing)(1),flex:1}}),p=(f,b)=>({update(x){f.children.update([d(x)])}}),y=f=>i.get()?u(f):m(f),T=(f,b)=>{var ge,ie,Le,pe;let x=vi(b);x.timer&&clearTimeout(x.timer),x.buffer+=f.toLowerCase(),x.timer=setTimeout(()=>{x.buffer=""},Si);let h=x.buffer.length>1&&new Set(x.buffer).size===1,D=h?x.buffer[0]:x.buffer;if(i.get()){let xe=b.getRoot().domElement,He=(ge=xe==null?void 0:xe.querySelector(`#${Ve("selectBox",b)}`))!=null?ge:null,Fe=Ci(He).filter(Ct=>{var O;return Gn((O=Ct.textContent)!=null?O:"",D)});if(!Fe.length)return;let vt=(Le=(ie=b.domElement)==null?void 0:ie.ownerDocument)==null?void 0:Le.activeElement,at=h&&vt?Fe.indexOf(vt):-1,Ue=Fe[(at+1)%Fe.length];Ue.focus(),(pe=Ue.scrollIntoView)==null||pe.call(Ue,{block:"nearest"});return}if(t)return;let k=n.filter(xe=>Gn(xe.label,D));if(!k.length)return;let Z=h?k.findIndex(xe=>xe.value===a.get()):-1,Ce=k[(Z+1)%k.length];a.set(Ce.value)},v=V(E({_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(f,b)=>{b[f.tagName]=[d({options:n,multiple:t,color:e,state:a})]}},(0,dt.behavior)("selectBoxInner",p,{options:n,multiple:t,color:e,state:a})),{onClick:(f,b)=>y(b),tabindex:0,role:"button",ariaExpanded:f=>i.get(f),ariaHaspopup:"listbox",ariaControls:f=>f!=null&&f.elementNode?Ve("selectBox",f.elementNode):void 0,onKeyDown:(f,b)=>{let x=f.key;if(x==="Escape"){u(b);return}if(x==="Enter"||x===" "){f.preventDefault(),y(b);return}if(x==="ArrowDown"&&!i.get()){f.preventDefault(),m(b);return}let h=f;x.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&T(x,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>(0,re.themeSpacing)(6+(0,re.themeDensity)(f)*2),minWidth:(0,re.themeSpacing)(32),outlineOffset:"-1px",outline:f=>`1px solid ${(0,re.themeColor)(f,"border-strong","neutral")}`,paddingInline:f=>(0,re.themeSpacing)((0,re.themeDensity)(f)*2),borderRadius:f=>(0,re.themeSpacing)((0,re.themeDensity)(f)*1.5),fontSize:f=>(0,re.themeSize)(f,"inherit"),color:f=>(0,re.themeColor)(f,"text",e),backgroundColor:f=>(0,re.themeColor)(f,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:f=>S(f,e)}}});return(0,dt.merge)(l,v),l}var Ie=require("@domphy/theme");function Ei(r={}){let{accentColor:n="primary",color:o="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,Ie.themeSize)(t,"inherit"),height:t=>(0,Ie.themeSpacing)(6+(0,Ie.themeDensity)(t)*2),paddingInline:t=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,Ie.themeColor)(t,"text",o),backgroundColor:t=>(0,Ie.themeColor)(t,"inherit",o),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,Ie.themeColor)(t,"hover",o)},"&[aria-selected=true]":{backgroundColor:t=>(0,Ie.themeColor)(t,"shift-6",n),color:t=>(0,Ie.themeColor)(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n)}}}}var Un=require("@domphy/core"),qe=require("@domphy/theme");function ki(r={}){var a;let{color:n="neutral",multiple:o=!1}=r,e=(0,Un.toState)((a=r.value)!=null?a:o?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:o?"true":void 0,_context:{select:{value:e,multiple:o}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,qe.themeSpacing)((0,qe.themeDensity)(i)*2),paddingInline:i=>(0,qe.themeSpacing)((0,qe.themeDensity)(i)*2),fontSize:i=>(0,qe.themeSize)(i,"inherit"),backgroundColor:i=>(0,qe.themeColor)(i,"inherit",n),color:i=>(0,qe.themeColor)(i,"text",n)}}}var mo=require("@domphy/core"),Ye=require("@domphy/theme");function wi(r={}){var s;let n=(0,mo.toState)((s=r.color)!=null?s:"neutral","color"),o={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,mo.hashString)(JSON.stringify(o));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>(0,Ye.themeSize)(t),color:t=>(0,Ye.themeColor)(t,"text",n.get(t)),height:(0,Ye.themeSpacing)(6),display:"block",borderRadius:(0,Ye.themeSpacing)(1),backgroundColor:t=>(0,Ye.themeColor)(t,"inherit",n.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,Ye.themeColor)(t,"inherit",n.get(t))} 0%, ${(0,Ye.themeColor)(t,"shift-2",n.get(t))} 50%, ${(0,Ye.themeColor)(t,"inherit",n.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:o}}}var Xn=require("@domphy/core"),uo=require("@domphy/theme");function Ti(r={}){var o;let n=(0,Xn.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>(0,uo.themeSize)(e,"inherit"),color:e=>(0,uo.themeColor)(e,"shift-10",n.get(e))}}}var po=require("@domphy/core"),Ge=require("@domphy/theme"),Jn={to:{transform:"rotate(360deg)"}},Zn=(0,po.hashString)(JSON.stringify(Jn));function Di(r={}){var o;let n=(0,po.toState)((o=r.color)!=null?o:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>(0,Ge.themeSize)(e),backgroundColor:e=>(0,Ge.themeColor)(e),color:e=>(0,Ge.themeColor)(e,"text",n.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,Ge.themeSpacing)(6),height:(0,Ge.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,Ge.themeSpacing)(.5)} solid ${(0,Ge.themeColor)(e,"border-strong",n.get(e))}`,borderTopColor:e=>(0,Ge.themeColor)(e,"shift-9",n.get(e)),boxSizing:"border-box",padding:0,animation:`${Zn} 0.7s linear infinite`,[`@keyframes ${Zn}`]:Jn}}}var At=require("@domphy/core"),pt=require("@domphy/theme");function Pi(r={}){let{direction:n="horizontal",defaultSize:o=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{(0,At.merge)(a,{_context:{splitter:{direction:n,size:(0,At.toState)(o),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:n==="horizontal"?"row":"column",overflow:"hidden"}}}function Ii(r){let n=r.parent;if(!n)return!0;for(let o of n.children.items)if(o instanceof At.ElementNode&&o.getMetadata("splitterPanel"))return o===r;return!0}function Li(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let n=r.getContext("splitter");if(!n){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let o=r.domElement,e=n.direction==="horizontal"?"width":"height",s=a=>{o.style[e]=`${Ii(r)?a:100-a}%`};s(n.size.get()),o.style.flexShrink="0",o.style.overflow="auto";let t=n.size.addListener(s);r.addHook("Remove",()=>{var a;n.panelCount=Math.max(0,((a=n.panelCount)!=null?a:1)-1),t()})}}}function Oi(){return{role:"separator",tabindex:0,_onMount:r=>{let n=r.getContext("splitter");if(!n){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let o=r.domElement,e=n.direction==="horizontal";o.style.cursor=e?"col-resize":"row-resize",o.setAttribute("aria-orientation",e?"vertical":"horizontal"),o.setAttribute("aria-valuemin",String(n.min)),o.setAttribute("aria-valuemax",String(n.max)),o.setAttribute("aria-valuenow",String(Math.round(n.size.get())));let s=n.size.addListener(m=>{o.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(n.size.get()+u,n.max):m.key==="ArrowLeft"&&(l=Math.max(n.size.get()-u,n.min)):m.key==="ArrowDown"?l=Math.min(n.size.get()+u,n.max):m.key==="ArrowUp"&&(l=Math.max(n.size.get()-u,n.min)),m.key==="Home"?l=n.min:m.key==="End"&&(l=n.max),l!==null&&(m.preventDefault(),n.size.set(l))},a=null,i=m=>{m.preventDefault();let u=o.parentElement,l=d=>{let p=u.getBoundingClientRect(),y=e?(d.clientX-p.left)/p.width*100:(d.clientY-p.top)/p.height*100;n.size.set(Math.min(Math.max(y,n.min),n.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};o.addEventListener("keydown",t),o.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),o.removeEventListener("keydown",t),o.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,pt.themeColor)(r,"inherit"),color:r=>(0,pt.themeColor)(r,"text"),"&:hover":{backgroundColor:r=>(0,pt.themeColor)(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:(0,pt.themeSpacing)(1),height:(0,pt.themeSpacing)(1),borderRadius:(0,pt.themeSpacing)(999),backgroundColor:r=>(0,pt.themeColor)(r,"shift-4")}}}}var ho=require("@domphy/theme");function zi(r={}){let{gap:n=3,align:o}=r;return{style:E({display:"flex",flexDirection:"column",gap:e=>(0,ho.themeSpacing)((0,ho.themeDensity)(e)*n)},o?{alignItems:o}:{})}}var It=require("@domphy/core"),R=require("@domphy/theme");function Qn(r,n,o,e){if((0,It.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,It.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function Vi(r,n,o){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:(0,R.themeSpacing)(3),top:(0,R.themeSpacing)(6),bottom:`-${(0,R.themeSpacing)(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",n),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",o)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,R.themeSpacing)(3),right:`calc(50% + ${(0,R.themeSpacing)(3)})`,left:`calc(-50% + ${(0,R.themeSpacing)(3)})`,height:"2px",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",n),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",o)}}}function er(r,n,o,e,s){let t=o==="vertical",a=Vi(o,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=n.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>n.get(c)===m?"step":void 0,style:V(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:(0,R.themeSpacing)(1),flex:t?"none":"1",fontSize:c=>(0,R.themeSize)(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,R.themeSpacing)(6),height:(0,R.themeSpacing)(6),borderRadius:(0,R.themeSpacing)(999),fontSize:c=>(0,R.themeSize)(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${(0,R.themeColor)(c,"border-strong",e)}`,backgroundColor:c=>(0,R.themeColor)(c,"inherit"),color:c=>(0,R.themeColor)(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${(0,R.themeColor)(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s)},"&[data-status=pending]":{color:c=>(0,R.themeColor)(c,"muted")},"&[data-status=active]":{color:c=>(0,R.themeColor)(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>(0,R.themeColor)(c,"text",e)}})}})}function Ri(r={items:[]}){var a;let{items:n=[],direction:o="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:n,direction:o,color:e,accentColor:s};return V(E({_doctorDisable:"inline-typography",_context:{steps:{current:(0,It.toState)((a=r.current)!=null?a:0),direction:o,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=Qn(i,"stepsCurrent",r.current,0);m[i.tagName]=er(n,u,o,e,s)}},(0,It.behavior)("steps-items",i=>({update(m){let u=Qn(i,"stepsCurrent",r.current,0);i.children.update(er(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:(0,R.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}})}var tr=require("@domphy/core"),Gt=require("@domphy/theme");function Mi(r={}){var o;let n=(0,tr.toState)((o=r.color)!=null?o:"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:"bold",color:e=>(0,Gt.themeColor)(e,"shift-11",n.get(e)),backgroundColor:e=>(0,Gt.themeColor)(e)}}}var or=require("@domphy/core"),go=require("@domphy/theme");function _i(r={}){var o;let n=(0,or.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>(0,go.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,go.themeColor)(e,"text",n.get(e))}}}var nr=require("@domphy/core"),fo=require("@domphy/theme");function Ni(r={}){var o;let n=(0,nr.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>(0,fo.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,fo.themeColor)(e,"text",n.get(e))}}}var rr=require("@domphy/core"),H=require("@domphy/theme");function $i(r={}){var o;let n=(0,rr.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>(0,H.themeSize)(e,"inherit"),color:e=>(0,H.themeColor)(e,"text",n.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",n.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"text",n.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,H.themeColor)(e,"shift-3",n.get(e))}`,fontSize:e=>(0,H.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",n.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,H.themeColor)(e,"shift-4",n.get(e))}`},"& tr":{backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,H.themeColor)(e,"hover")}}}}var Ht=require("@domphy/core"),G=require("@domphy/theme");function ar(r,n,o,e){if((0,Ht.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,Ht.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function ir(r,n,o,e,s){let t=r.nodeId,i={div:n.map((u,l)=>{var p;let c=(p=u.key)!=null?p:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:y=>o.get(y)===c,tabIndex:y=>o.get(y)===c?0:-1,onClick:()=>o.set(c),onKeyDown:y=>{var h;let T=y.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(T))return;y.preventDefault();let v=n.map((D,k)=>{var Z;return(Z=D.key)!=null?Z:k}),f=v.indexOf(c),b=f;T==="ArrowRight"?b=(f+1)%v.length:T==="ArrowLeft"?b=(f-1+v.length)%v.length:T==="Home"?b=0:T==="End"&&(b=v.length-1),o.set(v[b]);let x=y.target.closest("[role=tablist]");(h=x==null?void 0:x.querySelectorAll("[role=tab]")[b])==null||h.focus()},style:{cursor:"pointer",fontSize:y=>(0,G.themeSize)(y,"inherit"),height:y=>(0,G.themeSpacing)(6+(0,G.themeDensity)(y)*2),paddingInline:y=>(0,G.themeSpacing)((0,G.themeDensity)(y)*4),border:"none",outline:"none",color:y=>(0,G.themeColor)(y,"shift-13"),backgroundColor:y=>(0,G.themeColor)(y,"inherit"),boxShadow:y=>`inset 0 ${(0,G.themeSpacing)(-.5)} 0 0 ${(0,G.themeColor)(y,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:y=>(0,G.themeColor)(y,"shift-13"),boxShadow:y=>`inset 0 ${(0,G.themeSpacing)(-.5)} 0 0 ${(0,G.themeColor)(y,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:y=>(0,G.themeColor)(y,"shift-13",e),boxShadow:y=>`inset 0 ${(0,G.themeSpacing)(-.5)} 0 0 ${(0,G.themeColor)(y,"shift-8",e)}`},"&:focus-visible":{boxShadow:y=>S(y,e)},"&[aria-selected=true]:focus-visible":{boxShadow:y=>`${S(y,e)}, inset 0 ${(0,G.themeSpacing)(-.5)} 0 0 ${(0,G.themeColor)(y,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=n.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:p=>o.get(p)!==c,style:{paddingBlock:p=>(0,G.themeSpacing)((0,G.themeDensity)(p)*2),paddingInline:p=>(0,G.themeSpacing)((0,G.themeDensity)(p)*2)}}});return[i,...m]}function Bi(r={items:[]}){let{items:n=[],accentColor:o="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=ar(t,"tabsActiveKey",r.activeKey,(u=(m=n[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=ir(t,n,i,o,e)}},(0,Ht.behavior)("tabs-items",t=>({update(a){var m,u;let i=ar(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(ir(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:n,accentColor:o,color:e}))}var Ut=require("@domphy/core"),ae=require("@domphy/theme");function Ai(r={}){var s,t;let n=(0,Ut.toState)((s=r.color)!=null?s:"neutral","color"),o=(0,Ut.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return V(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},(0,Ut.behavior)("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=()=>{u&&(m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`)};return m.addEventListener("input",l),a.attributes.addListener("value",l),u&&l(),{resize:l,update(c){u=c.autoResize,a.attributes.addListener("value",l),u&&l()},destroy(){m.removeEventListener("input",l)}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*2),paddingBlock:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*1.5),fontSize:a=>(0,ae.themeSize)(a,"inherit"),color:a=>(0,ae.themeColor)(a,"text",n.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,ae.themeColor)(a,"border-strong",n.get(a))}`,backgroundColor:a=>(0,ae.themeColor)(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,ae.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,ae.themeColor)(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,o.get(a))},"&:invalid":{outline:a=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,ae.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,ae.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,ae.themeColor)(a,"shift-2","neutral")}}})}var lr=require("@domphy/core"),Ae=require("@domphy/theme");function Hi(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Fi(r={}){var t,a,i;let{last:n=!1}=r,o=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=(0,lr.toState)((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(m)*2),paddingBottom:m=>n?"0":(0,Ae.themeSpacing)((0,Ae.themeDensity)(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,Ae.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>(0,Ae.themeColor)(m,"shift-8",s.get(m)?e:o),opacity:m=>s.get(m)?"1":"0.4"}},n?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(m)*-4),width:"2px",backgroundColor:m=>(0,Ae.themeColor)(m,"shift-3",o)}})}}var cr=require("@domphy/core"),ve=require("@domphy/theme");function qo(r){let n=r.getMetadata("toastOpen");return n||(n=(0,cr.toState)(!1),r.setMetadata("toastOpen",n)),n}var sr=r=>{let n=r==null?void 0:r.elementNode;return n?qo(n).get(r):!1};function Ki(r={}){let{position:n="top-center",color:o="neutral"}=r,e=n.startsWith("top"),s=n.endsWith("center"),t=n.endsWith("right"),a={div:[],id:`domphy-toast-${n}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:(0,ve.themeSpacing)(4),zIndex:30,padding:(0,ve.themeSpacing)(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${n}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,ve.themeSpacing)(32),pointerEvents:"auto",paddingBlock:i=>(0,ve.themeSpacing)((0,ve.themeDensity)(i)*2),paddingInline:i=>(0,ve.themeSpacing)((0,ve.themeDensity)(i)*4),borderRadius:i=>(0,ve.themeSpacing)((0,ve.themeDensity)(i)*2),fontSize:i=>(0,ve.themeSize)(i,"inherit"),color:i=>(0,ve.themeColor)(i,"text",o),backgroundColor:i=>(0,ve.themeColor)(i,"inherit",o),boxShadow:_("medium"),opacity:i=>Number(sr(i)),transform:i=>sr(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>qo(i).set(!0)),_onBeforeRemove:(i,m)=>{var f,b;let u=!1,l=null,c=!1,d=i.getRoot(),p=(b=(f=i.domElement)==null?void 0:f.parentElement)!=null?b:null,y=()=>{var h;if(c||!p||p.id!==`domphy-toast-${n}`||p.childElementCount>0)return;c=!0;let x=(h=d.children)==null?void 0:h.items.find(D=>D.domElement===p);x?d.children.remove(x):p.remove()},T=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),y())},v=x=>{x.propertyName==="transform"&&T()};i.domElement.addEventListener("transitionend",v),l=setTimeout(T,350),i.addHook("Remove",()=>{var x;l&&(clearTimeout(l),l=null),(x=i.domElement)==null||x.removeEventListener("transitionend",v),y()}),qo(i).set(!1)}}}var Lt=require("@domphy/core"),te=require("@domphy/theme");function mr(r,n,o,e){if((0,Lt.isState)(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=(0,Lt.toState)(o!=null?o:e),r.setMetadata(n,s)),s}function Wi(r,n){return Array.isArray(r)?r.includes(n):r===n}function ji(r,n,o,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=n.map((c,d)=>{var p;return(p=c.key)!=null?p:String(d)}),i=a.indexOf(o),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function ur(r,n,o,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>Wi(n.get(l),i),tabIndex:l=>{var d,p,y,T,v;let c=n.get(l);if(o){let b=(y=(p=(Array.isArray(c)?c:[])[0])!=null?p:(d=r[0])==null?void 0:d.key)!=null?y:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(T=r[0])==null?void 0:T.key)!=null?v:"0")?0:-1},onClick:()=>{let l=n.get();if(o){let c=Array.isArray(l)?[...l]:[];n.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else n.set(l===i?"":i)},onKeyDown:l=>ji(l,r,i,n,o),style:{cursor:"pointer",fontSize:l=>(0,te.themeSize)(l,"inherit"),height:(0,te.themeSpacing)(6),paddingBlock:(0,te.themeSpacing)(1),paddingInline:(0,te.themeSpacing)(2),border:"none",borderRadius:(0,te.themeSpacing)(1.5),color:l=>(0,te.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,te.themeColor)(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>(0,te.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,te.themeColor)(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>(0,te.themeColor)(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>(0,te.themeColor)(l,"shift-3",s),color:l=>(0,te.themeColor)(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function qi(r={items:[]}){var a;let{items:n=[],multiple:o=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:n,multiple:o,color:e,accentColor:s};return V(E({role:"group",_context:{toggleGroup:{value:(0,Lt.toState)((a=r.value)!=null?a:o?[]:""),multiple:o}},_onSchedule:(i,m)=>{let u=mr(i,"toggleGroupValue",r.value,o?[]:"");m[i.tagName]=ur(n,u,o,e,s)}},(0,Lt.behavior)("toggle-items",i=>({update(m){let u=mr(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(ur(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:(0,te.themeSpacing)(1),paddingInline:(0,te.themeSpacing)(1),gap:(0,te.themeSpacing)(1),borderRadius:(0,te.themeSpacing)(2),fontSize:i=>(0,te.themeSize)(i,"inherit"),backgroundColor:i=>(0,te.themeColor)(i,"inherit",e),color:i=>(0,te.themeColor)(i,"text",e),outline:i=>`1px solid ${(0,te.themeColor)(i,"border",e)}`,outlineOffset:"-1px"}})}function Yi(r={}){return jo({gap:r.gap})}function Gi(){return{div:null,style:{flex:"1 1 0"}}}var Xt=require("@domphy/core"),_e=require("@domphy/theme");function Ui(r={}){let{open:n=!1,placement:o="top",content:e="Tooltip Content"}=r,s=(0,Xt.toState)(o),t=(0,Xt.toState)(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=Qe({kind:"tooltip",open:n,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1),paddingInline:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*3),borderRadius:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1.5),color:d=>(0,_e.themeColor)(d,"text"),backgroundColor:d=>(0,_e.themeColor)(d),fontSize:d=>(0,_e.themeSize)(d,"inherit"),boxShadow:_("low")},$:[Fo({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),(0,Xt.merge)(u,{ariaDescribedby:d=>d!=null&&d.elementNode?Ve("tooltip",d.elementNode):void 0,onMouseEnter:(d,p)=>i(p),onMouseLeave:(d,p)=>m(p),onFocus:(d,p)=>i(p),onBlur:(d,p)=>m(p),onKeyDown:(d,p)=>d.key==="Escape"&&m(p)}),u}var Yo=require("@domphy/core");function dr(r,n){return r.key!==void 0&&r.key!==null?String(r.key):`index-${n}`}function Xi(r={}){let{duration:n=300,delay:o=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof Yo.ElementNode))return;let l=m.domElement;l&&e.set(dr(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof Yo.ElementNode))return;let l=m.domElement;if(!l)return;let c=dr(m,u),d=e.get(c);if(!d)return;let p=l.getBoundingClientRect(),y=d.left-p.left,T=d.top-p.top;if(Math.abs(y)<.5&&Math.abs(T)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${y}px, ${T}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${n}ms ease ${o}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let f=!1,b=null,x=()=>{f||(f=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",h),l.style.transition="",l.style.transform="")},h=k=>{k.propertyName==="transform"&&x()};s.set(l,()=>{f=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",h)}),l.addEventListener("transitionend",h),b=setTimeout(x,n+o+34),t.add(b)}),e.clear()}}}var pr=require("@domphy/core"),Ot=require("@domphy/theme");function Zi(r={}){var o;let n=(0,pr.toState)((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>(0,Ot.themeSize)(e,"inherit"),backgroundColor:e=>(0,Ot.themeColor)(e),color:e=>(0,Ot.themeColor)(e,"text",n.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Ot.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}function Ji(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}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,elevation,emphasis,empty,errorBoundary,fab,figure,focusRing,formGroup,grid,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputPassword,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,linkButton,list,listItem,listItemButton,mark,menu,motion,orderedList,pagination,panelSection,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,row,scrollArea,segmented,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stack,steps,strong,subscript,superscript,table,tabs,tag,textarea,timeline,timelineItem,toast,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList,visuallyHidden});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|