@domphy/ui 0.21.3 → 0.21.5
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 +13 -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.d.cts +62 -15
- package/dist/index.d.ts +62 -15
- 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 no=Object.defineProperty,Pr=Object.defineProperties,Ir=Object.getOwnPropertyDescriptor,Or=Object.getOwnPropertyDescriptors,Lr=Object.getOwnPropertyNames,on=Object.getOwnPropertySymbols;var rn=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable;var nn=(r,o,n)=>o in r?no(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,E=(r,o)=>{for(var n in o||(o={}))rn.call(o,n)&&nn(r,n,o[n]);if(on)for(var n of on(o))zr.call(o,n)&&nn(r,n,o[n]);return r},z=(r,o)=>Pr(r,Or(o));var Rr=(r,o)=>{for(var n in o)no(r,n,{get:o[n],enumerable:!0})},Vr=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of Lr(o))!rn.call(r,s)&&s!==n&&no(r,s,{get:()=>o[s],enumerable:!(e=Ir(o,s))||e.enumerable});return r};var Mr=r=>Vr(no({},"__esModule",{value:!0}),r);var al={};Rr(al,{abbreviation:()=>_r,accordion:()=>Nr,alert:()=>$r,avatar:()=>Ar,badge:()=>Br,blockquote:()=>Hr,breadcrumb:()=>Fr,breadcrumbEllipsis:()=>Kr,button:()=>qr,buttonGhost:()=>wo,buttonSwitch:()=>Yr,card:()=>Ur,code:()=>Jr,combobox:()=>na,command:()=>ra,commandItem:()=>ia,commandSearch:()=>aa,datePicker:()=>ca,descriptionList:()=>da,details:()=>pa,dialog:()=>fa,divider:()=>ga,drawer:()=>ba,elevation:()=>_,emphasis:()=>Sa,empty:()=>va,errorBoundary:()=>xa,fab:()=>ka,figure:()=>wa,focusRing:()=>S,formGroup:()=>Ta,grid:()=>Da,heading:()=>Ia,horizontalRule:()=>Oa,icon:()=>La,image:()=>za,inputCheckbox:()=>Ra,inputColor:()=>Va,inputDateTime:()=>Ma,inputFile:()=>_a,inputNumber:()=>Na,inputOTP:()=>$a,inputPassword:()=>Fa,inputRadio:()=>Ka,inputRange:()=>ja,inputSearch:()=>Wa,inputSwitch:()=>qa,inputText:()=>Ya,keyboard:()=>Ga,label:()=>Ua,link:()=>Ja,linkButton:()=>Qa,list:()=>ei,listItem:()=>ti,listItemButton:()=>oi,mark:()=>ni,menu:()=>ri,motion:()=>ii,orderedList:()=>li,pagination:()=>mi,panelSection:()=>ui,paragraph:()=>di,popover:()=>pi,popoverArrow:()=>qo,preformated:()=>hi,progress:()=>fi,rating:()=>Si,ringProgress:()=>vi,row:()=>Uo,scrollArea:()=>Ci,segmented:()=>Ei,select:()=>ki,selectBox:()=>Pi,selectItem:()=>Ii,selectList:()=>Oi,skeleton:()=>Li,small:()=>zi,spinner:()=>Ri,splitter:()=>Vi,splitterHandle:()=>Ni,splitterPanel:()=>_i,stack:()=>$i,steps:()=>Bi,strong:()=>Hi,subscript:()=>Fi,superscript:()=>Ki,table:()=>ji,tabs:()=>Wi,tag:()=>Yt,textarea:()=>qi,timeline:()=>Yi,timelineItem:()=>Gi,toast:()=>Ui,toggleGroup:()=>Zi,toolbar:()=>Qi,toolbarSpacer:()=>el,tooltip:()=>tl,transitionGroup:()=>ol,unorderedList:()=>nl,visuallyHidden:()=>rl});module.exports=Mr(al);var Co=require("@domphy/core"),Xe=require("@domphy/theme");function _r(r={}){var e,s;let o=(0,Co.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Co.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,Xe.themeSize)(t),backgroundColor:t=>(0,Xe.themeColor)(t),color:t=>(0,Xe.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Xe.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,Xe.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Xe.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,Xe.themeColor)(t,"shift-9",n.get(t))}}}}var Eo=require("@domphy/core"),gt=require("@domphy/theme");var xo=require("@domphy/theme");function S(r,o="primary"){let n=(0,xo.themeColor)(r,"surface"),e=(0,xo.themeColor)(r,"shift-9",o);return`0 0 0 2px ${n}, 0 0 0 4px ${e}`}function Nr(r={}){var s,t;let{type:o="single"}=r,n=(0,Eo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Eo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,gt.themeSpacing)((0,gt.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,gt.themeColor)(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>(0,gt.themeColor)(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,gt.themeColor)(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}var an=require("@domphy/core"),ye=require("@domphy/theme");function $r(r={}){var n;let o=(0,an.toState)((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,ye.themeSpacing)(3),paddingBlock:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*2),paddingInline:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*4),borderRadius:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,ye.themeSpacing)(1)} 0 0 0 ${(0,ye.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,ye.themeColor)(e,"inherit",o.get(e)),color:e=>(0,ye.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,ye.themeSize)(e,"inherit")}}}var ln=require("@domphy/core"),lt=require("@domphy/theme");function Ar(r={}){var n;let o=(0,ln.toState)((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,lt.themeSpacing)(9),height:(0,lt.themeSpacing)(9),fontSize:e=>(0,lt.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,lt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,lt.themeColor)(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${(0,lt.themeColor)(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var ko=require("@domphy/core"),Ce=require("@domphy/theme");function Br(r={}){var s;let{label:o=999}=r,n=(0,ko.toState)(o),e=(0,ko.toState)((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(1.5/1.5)),minWidth:(0,Ce.themeSpacing)(5),height:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Ce.themeSize)(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*999),backgroundColor:t=>(0,Ce.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Ce.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,Ce.themeColor)(t,"shift-0",e.get(t))}`}}}}var sn=require("@domphy/core"),Le=require("@domphy/theme");function Hr(r={}){var n;let o=(0,sn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>(0,Le.themeSize)(e,"inherit"),backgroundColor:e=>(0,Le.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Le.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset ${(0,Le.themeSpacing)(1)} 0 0 0 ${(0,Le.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*2),paddingInline:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*4),margin:0}}}var cn=require("@domphy/core"),Fe=require("@domphy/theme");function Fr(r={}){var e;let{separator:o="/"}=r,n=(0,cn.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,Fe.themeSize)(s,"inherit"),gap:(0,Fe.themeSpacing)(1),color:s=>(0,Fe.themeColor)(s,"text",n.get(s)),backgroundColor:s=>(0,Fe.themeColor)(s,"inherit",n.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>(0,Fe.themeColor)(s,"text",n.get(s))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:s=>(0,Fe.themeColor)(s,"shift-4",n.get(s)),paddingInlineStart:(0,Fe.themeSpacing)(1)},"& > [aria-current=page]":{color:s=>(0,Fe.themeColor)(s,"shift-10",n.get(s)),pointerEvents:"none"}}}}var mn=require("@domphy/core"),st=require("@domphy/theme");function Kr(r={}){var n;let o=(0,mn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>(0,st.themeSize)(e,"inherit"),paddingInline:(0,st.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,st.themeColor)(e,"text",o.get(e)),borderRadius:(0,st.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,st.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,st.themeColor)(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>S(e,o.get(e))}}}}var dn=require("@domphy/core"),F=require("@domphy/theme");var Nt={small:"decrease-1",medium:"inherit",large:"increase-1"};var un=require("@domphy/core"),pe=require("@domphy/theme");var jr={small:.5,medium:1,large:1.5};function wo(r={}){var s,t,a;let o=(0,un.toState)((s=r.color)!=null?s:"neutral","color"),n=jr[(t=r.size)!=null?t:"medium"],e=Nt[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>(0,pe.themeSize)(i,e),paddingBlock:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*n),paddingInline:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*n),borderRadius:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>(0,pe.themeSpacing)((0,pe.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,pe.themeColor)(i,"text",o.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>(0,pe.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pe.themeColor)(i,"hover",o.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>(0,pe.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pe.themeColor)(i,"increase-2",o.get(i))},"&:focus-visible":{boxShadow:i=>S(i,o.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>(0,pe.themeColor)(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Wr={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function qr(r={}){var a,i,m,u;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return wo({color:r.color,size:r.size});let n=(0,dn.toState)((i=r.color)!=null?i:"primary","color"),e=o==="solid",s=Wr[(m=r.size)!=null?m:"medium"],t=Nt[(u=r.size)!=null?u:"medium"];return z(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",n.get(l))}`,color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-13",n.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-13",n.get(l)):(0,F.themeColor)(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-14",n.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-14",n.get(l)):(0,F.themeColor)(l,"hover",n.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?(0,F.themeColor)(l,"shift-15",n.get(l)):(0,F.themeColor)(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.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 ro=require("@domphy/core"),Q=require("@domphy/theme");function Yr(r={}){var t,a;let{checked:o=!1}=r,n=(0,ro.toState)(o),e=(0,ro.toState)((t=r.color)!=null?t:"neutral","color"),s=(0,ro.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=>n.get(i),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>(0,Q.themeSize)(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${(0,Q.themeColor)(i,"border",e.get(i))}`,minWidth:(0,Q.themeSpacing)(12),minHeight:(0,Q.themeSpacing)(6),borderRadius:(0,Q.themeSpacing)(999),paddingLeft:(0,Q.themeSpacing)(7),paddingRight:(0,Q.themeSpacing)(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>(0,Q.themeColor)(i,"inherit",e.get(i)),color:i=>(0,Q.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,Q.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,Q.themeSpacing)(5),height:(0,Q.themeSpacing)(5),borderRadius:(0,Q.themeSpacing)(999),color:i=>(0,Q.themeColor)(i,"text"),backgroundColor:i=>(0,Q.themeColor)(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>(0,Q.themeColor)(i,"increase-3",s.get(i)),outline:"none",color:i=>(0,Q.themeColor)(i,"decrease-2"),paddingLeft:(0,Q.themeSpacing)(2),paddingRight:(0,Q.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,Q.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var pn=require("@domphy/core"),$=require("@domphy/theme");var Gr={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 Gr[r]}function Ur(r={}){var n;let o=(0,pn.toState)((n=r.color)!=null?n:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),backgroundColor:e=>(0,$.themeColor)(e,"inherit",o.get(e)),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,$.themeColor)(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:_("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),fontWeight:"600",color:e=>(0,$.themeColor)(e,"shift-11",o.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",o.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",o.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",o.get(e))}`}}}}var hn=require("@domphy/core"),ze=require("@domphy/theme");function Jr(r={}){var n;let o=(0,hn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>(0,ze.themeSize)(e,"inherit"),color:e=>(0,ze.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,ze.themeColor)(e,"inherit",o.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 Ke=require("@domphy/core"),Y=require("@domphy/theme");var ao=require("@domphy/core"),Ze=require("@domphy/floating");var Wt=require("@domphy/core");function Xr(r){return typeof r.set=="function"}function ct(r,o,n=!0){if(typeof r.addListener=="function")return n&&o(r.get()),r.addListener(o);if(n)return(0,Wt.effect)(()=>{o(r.get())});let e=!0,s=(0,Wt.effect)(()=>{let t=r.get();e||o(t)});return e=!1,s}function To(r,o){Xr(r)&&r.set(o)}function yt(r,o){o==null||o(),To(r,!1)}function $t(r){return(0,Wt.toState)(r!=null?r:!1)}function Re(r,o){return`domphy-${r}-${o.nodeId}`}function Zr(r,o){var at,Ue,kt,it;let{openState:n,onDismiss:e,placement:s,content:t,keepOpenOnContentHover:a}=o,{kind:i}=o,m=`floating:${i}`,u=null,l=null,c=null,d=null,f=!1,h=r.domElement,C=r.getRoot(),v=Re(i,r),p={style:{position:"fixed",pointerEvents:"auto",visibility:V=>n.get(V)?"visible":"hidden"},onKeyDown:V=>{V.key==="Escape"&&q()},onMouseEnter:()=>a&&w(),onMouseLeave:()=>a&&q(),_onMount:V=>{var de;if(c=V.domElement,c.id||(c.id=v),h&&c&&!c.hasAttribute("data-theme")){let Je=(de=h.closest("[data-theme]"))==null?void 0:de.getAttribute("data-theme");Je&&c.setAttribute("data-theme",Je)}},_portal:V=>{let de=h.closest("dialog");if(de){let Ne=de.querySelector(":scope > #domphy-floating");return Ne||(Ne=de.ownerDocument.createElement("div"),Ne.id="domphy-floating",Object.assign(Ne.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),de.appendChild(Ne)),Ne}let Je=V.domElement.querySelector("#domphy-floating");if(!Je){let Ne={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};Je=V.children.insert(Ne).domElement}return Je}},b=V=>(0,ao.merge)(V,p);b(t);let k=()=>{f||(f=!0,d=C.children.insert(t),d._behaviorInstances.set(m,Oe))},g=()=>{f&&(!c||!c.isConnected)&&(l==null||l(),l=null,d=null,c=null,f=!1),k(),h&&c&&(l==null||l(),l=(0,Ze.autoUpdate)(h,c,()=>{(0,Ze.computePosition)(h,c,{placement:s.get(),middleware:[(0,Ze.offset)(12),(0,Ze.flip)(),(0,Ze.shift)()],strategy:"fixed"}).then(({x:V,y:de,placement:Je})=>{c&&(Object.assign(c.style,{left:`${V}px`,top:`${de}px`}),s.set(Je))})}),To(n,!0))},D=()=>{l==null||l(),l=null,d&&(d.remove(),d=null),c=null,f=!1,yt(n,e)},w=()=>{u&&clearTimeout(u),u=setTimeout(g,100)},q=()=>{u&&clearTimeout(u),u=setTimeout(D,100)},ve=V=>{if(!n.get()||!h||!c)return;let de=V.target;!h.contains(de)&&!c.contains(de)&&q()};(at=C.domElement)==null||at.addEventListener("click",ve);let Ie=V=>{V.key==="Escape"&&n.get()&&q()},Z=(it=(kt=(Ue=C.domElement)==null?void 0:Ue.ownerDocument)!=null?kt:C.domElement)!=null?it:null;Z==null||Z.addEventListener("keydown",Ie);let He=V=>{V?f||g():f&&D()},re=()=>{},Ee=!1,Ge=!1,Oe,Et=V=>{var de;V._behaviors=z(E({},(de=V._behaviors)!=null?de:{}),{[m]:{attach:()=>Oe,props:{}}})};return Oe={show:w,hide:q,panelId:v,update(V){if(!Ge&&(e=V.onDismiss,V.openState!==n&&(re(),n=V.openState,re=ct(n,He,!1),n.get()&&g()),s=V.placement,t=V.content,a=V.keepOpenOnContentHover,b(t),Et(t),d)){Ge=!0;try{d.patch(t)}finally{Ge=!1}}},destroy(){var V;Ee||(Ee=!0,u&&clearTimeout(u),u=null,l==null||l(),l=null,d==null||d.remove(),d=null,c=null,f=!1,re(),re=()=>{},(V=C.domElement)==null||V.removeEventListener("click",ve),Z==null||Z.removeEventListener("keydown",Ie))}},Et(t),re=ct(n,He),Oe}function Qe(r){let{kind:o,placement:n,onDismiss:e}=r,s=$t(r.open),t=`floating:${o}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},(0,ao.behavior)(t,Zr,{kind:o,openState:s,onDismiss:e,placement:n,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}var bt=require("@domphy/core"),J=require("@domphy/theme");var Qr='<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>',qt=1.5,ea=6/qt,fn=2.5/qt,ta=1/qt,gn=4/qt,oa=1/qt;function Yt(r={}){var e;let{removable:o=!1}=r,n=(0,bt.toState)((e=r.color)!=null?e:"neutral","color");return z(E({dataTone:"shift-2"},(0,bt.behavior)("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:(0,bt.rawHtml)(Qr),_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,J.themeSpacing)((0,J.themeDensity)(l)*oa),width:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*gn),height:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*gn),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>(0,J.themeColor)(l,"shift-4",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof bt.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:o})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*ea),paddingBlock:0,borderRadius:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*999),paddingInlineStart:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*fn),paddingInlineEnd:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*(o?ta:fn)),gap:(0,J.themeSpacing)(1.5),fontSize:s=>(0,J.themeSize)(s,"decrease-1"),backgroundColor:s=>(0,J.themeColor)(s,"inherit",n.get(s)),color:s=>(0,J.themeColor)(s,"text",n.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${(0,J.themeColor)(s,"border-strong",n.get(s))}`}})}function na(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,Ke.toState)(r.value),i=(0,Ke.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"combobox",open:i,onDismiss:r.onDismiss,placement:(0,Ke.toState)(n),content:r.content}),c={onClick:(g,D)=>!t&&u(D),dataTone:"shift-14",style:{backgroundColor:g=>(0,Y.themeColor)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text"),borderRadius:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*2),outline:g=>`1px solid ${(0,Y.themeColor)(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,Ke.merge)(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,Y.themeSpacing)(6),marginInlineStart:(0,Y.themeSpacing)(2),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e)},f=g=>{var D,w;return(w=(D=g==null?void 0:g.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:w.query},h=g=>{let D=g;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return g},C={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:g=>i.get(g),ariaControls:g=>g!=null&&g.elementNode?Re("combobox",h(g.elementNode)):void 0},v=g=>g?((0,Ke.merge)(g,E({onFocus:(D,w)=>m(w),style:d,_key:"combobox-input"},C)),g):E({input:null,ariaLabel:"Filter options",onFocus:(D,w)=>m(w),value:D=>{var w,q;return(q=(w=f(D))==null?void 0:w.get(D))!=null?q:""},onInput:(D,w)=>{var q;(q=w.getBehavior("comboboxInner"))==null||q.query.set(D.target.value)},style:d,_key:"combobox-input"},C),p=g=>({div:D=>{i.get(D);let w=g.state.get(D),q=Array.isArray(w)?w:[w],Ie=g.options.filter(Z=>q.includes(Z.value)).map(Z=>({span:Z.label,$:[Yt({color:g.color,removable:!0})],_key:Z.value,_onRemove:He=>{let re=g.state.get(),Ge=(Array.isArray(re)?re:[re]).filter(Oe=>Oe!==Z.value);g.multiple?g.state.set(Ge):g.state.set(Ge[0])}}));return Ie.push(v(g.input)),Ie},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,Y.themeSpacing)(1)}}),k=z(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,D)=>{D[g.tagName]=[p({options:o,multiple:t,color:e,state:a,input:r.input})]}},(0,Ke.behavior)("comboboxInner",(g,D)=>{let w=g.getMetadata("comboboxQuery");return w||(w=(0,Ke.toState)(""),g.setMetadata("comboboxQuery",w)),{query:w,update(q){g.children.update([p(q)])}}},{options:o,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:(0,Y.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,Y.themeColor)(g,"border-strong","neutral")}`,paddingBlock:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1),paddingInline:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1),borderRadius:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1.5),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>S(g,e)}}});return(0,Ke.merge)(l,k),l}var io=require("@domphy/core"),ee=require("@domphy/theme");function ra(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,o)=>{(0,io.merge)(o,{_context:{command:{query:(0,io.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function aa(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,ee.themeSize)(e,"inherit"),paddingInline:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*3),paddingBlock:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,ee.themeColor)(e,"border",o)}`,outline:"none",color:e=>(0,ee.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,ee.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,ee.themeColor)(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,ee.themeColor)(e,"shift-6",n),boxShadow:e=>S(e,n)}}}}function ia(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,ee.themeSize)(e,"inherit"),height:e=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(e)*2),paddingInline:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,ee.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,ee.themeColor)(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>(0,ee.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,ee.themeColor)(e,"hover",o)},"&:focus-visible":{boxShadow:e=>S(e,n)}}}}var xe=require("@domphy/core"),P=require("@domphy/theme");var fe=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),wt=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Do=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Gt=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Po=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Io=(r,o)=>wt(r,-((r.getDay()-o+7)%7));function la(r){var o,n;try{let e=new Intl.Locale(r),s=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function sa(r,o){let n=o,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(n),{update(a){a.selectionIsCallerOwned||t(a.selection,n.selection),t(a.viewYear,n.viewYear),t(a.viewMonth,n.viewMonth),t(a.focused,n.focused),t(a.hovered,n.hovered),t(a.hour,n.hour),t(a.minute,n.minute),t(a.open,n.open),(a.selection!==n.selection||a.onChange!==n.onChange)&&s(a),n=a},destroy(){e==null||e(),e=null}}}function ca(r={}){var Zo,Qo,en,tn;let{mode:o="single",time:n=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(Zo=r.weekStartsOn)!=null?Zo:la(a),l=(0,xe.toState)((Qo=r.accentColor)!=null?Qo:"primary","accentColor"),c=(0,xe.toState)((en=r.placement)!=null?en:"bottom-start"),d=(0,xe.toState)((tn=r.value)!=null?tn:o==="range"?[null,null]:null),f=(()=>{let y=d.get(),x=o==="range"?y==null?void 0:y[0]:y;return x instanceof Date?x:new Date})(),h=(0,xe.toState)(f.getFullYear(),"viewYear"),C=(0,xe.toState)(f.getMonth(),"viewMonth"),v=(0,xe.toState)(fe(f),"focused"),p=(0,xe.toState)(null,"hovered"),b=(0,xe.toState)(f.getHours(),"hour"),k=(0,xe.toState)(f.getMinutes(),"minute"),g=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),w=new Intl.DateTimeFormat(a,{weekday:"short"}),q=new Intl.DateTimeFormat(a,{dateStyle:"full"}),ve=y=>y?g.format(y):"",Ie=y=>{if(i)return i(y);if(o==="range"){let[x,T]=y!=null?y:[null,null];return x?`${ve(x)} \u2013 ${ve(T)}`:""}return ve(y)},Z=Array.from({length:7},(y,x)=>w.format(new Date(2023,0,1+(x+u)%7))),He=y=>!!e&&fe(y)<fe(e)||!!s&&fe(y)>fe(s)||!!t&&t(y),re=y=>{if(!n)return fe(y);let x=fe(y);return x.setHours(b.get(),k.get(),0,0),x},Ee=(y,x)=>{var O;if(He(y))return;if(o==="single"){d.set(re(y)),n||Ne(x);return}let[T,L]=(O=d.get())!=null?O:[null,null];!T||T&&L?d.set([re(y),null]):fe(y)<fe(T)?(d.set([re(y),re(T)]),n||Ne(x)):(d.set([T,re(y)]),n||Ne(x))},Ge=()=>{var y;if(n)if(o==="single"){let x=d.get();x&&d.set(re(x))}else{let[x,T]=(y=d.get())!=null?y:[null,null];d.set([x&&re(x),T&&re(T)])}},Oe=(y,x)=>{var _t;if(o!=="range")return!1;let[T,L]=(_t=d.get(x))!=null?_t:[null,null],O=L!=null?L:p.get(x);if(!T||!O)return!1;let M=fe(T)<=fe(O)?T:O,$e=fe(T)<=fe(O)?O:T,ke=fe(y);return ke>=fe(M)&&ke<=fe($e)},Et=(y,x)=>{let T=d.get(x);if(o==="range"){let[L,O]=T!=null?T:[null,null];return Gt(y,L)||Gt(y,O)}return Gt(y,T)},at=y=>{h.set(y.getFullYear()),C.set(y.getMonth())},Ue=y=>{let x=Do(new Date(h.get(),C.get(),1),y);at(x)},kt=y=>h.set(h.get()+y),it=y=>{var T;let x=(T=y==null?void 0:y.getRoot())==null?void 0:T.domElement;setTimeout(()=>{var L;(L=x==null?void 0:x.querySelector(`[data-date="${Po(v.get())}"]`))==null||L.focus()},0)},V=Cr(),de=(0,xe.toState)(!1),{show:Je,hide:Ne,anchorPartial:So}=Qe({kind:"datePicker",open:de,placement:c,content:V}),Sr=E({type:"text",readonly:!0,value:y=>Ie(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>de.get(y),ariaControls:y=>y!=null&&y.elementNode?Re("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,x)=>{vo(x)},onFocus:(y,x)=>{vo(x)},onKeyDown:(y,x)=>{let T=y.key;(T==="ArrowDown"||T==="Enter")&&(y.preventDefault(),vo(x))}},(0,xe.behavior)("datePicker",sa,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:h,viewMonth:C,focused:v,hovered:p,hour:b,minute:k,open:de,onChange:m}));function vo(y){var T;let x=(T=vr())!=null?T:new Date;v.set(fe(x)),at(x),Je(y),it(y)}function vr(){var x;let y=d.get();return o==="range"?(x=y==null?void 0:y[0])!=null?x:null:y!=null?y:null}return(0,xe.merge)(So,Sr),So;function Cr(){let y=(M,$e,ke)=>({button:M,type:"button",ariaLabel:$e,onClick:ke,style:ma()}),x={div:[y("\xAB","Previous year",()=>kt(-1)),y("\u2039","Previous month",()=>Ue(-1)),{div:M=>D.format(new Date(h.get(M),C.get(M),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:M=>(0,P.themeSize)(M)}},y("\u203A","Next month",()=>Ue(1)),y("\xBB","Next year",()=>kt(1))],style:{display:"flex",alignItems:"center",gap:(0,P.themeSpacing)(1),marginBottom:(0,P.themeSpacing)(2)}},T={div:Z.map((M,$e)=>({div:M,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:ke=>(0,P.themeSize)(ke,"decrease-1"),fontWeight:"bold",color:ke=>(0,P.themeColor)(ke,"shift-7"),paddingBlock:(0,P.themeSpacing)(1)},_key:$e})),role:"row",style:yn()},L={div:M=>xr(M),role:"grid",ariaLabel:"Calendar",onKeyDown:Tr,onMouseLeave:()=>o==="range"&&p.set(null),style:{display:"flex",flexDirection:"column",gap:(0,P.themeSpacing)(.5)}},O=[x,T,L];return n&&O.push(kr()),O.push(wr()),{div:O,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 xr(y){let x=new Date(h.get(y),C.get(y),1),T=C.get(y),L=Io(x,u),O=[];for(let M=0;M<6;M++){let $e=[];for(let ke=0;ke<7;ke++){let _t=wt(L,M*7+ke);$e.push(Er(_t,T,y))}O.push({div:$e,role:"row",style:yn(),_key:M})}return O}function Er(y,x,T){let L=He(y),O=Et(y,T),M=Oe(y,T),$e=y.getMonth()!==x,ke=Gt(y,v.get(T)),_t=Gt(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:ke?0:-1,ariaSelected:O,ariaDisabled:L,disabled:L,ariaLabel:q.format(y),dataDate:Po(y),onClick:(ne,Dr)=>Ee(y,Dr),onMouseEnter:()=>o==="range"&&p.set(y),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,P.themeSpacing)(1),fontSize:ne=>(0,P.themeSize)(ne),fontFamily:"inherit",opacity:L?.35:$e?.5:1,backgroundColor:ne=>O?(0,P.themeColor)(ne,"shift-7",l.get(ne)):M?(0,P.themeColor)(ne,"hover",l.get(ne)):"transparent",color:ne=>O?(0,P.themeColor)(ne,"shift-0",l.get(ne)):(0,P.themeColor)(ne,"text"),outline:_t?ne=>`1px solid ${(0,P.themeColor)(ne,"shift-6",l.get(ne))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:ne=>O?(0,P.themeColor)(ne,"shift-7",l.get(ne)):(0,P.themeColor)(ne,"shift-3",l.get(ne))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:ne=>S(ne,l.get(ne))}},_key:Po(y)}}function kr(){let y=(x,T,L)=>({select:Array.from({length:x},(O,M)=>({option:String(M).padStart(2,"0"),value:String(M),selected:$e=>T.get($e)===M,_key:M})),ariaLabel:L,onChange:O=>{T.set(Number(O.target.value)),Ge()},style:ua()});return{div:[y(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},y(60,k,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,P.themeSpacing)(1),marginTop:(0,P.themeSpacing)(3)}}}function wr(){let y=(x,T)=>({button:x,type:"button",onClick:(L,O)=>T(O),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>(0,P.themeSize)(L,"decrease-1"),color:L=>(0,P.themeColor)(L,"muted",l.get(L)),padding:(0,P.themeSpacing)(1)}});return{div:[y("Today",x=>{let T=new Date;v.set(fe(T)),at(T),it(x)}),y("Clear",()=>{d.set(o==="range"?[null,null]:null),p.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,P.themeSpacing)(2),paddingTop:(0,P.themeSpacing)(2),borderTop:x=>`1px solid ${(0,P.themeColor)(x,"border")}`}}}function Tr(y,x){let T=y,L=v.get(),O=null;switch(T.key){case"ArrowLeft":O=wt(L,-1);break;case"ArrowRight":O=wt(L,1);break;case"ArrowUp":O=wt(L,-7);break;case"ArrowDown":O=wt(L,7);break;case"Home":O=Io(L,u);break;case"End":O=wt(Io(L,u),6);break;case"PageUp":O=Do(L,T.shiftKey?-12:-1);break;case"PageDown":O=Do(L,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),Ee(L,x);return;default:return}T.preventDefault(),v.set(O),at(O),it(x)}}function yn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,P.themeSpacing)(.5)}}function ma(){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 ua(){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 bn=require("@domphy/core"),mt=require("@domphy/theme");function da(r={}){var n;let o=(0,bn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${(0,mt.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,mt.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,mt.themeSize)(e,"inherit"),color:e=>(0,mt.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,mt.themeSize)(e,"inherit"),color:e=>(0,mt.themeColor)(e,"text",o.get(e))}}}}var Oo=require("@domphy/core"),N=require("@domphy/theme");function pa(r={}){var s,t;let{duration:o=240}=r,n=(0,Oo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Oo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,N.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,N.themeColor)(a,"shift-10",n.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",n.get(a))}`,borderBottom:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",n.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 ${o}ms ease, opacity ${o}ms ease, padding ${o}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 vn=require("@domphy/core"),Ae=require("@domphy/theme");var Ut=0;function lo(){Ut++,Ut===1&&(document.body.style.overflow="hidden")}function At(){Ut=Math.max(0,Ut-1),Ut===0&&(document.body.style.overflow="")}var Sn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ha(r,o){let{state:n,onDismiss:e}=o,s=null,t=!1,a=!1,i=null,m=r.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(At(),a=!1),s==null||s.focus(),s=null},l=h=>{if(h.key!=="Tab")return;let C=Array.from(m.querySelectorAll(Sn)).filter(b=>!b.closest("[aria-hidden='true']")&&b.offsetParent!==null);if(!C.length){h.preventDefault();return}let v=C[0],p=C[C.length-1];h.shiftKey?(document.activeElement===v||document.activeElement===m)&&(h.preventDefault(),p.focus()):document.activeElement===p&&(h.preventDefault(),v.focus())},c=h=>{h.preventDefault(),yt(n,e)};m.addEventListener("cancel",c);let d=h=>{if(h)t=!1,i&&(clearTimeout(i),i=null),s=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(lo(),a=!0),m.addEventListener("keydown",l),requestAnimationFrame(()=>{m.style.opacity="1";let C=m.querySelector(Sn);C==null||C.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",l),!m.open){u();return}i=setTimeout(()=>{i=null,t&&u()},350)}},f=ct(n,d);return{requestClose:()=>yt(n,e),onTransitionEnd:h=>{t&&h.target===m&&h.propertyName==="opacity"&&u()},update(h){e=h.onDismiss,h.state!==n&&(f(),n=h.state,f=ct(n,d,!1))},destroy(){i&&(clearTimeout(i),i=null),f(),m.removeEventListener("cancel",c),a&&(At(),a=!1),m.removeEventListener("keydown",l),s==null||s.focus(),s=null}}}function fa(r={}){let{color:o="neutral",open:n=!1,labelledBy:e,describedBy:s,onDismiss:t}=r,a=$t(n);return z(E({_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},(0,vn.behavior)("dialog",ha,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(i,m)=>{var c;if(i.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();i.clientX>=u.left&&i.clientX<=u.right&&i.clientY>=u.top&&i.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(i,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(i)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:i=>(0,Ae.themeSize)(i,"inherit"),color:i=>(0,Ae.themeColor)(i,"shift-10",o),backgroundColor:i=>(0,Ae.themeColor)(i,"inherit",o),border:"none",borderRadius:i=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(i)*2),padding:i=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(i)*3),boxShadow:_("high"),"&::backdrop":{backgroundColor:i=>(0,Ae.themeColor)(i,"shift-2","neutral"),opacity:.75}}})}var Cn=require("@domphy/core"),ut=require("@domphy/theme");function ga(r={}){var n;let o=(0,Cn.toState)((n=r.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:(0,ut.themeSpacing)(2),fontSize:e=>(0,ut.themeSize)(e,"inherit"),backgroundColor:e=>(0,ut.themeColor)(e),color:e=>(0,ut.themeColor)(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,ut.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,ut.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var xn=require("@domphy/core"),we=require("@domphy/theme");var Lo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},En={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Bt=r=>r==="left"||r==="right";function kn(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function ya(r,o){let{state:n,onDismiss:e,placement:s,size:t}=o,a=r.domElement;a.setAttribute("aria-modal","true");let i=p=>{p.preventDefault(),yt(n,e)};a.addEventListener("cancel",i);let m=(p,b)=>{let g=(p==="start"||p==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),D=kn(p,g),w=b!=null?b:Bt(D)?(0,we.themeSpacing)(80):(0,we.themeSpacing)(64);return a.style.margin=En[D],a.style.width=Bt(D)?w:"100dvw",a.style.height=Bt(D)?"100dvh":w,D},u=m(s,t),l=!1,c=!1,d=null,f=()=>{d=null,l&&(l=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(At(),c=!1))},h=p=>{p.target===a&&p.propertyName==="transform"&&f()};a.addEventListener("transitionend",h);let C=p=>{if(p)l=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(lo(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(l=!0,a.style.transform=Lo[u],!a.open){f();return}d=setTimeout(f,350)}},v=ct(n,C);return{requestClose:()=>yt(n,e),update(p){e=p.onDismiss,p.state!==n&&(v(),n=p.state,v=ct(n,C,!1)),(p.placement!==s||p.size!==t)&&(s=p.placement,t=p.size,u=m(s,t),n.get()||(a.style.transform=Lo[u]))},destroy(){d&&(clearTimeout(d),d=null),v(),a.removeEventListener("cancel",i),a.removeEventListener("transitionend",h),c&&(At(),c=!1)}}}function ba(r={}){let{color:o="neutral",open:n=!1,onDismiss:e,placement:s="end",size:t}=r,a=$t(n),i=kn(s,!1),m=Bt(i)?(0,we.themeSpacing)(80):(0,we.themeSpacing)(64),u=t!=null?t:m;return z(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},(0,xn.behavior)("drawer",ya,{state:a,onDismiss:e,placement:s,size:t})),{onClick:(l,c)=>{var h;if(l.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();l.clientX>=d.left&&l.clientX<=d.right&&l.clientY>=d.top&&l.clientY<=d.bottom||(h=c.getBehavior("drawer"))==null||h.requestClose()},style:{transform:Lo[i],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:l=>(0,we.themeSize)(l,"inherit"),color:l=>(0,we.themeColor)(l,"shift-10",o),backgroundColor:l=>(0,we.themeColor)(l,"inherit",o),border:"none",padding:l=>(0,we.themeSpacing)((0,we.themeDensity)(l)*3),margin:En[i],width:Bt(i)?u:"100dvw",height:Bt(i)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:_("high"),"&::backdrop":{backgroundColor:l=>(0,we.themeColor)(l,"shift-2","neutral"),opacity:.75}}})}var wn=require("@domphy/core"),so=require("@domphy/theme");function Sa(r={}){var n;let o=(0,wn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>(0,so.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,so.themeColor)(e,"shift-10",o.get(e))}}}var Tn=require("@domphy/core"),St=require("@domphy/theme");function va(r={}){var n;let o=(0,Tn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,St.themeSpacing)(3),paddingBlock:(0,St.themeSpacing)(12),paddingInline:(0,St.themeSpacing)(6),textAlign:"center",color:e=>(0,St.themeColor)(e,"muted",o.get(e)),"& > :first-child":{color:e=>(0,St.themeColor)(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,St.themeColor)(e,"text",o.get(e))}}}}var zo="errorBoundaryOriginal";function Ca(r){var n;let o=r.getMetadata(zo);if(typeof o=="function"){(n=r._childrenRelease)==null||n.call(r),r._setupFunctionChildren(o);return}if(o!=null){r.children.update(Array.isArray(o)?o:[o]);return}r.children.update([])}function xa(r={}){return{_onSchedule:(o,n)=>{o.getMetadata(zo)===void 0&&o.setMetadata(zo,n[o.tagName])},_onError:(o,n)=>{var t,a;(t=r.onError)==null||t.call(r,n);let e=()=>Ca(o),s=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([s])}}}var Dn=require("@domphy/core"),dt=require("@domphy/theme");var Ea={small:8,medium:10,large:14};function ka(r={}){var e,s;let o=(0,Dn.toState)((e=r.color)!=null?e:"primary","color"),n=(0,dt.themeSpacing)(Ea[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>(0,dt.themeSize)(t,"inherit"),backgroundColor:t=>(0,dt.themeColor)(t,"shift-13",o.get(t)),color:t=>(0,dt.themeColor)(t,"shift-0","neutral"),boxShadow:_("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,dt.themeColor)(t,"shift-14",o.get(t)),boxShadow:_("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,dt.themeColor)(t,"shift-15",o.get(t)),boxShadow:_("low")},"&:focus-visible":{boxShadow:t=>`${_("medium")}, ${S(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Pn=require("@domphy/core"),et=require("@domphy/theme");function wa(r={}){var n;let o=(0,Pn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:(0,et.themeSpacing)(2),marginInline:0,marginTop:(0,et.themeSpacing)(3),marginBottom:(0,et.themeSpacing)(3),color:e=>(0,et.themeColor)(e,"text",o.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",o.get(e)),lineHeight:1.45}}}}var In=require("@domphy/core"),K=require("@domphy/theme");function Ta(r={}){var s;let{layout:o="horizontal"}=r,n=(0,In.toState)((s=r.color)!=null?s:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>(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",n.get(t)),color:t=>(0,K.themeColor)(t,"text",n.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",n.get(t)),backgroundColor:t=>(0,K.themeColor)(t,"inherit",n.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",n.get(t))}}}}var co=require("@domphy/theme");function Da(r={}){let{columns:o=1,gap:n=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof o=="number"?`repeat(${o}, minmax(0, 1fr))`:o,gap:s=>(0,co.themeSpacing)((0,co.themeDensity)(s)*n)},e?{alignItems:e}:{})}}var On=require("@domphy/core"),Tt=require("@domphy/theme"),Pa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ia(r={}){var e;let o=(0,On.toState)((e=r.color)!=null?e:"neutral","color"),n=r.size;return{_onInsert:s=>{["h1","h2","h3","h4","h5","h6"].includes(s.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:s=>(0,Tt.themeColor)(s,"shift-11",o.get(s)),marginTop:0,marginBottom:(0,Tt.themeSpacing)(2),fontSize:s=>{if(n!==void 0)return(0,Tt.themeSize)(s,n);let t=Pa[s.elementNode.tagName]||"inherit";return(0,Tt.themeSize)(s,t)}}}}var Ln=require("@domphy/core"),Ht=require("@domphy/theme");function Oa(r={}){var n;let o=(0,Ln.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:(0,Ht.themeSpacing)(3),marginBottom:(0,Ht.themeSpacing)(3),backgroundColor:e=>(0,Ht.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Ht.themeColor)(e,"text",o.get(e))}}}var zn=require("@domphy/core"),Dt=require("@domphy/theme");function La(r={}){var n;let o=(0,zn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:(0,Dt.themeSpacing)(4),height:(0,Dt.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Dt.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Dt.themeColor)(e,"text",o.get(e))}}}var Rn=require("@domphy/core"),Jt=require("@domphy/theme");function za(r={}){var n;let o=(0,Rn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:(0,Jt.themeSpacing)(2),backgroundColor:e=>(0,Jt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Jt.themeColor)(e,"text",o.get(e))}}}var Ro=require("@domphy/core"),X=require("@domphy/theme");function Ra(r={}){var e,s;let o=(0,Ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ro.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",o.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",o.get(t))}`,color:t=>(0,X.themeColor)(t,"text",o.get(t)),width:(0,X.themeSpacing)(4),height:(0,X.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,X.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,X.themeSpacing)(.5)} solid ${(0,X.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,X.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,X.themeSpacing)(1.5),boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,X.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Vn=require("@domphy/core"),se=require("@domphy/theme");function Va(r={}){var n;let o=(0,Vn.toState)((n=r.color)!=null?n:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,se.themeSize)(e,"inherit"),color:e=>(0,se.themeColor)(e,"text",o.get(e)),paddingBlock:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1),paddingInline:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1),blockSize:e=>(0,se.themeSpacing)(6+(0,se.themeDensity)(e)*2),inlineSize:e=>(0,se.themeSpacing)(6+(0,se.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,se.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,se.themeColor)(e,"border-strong","neutral")}`}}}}var Vo=require("@domphy/core"),ce=require("@domphy/theme");function Ma(r={}){var s,t;let{mode:o="datetime-local"}=r,n=(0,Vo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Vo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>(0,ce.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,ce.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,ce.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ce.themeColor)(a,"border-strong",n.get(a))}`,borderRadius:a=>(0,ce.themeSpacing)((0,ce.themeDensity)(a)*1.5),paddingInline:a=>(0,ce.themeSpacing)((0,ce.themeDensity)(a)*3),height:a=>(0,ce.themeSpacing)(6+(0,ce.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,ce.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,ce.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,ce.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,ce.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,ce.themeSpacing)(.5)} solid ${(0,ce.themeColor)(a,"shift-6","error")}`}}}}var Mo=require("@domphy/core"),j=require("@domphy/theme");function _a(r={}){var e,s;let o=(0,Mo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Mo.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,j.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,j.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,j.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)*1.5),height:t=>(0,j.themeSpacing)(6+(0,j.themeDensity)(t)*2),paddingInline:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,j.themeSpacing)(1),height:(0,j.themeSpacing)(6),paddingInline:(0,j.themeSpacing)(2),cursor:"pointer",color:t=>(0,j.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,j.themeColor)(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,j.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,j.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,j.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,j.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,j.themeColor)(t,"shift-3","neutral")}}}}var _o=require("@domphy/core"),ae=require("@domphy/theme");function Na(r={}){var e,s;let o=(0,_o.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,_o.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,ae.themeSpacing)(10),paddingInlineStart:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*3),paddingInlineEnd:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1.5),paddingBlock:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1),borderRadius:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1.5),fontSize:t=>(0,ae.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ae.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,ae.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,ae.themeColor)(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,ae.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,ae.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ae.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,ae.themeColor)(t,"muted","neutral")}}}}var No=require("@domphy/theme");function $a(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:(0,No.themeSpacing)(2),"& > *":{minWidth:`${(0,No.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let i=n(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=n(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,f,h;a.preventDefault();let i=(f=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?f:"",m=n(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((C,v)=>{let p=m[l+v];p&&(p.value=C,p.dispatchEvent(new Event("input",{bubbles:!0})),p.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(h=m[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",s),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",s),o.removeEventListener("paste",t)})}}}var vt=require("@domphy/core"),ge=require("@domphy/theme");var Aa='<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>',Ba='<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>',Ha=["name","value","onInput","disabled","required"];function Mn(r){if(r!=null)return typeof r=="function"?r:(0,vt.isState)(r)?o=>r.get(o):r}function Fa(r={}){var t,a;let o=(0,vt.toState)((t=r.color)!=null?t:"neutral","color"),n=(0,vt.toState)((a=r.accentColor)!=null?a:"primary","accentColor"),e=(0,vt.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 Ha)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var C,v,p,b,k,g,D;let m=(C=r.name)!=null?C:s.name,u=Mn((v=r.value)!=null?v:s.value),l=(p=r.onInput)!=null?p:s.onInput,c=Mn((b=r.disabled)!=null?b:s.disabled),d=(k=r.required)!=null?k:s.required,f=z(E(E(E(E(E({input:null,type:w=>e.get(w)?"text":"password",ariaLabel:(g=r.ariaLabel)!=null?g:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),h={button:w=>(0,vt.rawHtml)(e.get(w)?Ba:Aa),type:"button",ariaLabel:w=>e.get(w)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(f),i.children.insert(h)},style:{display:"flex",alignItems:"center",gap:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1),paddingBlock:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1),paddingInline:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*3),borderRadius:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ge.themeColor)(i,"border-strong",o.get(i))}`,color:i=>(0,ge.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,ge.themeColor)(i,"inherit",o.get(i)),fontSize:i=>(0,ge.themeSize)(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${(0,ge.themeColor)(i,"shift-5",n.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,n.get(i))}}}}var $o=require("@domphy/core"),be=require("@domphy/theme");function Ka(r={}){var e,s;let o=(0,$o.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,$o.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,be.themeSize)(t,"inherit"),color:t=>(0,be.themeColor)(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,be.themeSpacing)(6),height:(0,be.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,be.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,be.themeColor)(t,"text",o.get(t)),width:(0,be.themeSpacing)(4),height:(0,be.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,be.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,be.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,be.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,be.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,be.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Ao=require("@domphy/core"),Te=require("@domphy/theme");function ja(r={}){var e,s;let o=(0,Ao.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ao.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,Te.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,Te.themeSpacing)(1.5),borderRadius:(0,Te.themeSpacing)(999),backgroundColor:t=>(0,Te.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,Te.themeSpacing)(4),height:(0,Te.themeSpacing)(4),borderRadius:(0,Te.themeSpacing)(999),border:"none",marginTop:`calc((${(0,Te.themeSpacing)(1.5)} - ${(0,Te.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,Te.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,Te.themeColor)(t,"shift-10",n.get(t))},borderRadius:(0,Te.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Bo=require("@domphy/core"),me=require("@domphy/theme");function Wa(r={}){var e,s;let o=(0,Bo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Bo.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,me.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,me.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,me.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,me.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*1.5),minWidth:(0,me.themeSpacing)(32),paddingInline:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*3),paddingBlock:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,me.themeColor)(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,me.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,me.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,me.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,me.themeColor)(t,"border-strong","neutral")}`}}}}var _n=require("@domphy/core"),ue=require("@domphy/theme");function qa(r={}){var n;let o=(0,_n.toState)((n=r.accentColor)!=null?n:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>(0,ue.themeSize)(e,"inherit"),backgroundColor:e=>(0,ue.themeColor)(e,"inherit"),color:e=>(0,ue.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,ue.themeSpacing)(9),height:(0,ue.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,ue.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,ue.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,ue.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,ue.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,ue.themeSpacing)(3),height:(0,ue.themeSpacing)(3),borderRadius:(0,ue.themeSpacing)(999),left:(0,ue.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,ue.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,ue.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,ue.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,ue.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Ho=require("@domphy/core"),W=require("@domphy/theme");function Ya(r={}){var s,t;let{type:o="text"}=r,n=(0,Ho.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Ho.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,W.themeSpacing)(10),paddingInline:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*3),paddingBlock:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*1),borderRadius:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*1.5),fontSize:a=>(0,W.themeSize)(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,W.themeColor)(a,"border-strong",n.get(a))}`,color:a=>(0,W.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,W.themeColor)(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,W.themeColor)(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>(0,W.themeColor)(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,W.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,W.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,W.themeColor)(a,"border-strong","neutral")}`,color:a=>(0,W.themeColor)(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","warning")}`}}}}var Nn=require("@domphy/core"),De=require("@domphy/theme");function Ga(r={}){var n;let o=(0,Nn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>(0,De.themeSize)(e,"inherit"),color:e=>(0,De.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,De.themeColor)(e,"inherit",o.get(e)),paddingBlock:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(.5/1.5)),paddingInline:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1/1.5)),outline:e=>`1px solid ${(0,De.themeColor)(e,"border-strong",o.get(e))}`}}}var Fo=require("@domphy/core"),Ct=require("@domphy/theme");function Ua(r={}){var e,s;let o=(0,Fo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Fo.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,Ct.themeSpacing)(2),fontSize:t=>(0,Ct.themeSize)(t,"inherit"),color:t=>(0,Ct.themeColor)(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,Ct.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,Ct.themeColor)(t,"muted","neutral")}}}}var Ko=require("@domphy/core"),tt=require("@domphy/theme");function Ja(r={}){var e,s;let o=(0,Ko.toState)((e=r.color)!=null?e:"primary","color"),n=(0,Ko.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",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,tt.themeColor)(t,"shift-13",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,tt.themeColor)(t,"shift-14",o.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,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>(0,tt.themeColor)(t,"muted","neutral")}}}}var $n=require("@domphy/core"),I=require("@domphy/theme");var Xa={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},Za={small:.5,medium:1,large:1.5};function Qa(r={}){var i,m,u;let o=(i=r.variant)!=null?i:"outline",n=(0,$n.toState)((m=r.color)!=null?m:o==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=Nt[e];if(o==="ghost"){let l=Za[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",n.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",n.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"hover",n.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",n.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"increase-2",n.get(c))},"&:focus-visible":{boxShadow:c=>S(c,n.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>(0,I.themeColor)(c,"border-strong","neutral")}}}}let t=o==="solid",a=Xa[e];return z(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",n.get(l))}`,color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-13",n.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-13",n.get(l)):(0,I.themeColor)(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-14",n.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-14",n.get(l)):(0,I.themeColor)(l,"hover",n.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?(0,I.themeColor)(l,"shift-15",n.get(l)):(0,I.themeColor)(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>(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 An=require("@domphy/core"),B=require("@domphy/theme");function ei(r={}){var n;let o=(n=r.color)!=null?n:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>(0,B.themeColor)(e,"inherit",o),color:e=>(0,B.themeColor)(e,"text",o)}}}function ti(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,B.themeSpacing)((0,B.themeDensity)(n)*2),paddingBlock:n=>(0,B.themeSpacing)(o?1:(0,B.themeDensity)(n)*2),paddingInline:n=>(0,B.themeSpacing)((0,B.themeDensity)(n)*3),fontSize:n=>(0,B.themeSize)(n,"inherit"),color:n=>(0,B.themeColor)(n,"text")}}}function oi(r={}){var s,t;let o=(0,An.toState)((s=r.color)!=null?s:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*2),paddingBlock:a=>(0,B.themeSpacing)(e?1:(0,B.themeDensity)(a)*2),paddingInline:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*3),fontSize:a=>(0,B.themeSize)(a,"inherit"),color:a=>(0,B.themeColor)(a,"text",o.get(a)),borderRadius:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,B.themeColor)(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>(0,B.themeColor)(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,B.themeColor)(a,"shift-3",n),color:a=>(0,B.themeColor)(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>S(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Bn=require("@domphy/core"),Ve=require("@domphy/theme");function ni(r={}){var n;let o=(0,Bn.toState)((n=r.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>(0,Ve.themeSize)(e,"inherit"),color:e=>(0,Ve.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Ve.themeColor)(e,"inherit",o.get(e)),height:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(6/1.5)),borderRadius:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(1/1.5)),paddingInline:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(1.5/1.5))}}}var mo=require("@domphy/core"),G=require("@domphy/theme");function ri(r={items:[]}){var l;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:s="primary"}=r,t=(0,mo.toState)((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let f=c.nodeId;return d.items.map((h,C)=>{var p;let v=(p=h.key)!=null?p:C;return z(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:v,type:"button",id:`menuitem${f}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=h.onClick)==null||b.call(h)},onKeyDown:b=>{var q;let k=b.key;if(k==="Enter"||k===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(k))return;b.preventDefault();let g=d.items.map((ve,Ie)=>{var Z;return(Z=ve.key)!=null?Z:Ie}),D=g.indexOf(v),w=D;k==="ArrowDown"?w=(D+1)%g.length:k==="ArrowUp"?w=(D-1+g.length)%g.length:k==="Home"?w=0:k==="End"&&(w=g.length-1),(q=document.getElementById(`menuitem${f}${g[w]}`))==null||q.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,G.themeSpacing)(2),width:"100%",fontSize:b=>(0,G.themeSize)(b,"inherit"),height:b=>(0,G.themeSpacing)(6+(0,G.themeDensity)(b)*2),paddingInline:b=>(0,G.themeSpacing)((0,G.themeDensity)(b)*3),border:"none",outline:"none",color:b=>(0,G.themeColor)(b,"text",d.color),backgroundColor:b=>(0,G.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,G.themeColor)(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>(0,G.themeColor)(b,"shift-3",d.accentColor),color:b=>(0,G.themeColor)(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let f=d;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),f=h,f.items.length!==0&&c.children.update(i(c,f))}}},u={items:o,activeKey:t,activeKeyIsCallerOwned:a,selectable:n,color:e,accentColor:s};return z(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{o.length!==0&&(d[c.tagName]=i(c,u))}},(0,mo.behavior)("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),paddingInline:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),fontSize:c=>(0,G.themeSize)(c,"inherit"),backgroundColor:c=>(0,G.themeColor)(c,"inherit",e),color:c=>(0,G.themeColor)(c,"text",e),borderRadius:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),outline:c=>`1px solid ${(0,G.themeColor)(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:_("medium")}})}var Fn=require("@domphy/core");var Hn=r=>!!r&&typeof r.get=="function"&&r._isState===!0,ot=r=>{let o={},n=[];for(let e in r){let s=r[e];e==="x"?n.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?n.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?n.push(`scale(${s})`):e==="rotate"?n.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):o[e]=s}return n.length&&(o.transform=n.join(" ")),o};function jo(r={}){var o,n,e,s;return{duration:(o=r.duration)!=null?o:300,delay:(n=r.delay)!=null?n:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function Wo(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function ai(r,o){let n=r.domElement,e=o,s,t=i=>{s==null||s(),s=void 0,!(!n||!Hn(i))&&(s=i.addListener(m=>{Wo()?Object.assign(n.style,ot(m)):typeof n.animate=="function"&&n.animate([ot(m)],jo(e.transition))}))},a=(i,m)=>{if(!n)return;let u=Hn(i.animate)?i.animate.get():i.animate;if(Wo()){u?Object.assign(n.style,ot(u)):m==="enter"&&i.initial&&Object.assign(n.style,ot(i.initial));return}if(typeof n.animate=="function")if(u){let l=m==="enter"&&i.initial?[ot(i.initial),ot(u)]:[ot(u)];n.animate(l,jo(i.transition))}else m==="enter"&&i.initial&&Object.assign(n.style,ot(i.initial))};return a(o,"enter"),t(o.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function ii(r={}){return z(E({},(0,Fn.behavior)("motion",(o,n)=>ai(o,n),r)),{_onBeforeRemove:(o,n)=>{var a,i;let e=o.domElement,s=o.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return n();if(Wo())return Object.assign(e.style,ot(t)),n();e.animate([ot(t)],jo((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(n,n)}})}var Kn=require("@domphy/core"),Pt=require("@domphy/theme");function li(r={}){var n;let o=(0,Kn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>(0,Pt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Pt.themeColor)(e),color:e=>(0,Pt.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Pt.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var It=require("@domphy/core"),te=require("@domphy/theme");function si(r,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];r>3&&n.push("...");let e=Math.max(2,r-1),s=Math.min(o-1,r+1);for(let t=e;t<=s;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function ci(r,o,n,e){if((0,It.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,It.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function jn(r,o){let n=r.getMetadata("paginationTotal");return n||(n=(0,It.toState)(o),r.setMetadata("paginationTotal",n)),n}function mi(r){let{total:o,color:n="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>(0,te.themeSpacing)(6+(0,te.themeDensity)(a)*2),height:a=>(0,te.themeSpacing)(6+(0,te.themeDensity)(a)*2),paddingInline:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*2),borderRadius:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>(0,te.themeSize)(a,"inherit"),backgroundColor:"transparent",color:a=>(0,te.themeColor)(a,"shift-13",n),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>(0,te.themeColor)(a,"shift-13",n),backgroundColor:a=>(0,te.themeColor)(a,"hover",n)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=z(E({},s),{backgroundColor:a=>(0,te.themeColor)(a,"shift-13",e),color:a=>(0,te.themeColor)(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>(0,te.themeColor)(a,"shift-13",e)}});return z(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=ci(a,"paginationPage",r.value,1),m=jn(a,o),u={div:l=>{let c=i.get(l),d=m.get(l),f=[];f.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let h=0;for(let C of si(c,d))if(C==="...")f.push({span:"\u2026",_key:`ellipsis-${h++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>(0,te.themeSpacing)((0,te.themeDensity)(v)*2),color:v=>(0,te.themeColor)(v,"shift-7",n)}});else{let v=C===c;f.push({button:String(C),_key:`page-${C}`,type:"button",ariaLabel:`Page ${C}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(C),style:v?t:s})}return f.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),f},style:{display:"flex",alignItems:"center",gap:(0,te.themeSpacing)(1)}};a.children.insert(u)}},(0,It.behavior)("pagination-total",a=>({update(i){jn(a,i.total).set(i.total)}}),{total:o})),{style:{display:"inline-flex"}})}var Wn=require("@domphy/core"),Ft=require("@domphy/theme");function ui(r={}){var s;let{padding:o=4,divider:n=!1}=r,e=(0,Wn.toState)((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>(0,Ft.themeSpacing)((0,Ft.themeDensity)(t)*o)},n?{borderBottom:t=>`1px solid ${(0,Ft.themeColor)(t,"border",e.get(t))}`}:{})}}var qn=require("@domphy/core"),uo=require("@domphy/theme");function di(r={}){var n;let o=(0,qn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>(0,uo.themeSize)(e,"inherit"),color:e=>(0,uo.themeColor)(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var Xt=require("@domphy/core"),xt=require("@domphy/theme");function pi(r){var c;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,s=(0,Xt.toState)(o),t=(0,Xt.toState)(n),{show:a,hide:i,anchorPartial:m}=Qe({kind:"popover",open:s,onDismiss:r.onDismiss,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>(0,xt.themeColor)(d,"inherit"),color:d=>(0,xt.themeColor)(d,"text"),borderRadius:d=>(0,xt.themeSpacing)((0,xt.themeDensity)(d)*2),outline:d=>`1px solid ${(0,xt.themeColor)(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};return(c=r.content).$||(c.$=[]),r.content.$.push(u),(0,Xt.merge)(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?Re("popover",d.elementNode):void 0,onMouseEnter:(d,f)=>e==="hover"&&a(f),onMouseLeave:(d,f)=>e==="hover"&&i(f),onClick:(d,f)=>{e==="click"&&(s.get()?i(f):a(f))},onKeyDown:(d,f)=>{d.key==="Escape"&&s.get()&&i(f)},onFocus:(d,f)=>e==="hover"&&a(f),onBlur:(d,f)=>{if(e!=="hover")return;let h=d.relatedTarget,v=f.getRoot().domElement.querySelector(`#${Re("popover",f)}`);h&&(v!=null&&v.contains(h))||i(f)}}),m}var Yn=require("@domphy/core"),je=require("@domphy/theme");function qo(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,je.themeSpacing)(6),bordered:s=!0}=r,t=(0,Yn.toState)(o),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},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",n),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",n),borderWidth:s?"1px":0,borderColor:l=>(0,je.themeColor)(l,"border-strong",n),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",f=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${f}) rotate(45deg)`}}}}}var Gn=require("@domphy/core"),Me=require("@domphy/theme");function hi(r={}){var n;let o=(0,Gn.toState)((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>(0,Me.themeSize)(e,"inherit"),color:e=>(0,Me.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Me.themeColor)(e,"inherit",o.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 Yo=require("@domphy/core"),nt=require("@domphy/theme");function fi(r={}){var e,s;let o=(0,Yo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Yo.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",o.get(t)),color:t=>(0,nt.themeColor)(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,nt.themeColor)(t,"inherit",o.get(t)),borderRadius:(0,nt.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,nt.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,nt.themeSpacing)(999),transition:"width 220ms ease"}}}}var pt=require("@domphy/core"),Ot=require("@domphy/theme");var gi='<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>',yi='<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 Un(r,o){var n,e,s;r.onChange=o.onChange,r.readOnly=(n=o.readOnly)!=null?n:!1,r.max=(e=o.max)!=null?e:5,r.color=(s=o.color)!=null?s:"warning",(0,pt.isState)(o.value)?o.value!==r.valueState&&r.valueState.set(o.value.get()):o.value!==void 0&&r.valueState.set(o.value)}function bi(r,o,n,e){let s=a=>{let i=e.get(a);return i>0?i:n.valueState.get(a)},t={button:a=>(0,pt.rawHtml)(o<=s(a)?gi:yi),_key:o,type:"button",ariaLabel:`${o} star${o>1?"s":""}`,onClick:()=>{var i;if(n.readOnly)return;let a=o===n.valueState.get()?0:o;n.valueState.set(a),(i=n.onChange)==null||i.call(n,a),e.set(0)},onMouseEnter:()=>{n.readOnly||e.set(o)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(n.readOnly)return;let i=n.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(n.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;n.valueState.set(m),(l=n.onChange)==null||l.call(n,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:(0,Ot.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,n.color)}}};r.children.insert(t)}function Go(r,o,n){let e=r.children.items;for(;e.length>o.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=o.max;s++)bi(r,s,o,n)}function Si(r={}){var e,s,t,a,i,m,u;let o={valueState:(0,pt.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"},n=(0,pt.toState)(0);return z(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,Ot.themeSpacing)(.5),fontSize:l=>(0,Ot.themeSize)(l,"increase-1"),cursor:o.readOnly?"default":"pointer",color:l=>(0,Ot.themeColor)(l,"muted",o.color)}},(0,pt.behavior)("rating",(l,c)=>(Un(o,c),Go(l,o,n),{update(d){Un(o,d),Go(l,o,n)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{Go(l,o,n)}})}var po=require("@domphy/core"),Lt=require("@domphy/theme");function vi(r={}){var m,u,l;let{size:o=16,thickness:n=.25}=r,e=(0,po.toState)((m=r.value)!=null?m:0,"value"),s=(0,po.toState)((u=r.color)!=null?u:"primary","color"),t=(0,po.toState)((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-n)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,Lt.themeSpacing)(o),height:(0,Lt.themeSpacing)(o),borderRadius:"50%",color:c=>(0,Lt.themeColor)(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${(0,Lt.themeColor)(c,"shift-9",s.get(c))} ${e.get(c)}%, ${(0,Lt.themeColor)(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}var Zt=require("@domphy/theme");function Uo(r={}){let{gap:o=4,align:n="center",justify:e,wrap:s=!1,density:t=!0}=r;return{style:E(E({display:"flex",alignItems:n,gap:t?a=>(0,Zt.themeSpacing)((0,Zt.themeDensity)(a)*o):()=>(0,Zt.themeSpacing)(o)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}var Jn=require("@domphy/core"),rt=require("@domphy/theme");function Ci(r={}){var n;let o=(0,Jn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>(0,rt.themeColor)(e,"text",o.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",o.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",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,rt.themeColor)(e,"shift-5",o.get(e))} transparent`}}}var zt=require("@domphy/core"),he=require("@domphy/theme");function Xn(r,o,n,e){if((0,zt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,zt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function xi(r,o,n,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=o.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(n),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function Zn(r,o,n,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>o.get(u)===a,tabIndex:u=>{var c,d;let l=o.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>o.set(a),onKeyDown:u=>xi(u,r,a,o),style:{cursor:"pointer",fontSize:u=>(0,he.themeSize)(u,"inherit"),height:(0,he.themeSpacing)(6),paddingBlock:(0,he.themeSpacing)(1),paddingInline:(0,he.themeSpacing)(3),border:"none",borderRadius:(0,he.themeSpacing)(10),color:u=>(0,he.themeColor)(u,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,he.themeColor)(u,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,he.themeColor)(u,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:u=>(0,he.themeColor)(u,"shift-0",e),color:u=>(0,he.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 Ei(r={items:[]}){var t,a,i;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,s={items:o,color:n,accentColor:e};return z(E({role:"radiogroup",_context:{segmented:{value:(0,zt.toState)((i=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=Xn(m,"segmentedValue",r.value,(d=(c=o[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=Zn(o,l,n,e)}},(0,zt.behavior)("segmented-items",m=>({update(u){var c,d;let l=Xn(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(Zn(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,he.themeSpacing)(1),paddingInline:(0,he.themeSpacing)(1),gap:(0,he.themeSpacing)(.5),borderRadius:(0,he.themeSpacing)(10),backgroundColor:m=>(0,he.themeColor)(m,"inherit",n),color:m=>(0,he.themeColor)(m,"text",n)}})}var A=require("@domphy/theme");function ki(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>(0,A.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,A.themeColor)(e,"text",o),backgroundColor:e=>(0,A.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,A.themeColor)(e,"border-strong",o)}`,borderRadius:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1.5),paddingBlock:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),paddingLeft:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*3),paddingRight:e=>(0,A.themeSpacing)((0,A.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,A.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,A.themeSpacing)(2)} center`,backgroundSize:`${(0,A.themeSpacing)(2.5)} ${(0,A.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,A.themeSpacing)(6+(0,A.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>S(e,n)},"& optgroup":{color:e=>(0,A.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,A.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,A.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,A.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,A.themeColor)(e,"shift-2","neutral")}}}}var ht=require("@domphy/core"),ie=require("@domphy/theme");var wi=1e3;function Ti(r){let o=r.getMetadata("selectBoxTypeahead");return o||(o={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",o)),o}var Qn=(r,o)=>r.trim().toLowerCase().startsWith(o);function Di(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(o=>o.getAttribute("aria-disabled")!=="true"&&!o.hasAttribute("disabled")):[]}function Pi(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,ht.toState)(r.value),i=(0,ht.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"selectBox",open:i,onDismiss:r.onDismiss,placement:(0,ht.toState)(n),content:r.content}),c={onClick:(p,b)=>!t&&u(b),dataTone:"shift-14",style:{backgroundColor:p=>(0,ie.themeColor)(p,"inherit"),color:p=>(0,ie.themeColor)(p,"text"),borderRadius:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*2),outline:p=>`1px solid ${(0,ie.themeColor)(p,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,ht.merge)(r.content,c);let d=p=>({div:b=>{let k=p.state.get(b),g=Array.isArray(k)?k:[k];return p.options.filter(w=>g.includes(w.value)).map(w=>({span:w.label,$:[Yt({color:p.color,removable:p.multiple})],_key:w.value,_onRemove:q=>{let ve=p.state.get(),Z=(Array.isArray(ve)?ve:[ve]).filter(He=>He!==w.value);p.multiple?p.state.set(Z):p.state.set(Z[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,ie.themeSpacing)(1),flex:1}}),f=(p,b)=>({update(k){p.children.update([d(k)])}}),h=p=>i.get()?u(p):m(p),C=(p,b)=>{var Ie,Z,He,re;let k=Ti(b);k.timer&&clearTimeout(k.timer),k.buffer+=p.toLowerCase(),k.timer=setTimeout(()=>{k.buffer=""},wi);let g=k.buffer.length>1&&new Set(k.buffer).size===1,D=g?k.buffer[0]:k.buffer;if(i.get()){let Ee=b.getRoot().domElement,Ge=(Ie=Ee==null?void 0:Ee.querySelector(`#${Re("selectBox",b)}`))!=null?Ie:null,Oe=Di(Ge).filter(kt=>{var it;return Qn((it=kt.textContent)!=null?it:"",D)});if(!Oe.length)return;let Et=(He=(Z=b.domElement)==null?void 0:Z.ownerDocument)==null?void 0:He.activeElement,at=g&&Et?Oe.indexOf(Et):-1,Ue=Oe[(at+1)%Oe.length];Ue.focus(),(re=Ue.scrollIntoView)==null||re.call(Ue,{block:"nearest"});return}if(t)return;let w=o.filter(Ee=>Qn(Ee.label,D));if(!w.length)return;let q=g?w.findIndex(Ee=>Ee.value===a.get()):-1,ve=w[(q+1)%w.length];a.set(ve.value)},v=z(E({_onInsert:p=>{p.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(p,b)=>{b[p.tagName]=[d({options:o,multiple:t,color:e,state:a})]}},(0,ht.behavior)("selectBoxInner",f,{options:o,multiple:t,color:e,state:a})),{onClick:(p,b)=>h(b),tabindex:0,role:"button",ariaExpanded:p=>i.get(p),ariaHaspopup:"listbox",ariaControls:p=>p!=null&&p.elementNode?Re("selectBox",p.elementNode):void 0,onKeyDown:(p,b)=>{let k=p.key;if(k==="Escape"){u(b);return}if(k==="Enter"||k===" "){p.preventDefault(),h(b);return}if(k==="ArrowDown"&&!i.get()){p.preventDefault(),m(b);return}let g=p;k.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&C(k,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:p=>(0,ie.themeSpacing)(6+(0,ie.themeDensity)(p)*2),minWidth:(0,ie.themeSpacing)(32),outlineOffset:"-1px",outline:p=>`1px solid ${(0,ie.themeColor)(p,"border-strong","neutral")}`,paddingInline:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*2),borderRadius:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*1.5),fontSize:p=>(0,ie.themeSize)(p,"inherit"),color:p=>(0,ie.themeColor)(p,"text",e),backgroundColor:p=>(0,ie.themeColor)(p,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>S(p,e)}}});return(0,ht.merge)(l,v),l}var Pe=require("@domphy/theme");function Ii(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,Pe.themeSize)(t,"inherit"),height:t=>(0,Pe.themeSpacing)(6+(0,Pe.themeDensity)(t)*2),paddingInline:t=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,Pe.themeColor)(t,"text",n),backgroundColor:t=>(0,Pe.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,Pe.themeColor)(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,Pe.themeColor)(t,"shift-6",o),color:t=>(0,Pe.themeColor)(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o)}}}}var er=require("@domphy/core"),We=require("@domphy/theme");function Oi(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,er.toState)((a=r.value)!=null?a:n?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:n?"true":void 0,_context:{select:{value:e,multiple:n}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,We.themeSpacing)((0,We.themeDensity)(i)*2),paddingInline:i=>(0,We.themeSpacing)((0,We.themeDensity)(i)*2),fontSize:i=>(0,We.themeSize)(i,"inherit"),backgroundColor:i=>(0,We.themeColor)(i,"inherit",o),color:i=>(0,We.themeColor)(i,"text",o)}}}var ho=require("@domphy/core"),qe=require("@domphy/theme");function Li(r={}){var s;let o=(0,ho.toState)((s=r.color)!=null?s:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,ho.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>(0,qe.themeSize)(t),color:t=>(0,qe.themeColor)(t,"text",o.get(t)),height:(0,qe.themeSpacing)(6),display:"block",borderRadius:(0,qe.themeSpacing)(1),backgroundColor:t=>(0,qe.themeColor)(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,qe.themeColor)(t,"inherit",o.get(t))} 0%, ${(0,qe.themeColor)(t,"shift-2",o.get(t))} 50%, ${(0,qe.themeColor)(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var tr=require("@domphy/core"),fo=require("@domphy/theme");function zi(r={}){var n;let o=(0,tr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>(0,fo.themeSize)(e,"inherit"),color:e=>(0,fo.themeColor)(e,"shift-10",o.get(e))}}}var go=require("@domphy/core"),Ye=require("@domphy/theme"),nr={to:{transform:"rotate(360deg)"}},or=(0,go.hashString)(JSON.stringify(nr));function Ri(r={}){var n;let o=(0,go.toState)((n=r.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>(0,Ye.themeSize)(e),backgroundColor:e=>(0,Ye.themeColor)(e),color:e=>(0,Ye.themeColor)(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,Ye.themeSpacing)(6),height:(0,Ye.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,Ye.themeSpacing)(.5)} solid ${(0,Ye.themeColor)(e,"border-strong",o.get(e))}`,borderTopColor:e=>(0,Ye.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${or} 0.7s linear infinite`,[`@keyframes ${or}`]:nr}}}var Kt=require("@domphy/core"),ft=require("@domphy/theme");function Vi(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{(0,Kt.merge)(a,{_context:{splitter:{direction:o,size:(0,Kt.toState)(n),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Mi(r){let o=r.parent;if(!o)return!0;for(let n of o.children.items)if(n instanceof Kt.ElementNode&&n.getMetadata("splitterPanel"))return n===r;return!0}function _i(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal"?"width":"height",s=a=>{n.style[e]=`${Mi(r)?a:100-a}%`};s(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let t=o.size.addListener(s);r.addHook("Remove",()=>{var a;o.panelCount=Math.max(0,((a=o.panelCount)!=null?a:1)-1),t()})}}}function Ni(){return{role:"separator",tabindex:0,_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize",n.setAttribute("aria-orientation",e?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(o.min)),n.setAttribute("aria-valuemax",String(o.max)),n.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let s=o.size.addListener(m=>{n.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowLeft"&&(l=Math.max(o.size.get()-u,o.min)):m.key==="ArrowDown"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowUp"&&(l=Math.max(o.size.get()-u,o.min)),m.key==="Home"?l=o.min:m.key==="End"&&(l=o.max),l!==null&&(m.preventDefault(),o.size.set(l))},a=null,i=m=>{m.preventDefault();let u=n.parentElement,l=d=>{let f=u.getBoundingClientRect(),h=e?(d.clientX-f.left)/f.width*100:(d.clientY-f.top)/f.height*100;o.size.set(Math.min(Math.max(h,o.min),o.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};n.addEventListener("keydown",t),n.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,ft.themeColor)(r,"inherit"),color:r=>(0,ft.themeColor)(r,"text"),"&:hover":{backgroundColor:r=>(0,ft.themeColor)(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:(0,ft.themeSpacing)(1),height:(0,ft.themeSpacing)(1),borderRadius:(0,ft.themeSpacing)(999),backgroundColor:r=>(0,ft.themeColor)(r,"shift-4")}}}}var Qt=require("@domphy/theme");function $i(r={}){let{gap:o=3,align:n,justify:e,density:s=!0}=r;return{style:E(E({display:"flex",flexDirection:"column",gap:s?t=>(0,Qt.themeSpacing)((0,Qt.themeDensity)(t)*o):()=>(0,Qt.themeSpacing)(o)},n?{alignItems:n}:{}),e?{justifyContent:e}:{})}}var Rt=require("@domphy/core"),R=require("@domphy/theme");function rr(r,o,n,e){if((0,Rt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,Rt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Ai(r,o,n){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",o),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)}}:{"&: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",o),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)}}}function ar(r,o,n,e,s){let t=n==="vertical",a=Ai(n,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=o.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>o.get(c)===m?"step":void 0,style:z(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 Bi(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:o,direction:n,color:e,accentColor:s};return z(E({_doctorDisable:"inline-typography",_context:{steps:{current:(0,Rt.toState)((a=r.current)!=null?a:0),direction:n,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=rr(i,"stepsCurrent",r.current,0);m[i.tagName]=ar(o,u,n,e,s)}},(0,Rt.behavior)("steps-items",i=>({update(m){let u=rr(i,"stepsCurrent",r.current,0);i.children.update(ar(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:(0,R.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}})}var ir=require("@domphy/core"),eo=require("@domphy/theme");function Hi(r={}){var n;let o=(0,ir.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>(0,eo.themeSize)(e,"inherit"),fontWeight:"bold",color:e=>(0,eo.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,eo.themeColor)(e)}}}var lr=require("@domphy/core"),yo=require("@domphy/theme");function Fi(r={}){var n;let o=(0,lr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>(0,yo.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,yo.themeColor)(e,"text",o.get(e))}}}var sr=require("@domphy/core"),bo=require("@domphy/theme");function Ki(r={}){var n;let o=(0,sr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>(0,bo.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,bo.themeColor)(e,"text",o.get(e))}}}var cr=require("@domphy/core"),H=require("@domphy/theme");function ji(r={}){var n;let o=(0,cr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>(0,H.themeSize)(e,"inherit"),color:e=>(0,H.themeColor)(e,"text",o.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",o.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",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,H.themeColor)(e,"shift-3",o.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",o.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,H.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,H.themeColor)(e,"hover")}}}}var jt=require("@domphy/core"),U=require("@domphy/theme");function mr(r,o,n,e){if((0,jt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,jt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function ur(r,o,n,e,s){let t=r.nodeId,i={div:o.map((u,l)=>{var f;let c=(f=u.key)!=null?f:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:h=>n.get(h)===c,tabIndex:h=>n.get(h)===c?0:-1,onClick:()=>n.set(c),onKeyDown:h=>{var g;let C=h.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(C))return;h.preventDefault();let v=o.map((D,w)=>{var q;return(q=D.key)!=null?q:w}),p=v.indexOf(c),b=p;C==="ArrowRight"?b=(p+1)%v.length:C==="ArrowLeft"?b=(p-1+v.length)%v.length:C==="Home"?b=0:C==="End"&&(b=v.length-1),n.set(v[b]);let k=h.target.closest("[role=tablist]");(g=k==null?void 0:k.querySelectorAll("[role=tab]")[b])==null||g.focus()},style:{cursor:"pointer",fontSize:h=>(0,U.themeSize)(h,"inherit"),height:h=>(0,U.themeSpacing)(6+(0,U.themeDensity)(h)*2),paddingInline:h=>(0,U.themeSpacing)((0,U.themeDensity)(h)*4),border:"none",outline:"none",color:h=>(0,U.themeColor)(h,"shift-13"),backgroundColor:h=>(0,U.themeColor)(h,"inherit"),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:h=>(0,U.themeColor)(h,"shift-13"),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:h=>(0,U.themeColor)(h,"shift-13",e),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-8",e)}`},"&:focus-visible":{boxShadow:h=>S(h,e)},"&[aria-selected=true]:focus-visible":{boxShadow:h=>`${S(h,e)}, inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=o.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:f=>n.get(f)!==c,style:{paddingBlock:f=>(0,U.themeSpacing)((0,U.themeDensity)(f)*2),paddingInline:f=>(0,U.themeSpacing)((0,U.themeDensity)(f)*2)}}});return[i,...m]}function Wi(r={items:[]}){let{items:o=[],accentColor:n="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=mr(t,"tabsActiveKey",r.activeKey,(u=(m=o[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=ur(t,o,i,n,e)}},(0,jt.behavior)("tabs-items",t=>({update(a){var m,u;let i=mr(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(ur(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:o,accentColor:n,color:e}))}var to=require("@domphy/core"),le=require("@domphy/theme");function qi(r={}){var s,t;let o=(0,to.toState)((s=r.color)!=null?s:"neutral","color"),n=(0,to.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return z(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},(0,to.behavior)("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=!1,c,d,f=()=>{!u||l||(l=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,l=!1,u&&(d==null||d.observe(m)))},h=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(v=>{v.some(p=>p.isIntersecting)&&f()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{l||f()})),d.observe(m))},C=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",f),a.attributes.addListener("value",f),u&&(h(),f()),{resize:f,update(v){u=v.autoResize,a.attributes.addListener("value",f),u?(h(),f()):C()},destroy(){m.removeEventListener("input",f),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*2),paddingBlock:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*1.5),fontSize:a=>(0,le.themeSize)(a,"inherit"),color:a=>(0,le.themeColor)(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,le.themeColor)(a,"border-strong",o.get(a))}`,backgroundColor:a=>(0,le.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,le.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,le.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,n.get(a))},"&:invalid":{outline:a=>`${(0,le.themeSpacing)(.5)} solid ${(0,le.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,le.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,le.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,le.themeColor)(a,"shift-2","neutral")}}})}var dr=require("@domphy/core"),Be=require("@domphy/theme");function Yi(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Gi(r={}){var t,a,i;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=(0,dr.toState)((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>(0,Be.themeSpacing)((0,Be.themeDensity)(m)*2),paddingBottom:m=>o?"0":(0,Be.themeSpacing)((0,Be.themeDensity)(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,Be.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>(0,Be.themeColor)(m,"shift-8",s.get(m)?e:n),opacity:m=>s.get(m)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>(0,Be.themeSpacing)((0,Be.themeDensity)(m)*-4),width:"2px",backgroundColor:m=>(0,Be.themeColor)(m,"shift-3",n)}})}}var hr=require("@domphy/core"),Se=require("@domphy/theme");function Jo(r){let o=r.getMetadata("toastOpen");return o||(o=(0,hr.toState)(!1),r.setMetadata("toastOpen",o)),o}var pr=r=>{let o=r==null?void 0:r.elementNode;return o?Jo(o).get(r):!1};function Ui(r={}){let{position:o="top-center",color:n="neutral"}=r,e=o.startsWith("top"),s=o.endsWith("center"),t=o.endsWith("right"),a={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:(0,Se.themeSpacing)(4),zIndex:30,padding:(0,Se.themeSpacing)(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${o}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,Se.themeSpacing)(32),pointerEvents:"auto",paddingBlock:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*2),paddingInline:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*4),borderRadius:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*2),fontSize:i=>(0,Se.themeSize)(i,"inherit"),color:i=>(0,Se.themeColor)(i,"text",n),backgroundColor:i=>(0,Se.themeColor)(i,"inherit",n),boxShadow:_("medium"),opacity:i=>Number(pr(i)),transform:i=>pr(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 p,b;let u=!1,l=null,c=!1,d=i.getRoot(),f=(b=(p=i.domElement)==null?void 0:p.parentElement)!=null?b:null,h=()=>{var g;if(c||!f||f.id!==`domphy-toast-${o}`||f.childElementCount>0)return;c=!0;let k=(g=d.children)==null?void 0:g.items.find(D=>D.domElement===f);k?d.children.remove(k):f.remove()},C=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),h())},v=k=>{k.propertyName==="transform"&&C()};i.domElement.addEventListener("transitionend",v),l=setTimeout(C,350),i.addHook("Remove",()=>{var k;l&&(clearTimeout(l),l=null),(k=i.domElement)==null||k.removeEventListener("transitionend",v),h()}),Jo(i).set(!1)}}}var Vt=require("@domphy/core"),oe=require("@domphy/theme");function fr(r,o,n,e){if((0,Vt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,Vt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Ji(r,o){return Array.isArray(r)?r.includes(o):r===o}function Xi(r,o,n,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=o.map((c,d)=>{var f;return(f=c.key)!=null?f:String(d)}),i=a.indexOf(n),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function gr(r,o,n,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>Ji(o.get(l),i),tabIndex:l=>{var d,f,h,C,v;let c=o.get(l);if(n){let b=(h=(f=(Array.isArray(c)?c:[])[0])!=null?f:(d=r[0])==null?void 0:d.key)!=null?h:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(C=r[0])==null?void 0:C.key)!=null?v:"0")?0:-1},onClick:()=>{let l=o.get();if(n){let c=Array.isArray(l)?[...l]:[];o.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else o.set(l===i?"":i)},onKeyDown:l=>Xi(l,r,i,o,n),style:{cursor:"pointer",fontSize:l=>(0,oe.themeSize)(l,"inherit"),height:(0,oe.themeSpacing)(6),paddingBlock:(0,oe.themeSpacing)(1),paddingInline:(0,oe.themeSpacing)(2),border:"none",borderRadius:(0,oe.themeSpacing)(1.5),color:l=>(0,oe.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,oe.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,oe.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,oe.themeColor)(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>(0,oe.themeColor)(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>(0,oe.themeColor)(l,"shift-3",s),color:l=>(0,oe.themeColor)(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Zi(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:o,multiple:n,color:e,accentColor:s};return z(E({role:"group",_context:{toggleGroup:{value:(0,Vt.toState)((a=r.value)!=null?a:n?[]:""),multiple:n}},_onSchedule:(i,m)=>{let u=fr(i,"toggleGroupValue",r.value,n?[]:"");m[i.tagName]=gr(o,u,n,e,s)}},(0,Vt.behavior)("toggle-items",i=>({update(m){let u=fr(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(gr(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:(0,oe.themeSpacing)(1),paddingInline:(0,oe.themeSpacing)(1),gap:(0,oe.themeSpacing)(1),borderRadius:(0,oe.themeSpacing)(2),fontSize:i=>(0,oe.themeSize)(i,"inherit"),backgroundColor:i=>(0,oe.themeColor)(i,"inherit",e),color:i=>(0,oe.themeColor)(i,"text",e),outline:i=>`1px solid ${(0,oe.themeColor)(i,"border",e)}`,outlineOffset:"-1px"}})}function Qi(r={}){return Uo(r)}function el(){return{div:null,style:{flex:"1 1 0"}}}var oo=require("@domphy/core"),_e=require("@domphy/theme");function tl(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,s=(0,oo.toState)(n),t=(0,oo.toState)(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=Qe({kind:"tooltip",open:o,onDismiss:r.onDismiss,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")},$:[qo({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),(0,oo.merge)(u,{ariaDescribedby:d=>d!=null&&d.elementNode?Re("tooltip",d.elementNode):void 0,onMouseEnter:(d,f)=>i(f),onMouseLeave:(d,f)=>m(f),onFocus:(d,f)=>i(f),onBlur:(d,f)=>m(f),onKeyDown:(d,f)=>d.key==="Escape"&&m(f)}),u}var Xo=require("@domphy/core");function yr(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function ol(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof Xo.ElementNode))return;let l=m.domElement;l&&e.set(yr(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof Xo.ElementNode))return;let l=m.domElement;if(!l)return;let c=yr(m,u),d=e.get(c);if(!d)return;let f=l.getBoundingClientRect(),h=d.left-f.left,C=d.top-f.top;if(Math.abs(h)<.5&&Math.abs(C)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${h}px, ${C}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let p=!1,b=null,k=()=>{p||(p=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g),l.style.transition="",l.style.transform="")},g=w=>{w.propertyName==="transform"&&k()};s.set(l,()=>{p=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g)}),l.addEventListener("transitionend",g),b=setTimeout(k,o+n+34),t.add(b)}),e.clear()}}}var br=require("@domphy/core"),Mt=require("@domphy/theme");function nl(r={}){var n;let o=(0,br.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>(0,Mt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Mt.themeColor)(e),color:e=>(0,Mt.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Mt.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}function rl(){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
|