"use strict";var aa=Object.create;var qt=Object.defineProperty;var la=Object.getOwnPropertyDescriptor;var ca=Object.getOwnPropertyNames;var pa=Object.getPrototypeOf,da=Object.prototype.hasOwnProperty;var ma=(e,t)=>{for(var o in t)qt(e,o,{get:t[o],enumerable:!0})},Xr=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ca(t))!da.call(e,n)&&n!==o&&qt(e,n,{get:()=>t[n],enumerable:!(r=la(t,n))||r.enumerable});return e};var ua=(e,t,o)=>(o=e!=null?aa(pa(e)):{},Xr(t||!e||!e.__esModule?qt(o,"default",{value:e,enumerable:!0}):o,e)),fa=e=>Xr(qt({},"__esModule",{value:!0}),e);var Ac={};ma(Ac,{Accordion:()=>ha,AccordionButton:()=>ya,AccordionHeader:()=>va,AccordionItem:()=>Aa,AccordionPanel:()=>Oa,Alert:()=>Ea,AlertDialog:()=>Ia,AlertDialogDescription:()=>La,AlertDialogOverlay:()=>Ma,AlertDialogPanel:()=>Ua,AlertDialogTitle:()=>Ba,AutocompleteStateChild:()=>Tt,Button:()=>O,CheckStateChild:()=>_e,Checkbox:()=>ka,CheckboxDescription:()=>_a,CheckboxIndicator:()=>Xa,CheckboxLabel:()=>wa,ColorSchemeProvider:()=>Na,Combobox:()=>$a,ComboboxInput:()=>Ka,ComboboxLabel:()=>Qa,ComboboxOption:()=>Za,ComboboxOptions:()=>el,Command:()=>rl,CommandBar:()=>cl,CommandBarDescription:()=>pl,CommandBarOverlay:()=>dl,CommandBarPanel:()=>ml,CommandBarTitle:()=>ul,CommandInput:()=>nl,CommandLabel:()=>sl,CommandOption:()=>il,CommandOptions:()=>al,ContextMenu:()=>Sl,ContextMenuBoundary:()=>Cl,ContextMenuOverlay:()=>Pl,ContextMenuPanel:()=>xl,Dialog:()=>bl,DialogDescription:()=>gl,DialogOverlay:()=>hl,DialogPanel:()=>Dl,DialogTitle:()=>yl,Disclosure:()=>Al,DisclosureButton:()=>Ol,DisclosurePanel:()=>Vl,DisclosureStateChild:()=>T,Feed:()=>El,FeedArticle:()=>Rl,FeedArticleDescription:()=>Il,FeedArticleLabel:()=>Ll,FeedContent:()=>Ml,FeedLabel:()=>Ul,Fragment:()=>_r,InputStateChild:()=>sa,Listbox:()=>_l,ListboxButton:()=>Xl,ListboxLabel:()=>wl,ListboxOption:()=>Nl,ListboxOptions:()=>Gl,Menu:()=>Fl,MenuChild:()=>hr,MenuItem:()=>Wl,Popover:()=>ql,PopoverButton:()=>zl,PopoverOverlay:()=>$l,PopoverPanel:()=>Kl,RadioGroup:()=>Yl,RadioGroupDescription:()=>Zl,RadioGroupLabel:()=>ec,RadioGroupOption:()=>tc,Select:()=>nc,SelectOption:()=>sc,SelectOptionStateChild:()=>Be,SelectStateChild:()=>zt,Tab:()=>ic,TabGroup:()=>lc,TabList:()=>cc,TabPanel:()=>pc,Toast:()=>fc,Toaster:()=>Sc,ToasterStore:()=>Lr,Toggle:()=>Tc,ToggleStateChild:()=>Zi,Toolbar:()=>gc,Transition:()=>yc,TransitionChild:()=>ra,createCheckState:()=>mo,createDisclosureState:()=>_,createInputState:()=>na,createMultipleAutocompleteState:()=>xt,createMultipleSelectState:()=>Me,createSelectOptionState:()=>z,createSingleAutocompleteState:()=>Pt,createSingleSelectState:()=>ne,createToggleState:()=>Fo,useAutocompleteState:()=>N,useCheckState:()=>Oe,useColorScheme:()=>Ja,useDisclosureState:()=>x,useInputState:()=>kr,useNativeColorScheme:()=>Ga,usePreferredColorScheme:()=>Fa,useSelectOptionState:()=>ve,useSelectState:()=>Y,useToaster:()=>Cc,useToggleState:()=>Ur});module.exports=fa(Ac);var pe=require("solid-js"),$o=require("solid-use/props");var v=require("solid-js");function P(e,t){if(!e)throw t}function ye(e,t){return e===t||e!==e&&t!==t}function ne(e){let[t,o]=(0,v.createSignal)(),r,n,i=e.by||ye;if("defaultValue"in e){let[a,m]=(0,v.createSignal)(e.defaultValue);r=a,n=S=>{m(()=>S),e.onChange&&e.onChange(S)}}else r=(0,v.createMemo)(()=>e.value),n=a=>{e.onChange&&e.onChange(a)};let s=(0,v.createMemo)(()=>!!e.disabled);return{isSelected(a){return ye(a,r())},select(a){(0,v.untrack)(s)||(e.toggleable&&i((0,v.untrack)(r),a)?n(void 0):n(a))},hasSelected(){return r()!=null},disabled:s,hasActive(){return!!t()},isActive(a){let m=t();return m?i(a,m.value):!1},focus(a){(0,v.untrack)(s)||o({value:a})},blur(){(0,v.untrack)(s)||o(void 0)}}}function Me(e){let[t,o]=(0,v.createSignal)(),r,n,i=e.by||ye;if("defaultValue"in e){let[a,m]=(0,v.createSignal)(e.defaultValue);r=a,n=S=>{m(()=>S),e.onChange&&e.onChange(S)}}else r=(0,v.createMemo)(()=>e.value),n=a=>{e.onChange&&e.onChange(a)};let s=(0,v.createMemo)(()=>!!e.disabled);return{isSelected(a){let m=r();for(let S=0,D=m.length;Sr().length>0),disabled:s,hasActive:(0,v.createMemo)(()=>!!t()),isActive(a){let m=t();return m?i(a,m.value):!1},focus(a){(0,v.untrack)(s)||o({value:a})},blur(){(0,v.untrack)(s)||o(void 0)}}}var wr=(0,v.createContext)();function se(e){return(0,v.createComponent)(wr.Provider,{value:e.state,get children(){let t=e.children;return typeof t=="function"?t(e.state):t}})}function Y(){let e=(0,v.useContext)(wr);return P(e,new Error("Missing ")),e}function zt(e){let t=Y();return(0,v.createMemo)(()=>{let o=e.children;return typeof o=="function"&&o.length===1?(0,v.createMemo)(()=>o(t)):o})}var $t=require("solid-js"),Nr=require("solid-js/web");function c(e,t){return(0,$t.createComponent)(Nr.Dynamic,(0,$t.mergeProps)({get component(){return e()}},t))}var Kt=require("solid-js");function Sa(e){return typeof e=="function"}function u(e){let[t,o]=(0,Kt.createSignal)();return(0,Kt.createEffect)(()=>{let r=t();r&&"ref"in e&&Sa(e.ref)&&e.ref(r)}),[t,o]}function Pe(e){return e?"":void 0}function C(e){return{get disabled(){return e()},get"aria-disabled"(){return e()}}}function ie(e){return{get"aria-expanded"(){return e()}}}function Jr(e){return{get"aria-checked"(){var t;return(t=e())!=null?t:"mixed"}}}function xe(e){return{get"aria-selected"(){return e()}}}function Gr(e){return{get"aria-pressed"(){return e()}}}function p(e){return{get"tc-disabled"(){return Pe(e())}}}function f(e){return{get"tc-expanded"(){return Pe(e())}}}function Te(e){return{get"tc-checked"(){let t=e();return t==null?"mixed":Pe(t)}}}function L(e){return{get"tc-selected"(){return Pe(e())}}}function V(e){return{get"tc-active"(){return Pe(e())}}}function Qt(e){return{get"tc-matches"(){return Pe(e())}}}function b(e){return{get"tc-has-selected"(){return Pe(e())}}}function g(e){return{get"tc-has-active"(){return Pe(e())}}}function q(e){return{get"tc-has-query"(){return Pe(e())}}}function Fr(e){return{get"tc-pressed"(){return Pe(e())}}}var Wr=require("solid-js");function Ca(e,t,o,r){e.addEventListener(t,o,r),(0,Wr.onCleanup)(()=>{e.removeEventListener(t,o,r)})}var l=Ca;var mt=require("solid-js");var Pa='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex]:not([tabindex="-1"]), [contenteditable]';function E(e,t){let o=e.querySelectorAll(Pa),r=[];for(let n=0,i=o.length;n{qo.delete(e)})}function qr(e){for(let t of qo.keys())t(e)}function zr(e){return!e.matches(Yt)}function to(e,t,o,r){let n=t+o;if(r){for(o===1&&n===e.length&&(n=0),o===-1&&n===-1&&(n=e.length-1);t!==n;){if(zr(e[n]))return e[n];n+=o,o===1&&n>=e.length&&(n=0),o===-1&&n<0&&(n=e.length-1)}return}for(;n>=0&&n must be used inside a `)),t}function Qr(){return new I((0,mt.createUniqueId)())}var Yr=d("accordion"),Zr=d("accordion-button"),en=d("accordion-header"),tn=d("accordion-item"),on=d("accordion-panel");function ba(e){return"defaultValue"in e}function ga(e){return!!e.multiple}function ha(e){return(0,pe.createMemo)(()=>{let t=ga(e)?Me(e):ne(e),o=Qr(),[r,n]=u(e);return(0,pe.createEffect)(()=>{let i=r();i instanceof HTMLElement&&(o.setRef(i),(0,pe.onCleanup)(()=>{o.clearRef()}),l(i,"keydown",s=>{if(!t.disabled())switch(s.key){case"ArrowUp":{s.preventDefault(),o.setPrevChecked(!0);break}case"ArrowDown":{s.preventDefault(),o.setNextChecked(!0);break}case"Home":{s.preventDefault(),o.setFirstChecked();break}case"End":{s.preventDefault(),o.setLastChecked();break}default:break}}),l(i,"focusin",s=>{s.target&&s.target!==i&&o.setCurrent(s.target)}))}),(0,pe.createComponent)(zo.Provider,{value:o,get children(){return c(()=>e.as||"div",(0,pe.mergeProps)(ba(e)?(0,$o.omitProps)(e,["as","by","children","defaultValue","disabled","multiple","onChange","ref","toggleable"]):(0,$o.omitProps)(e,["as","by","children","value","disabled","multiple","onChange","ref","toggleable"]),Yr,{ref:n,id:o.getId()},p(()=>t.disabled()),C(()=>t.disabled()),b(()=>t.hasSelected()),g(()=>t.hasActive()),{get children(){return(0,pe.createComponent)(se,{state:t,get children(){return e.children}})}}))}})})}var tt=require("solid-js"),sn=require("solid-use/props");var F=require("solid-js");function z(e){let t=Y(),o=(0,F.createMemo)(()=>e.disabled||t.disabled());return{isSelected:(0,F.createMemo)(()=>t.isSelected(e.value)),isActive:(0,F.createMemo)(()=>t.isActive(e.value)),select(){(0,F.untrack)(o)||t.select(e.value)},focus(){(0,F.untrack)(o)||t.focus(e.value)},blur(){!(0,F.untrack)(o)&&this.isActive()&&t.blur()},disabled:o}}var rn=(0,F.createContext)();function ae(e){return(0,F.createComponent)(rn.Provider,{value:e.state,get children(){let t=e.children;return typeof t=="function"?t(e.state):t}})}function ve(){let e=(0,F.useContext)(rn);return P(e,new Error("Missing ")),e}function Be(e){let t=ve();return(0,F.createMemo)(()=>{let o=e.children;return typeof o=="function"&&o.length===1?(0,F.createMemo)(()=>o(t)):o})}var ro=require("solid-js"),nn=require("solid-use/props");var Da=d("button");function O(e){let[t,o]=u(e);return(0,ro.createEffect)(()=>{let r=t();r instanceof HTMLElement&&r.tagName!=="BUTTON"&&l(r,"keydown",n=>{switch(n.key){case"Enter":case" ":{r.click();break}}})}),c(()=>e.as||"button",(0,ro.mergeProps)({get tabindex(){return e.disabled?-1:0},role:"button"},p(()=>e.disabled),C(()=>e.disabled),(0,nn.omitProps)(e,["as","ref"]),Da,{ref:o}))}var no=require("solid-js");var Ko=(0,no.createContext)();function ut(e){let t=(0,no.useContext)(Ko);return P(t,new Error(`<${e}> must be used inside a `)),t}function ya(e){let t=oo("AccordionButton"),o=ut("AccordionButton"),r=ve(),[n,i]=u(e),s=()=>r.disabled()||e.disabled;return(0,tt.createEffect)(()=>{let a=n();a instanceof HTMLElement&&(l(a,"click",()=>{s()||r.select()}),l(a,"focus",()=>{s()||r.focus()}),l(a,"blur",()=>{s()||r.blur()}))}),(0,tt.createComponent)(O,(0,tt.mergeProps)((0,sn.omitProps)(e,["children","ref","disabled"]),Zr,{id:o.buttonID,ref:i,get"aria-controls"(){return r.isSelected()&&o.panelID}},k(t.getId()),p(s),C(s),L(()=>r.isSelected()),f(()=>r.isSelected()),ie(()=>r.isSelected()),V(()=>r.isActive()),{get children(){return(0,tt.createComponent)(Be,{get children(){return e.children}})}}))}var so=require("solid-js"),an=require("solid-use/props");function va(e){ut("AccordionHeader");let t=ve();return c(()=>e.as||"h3",(0,so.mergeProps)((0,an.omitProps)(e,["as","children"]),en,p(()=>t.disabled()),L(()=>t.isSelected()),f(()=>t.isSelected()),V(()=>t.isActive()),{get children(){return(0,so.createComponent)(Be,{get children(){return e.children}})}}))}var He=require("solid-js"),ln=require("solid-use/props");function Aa(e){oo("AccordionItem");let t=(0,He.createUniqueId)(),o=(0,He.createUniqueId)(),r=z(e);return(0,He.createComponent)(Ko.Provider,{value:{buttonID:t,panelID:o},get children(){return c(()=>e.as||"div",(0,He.mergeProps)((0,ln.omitProps)(e,["as","children","value","disabled"]),tn,p(()=>r.disabled()),C(()=>r.disabled()),L(()=>r.isSelected()),f(()=>r.isSelected()),V(()=>r.isActive()),{get children(){return(0,He.createComponent)(ae,{state:r,get children(){return e.children}})}}))}})}var io=require("solid-js"),cn=require("solid-use/props");var Ae=require("solid-js");function R(e,t,o){let r=(0,Ae.createMemo)(()=>e.unmount==null?!0:e.unmount);return(0,Ae.createMemo)(()=>{let n=r();if(n==="offscreen"){let i=(0,Ae.createMemo)(()=>t()),s=(0,Ae.children)(()=>o());return(0,Ae.createMemo)(()=>i()&&s)}if(n){let i=(0,Ae.createMemo)(()=>t());return(0,Ae.createMemo)(()=>i()&&o)}return o})}function Oa(e){let t=ut("AccordionPanel"),o=ve();return R(e,()=>o.isSelected(),()=>c(()=>e.as||"div",(0,io.mergeProps)((0,cn.omitProps)(e,["as","children","unmount"]),on,{id:t.panelID,"aria-labelledby":t.buttonID},p(()=>o.disabled()),L(()=>o.isSelected()),f(()=>o.isSelected()),V(()=>o.isActive()),{get children(){return(0,io.createComponent)(Be,{get children(){return e.children}})}})))}var ao=require("solid-js"),pn=require("solid-use/props");var Va=d("alert");function Ea(e){let t=(0,ao.createUniqueId)();return c(()=>e.as||"div",(0,ao.mergeProps)({id:t},(0,pn.omitProps)(e,["as"]),Va,{role:"alert"}))}var le=require("solid-js"),er=require("solid-use/props");var B=require("solid-js");function _(e){let t,o;if("defaultOpen"in e){let[n,i]=(0,B.createSignal)(e.defaultOpen);t=n,o=s=>{i(s),s&&e.onOpen&&e.onOpen(),e.onChange&&e.onChange(s),!s&&e.onClose&&e.onClose()}}else t=(0,B.createMemo)(()=>e.isOpen),o=n=>{n&&e.onOpen&&e.onOpen(),e.onChange&&e.onChange(n),!n&&e.onClose&&e.onClose()};let r=(0,B.createMemo)(()=>!!e.disabled);return{isOpen(){return t()},setState(n){(0,B.untrack)(r)||o(n)},disabled:r,open(){(0,B.untrack)(r)||o(!0)},close(){(0,B.untrack)(r)||o(!1)},toggle(){(0,B.untrack)(r)||o(!(0,B.untrack)(t))}}}var dn=(0,B.createContext)();function W(e){return(0,B.createComponent)(dn.Provider,{value:e.state,get children(){let t=e.children;return typeof t=="function"?t(e.state):t}})}function x(){let e=(0,B.useContext)(dn);return P(e,new Error("Missing ")),e}function T(e){let t=x();return(0,B.createMemo)(()=>{let o=e.children;return typeof o=="function"&&o.length===1?(0,B.createMemo)(()=>o(t)):o})}var un=require("solid-js"),fn=require("solid-js/web");function Qo(){let e=window.getSelection();if(e){let t=e.focusNode;if(t)return t.parentElement}}function mn(e){if(e){let t=e.getAttribute("tabindex");e.setAttribute("tabindex","-1"),e.focus(),e.blur(),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}}var Yo=class{constructor(){fn.isServer||(this.returnElement=document.activeElement,this.fsp=Qo(),(0,un.onCleanup)(()=>{this.load()}))}load(){this.returnElement instanceof HTMLElement?this.returnElement.focus():mn(this.fsp)}save(){this.returnElement=document.activeElement,this.fsp=Qo()}};function Z(){return new Yo}var lo=require("solid-js");var Zo=(0,lo.createContext)();function ke(e){let t=(0,lo.useContext)(Zo);return P(t,new Error(`<${e}> must be used inside a `)),t}var Sn=d("alert-dialog"),Cn=d("alert-dialog-description"),Pn=d("alert-dialog-overlay"),xn=d("alert-dialog-panel"),Tn=d("alert-dialog-title");function Ra(e){return"defaultOpen"in e}function Ia(e){let t=(0,le.createUniqueId)(),o=(0,le.createUniqueId)(),r=(0,le.createUniqueId)(),n=(0,le.createUniqueId)(),i=Z(),s=_(e);return(0,le.createEffect)(()=>{s.isOpen()?i.save():i.load()}),(0,le.createComponent)(Zo.Provider,{value:{ownerID:t,panelID:o,titleID:r,descriptionID:n},get children(){return R(e,()=>s.isOpen(),()=>c(()=>e.as||"div",(0,le.mergeProps)(Ra(e)?(0,er.omitProps)(e,["as","children","defaultOpen","disabled","onChange","onClose","onOpen","unmount"]):(0,er.omitProps)(e,["as","children","isOpen","disabled","onChange","onClose","onOpen","unmount"]),Sn,{id:t,role:"alertdialog","aria-modal":!0,"aria-labelledby":r,"aria-describedby":n,get children(){return(0,le.createComponent)(W,{state:s,get children(){return e.children}})}},p(()=>s.disabled()),C(()=>s.disabled()),f(()=>s.isOpen()))))}})}var co=require("solid-js"),bn=require("solid-use/props");function La(e){let t=ke("AlertDialogDescription"),o=x();return c(()=>e.as||"p",(0,co.mergeProps)((0,bn.omitProps)(e,["as","children"]),Cn,{id:t.descriptionID,get children(){return(0,co.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var ft=require("solid-js"),gn=require("solid-use/props");function Ma(e){ke("AlertDialogOverlay");let t=x(),[o,r]=u(e);return(0,ft.createEffect)(()=>{let n=o();n instanceof HTMLElement&&l(n,"click",()=>{t.close()})}),c(()=>e.as||"div",(0,ft.mergeProps)((0,gn.omitProps)(e,["as","children","ref"]),Pn,{ref:r,get children(){return(0,ft.createComponent)(T,{get children(){return e.children}})}},p(()=>t.disabled()),f(()=>t.isOpen())))}var St=require("solid-js"),hn=require("solid-use/props");function Ua(e){let t=ke("AlertDialogPanel"),o=x(),[r,n]=u(e);return(0,St.createEffect)(()=>{let i=r();i instanceof HTMLElement&&o.isOpen()&&(G(E(i),!1),l(i,"keydown",s=>{if(!e.disabled)switch(s.key){case"Tab":{s.preventDefault(),be(i,s.shiftKey,!1);break}case"Escape":{o.close();break}default:break}}))}),c(()=>e.as||"div",(0,St.mergeProps)((0,hn.omitProps)(e,["as","children","ref"]),xn,{id:t.panelID,ref:n,get children(){return(0,St.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var po=require("solid-js"),Dn=require("solid-use/props");function Ba(e){let t=ke("AlertDialogTitle"),o=x();return c(()=>e.as||"h2",(0,po.mergeProps)((0,Dn.omitProps)(e,["as","children"]),Tn,{id:t.titleID,get children(){return(0,po.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var ge=require("solid-js"),or=require("solid-use/props");var M=require("solid-js");function mo(e){let t,o;if("defaultChecked"in e){let[n,i]=(0,M.createSignal)(e.defaultChecked);t=n,o=s=>{i(s),e.onChange&&e.onChange(s)}}else t=(0,M.createMemo)(()=>e.checked),o=n=>{e.onChange&&e.onChange(n)};let r=(0,M.createMemo)(()=>!!e.disabled);return{checked(){return t()},setState(n){(0,M.untrack)(r)||o(n)},disabled:r,check(){(0,M.untrack)(r)||o(!0)},uncheck(){(0,M.untrack)(r)||o(!1)},reset(){(0,M.untrack)(r)||o(void 0)},toggle(){(0,M.untrack)(r)||o(!(0,M.untrack)(t))}}}var yn=(0,M.createContext)();function vn(e){return(0,M.createComponent)(yn.Provider,{value:e.state,get children(){let t=e.children;return typeof t=="function"?t(e.state):t}})}function Oe(){let e=(0,M.useContext)(yn);return P(e,new Error("Missing ")),e}function _e(e){let t=Oe();return(0,M.createMemo)(()=>{let o=e.children;return typeof o=="function"&&o.length===1?(0,M.createMemo)(()=>o(t)):o})}var uo=require("solid-js");var tr=(0,uo.createContext)();function Ct(e){let t=(0,uo.useContext)(tr);return P(t,new Error(`<${e}> must be used inside a `)),t}var An=d("checkbox"),On=d("checkbox-description"),Vn=d("checkbox-indicator"),En=d("checkbox-label");function Ha(e){return"defaultChecked"in e}function ka(e){let t=(0,ge.createUniqueId)(),o=(0,ge.createUniqueId)(),r=(0,ge.createUniqueId)(),n=(0,ge.createUniqueId)(),i=mo(e);return(0,ge.createComponent)(tr.Provider,{value:{ownerID:t,labelID:o,indicatorID:r,descriptionID:n},get children(){return c(()=>e.as||"div",(0,ge.mergeProps)(Ha(e)?(0,or.omitProps)(e,["as","children","defaultChecked","disabled","onChange"]):(0,or.omitProps)(e,["as","children","checked","disabled","onChange"]),An,p(()=>i.disabled()),C(()=>i.disabled()),Te(()=>i.checked()),{get children(){return(0,ge.createComponent)(vn,{state:i,get children(){return e.children}})}}))}})}var fo=require("solid-js"),Rn=require("solid-use/props");function _a(e){let t=Ct("CheckboxDescription"),o=Oe();return c(()=>e.as||"p",(0,fo.mergeProps)((0,Rn.omitProps)(e,["as","children"]),On,{id:t.descriptionID,get children(){return(0,fo.createComponent)(_e,{get children(){return e.children}})}},p(()=>o.disabled()),Te(()=>o.checked())))}var ot=require("solid-js"),In=require("solid-use/props");function Xa(e){let t=Ct("CheckboxIndicator"),o=Oe(),[r,n]=u(e);return(0,ot.createEffect)(()=>{let i=r();i instanceof HTMLElement&&l(i,"click",()=>{o.toggle()})}),(0,ot.createComponent)(O,(0,ot.mergeProps)((0,In.omitProps)(e,["children","ref"]),Vn,{id:t.indicatorID,role:"checkbox","aria-labelledby":t.labelID,"aria-describedby":t.descriptionID,ref:n},p(()=>o.disabled()),C(()=>o.disabled()),Te(()=>o.checked()),{get children(){return(0,ot.createComponent)(_e,{get children(){return e.children}})}}))}var So=require("solid-js"),Ln=require("solid-use/props");function wa(e){let t=Ct("CheckboxLabel"),o=Oe();return c(()=>e.as||"label",(0,So.mergeProps)((0,Ln.omitProps)(e,["as","children"]),En,{id:t.labelID,for:t.indicatorID,get children(){return(0,So.createComponent)(_e,{get children(){return e.children}})}},p(()=>o.disabled()),Te(()=>o.checked())))}var $=require("solid-js"),Un=require("solid-use/media-query"),Bn=ua(require("solid-use/page-visibility"),1);var Hn=(0,$.createContext)(),Mn="theme-preference";function Na(e){let t,o;if("initialValue"in e){let[s,a]=(0,$.createSignal)(e.initialValue);t=s,o=m=>{a(m),e.onChange&&e.onChange(m)}}else t=()=>e.value,o=s=>{e.onChange&&e.onChange(s)};let r=(0,Un.usePrefersDark)(),n=(0,Bn.default)(),i=(0,$.createMemo)(()=>t()==="system"&&r()||t()==="dark");return(0,$.createEffect)(()=>{n();let s=()=>{let a=localStorage.getItem(Mn);o(a||"system")};s(),l(window,"storage",s,!1)}),(0,$.createEffect)(()=>{localStorage.setItem(Mn,t())}),(0,$.createEffect)(()=>{document.documentElement.classList.toggle("dark",i())}),(0,$.createComponent)(Hn.Provider,{value:{get value(){return t()},setValue(s){o(s)},get preferred(){return i()?"dark":"light"},get native(){return r()?"dark":"light"}},get children(){return e.children}})}function rr(){let e=(0,$.useContext)(Hn);return P(e,new Error("Missing ")),e}function Ja(){let e=rr();return[()=>e.value,e.setValue]}function Ga(){let e=rr();return()=>e.native}function Fa(){let e=rr();return()=>e.preferred}var U=require("solid-js"),Jt=require("solid-use/props");var h=require("solid-js");var Co=require("solid-js"),Wa=250;function Po(e=Wa){let t;(0,Co.onCleanup)(()=>{t&&clearTimeout(t)});let[o,r]=(0,Co.createSignal)("");return[o,n=>{t&&clearTimeout(t),t=setTimeout(()=>{r(n)},e)}]}function Pt(e){let[t,o]=(0,h.createSignal)(),r,n,i=e.by||ye;if("defaultValue"in e){let[S,D]=(0,h.createSignal)(e.defaultValue);r=S,n=y=>{D(()=>y),e.onChange&&e.onChange(y)}}else r=(0,h.createMemo)(()=>e.value),n=S=>{e.onChange&&e.onChange(S)};let s=(0,h.createMemo)(()=>!!e.disabled),[a,m]=Po();return{isSelected(S){return ye(S,r())},select(S){(0,h.untrack)(s)||(e.toggleable&&i((0,h.untrack)(r),S)?n(void 0):n(S))},hasSelected(){return r()!=null},disabled:s,hasActive(){return!!t()},isActive(S){let D=t();return D?i(S,D.value):!1},focus(S){(0,h.untrack)(s)||o({value:S})},blur(){(0,h.untrack)(s)||o(void 0)},query(){return a()},setQuery(S){(0,h.untrack)(s)||m(S)},matches(S){return e.matchBy(S,a())},hasQuery:(0,h.createMemo)(()=>!!a())}}function xt(e){let[t,o]=(0,h.createSignal)(),r,n,i=e.by||ye;if("defaultValue"in e){let[S,D]=(0,h.createSignal)(e.defaultValue);r=S,n=y=>{D(()=>y),e.onChange&&e.onChange(y)}}else r=(0,h.createMemo)(()=>e.value),n=S=>{e.onChange&&e.onChange(S)};let s=(0,h.createMemo)(()=>!!e.disabled),[a,m]=Po();return{isSelected(S){let D=r();for(let y=0,A=D.length;yr().length>0),disabled:s,hasActive:(0,h.createMemo)(()=>!!t()),isActive(S){let D=t();return D?i(S,D.value):!1},focus(S){(0,h.untrack)(s)||o({value:S})},blur(){(0,h.untrack)(s)||o(void 0)},query(){return a()},setQuery(S){m(S)},matches(S){return e.matchBy(S,a())},hasQuery:(0,h.createMemo)(()=>!!a())}}var kn=(0,h.createContext)();function xo(e){return(0,h.createComponent)(kn.Provider,{value:e.state,get children(){let t=e.children;return typeof t=="function"?t(e.state):t}})}function N(){let e=(0,h.useContext)(kn);return P(e,new Error("Missing ")),e}function Tt(e){let t=N();return(0,h.createMemo)(()=>{let o=e.children;return typeof o=="function"&&o.length===1?(0,h.createMemo)(()=>o(t)):o})}var bt=require("solid-js");var nr=(0,bt.createContext)();function Xe(e){let t=(0,bt.useContext)(nr);return P(t,new Error(`<${e}> must be used inside a `)),t}function _n(){return new I((0,bt.createUniqueId)(),{virtual:!0,base:Zt})}var Xn=d("combobox"),eu=d("combobox-input"),wn=d("combobox-options"),Nn=d("combobox-option"),Jn=d("combobox-label");function ja(e){return!!e.multiple}function qa(e){return"defaultValue"in e}function Gn(e){return"defaultOpen"in e}function za(e){return qa(e)?Gn(e)?(0,Jt.omitProps)(e,["as","by","children","defaultOpen","defaultValue","disabled","matchBy","multiple","onClose","onDisclosureChange","onOpen","onSelectChange","toggleable"]):(0,Jt.omitProps)(e,["as","by","children","defaultValue","disabled","isOpen","matchBy","multiple","onClose","onDisclosureChange","onOpen","onSelectChange","toggleable"]):Gn(e)?(0,Jt.omitProps)(e,["as","by","children","defaultOpen","disabled","matchBy","multiple","onClose","onDisclosureChange","onOpen","onSelectChange","toggleable","value"]):(0,Jt.omitProps)(e,["as","by","children","disabled","isOpen","matchBy","multiple","onClose","onDisclosureChange","onOpen","onSelectChange","toggleable","value"])}function $a(e){return(0,U.createMemo)(()=>{let t=(0,U.createUniqueId)(),o=(0,U.createUniqueId)(),r=(0,U.createUniqueId)(),n=_((0,U.mergeProps)(e,{onChange(y){e.onDisclosureChange&&e.onDisclosureChange(y)}})),i=ja(e)?xt((0,U.mergeProps)(e,{onChange(y){e.onSelectChange&&e.onSelectChange(y)}})):Pt((0,U.mergeProps)(e,{onChange(y){e.onSelectChange&&e.onSelectChange(y)}})),s=_n(),[a,m]=(0,U.createSignal)(),[S,D]=(0,U.createSignal)(void 0,{equals:!1});return(0,U.createEffect)(()=>{i.hasActive()||m(void 0)}),(0,U.createComponent)(nr.Provider,{value:{get multiple(){return e.multiple},labelID:t,inputID:o,optionsID:r,controller:s,inputHovering:!1,optionsHovering:!1,get activeDescendant(){return a()},set activeDescendant(y){m(y)},get selectedDescendant(){return S()},set selectedDescendant(y){D(y)}},get children(){return(0,U.createComponent)(xo,{state:i,get children(){return(0,U.createComponent)(W,{state:n,get children(){return c(()=>e.as||"div",(0,U.mergeProps)(za(e),Xn,{"aria-labelledby":t,get children(){return e.children}},p(()=>i.disabled()),C(()=>i.disabled()),b(()=>i.hasSelected()),g(()=>i.hasActive()),f(()=>n.isOpen())))}})}})}})})}var we=require("solid-js"),zn=require("solid-use/props");var Fn=d("command"),To=d("command-input"),Wn=d("command-options"),jn=d("command-option"),qn=d("command-label");function Ka(e){let t=Xe("ComboboxInput"),o=N(),r=x(),[n,i]=u(e),s=()=>o.disabled()||e.disabled;return(0,we.createEffect)(()=>{let a=n();a instanceof HTMLElement&&(t.anchor=a,a instanceof HTMLInputElement&&l(a,"input",()=>{s()||o.setQuery(a.value)}),l(a,"keydown",m=>{if(!s())switch(m.key){case"Escape":{r.close();break}case"ArrowUp":{m.preventDefault(),r.isOpen()?t.controller.setPrevChecked(!0):r.open();break}case"ArrowDown":{m.preventDefault(),r.isOpen()?t.controller.setNextChecked(!0):r.open();break}case"Enter":{m.preventDefault(),r.isOpen()&&(t.selectedDescendant=t.activeDescendant);break}default:break}}),l(a,"click",()=>{s()||r.toggle()}),l(a,"blur",m=>{t.optionsHovering||(o.blur(),m.relatedTarget&&a.contains(m.relatedTarget)||r.close())}),l(a,"mouseenter",()=>{t.inputHovering=!0}),l(a,"mouseleave",()=>{t.inputHovering=!1}))}),(0,we.createEffect)(()=>{o.query()!==""&&((0,we.untrack)(()=>r.isOpen())?t.controller.setFirstChecked():r.open())}),(0,we.createEffect)(()=>{if(t.activeDescendant){let a=document.getElementById(t.activeDescendant);a&&t.controller.setCurrent(a)}}),c(()=>e.as||"input",(0,we.mergeProps)((0,zn.omitProps)(e,["as","ref"]),{id:t.inputID,ref:i,type:"text",tabindex:0,role:"combobox","aria-haspopup":"listbox","aria-controls":t.optionsID,"aria-labelledby":t.labelID,get"aria-expanded"(){return r.isOpen()},get"aria-activedescendant"(){return t.activeDescendant}},To,p(s),C(s),f(()=>r.isOpen()),ie(()=>r.isOpen()),b(()=>o.hasSelected()),g(()=>o.hasActive()),q(()=>o.hasQuery())))}var $n=require("solid-js"),Kn=require("solid-use/props");function Qa(e){let t=Xe("ComboboxLabel"),o=N(),r=x();return c(()=>e.as||"label",(0,$n.mergeProps)((0,Kn.omitProps)(e,["as"]),Jn,{id:t.labelID},p(()=>o.disabled()),f(()=>r.isOpen()),b(()=>o.hasSelected()),g(()=>o.hasActive()),q(()=>o.hasQuery())))}var de=require("solid-js"),Qn=require("solid-use/props");var K=require("solid-js");function bo(e){let t=N(),o=(0,K.createMemo)(()=>e.disabled||t.disabled());return{isSelected:(0,K.createMemo)(()=>t.isSelected(e.value)),isActive:(0,K.createMemo)(()=>t.isActive(e.value)),select(){(0,K.untrack)(o)||t.select(e.value)},focus(){(0,K.untrack)(o)||t.focus(e.value)},blur(){!(0,K.untrack)(o)&&this.isActive()&&t.blur()},matches:(0,K.createMemo)(()=>t.matches(e.value)),disabled:o}}var Ya=(0,K.createContext)();function go(e){return(0,K.createComponent)(Ya.Provider,{value:e.state,get children(){let t=e.children;return typeof t=="function"?t(e.state):t}})}function Za(e){let t=Xe("ComboboxOptions"),o=x(),r=bo(e),[n,i]=u(e),s=(0,de.createUniqueId)();(0,de.createEffect)(()=>{!r.disabled()&&t.selectedDescendant===s&&(r.select(),t.multiple||o.close())});function a(){t.activeDescendant=s,r.focus()}return(0,de.createRenderEffect)(()=>{let m=n();m instanceof HTMLElement&&(l(m,"click",()=>{r.disabled()||(r.select(),a(),t.multiple||o.close())}),l(m,"mouseenter",()=>{r.disabled()||a()}),l(m,"mouseleave",()=>{r.blur()}),eo(S=>{S===m&&a()}))}),(0,de.createComponent)(O,(0,de.mergeProps)((0,Qn.omitProps)(e,["as","children","disabled","value","ref"]),Nn,k(t.controller.getId()),{id:s,get as(){return e.as||"li"},role:"option",tabindex:-1,ref:i},p(()=>r.disabled()),C(()=>r.disabled()),L(()=>r.isSelected()),xe(()=>r.isSelected()),V(()=>r.isActive()),Qt(()=>r.matches()),{get children(){return(0,de.createComponent)(go,{state:r,get children(){return e.children}})}}))}var Q=require("solid-js"),Yn=require("solid-use/props");function el(e){let t=Xe("ComboboxOptions"),o=N(),r=x(),[n,i]=u(e);return(0,Q.createEffect)(()=>{let s=n();s instanceof HTMLElement&&(t.controller.setRef(s),(0,Q.onCleanup)(()=>{t.controller.clearRef()}),l(s,"focusin",()=>{t.anchor&&t.anchor.focus()}),l(s,"mouseenter",()=>{t.optionsHovering=!0}),l(s,"mouseleave",()=>{t.optionsHovering=!1}))}),(0,Q.createEffect)(()=>{r.isOpen()||i(void 0)}),(0,Q.onMount)(()=>{(0,Q.createEffect)(()=>{r.isOpen()&&((0,Q.untrack)(()=>o.hasSelected())?t.controller.setFirstChecked(Ue):t.controller.setFirstChecked())})}),R(e,()=>r.isOpen(),()=>c(()=>e.as||"ul",(0,Q.mergeProps)((0,Yn.omitProps)(e,["as","children","ref"]),wn,{id:t.optionsID,role:"listbox","aria-multiselectable":t.multiple,ref:i,"aria-orientation":"vertical",tabindex:-1},p(()=>o.disabled()),C(()=>o.disabled()),f(()=>r.isOpen()),b(()=>o.hasSelected()),g(()=>o.hasActive()),q(()=>o.hasQuery()),{get children(){return(0,Q.createComponent)(Tt,{get children(){return e.children}})}})))}var j=require("solid-js"),ir=require("solid-use/props");var gt=require("solid-js");var sr=(0,gt.createContext)();function Ne(e){let t=(0,gt.useContext)(sr);return P(t,new Error(`<${e}> must be used inside a `)),t}function Zn(){return new I((0,gt.createUniqueId)(),{virtual:!0,base:Zt})}function tl(e){return!!e.multiple}function ol(e){return"defaultValue"in e}function rl(e){return(0,j.createMemo)(()=>{let t=Zn(),o=tl(e)?xt(e):Pt(e),[r,n]=(0,j.createSignal)(),[i,s]=(0,j.createSignal)(void 0,{equals:!1}),a=(0,j.createUniqueId)(),m=(0,j.createUniqueId)(),S=(0,j.createUniqueId)();return(0,j.createEffect)(()=>{o.hasActive()||n(void 0)}),(0,j.createComponent)(sr.Provider,{value:{multiple:!!e.multiple,controller:t,get activeDescendant(){return r()},set activeDescendant(D){n(D)},get selectedDescendant(){return i()},set selectedDescendant(D){s(D)},inputID:a,optionsID:m,labelID:S,optionsHovering:!1},get children(){return c(()=>e.as||"div",(0,j.mergeProps)(ol(e)?(0,ir.omitProps)(e,["as","by","children","defaultValue","disabled","horizontal","multiple","onChange","toggleable"]):(0,ir.omitProps)(e,["as","by","children","value","disabled","horizontal","multiple","onChange","toggleable"]),Fn,{id:t.getId(),"aria-labelledby":S},p(()=>o.disabled()),C(()=>o.disabled()),b(()=>o.hasSelected()),g(()=>o.hasActive()),q(()=>o.hasQuery()),{get children(){return(0,j.createComponent)(xo,{state:o,get children(){return e.children}})}}))}})})}var ht=require("solid-js"),es=require("solid-use/props");function nl(e){let t=Ne("CommandInput"),o=N(),[r,n]=u(e),i=()=>o.disabled()||e.disabled;return(0,ht.createEffect)(()=>{let s=r();s instanceof HTMLElement&&(t.anchor=s,s instanceof HTMLInputElement&&l(s,"input",()=>{i()||o.setQuery(s.value)}),l(s,"keydown",a=>{if(!i())switch(a.key){case"ArrowUp":{a.preventDefault(),t.controller.setPrevChecked(!0);break}case"ArrowDown":{a.preventDefault(),t.controller.setNextChecked(!0);break}case"Enter":{a.preventDefault(),t.selectedDescendant=t.activeDescendant;break}}}),l(s,"focus",()=>{if(t.activeDescendant){let a=document.getElementById(t.activeDescendant);a&&t.controller.setCurrent(a)}else o.hasSelected()?t.controller.setFirstChecked(Ue):t.controller.setFirstChecked()}),l(s,"blur",()=>{t.optionsHovering||o.blur()}))}),(0,ht.createEffect)(()=>{o.query()!==""&&t.controller.setFirstChecked()}),(0,ht.createEffect)(()=>{if(t.activeDescendant){let s=document.getElementById(t.activeDescendant);s&&t.controller.setCurrent(s)}}),c(()=>e.as||"input",(0,ht.mergeProps)((0,es.omitProps)(e,["as","ref"]),{id:t.inputID,ref:n,type:"text",tabindex:0,role:"combobox","aria-controls":t.optionsID,"aria-expanded":!0,get"aria-activedescendant"(){return t.activeDescendant}},To,p(i),C(i),b(()=>o.hasSelected()),g(()=>o.hasActive()),q(()=>o.hasQuery())))}var ts=require("solid-js"),os=require("solid-use/props");function sl(e){let t=Ne("CommandLabel"),o=N();return c(()=>e.as||"label",(0,ts.mergeProps)((0,os.omitProps)(e,["as"]),qn,{id:t.labelID},p(()=>o.disabled()),b(()=>o.hasSelected()),g(()=>o.hasActive()),q(()=>o.hasQuery())))}var he=require("solid-js"),rs=require("solid-use/props");function il(e){let t=Ne("CommandOption"),[o,r]=u(e),n=bo(e),i=(0,he.createUniqueId)();(0,he.createEffect)(()=>{!n.disabled()&&t.selectedDescendant===i&&n.select()});function s(){t.activeDescendant=i,n.focus()}return(0,he.createEffect)(()=>{let a=o();a instanceof HTMLElement&&(l(a,"click",()=>{n.disabled()||(n.select(),s())}),l(a,"mouseenter",()=>{n.disabled()||s()}),l(a,"mouseleave",()=>{n.blur()}),eo(m=>{m===a&&s()}))}),(0,he.createComponent)(O,(0,he.mergeProps)((0,rs.omitProps)(e,["as","children","value","ref"]),jn,k(t.controller.getId()),{id:i,get as(){return e.as||"li"},role:"option",tabindex:-1,ref:r},p(()=>n.disabled()),C(()=>n.disabled()),L(()=>n.isSelected()),xe(()=>n.isSelected()),V(()=>n.isActive()),Qt(()=>n.matches()),{get children(){return(0,he.createComponent)(go,{state:n,get children(){return e.children}})}}))}var Je=require("solid-js"),ns=require("solid-use/props");function al(e){let t=Ne("CommandOptions"),o=N(),[r,n]=u(e);return(0,Je.createEffect)(()=>{let i=r();i instanceof HTMLElement&&(t.controller.setRef(i),(0,Je.onCleanup)(()=>{t.controller.clearRef()}),l(i,"focusin",()=>{t.anchor&&t.anchor.focus()}),l(i,"mouseenter",()=>{t.optionsHovering=!0}),l(i,"mouseleave",()=>{t.optionsHovering=!1}))}),c(()=>e.as||"ul",(0,Je.mergeProps)((0,ns.omitProps)(e,["as","children","ref"]),Wn,{id:t.optionsID,role:"listbox","aria-multiselectable":t.multiple,ref:n,"aria-orientation":"vertical",tabindex:-1},p(()=>o.disabled()),C(()=>o.disabled()),b(()=>o.hasSelected()),g(()=>o.hasActive()),q(()=>o.hasQuery()),{get children(){return(0,Je.createComponent)(Tt,{get children(){return e.children}})}}))}var ee=require("solid-js"),lr=require("solid-use/props");var ho=require("solid-js");var ar=(0,ho.createContext)();function Ge(e){let t=(0,ho.useContext)(ar);return P(t,new Error(`<${e}> must be used inside a `)),t}var ss=d("command-bar"),is=d("command-bar-description"),as=d("command-bar-overlay"),ls=d("command-bar-panel"),cs=d("command-bar-title");function ll(e){return"defaultOpen"in e}function cl(e){let t=(0,ee.createUniqueId)(),o=(0,ee.createUniqueId)(),r=(0,ee.createUniqueId)(),n=(0,ee.createUniqueId)(),i=Z(),s=_(e);return(0,ee.createEffect)(()=>{s.isOpen()?i.save():i.load()}),(0,ee.createEffect)(()=>{l(window,"keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="k"&&!a.defaultPrevented&&(a.preventDefault(),s.open())})}),(0,ee.createComponent)(ar.Provider,{value:{ownerID:t,panelID:o,titleID:r,descriptionID:n},get children(){return R(e,()=>s.isOpen(),()=>c(()=>e.as||"div",(0,ee.mergeProps)(ll(e)?(0,lr.omitProps)(e,["as","children","defaultOpen","disabled","onChange","onClose","onOpen","unmount"]):(0,lr.omitProps)(e,["as","children","isOpen","disabled","onChange","onClose","onOpen","unmount"]),{id:t,role:"dialog","aria-modal":!0,"aria-labelledby":r,"aria-describedby":n},ss,p(()=>s.disabled()),C(()=>s.disabled()),f(()=>s.isOpen()),{get children(){return(0,ee.createComponent)(W,{state:s,get children(){return e.children}})}})))}})}var Do=require("solid-js"),ps=require("solid-use/props");function pl(e){let t=Ge("CommandBarDescription"),o=x();return c(()=>e.as||"p",(0,Do.mergeProps)((0,ps.omitProps)(e,["as","children"]),is,{id:t.descriptionID,get children(){return(0,Do.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var Dt=require("solid-js"),ds=require("solid-use/props");function dl(e){Ge("CommandBarOverlay");let t=x(),[o,r]=u(e);return(0,Dt.createEffect)(()=>{let n=o();n instanceof HTMLElement&&l(n,"click",()=>{t.close()})}),c(()=>e.as||"div",(0,Dt.mergeProps)((0,ds.omitProps)(e,["as","children","ref"]),as,{ref:r,get children(){return(0,Dt.createComponent)(T,{get children(){return e.children}})}},p(()=>t.disabled()),f(()=>t.isOpen())))}var yt=require("solid-js"),ms=require("solid-use/props");function ml(e){let t=Ge("CommandBarPanel"),o=x(),[r,n]=u(e);return(0,yt.createEffect)(()=>{let i=r();i instanceof HTMLElement&&o.isOpen()&&(G(E(i),!1),l(i,"keydown",s=>{if(!e.disabled)switch(s.key){case"Tab":{s.preventDefault(),be(i,s.shiftKey,!1);break}case"Escape":{o.close();break}default:break}}))}),c(()=>e.as||"div",(0,yt.mergeProps)((0,ms.omitProps)(e,["as","children","ref"]),ls,{id:t.panelID,ref:n,get children(){return(0,yt.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var yo=require("solid-js"),us=require("solid-use/props");function ul(e){let t=Ge("CommandBarTitle"),o=x();return c(()=>e.as||"h2",(0,yo.mergeProps)((0,us.omitProps)(e,["as","children"]),cs,{id:t.titleID,get children(){return(0,yo.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var me=require("solid-js"),pr=require("solid-use/props");var vo=require("solid-js");var cr=(0,vo.createContext)();function vt(e){let t=(0,vo.useContext)(cr);return P(t,new Error(`<${e}> must be used inside a `)),t}var fs=d("context-menu"),Ss=d("context-menu-boundary"),Cs=d("context-menu-overlay"),Ps=d("context-menu-panel");function fl(e){return"defaultOpen"in e}function Sl(e){let t=(0,me.createUniqueId)(),o=(0,me.createUniqueId)(),r=(0,me.createUniqueId)(),n=Z(),i=_(e);return(0,me.createEffect)(()=>{i.isOpen()?n.save():n.load()}),(0,me.createComponent)(cr.Provider,{value:{ownerID:t,boundaryID:o,panelID:r},get children(){return c(()=>e.as||"div",(0,me.mergeProps)(fl(e)?(0,pr.omitProps)(e,["as","children","defaultOpen","disabled","onChange","onClose","onOpen"]):(0,pr.omitProps)(e,["as","children","isOpen","disabled","onChange","onClose","onOpen"]),fs,p(()=>i.disabled()),C(()=>i.disabled()),f(()=>i.isOpen()),{get children(){return(0,me.createComponent)(W,{state:i,get children(){return e.children}})}}))}})}var At=require("solid-js"),xs=require("solid-use/props");function Cl(e){let t=vt("ContextMenuBoundary"),o=x(),[r,n]=u(e);return(0,At.createEffect)(()=>{let i=r();i instanceof HTMLElement&&(t.anchor=i,l(i,"contextmenu",s=>{o.disabled()||(s.preventDefault(),o.open())}))}),c(()=>e.as||"div",(0,At.mergeProps)((0,xs.omitProps)(e,["as","children","ref"]),Ss,{id:t.boundaryID,ref:n,get"aria-controls"(){return o.isOpen()&&t.panelID}},p(()=>o.disabled()),C(()=>o.disabled()),f(()=>o.isOpen()),ie(()=>o.isOpen()),{get children(){return(0,At.createComponent)(T,{get children(){return e.children}})}}))}var Ot=require("solid-js"),Ts=require("solid-use/props");function Pl(e){vt("ContextMenuOverlay");let t=x(),[o,r]=u(e);return(0,Ot.createEffect)(()=>{let n=o();n instanceof HTMLElement&&l(n,"click",()=>{t.close()})}),c(()=>e.as||"div",(0,Ot.mergeProps)((0,Ts.omitProps)(e,["as","children","ref"]),Cs,{ref:r,get children(){return(0,Ot.createComponent)(T,{get children(){return e.children}})}},p(()=>t.disabled()),f(()=>t.isOpen())))}var Vt=require("solid-js"),bs=require("solid-use/props");function xl(e){let t=vt("ContextMenuPanel"),o=x(),[r,n]=u(e);return(0,Vt.createEffect)(()=>{let i=r();i instanceof HTMLElement&&o.isOpen()&&(G(E(i),!1),l(i,"keydown",s=>{if(!e.disabled)switch(s.key){case"Tab":{s.preventDefault(),be(i,s.shiftKey,!1);break}case"Escape":{o.close();break}default:break}}),l(document,"click",s=>{i.contains(s.target)||o.close()}))}),R(e,()=>o.isOpen(),()=>c(()=>e.as||"div",(0,Vt.mergeProps)((0,bs.omitProps)(e,["as","unmount","children","ref"]),Ps,{id:t.panelID,ref:n,get children(){return(0,Vt.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen()))))}var ce=require("solid-js"),mr=require("solid-use/props");var Ao=require("solid-js");var dr=(0,Ao.createContext)();function Fe(e){let t=(0,Ao.useContext)(dr);return P(t,new Error(`<${e}> must be used inside a `)),t}var gs=d("dialog"),hs=d("dialog-description"),Ds=d("dialog-overlay"),ys=d("dialog-panel"),vs=d("dialog-title");function Tl(e){return"defaultOpen"in e}function bl(e){let t=(0,ce.createUniqueId)(),o=(0,ce.createUniqueId)(),r=(0,ce.createUniqueId)(),n=(0,ce.createUniqueId)(),i=Z(),s=_(e);return(0,ce.createEffect)(()=>{s.isOpen()?i.save():i.load()}),(0,ce.createComponent)(dr.Provider,{value:{ownerID:t,panelID:o,titleID:r,descriptionID:n},get children(){return R(e,()=>s.isOpen(),()=>c(()=>e.as||"div",(0,ce.mergeProps)(Tl(e)?(0,mr.omitProps)(e,["as","children","defaultOpen","disabled","onChange","onClose","onOpen","unmount"]):(0,mr.omitProps)(e,["as","children","isOpen","disabled","onChange","onClose","onOpen","unmount"]),gs,{id:t,role:"dialog","aria-modal":!0,"aria-labelledby":r,"aria-describedby":n,get children(){return(0,ce.createComponent)(W,{state:s,get children(){return e.children}})}},p(()=>s.disabled()),C(()=>s.disabled()),f(()=>s.isOpen()))))}})}var Oo=require("solid-js"),As=require("solid-use/props");function gl(e){let t=Fe("DialogDescription"),o=x();return c(()=>e.as||"p",(0,Oo.mergeProps)((0,As.omitProps)(e,["as","children"]),hs,{id:t.descriptionID,get children(){return(0,Oo.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var Et=require("solid-js"),Os=require("solid-use/props");function hl(e){Fe("DialogOverlay");let t=x(),[o,r]=u(e);return(0,Et.createEffect)(()=>{let n=o();n instanceof HTMLElement&&l(n,"click",()=>{t.close()})}),c(()=>e.as||"div",(0,Et.mergeProps)((0,Os.omitProps)(e,["as","children","ref"]),Ds,{ref:r,get children(){return(0,Et.createComponent)(T,{get children(){return e.children}})}},p(()=>t.disabled()),f(()=>t.isOpen())))}var Rt=require("solid-js"),Vs=require("solid-use/props");function Dl(e){let t=Fe("DialogPanel"),o=x(),[r,n]=u(e);return(0,Rt.createEffect)(()=>{let i=r();i instanceof HTMLElement&&o.isOpen()&&(G(E(i),!1),l(i,"keydown",s=>{if(!e.disabled)switch(s.key){case"Tab":{s.preventDefault(),be(i,s.shiftKey,!1);break}case"Escape":{o.close();break}default:break}}))}),c(()=>e.as||"div",(0,Rt.mergeProps)((0,Vs.omitProps)(e,["as","children","ref"]),ys,{id:t.panelID,ref:n,get children(){return(0,Rt.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var Vo=require("solid-js"),Es=require("solid-use/props");function yl(e){let t=Fe("DialogTitle"),o=x();return c(()=>e.as||"h2",(0,Vo.mergeProps)((0,Es.omitProps)(e,["as","children"]),vs,{id:t.titleID,get children(){return(0,Vo.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen())))}var Ve=require("solid-js"),fr=require("solid-use/props");var Eo=require("solid-js");var ur=(0,Eo.createContext)();function Ro(e){let t=(0,Eo.useContext)(ur);return P(t,new Error(`<${e}> must be used inside a `)),t}var Rs=d("disclosure"),Is=d("disclosure-button"),Ls=d("disclosure-panel");function vl(e){return"defaultOpen"in e}function Al(e){let t=(0,Ve.createUniqueId)(),o=(0,Ve.createUniqueId)(),r=(0,Ve.createUniqueId)(),n=_(e);return(0,Ve.createComponent)(ur.Provider,{value:{ownerID:t,buttonID:o,panelID:r},get children(){return c(()=>e.as||"div",(0,Ve.mergeProps)(vl(e)?(0,fr.omitProps)(e,["as","children","defaultOpen","disabled","onChange","onClose","onOpen"]):(0,fr.omitProps)(e,["as","children","isOpen","disabled","onChange","onClose","onOpen"]),Rs,p(()=>n.disabled()),C(()=>n.disabled()),f(()=>n.isOpen()),{get children(){return(0,Ve.createComponent)(W,{state:n,get children(){return e.children}})}}))}})}var Io=require("solid-js"),Sr=require("solid-js/web"),Ms=require("solid-use/props");function Ol(e){let t=Ro("DisclosureButton"),o=x(),[r,n]=u(e),i=()=>o.disabled()||e.disabled;return(0,Io.createEffect)(()=>{let s=r();s instanceof HTMLElement&&l(s,"click",()=>{i()||o.toggle()})}),(0,Sr.createComponent)(O,(0,Io.mergeProps)((0,Ms.omitProps)(e,["children","ref"]),Is,{id:t.buttonID,ref:n,get"aria-controls"(){return o.isOpen()&&t.panelID}},p(i),C(i),f(()=>o.isOpen()),ie(()=>o.isOpen()),{get children(){return(0,Sr.createComponent)(T,{get children(){return e.children}})}}))}var Lo=require("solid-js"),Us=require("solid-use/props");function Vl(e){let t=Ro("DisclosurePanel"),o=x();return R(e,()=>o.isOpen(),()=>c(()=>e.as||"div",(0,Lo.mergeProps)((0,Us.omitProps)(e,["as","unmount","children"]),Ls,{id:t.panelID,get children(){return(0,Lo.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen()))))}var We=require("solid-js"),Ns=require("solid-use/props");var Mo=require("solid-js");var Cr=(0,Mo.createContext)();function It(e){let t=(0,Mo.useContext)(Cr);return P(t,new Error(`<${e}> must be used inside a `)),t}var Bs=d("feed"),Hs=d("feed-article"),ks=d("feed-article-description"),_s=d("feed-article-label"),Xs=d("feed-content"),ws=d("feed-label");function El(e){let t=(0,We.createUniqueId)(),o=(0,We.createUniqueId)(),r=(0,We.createUniqueId)(),[n,i]=u(e);return(0,We.createComponent)(Cr.Provider,{value:{ownerID:t,labelID:o,contentID:r,get size(){return e.size},get busy(){return!!e.busy},focusNext(){let s=n();s instanceof HTMLElement&&Ze(E(document.documentElement),s,!1,!1)},focusPrev(){let s=n();s instanceof HTMLElement&&et(E(document.documentElement),s,!1,!1)}},get children(){return c(()=>e.as||"div",(0,We.mergeProps)((0,Ns.omitProps)(e,["as","busy","size"]),Bs,{id:t,ref:i}))}})}var je=require("solid-js"),Js=require("solid-use/props");var Uo=require("solid-js");var Pr=(0,Uo.createContext)();function Bo(e){let t=(0,Uo.useContext)(Pr);return P(t,new Error(`<${e}> must be used inside a `)),t}function Rl(e){let t=It("FeedArticle"),o=(0,je.createUniqueId)(),r=(0,je.createUniqueId)(),n=(0,je.createUniqueId)();return(0,je.createComponent)(Pr.Provider,{value:{ownerID:o,labelID:r,descriptionID:n},get children(){return c(()=>e.as||"article",(0,je.mergeProps)((0,Js.omitProps)(e,["as"]),Hs,k(t.ownerID),{id:o,"aria-labelledby":r,"aria-describedby":n,tabindex:0,get"aria-posinset"(){return e.index+1},get"aria-setsize"(){return t.size}}))}})}var Gs=require("solid-js"),Fs=require("solid-use/props");function Il(e){let t=Bo("FeedArticleDescription");return c(()=>e.as||"p",(0,Gs.mergeProps)((0,Fs.omitProps)(e,["as"]),ks,{id:t.descriptionID}))}var Ws=require("solid-js"),js=require("solid-use/props");function Ll(e){let t=Bo("FeedArticleLabel");return c(()=>e.as||"span",(0,Ws.mergeProps)((0,js.omitProps)(e,["as"]),_s,{id:t.labelID}))}var qe=require("solid-js"),$s=require("solid-use/props");var xr=require("solid-js");var qs=(0,xr.createContext)();function zs(e){return new I(e)}function Ml(e){let t=It("FeedContent"),o=zs(t.ownerID),[r,n]=u(e);return(0,qe.createEffect)(()=>{let i=r();i instanceof HTMLElement&&(o.setRef(i),(0,qe.onCleanup)(()=>{o.clearRef()}),l(i,"keydown",s=>{if(s.ctrlKey)switch(s.key){case"Home":{s.preventDefault(),t.focusPrev();break}case"End":{s.preventDefault(),t.focusNext();break}default:break}switch(s.key){case"PageUp":{s.preventDefault(),o.setPrevChecked(!1);break}case"PageDown":{s.preventDefault(),o.setNextChecked(!1);break}default:break}}),l(i,"focusin",s=>{s.target&&s.target!==i&&o.setCurrent(s.target)}))}),(0,qe.createComponent)(qs.Provider,{value:o,get children(){return c(()=>e.as||"div",(0,qe.mergeProps)((0,$s.omitProps)(e,["as"]),Xs,{id:t.contentID,role:"feed","aria-labelledby":t.labelID,get"aria-busy"(){return t.busy},ref:n}))}})}var Ks=require("solid-js"),Qs=require("solid-use/props");function Ul(e){let t=It("FeedLabel");return c(()=>e.as||"span",(0,Ks.mergeProps)((0,Qs.omitProps)(e,["as"]),ws,{id:t.labelID}))}var X=require("solid-js"),Gt=require("solid-use/props");var Ho=require("solid-js");var Tr=(0,Ho.createContext)();function ze(e){let t=(0,Ho.useContext)(Tr);return P(t,new Error(`<${e}> must be used inside a `)),t}var Ys=d("listbox"),Zs=d("listbox-button"),ei=d("listbox-label"),ti=d("listbox-options"),oi=d("listbox-option");function Bl(e){return!!e.multiple}function Hl(e){return"defaultValue"in e}function ri(e){return"defaultOpen"in e}function kl(e){return Hl(e)?ri(e)?(0,Gt.omitProps)(e,["as","by","children","defaultOpen","defaultValue","disabled","horizontal","multiple","onClose","onDisclosureChange","onOpen","onSelectChange","toggleable"]):(0,Gt.omitProps)(e,["as","by","children","isOpen","defaultValue","disabled","horizontal","multiple","onClose","onDisclosureChange","onOpen","onSelectChange","toggleable"]):ri(e)?(0,Gt.omitProps)(e,["as","by","children","defaultOpen","value","disabled","horizontal","multiple","onClose","onDisclosureChange","onOpen","onSelectChange","toggleable"]):(0,Gt.omitProps)(e,["as","by","children","isOpen","value","disabled","horizontal","multiple","onClose","onDisclosureChange","onOpen","onSelectChange","toggleable"])}function _l(e){return(0,X.createMemo)(()=>{let t=(0,X.createUniqueId)(),o=(0,X.createUniqueId)(),r=(0,X.createUniqueId)(),n=(0,X.createUniqueId)(),i=_((0,X.mergeProps)(e,{onChange(m){e.onDisclosureChange&&e.onDisclosureChange(m)}})),s=Bl(e)?Me((0,X.mergeProps)(e,{onChange(m){e.onSelectChange&&e.onSelectChange(m)}})):ne((0,X.mergeProps)(e,{onChange(m){e.onSelectChange&&e.onSelectChange(m)}})),a=Z();return(0,X.createEffect)(()=>{i.isOpen()?a.save():a.load()}),(0,X.createComponent)(Tr.Provider,{value:{get multiple(){return e.multiple},ownerID:t,labelID:o,buttonID:r,optionsID:n,get horizontal(){return e.horizontal},buttonHovering:!1,optionsHovering:!1},get children(){return(0,X.createComponent)(se,{state:s,get children(){return(0,X.createComponent)(W,{state:i,get children(){return c(()=>e.as||"div",(0,X.mergeProps)(kl(e),Ys,{id:t,"aria-labelledby":o},p(()=>s.disabled()),C(()=>s.disabled()),b(()=>s.hasSelected()),g(()=>s.hasActive()),f(()=>i.isOpen()),{get children(){return e.children}}))}})}})}})})}var rt=require("solid-js"),ni=require("solid-use/props");function Xl(e){let t=ze("ListboxButton"),o=x(),r=Y(),[n,i]=u(e),s=()=>o.disabled()||e.disabled;return(0,rt.createEffect)(()=>{let a=n();a instanceof HTMLElement&&(t.anchor=a,l(a,"click",()=>{s()||o.toggle()}),l(a,"keydown",m=>{if(!s())switch(m.key){case"ArrowUp":case"ArrowDown":{m.preventDefault(),o.toggle();break}}}),l(a,"mouseenter",()=>{t.buttonHovering=!0}),l(a,"mouseleave",()=>{t.buttonHovering=!1}))}),(0,rt.createComponent)(O,(0,rt.mergeProps)((0,ni.omitProps)(e,["children","ref"]),Zs,{id:t.buttonID,"aria-haspopup":"listbox","aria-controls":t.optionsID,ref:i},p(s),C(s),f(()=>o.isOpen()),ie(()=>o.isOpen()),b(()=>r.hasSelected()),g(()=>r.hasActive()),{get children(){return(0,rt.createComponent)(T,{get children(){return e.children}})}}))}var ko=require("solid-js"),si=require("solid-use/props");function wl(e){let t=ze("ListboxLabel"),o=x(),r=Y();return c(()=>e.as||"label",(0,ko.mergeProps)((0,si.omitProps)(e,["as","children"]),ei,{id:t.labelID,get children(){return(0,ko.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen()),b(()=>r.hasSelected()),g(()=>r.hasActive())))}var nt=require("solid-js"),li=require("solid-use/props");var _o=require("solid-js");var br=(0,_o.createContext)();function ii(e){let t=(0,_o.useContext)(br);return P(t,new Error(`<${e}> must be used inside a `)),t}function ai(e){return new I(e)}function Nl(e){let t=ze("ListboxOptions"),o=ii("ListboxOptions"),r=x(),n=z(e),[i,s]=u(e);return(0,nt.createRenderEffect)(()=>{let a=i();a instanceof HTMLElement&&(l(a,"click",()=>{n.disabled()||(n.select(),t.multiple||r.close())}),l(a,"focus",()=>{n.focus()}),l(a,"blur",()=>{n.blur()}),l(a,"mouseenter",()=>{n.disabled()||a.focus({preventScroll:!0})}),l(a,"mouseleave",()=>{n.disabled()||n.blur()}))}),(0,nt.createComponent)(O,(0,nt.mergeProps)((0,li.omitProps)(e,["as","children","disabled","value","ref"]),oi,k(o.getId()),{get as(){return e.as||"li"},role:"option",tabindex:-1,ref:s},p(()=>n.disabled()),C(()=>n.disabled()),L(()=>n.isSelected()),xe(()=>n.isSelected()),V(()=>n.isActive()),{get children(){return(0,nt.createComponent)(ae,{state:n,get children(){return e.children}})}}))}var te=require("solid-js"),pi=require("solid-use/props");var ci=require("solid-js"),Jl=250;function st(e,t=Jl){let o="",r;return(0,ci.onCleanup)(()=>{r&&clearTimeout(r)}),n=>{o+=n,r&&clearTimeout(r),r=setTimeout(()=>{e(o),o=""},t)}}function Gl(e){let t=ze("ListboxOptions"),o=Y(),r=x(),[n,i]=u(e),s=ai(t.optionsID),a=st(m=>{s.setFirstMatch(m)});return(0,te.onMount)(()=>{(0,te.createEffect)(()=>{let m=n();m instanceof HTMLElement&&r.isOpen()&&(s.setRef(m),(0,te.onCleanup)(()=>{s.clearRef()}),(0,te.untrack)(()=>o.hasSelected())?s.setFirstChecked(Ue):s.setFirstChecked(),l(m,"keydown",S=>{if(!o.disabled())switch(S.key){case"Escape":{r.close();break}case"ArrowLeft":{t.horizontal&&(S.preventDefault(),s.setPrevChecked(!0));break}case"ArrowUp":{t.horizontal||(S.preventDefault(),s.setPrevChecked(!0));break}case"ArrowRight":{t.horizontal&&(S.preventDefault(),s.setNextChecked(!0));break}case"ArrowDown":{t.horizontal||(S.preventDefault(),s.setNextChecked(!0));break}case"Home":{S.preventDefault(),s.setFirstChecked();break}case"End":{S.preventDefault(),s.setLastChecked();break}case" ":case"Enter":{S.preventDefault();break}default:{S.key.length===1&&a(S.key);break}}}),l(m,"focusout",S=>{t.buttonHovering||t.optionsHovering||S.relatedTarget&&m.contains(S.relatedTarget)||r.close()}),l(m,"focusin",S=>{S.target&&S.target!==m&&s.setCurrent(S.target)}),l(m,"mouseenter",()=>{t.optionsHovering=!0}),l(m,"mouseleave",()=>{t.optionsHovering=!1}))})}),R(e,()=>r.isOpen(),()=>(0,te.createComponent)(br.Provider,{value:s,get children(){return c(()=>e.as||"ul",(0,te.mergeProps)((0,pi.omitProps)(e,["as","children","ref"]),ti,{id:t.optionsID,role:"listbox","aria-multiselectable":t.multiple,"aria-labelledby":t.buttonID,ref:i,get"aria-orientation"(){return t.horizontal?"horizontal":"vertical"},get tabindex(){return o.disabled()?-1:0}},p(()=>o.disabled()),C(()=>o.disabled()),f(()=>r.isOpen()),b(()=>o.hasSelected()),g(()=>o.hasActive()),{get children(){return(0,te.createComponent)(se,{state:o,get children(){return e.children}})}}))}}))}var $e=require("solid-js"),Si=require("solid-use/props");var Lt=require("solid-js");var gr=(0,Lt.createContext)();function di(e){let t=(0,Lt.useContext)(gr);return P(t,new Error(`<${e}> must be used inside a `)),t}function mi(){return new I((0,Lt.createUniqueId)())}var ui=d("menu"),fi=d("menu-item");function Fl(e){let t=mi(),[o,r]=u(e),n=st(i=>{t.setFirstMatch(i)});return(0,$e.createEffect)(()=>{let i=o();i instanceof HTMLElement&&(t.setRef(i),(0,$e.onCleanup)(()=>{t.clearRef()}),l(i,"keydown",s=>{switch(s.key){case"ArrowUp":case"ArrowLeft":{s.preventDefault(),t.setPrevChecked(!0);break}case"ArrowDown":case"ArrowRight":{s.preventDefault(),t.setNextChecked(!0);break}case"Home":{s.preventDefault(),t.setFirstChecked();break}case"End":{s.preventDefault(),t.setLastChecked();break}case" ":case"Enter":{s.preventDefault();break}default:{s.key.length===1&&n(s.key);break}}}),l(i,"focusin",s=>{s.target&&s.target!==i&&t.setCurrent(s.target)}))}),(0,$e.createComponent)(gr.Provider,{value:t,get children(){return c(()=>e.as||"div",(0,$e.mergeProps)((0,Si.omitProps)(e,["as","ref"]),ui,{id:t.getId(),role:"menu",ref:r}))}})}var Ci=require("solid-js");function hr(e){return(0,Ci.createMemo)(()=>{let t=e.children;return typeof t=="function"?t({disabled:()=>!!e.disabled}):t})}var Ft=require("solid-js"),Pi=require("solid-use/props");function Wl(e){let t=di("MenuItem");return(0,Ft.createComponent)(O,(0,Ft.mergeProps)((0,Pi.omitProps)(e,["as","disabled","ref","children"]),fi,k(t.getId()),{get as(){return e.as||"li"},role:"menuitem",tabindex:-1},p(()=>e.disabled),C(()=>e.disabled),{get children(){return(0,Ft.createComponent)(hr,{get disabled(){return e.disabled},get children(){return e.children}})}}))}var ue=require("solid-js"),yr=require("solid-use/props");var Xo=require("solid-js");var Dr=(0,Xo.createContext)();function Mt(e){let t=(0,Xo.useContext)(Dr);return P(t,new Error(`<${e}> must be used inside a `)),t}var xi=d("popover"),Ti=d("popover-button"),bi=d("popover-overlay"),gi=d("popover-panel");function jl(e){return"defaultOpen"in e}function ql(e){let t=(0,ue.createUniqueId)(),o=(0,ue.createUniqueId)(),r=(0,ue.createUniqueId)(),n=Z(),i=_(e);return(0,ue.createEffect)(()=>{i.isOpen()?n.save():n.load()}),(0,ue.createComponent)(Dr.Provider,{value:{ownerID:t,buttonID:o,panelID:r,hovering:!1},get children(){return c(()=>e.as||"div",(0,ue.mergeProps)(jl(e)?(0,yr.omitProps)(e,["as","children","defaultOpen","disabled","onChange","onClose","onOpen"]):(0,yr.omitProps)(e,["as","children","isOpen","disabled","onChange","onClose","onOpen"]),xi,p(()=>i.disabled()),C(()=>i.disabled()),f(()=>i.isOpen()),{get children(){return(0,ue.createComponent)(W,{state:i,get children(){return e.children}})}}))}})}var it=require("solid-js"),hi=require("solid-use/props");function zl(e){let t=Mt("PopoverButton"),o=x(),[r,n]=u(e),i=()=>o.disabled()||e.disabled;return(0,it.createEffect)(()=>{let s=r();s instanceof HTMLElement&&(t.anchor=s,l(s,"click",()=>{i()||o.toggle()}),l(s,"mouseenter",()=>{t.hovering=!0}),l(s,"mouseleave",()=>{t.hovering=!1}))}),(0,it.createComponent)(O,(0,it.mergeProps)((0,hi.omitProps)(e,["children","ref"]),Ti,{id:t.buttonID,ref:n,get"aria-controls"(){return o.isOpen()&&t.panelID}},p(i),C(i),f(()=>o.isOpen()),ie(()=>o.isOpen()),{get children(){return(0,it.createComponent)(T,{get children(){return e.children}})}}))}var Ut=require("solid-js"),Di=require("solid-use/props");function $l(e){Mt("PopoverOverlay");let t=x(),[o,r]=u(e);return(0,Ut.createEffect)(()=>{let n=o();n instanceof HTMLElement&&l(n,"click",()=>{t.close()})}),c(()=>e.as||"div",(0,Ut.mergeProps)((0,Di.omitProps)(e,["as","children","ref"]),bi,{ref:r,get children(){return(0,Ut.createComponent)(T,{get children(){return e.children}})}},p(()=>t.disabled()),f(()=>t.isOpen())))}var Bt=require("solid-js"),yi=require("solid-use/props");function Kl(e){let t=Mt("PopoverPanel"),o=x(),[r,n]=u(e);return(0,Bt.createEffect)(()=>{let i=r();i instanceof HTMLElement&&o.isOpen()&&(G(E(i),!1),l(i,"keydown",s=>{if(!o.disabled())switch(s.key){case"Tab":{s.preventDefault(),be(i,s.shiftKey,!1);break}case"Escape":{o.close();break}}}),l(i,"focusout",s=>{t.hovering||s.relatedTarget&&i.contains(s.relatedTarget)||o.close()}))}),R(e,()=>o.isOpen(),()=>c(()=>e.as||"div",(0,Bt.mergeProps)((0,yi.omitProps)(e,["as","unmount","children","ref"]),gi,{id:t.panelID,ref:n,get children(){return(0,Bt.createComponent)(T,{get children(){return e.children}})}},p(()=>o.disabled()),f(()=>o.isOpen()))))}var oe=require("solid-js"),Ar=require("solid-use/props");var wo=require("solid-js");var Wt=(0,wo.createContext)();function No(e){let t=(0,wo.useContext)(Wt);return P(t,new Error(`<${e}> must be used inside a or `)),t}var Ht=require("solid-js");var vr=(0,Ht.createContext)();function vi(e){let t=(0,Ht.useContext)(vr);return P(t,new Error(`<${e}> must be used inside a `)),t}function Ai(){return new I((0,Ht.createUniqueId)())}var Oi=d("radio-group"),Vi=d("radio-group-description"),Ei=d("radio-group-label"),Ri=d("radio-group-option");function Ql(e){return"defaultValue"in e}function Yl(e){let t=Ai(),o=(0,oe.createUniqueId)(),r=(0,oe.createUniqueId)(),n=ne(e),[i,s]=u(e);return(0,oe.createEffect)(()=>{let a=i();a instanceof HTMLElement&&(t.setRef(a),(0,oe.onCleanup)(()=>{t.clearRef()}),l(a,"keydown",m=>{if(!n.disabled())switch(m.key){case"ArrowLeft":case"ArrowUp":{m.preventDefault(),t.setPrevChecked(!0);break}case"ArrowRight":case"ArrowDown":{m.preventDefault(),t.setNextChecked(!0);break}}}),l(a,"focusin",m=>{m.target&&m.target!==a&&t.setCurrent(m.target)}))}),(0,oe.createComponent)(vr.Provider,{value:t,get children(){return(0,oe.createComponent)(Wt.Provider,{value:{descriptionID:o,labelID:r},get children(){return c(()=>e.as||"div",(0,oe.mergeProps)(Ql(e)?(0,Ar.omitProps)(e,["as","by","children","defaultValue","disabled","multiple","onChange","ref","toggleable"]):(0,Ar.omitProps)(e,["as","by","children","value","disabled","multiple","onChange","ref","toggleable"]),Oi,{role:"radiogroup","aria-labelledby":r,"aria-describedby":o,ref:s},p(()=>n.disabled()),C(()=>n.disabled()),g(()=>n.hasActive()),b(()=>n.hasSelected()),{get children(){return(0,oe.createComponent)(se,{state:n,get children(){return e.children}})}}))}})}})}var Ii=require("solid-js"),Li=require("solid-use/props");function Zl(e){let t=No("RadioGroupDescription");return c(()=>e.as||"div",(0,Ii.mergeProps)((0,Li.omitProps)(e,["as"]),Vi,{id:t.descriptionID}))}var Mi=require("solid-js"),Ui=require("solid-use/props");function ec(e){let t=No("RadioGroupLabel");return c(()=>e.as||"label",(0,Mi.mergeProps)((0,Ui.omitProps)(e,["as"]),Ei,{id:t.labelID}))}var fe=require("solid-js"),Bi=require("solid-use/props");function tc(e){let t=vi("RadioGroupOption"),o=(0,fe.createUniqueId)(),r=(0,fe.createUniqueId)(),[n,i]=u(e),s=z(e);return(0,fe.createEffect)(()=>{let a=n();a instanceof HTMLElement&&(l(a,"click",()=>{s.select()}),l(a,"focus",()=>{s.focus(),s.select()}),l(a,"blur",()=>{s.blur()}))}),(0,fe.createComponent)(Wt.Provider,{value:{descriptionID:o,labelID:r},get children(){return(0,fe.createComponent)(O,(0,fe.mergeProps)((0,Bi.omitProps)(e,["as","children","value","disabled","ref"]),Ri,k(t.getId()),{get as(){return e.as||"div"},role:"radio","aria-labelledby":r,"aria-describedby":o,ref:i,get tabindex(){let a=s.isSelected();return s.disabled()||!a?-1:0}},p(()=>s.disabled()),C(()=>s.disabled()),Te(()=>s.isSelected()),Jr(()=>s.isSelected()),V(()=>s.isActive()),{get children(){return(0,fe.createComponent)(ae,{state:s,get children(){return e.children}})}}))}})}var Se=require("solid-js"),Vr=require("solid-use/props");var kt=require("solid-js");var Or=(0,kt.createContext)();function Hi(e){let t=(0,kt.useContext)(Or);return P(t,new Error(`<${e}> must be used inside a