@rozenite/tanstack-query-plugin 1.0.0-alpha.3 → 1.0.0-alpha.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.
@@ -1,4 +1,4 @@
1
- var Vi=Object.defineProperty;var Hi=(e,t,n)=>t in e?Vi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var qe=(e,t,n)=>Hi(e,typeof t!="symbol"?t+"":t,n);import{c as ye,a as R,o as Xt,b as B,d as P,e as y,t as q,i as k,f as H,g as D,s as Ln,m as On,h as Je,S as z,j as $e,k as Gi,l as Hn,u as me,n as Ui,p as U,q as St,r as Mt,v as ji,w as Wi,x as un,F as Qi,y as Yi,z as j,$ as Xi,A as Gn,B as Cr,C as Zi,I as Ji,D as Un,E as es,G as ts,M as Mn,H as ns,J as rs,K as jn,L as X,N as He,P as os,O as is,Q as ss,R as as}from"./tanstack-query-D9m62cyc.js";var ls=e=>e!=null,cs=e=>e.filter(ls);function us(e){return(...t)=>{for(const n of e)n&&n(...t)}}var E=e=>typeof e=="function"&&!e.length?e():e,qn=e=>Array.isArray(e)?e:e?[e]:[];function ds(e,...t){return typeof e=="function"?e(...t):e}var fs=U;function gs(e,t,n,r){const o=e.length,s=t.length;let a=0;if(!s){for(;a<o;a++)n(e[a]);return}if(!o){for(;a<s;a++)r(t[a]);return}for(;a<s&&t[a]===e[a];a++);let l,i;t=t.slice(a),e=e.slice(a);for(l of t)e.includes(l)||r(l);for(i of e)t.includes(i)||n(i)}function hs(e){const[t,n]=R(),r=e!=null&&e.throw?(u,f)=>{throw n(u instanceof Error?u:new Error(f)),u}:(u,f)=>{n(u instanceof Error?u:new Error(f))},o=e!=null&&e.api?Array.isArray(e.api)?e.api:[e.api]:[globalThis.localStorage].filter(Boolean),s=e!=null&&e.prefix?`${e.prefix}.`:"",a=new Map,l=new Proxy({},{get(u,f){let d=a.get(f);d||(d=R(void 0,{equals:!1}),a.set(f,d)),d[0]();const v=o.reduce((p,m)=>{if(p!==null||!m)return p;try{return m.getItem(`${s}${f}`)}catch(b){return r(b,`Error reading ${s}${f} from ${m.name}`),null}},null);return v!==null&&(e!=null&&e.deserializer)?e.deserializer(v,f,e.options):v}}),i=(u,f,d)=>{const v=e!=null&&e.serializer?e.serializer(f,u,d??e.options):f,p=`${s}${u}`;o.forEach(b=>{try{b.getItem(p)!==v&&b.setItem(p,v)}catch(w){r(w,`Error setting ${s}${u} to ${v} in ${b.name}`)}});const m=a.get(u);m&&m[1]()},c=u=>o.forEach(f=>{try{f.removeItem(`${s}${u}`)}catch(d){r(d,`Error removing ${s}${u} from ${f.name}`)}}),g=()=>o.forEach(u=>{try{u.clear()}catch(f){r(f,`Error clearing ${u.name}`)}}),h=()=>{const u={},f=(d,v)=>{if(!u.hasOwnProperty(d)){const p=v&&(e!=null&&e.deserializer)?e.deserializer(v,d,e.options):v;p&&(u[d]=p)}};return o.forEach(d=>{if(typeof d.getAll=="function"){let v;try{v=d.getAll()}catch(p){r(p,`Error getting all values from in ${d.name}`)}for(const p of v)f(p,v[p])}else{let v=0,p;try{for(;p=d.key(v++);)u.hasOwnProperty(p)||f(p,d.getItem(p))}catch(m){r(m,`Error getting all values from ${d.name}`)}}}),u};return(e==null?void 0:e.sync)!==!1&&Xt(()=>{const u=f=>{var v;let d=!1;o.forEach(p=>{try{p!==f.storageArea&&f.key&&f.newValue!==p.getItem(f.key)&&(f.newValue?p.setItem(f.key,f.newValue):p.removeItem(f.key),d=!0)}catch(m){r(m,`Error synching api ${p.name} from storage event (${f.key}=${f.newValue})`)}}),d&&f.key&&((v=a.get(f.key))==null||v[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",u),U(()=>globalThis.removeEventListener("storage",u))):(o.forEach(f=>{var d;return(d=f.addEventListener)==null?void 0:d.call(f,"storage",u)}),U(()=>o.forEach(f=>{var d;return(d=f.removeEventListener)==null?void 0:d.call(f,"storage",u)})))}),[l,i,{clear:g,error:t,remove:c,toJSON:h}]}var vs=hs,ys=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),$r=e=>{if(!e)return"";let t="";for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];t+=r instanceof Date?`; ${n}=${r.toUTCString()}`:typeof r=="boolean"?`; ${n}`:`; ${n}=${r}`}return t},Fe=ys({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t;return((t=Fe._cookies[0][Fe._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())??null},setItem:(e,t,n)=>{const r=Fe.getItem(e);Fe._cookies[0][Fe._cookies[1]]=`${e}=${t}${$r(n)}`;const o=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:Fe});window.dispatchEvent(o)},removeItem:e=>{Fe._cookies[0][Fe._cookies[1]]=`${e}=deleted${$r({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return Fe._cookies[0][Fe._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,o)=>(!t&&o&&n++===e&&(t=o),"")),t},get length(){let e=0;return Fe._cookies[0][Fe._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),ms=1024,Ut=796,bs=700,ps="system",ws=500,xs=Object.keys(Ln)[0],Sr=1,Cs=Object.keys(On)[0],ho=ye({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function V(){return me(ho)}var vo=ye(void 0),$s=e=>{const[t,n]=R(null),r=()=>{const a=t();a!=null&&(a.close(),n(null))},o=(a,l)=>{if(t()!=null)return;const i=window.open("","TSQD-Devtools-Panel",`width=${a},height=${l},popup`);if(!i)throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");i.document.head.innerHTML="",i.document.body.innerHTML="",Gi(i.document),i.document.title="TanStack Query Devtools",i.document.body.style.margin="0",i.addEventListener("pagehide",()=>{e.setLocalStore("pip_open","false"),n(null)}),[...(V().shadowDOMTarget||document).styleSheets].forEach(c=>{try{const g=[...c.cssRules].map(d=>d.cssText).join(""),h=document.createElement("style"),u=c.ownerNode;let f="";u&&"id"in u&&(f=u.id),f&&h.setAttribute("id",f),h.textContent=g,i.document.head.appendChild(h)}catch{const h=document.createElement("link");if(c.href==null)return;h.rel="stylesheet",h.type=c.type,h.media=c.media.toString(),h.href=c.href,i.document.head.appendChild(h)}}),Hn(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],i.document),e.setLocalStore("pip_open","true"),n(i)};B(()=>{(e.localStore.pip_open??"false")==="true"&&!e.disabled&&o(Number(window.innerWidth),Number(e.localStore.height||ws))}),B(()=>{const a=(V().shadowDOMTarget||document).querySelector("#_goober"),l=t();if(a&&l){const i=new MutationObserver(()=>{const c=(V().shadowDOMTarget||l.document).querySelector("#_goober");c&&(c.textContent=a.textContent)});i.observe(a,{childList:!0,subtree:!0,characterDataOldValue:!0}),U(()=>{i.disconnect()})}});const s=P(()=>({pipWindow:t(),requestPipWindow:o,closePipWindow:r,disabled:e.disabled??!1}));return y(vo.Provider,{value:s,get children(){return e.children}})},Ss=()=>P(()=>{const t=me(vo);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),yo=ye(()=>"dark");function Se(){return me(yo)}var mo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},ks=Object.keys(mo).join("|"),Es=new RegExp(ks,"g");function Ms(e){return e.replace(Es,t=>mo[t])}var Me={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function kr(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Me.MATCHES,!n.accessors){const a=Er(e,t,n);return{rankedValue:e,rank:a,accessorIndex:-1,accessorThreshold:n.threshold,passed:a>=n.threshold}}const o=Ts(e,n.accessors),s={rankedValue:e,rank:Me.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let a=0;a<o.length;a++){const l=o[a];let i=Er(l.itemValue,t,n);const{minRanking:c,maxRanking:g,threshold:h=n.threshold}=l.attributes;i<c&&i>=Me.MATCHES?i=c:i>g&&(i=g),i=Math.min(i,g),i>=h&&i>s.rank&&(s.rank=i,s.passed=!0,s.accessorIndex=a,s.accessorThreshold=h,s.rankedValue=l.itemValue)}return s}function Er(e,t,n){return e=Mr(e,n),t=Mr(t,n),t.length>e.length?Me.NO_MATCH:e===t?Me.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Me.EQUAL:e.startsWith(t)?Me.STARTS_WITH:e.includes(` ${t}`)?Me.WORD_STARTS_WITH:e.includes(t)?Me.CONTAINS:t.length===1?Me.NO_MATCH:Is(e).includes(t)?Me.ACRONYM:Ds(e,t))}function Is(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function Ds(e,t){let n=0,r=0;function o(i,c,g){for(let h=g,u=c.length;h<u;h++)if(c[h]===i)return n+=1,h+1;return-1}function s(i){const c=1/i,g=n/t.length;return Me.MATCHES+g*c}const a=o(t[0],e,0);if(a<0)return Me.NO_MATCH;r=a;for(let i=1,c=t.length;i<c;i++){const g=t[i];if(r=o(g,e,r),!(r>-1))return Me.NO_MATCH}const l=r-a;return s(l)}function Mr(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=Ms(e)),e}function As(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function Ts(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const s=t[r],a=Ps(s),l=As(e,s);for(let i=0,c=l.length;i<c;i++)n.push({itemValue:l[i],attributes:a})}return n}var Ir={maxRanking:1/0,minRanking:-1/0};function Ps(e){return typeof e=="function"?Ir:{...Ir,...e}}var Ls={data:""},Os=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Ls,qs=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Fs=/\/\*[^]*?\*\/| +/g,Dr=/\n+/g,yt=(e,t)=>{let n="",r="",o="";for(let s in e){let a=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+a+";":r+=s[1]=="f"?yt(a,s):s+"{"+yt(a,s[1]=="k"?"":t)+"}":typeof a=="object"?r+=yt(a,t?t.replace(/([^,])+/g,l=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,i=>/&/.test(i)?i.replace(/&/g,l):l?l+" "+i:i)):s):a!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=yt.p?yt.p(s,a):s+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Ye={},bo=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+bo(e[n]);return t}return e},_s=(e,t,n,r,o)=>{let s=bo(e),a=Ye[s]||(Ye[s]=(i=>{let c=0,g=11;for(;c<i.length;)g=101*g+i.charCodeAt(c++)>>>0;return"go"+g})(s));if(!Ye[a]){let i=s!==e?e:(c=>{let g,h,u=[{}];for(;g=qs.exec(c.replace(Fs,""));)g[4]?u.shift():g[3]?(h=g[3].replace(Dr," ").trim(),u.unshift(u[0][h]=u[0][h]||{})):u[0][g[1]]=g[2].replace(Dr," ").trim();return u[0]})(e);Ye[a]=yt(o?{["@keyframes "+a]:i}:i,n?"":"."+a)}let l=n&&Ye.g?Ye.g:null;return n&&(Ye.g=Ye[a]),((i,c,g,h)=>{h?c.data=c.data.replace(h,i):c.data.indexOf(i)===-1&&(c.data=g?i+c.data:c.data+i)})(Ye[a],t,r,l),a},Rs=(e,t,n)=>e.reduce((r,o,s)=>{let a=t[s];if(a&&a.call){let l=a(n),i=l&&l.props&&l.props.className||/^go/.test(l)&&l;a=i?"."+i:l&&typeof l=="object"?l.props?"":yt(l,""):l===!1?"":l}return r+o+(a??"")},"");function Y(e){let t=this||{},n=e.call?e(t.p):e;return _s(n.unshift?n.raw?Rs(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,Os(t.target),t.g,t.o,t.k)}Y.bind({g:1});Y.bind({k:1});function po(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=po(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function L(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=po(e))&&(r&&(r+=" "),r+=t);return r}function ke(...e){return us(e)}var In=Symbol("fallback");function Ar(e){for(const t of e)t.dispose()}function Ks(e,t,n,r={}){const o=new Map;return U(()=>Ar(o.values())),()=>{const a=e()||[];return a[Xi],Gn(()=>{var g,h;if(!a.length)return Ar(o.values()),o.clear(),r.fallback?[Cr(f=>(o.set(In,{dispose:f}),r.fallback()))]:[];const l=new Array(a.length),i=o.get(In);if(!o.size||i){i==null||i.dispose(),o.delete(In);for(let u=0;u<a.length;u++){const f=a[u],d=t(f,u);s(l,f,u,d)}return l}const c=new Set(o.keys());for(let u=0;u<a.length;u++){const f=a[u],d=t(f,u);c.delete(d);const v=o.get(d);v?(l[u]=v.mapped,(g=v.setIndex)==null||g.call(v,u),v.setItem(()=>f)):s(l,f,u,d)}for(const u of c)(h=o.get(u))==null||h.dispose(),o.delete(u);return l})};function s(a,l,i,c){Cr(g=>{const[h,u]=R(l),f={setItem:u,dispose:g};if(n.length>1){const[d,v]=R(i);f.setIndex=v,f.mapped=n(h,d)}else f.mapped=n(h);o.set(c,f),a[i]=f.mapped})}}function dn(e){const{by:t}=e;return P(Ks(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function zs(e,t,n,r){return e.addEventListener(t,n,r),fs(e.removeEventListener.bind(e,t,n,r))}function Bs(e,t,n,r){const o=()=>{qn(E(e)).forEach(s=>{s&&qn(E(t)).forEach(a=>zs(s,a,n,r))})};typeof e=="function"?B(o):H(o)}function Ns(e,t){const n=new ResizeObserver(e);return U(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function Vs(e,t,n){const r=new WeakMap,{observe:o,unobserve:s}=Ns(a=>{for(const l of a){const{contentRect:i,target:c}=l,g=Math.round(i.width),h=Math.round(i.height),u=r.get(c);(!u||u.width!==g||u.height!==h)&&(t(i,c,l),r.set(c,{width:g,height:h}))}},n);B(a=>{const l=cs(qn(E(e)));return gs(l,a,o,s),l},[])}var Hs=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Tr(e){const t={};let n;for(;n=Hs.exec(e);)t[n[1]]=n[2];return t}function bn(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Tr(e)}else typeof t=="string"&&(t=Tr(t));return{...e,...t}}function Gs(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Fn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Us(e){return typeof e=="number"}function kt(e){return Object.prototype.toString.call(e)==="[object String]"}function js(e){return typeof e=="function"}function Zt(e){return t=>`${e()}-${t}`}function Ke(e,t){return e?e===t||e.contains(t):!1}function Ht(e,t=!1){const{activeElement:n}=je(e);if(!(n!=null&&n.nodeName))return null;if(wo(n)&&n.contentDocument)return Ht(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=je(n).getElementById(r);if(o)return o}}return n}function Ws(e){return je(e).defaultView||window}function je(e){return e?e.ownerDocument||e:document}function wo(e){return e.tagName==="IFRAME"}var Wn=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Wn||{});function Qn(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function pn(){return Qn(/^Mac/i)}function Qs(){return Qn(/^iPhone/i)}function Ys(){return Qn(/^iPad/i)||pn()&&navigator.maxTouchPoints>1}function Xs(){return Qs()||Ys()}function Zs(){return pn()||Xs()}function se(e,t){return t&&(js(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function he(e){return t=>{for(const n of e)se(t,n)}}function Js(e){return pn()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function pe(e){if(e)if(ea())e.focus({preventScroll:!0});else{const t=ta(e);e.focus(),na(t)}}var sn=null;function ea(){if(sn==null){sn=!1;try{document.createElement("div").focus({get preventScroll(){return sn=!0,!0}})}catch{}}return sn}function ta(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function na(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var xo=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],ra=[...xo,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Yn=xo.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",oa=ra.join(':not([hidden]):not([tabindex="-1"]),');function Co(e,t){const r=Array.from(e.querySelectorAll(Yn)).filter(Pr);return t&&Pr(e)&&r.unshift(e),r.forEach((o,s)=>{if(wo(o)&&o.contentDocument){const a=o.contentDocument.body,l=Co(a,!1);r.splice(s,1,...l)}}),r}function Pr(e){return $o(e)&&!ia(e)}function $o(e){return e.matches(Yn)&&Xn(e)}function ia(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function Xn(e,t){return e.nodeName!=="#comment"&&sa(e)&&aa(e,t)&&(!e.parentElement||Xn(e.parentElement,e))}function sa(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:s,visibility:a}=o(e);r=s!=="none"&&a!=="hidden"&&a!=="collapse"}return r}function aa(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function la(e,t,n){const r=t!=null&&t.tabbable?oa:Yn,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var a;return(a=t==null?void 0:t.from)!=null&&a.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Xn(s)&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}function Lr(e){for(;e&&!ca(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function ca(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ua(){}function da(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let a=s,l=0,i=a-1;l<a;i=l++){const[c,g]=t[l],[h,u]=t[i],[,f]=t[i===0?a-1:i-1]||[0,0],d=(g-u)*(n-c)-(c-h)*(r-g);if(u<g){if(r>=u&&r<g){if(d===0)return!0;d>0&&(r===u?r>f&&(o=!o):o=!o)}}else if(g<u){if(r>g&&r<=u){if(d===0)return!0;d<0&&(r===u?r<f&&(o=!o):o=!o)}}else if(r==g&&(n>=h&&n<=c||n>=c&&n<=h))return!0}return o}function Q(e,t){return j(e,t)}var zt=new Map,Or=new Set;function qr(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=zt.get(n.target);r||(r=new Set,zt.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=zt.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),zt.delete(n.target)),zt.size===0)){for(const o of Or)o();Or.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?qr():document.addEventListener("DOMContentLoaded",qr));function _n(e,t){const n=Fr(e,t,"left"),r=Fr(e,t,"top"),o=t.offsetWidth,s=t.offsetHeight;let a=e.scrollLeft,l=e.scrollTop;const i=a+e.offsetWidth,c=l+e.offsetHeight;n<=a?a=n:n+o>i&&(a+=n+o-i),r<=l?l=r:r+s>c&&(l+=r+s-c),e.scrollLeft=a,e.scrollTop=l}function Fr(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function fa(e,t){var n,r;if(document.contains(e)){const o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let a=Lr(e);for(;e&&a&&e!==o&&a!==o;)_n(a,e),e=a,a=Lr(e)}else{const{left:a,top:l}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:i,top:c}=e.getBoundingClientRect();(Math.abs(a-i)>1||Math.abs(l-c)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var So={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function ze(e){return t=>(e(t),()=>e(void 0))}function wn(e,t){const[n,r]=R(_r(t==null?void 0:t()));return B(()=>{var o;r(((o=e())==null?void 0:o.tagName.toLowerCase())||_r(t==null?void 0:t()))}),n}function _r(e){return kt(e)?e:void 0}function ae(e){const[t,n]=X(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return y(is,j(n,{get component(){return t.as}}))}var ga=["id","name","validationState","required","disabled","readOnly"];function ha(e){const t=`form-control-${He()}`,n=Q({id:t},e),[r,o]=R(),[s,a]=R(),[l,i]=R(),[c,g]=R(),h=(v,p,m)=>{const b=m!=null||r()!=null;return[m,r(),b&&p!=null?v:void 0].filter(Boolean).join(" ")||void 0},u=v=>[l(),c(),v].filter(Boolean).join(" ")||void 0,f=P(()=>({"data-valid":E(n.validationState)==="valid"?"":void 0,"data-invalid":E(n.validationState)==="invalid"?"":void 0,"data-required":E(n.required)?"":void 0,"data-disabled":E(n.disabled)?"":void 0,"data-readonly":E(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>E(n.name)??E(n.id),dataset:f,validationState:()=>E(n.validationState),isRequired:()=>E(n.required),isDisabled:()=>E(n.disabled),isReadOnly:()=>E(n.readOnly),labelId:r,fieldId:s,descriptionId:l,errorMessageId:c,getAriaLabelledBy:h,getAriaDescribedBy:u,generateId:Zt(()=>E(n.id)),registerLabel:ze(o),registerField:ze(a),registerDescription:ze(i),registerErrorMessage:ze(g)}}}var ko=ye();function Jt(){const e=me(ko);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Eo(e){const t=Jt(),n=Q({id:t.generateId("description")},e);return B(()=>U(t.registerDescription(n.id))),y(ae,j({as:"div"},()=>t.dataset(),n))}function Mo(e){const t=Jt(),n=Q({id:t.generateId("error-message")},e),[r,o]=X(n,["forceMount"]),s=()=>t.validationState()==="invalid";return B(()=>{s()&&U(t.registerErrorMessage(o.id))}),y(z,{get when(){return r.forceMount||s()},get children(){return y(ae,j({as:"div"},()=>t.dataset(),o))}})}function va(e){let t;const n=Jt(),r=Q({id:n.generateId("label")},e),[o,s]=X(r,["ref"]),a=wn(()=>t,()=>"label");return B(()=>U(n.registerLabel(s.id))),y(ae,j({as:"label",ref(l){const i=ke(c=>t=c,o.ref);typeof i=="function"&&i(l)},get for(){return P(()=>a()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function ya(e,t){B(Je(e,n=>{if(n==null)return;const r=ma(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),U(()=>{r.removeEventListener("reset",t)}))}))}function ma(e){return ba(e)?e.form:e.closest("form")}function ba(e){return e.matches("textarea, input, select, button")}function en(e){var a;const[t,n]=R((a=e.defaultValue)==null?void 0:a.call(e)),r=P(()=>{var l;return((l=e.value)==null?void 0:l.call(e))!==void 0}),o=P(()=>{var l;return r()?(l=e.value)==null?void 0:l.call(e):t()});return[o,l=>{Gn(()=>{var c;const i=ds(l,o());return Object.is(i,o())||(r()||n(i),(c=e.onChange)==null||c.call(e,i)),i})}]}function Io(e){const[t,n]=en(e);return[()=>t()??!1,n]}function pa(e){const[t,n]=en(e);return[()=>t()??[],n]}function wa(e={}){const[t,n]=Io({value:()=>E(e.isSelected),defaultValue:()=>!!E(e.defaultIsSelected),onChange:s=>{var a;return(a=e.onSelectedChange)==null?void 0:a.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!E(e.isReadOnly)&&!E(e.isDisabled)&&n(s)},toggle:()=>{!E(e.isReadOnly)&&!E(e.isDisabled)&&n(!t())}}}var xa=Object.defineProperty,xn=(e,t)=>{for(var n in t)xa(e,n,{get:t[n],enumerable:!0})},Do=ye();function Ao(){return me(Do)}function Ca(){const e=Ao();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function To(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function $a(e,t){var o;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const s=(o=e[r])==null?void 0:o.ref();if(s&&To(s,n))return r+1}return 0}function Sa(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[s,a])=>{const l=o.ref(),i=a.ref();return l===i||!l||!i?0:To(l,i)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function Po(e,t){const n=Sa(e);e!==n&&t(n)}function ka(e){var o,s;const t=e[0],n=(o=e[e.length-1])==null?void 0:o.ref();let r=(s=t==null?void 0:t.ref())==null?void 0:s.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return je(r).body}function Ea(e,t){B(()=>{const n=setTimeout(()=>{Po(e(),t)});U(()=>clearTimeout(n))})}function Ma(e,t){if(typeof IntersectionObserver!="function"){Ea(e,t);return}let n=[];B(()=>{const r=()=>{const a=!!n.length;n=e(),a&&Po(e(),t)},o=ka(e()),s=new IntersectionObserver(r,{root:o});for(const a of e()){const l=a.ref();l&&s.observe(l)}U(()=>s.disconnect())})}function Ia(e={}){const[t,n]=pa({value:()=>E(e.items),onChange:s=>{var a;return(a=e.onItemsChange)==null?void 0:a.call(e,s)}});Ma(t,n);const r=s=>(n(a=>{const l=$a(a,s);return Gs(a,s,l)}),()=>{n(a=>{const l=a.filter(i=>i.ref()!==s.ref());return a.length===l.length?a:l})});return{DomCollectionProvider:s=>y(Do.Provider,{value:{registerItem:r},get children(){return s.children}})}}function Da(e){const t=Ca(),n=Q({shouldRegisterItem:!0},e);B(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());U(r)})}function Lo(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=i=>{if(i==null)return"";const c=e.getKey??"key",g=kt(c)?i[c]:c(i);return g!=null?String(g):""},s=i=>{if(i==null)return"";const c=e.getTextValue??"textValue",g=kt(c)?i[c]:c(i);return g!=null?String(g):""},a=i=>{if(i==null)return!1;const c=e.getDisabled??"disabled";return(kt(c)?i[c]:c(i))??!1},l=i=>{var c;if(i!=null)return kt(e.getSectionChildren)?i[e.getSectionChildren]:(c=e.getSectionChildren)==null?void 0:c.call(e,i)};for(const i of e.dataSource){if(kt(i)||Us(i)){r.push({type:"item",rawValue:i,key:String(i),textValue:String(i),disabled:a(i),level:n,index:t}),t++;continue}if(l(i)!=null){r.push({type:"section",rawValue:i,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=l(i)??[];if(c.length>0){const g=Lo({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...g),t+=g.length}}else r.push({type:"item",rawValue:i,key:o(i),textValue:s(i),disabled:a(i),level:n,index:t}),t++}return r}function Aa(e,t=[]){return P(()=>{const n=Lo({dataSource:E(e.dataSource),getKey:E(e.getKey),getTextValue:E(e.getTextValue),getDisabled:E(e.getDisabled),getSectionChildren:E(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var Ta=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Pa=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function La(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Ta.has(n)}const t=e.split("-")[0];return Pa.has(t)}function Oa(e){return La(e)?"rtl":"ltr"}function Oo(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:Oa(e)}}var Rn=Oo(),Gt=new Set;function Rr(){Rn=Oo();for(const e of Gt)e(Rn)}function qa(){const[e,t]=R(Rn),n=P(()=>e());return Xt(()=>{Gt.size===0&&window.addEventListener("languagechange",Rr),Gt.add(t),U(()=>{Gt.delete(t),Gt.size===0&&window.removeEventListener("languagechange",Rr)})}),{locale:()=>n().locale,direction:()=>n().direction}}var Fa=ye();function ft(){const e=qa();return me(Fa)||e}var Dn=new Map;function _a(e){const{locale:t}=ft(),n=P(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return P(()=>{const r=n();let o;return Dn.has(r)&&(o=Dn.get(r)),o||(o=new Intl.Collator(t(),e),Dn.set(r,o)),o})}var Xe=class qo extends Set{constructor(n,r,o){super(n);qe(this,"anchorKey");qe(this,"currentKey");n instanceof qo?(this.anchorKey=r||n.anchorKey,this.currentKey=o||n.currentKey):(this.anchorKey=r,this.currentKey=o)}};function Ra(e){const[t,n]=en(e);return[()=>t()??new Xe,n]}function Fo(e){return Zs()?e.altKey:e.ctrlKey}function Et(e){return pn()?e.metaKey:e.ctrlKey}function Kr(e){return new Xe(e)}function Ka(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function za(e){const t=Q({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=R(!1),[o,s]=R(),a=P(()=>{const v=E(t.selectedKeys);return v!=null?Kr(v):v}),l=P(()=>{const v=E(t.defaultSelectedKeys);return v!=null?Kr(v):new Xe}),[i,c]=Ra({value:a,defaultValue:l,onChange:v=>{var p;return(p=t.onSelectionChange)==null?void 0:p.call(t,v)}}),[g,h]=R(E(t.selectionBehavior)),u=()=>E(t.selectionMode),f=()=>E(t.disallowEmptySelection)??!1,d=v=>{(E(t.allowDuplicateSelectionEvents)||!Ka(v,i()))&&c(v)};return B(()=>{const v=i();E(t.selectionBehavior)==="replace"&&g()==="toggle"&&typeof v=="object"&&v.size===0&&h("replace")}),B(()=>{h(E(t.selectionBehavior)??"toggle")}),{selectionMode:u,disallowEmptySelection:f,selectionBehavior:g,setSelectionBehavior:h,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:s,selectedKeys:i,setSelectedKeys:d}}function Ba(e){const[t,n]=R(""),[r,o]=R(-1);return{typeSelectHandlers:{onKeyDown:a=>{var u;if(E(e.isDisabled))return;const l=E(e.keyboardDelegate),i=E(e.selectionManager);if(!l.getKeyForSearch)return;const c=Na(a.key);if(!c||a.ctrlKey||a.metaKey)return;c===" "&&t().trim().length>0&&(a.preventDefault(),a.stopPropagation());let g=n(f=>f+c),h=l.getKeyForSearch(g,i.focusedKey())??l.getKeyForSearch(g);h==null&&Va(g)&&(g=g[0],h=l.getKeyForSearch(g,i.focusedKey())??l.getKeyForSearch(g)),h!=null&&(i.setFocusedKey(h),(u=e.onTypeSelect)==null||u.call(e,h)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Na(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Va(e){return e.split("").every(t=>t===e[0])}function Ha(e,t,n){const o=j({selectOnFocus:()=>E(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:a}=ft();let l={top:0,left:0};Bs(()=>E(o.isVirtualized)?void 0:s(),"scroll",()=>{const p=s();p&&(l={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:i}=Ba({isDisabled:()=>E(o.disallowTypeAhead),keyboardDelegate:()=>E(o.keyboardDelegate),selectionManager:()=>E(o.selectionManager)}),c=()=>E(o.orientation)??"vertical",g=p=>{var F,$,I,K,N,ne,Z,le;se(p,i.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const m=t();if(!(m!=null&&m.contains(p.target)))return;const b=E(o.selectionManager),w=E(o.selectOnFocus),x=_=>{_!=null&&(b.setFocusedKey(_),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(_):w&&!Fo(p)&&b.replaceSelection(_))},C=E(o.keyboardDelegate),O=E(o.shouldFocusWrap),T=b.focusedKey();switch(p.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(C.getKeyBelow){p.preventDefault();let _;T!=null?_=C.getKeyBelow(T):_=(F=C.getFirstKey)==null?void 0:F.call(C),_==null&&O&&(_=($=C.getFirstKey)==null?void 0:$.call(C,T)),x(_)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(C.getKeyAbove){p.preventDefault();let _;T!=null?_=C.getKeyAbove(T):_=(I=C.getLastKey)==null?void 0:I.call(C),_==null&&O&&(_=(K=C.getLastKey)==null?void 0:K.call(C,T)),x(_)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(C.getKeyLeftOf){p.preventDefault();const _=a()==="rtl";let W;T!=null?W=C.getKeyLeftOf(T):W=_?(N=C.getFirstKey)==null?void 0:N.call(C):(ne=C.getLastKey)==null?void 0:ne.call(C),x(W)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(C.getKeyRightOf){p.preventDefault();const _=a()==="rtl";let W;T!=null?W=C.getKeyRightOf(T):W=_?(Z=C.getLastKey)==null?void 0:Z.call(C):(le=C.getFirstKey)==null?void 0:le.call(C),x(W)}break}case"Home":if(C.getFirstKey){p.preventDefault();const _=C.getFirstKey(T,Et(p));_!=null&&(b.setFocusedKey(_),Et(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(_):w&&b.replaceSelection(_))}break;case"End":if(C.getLastKey){p.preventDefault();const _=C.getLastKey(T,Et(p));_!=null&&(b.setFocusedKey(_),Et(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(_):w&&b.replaceSelection(_))}break;case"PageDown":if(C.getKeyPageBelow&&T!=null){p.preventDefault();const _=C.getKeyPageBelow(T);x(_)}break;case"PageUp":if(C.getKeyPageAbove&&T!=null){p.preventDefault();const _=C.getKeyPageAbove(T);x(_)}break;case"a":Et(p)&&b.selectionMode()==="multiple"&&E(o.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),E(o.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!E(o.allowsTabNavigation)){if(p.shiftKey)m.focus();else{const _=la(m,{tabbable:!0});let W,J;do J=_.lastChild(),J&&(W=J);while(J);W&&!W.contains(document.activeElement)&&pe(W)}break}}},h=p=>{var x,C;const m=E(o.selectionManager),b=E(o.keyboardDelegate),w=E(o.selectOnFocus);if(m.isFocused()){p.currentTarget.contains(p.target)||m.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(m.setFocused(!0),m.focusedKey()==null){const O=F=>{F!=null&&(m.setFocusedKey(F),w&&m.replaceSelection(F))},T=p.relatedTarget;T&&p.currentTarget.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?O(m.lastSelectedKey()??((x=b.getLastKey)==null?void 0:x.call(b))):O(m.firstSelectedKey()??((C=b.getFirstKey)==null?void 0:C.call(b)))}else if(!E(o.isVirtualized)){const O=s();if(O){O.scrollTop=l.top,O.scrollLeft=l.left;const T=O.querySelector(`[data-key="${m.focusedKey()}"]`);T&&(pe(T),_n(O,T))}}}},u=p=>{const m=E(o.selectionManager);p.currentTarget.contains(p.relatedTarget)||m.setFocused(!1)},f=p=>{s()===p.target&&p.preventDefault()},d=()=>{var O,T;const p=E(o.autoFocus);if(!p)return;const m=E(o.selectionManager),b=E(o.keyboardDelegate);let w;p==="first"&&(w=(O=b.getFirstKey)==null?void 0:O.call(b)),p==="last"&&(w=(T=b.getLastKey)==null?void 0:T.call(b));const x=m.selectedKeys();x.size&&(w=x.values().next().value),m.setFocused(!0),m.setFocusedKey(w);const C=t();C&&w==null&&!E(o.shouldUseVirtualFocus)&&pe(C)};return Xt(()=>{o.deferAutoFocus?setTimeout(d,0):d()}),B(Je([s,()=>E(o.isVirtualized),()=>E(o.selectionManager).focusedKey()],p=>{var x;const[m,b,w]=p;if(b)w&&((x=o.scrollToKey)==null||x.call(o,w));else if(w&&m){const C=m.querySelector(`[data-key="${w}"]`);C&&_n(m,C)}})),{tabIndex:P(()=>{if(!E(o.shouldUseVirtualFocus))return E(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:g,onMouseDown:f,onFocusIn:h,onFocusOut:u}}function _o(e,t){const n=()=>E(e.selectionManager),r=()=>E(e.key),o=()=>E(e.shouldUseVirtualFocus),s=b=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):b!=null&&b.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Et(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},a=()=>n().isSelected(r()),l=()=>E(e.disabled)||n().isDisabled(r()),i=()=>!l()&&n().canSelectItem(r());let c=null;const g=b=>{i()&&(c=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!E(e.shouldSelectOnPressUp)&&s(b))},h=b=>{i()&&b.pointerType==="mouse"&&b.button===0&&E(e.shouldSelectOnPressUp)&&E(e.allowsDifferentPressOrigin)&&s(b)},u=b=>{i()&&(E(e.shouldSelectOnPressUp)&&!E(e.allowsDifferentPressOrigin)||c!=="mouse")&&s(b)},f=b=>{!i()||!["Enter"," "].includes(b.key)||(Fo(b)?n().toggleSelection(r()):s(b))},d=b=>{l()&&b.preventDefault()},v=b=>{const w=t();o()||l()||!w||b.target===w&&n().setFocusedKey(r())},p=P(()=>{if(!(o()||l()))return r()===n().focusedKey()?0:-1}),m=P(()=>E(e.virtualized)?void 0:r());return B(Je([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([b,w,x,C,O])=>{b&&w===C&&O&&!x&&document.activeElement!==b&&(e.focus?e.focus():pe(b))})),{isSelected:a,isDisabled:l,allowsSelection:i,tabIndex:p,dataKey:m,onPointerDown:g,onPointerUp:h,onClick:u,onKeyDown:f,onMouseDown:d,onFocus:v}}var Ga=class{constructor(e,t){qe(this,"collection");qe(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new Xe(n,r,t);for(const s of this.getKeyRange(r,n.currentKey||t))o.delete(s);for(const s of this.getKeyRange(t,r))this.canSelectItem(s)&&o.add(s);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Xe(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Xe([t],t,t):new Xe;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Xe;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Xe)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},zr=class{constructor(e){qe(this,"keyMap",new Map);qe(this,"iterable");qe(this,"firstKey");qe(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function Ua(e){const t=za(e),r=Aa({dataSource:()=>E(e.dataSource),getKey:()=>E(e.getKey),getTextValue:()=>E(e.getTextValue),getDisabled:()=>E(e.getDisabled),getSectionChildren:()=>E(e.getSectionChildren),factory:s=>e.filter?new zr(e.filter(s)):new zr(s)},[()=>e.filter]),o=new Ga(r,t);return ss(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var be=e=>typeof e=="function"?e():e,ja=e=>{const t=P(()=>{const a=be(e.element);if(a)return getComputedStyle(a)}),n=()=>{var a;return((a=t())==null?void 0:a.animationName)??"none"},[r,o]=R(be(e.show)?"present":"hidden");let s="none";return B(a=>{const l=be(e.show);return Gn(()=>{var g;if(a===l)return l;const i=s,c=n();l?o("present"):c==="none"||((g=t())==null?void 0:g.display)==="none"?o("hidden"):o(a===!0&&i!==c?"hiding":"hidden")}),l}),B(()=>{const a=be(e.element);if(!a)return;const l=c=>{c.target===a&&(s=n())},i=c=>{const h=n().includes(c.animationName);c.target===a&&h&&r()==="hiding"&&o("hidden")};a.addEventListener("animationstart",l),a.addEventListener("animationcancel",i),a.addEventListener("animationend",i),U(()=>{a.removeEventListener("animationstart",l),a.removeEventListener("animationcancel",i),a.removeEventListener("animationend",i)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},Wa=ja,Ro=Wa,fn="data-kb-top-layer",Ko,Kn=!1,et=[];function jt(e){return et.findIndex(t=>t.node===e)}function Qa(e){return et[jt(e)]}function Ya(e){return et[et.length-1].node===e}function zo(){return et.filter(e=>e.isPointerBlocking)}function Xa(){return[...zo()].slice(-1)[0]}function Zn(){return zo().length>0}function Bo(e){var n;const t=jt((n=Xa())==null?void 0:n.node);return jt(e)<t}function Za(e){et.push(e)}function Ja(e){const t=jt(e);t<0||et.splice(t,1)}function el(){for(const{node:e}of et)e.style.pointerEvents=Bo(e)?"none":"auto"}function tl(e){if(Zn()&&!Kn){const t=je(e);Ko=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Kn=!0}}function nl(e){if(Zn())return;const t=je(e);t.body.style.pointerEvents=Ko,t.body.style.length===0&&t.body.removeAttribute("style"),Kn=!1}var De={layers:et,isTopMostLayer:Ya,hasPointerBlockingLayer:Zn,isBelowPointerBlockingLayer:Bo,addLayer:Za,removeLayer:Ja,indexOf:jt,find:Qa,assignPointerEventToLayers:el,disableBodyPointerEvents:tl,restoreBodyPointerEvents:nl},rl={};xn(rl,{Button:()=>sl,Root:()=>Jn});var ol=["button","color","file","image","reset","submit"];function il(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?ol.indexOf(e.type)!==-1:!1}function Jn(e){let t;const n=Q({type:"button"},e),[r,o]=X(n,["ref","type","disabled"]),s=wn(()=>t,()=>"button"),a=P(()=>{const c=s();return c==null?!1:il({tagName:c,type:r.type})}),l=P(()=>s()==="input"),i=P(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return y(ae,j({as:"button",ref(c){const g=ke(h=>t=h,r.ref);typeof g=="function"&&g(c)},get type(){return a()||l()?r.type:void 0},get role(){return!a()&&!i()?"button":void 0},get tabIndex(){return!a()&&!i()&&!r.disabled?0:void 0},get disabled(){return a()||l()?r.disabled:void 0},get"aria-disabled"(){return!a()&&!l()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var sl=Jn,al=["top","right","bottom","left"],Ue=Math.min,Te=Math.max,gn=Math.round,an=Math.floor,ct=e=>({x:e,y:e}),ll={left:"right",right:"left",bottom:"top",top:"bottom"},cl={start:"end",end:"start"};function zn(e,t,n){return Te(e,Ue(t,n))}function wt(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function At(e){return e.split("-")[1]}function No(e){return e==="x"?"y":"x"}function er(e){return e==="y"?"height":"width"}function bt(e){return["top","bottom"].includes(ut(e))?"y":"x"}function tr(e){return No(bt(e))}function ul(e,t,n){n===void 0&&(n=!1);const r=At(e),o=tr(e),s=er(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=hn(a)),[a,hn(a)]}function dl(e){const t=hn(e);return[Bn(e),t,Bn(t)]}function Bn(e){return e.replace(/start|end/g,t=>cl[t])}function fl(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function gl(e,t,n,r){const o=At(e);let s=fl(ut(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Bn)))),s}function hn(e){return e.replace(/left|right|bottom|top/g,t=>ll[t])}function hl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vo(e){return typeof e!="number"?hl(e):{top:e,right:e,bottom:e,left:e}}function vn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Br(e,t,n){let{reference:r,floating:o}=e;const s=bt(t),a=tr(t),l=er(a),i=ut(t),c=s==="y",g=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,u=r[l]/2-o[l]/2;let f;switch(i){case"top":f={x:g,y:r.y-o.height};break;case"bottom":f={x:g,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-o.width,y:h};break;default:f={x:r.x,y:r.y}}switch(At(t)){case"start":f[a]-=u*(n&&c?-1:1);break;case"end":f[a]+=u*(n&&c?-1:1);break}return f}var vl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),i=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:h}=Br(c,r,i),u=r,f={},d=0;for(let v=0;v<l.length;v++){const{name:p,fn:m}=l[v],{x:b,y:w,data:x,reset:C}=await m({x:g,y:h,initialPlacement:r,placement:u,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});g=b??g,h=w??h,f={...f,[p]:{...f[p],...x}},C&&d<=50&&(d++,typeof C=="object"&&(C.placement&&(u=C.placement),C.rects&&(c=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:g,y:h}=Br(c,u,i)),v=-1)}return{x:g,y:h,placement:u,strategy:o,middlewareData:f}};async function Wt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:l,strategy:i}=e,{boundary:c="clippingAncestors",rootBoundary:g="viewport",elementContext:h="floating",altBoundary:u=!1,padding:f=0}=wt(t,e),d=Vo(f),p=l[u?h==="floating"?"reference":"floating":h],m=vn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:g,strategy:i})),b=h==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),x=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=vn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:i}):b);return{top:(m.top-C.top+d.top)/x.y,bottom:(C.bottom-m.bottom+d.bottom)/x.y,left:(m.left-C.left+d.left)/x.x,right:(C.right-m.right+d.right)/x.x}}var yl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:l,middlewareData:i}=t,{element:c,padding:g=0}=wt(e,t)||{};if(c==null)return{};const h=Vo(g),u={x:n,y:r},f=tr(o),d=er(f),v=await a.getDimensions(c),p=f==="y",m=p?"top":"left",b=p?"bottom":"right",w=p?"clientHeight":"clientWidth",x=s.reference[d]+s.reference[f]-u[f]-s.floating[d],C=u[f]-s.reference[f],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let T=O?O[w]:0;(!T||!await(a.isElement==null?void 0:a.isElement(O)))&&(T=l.floating[w]||s.floating[d]);const F=x/2-C/2,$=T/2-v[d]/2-1,I=Ue(h[m],$),K=Ue(h[b],$),N=I,ne=T-v[d]-K,Z=T/2-v[d]/2+F,le=zn(N,Z,ne),_=!i.arrow&&At(o)!=null&&Z!==le&&s.reference[d]/2-(Z<N?I:K)-v[d]/2<0,W=_?Z<N?Z-N:Z-ne:0;return{[f]:u[f]+W,data:{[f]:le,centerOffset:Z-le-W,..._&&{alignmentOffset:W}},reset:_}}}),ml=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:l,platform:i,elements:c}=t,{mainAxis:g=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:v=!0,...p}=wt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=ut(o),b=bt(l),w=ut(l)===l,x=await(i.isRTL==null?void 0:i.isRTL(c.floating)),C=u||(w||!v?[hn(l)]:dl(l)),O=d!=="none";!u&&O&&C.push(...gl(l,v,d,x));const T=[l,...C],F=await Wt(t,p),$=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(g&&$.push(F[m]),h){const Z=ul(o,a,x);$.push(F[Z[0]],F[Z[1]])}if(I=[...I,{placement:o,overflows:$}],!$.every(Z=>Z<=0)){var K,N;const Z=(((K=s.flip)==null?void 0:K.index)||0)+1,le=T[Z];if(le)return{data:{index:Z,overflows:I},reset:{placement:le}};let _=(N=I.filter(W=>W.overflows[0]<=0).sort((W,J)=>W.overflows[1]-J.overflows[1])[0])==null?void 0:N.placement;if(!_)switch(f){case"bestFit":{var ne;const W=(ne=I.filter(J=>{if(O){const ce=bt(J.placement);return ce===b||ce==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(ce=>ce>0).reduce((ce,we)=>ce+we,0)]).sort((J,ce)=>J[1]-ce[1])[0])==null?void 0:ne[0];W&&(_=W);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Nr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vr(e){return al.some(t=>e[t]>=0)}var bl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=wt(e,t);switch(r){case"referenceHidden":{const s=await Wt(t,{...o,elementContext:"reference"}),a=Nr(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Vr(a)}}}case"escaped":{const s=await Wt(t,{...o,altBoundary:!0}),a=Nr(s,n.floating);return{data:{escapedOffsets:a,escaped:Vr(a)}}}default:return{}}}}};async function pl(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ut(n),l=At(n),i=bt(n)==="y",c=["left","top"].includes(a)?-1:1,g=s&&i?-1:1,h=wt(t,e);let{mainAxis:u,crossAxis:f,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof d=="number"&&(f=l==="end"?d*-1:d),i?{x:f*g,y:u*c}:{x:u*c,y:f*g}}var wl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:l}=t,i=await pl(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+i.x,y:s+i.y,data:{...i,placement:a}}}}},xl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:p=>{let{x:m,y:b}=p;return{x:m,y:b}}},...i}=wt(e,t),c={x:n,y:r},g=await Wt(t,i),h=bt(ut(o)),u=No(h);let f=c[u],d=c[h];if(s){const p=u==="y"?"top":"left",m=u==="y"?"bottom":"right",b=f+g[p],w=f-g[m];f=zn(b,f,w)}if(a){const p=h==="y"?"top":"left",m=h==="y"?"bottom":"right",b=d+g[p],w=d-g[m];d=zn(b,d,w)}const v=l.fn({...t,[u]:f,[h]:d});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Cl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:a=()=>{},...l}=wt(e,t),i=await Wt(t,l),c=ut(n),g=At(n),h=bt(n)==="y",{width:u,height:f}=r.floating;let d,v;c==="top"||c==="bottom"?(d=c,v=g===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=c,d=g==="end"?"top":"bottom");const p=f-i.top-i.bottom,m=u-i.left-i.right,b=Ue(f-i[d],p),w=Ue(u-i[v],m),x=!t.middlewareData.shift;let C=b,O=w;if(h?O=g||x?Ue(w,m):m:C=g||x?Ue(b,p):p,x&&!g){const F=Te(i.left,0),$=Te(i.right,0),I=Te(i.top,0),K=Te(i.bottom,0);h?O=u-2*(F!==0||$!==0?F+$:Te(i.left,i.right)):C=f-2*(I!==0||K!==0?I+K:Te(i.top,i.bottom))}await a({...t,availableWidth:O,availableHeight:C});const T=await o.getDimensions(s.floating);return u!==T.width||f!==T.height?{reset:{rects:!0}}:{}}}};function Tt(e){return Ho(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(e){var t;return(t=(Ho(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ho(e){return e instanceof Node||e instanceof Pe(e).Node}function Ne(e){return e instanceof Element||e instanceof Pe(e).Element}function We(e){return e instanceof HTMLElement||e instanceof Pe(e).HTMLElement}function Hr(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function tn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $l(e){return["table","td","th"].includes(Tt(e))}function Cn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function nr(e){const t=rr(),n=Ne(e)?Ve(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Sl(e){let t=dt(e);for(;We(t)&&!Dt(t);){if(nr(t))return t;if(Cn(t))return null;t=dt(t)}return null}function rr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Dt(e){return["html","body","#document"].includes(Tt(e))}function Ve(e){return Pe(e).getComputedStyle(e)}function $n(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dt(e){if(Tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hr(e)&&e.host||tt(e);return Hr(t)?t.host:t}function Go(e){const t=dt(e);return Dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&tn(t)?t:Go(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Go(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Pe(o);return s?t.concat(a,a.visualViewport||[],tn(o)?o:[],a.frameElement&&n?Qt(a.frameElement):[]):t.concat(o,Qt(o,[],n))}function Uo(e){const t=Ve(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=We(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=gn(n)!==s||gn(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function or(e){return Ne(e)?e:e.contextElement}function It(e){const t=or(e);if(!We(t))return ct(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Uo(t);let a=(s?gn(n.width):n.width)/r,l=(s?gn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}var kl=ct(0);function jo(e){const t=Pe(e);return!rr()||!t.visualViewport?kl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function El(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function pt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=or(e);let a=ct(1);t&&(r?Ne(r)&&(a=It(r)):a=It(e));const l=El(s,n,r)?jo(s):ct(0);let i=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,g=o.width/a.x,h=o.height/a.y;if(s){const u=Pe(s),f=r&&Ne(r)?Pe(r):r;let d=u,v=d.frameElement;for(;v&&r&&f!==d;){const p=It(v),m=v.getBoundingClientRect(),b=Ve(v),w=m.left+(v.clientLeft+parseFloat(b.paddingLeft))*p.x,x=m.top+(v.clientTop+parseFloat(b.paddingTop))*p.y;i*=p.x,c*=p.y,g*=p.x,h*=p.y,i+=w,c+=x,d=Pe(v),v=d.frameElement}}return vn({width:g,height:h,x:i,y:c})}function Ml(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=tt(r),l=t?Cn(t.floating):!1;if(r===a||l&&s)return n;let i={scrollLeft:0,scrollTop:0},c=ct(1);const g=ct(0),h=We(r);if((h||!h&&!s)&&((Tt(r)!=="body"||tn(a))&&(i=$n(r)),We(r))){const u=pt(r);c=It(r),g.x=u.x+r.clientLeft,g.y=u.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-i.scrollLeft*c.x+g.x,y:n.y*c.y-i.scrollTop*c.y+g.y}}function Il(e){return Array.from(e.getClientRects())}function Wo(e){return pt(tt(e)).left+$n(e).scrollLeft}function Dl(e){const t=tt(e),n=$n(e),r=e.ownerDocument.body,o=Te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Wo(e);const l=-n.scrollTop;return Ve(r).direction==="rtl"&&(a+=Te(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:l}}function Al(e,t){const n=Pe(e),r=tt(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,i=0;if(o){s=o.width,a=o.height;const c=rr();(!c||c&&t==="fixed")&&(l=o.offsetLeft,i=o.offsetTop)}return{width:s,height:a,x:l,y:i}}function Tl(e,t){const n=pt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=We(e)?It(e):ct(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,i=o*s.x,c=r*s.y;return{width:a,height:l,x:i,y:c}}function Gr(e,t,n){let r;if(t==="viewport")r=Al(e,n);else if(t==="document")r=Dl(tt(e));else if(Ne(t))r=Tl(t,n);else{const o=jo(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return vn(r)}function Qo(e,t){const n=dt(e);return n===t||!Ne(n)||Dt(n)?!1:Ve(n).position==="fixed"||Qo(n,t)}function Pl(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(l=>Ne(l)&&Tt(l)!=="body"),o=null;const s=Ve(e).position==="fixed";let a=s?dt(e):e;for(;Ne(a)&&!Dt(a);){const l=Ve(a),i=nr(a);!i&&l.position==="fixed"&&(o=null),(s?!i&&!o:!i&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||tn(a)&&!i&&Qo(e,a))?r=r.filter(g=>g!==a):o=l,a=dt(a)}return t.set(e,r),r}function Ll(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Cn(t)?[]:Pl(t,this._c):[].concat(n),r],l=a[0],i=a.reduce((c,g)=>{const h=Gr(t,g,o);return c.top=Te(h.top,c.top),c.right=Ue(h.right,c.right),c.bottom=Ue(h.bottom,c.bottom),c.left=Te(h.left,c.left),c},Gr(t,l,o));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}}function Ol(e){const{width:t,height:n}=Uo(e);return{width:t,height:n}}function ql(e,t,n){const r=We(t),o=tt(t),s=n==="fixed",a=pt(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const i=ct(0);if(r||!r&&!s)if((Tt(t)!=="body"||tn(o))&&(l=$n(t)),r){const h=pt(t,!0,s,t);i.x=h.x+t.clientLeft,i.y=h.y+t.clientTop}else o&&(i.x=Wo(o));const c=a.left+l.scrollLeft-i.x,g=a.top+l.scrollTop-i.y;return{x:c,y:g,width:a.width,height:a.height}}function An(e){return Ve(e).position==="static"}function Ur(e,t){return!We(e)||Ve(e).position==="fixed"?null:t?t(e):e.offsetParent}function Yo(e,t){const n=Pe(e);if(Cn(e))return n;if(!We(e)){let o=dt(e);for(;o&&!Dt(o);){if(Ne(o)&&!An(o))return o;o=dt(o)}return n}let r=Ur(e,t);for(;r&&$l(r)&&An(r);)r=Ur(r,t);return r&&Dt(r)&&An(r)&&!nr(r)?n:r||Sl(e)||n}var Fl=async function(e){const t=this.getOffsetParent||Yo,n=this.getDimensions,r=await n(e.floating);return{reference:ql(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _l(e){return Ve(e).direction==="rtl"}var Xo={convertOffsetParentRelativeRectToViewportRelativeRect:Ml,getDocumentElement:tt,getClippingRect:Ll,getOffsetParent:Yo,getElementRects:Fl,getClientRects:Il,getDimensions:Ol,getScale:It,isElement:Ne,isRTL:_l};function Rl(e,t){let n=null,r;const o=tt(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,i){l===void 0&&(l=!1),i===void 0&&(i=1),s();const{left:c,top:g,width:h,height:u}=e.getBoundingClientRect();if(l||t(),!h||!u)return;const f=an(g),d=an(o.clientWidth-(c+h)),v=an(o.clientHeight-(g+u)),p=an(c),b={rootMargin:-f+"px "+-d+"px "+-v+"px "+-p+"px",threshold:Te(0,Ue(1,i))||1};let w=!0;function x(C){const O=C[0].intersectionRatio;if(O!==i){if(!w)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(x,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,b)}n.observe(e)}return a(!0),s}function Kl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:i=!1}=r,c=or(e),g=o||s?[...c?Qt(c):[],...Qt(t)]:[];g.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const h=c&&l?Rl(c,n):null;let u=-1,f=null;a&&(f=new ResizeObserver(m=>{let[b]=m;b&&b.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!i&&f.observe(c),f.observe(t));let d,v=i?pt(e):null;i&&p();function p(){const m=pt(e);v&&(m.x!==v.x||m.y!==v.y||m.width!==v.width||m.height!==v.height)&&n(),v=m,d=requestAnimationFrame(p)}return n(),()=>{var m;g.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),h==null||h(),(m=f)==null||m.disconnect(),f=null,i&&cancelAnimationFrame(d)}}var zl=wl,Bl=xl,Nl=ml,Vl=Cl,Hl=bl,Gl=yl,Ul=(e,t,n)=>{const r=new Map,o={platform:Xo,...n},s={...o.platform,_c:r};return vl(e,t,{...o,platform:s})},ir=ye();function sr(){const e=me(ir);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var jl=q('<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),Nn=30,jr=Nn/2,Wl={top:180,right:-90,bottom:0,left:90};function ar(e){const t=sr(),n=Q({size:Nn},e),[r,o]=X(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],a=Ql(t.contentRef),l=()=>{var u;return((u=a())==null?void 0:u.getPropertyValue("background-color"))||"none"},i=()=>{var u;return((u=a())==null?void 0:u.getPropertyValue(`border-${s()}-color`))||"none"},c=()=>{var u;return((u=a())==null?void 0:u.getPropertyValue(`border-${s()}-width`))||"0px"},g=()=>Number.parseInt(c())*2*(Nn/r.size),h=()=>`rotate(${Wl[s()]} ${jr} ${jr}) translate(0 2)`;return y(ae,j({as:"div",ref(u){const f=ke(t.setArrowRef,r.ref);typeof f=="function"&&f(u)},"aria-hidden":"true",get style(){return bn({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:l(),stroke:i(),"stroke-width":g()},r.style)}},o,{get children(){const u=jl(),f=u.firstChild;return H(()=>$e(f,"transform",h())),u}}))}function Ql(e){const[t,n]=R();return B(()=>{const r=e();r&&n(Ws(r).getComputedStyle(r))}),t}function Yl(e){const t=sr(),[n,r]=X(e,["ref","style"]);return y(ae,j({as:"div",ref(o){const s=ke(t.setPositionerRef,n.ref);typeof s=="function"&&s(o)},"data-popper-positioner":"",get style(){return bn({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function Wr(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const s={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...s,toJSON:()=>s}}function Xl(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Wr(r):e?e.getBoundingClientRect():Wr()}}}function Zl(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Jl={top:"bottom",right:"left",bottom:"top",left:"right"};function ec(e,t){const[n,r]=e.split("-"),o=Jl[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function tc(e){const t=Q({getAnchorRect:u=>u==null?void 0:u.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=R(),[o,s]=R(),[a,l]=R(t.placement),i=()=>{var u;return Xl((u=t.anchorRef)==null?void 0:u.call(t),t.getAnchorRect)},{direction:c}=ft();async function g(){var O,T;const u=i(),f=n(),d=o();if(!u||!f)return;const v=((d==null?void 0:d.clientHeight)||0)/2,p=typeof t.gutter=="number"?t.gutter+v:t.gutter??v;f.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),u.getBoundingClientRect();const m=[zl(({placement:F})=>{const $=!!F.split("-")[1];return{mainAxis:p,crossAxis:$?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const F=typeof t.flip=="string"?t.flip.split(" "):void 0;if(F!==void 0&&!F.every(Zl))throw new Error("`flip` expects a spaced-delimited list of placements");m.push(Nl({padding:t.overflowPadding,fallbackPlacements:F}))}(t.slide||t.overlap)&&m.push(Bl({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),m.push(Vl({padding:t.overflowPadding,apply({availableWidth:F,availableHeight:$,rects:I}){const K=Math.round(I.reference.width);F=Math.floor(F),$=Math.floor($),f.style.setProperty("--kb-popper-anchor-width",`${K}px`),f.style.setProperty("--kb-popper-content-available-width",`${F}px`),f.style.setProperty("--kb-popper-content-available-height",`${$}px`),t.sameWidth&&(f.style.width=`${K}px`),t.fitViewport&&(f.style.maxWidth=`${F}px`,f.style.maxHeight=`${$}px`)}})),t.hideWhenDetached&&m.push(Hl({padding:t.detachedPadding})),d&&m.push(Gl({element:d,padding:t.arrowPadding}));const b=await Ul(u,f,{placement:t.placement,strategy:"absolute",middleware:m,platform:{...Xo,isRTL:()=>c()==="rtl"}});if(l(b.placement),(O=t.onCurrentPlacementChange)==null||O.call(t,b.placement),!f)return;f.style.setProperty("--kb-popper-content-transform-origin",ec(b.placement,c()));const w=Math.round(b.x),x=Math.round(b.y);let C;if(t.hideWhenDetached&&(C=(T=b.middlewareData.hide)!=null&&T.referenceHidden?"hidden":"visible"),Object.assign(f.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${x}px, 0)`,visibility:C}),d&&b.middlewareData.arrow){const{x:F,y:$}=b.middlewareData.arrow,I=b.placement.split("-")[0];Object.assign(d.style,{left:F!=null?`${F}px`:"",top:$!=null?`${$}px`:"",[I]:"100%"})}}B(()=>{const u=i(),f=n();if(!u||!f)return;const d=Kl(u,f,g,{elementResize:typeof ResizeObserver=="function"});U(d)}),B(()=>{var d;const u=n(),f=(d=t.contentRef)==null?void 0:d.call(t);!u||!f||queueMicrotask(()=>{u.style.zIndex=getComputedStyle(f).zIndex})});const h={currentPlacement:a,contentRef:()=>{var u;return(u=t.contentRef)==null?void 0:u.call(t)},setPositionerRef:r,setArrowRef:s};return y(ir.Provider,{value:h,get children(){return t.children}})}var Zo=Object.assign(tc,{Arrow:ar,Context:ir,usePopperContext:sr,Positioner:Yl});function nc(e){const t=n=>{var r;n.key===Wn.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};B(()=>{var r;if(E(e.isDisabled))return;const n=((r=e.ownerDocument)==null?void 0:r.call(e))??je();n.addEventListener("keydown",t),U(()=>{n.removeEventListener("keydown",t)})})}var Qr="interactOutside.pointerDownOutside",Yr="interactOutside.focusOutside";function rc(e,t){let n,r=ua;const o=()=>je(t()),s=h=>{var u;return(u=e.onPointerDownOutside)==null?void 0:u.call(e,h)},a=h=>{var u;return(u=e.onFocusOutside)==null?void 0:u.call(e,h)},l=h=>{var u;return(u=e.onInteractOutside)==null?void 0:u.call(e,h)},i=h=>{var f;const u=h.target;return!(u instanceof HTMLElement)||u.closest(`[${fn}]`)||!Ke(o(),u)||Ke(t(),u)?!1:!((f=e.shouldExcludeElement)!=null&&f.call(e,u))},c=h=>{function u(){const f=t(),d=h.target;if(!f||!d||!i(h))return;const v=he([s,l]);d.addEventListener(Qr,v,{once:!0});const p=new CustomEvent(Qr,{bubbles:!1,cancelable:!0,detail:{originalEvent:h,isContextMenu:h.button===2||Js(h)&&h.button===0}});d.dispatchEvent(p)}h.pointerType==="touch"?(o().removeEventListener("click",u),r=u,o().addEventListener("click",u,{once:!0})):u()},g=h=>{const u=t(),f=h.target;if(!u||!f||!i(h))return;const d=he([a,l]);f.addEventListener(Yr,d,{once:!0});const v=new CustomEvent(Yr,{bubbles:!1,cancelable:!0,detail:{originalEvent:h,isContextMenu:!1}});f.dispatchEvent(v)};B(()=>{E(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",g,!0),U(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",g,!0)}))})}var Jo=ye();function oc(){return me(Jo)}function ic(e){let t;const n=oc(),[r,o]=X(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),a=h=>{s.add(h);const u=n==null?void 0:n.registerNestedLayer(h);return()=>{s.delete(h),u==null||u()}};rc({shouldExcludeElement:h=>{var u;return t?((u=r.excludedElements)==null?void 0:u.some(f=>Ke(f(),h)))||[...s].some(f=>Ke(f,h)):!1},onPointerDownOutside:h=>{var u,f,d;!t||De.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!De.isTopMostLayer(t)||((u=r.onPointerDownOutside)==null||u.call(r,h),(f=r.onInteractOutside)==null||f.call(r,h),h.defaultPrevented||(d=r.onDismiss)==null||d.call(r))},onFocusOutside:h=>{var u,f,d;(u=r.onFocusOutside)==null||u.call(r,h),(f=r.onInteractOutside)==null||f.call(r,h),h.defaultPrevented||(d=r.onDismiss)==null||d.call(r)}},()=>t),nc({ownerDocument:()=>je(t),onEscapeKeyDown:h=>{var u;!t||!De.isTopMostLayer(t)||((u=r.onEscapeKeyDown)==null||u.call(r,h),!h.defaultPrevented&&r.onDismiss&&(h.preventDefault(),r.onDismiss()))}}),Xt(()=>{if(!t)return;De.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const h=n==null?void 0:n.registerNestedLayer(t);De.assignPointerEventToLayers(),De.disableBodyPointerEvents(t),U(()=>{t&&(De.removeLayer(t),h==null||h(),De.assignPointerEventToLayers(),De.restoreBodyPointerEvents(t))})}),B(Je([()=>t,()=>r.disableOutsidePointerEvents],([h,u])=>{if(!h)return;const f=De.find(h);f&&f.isPointerBlocking!==u&&(f.isPointerBlocking=u,De.assignPointerEventToLayers()),u&&De.disableBodyPointerEvents(h),U(()=>{De.restoreBodyPointerEvents(h)})},{defer:!0}));const g={registerNestedLayer:a};return y(Jo.Provider,{value:g,get children(){return y(ae,j({as:"div",ref(h){const u=ke(f=>t=f,r.ref);typeof u=="function"&&u(h)}},o))}})}function ei(e={}){const[t,n]=Io({value:()=>E(e.open),defaultValue:()=>!!E(e.defaultOpen),onChange:a=>{var l;return(l=e.onOpenChange)==null?void 0:l.call(e,a)}}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var Re={};xn(Re,{Description:()=>Eo,ErrorMessage:()=>Mo,Item:()=>oi,ItemControl:()=>ii,ItemDescription:()=>si,ItemIndicator:()=>ai,ItemInput:()=>li,ItemLabel:()=>ci,Label:()=>ui,RadioGroup:()=>sc,Root:()=>di});var ti=ye();function ni(){const e=me(ti);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var ri=ye();function nn(){const e=me(ri);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function oi(e){const t=Jt(),n=ni(),r=`${t.generateId("item")}-${He()}`,o=Q({id:r},e),[s,a]=X(o,["value","disabled","onPointerDown"]),[l,i]=R(),[c,g]=R(),[h,u]=R(),[f,d]=R(),[v,p]=R(!1),m=P(()=>n.isSelectedValue(s.value)),b=P(()=>s.disabled||t.isDisabled()||!1),w=O=>{se(O,s.onPointerDown),v()&&O.preventDefault()},x=P(()=>({...t.dataset(),"data-disabled":b()?"":void 0,"data-checked":m()?"":void 0})),C={value:()=>s.value,dataset:x,isSelected:m,isDisabled:b,inputId:l,labelId:c,descriptionId:h,inputRef:f,select:()=>n.setSelectedValue(s.value),generateId:Zt(()=>a.id),registerInput:ze(i),registerLabel:ze(g),registerDescription:ze(u),setIsFocused:p,setInputRef:d};return y(ri.Provider,{value:C,get children(){return y(ae,j({as:"div",role:"group",onPointerDown:w},x,a))}})}function ii(e){const t=nn(),n=Q({id:t.generateId("control")},e),[r,o]=X(n,["onClick","onKeyDown"]);return y(ae,j({as:"div",onClick:l=>{var i;se(l,r.onClick),t.select(),(i=t.inputRef())==null||i.focus()},onKeyDown:l=>{var i;se(l,r.onKeyDown),l.key===Wn.Space&&(t.select(),(i=t.inputRef())==null||i.focus())}},()=>t.dataset(),o))}function si(e){const t=nn(),n=Q({id:t.generateId("description")},e);return B(()=>U(t.registerDescription(n.id))),y(ae,j({as:"div"},()=>t.dataset(),n))}function ai(e){const t=nn(),n=Q({id:t.generateId("indicator")},e),[r,o]=X(n,["ref","forceMount"]),[s,a]=R(),{present:l}=Ro({show:()=>r.forceMount||t.isSelected(),element:()=>s()??null});return y(z,{get when(){return l()},get children(){return y(ae,j({as:"div",ref(i){const c=ke(a,r.ref);typeof c=="function"&&c(i)}},()=>t.dataset(),o))}})}function li(e){const t=Jt(),n=ni(),r=nn(),o=Q({id:r.generateId("input")},e),[s,a]=X(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),l=()=>[s["aria-labelledby"],r.labelId(),s["aria-labelledby"]!=null&&a["aria-label"]!=null?a.id:void 0].filter(Boolean).join(" ")||void 0,i=()=>[s["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,g]=R(!1),h=d=>{if(se(d,s.onChange),d.stopPropagation(),!c()){n.setSelectedValue(r.value());const v=d.target;v.checked=r.isSelected()}g(!1)},u=d=>{se(d,s.onFocus),r.setIsFocused(!0)},f=d=>{se(d,s.onBlur),r.setIsFocused(!1)};return B(Je([()=>r.isSelected(),()=>r.value()],d=>{if(!d[0]&&d[1]===r.value())return;g(!0);const v=r.inputRef();v==null||v.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),v==null||v.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),B(()=>U(r.registerInput(a.id))),y(ae,j({as:"input",ref(d){const v=ke(r.setInputRef,s.ref);typeof v=="function"&&v(d)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return bn({...So},s.style)},get"aria-labelledby"(){return l()},get"aria-describedby"(){return i()},onChange:h,onFocus:u,onBlur:f},()=>r.dataset(),a))}function ci(e){const t=nn(),n=Q({id:t.generateId("label")},e);return B(()=>U(t.registerLabel(n.id))),y(ae,j({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function ui(e){return y(va,j({as:"span"},e))}function di(e){let t;const n=`radiogroup-${He()}`,r=Q({id:n,orientation:"vertical"},e),[o,s,a]=X(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],ga),[l,i]=en({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:d=>{var v;return(v=o.onChange)==null?void 0:v.call(o,d)}}),{formControlContext:c}=ha(s);ya(()=>t,()=>i(o.defaultValue??""));const g=()=>c.getAriaLabelledBy(E(s.id),a["aria-label"],o["aria-labelledby"]),h=()=>c.getAriaDescribedBy(o["aria-describedby"]),u=d=>d===l(),f={ariaDescribedBy:h,isSelectedValue:u,setSelectedValue:d=>{if(!(c.isReadOnly()||c.isDisabled())&&(i(d),t))for(const v of t.querySelectorAll("[type='radio']")){const p=v;p.checked=u(p.value)}}};return y(ko.Provider,{value:c,get children(){return y(ti.Provider,{value:f,get children(){return y(ae,j({as:"div",ref(d){const v=ke(p=>t=p,o.ref);typeof v=="function"&&v(d)},role:"radiogroup",get id(){return E(s.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return g()},get"aria-describedby"(){return h()}},()=>c.dataset(),a))}})}})}var sc=Object.assign(di,{Description:Eo,ErrorMessage:Mo,Item:oi,ItemControl:ii,ItemDescription:si,ItemIndicator:ai,ItemInput:li,ItemLabel:ci,Label:ui}),ac=class{constructor(e,t,n){qe(this,"collection");qe(this,"ref");qe(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n;return((n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))??null}getKeyPageAbove(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){var o;const n=(o=this.collator)==null?void 0:o.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const s=this.collection().getItem(r);if(s){const a=s.textValue.slice(0,e.length);if(s.textValue&&n.compare(a,e)===0)return r}r=this.getKeyBelow(r)}}};function lc(e,t,n){const r=_a({usage:"search",sensitivity:"base"}),o=P(()=>{const s=E(e.keyboardDelegate);return s||new ac(e.collection,t,r)});return Ha({selectionManager:()=>E(e.selectionManager),keyboardDelegate:o,autoFocus:()=>E(e.autoFocus),deferAutoFocus:()=>E(e.deferAutoFocus),shouldFocusWrap:()=>E(e.shouldFocusWrap),disallowEmptySelection:()=>E(e.disallowEmptySelection),selectOnFocus:()=>E(e.selectOnFocus),disallowTypeAhead:()=>E(e.disallowTypeAhead),shouldUseVirtualFocus:()=>E(e.shouldUseVirtualFocus),allowsTabNavigation:()=>E(e.allowsTabNavigation),isVirtualized:()=>E(e.isVirtualized),scrollToKey:s=>{var a;return(a=E(e.scrollToKey))==null?void 0:a(s)},orientation:()=>E(e.orientation)},t)}var Tn="focusScope.autoFocusOnMount",Pn="focusScope.autoFocusOnUnmount",Xr={bubbles:!1,cancelable:!0},Zr={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=Fn(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=Fn(this.stack,e),(t=this.active())==null||t.resume()}};function cc(e,t){const[n,r]=R(!1),o={pause(){r(!0)},resume(){r(!1)}};let s=null;const a=d=>{var v;return(v=e.onMountAutoFocus)==null?void 0:v.call(e,d)},l=d=>{var v;return(v=e.onUnmountAutoFocus)==null?void 0:v.call(e,d)},i=()=>je(t()),c=()=>{const d=i().createElement("span");return d.setAttribute("data-focus-trap",""),d.tabIndex=0,Object.assign(d.style,So),d},g=()=>{const d=t();return d?Co(d,!0).filter(v=>!v.hasAttribute("data-focus-trap")):[]},h=()=>{const d=g();return d.length>0?d[0]:null},u=()=>{const d=g();return d.length>0?d[d.length-1]:null},f=()=>{const d=t();if(!d)return!1;const v=Ht(d);return!v||Ke(d,v)?!1:$o(v)};B(()=>{const d=t();if(!d)return;Zr.add(o);const v=Ht(d);if(!Ke(d,v)){const m=new CustomEvent(Tn,Xr);d.addEventListener(Tn,a),d.dispatchEvent(m),m.defaultPrevented||setTimeout(()=>{pe(h()),Ht(d)===v&&pe(d)},0)}U(()=>{d.removeEventListener(Tn,a),setTimeout(()=>{const m=new CustomEvent(Pn,Xr);f()&&m.preventDefault(),d.addEventListener(Pn,l),d.dispatchEvent(m),m.defaultPrevented||pe(v??i().body),d.removeEventListener(Pn,l),Zr.remove(o)},0)})}),B(()=>{const d=t();if(!d||!E(e.trapFocus)||n())return;const v=m=>{const b=m.target;b!=null&&b.closest(`[${fn}]`)||(Ke(d,b)?s=b:pe(s))},p=m=>{const w=m.relatedTarget??Ht(d);w!=null&&w.closest(`[${fn}]`)||Ke(d,w)||pe(s)};i().addEventListener("focusin",v),i().addEventListener("focusout",p),U(()=>{i().removeEventListener("focusin",v),i().removeEventListener("focusout",p)})}),B(()=>{const d=t();if(!d||!E(e.trapFocus)||n())return;const v=c();d.insertAdjacentElement("afterbegin",v);const p=c();d.insertAdjacentElement("beforeend",p);function m(w){const x=h(),C=u();w.relatedTarget===x?pe(C):pe(x)}v.addEventListener("focusin",m),p.addEventListener("focusin",m);const b=new MutationObserver(w=>{for(const x of w)x.previousSibling===p&&(p.remove(),d.insertAdjacentElement("beforeend",p)),x.nextSibling===v&&(v.remove(),d.insertAdjacentElement("afterbegin",v))});b.observe(d,{childList:!0,subtree:!1}),U(()=>{v.removeEventListener("focusin",m),p.removeEventListener("focusin",m),v.remove(),p.remove(),b.disconnect()})})}var uc="data-live-announcer";function dc(e){B(()=>{E(e.isDisabled)||U(fc(E(e.targets),E(e.root)))})}var Bt=new WeakMap,_e=[];function fc(e,t=document.body){const n=new Set(e),r=new Set,o=i=>{for(const u of i.querySelectorAll(`[${uc}], [${fn}]`))n.add(u);const c=u=>{if(n.has(u)||u.parentElement&&r.has(u.parentElement)&&u.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const f of n)if(u.contains(f))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},g=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),h=c(i);if(h===NodeFilter.FILTER_ACCEPT&&s(i),h!==NodeFilter.FILTER_REJECT){let u=g.nextNode();for(;u!=null;)s(u),u=g.nextNode()}},s=i=>{const c=Bt.get(i)??0;i.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&i.setAttribute("aria-hidden","true"),r.add(i),Bt.set(i,c+1))};_e.length&&_e[_e.length-1].disconnect(),o(t);const a=new MutationObserver(i=>{for(const c of i)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(g=>g.contains(c.target))){for(const g of c.removedNodes)g instanceof Element&&(n.delete(g),r.delete(g));for(const g of c.addedNodes)(g instanceof HTMLElement||g instanceof SVGElement)&&(g.dataset.liveAnnouncer==="true"||g.dataset.reactAriaTopLayer==="true")?n.add(g):g instanceof Element&&o(g)}});a.observe(t,{childList:!0,subtree:!0});const l={observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return _e.push(l),()=>{a.disconnect();for(const i of r){const c=Bt.get(i);if(c==null)return;c===1?(i.removeAttribute("aria-hidden"),Bt.delete(i)):Bt.set(i,c-1)}l===_e[_e.length-1]?(_e.pop(),_e.length&&_e[_e.length-1].observe()):_e.splice(_e.indexOf(l),1)}}var ln=new Map,gc=e=>{B(()=>{const t=be(e.style)??{},n=be(e.properties)??[],r={};for(const s in t)r[s]=e.element.style[s];const o=ln.get(e.key);o?o.activeCount++:ln.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(s=>s.key)}),Object.assign(e.element.style,e.style);for(const s of n)e.element.style.setProperty(s.key,s.value);U(()=>{var a;const s=ln.get(e.key);if(s){if(s.activeCount!==1){s.activeCount--;return}ln.delete(e.key);for(const[l,i]of Object.entries(s.originalStyles))e.element.style[l]=i;for(const l of s.properties)e.element.style.removeProperty(l);e.element.style.length===0&&e.element.removeAttribute("style"),(a=e.cleanup)==null||a.call(e)}})})},Jr=gc,hc=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},vc=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},yc=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,s=0,a=0,l=!1;do{const[i,c,g]=hc(o,t),h=g-i-r*c;(c!==0||h!==0)&&vc(o,t)&&(s+=h,a+=c),o===(n??document.documentElement)?l=!0:o=o._$host??o.parentElement}while(o&&!l);return[s,a]},[eo,to]=R([]),mc=e=>eo().indexOf(e)===eo().length-1,bc=e=>{const t=j({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=He();let r=[0,0],o=null,s=null;B(()=>{be(t.enabled)&&(to(c=>[...c,n]),U(()=>{to(c=>c.filter(g=>g!==n))}))}),B(()=>{if(!be(t.enabled)||!be(t.hideScrollbar))return;const{body:c}=document,g=window.innerWidth-c.offsetWidth;if(be(t.preventScrollbarShift)){const h={overflow:"hidden"},u=[];g>0&&(be(t.preventScrollbarShiftMode)==="padding"?h.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${g}px)`:h.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${g}px)`,u.push({key:"--scrollbar-width",value:`${g}px`}));const f=window.scrollY,d=window.scrollX;Jr({key:"prevent-scroll",element:c,style:h,properties:u,cleanup:()=>{be(t.restoreScrollPosition)&&g>0&&window.scrollTo(d,f)}})}else Jr({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),B(()=>{!mc(n)||!be(t.enabled)||(document.addEventListener("wheel",l,{passive:!1}),document.addEventListener("touchstart",a,{passive:!1}),document.addEventListener("touchmove",i,{passive:!1}),U(()=>{document.removeEventListener("wheel",l),document.removeEventListener("touchstart",a),document.removeEventListener("touchmove",i)}))});const a=c=>{r=no(c),o=null,s=null},l=c=>{const g=c.target,h=be(t.element),u=pc(c),f=Math.abs(u[0])>Math.abs(u[1])?"x":"y",d=f==="x"?u[0]:u[1],v=ro(g,f,d,h);let p;h&&Vn(h,g)?p=!v:p=!0,p&&c.cancelable&&c.preventDefault()},i=c=>{const g=be(t.element),h=c.target;let u;if(c.touches.length===2)u=!be(t.allowPinchZoom);else{if(o==null||s===null){const f=no(c).map((v,p)=>r[p]-v),d=Math.abs(f[0])>Math.abs(f[1])?"x":"y";o=d,s=d==="x"?f[0]:f[1]}if(h.type==="range")u=!1;else{const f=ro(h,o,s,g);g&&Vn(g,h)?u=!f:u=!0}}u&&c.cancelable&&c.preventDefault()}},pc=e=>[e.deltaX,e.deltaY],no=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],ro=(e,t,n,r)=>{const o=r!==null&&Vn(r,e),[s,a]=yc(e,t,o?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(a)<1)},Vn=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},wc=bc,xc=wc,fi=ye();function gi(){return me(fi)}function nt(){const e=gi();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var hi=ye();function lr(){const e=me(hi);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var vi=ye();function Qe(){const e=me(vi);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function cr(e){let t;const n=Qe(),r=nt(),o=Q({id:n.generateId(`item-${He()}`)},e),[s,a]=X(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[l,i]=R(),[c,g]=R(),[h,u]=R(),f=()=>r.listState().selectionManager(),d=()=>a.id,v=()=>f().focusedKey()===d(),p=()=>{var $;($=s.onSelect)==null||$.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};Da({getItem:()=>{var $;return{ref:()=>t,type:"item",key:d(),textValue:s.textValue??(($=h())==null?void 0:$.textContent)??(t==null?void 0:t.textContent)??"",disabled:s.disabled??!1}}});const m=_o({key:d,selectionManager:f,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),b=$=>{se($,s.onPointerMove),$.pointerType==="mouse"&&(s.disabled?r.onItemLeave($):(r.onItemEnter($),$.defaultPrevented||(pe($.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(d()))))},w=$=>{se($,s.onPointerLeave),$.pointerType==="mouse"&&r.onItemLeave($)},x=$=>{se($,s.onPointerUp),!s.disabled&&$.button===0&&p()},C=$=>{if(se($,s.onKeyDown),!$.repeat&&!s.disabled)switch($.key){case"Enter":case" ":p();break}},O=P(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),T=P(()=>({"data-indeterminate":s.indeterminate?"":void 0,"data-checked":s.checked&&!s.indeterminate?"":void 0,"data-disabled":s.disabled?"":void 0,"data-highlighted":v()?"":void 0})),F={isChecked:()=>s.checked,dataset:T,setLabelRef:u,generateId:Zt(()=>a.id),registerLabel:ze(i),registerDescription:ze(g)};return y(hi.Provider,{value:F,get children(){return y(ae,j({as:"div",ref($){const I=ke(K=>t=K,s.ref);typeof I=="function"&&I($)},get tabIndex(){return m.tabIndex()},get"aria-checked"(){return O()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return l()},get"aria-describedby"(){return c()},get"data-key"(){return m.dataKey()},get onPointerDown(){return he([s.onPointerDown,m.onPointerDown])},get onPointerUp(){return he([x,m.onPointerUp])},get onClick(){return he([s.onClick,m.onClick])},get onKeyDown(){return he([C,m.onKeyDown])},get onMouseDown(){return he([s.onMouseDown,m.onMouseDown])},get onFocus(){return he([s.onFocus,m.onFocus])},onPointerMove:b,onPointerLeave:w},T,a))}})}function yi(e){const t=Q({closeOnSelect:!1},e),[n,r]=X(t,["checked","defaultChecked","onChange","onSelect"]),o=wa({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:a=>{var l;return(l=n.onChange)==null?void 0:l.call(n,a)},isDisabled:()=>r.disabled});return y(cr,j({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{var a;(a=n.onSelect)==null||a.call(n),o.toggle()}},r))}var Cc=ye();function Sn(){return me(Cc)}var Yt={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Yt.next(e==="ltr"?"rtl":"ltr",t)},oo={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function mi(e){const t=Qe(),n=nt(),r=Sn(),{direction:o}=ft(),s=Q({id:t.generateId("trigger")},e),[a,l]=X(s,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let i=()=>t.value();r!==void 0&&(i=()=>t.value()??a.id,r.lastValue()===void 0&&r.setLastValue(i));const c=wn(()=>n.triggerRef(),()=>"button"),g=P(()=>{var m;return c()==="a"&&((m=n.triggerRef())==null?void 0:m.getAttribute("href"))!=null});B(Je(()=>r==null?void 0:r.value(),m=>{var b;g()&&m===i()&&((b=n.triggerRef())==null||b.focus())}));const h=()=>{r!==void 0?n.isOpen()?r.value()===i()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},u=m=>{se(m,a.onPointerDown),m.currentTarget.dataset.pointerType=m.pointerType,!a.disabled&&m.pointerType!=="touch"&&m.button===0&&h()},f=m=>{se(m,a.onClick),a.disabled||m.currentTarget.dataset.pointerType==="touch"&&h()},d=m=>{if(se(m,a.onKeyDown),!a.disabled){if(g())switch(m.key){case"Enter":case" ":return}switch(m.key){case"Enter":case" ":case oo.first(t.orientation()):m.stopPropagation(),m.preventDefault(),fa(m.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(i);break;case oo.last(t.orientation()):m.stopPropagation(),m.preventDefault(),n.open("last");break;case Yt.next(o(),t.orientation()):if(r===void 0)break;m.stopPropagation(),m.preventDefault(),r.nextMenu();break;case Yt.previous(o(),t.orientation()):if(r===void 0)break;m.stopPropagation(),m.preventDefault(),r.previousMenu();break}}},v=m=>{var b;se(m,a.onMouseOver),((b=n.triggerRef())==null?void 0:b.dataset.pointerType)!=="touch"&&!a.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(i)},p=m=>{se(m,a.onFocus),r!==void 0&&m.currentTarget.dataset.pointerType!=="touch"&&r.setValue(i)};return B(()=>U(n.registerTriggerId(a.id))),y(Jn,j({ref(m){const b=ke(n.setTriggerRef,a.ref);typeof b=="function"&&b(m)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return a.id},get disabled(){return a.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return P(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return i()!==void 0&&(r==null?void 0:r.value())===i()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===i()||r.lastValue()===i()?0:-1:void 0},onPointerDown:u,onMouseOver:v,onClick:f,onKeyDown:d,onFocus:p,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),l))}var $c=ye();function bi(){return me($c)}function pi(e){let t;const n=Qe(),r=nt(),o=Sn(),s=bi(),{direction:a}=ft(),l=Q({id:n.generateId(`content-${He()}`)},e),[i,c]=X(l,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let g=0;const h=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),u=lc({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);cc({trapFocus:()=>h()&&r.isOpen(),onMountAutoFocus:w=>{var x;o===void 0&&((x=i.onOpenAutoFocus)==null||x.call(i,w))},onUnmountAutoFocus:i.onCloseAutoFocus},()=>t);const f=w=>{if(Ke(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),o!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case Yt.next(a(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Yt.previous(a(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},d=w=>{var x;(x=i.onEscapeKeyDown)==null||x.call(i,w),o==null||o.setAutoFocusMenu(!1),r.close(!0)},v=w=>{var x;(x=i.onFocusOutside)==null||x.call(i,w),n.isModal()&&w.preventDefault()},p=w=>{var x,C;se(w,i.onPointerEnter),r.isOpen()&&((x=r.parentMenuContext())==null||x.listState().selectionManager().setFocused(!1),(C=r.parentMenuContext())==null||C.listState().selectionManager().setFocusedKey(void 0))},m=w=>{if(se(w,i.onPointerMove),w.pointerType!=="mouse")return;const x=w.target,C=g!==w.clientX;Ke(w.currentTarget,x)&&C&&(r.setPointerDir(w.clientX>g?"right":"left"),g=w.clientX)};B(()=>U(r.registerContentId(i.id)));const b={ref:ke(w=>{r.setContentRef(w),t=w},i.ref),role:"menu",get id(){return i.id},get tabIndex(){return u.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:he([i.onKeyDown,u.onKeyDown,f]),onMouseDown:he([i.onMouseDown,u.onMouseDown]),onFocusIn:he([i.onFocusIn,u.onFocusIn]),onFocusOut:he([i.onFocusOut,u.onFocusOut]),onPointerEnter:p,onPointerMove:m,get"data-orientation"(){return n.orientation()}};return y(z,{get when(){return r.contentPresent()},get children(){return y(z,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return y(ae,j({as:"div"},()=>r.dataset(),b,c))},get children(){return y(Zo.Positioner,{get children(){return y(ic,j({get disableOutsidePointerEvents(){return P(()=>!!h())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return bn({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},i.style)},onEscapeKeyDown:d,onFocusOutside:v,get onDismiss(){return r.close}},()=>r.dataset(),b,c))}})}})}})}function Sc(e){let t;const n=Qe(),r=nt(),[o,s]=X(e,["ref"]);return xc({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),y(pi,j({ref(a){const l=ke(i=>{t=i},o.ref);typeof l=="function"&&l(a)}},s))}var wi=ye();function kc(){const e=me(wi);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function ur(e){const t=Qe(),n=Q({id:t.generateId(`group-${He()}`)},e),[r,o]=R(),s={generateId:Zt(()=>n.id),registerLabelId:ze(o)};return y(wi.Provider,{value:s,get children(){return y(ae,j({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function xi(e){const t=kc(),n=Q({id:t.generateId("label")},e),[r,o]=X(n,["id"]);return B(()=>U(t.registerLabelId(r.id))),y(ae,j({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function Ci(e){const t=nt(),n=Q({children:"▼"},e);return y(ae,j({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function $i(e){return y(cr,j({role:"menuitem",closeOnSelect:!0},e))}function Si(e){const t=lr(),n=Q({id:t.generateId("description")},e),[r,o]=X(n,["id"]);return B(()=>U(t.registerDescription(r.id))),y(ae,j({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function ki(e){const t=lr(),n=Q({id:t.generateId("indicator")},e),[r,o]=X(n,["forceMount"]);return y(z,{get when(){return r.forceMount||t.isChecked()},get children(){return y(ae,j({as:"div"},()=>t.dataset(),o))}})}function Ei(e){const t=lr(),n=Q({id:t.generateId("label")},e),[r,o]=X(n,["ref","id"]);return B(()=>U(t.registerLabel(r.id))),y(ae,j({as:"div",ref(s){const a=ke(t.setLabelRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id}},()=>t.dataset(),o))}function Mi(e){const t=nt();return y(z,{get when(){return t.contentPresent()},get children(){return y(os,e)}})}var Ii=ye();function Ec(){const e=me(Ii);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Di(e){const n=Qe().generateId(`radiogroup-${He()}`),r=Q({id:n},e),[o,s]=X(r,["value","defaultValue","onChange","disabled"]),[a,l]=en({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>{var g;return(g=o.onChange)==null?void 0:g.call(o,c)}}),i={isDisabled:()=>o.disabled,isSelectedValue:c=>c===a(),setSelectedValue:l};return y(Ii.Provider,{value:i,get children(){return y(ur,s)}})}function Ai(e){const t=Ec(),n=Q({closeOnSelect:!1},e),[r,o]=X(n,["value","onSelect"]);return y(cr,j({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var a;(a=r.onSelect)==null||a.call(r),t.setSelectedValue(r.value)}},o))}function Mc(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),s=[],a=t.clientX,l=t.clientY;switch(r){case"top":s.push([a,l+5]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]);break;case"right":s.push([a-5,l]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]);break;case"bottom":s.push([a,l-5]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([o.left,o.top]);break;case"left":s.push([a+5,l]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]);break}return s}function Ic(e,t){return t?da([e.clientX,e.clientY],t):!1}function Ti(e){const t=Qe(),n=Ao(),r=gi(),o=Sn(),s=bi(),a=Q({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[l,i]=X(a,["open","defaultOpen","onOpenChange"]);let c=0,g=null,h="right";const[u,f]=R(),[d,v]=R(),[p,m]=R(),[b,w]=R(),[x,C]=R(!0),[O,T]=R(i.placement),[F,$]=R([]),[I,K]=R([]),{DomCollectionProvider:N}=Ia({items:I,onItemsChange:K}),ne=ei({open:()=>l.open,defaultOpen:()=>l.defaultOpen,onOpenChange:G=>{var Ee;return(Ee=l.onOpenChange)==null?void 0:Ee.call(l,G)}}),{present:Z}=Ro({show:()=>t.forceMount()||ne.isOpen(),element:()=>b()??null}),le=Ua({selectionMode:"none",dataSource:I}),_=G=>{C(G),ne.open()},W=(G=!1)=>{ne.close(),G&&r&&r.close(!0)},J=G=>{C(G),ne.toggle()},ce=()=>{const G=b();G&&(pe(G),le.selectionManager().setFocused(!0),le.selectionManager().setFocusedKey(void 0))},we=()=>{s!=null?setTimeout(()=>ce()):ce()},Le=G=>{$(Oe=>[...Oe,G]);const Ee=r==null?void 0:r.registerNestedMenu(G);return()=>{$(Oe=>Fn(Oe,G)),Ee==null||Ee()}},ve=G=>h===(g==null?void 0:g.side)&&Ic(G,g==null?void 0:g.area),Ie=G=>{ve(G)&&G.preventDefault()},M=G=>{ve(G)||we()},de=G=>{ve(G)&&G.preventDefault()};dc({isDisabled:()=>!(r==null&&ne.isOpen()&&t.isModal()),targets:()=>[b(),...F()].filter(Boolean)}),B(()=>{const G=b();if(!G||!r)return;const Ee=r.registerNestedMenu(G);U(()=>{Ee()})}),B(()=>{r===void 0&&(o==null||o.registerMenu(t.value(),[b(),...F()]))}),B(()=>{var G;r!==void 0||o===void 0||(o.value()===t.value()?((G=p())==null||G.focus(),o.autoFocusMenu()&&_(!0)):W())}),B(()=>{r!==void 0||o===void 0||ne.isOpen()&&o.setValue(t.value())}),U(()=>{r===void 0&&(o==null||o.unregisterMenu(t.value()))});const xt={dataset:P(()=>({"data-expanded":ne.isOpen()?"":void 0,"data-closed":ne.isOpen()?void 0:""})),isOpen:ne.isOpen,contentPresent:Z,nestedMenus:F,currentPlacement:O,pointerGraceTimeoutId:()=>c,autoFocus:x,listState:()=>le,parentMenuContext:()=>r,triggerRef:p,contentRef:b,triggerId:u,contentId:d,setTriggerRef:m,setContentRef:w,open:_,close:W,toggle:J,focusContent:we,onItemEnter:Ie,onItemLeave:M,onTriggerLeave:de,setPointerDir:G=>h=G,setPointerGraceTimeoutId:G=>c=G,setPointerGraceIntent:G=>g=G,registerNestedMenu:Le,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:ze(f),registerContentId:ze(v)};return y(N,{get children(){return y(fi.Provider,{value:xt,get children(){return y(z,{when:s===void 0,get fallback(){return i.children},get children(){return y(Zo,j({anchorRef:p,contentRef:b,onCurrentPlacementChange:T},i))}})}})}})}function Pi(e){const{direction:t}=ft();return y(Ti,j({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var Dc={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function Li(e){const t=nt(),n=Qe(),[r,o]=X(e,["onFocusOutside","onKeyDown"]),{direction:s}=ft();return y(pi,j({onOpenAutoFocus:g=>{g.preventDefault()},onCloseAutoFocus:g=>{g.preventDefault()},onFocusOutside:g=>{var u;(u=r.onFocusOutside)==null||u.call(r,g);const h=g.target;Ke(t.triggerRef(),h)||t.close()},onKeyDown:g=>{se(g,r.onKeyDown);const h=Ke(g.currentTarget,g.target),u=Dc.close(s(),n.orientation()).includes(g.key),f=t.parentMenuContext()!=null;h&&u&&f&&(t.close(),pe(t.triggerRef()))}},o))}var io=["Enter"," "],Ac={open:(e,t)=>e==="ltr"?[...io,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...io,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Oi(e){let t;const n=Qe(),r=nt(),o=Q({id:n.generateId(`sub-trigger-${He()}`)},e),[s,a]=X(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let l=null;const i=()=>{l&&window.clearTimeout(l),l=null},{direction:c}=ft(),g=()=>s.id,h=()=>{const w=r.parentMenuContext();if(w==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return w.listState().selectionManager()},u=()=>r.listState().collection(),f=()=>h().focusedKey()===g(),d=_o({key:g,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),v=w=>{se(w,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},p=w=>{var C;if(se(w,s.onPointerMove),w.pointerType!=="mouse")return;const x=r.parentMenuContext();if(x==null||x.onItemEnter(w),!w.defaultPrevented){if(s.disabled){x==null||x.onItemLeave(w);return}!r.isOpen()&&!l&&((C=r.parentMenuContext())==null||C.setPointerGraceIntent(null),l=window.setTimeout(()=>{r.open(!1),i()},100)),x==null||x.onItemEnter(w),w.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),pe(w.currentTarget),x==null||x.listState().selectionManager().setFocused(!0),x==null||x.listState().selectionManager().setFocusedKey(g()))}},m=w=>{if(se(w,s.onPointerLeave),w.pointerType!=="mouse")return;i();const x=r.parentMenuContext(),C=r.contentRef();if(C){x==null||x.setPointerGraceIntent({area:Mc(r.currentPlacement(),w,C),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(x==null?void 0:x.pointerGraceTimeoutId());const O=window.setTimeout(()=>{x==null||x.setPointerGraceIntent(null)},300);x==null||x.setPointerGraceTimeoutId(O)}else{if(x==null||x.onTriggerLeave(w),w.defaultPrevented)return;x==null||x.setPointerGraceIntent(null)}x==null||x.onItemLeave(w)},b=w=>{se(w,s.onKeyDown),!w.repeat&&(s.disabled||Ac.open(c(),n.orientation()).includes(w.key)&&(w.stopPropagation(),w.preventDefault(),h().setFocused(!1),h().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(u().getFirstKey())))};return B(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const w=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:g(),textValue:s.textValue??(t==null?void 0:t.textContent)??"",disabled:s.disabled??!1});U(w)}),B(Je(()=>{var w;return(w=r.parentMenuContext())==null?void 0:w.pointerGraceTimeoutId()},w=>{U(()=>{var x;window.clearTimeout(w),(x=r.parentMenuContext())==null||x.setPointerGraceIntent(null)})})),B(()=>U(r.registerTriggerId(s.id))),U(()=>{i()}),y(ae,j({as:"div",ref(w){const x=ke(C=>{r.setTriggerRef(C),t=C},s.ref);typeof x=="function"&&x(w)},get id(){return s.id},role:"menuitem",get tabIndex(){return d.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return P(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return d.dataKey()},get"data-highlighted"(){return f()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return he([s.onPointerDown,d.onPointerDown])},get onPointerUp(){return he([s.onPointerUp,d.onPointerUp])},get onClick(){return he([v,d.onClick])},get onKeyDown(){return he([b,d.onKeyDown])},get onMouseDown(){return he([s.onMouseDown,d.onMouseDown])},get onFocus(){return he([s.onFocus,d.onFocus])},onPointerMove:p,onPointerLeave:m},()=>r.dataset(),a))}function Tc(e){const t=Sn(),n=`menu-${He()}`,r=Q({id:n,modal:!0},e),[o,s]=X(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),a=ei({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:i=>{var c;return(c=o.onOpenChange)==null?void 0:c.call(o,i)}}),l={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??l.isModal(),forceMount:()=>o.forceMount??!1,generateId:Zt(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??(t==null?void 0:t.orientation())??"horizontal"};return y(vi.Provider,{value:l,get children(){return y(Ti,j({get open(){return a.isOpen()},get onOpenChange(){return a.setIsOpen}},s))}})}var Pc={};xn(Pc,{Root:()=>kn,Separator:()=>Lc});function kn(e){let t;const n=Q({orientation:"horizontal"},e),[r,o]=X(n,["ref","orientation"]),s=wn(()=>t,()=>"hr");return y(ae,j({as:"hr",ref(a){const l=ke(i=>t=i,r.ref);typeof l=="function"&&l(a)},get role(){return s()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var Lc=kn,fe={};xn(fe,{Arrow:()=>ar,CheckboxItem:()=>yi,Content:()=>qi,DropdownMenu:()=>Oc,Group:()=>ur,GroupLabel:()=>xi,Icon:()=>Ci,Item:()=>$i,ItemDescription:()=>Si,ItemIndicator:()=>ki,ItemLabel:()=>Ei,Portal:()=>Mi,RadioGroup:()=>Di,RadioItem:()=>Ai,Root:()=>Fi,Separator:()=>kn,Sub:()=>Pi,SubContent:()=>Li,SubTrigger:()=>Oi,Trigger:()=>mi});function qi(e){const t=Qe(),n=nt(),[r,o]=X(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return y(Sc,j({onCloseAutoFocus:i=>{var c;(c=r.onCloseAutoFocus)==null||c.call(r,i),s||pe(n.triggerRef()),s=!1,i.preventDefault()},onInteractOutside:i=>{var c;(c=r.onInteractOutside)==null||c.call(r,i),(!t.isModal()||i.detail.isContextMenu)&&(s=!0)}},o))}function Fi(e){const t=`dropdownmenu-${He()}`,n=Q({id:t},e);return y(Tc,n)}var Oc=Object.assign(Fi,{Arrow:ar,CheckboxItem:yi,Content:qi,Group:ur,GroupLabel:xi,Icon:Ci,Item:$i,ItemDescription:Si,ItemIndicator:ki,ItemLabel:Ei,Portal:Mi,RadioGroup:Di,RadioItem:Ai,Separator:kn,Sub:Pi,SubContent:Li,SubTrigger:Oi,Trigger:mi}),S={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",80:"cc"},font:{size:{xs:"calc(var(--tsqd-font-size) * 0.75)",sm:"calc(var(--tsqd-font-size) * 0.875)",md:"var(--tsqd-font-size)"},lineHeight:{xs:"calc(var(--tsqd-font-size) * 1)",sm:"calc(var(--tsqd-font-size) * 1.25)",md:"calc(var(--tsqd-font-size) * 1.5)"},weight:{medium:"500",semibold:"600",bold:"700"}},border:{radius:{xs:"calc(var(--tsqd-font-size) * 0.125)",sm:"calc(var(--tsqd-font-size) * 0.25)",full:"9999px"}},size:{.25:"calc(var(--tsqd-font-size) * 0.0625)",.5:"calc(var(--tsqd-font-size) * 0.125)",1:"calc(var(--tsqd-font-size) * 0.25)",1.5:"calc(var(--tsqd-font-size) * 0.375)",2:"calc(var(--tsqd-font-size) * 0.5)",2.5:"calc(var(--tsqd-font-size) * 0.625)",3:"calc(var(--tsqd-font-size) * 0.75)",3.5:"calc(var(--tsqd-font-size) * 0.875)",4:"calc(var(--tsqd-font-size) * 1)",4.5:"calc(var(--tsqd-font-size) * 1.125)",5:"calc(var(--tsqd-font-size) * 1.25)",6:"calc(var(--tsqd-font-size) * 1.5)",6.5:"calc(var(--tsqd-font-size) * 1.625)",14:"calc(var(--tsqd-font-size) * 3.5)"},shadow:{xs:(e="rgb(0 0 0 / 0.1)")=>"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:(e="rgb(0 0 0 / 0.1)")=>`0 1px 3px 0 ${e}, 0 1px 2px -1px ${e}`,md:(e="rgb(0 0 0 / 0.1)")=>`0 4px 6px -1px ${e}, 0 2px 4px -2px ${e}`,lg:(e="rgb(0 0 0 / 0.1)")=>`0 10px 15px -3px ${e}, 0 4px 6px -4px ${e}`,xl:(e="rgb(0 0 0 / 0.1)")=>`0 20px 25px -5px ${e}, 0 8px 10px -6px ${e}`,"2xl":(e="rgb(0 0 0 / 0.25)")=>`0 25px 50px -12px ${e}`,inner:(e="rgb(0 0 0 / 0.05)")=>`inset 0 2px 4px 0 ${e}`,none:()=>"none"}},qc=q('<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),Fc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),_c=q('<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),Rc=q('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),dr=q('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),Kc=q('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),zc=q('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Bc=q('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Nc=q('<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">'),Vc=q('<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">'),Hc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Gc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Uc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>'),jc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),_i=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Wc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke=#F04438 stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Qc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 xmlns=http://www.w3.org/2000/svg><rect class=list width=20 height=20 y=2 x=2 rx=2></rect><line class=list-item y1=7 y2=7 x1=6 x2=18></line><line class=list-item y2=12 y1=12 x1=6 x2=18></line><line class=list-item y1=17 y2=17 x1=6 x2=18>'),Yc=q('<svg viewBox="0 0 24 24"height=20 width=20 fill=none xmlns=http://www.w3.org/2000/svg><path d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Xc=q('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Zc=q('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><animateTransform attributeName=transform attributeType=XML type=rotate from=0 to=360 dur=2s repeatCount=indefinite>'),Jc=q('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),eu=q('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>');function tu(){return qc()}function Ri(){return Fc()}function cn(){return _c()}function so(){return Rc()}function ao(){return dr()}function nu(){return(()=>{var e=dr();return e.style.setProperty("transform","rotate(90deg)"),e})()}function ru(){return(()=>{var e=dr();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function ou(){return Kc()}function iu(){return zc()}function su(){return Bc()}function au(){return Nc()}function lu(){return Vc()}function cu(){return Hc()}function uu(){return Gc()}function du(){return Uc()}function fu(){return jc()}function gu(e){return(()=>{var t=_i(),n=t.firstChild;return H(()=>$e(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function hu(){return Wc()}function vu(){return Qc()}function yu(e){return[y(z,{get when(){return e.checked},get children(){var t=_i(),n=t.firstChild;return H(()=>$e(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),y(z,{get when(){return!e.checked},get children(){var t=Yc(),n=t.firstChild;return H(()=>$e(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function mu(){return Xc()}function bu(){return Zc()}function pu(){return Jc()}function wu(){return eu()}var xu=q('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Cu=q('<button title="Copy object to clipboard">'),$u=q('<button title="Remove all items"aria-label="Remove all items">'),Su=q('<button title="Delete item"aria-label="Delete item">'),ku=q('<button title="Toggle value"aria-label="Toggle value">'),Eu=q('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),Nt=q("<div>"),Mu=q("<div><button> <span></span> <span> "),Iu=q("<input>"),lo=q("<span>"),Du=q("<div><span>:"),Au=q("<div><div><button> [<!>...<!>]");function Tu(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var co=e=>{const t=Se(),n=V().shadowDOMTarget?Y.bind({target:V().shadowDOMTarget}):Y,r=P(()=>t()==="dark"?Lt(n):Pt(n));return(()=>{var o=xu();return H(()=>D(o,L(r().expander,n`
1
+ var Vi=Object.defineProperty;var Hi=(e,t,n)=>t in e?Vi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var qe=(e,t,n)=>Hi(e,typeof t!="symbol"?t+"":t,n);import{c as ye,a as R,o as Xt,b as B,d as P,e as y,t as q,i as k,f as H,g as D,s as Ln,m as On,h as Je,S as z,j as $e,k as Gi,l as Hn,u as me,n as Ui,p as U,q as St,r as Mt,v as ji,w as Wi,x as un,F as Qi,y as Yi,z as j,$ as Xi,A as Gn,B as Cr,C as Zi,I as Ji,D as Un,E as es,G as ts,M as Mn,H as ns,J as rs,K as jn,L as X,N as He,P as os,O as is,Q as ss,R as as}from"./tanstack-query-F-KVoy39.js";var ls=e=>e!=null,cs=e=>e.filter(ls);function us(e){return(...t)=>{for(const n of e)n&&n(...t)}}var E=e=>typeof e=="function"&&!e.length?e():e,qn=e=>Array.isArray(e)?e:e?[e]:[];function ds(e,...t){return typeof e=="function"?e(...t):e}var fs=U;function gs(e,t,n,r){const o=e.length,s=t.length;let a=0;if(!s){for(;a<o;a++)n(e[a]);return}if(!o){for(;a<s;a++)r(t[a]);return}for(;a<s&&t[a]===e[a];a++);let l,i;t=t.slice(a),e=e.slice(a);for(l of t)e.includes(l)||r(l);for(i of e)t.includes(i)||n(i)}function hs(e){const[t,n]=R(),r=e!=null&&e.throw?(u,f)=>{throw n(u instanceof Error?u:new Error(f)),u}:(u,f)=>{n(u instanceof Error?u:new Error(f))},o=e!=null&&e.api?Array.isArray(e.api)?e.api:[e.api]:[globalThis.localStorage].filter(Boolean),s=e!=null&&e.prefix?`${e.prefix}.`:"",a=new Map,l=new Proxy({},{get(u,f){let d=a.get(f);d||(d=R(void 0,{equals:!1}),a.set(f,d)),d[0]();const v=o.reduce((p,m)=>{if(p!==null||!m)return p;try{return m.getItem(`${s}${f}`)}catch(b){return r(b,`Error reading ${s}${f} from ${m.name}`),null}},null);return v!==null&&(e!=null&&e.deserializer)?e.deserializer(v,f,e.options):v}}),i=(u,f,d)=>{const v=e!=null&&e.serializer?e.serializer(f,u,d??e.options):f,p=`${s}${u}`;o.forEach(b=>{try{b.getItem(p)!==v&&b.setItem(p,v)}catch(w){r(w,`Error setting ${s}${u} to ${v} in ${b.name}`)}});const m=a.get(u);m&&m[1]()},c=u=>o.forEach(f=>{try{f.removeItem(`${s}${u}`)}catch(d){r(d,`Error removing ${s}${u} from ${f.name}`)}}),g=()=>o.forEach(u=>{try{u.clear()}catch(f){r(f,`Error clearing ${u.name}`)}}),h=()=>{const u={},f=(d,v)=>{if(!u.hasOwnProperty(d)){const p=v&&(e!=null&&e.deserializer)?e.deserializer(v,d,e.options):v;p&&(u[d]=p)}};return o.forEach(d=>{if(typeof d.getAll=="function"){let v;try{v=d.getAll()}catch(p){r(p,`Error getting all values from in ${d.name}`)}for(const p of v)f(p,v[p])}else{let v=0,p;try{for(;p=d.key(v++);)u.hasOwnProperty(p)||f(p,d.getItem(p))}catch(m){r(m,`Error getting all values from ${d.name}`)}}}),u};return(e==null?void 0:e.sync)!==!1&&Xt(()=>{const u=f=>{var v;let d=!1;o.forEach(p=>{try{p!==f.storageArea&&f.key&&f.newValue!==p.getItem(f.key)&&(f.newValue?p.setItem(f.key,f.newValue):p.removeItem(f.key),d=!0)}catch(m){r(m,`Error synching api ${p.name} from storage event (${f.key}=${f.newValue})`)}}),d&&f.key&&((v=a.get(f.key))==null||v[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",u),U(()=>globalThis.removeEventListener("storage",u))):(o.forEach(f=>{var d;return(d=f.addEventListener)==null?void 0:d.call(f,"storage",u)}),U(()=>o.forEach(f=>{var d;return(d=f.removeEventListener)==null?void 0:d.call(f,"storage",u)})))}),[l,i,{clear:g,error:t,remove:c,toJSON:h}]}var vs=hs,ys=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),$r=e=>{if(!e)return"";let t="";for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];t+=r instanceof Date?`; ${n}=${r.toUTCString()}`:typeof r=="boolean"?`; ${n}`:`; ${n}=${r}`}return t},Fe=ys({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t;return((t=Fe._cookies[0][Fe._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())??null},setItem:(e,t,n)=>{const r=Fe.getItem(e);Fe._cookies[0][Fe._cookies[1]]=`${e}=${t}${$r(n)}`;const o=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:Fe});window.dispatchEvent(o)},removeItem:e=>{Fe._cookies[0][Fe._cookies[1]]=`${e}=deleted${$r({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return Fe._cookies[0][Fe._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,o)=>(!t&&o&&n++===e&&(t=o),"")),t},get length(){let e=0;return Fe._cookies[0][Fe._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),ms=1024,Ut=796,bs=700,ps="system",ws=500,xs=Object.keys(Ln)[0],Sr=1,Cs=Object.keys(On)[0],ho=ye({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function V(){return me(ho)}var vo=ye(void 0),$s=e=>{const[t,n]=R(null),r=()=>{const a=t();a!=null&&(a.close(),n(null))},o=(a,l)=>{if(t()!=null)return;const i=window.open("","TSQD-Devtools-Panel",`width=${a},height=${l},popup`);if(!i)throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");i.document.head.innerHTML="",i.document.body.innerHTML="",Gi(i.document),i.document.title="TanStack Query Devtools",i.document.body.style.margin="0",i.addEventListener("pagehide",()=>{e.setLocalStore("pip_open","false"),n(null)}),[...(V().shadowDOMTarget||document).styleSheets].forEach(c=>{try{const g=[...c.cssRules].map(d=>d.cssText).join(""),h=document.createElement("style"),u=c.ownerNode;let f="";u&&"id"in u&&(f=u.id),f&&h.setAttribute("id",f),h.textContent=g,i.document.head.appendChild(h)}catch{const h=document.createElement("link");if(c.href==null)return;h.rel="stylesheet",h.type=c.type,h.media=c.media.toString(),h.href=c.href,i.document.head.appendChild(h)}}),Hn(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],i.document),e.setLocalStore("pip_open","true"),n(i)};B(()=>{(e.localStore.pip_open??"false")==="true"&&!e.disabled&&o(Number(window.innerWidth),Number(e.localStore.height||ws))}),B(()=>{const a=(V().shadowDOMTarget||document).querySelector("#_goober"),l=t();if(a&&l){const i=new MutationObserver(()=>{const c=(V().shadowDOMTarget||l.document).querySelector("#_goober");c&&(c.textContent=a.textContent)});i.observe(a,{childList:!0,subtree:!0,characterDataOldValue:!0}),U(()=>{i.disconnect()})}});const s=P(()=>({pipWindow:t(),requestPipWindow:o,closePipWindow:r,disabled:e.disabled??!1}));return y(vo.Provider,{value:s,get children(){return e.children}})},Ss=()=>P(()=>{const t=me(vo);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),yo=ye(()=>"dark");function Se(){return me(yo)}var mo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},ks=Object.keys(mo).join("|"),Es=new RegExp(ks,"g");function Ms(e){return e.replace(Es,t=>mo[t])}var Me={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function kr(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Me.MATCHES,!n.accessors){const a=Er(e,t,n);return{rankedValue:e,rank:a,accessorIndex:-1,accessorThreshold:n.threshold,passed:a>=n.threshold}}const o=Ts(e,n.accessors),s={rankedValue:e,rank:Me.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let a=0;a<o.length;a++){const l=o[a];let i=Er(l.itemValue,t,n);const{minRanking:c,maxRanking:g,threshold:h=n.threshold}=l.attributes;i<c&&i>=Me.MATCHES?i=c:i>g&&(i=g),i=Math.min(i,g),i>=h&&i>s.rank&&(s.rank=i,s.passed=!0,s.accessorIndex=a,s.accessorThreshold=h,s.rankedValue=l.itemValue)}return s}function Er(e,t,n){return e=Mr(e,n),t=Mr(t,n),t.length>e.length?Me.NO_MATCH:e===t?Me.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Me.EQUAL:e.startsWith(t)?Me.STARTS_WITH:e.includes(` ${t}`)?Me.WORD_STARTS_WITH:e.includes(t)?Me.CONTAINS:t.length===1?Me.NO_MATCH:Is(e).includes(t)?Me.ACRONYM:Ds(e,t))}function Is(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function Ds(e,t){let n=0,r=0;function o(i,c,g){for(let h=g,u=c.length;h<u;h++)if(c[h]===i)return n+=1,h+1;return-1}function s(i){const c=1/i,g=n/t.length;return Me.MATCHES+g*c}const a=o(t[0],e,0);if(a<0)return Me.NO_MATCH;r=a;for(let i=1,c=t.length;i<c;i++){const g=t[i];if(r=o(g,e,r),!(r>-1))return Me.NO_MATCH}const l=r-a;return s(l)}function Mr(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=Ms(e)),e}function As(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function Ts(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const s=t[r],a=Ps(s),l=As(e,s);for(let i=0,c=l.length;i<c;i++)n.push({itemValue:l[i],attributes:a})}return n}var Ir={maxRanking:1/0,minRanking:-1/0};function Ps(e){return typeof e=="function"?Ir:{...Ir,...e}}var Ls={data:""},Os=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Ls,qs=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Fs=/\/\*[^]*?\*\/| +/g,Dr=/\n+/g,yt=(e,t)=>{let n="",r="",o="";for(let s in e){let a=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+a+";":r+=s[1]=="f"?yt(a,s):s+"{"+yt(a,s[1]=="k"?"":t)+"}":typeof a=="object"?r+=yt(a,t?t.replace(/([^,])+/g,l=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,i=>/&/.test(i)?i.replace(/&/g,l):l?l+" "+i:i)):s):a!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=yt.p?yt.p(s,a):s+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Ye={},bo=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+bo(e[n]);return t}return e},_s=(e,t,n,r,o)=>{let s=bo(e),a=Ye[s]||(Ye[s]=(i=>{let c=0,g=11;for(;c<i.length;)g=101*g+i.charCodeAt(c++)>>>0;return"go"+g})(s));if(!Ye[a]){let i=s!==e?e:(c=>{let g,h,u=[{}];for(;g=qs.exec(c.replace(Fs,""));)g[4]?u.shift():g[3]?(h=g[3].replace(Dr," ").trim(),u.unshift(u[0][h]=u[0][h]||{})):u[0][g[1]]=g[2].replace(Dr," ").trim();return u[0]})(e);Ye[a]=yt(o?{["@keyframes "+a]:i}:i,n?"":"."+a)}let l=n&&Ye.g?Ye.g:null;return n&&(Ye.g=Ye[a]),((i,c,g,h)=>{h?c.data=c.data.replace(h,i):c.data.indexOf(i)===-1&&(c.data=g?i+c.data:c.data+i)})(Ye[a],t,r,l),a},Rs=(e,t,n)=>e.reduce((r,o,s)=>{let a=t[s];if(a&&a.call){let l=a(n),i=l&&l.props&&l.props.className||/^go/.test(l)&&l;a=i?"."+i:l&&typeof l=="object"?l.props?"":yt(l,""):l===!1?"":l}return r+o+(a??"")},"");function Y(e){let t=this||{},n=e.call?e(t.p):e;return _s(n.unshift?n.raw?Rs(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,Os(t.target),t.g,t.o,t.k)}Y.bind({g:1});Y.bind({k:1});function po(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=po(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function L(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=po(e))&&(r&&(r+=" "),r+=t);return r}function ke(...e){return us(e)}var In=Symbol("fallback");function Ar(e){for(const t of e)t.dispose()}function Ks(e,t,n,r={}){const o=new Map;return U(()=>Ar(o.values())),()=>{const a=e()||[];return a[Xi],Gn(()=>{var g,h;if(!a.length)return Ar(o.values()),o.clear(),r.fallback?[Cr(f=>(o.set(In,{dispose:f}),r.fallback()))]:[];const l=new Array(a.length),i=o.get(In);if(!o.size||i){i==null||i.dispose(),o.delete(In);for(let u=0;u<a.length;u++){const f=a[u],d=t(f,u);s(l,f,u,d)}return l}const c=new Set(o.keys());for(let u=0;u<a.length;u++){const f=a[u],d=t(f,u);c.delete(d);const v=o.get(d);v?(l[u]=v.mapped,(g=v.setIndex)==null||g.call(v,u),v.setItem(()=>f)):s(l,f,u,d)}for(const u of c)(h=o.get(u))==null||h.dispose(),o.delete(u);return l})};function s(a,l,i,c){Cr(g=>{const[h,u]=R(l),f={setItem:u,dispose:g};if(n.length>1){const[d,v]=R(i);f.setIndex=v,f.mapped=n(h,d)}else f.mapped=n(h);o.set(c,f),a[i]=f.mapped})}}function dn(e){const{by:t}=e;return P(Ks(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function zs(e,t,n,r){return e.addEventListener(t,n,r),fs(e.removeEventListener.bind(e,t,n,r))}function Bs(e,t,n,r){const o=()=>{qn(E(e)).forEach(s=>{s&&qn(E(t)).forEach(a=>zs(s,a,n,r))})};typeof e=="function"?B(o):H(o)}function Ns(e,t){const n=new ResizeObserver(e);return U(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function Vs(e,t,n){const r=new WeakMap,{observe:o,unobserve:s}=Ns(a=>{for(const l of a){const{contentRect:i,target:c}=l,g=Math.round(i.width),h=Math.round(i.height),u=r.get(c);(!u||u.width!==g||u.height!==h)&&(t(i,c,l),r.set(c,{width:g,height:h}))}},n);B(a=>{const l=cs(qn(E(e)));return gs(l,a,o,s),l},[])}var Hs=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Tr(e){const t={};let n;for(;n=Hs.exec(e);)t[n[1]]=n[2];return t}function bn(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Tr(e)}else typeof t=="string"&&(t=Tr(t));return{...e,...t}}function Gs(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Fn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Us(e){return typeof e=="number"}function kt(e){return Object.prototype.toString.call(e)==="[object String]"}function js(e){return typeof e=="function"}function Zt(e){return t=>`${e()}-${t}`}function Ke(e,t){return e?e===t||e.contains(t):!1}function Ht(e,t=!1){const{activeElement:n}=je(e);if(!(n!=null&&n.nodeName))return null;if(wo(n)&&n.contentDocument)return Ht(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=je(n).getElementById(r);if(o)return o}}return n}function Ws(e){return je(e).defaultView||window}function je(e){return e?e.ownerDocument||e:document}function wo(e){return e.tagName==="IFRAME"}var Wn=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Wn||{});function Qn(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function pn(){return Qn(/^Mac/i)}function Qs(){return Qn(/^iPhone/i)}function Ys(){return Qn(/^iPad/i)||pn()&&navigator.maxTouchPoints>1}function Xs(){return Qs()||Ys()}function Zs(){return pn()||Xs()}function se(e,t){return t&&(js(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function he(e){return t=>{for(const n of e)se(t,n)}}function Js(e){return pn()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function pe(e){if(e)if(ea())e.focus({preventScroll:!0});else{const t=ta(e);e.focus(),na(t)}}var sn=null;function ea(){if(sn==null){sn=!1;try{document.createElement("div").focus({get preventScroll(){return sn=!0,!0}})}catch{}}return sn}function ta(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function na(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var xo=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],ra=[...xo,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Yn=xo.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",oa=ra.join(':not([hidden]):not([tabindex="-1"]),');function Co(e,t){const r=Array.from(e.querySelectorAll(Yn)).filter(Pr);return t&&Pr(e)&&r.unshift(e),r.forEach((o,s)=>{if(wo(o)&&o.contentDocument){const a=o.contentDocument.body,l=Co(a,!1);r.splice(s,1,...l)}}),r}function Pr(e){return $o(e)&&!ia(e)}function $o(e){return e.matches(Yn)&&Xn(e)}function ia(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function Xn(e,t){return e.nodeName!=="#comment"&&sa(e)&&aa(e,t)&&(!e.parentElement||Xn(e.parentElement,e))}function sa(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:s,visibility:a}=o(e);r=s!=="none"&&a!=="hidden"&&a!=="collapse"}return r}function aa(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function la(e,t,n){const r=t!=null&&t.tabbable?oa:Yn,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var a;return(a=t==null?void 0:t.from)!=null&&a.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Xn(s)&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}function Lr(e){for(;e&&!ca(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function ca(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ua(){}function da(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let a=s,l=0,i=a-1;l<a;i=l++){const[c,g]=t[l],[h,u]=t[i],[,f]=t[i===0?a-1:i-1]||[0,0],d=(g-u)*(n-c)-(c-h)*(r-g);if(u<g){if(r>=u&&r<g){if(d===0)return!0;d>0&&(r===u?r>f&&(o=!o):o=!o)}}else if(g<u){if(r>g&&r<=u){if(d===0)return!0;d<0&&(r===u?r<f&&(o=!o):o=!o)}}else if(r==g&&(n>=h&&n<=c||n>=c&&n<=h))return!0}return o}function Q(e,t){return j(e,t)}var zt=new Map,Or=new Set;function qr(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=zt.get(n.target);r||(r=new Set,zt.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=zt.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),zt.delete(n.target)),zt.size===0)){for(const o of Or)o();Or.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?qr():document.addEventListener("DOMContentLoaded",qr));function _n(e,t){const n=Fr(e,t,"left"),r=Fr(e,t,"top"),o=t.offsetWidth,s=t.offsetHeight;let a=e.scrollLeft,l=e.scrollTop;const i=a+e.offsetWidth,c=l+e.offsetHeight;n<=a?a=n:n+o>i&&(a+=n+o-i),r<=l?l=r:r+s>c&&(l+=r+s-c),e.scrollLeft=a,e.scrollTop=l}function Fr(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function fa(e,t){var n,r;if(document.contains(e)){const o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let a=Lr(e);for(;e&&a&&e!==o&&a!==o;)_n(a,e),e=a,a=Lr(e)}else{const{left:a,top:l}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:i,top:c}=e.getBoundingClientRect();(Math.abs(a-i)>1||Math.abs(l-c)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var So={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function ze(e){return t=>(e(t),()=>e(void 0))}function wn(e,t){const[n,r]=R(_r(t==null?void 0:t()));return B(()=>{var o;r(((o=e())==null?void 0:o.tagName.toLowerCase())||_r(t==null?void 0:t()))}),n}function _r(e){return kt(e)?e:void 0}function ae(e){const[t,n]=X(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return y(is,j(n,{get component(){return t.as}}))}var ga=["id","name","validationState","required","disabled","readOnly"];function ha(e){const t=`form-control-${He()}`,n=Q({id:t},e),[r,o]=R(),[s,a]=R(),[l,i]=R(),[c,g]=R(),h=(v,p,m)=>{const b=m!=null||r()!=null;return[m,r(),b&&p!=null?v:void 0].filter(Boolean).join(" ")||void 0},u=v=>[l(),c(),v].filter(Boolean).join(" ")||void 0,f=P(()=>({"data-valid":E(n.validationState)==="valid"?"":void 0,"data-invalid":E(n.validationState)==="invalid"?"":void 0,"data-required":E(n.required)?"":void 0,"data-disabled":E(n.disabled)?"":void 0,"data-readonly":E(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>E(n.name)??E(n.id),dataset:f,validationState:()=>E(n.validationState),isRequired:()=>E(n.required),isDisabled:()=>E(n.disabled),isReadOnly:()=>E(n.readOnly),labelId:r,fieldId:s,descriptionId:l,errorMessageId:c,getAriaLabelledBy:h,getAriaDescribedBy:u,generateId:Zt(()=>E(n.id)),registerLabel:ze(o),registerField:ze(a),registerDescription:ze(i),registerErrorMessage:ze(g)}}}var ko=ye();function Jt(){const e=me(ko);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Eo(e){const t=Jt(),n=Q({id:t.generateId("description")},e);return B(()=>U(t.registerDescription(n.id))),y(ae,j({as:"div"},()=>t.dataset(),n))}function Mo(e){const t=Jt(),n=Q({id:t.generateId("error-message")},e),[r,o]=X(n,["forceMount"]),s=()=>t.validationState()==="invalid";return B(()=>{s()&&U(t.registerErrorMessage(o.id))}),y(z,{get when(){return r.forceMount||s()},get children(){return y(ae,j({as:"div"},()=>t.dataset(),o))}})}function va(e){let t;const n=Jt(),r=Q({id:n.generateId("label")},e),[o,s]=X(r,["ref"]),a=wn(()=>t,()=>"label");return B(()=>U(n.registerLabel(s.id))),y(ae,j({as:"label",ref(l){const i=ke(c=>t=c,o.ref);typeof i=="function"&&i(l)},get for(){return P(()=>a()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function ya(e,t){B(Je(e,n=>{if(n==null)return;const r=ma(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),U(()=>{r.removeEventListener("reset",t)}))}))}function ma(e){return ba(e)?e.form:e.closest("form")}function ba(e){return e.matches("textarea, input, select, button")}function en(e){var a;const[t,n]=R((a=e.defaultValue)==null?void 0:a.call(e)),r=P(()=>{var l;return((l=e.value)==null?void 0:l.call(e))!==void 0}),o=P(()=>{var l;return r()?(l=e.value)==null?void 0:l.call(e):t()});return[o,l=>{Gn(()=>{var c;const i=ds(l,o());return Object.is(i,o())||(r()||n(i),(c=e.onChange)==null||c.call(e,i)),i})}]}function Io(e){const[t,n]=en(e);return[()=>t()??!1,n]}function pa(e){const[t,n]=en(e);return[()=>t()??[],n]}function wa(e={}){const[t,n]=Io({value:()=>E(e.isSelected),defaultValue:()=>!!E(e.defaultIsSelected),onChange:s=>{var a;return(a=e.onSelectedChange)==null?void 0:a.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!E(e.isReadOnly)&&!E(e.isDisabled)&&n(s)},toggle:()=>{!E(e.isReadOnly)&&!E(e.isDisabled)&&n(!t())}}}var xa=Object.defineProperty,xn=(e,t)=>{for(var n in t)xa(e,n,{get:t[n],enumerable:!0})},Do=ye();function Ao(){return me(Do)}function Ca(){const e=Ao();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function To(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function $a(e,t){var o;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const s=(o=e[r])==null?void 0:o.ref();if(s&&To(s,n))return r+1}return 0}function Sa(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[s,a])=>{const l=o.ref(),i=a.ref();return l===i||!l||!i?0:To(l,i)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function Po(e,t){const n=Sa(e);e!==n&&t(n)}function ka(e){var o,s;const t=e[0],n=(o=e[e.length-1])==null?void 0:o.ref();let r=(s=t==null?void 0:t.ref())==null?void 0:s.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return je(r).body}function Ea(e,t){B(()=>{const n=setTimeout(()=>{Po(e(),t)});U(()=>clearTimeout(n))})}function Ma(e,t){if(typeof IntersectionObserver!="function"){Ea(e,t);return}let n=[];B(()=>{const r=()=>{const a=!!n.length;n=e(),a&&Po(e(),t)},o=ka(e()),s=new IntersectionObserver(r,{root:o});for(const a of e()){const l=a.ref();l&&s.observe(l)}U(()=>s.disconnect())})}function Ia(e={}){const[t,n]=pa({value:()=>E(e.items),onChange:s=>{var a;return(a=e.onItemsChange)==null?void 0:a.call(e,s)}});Ma(t,n);const r=s=>(n(a=>{const l=$a(a,s);return Gs(a,s,l)}),()=>{n(a=>{const l=a.filter(i=>i.ref()!==s.ref());return a.length===l.length?a:l})});return{DomCollectionProvider:s=>y(Do.Provider,{value:{registerItem:r},get children(){return s.children}})}}function Da(e){const t=Ca(),n=Q({shouldRegisterItem:!0},e);B(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());U(r)})}function Lo(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=i=>{if(i==null)return"";const c=e.getKey??"key",g=kt(c)?i[c]:c(i);return g!=null?String(g):""},s=i=>{if(i==null)return"";const c=e.getTextValue??"textValue",g=kt(c)?i[c]:c(i);return g!=null?String(g):""},a=i=>{if(i==null)return!1;const c=e.getDisabled??"disabled";return(kt(c)?i[c]:c(i))??!1},l=i=>{var c;if(i!=null)return kt(e.getSectionChildren)?i[e.getSectionChildren]:(c=e.getSectionChildren)==null?void 0:c.call(e,i)};for(const i of e.dataSource){if(kt(i)||Us(i)){r.push({type:"item",rawValue:i,key:String(i),textValue:String(i),disabled:a(i),level:n,index:t}),t++;continue}if(l(i)!=null){r.push({type:"section",rawValue:i,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=l(i)??[];if(c.length>0){const g=Lo({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...g),t+=g.length}}else r.push({type:"item",rawValue:i,key:o(i),textValue:s(i),disabled:a(i),level:n,index:t}),t++}return r}function Aa(e,t=[]){return P(()=>{const n=Lo({dataSource:E(e.dataSource),getKey:E(e.getKey),getTextValue:E(e.getTextValue),getDisabled:E(e.getDisabled),getSectionChildren:E(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var Ta=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Pa=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function La(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Ta.has(n)}const t=e.split("-")[0];return Pa.has(t)}function Oa(e){return La(e)?"rtl":"ltr"}function Oo(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:Oa(e)}}var Rn=Oo(),Gt=new Set;function Rr(){Rn=Oo();for(const e of Gt)e(Rn)}function qa(){const[e,t]=R(Rn),n=P(()=>e());return Xt(()=>{Gt.size===0&&window.addEventListener("languagechange",Rr),Gt.add(t),U(()=>{Gt.delete(t),Gt.size===0&&window.removeEventListener("languagechange",Rr)})}),{locale:()=>n().locale,direction:()=>n().direction}}var Fa=ye();function ft(){const e=qa();return me(Fa)||e}var Dn=new Map;function _a(e){const{locale:t}=ft(),n=P(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return P(()=>{const r=n();let o;return Dn.has(r)&&(o=Dn.get(r)),o||(o=new Intl.Collator(t(),e),Dn.set(r,o)),o})}var Xe=class qo extends Set{constructor(n,r,o){super(n);qe(this,"anchorKey");qe(this,"currentKey");n instanceof qo?(this.anchorKey=r||n.anchorKey,this.currentKey=o||n.currentKey):(this.anchorKey=r,this.currentKey=o)}};function Ra(e){const[t,n]=en(e);return[()=>t()??new Xe,n]}function Fo(e){return Zs()?e.altKey:e.ctrlKey}function Et(e){return pn()?e.metaKey:e.ctrlKey}function Kr(e){return new Xe(e)}function Ka(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function za(e){const t=Q({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=R(!1),[o,s]=R(),a=P(()=>{const v=E(t.selectedKeys);return v!=null?Kr(v):v}),l=P(()=>{const v=E(t.defaultSelectedKeys);return v!=null?Kr(v):new Xe}),[i,c]=Ra({value:a,defaultValue:l,onChange:v=>{var p;return(p=t.onSelectionChange)==null?void 0:p.call(t,v)}}),[g,h]=R(E(t.selectionBehavior)),u=()=>E(t.selectionMode),f=()=>E(t.disallowEmptySelection)??!1,d=v=>{(E(t.allowDuplicateSelectionEvents)||!Ka(v,i()))&&c(v)};return B(()=>{const v=i();E(t.selectionBehavior)==="replace"&&g()==="toggle"&&typeof v=="object"&&v.size===0&&h("replace")}),B(()=>{h(E(t.selectionBehavior)??"toggle")}),{selectionMode:u,disallowEmptySelection:f,selectionBehavior:g,setSelectionBehavior:h,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:s,selectedKeys:i,setSelectedKeys:d}}function Ba(e){const[t,n]=R(""),[r,o]=R(-1);return{typeSelectHandlers:{onKeyDown:a=>{var u;if(E(e.isDisabled))return;const l=E(e.keyboardDelegate),i=E(e.selectionManager);if(!l.getKeyForSearch)return;const c=Na(a.key);if(!c||a.ctrlKey||a.metaKey)return;c===" "&&t().trim().length>0&&(a.preventDefault(),a.stopPropagation());let g=n(f=>f+c),h=l.getKeyForSearch(g,i.focusedKey())??l.getKeyForSearch(g);h==null&&Va(g)&&(g=g[0],h=l.getKeyForSearch(g,i.focusedKey())??l.getKeyForSearch(g)),h!=null&&(i.setFocusedKey(h),(u=e.onTypeSelect)==null||u.call(e,h)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Na(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Va(e){return e.split("").every(t=>t===e[0])}function Ha(e,t,n){const o=j({selectOnFocus:()=>E(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:a}=ft();let l={top:0,left:0};Bs(()=>E(o.isVirtualized)?void 0:s(),"scroll",()=>{const p=s();p&&(l={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:i}=Ba({isDisabled:()=>E(o.disallowTypeAhead),keyboardDelegate:()=>E(o.keyboardDelegate),selectionManager:()=>E(o.selectionManager)}),c=()=>E(o.orientation)??"vertical",g=p=>{var F,$,I,K,N,ne,Z,le;se(p,i.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const m=t();if(!(m!=null&&m.contains(p.target)))return;const b=E(o.selectionManager),w=E(o.selectOnFocus),x=_=>{_!=null&&(b.setFocusedKey(_),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(_):w&&!Fo(p)&&b.replaceSelection(_))},C=E(o.keyboardDelegate),O=E(o.shouldFocusWrap),T=b.focusedKey();switch(p.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(C.getKeyBelow){p.preventDefault();let _;T!=null?_=C.getKeyBelow(T):_=(F=C.getFirstKey)==null?void 0:F.call(C),_==null&&O&&(_=($=C.getFirstKey)==null?void 0:$.call(C,T)),x(_)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(C.getKeyAbove){p.preventDefault();let _;T!=null?_=C.getKeyAbove(T):_=(I=C.getLastKey)==null?void 0:I.call(C),_==null&&O&&(_=(K=C.getLastKey)==null?void 0:K.call(C,T)),x(_)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(C.getKeyLeftOf){p.preventDefault();const _=a()==="rtl";let W;T!=null?W=C.getKeyLeftOf(T):W=_?(N=C.getFirstKey)==null?void 0:N.call(C):(ne=C.getLastKey)==null?void 0:ne.call(C),x(W)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(C.getKeyRightOf){p.preventDefault();const _=a()==="rtl";let W;T!=null?W=C.getKeyRightOf(T):W=_?(Z=C.getLastKey)==null?void 0:Z.call(C):(le=C.getFirstKey)==null?void 0:le.call(C),x(W)}break}case"Home":if(C.getFirstKey){p.preventDefault();const _=C.getFirstKey(T,Et(p));_!=null&&(b.setFocusedKey(_),Et(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(_):w&&b.replaceSelection(_))}break;case"End":if(C.getLastKey){p.preventDefault();const _=C.getLastKey(T,Et(p));_!=null&&(b.setFocusedKey(_),Et(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(_):w&&b.replaceSelection(_))}break;case"PageDown":if(C.getKeyPageBelow&&T!=null){p.preventDefault();const _=C.getKeyPageBelow(T);x(_)}break;case"PageUp":if(C.getKeyPageAbove&&T!=null){p.preventDefault();const _=C.getKeyPageAbove(T);x(_)}break;case"a":Et(p)&&b.selectionMode()==="multiple"&&E(o.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),E(o.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!E(o.allowsTabNavigation)){if(p.shiftKey)m.focus();else{const _=la(m,{tabbable:!0});let W,J;do J=_.lastChild(),J&&(W=J);while(J);W&&!W.contains(document.activeElement)&&pe(W)}break}}},h=p=>{var x,C;const m=E(o.selectionManager),b=E(o.keyboardDelegate),w=E(o.selectOnFocus);if(m.isFocused()){p.currentTarget.contains(p.target)||m.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(m.setFocused(!0),m.focusedKey()==null){const O=F=>{F!=null&&(m.setFocusedKey(F),w&&m.replaceSelection(F))},T=p.relatedTarget;T&&p.currentTarget.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?O(m.lastSelectedKey()??((x=b.getLastKey)==null?void 0:x.call(b))):O(m.firstSelectedKey()??((C=b.getFirstKey)==null?void 0:C.call(b)))}else if(!E(o.isVirtualized)){const O=s();if(O){O.scrollTop=l.top,O.scrollLeft=l.left;const T=O.querySelector(`[data-key="${m.focusedKey()}"]`);T&&(pe(T),_n(O,T))}}}},u=p=>{const m=E(o.selectionManager);p.currentTarget.contains(p.relatedTarget)||m.setFocused(!1)},f=p=>{s()===p.target&&p.preventDefault()},d=()=>{var O,T;const p=E(o.autoFocus);if(!p)return;const m=E(o.selectionManager),b=E(o.keyboardDelegate);let w;p==="first"&&(w=(O=b.getFirstKey)==null?void 0:O.call(b)),p==="last"&&(w=(T=b.getLastKey)==null?void 0:T.call(b));const x=m.selectedKeys();x.size&&(w=x.values().next().value),m.setFocused(!0),m.setFocusedKey(w);const C=t();C&&w==null&&!E(o.shouldUseVirtualFocus)&&pe(C)};return Xt(()=>{o.deferAutoFocus?setTimeout(d,0):d()}),B(Je([s,()=>E(o.isVirtualized),()=>E(o.selectionManager).focusedKey()],p=>{var x;const[m,b,w]=p;if(b)w&&((x=o.scrollToKey)==null||x.call(o,w));else if(w&&m){const C=m.querySelector(`[data-key="${w}"]`);C&&_n(m,C)}})),{tabIndex:P(()=>{if(!E(o.shouldUseVirtualFocus))return E(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:g,onMouseDown:f,onFocusIn:h,onFocusOut:u}}function _o(e,t){const n=()=>E(e.selectionManager),r=()=>E(e.key),o=()=>E(e.shouldUseVirtualFocus),s=b=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):b!=null&&b.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Et(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},a=()=>n().isSelected(r()),l=()=>E(e.disabled)||n().isDisabled(r()),i=()=>!l()&&n().canSelectItem(r());let c=null;const g=b=>{i()&&(c=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!E(e.shouldSelectOnPressUp)&&s(b))},h=b=>{i()&&b.pointerType==="mouse"&&b.button===0&&E(e.shouldSelectOnPressUp)&&E(e.allowsDifferentPressOrigin)&&s(b)},u=b=>{i()&&(E(e.shouldSelectOnPressUp)&&!E(e.allowsDifferentPressOrigin)||c!=="mouse")&&s(b)},f=b=>{!i()||!["Enter"," "].includes(b.key)||(Fo(b)?n().toggleSelection(r()):s(b))},d=b=>{l()&&b.preventDefault()},v=b=>{const w=t();o()||l()||!w||b.target===w&&n().setFocusedKey(r())},p=P(()=>{if(!(o()||l()))return r()===n().focusedKey()?0:-1}),m=P(()=>E(e.virtualized)?void 0:r());return B(Je([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([b,w,x,C,O])=>{b&&w===C&&O&&!x&&document.activeElement!==b&&(e.focus?e.focus():pe(b))})),{isSelected:a,isDisabled:l,allowsSelection:i,tabIndex:p,dataKey:m,onPointerDown:g,onPointerUp:h,onClick:u,onKeyDown:f,onMouseDown:d,onFocus:v}}var Ga=class{constructor(e,t){qe(this,"collection");qe(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new Xe(n,r,t);for(const s of this.getKeyRange(r,n.currentKey||t))o.delete(s);for(const s of this.getKeyRange(t,r))this.canSelectItem(s)&&o.add(s);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Xe(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Xe([t],t,t):new Xe;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Xe;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Xe)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},zr=class{constructor(e){qe(this,"keyMap",new Map);qe(this,"iterable");qe(this,"firstKey");qe(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function Ua(e){const t=za(e),r=Aa({dataSource:()=>E(e.dataSource),getKey:()=>E(e.getKey),getTextValue:()=>E(e.getTextValue),getDisabled:()=>E(e.getDisabled),getSectionChildren:()=>E(e.getSectionChildren),factory:s=>e.filter?new zr(e.filter(s)):new zr(s)},[()=>e.filter]),o=new Ga(r,t);return ss(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var be=e=>typeof e=="function"?e():e,ja=e=>{const t=P(()=>{const a=be(e.element);if(a)return getComputedStyle(a)}),n=()=>{var a;return((a=t())==null?void 0:a.animationName)??"none"},[r,o]=R(be(e.show)?"present":"hidden");let s="none";return B(a=>{const l=be(e.show);return Gn(()=>{var g;if(a===l)return l;const i=s,c=n();l?o("present"):c==="none"||((g=t())==null?void 0:g.display)==="none"?o("hidden"):o(a===!0&&i!==c?"hiding":"hidden")}),l}),B(()=>{const a=be(e.element);if(!a)return;const l=c=>{c.target===a&&(s=n())},i=c=>{const h=n().includes(c.animationName);c.target===a&&h&&r()==="hiding"&&o("hidden")};a.addEventListener("animationstart",l),a.addEventListener("animationcancel",i),a.addEventListener("animationend",i),U(()=>{a.removeEventListener("animationstart",l),a.removeEventListener("animationcancel",i),a.removeEventListener("animationend",i)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},Wa=ja,Ro=Wa,fn="data-kb-top-layer",Ko,Kn=!1,et=[];function jt(e){return et.findIndex(t=>t.node===e)}function Qa(e){return et[jt(e)]}function Ya(e){return et[et.length-1].node===e}function zo(){return et.filter(e=>e.isPointerBlocking)}function Xa(){return[...zo()].slice(-1)[0]}function Zn(){return zo().length>0}function Bo(e){var n;const t=jt((n=Xa())==null?void 0:n.node);return jt(e)<t}function Za(e){et.push(e)}function Ja(e){const t=jt(e);t<0||et.splice(t,1)}function el(){for(const{node:e}of et)e.style.pointerEvents=Bo(e)?"none":"auto"}function tl(e){if(Zn()&&!Kn){const t=je(e);Ko=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Kn=!0}}function nl(e){if(Zn())return;const t=je(e);t.body.style.pointerEvents=Ko,t.body.style.length===0&&t.body.removeAttribute("style"),Kn=!1}var De={layers:et,isTopMostLayer:Ya,hasPointerBlockingLayer:Zn,isBelowPointerBlockingLayer:Bo,addLayer:Za,removeLayer:Ja,indexOf:jt,find:Qa,assignPointerEventToLayers:el,disableBodyPointerEvents:tl,restoreBodyPointerEvents:nl},rl={};xn(rl,{Button:()=>sl,Root:()=>Jn});var ol=["button","color","file","image","reset","submit"];function il(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?ol.indexOf(e.type)!==-1:!1}function Jn(e){let t;const n=Q({type:"button"},e),[r,o]=X(n,["ref","type","disabled"]),s=wn(()=>t,()=>"button"),a=P(()=>{const c=s();return c==null?!1:il({tagName:c,type:r.type})}),l=P(()=>s()==="input"),i=P(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return y(ae,j({as:"button",ref(c){const g=ke(h=>t=h,r.ref);typeof g=="function"&&g(c)},get type(){return a()||l()?r.type:void 0},get role(){return!a()&&!i()?"button":void 0},get tabIndex(){return!a()&&!i()&&!r.disabled?0:void 0},get disabled(){return a()||l()?r.disabled:void 0},get"aria-disabled"(){return!a()&&!l()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var sl=Jn,al=["top","right","bottom","left"],Ue=Math.min,Te=Math.max,gn=Math.round,an=Math.floor,ct=e=>({x:e,y:e}),ll={left:"right",right:"left",bottom:"top",top:"bottom"},cl={start:"end",end:"start"};function zn(e,t,n){return Te(e,Ue(t,n))}function wt(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function At(e){return e.split("-")[1]}function No(e){return e==="x"?"y":"x"}function er(e){return e==="y"?"height":"width"}function bt(e){return["top","bottom"].includes(ut(e))?"y":"x"}function tr(e){return No(bt(e))}function ul(e,t,n){n===void 0&&(n=!1);const r=At(e),o=tr(e),s=er(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=hn(a)),[a,hn(a)]}function dl(e){const t=hn(e);return[Bn(e),t,Bn(t)]}function Bn(e){return e.replace(/start|end/g,t=>cl[t])}function fl(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function gl(e,t,n,r){const o=At(e);let s=fl(ut(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Bn)))),s}function hn(e){return e.replace(/left|right|bottom|top/g,t=>ll[t])}function hl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vo(e){return typeof e!="number"?hl(e):{top:e,right:e,bottom:e,left:e}}function vn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Br(e,t,n){let{reference:r,floating:o}=e;const s=bt(t),a=tr(t),l=er(a),i=ut(t),c=s==="y",g=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,u=r[l]/2-o[l]/2;let f;switch(i){case"top":f={x:g,y:r.y-o.height};break;case"bottom":f={x:g,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-o.width,y:h};break;default:f={x:r.x,y:r.y}}switch(At(t)){case"start":f[a]-=u*(n&&c?-1:1);break;case"end":f[a]+=u*(n&&c?-1:1);break}return f}var vl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),i=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:h}=Br(c,r,i),u=r,f={},d=0;for(let v=0;v<l.length;v++){const{name:p,fn:m}=l[v],{x:b,y:w,data:x,reset:C}=await m({x:g,y:h,initialPlacement:r,placement:u,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});g=b??g,h=w??h,f={...f,[p]:{...f[p],...x}},C&&d<=50&&(d++,typeof C=="object"&&(C.placement&&(u=C.placement),C.rects&&(c=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:g,y:h}=Br(c,u,i)),v=-1)}return{x:g,y:h,placement:u,strategy:o,middlewareData:f}};async function Wt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:l,strategy:i}=e,{boundary:c="clippingAncestors",rootBoundary:g="viewport",elementContext:h="floating",altBoundary:u=!1,padding:f=0}=wt(t,e),d=Vo(f),p=l[u?h==="floating"?"reference":"floating":h],m=vn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:g,strategy:i})),b=h==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),x=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=vn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:i}):b);return{top:(m.top-C.top+d.top)/x.y,bottom:(C.bottom-m.bottom+d.bottom)/x.y,left:(m.left-C.left+d.left)/x.x,right:(C.right-m.right+d.right)/x.x}}var yl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:l,middlewareData:i}=t,{element:c,padding:g=0}=wt(e,t)||{};if(c==null)return{};const h=Vo(g),u={x:n,y:r},f=tr(o),d=er(f),v=await a.getDimensions(c),p=f==="y",m=p?"top":"left",b=p?"bottom":"right",w=p?"clientHeight":"clientWidth",x=s.reference[d]+s.reference[f]-u[f]-s.floating[d],C=u[f]-s.reference[f],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let T=O?O[w]:0;(!T||!await(a.isElement==null?void 0:a.isElement(O)))&&(T=l.floating[w]||s.floating[d]);const F=x/2-C/2,$=T/2-v[d]/2-1,I=Ue(h[m],$),K=Ue(h[b],$),N=I,ne=T-v[d]-K,Z=T/2-v[d]/2+F,le=zn(N,Z,ne),_=!i.arrow&&At(o)!=null&&Z!==le&&s.reference[d]/2-(Z<N?I:K)-v[d]/2<0,W=_?Z<N?Z-N:Z-ne:0;return{[f]:u[f]+W,data:{[f]:le,centerOffset:Z-le-W,..._&&{alignmentOffset:W}},reset:_}}}),ml=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:l,platform:i,elements:c}=t,{mainAxis:g=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:v=!0,...p}=wt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=ut(o),b=bt(l),w=ut(l)===l,x=await(i.isRTL==null?void 0:i.isRTL(c.floating)),C=u||(w||!v?[hn(l)]:dl(l)),O=d!=="none";!u&&O&&C.push(...gl(l,v,d,x));const T=[l,...C],F=await Wt(t,p),$=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(g&&$.push(F[m]),h){const Z=ul(o,a,x);$.push(F[Z[0]],F[Z[1]])}if(I=[...I,{placement:o,overflows:$}],!$.every(Z=>Z<=0)){var K,N;const Z=(((K=s.flip)==null?void 0:K.index)||0)+1,le=T[Z];if(le)return{data:{index:Z,overflows:I},reset:{placement:le}};let _=(N=I.filter(W=>W.overflows[0]<=0).sort((W,J)=>W.overflows[1]-J.overflows[1])[0])==null?void 0:N.placement;if(!_)switch(f){case"bestFit":{var ne;const W=(ne=I.filter(J=>{if(O){const ce=bt(J.placement);return ce===b||ce==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(ce=>ce>0).reduce((ce,we)=>ce+we,0)]).sort((J,ce)=>J[1]-ce[1])[0])==null?void 0:ne[0];W&&(_=W);break}case"initialPlacement":_=l;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Nr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vr(e){return al.some(t=>e[t]>=0)}var bl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=wt(e,t);switch(r){case"referenceHidden":{const s=await Wt(t,{...o,elementContext:"reference"}),a=Nr(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Vr(a)}}}case"escaped":{const s=await Wt(t,{...o,altBoundary:!0}),a=Nr(s,n.floating);return{data:{escapedOffsets:a,escaped:Vr(a)}}}default:return{}}}}};async function pl(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=ut(n),l=At(n),i=bt(n)==="y",c=["left","top"].includes(a)?-1:1,g=s&&i?-1:1,h=wt(t,e);let{mainAxis:u,crossAxis:f,alignmentAxis:d}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return l&&typeof d=="number"&&(f=l==="end"?d*-1:d),i?{x:f*g,y:u*c}:{x:u*c,y:f*g}}var wl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:l}=t,i=await pl(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+i.x,y:s+i.y,data:{...i,placement:a}}}}},xl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:p=>{let{x:m,y:b}=p;return{x:m,y:b}}},...i}=wt(e,t),c={x:n,y:r},g=await Wt(t,i),h=bt(ut(o)),u=No(h);let f=c[u],d=c[h];if(s){const p=u==="y"?"top":"left",m=u==="y"?"bottom":"right",b=f+g[p],w=f-g[m];f=zn(b,f,w)}if(a){const p=h==="y"?"top":"left",m=h==="y"?"bottom":"right",b=d+g[p],w=d-g[m];d=zn(b,d,w)}const v=l.fn({...t,[u]:f,[h]:d});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Cl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:a=()=>{},...l}=wt(e,t),i=await Wt(t,l),c=ut(n),g=At(n),h=bt(n)==="y",{width:u,height:f}=r.floating;let d,v;c==="top"||c==="bottom"?(d=c,v=g===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=c,d=g==="end"?"top":"bottom");const p=f-i.top-i.bottom,m=u-i.left-i.right,b=Ue(f-i[d],p),w=Ue(u-i[v],m),x=!t.middlewareData.shift;let C=b,O=w;if(h?O=g||x?Ue(w,m):m:C=g||x?Ue(b,p):p,x&&!g){const F=Te(i.left,0),$=Te(i.right,0),I=Te(i.top,0),K=Te(i.bottom,0);h?O=u-2*(F!==0||$!==0?F+$:Te(i.left,i.right)):C=f-2*(I!==0||K!==0?I+K:Te(i.top,i.bottom))}await a({...t,availableWidth:O,availableHeight:C});const T=await o.getDimensions(s.floating);return u!==T.width||f!==T.height?{reset:{rects:!0}}:{}}}};function Tt(e){return Ho(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(e){var t;return(t=(Ho(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ho(e){return e instanceof Node||e instanceof Pe(e).Node}function Ne(e){return e instanceof Element||e instanceof Pe(e).Element}function We(e){return e instanceof HTMLElement||e instanceof Pe(e).HTMLElement}function Hr(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function tn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ve(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $l(e){return["table","td","th"].includes(Tt(e))}function Cn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function nr(e){const t=rr(),n=Ne(e)?Ve(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Sl(e){let t=dt(e);for(;We(t)&&!Dt(t);){if(nr(t))return t;if(Cn(t))return null;t=dt(t)}return null}function rr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Dt(e){return["html","body","#document"].includes(Tt(e))}function Ve(e){return Pe(e).getComputedStyle(e)}function $n(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dt(e){if(Tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hr(e)&&e.host||tt(e);return Hr(t)?t.host:t}function Go(e){const t=dt(e);return Dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&tn(t)?t:Go(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Go(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Pe(o);return s?t.concat(a,a.visualViewport||[],tn(o)?o:[],a.frameElement&&n?Qt(a.frameElement):[]):t.concat(o,Qt(o,[],n))}function Uo(e){const t=Ve(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=We(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=gn(n)!==s||gn(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function or(e){return Ne(e)?e:e.contextElement}function It(e){const t=or(e);if(!We(t))return ct(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Uo(t);let a=(s?gn(n.width):n.width)/r,l=(s?gn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}var kl=ct(0);function jo(e){const t=Pe(e);return!rr()||!t.visualViewport?kl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function El(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function pt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=or(e);let a=ct(1);t&&(r?Ne(r)&&(a=It(r)):a=It(e));const l=El(s,n,r)?jo(s):ct(0);let i=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,g=o.width/a.x,h=o.height/a.y;if(s){const u=Pe(s),f=r&&Ne(r)?Pe(r):r;let d=u,v=d.frameElement;for(;v&&r&&f!==d;){const p=It(v),m=v.getBoundingClientRect(),b=Ve(v),w=m.left+(v.clientLeft+parseFloat(b.paddingLeft))*p.x,x=m.top+(v.clientTop+parseFloat(b.paddingTop))*p.y;i*=p.x,c*=p.y,g*=p.x,h*=p.y,i+=w,c+=x,d=Pe(v),v=d.frameElement}}return vn({width:g,height:h,x:i,y:c})}function Ml(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=tt(r),l=t?Cn(t.floating):!1;if(r===a||l&&s)return n;let i={scrollLeft:0,scrollTop:0},c=ct(1);const g=ct(0),h=We(r);if((h||!h&&!s)&&((Tt(r)!=="body"||tn(a))&&(i=$n(r)),We(r))){const u=pt(r);c=It(r),g.x=u.x+r.clientLeft,g.y=u.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-i.scrollLeft*c.x+g.x,y:n.y*c.y-i.scrollTop*c.y+g.y}}function Il(e){return Array.from(e.getClientRects())}function Wo(e){return pt(tt(e)).left+$n(e).scrollLeft}function Dl(e){const t=tt(e),n=$n(e),r=e.ownerDocument.body,o=Te(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Te(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Wo(e);const l=-n.scrollTop;return Ve(r).direction==="rtl"&&(a+=Te(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:l}}function Al(e,t){const n=Pe(e),r=tt(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,i=0;if(o){s=o.width,a=o.height;const c=rr();(!c||c&&t==="fixed")&&(l=o.offsetLeft,i=o.offsetTop)}return{width:s,height:a,x:l,y:i}}function Tl(e,t){const n=pt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=We(e)?It(e):ct(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,i=o*s.x,c=r*s.y;return{width:a,height:l,x:i,y:c}}function Gr(e,t,n){let r;if(t==="viewport")r=Al(e,n);else if(t==="document")r=Dl(tt(e));else if(Ne(t))r=Tl(t,n);else{const o=jo(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return vn(r)}function Qo(e,t){const n=dt(e);return n===t||!Ne(n)||Dt(n)?!1:Ve(n).position==="fixed"||Qo(n,t)}function Pl(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(l=>Ne(l)&&Tt(l)!=="body"),o=null;const s=Ve(e).position==="fixed";let a=s?dt(e):e;for(;Ne(a)&&!Dt(a);){const l=Ve(a),i=nr(a);!i&&l.position==="fixed"&&(o=null),(s?!i&&!o:!i&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||tn(a)&&!i&&Qo(e,a))?r=r.filter(g=>g!==a):o=l,a=dt(a)}return t.set(e,r),r}function Ll(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Cn(t)?[]:Pl(t,this._c):[].concat(n),r],l=a[0],i=a.reduce((c,g)=>{const h=Gr(t,g,o);return c.top=Te(h.top,c.top),c.right=Ue(h.right,c.right),c.bottom=Ue(h.bottom,c.bottom),c.left=Te(h.left,c.left),c},Gr(t,l,o));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}}function Ol(e){const{width:t,height:n}=Uo(e);return{width:t,height:n}}function ql(e,t,n){const r=We(t),o=tt(t),s=n==="fixed",a=pt(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const i=ct(0);if(r||!r&&!s)if((Tt(t)!=="body"||tn(o))&&(l=$n(t)),r){const h=pt(t,!0,s,t);i.x=h.x+t.clientLeft,i.y=h.y+t.clientTop}else o&&(i.x=Wo(o));const c=a.left+l.scrollLeft-i.x,g=a.top+l.scrollTop-i.y;return{x:c,y:g,width:a.width,height:a.height}}function An(e){return Ve(e).position==="static"}function Ur(e,t){return!We(e)||Ve(e).position==="fixed"?null:t?t(e):e.offsetParent}function Yo(e,t){const n=Pe(e);if(Cn(e))return n;if(!We(e)){let o=dt(e);for(;o&&!Dt(o);){if(Ne(o)&&!An(o))return o;o=dt(o)}return n}let r=Ur(e,t);for(;r&&$l(r)&&An(r);)r=Ur(r,t);return r&&Dt(r)&&An(r)&&!nr(r)?n:r||Sl(e)||n}var Fl=async function(e){const t=this.getOffsetParent||Yo,n=this.getDimensions,r=await n(e.floating);return{reference:ql(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _l(e){return Ve(e).direction==="rtl"}var Xo={convertOffsetParentRelativeRectToViewportRelativeRect:Ml,getDocumentElement:tt,getClippingRect:Ll,getOffsetParent:Yo,getElementRects:Fl,getClientRects:Il,getDimensions:Ol,getScale:It,isElement:Ne,isRTL:_l};function Rl(e,t){let n=null,r;const o=tt(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,i){l===void 0&&(l=!1),i===void 0&&(i=1),s();const{left:c,top:g,width:h,height:u}=e.getBoundingClientRect();if(l||t(),!h||!u)return;const f=an(g),d=an(o.clientWidth-(c+h)),v=an(o.clientHeight-(g+u)),p=an(c),b={rootMargin:-f+"px "+-d+"px "+-v+"px "+-p+"px",threshold:Te(0,Ue(1,i))||1};let w=!0;function x(C){const O=C[0].intersectionRatio;if(O!==i){if(!w)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(x,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,b)}n.observe(e)}return a(!0),s}function Kl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:i=!1}=r,c=or(e),g=o||s?[...c?Qt(c):[],...Qt(t)]:[];g.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const h=c&&l?Rl(c,n):null;let u=-1,f=null;a&&(f=new ResizeObserver(m=>{let[b]=m;b&&b.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!i&&f.observe(c),f.observe(t));let d,v=i?pt(e):null;i&&p();function p(){const m=pt(e);v&&(m.x!==v.x||m.y!==v.y||m.width!==v.width||m.height!==v.height)&&n(),v=m,d=requestAnimationFrame(p)}return n(),()=>{var m;g.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),h==null||h(),(m=f)==null||m.disconnect(),f=null,i&&cancelAnimationFrame(d)}}var zl=wl,Bl=xl,Nl=ml,Vl=Cl,Hl=bl,Gl=yl,Ul=(e,t,n)=>{const r=new Map,o={platform:Xo,...n},s={...o.platform,_c:r};return vl(e,t,{...o,platform:s})},ir=ye();function sr(){const e=me(ir);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var jl=q('<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),Nn=30,jr=Nn/2,Wl={top:180,right:-90,bottom:0,left:90};function ar(e){const t=sr(),n=Q({size:Nn},e),[r,o]=X(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],a=Ql(t.contentRef),l=()=>{var u;return((u=a())==null?void 0:u.getPropertyValue("background-color"))||"none"},i=()=>{var u;return((u=a())==null?void 0:u.getPropertyValue(`border-${s()}-color`))||"none"},c=()=>{var u;return((u=a())==null?void 0:u.getPropertyValue(`border-${s()}-width`))||"0px"},g=()=>Number.parseInt(c())*2*(Nn/r.size),h=()=>`rotate(${Wl[s()]} ${jr} ${jr}) translate(0 2)`;return y(ae,j({as:"div",ref(u){const f=ke(t.setArrowRef,r.ref);typeof f=="function"&&f(u)},"aria-hidden":"true",get style(){return bn({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:l(),stroke:i(),"stroke-width":g()},r.style)}},o,{get children(){const u=jl(),f=u.firstChild;return H(()=>$e(f,"transform",h())),u}}))}function Ql(e){const[t,n]=R();return B(()=>{const r=e();r&&n(Ws(r).getComputedStyle(r))}),t}function Yl(e){const t=sr(),[n,r]=X(e,["ref","style"]);return y(ae,j({as:"div",ref(o){const s=ke(t.setPositionerRef,n.ref);typeof s=="function"&&s(o)},"data-popper-positioner":"",get style(){return bn({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function Wr(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const s={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...s,toJSON:()=>s}}function Xl(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Wr(r):e?e.getBoundingClientRect():Wr()}}}function Zl(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Jl={top:"bottom",right:"left",bottom:"top",left:"right"};function ec(e,t){const[n,r]=e.split("-"),o=Jl[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function tc(e){const t=Q({getAnchorRect:u=>u==null?void 0:u.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=R(),[o,s]=R(),[a,l]=R(t.placement),i=()=>{var u;return Xl((u=t.anchorRef)==null?void 0:u.call(t),t.getAnchorRect)},{direction:c}=ft();async function g(){var O,T;const u=i(),f=n(),d=o();if(!u||!f)return;const v=((d==null?void 0:d.clientHeight)||0)/2,p=typeof t.gutter=="number"?t.gutter+v:t.gutter??v;f.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),u.getBoundingClientRect();const m=[zl(({placement:F})=>{const $=!!F.split("-")[1];return{mainAxis:p,crossAxis:$?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const F=typeof t.flip=="string"?t.flip.split(" "):void 0;if(F!==void 0&&!F.every(Zl))throw new Error("`flip` expects a spaced-delimited list of placements");m.push(Nl({padding:t.overflowPadding,fallbackPlacements:F}))}(t.slide||t.overlap)&&m.push(Bl({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),m.push(Vl({padding:t.overflowPadding,apply({availableWidth:F,availableHeight:$,rects:I}){const K=Math.round(I.reference.width);F=Math.floor(F),$=Math.floor($),f.style.setProperty("--kb-popper-anchor-width",`${K}px`),f.style.setProperty("--kb-popper-content-available-width",`${F}px`),f.style.setProperty("--kb-popper-content-available-height",`${$}px`),t.sameWidth&&(f.style.width=`${K}px`),t.fitViewport&&(f.style.maxWidth=`${F}px`,f.style.maxHeight=`${$}px`)}})),t.hideWhenDetached&&m.push(Hl({padding:t.detachedPadding})),d&&m.push(Gl({element:d,padding:t.arrowPadding}));const b=await Ul(u,f,{placement:t.placement,strategy:"absolute",middleware:m,platform:{...Xo,isRTL:()=>c()==="rtl"}});if(l(b.placement),(O=t.onCurrentPlacementChange)==null||O.call(t,b.placement),!f)return;f.style.setProperty("--kb-popper-content-transform-origin",ec(b.placement,c()));const w=Math.round(b.x),x=Math.round(b.y);let C;if(t.hideWhenDetached&&(C=(T=b.middlewareData.hide)!=null&&T.referenceHidden?"hidden":"visible"),Object.assign(f.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${x}px, 0)`,visibility:C}),d&&b.middlewareData.arrow){const{x:F,y:$}=b.middlewareData.arrow,I=b.placement.split("-")[0];Object.assign(d.style,{left:F!=null?`${F}px`:"",top:$!=null?`${$}px`:"",[I]:"100%"})}}B(()=>{const u=i(),f=n();if(!u||!f)return;const d=Kl(u,f,g,{elementResize:typeof ResizeObserver=="function"});U(d)}),B(()=>{var d;const u=n(),f=(d=t.contentRef)==null?void 0:d.call(t);!u||!f||queueMicrotask(()=>{u.style.zIndex=getComputedStyle(f).zIndex})});const h={currentPlacement:a,contentRef:()=>{var u;return(u=t.contentRef)==null?void 0:u.call(t)},setPositionerRef:r,setArrowRef:s};return y(ir.Provider,{value:h,get children(){return t.children}})}var Zo=Object.assign(tc,{Arrow:ar,Context:ir,usePopperContext:sr,Positioner:Yl});function nc(e){const t=n=>{var r;n.key===Wn.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};B(()=>{var r;if(E(e.isDisabled))return;const n=((r=e.ownerDocument)==null?void 0:r.call(e))??je();n.addEventListener("keydown",t),U(()=>{n.removeEventListener("keydown",t)})})}var Qr="interactOutside.pointerDownOutside",Yr="interactOutside.focusOutside";function rc(e,t){let n,r=ua;const o=()=>je(t()),s=h=>{var u;return(u=e.onPointerDownOutside)==null?void 0:u.call(e,h)},a=h=>{var u;return(u=e.onFocusOutside)==null?void 0:u.call(e,h)},l=h=>{var u;return(u=e.onInteractOutside)==null?void 0:u.call(e,h)},i=h=>{var f;const u=h.target;return!(u instanceof HTMLElement)||u.closest(`[${fn}]`)||!Ke(o(),u)||Ke(t(),u)?!1:!((f=e.shouldExcludeElement)!=null&&f.call(e,u))},c=h=>{function u(){const f=t(),d=h.target;if(!f||!d||!i(h))return;const v=he([s,l]);d.addEventListener(Qr,v,{once:!0});const p=new CustomEvent(Qr,{bubbles:!1,cancelable:!0,detail:{originalEvent:h,isContextMenu:h.button===2||Js(h)&&h.button===0}});d.dispatchEvent(p)}h.pointerType==="touch"?(o().removeEventListener("click",u),r=u,o().addEventListener("click",u,{once:!0})):u()},g=h=>{const u=t(),f=h.target;if(!u||!f||!i(h))return;const d=he([a,l]);f.addEventListener(Yr,d,{once:!0});const v=new CustomEvent(Yr,{bubbles:!1,cancelable:!0,detail:{originalEvent:h,isContextMenu:!1}});f.dispatchEvent(v)};B(()=>{E(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",g,!0),U(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",g,!0)}))})}var Jo=ye();function oc(){return me(Jo)}function ic(e){let t;const n=oc(),[r,o]=X(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),a=h=>{s.add(h);const u=n==null?void 0:n.registerNestedLayer(h);return()=>{s.delete(h),u==null||u()}};rc({shouldExcludeElement:h=>{var u;return t?((u=r.excludedElements)==null?void 0:u.some(f=>Ke(f(),h)))||[...s].some(f=>Ke(f,h)):!1},onPointerDownOutside:h=>{var u,f,d;!t||De.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!De.isTopMostLayer(t)||((u=r.onPointerDownOutside)==null||u.call(r,h),(f=r.onInteractOutside)==null||f.call(r,h),h.defaultPrevented||(d=r.onDismiss)==null||d.call(r))},onFocusOutside:h=>{var u,f,d;(u=r.onFocusOutside)==null||u.call(r,h),(f=r.onInteractOutside)==null||f.call(r,h),h.defaultPrevented||(d=r.onDismiss)==null||d.call(r)}},()=>t),nc({ownerDocument:()=>je(t),onEscapeKeyDown:h=>{var u;!t||!De.isTopMostLayer(t)||((u=r.onEscapeKeyDown)==null||u.call(r,h),!h.defaultPrevented&&r.onDismiss&&(h.preventDefault(),r.onDismiss()))}}),Xt(()=>{if(!t)return;De.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const h=n==null?void 0:n.registerNestedLayer(t);De.assignPointerEventToLayers(),De.disableBodyPointerEvents(t),U(()=>{t&&(De.removeLayer(t),h==null||h(),De.assignPointerEventToLayers(),De.restoreBodyPointerEvents(t))})}),B(Je([()=>t,()=>r.disableOutsidePointerEvents],([h,u])=>{if(!h)return;const f=De.find(h);f&&f.isPointerBlocking!==u&&(f.isPointerBlocking=u,De.assignPointerEventToLayers()),u&&De.disableBodyPointerEvents(h),U(()=>{De.restoreBodyPointerEvents(h)})},{defer:!0}));const g={registerNestedLayer:a};return y(Jo.Provider,{value:g,get children(){return y(ae,j({as:"div",ref(h){const u=ke(f=>t=f,r.ref);typeof u=="function"&&u(h)}},o))}})}function ei(e={}){const[t,n]=Io({value:()=>E(e.open),defaultValue:()=>!!E(e.defaultOpen),onChange:a=>{var l;return(l=e.onOpenChange)==null?void 0:l.call(e,a)}}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var Re={};xn(Re,{Description:()=>Eo,ErrorMessage:()=>Mo,Item:()=>oi,ItemControl:()=>ii,ItemDescription:()=>si,ItemIndicator:()=>ai,ItemInput:()=>li,ItemLabel:()=>ci,Label:()=>ui,RadioGroup:()=>sc,Root:()=>di});var ti=ye();function ni(){const e=me(ti);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var ri=ye();function nn(){const e=me(ri);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function oi(e){const t=Jt(),n=ni(),r=`${t.generateId("item")}-${He()}`,o=Q({id:r},e),[s,a]=X(o,["value","disabled","onPointerDown"]),[l,i]=R(),[c,g]=R(),[h,u]=R(),[f,d]=R(),[v,p]=R(!1),m=P(()=>n.isSelectedValue(s.value)),b=P(()=>s.disabled||t.isDisabled()||!1),w=O=>{se(O,s.onPointerDown),v()&&O.preventDefault()},x=P(()=>({...t.dataset(),"data-disabled":b()?"":void 0,"data-checked":m()?"":void 0})),C={value:()=>s.value,dataset:x,isSelected:m,isDisabled:b,inputId:l,labelId:c,descriptionId:h,inputRef:f,select:()=>n.setSelectedValue(s.value),generateId:Zt(()=>a.id),registerInput:ze(i),registerLabel:ze(g),registerDescription:ze(u),setIsFocused:p,setInputRef:d};return y(ri.Provider,{value:C,get children(){return y(ae,j({as:"div",role:"group",onPointerDown:w},x,a))}})}function ii(e){const t=nn(),n=Q({id:t.generateId("control")},e),[r,o]=X(n,["onClick","onKeyDown"]);return y(ae,j({as:"div",onClick:l=>{var i;se(l,r.onClick),t.select(),(i=t.inputRef())==null||i.focus()},onKeyDown:l=>{var i;se(l,r.onKeyDown),l.key===Wn.Space&&(t.select(),(i=t.inputRef())==null||i.focus())}},()=>t.dataset(),o))}function si(e){const t=nn(),n=Q({id:t.generateId("description")},e);return B(()=>U(t.registerDescription(n.id))),y(ae,j({as:"div"},()=>t.dataset(),n))}function ai(e){const t=nn(),n=Q({id:t.generateId("indicator")},e),[r,o]=X(n,["ref","forceMount"]),[s,a]=R(),{present:l}=Ro({show:()=>r.forceMount||t.isSelected(),element:()=>s()??null});return y(z,{get when(){return l()},get children(){return y(ae,j({as:"div",ref(i){const c=ke(a,r.ref);typeof c=="function"&&c(i)}},()=>t.dataset(),o))}})}function li(e){const t=Jt(),n=ni(),r=nn(),o=Q({id:r.generateId("input")},e),[s,a]=X(o,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),l=()=>[s["aria-labelledby"],r.labelId(),s["aria-labelledby"]!=null&&a["aria-label"]!=null?a.id:void 0].filter(Boolean).join(" ")||void 0,i=()=>[s["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,g]=R(!1),h=d=>{if(se(d,s.onChange),d.stopPropagation(),!c()){n.setSelectedValue(r.value());const v=d.target;v.checked=r.isSelected()}g(!1)},u=d=>{se(d,s.onFocus),r.setIsFocused(!0)},f=d=>{se(d,s.onBlur),r.setIsFocused(!1)};return B(Je([()=>r.isSelected(),()=>r.value()],d=>{if(!d[0]&&d[1]===r.value())return;g(!0);const v=r.inputRef();v==null||v.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),v==null||v.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),B(()=>U(r.registerInput(a.id))),y(ae,j({as:"input",ref(d){const v=ke(r.setInputRef,s.ref);typeof v=="function"&&v(d)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return bn({...So},s.style)},get"aria-labelledby"(){return l()},get"aria-describedby"(){return i()},onChange:h,onFocus:u,onBlur:f},()=>r.dataset(),a))}function ci(e){const t=nn(),n=Q({id:t.generateId("label")},e);return B(()=>U(t.registerLabel(n.id))),y(ae,j({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function ui(e){return y(va,j({as:"span"},e))}function di(e){let t;const n=`radiogroup-${He()}`,r=Q({id:n,orientation:"vertical"},e),[o,s,a]=X(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],ga),[l,i]=en({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:d=>{var v;return(v=o.onChange)==null?void 0:v.call(o,d)}}),{formControlContext:c}=ha(s);ya(()=>t,()=>i(o.defaultValue??""));const g=()=>c.getAriaLabelledBy(E(s.id),a["aria-label"],o["aria-labelledby"]),h=()=>c.getAriaDescribedBy(o["aria-describedby"]),u=d=>d===l(),f={ariaDescribedBy:h,isSelectedValue:u,setSelectedValue:d=>{if(!(c.isReadOnly()||c.isDisabled())&&(i(d),t))for(const v of t.querySelectorAll("[type='radio']")){const p=v;p.checked=u(p.value)}}};return y(ko.Provider,{value:c,get children(){return y(ti.Provider,{value:f,get children(){return y(ae,j({as:"div",ref(d){const v=ke(p=>t=p,o.ref);typeof v=="function"&&v(d)},role:"radiogroup",get id(){return E(s.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return o.orientation},get"aria-labelledby"(){return g()},get"aria-describedby"(){return h()}},()=>c.dataset(),a))}})}})}var sc=Object.assign(di,{Description:Eo,ErrorMessage:Mo,Item:oi,ItemControl:ii,ItemDescription:si,ItemIndicator:ai,ItemInput:li,ItemLabel:ci,Label:ui}),ac=class{constructor(e,t,n){qe(this,"collection");qe(this,"ref");qe(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n;return((n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))??null}getKeyPageAbove(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){var o;const n=(o=this.collator)==null?void 0:o.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const s=this.collection().getItem(r);if(s){const a=s.textValue.slice(0,e.length);if(s.textValue&&n.compare(a,e)===0)return r}r=this.getKeyBelow(r)}}};function lc(e,t,n){const r=_a({usage:"search",sensitivity:"base"}),o=P(()=>{const s=E(e.keyboardDelegate);return s||new ac(e.collection,t,r)});return Ha({selectionManager:()=>E(e.selectionManager),keyboardDelegate:o,autoFocus:()=>E(e.autoFocus),deferAutoFocus:()=>E(e.deferAutoFocus),shouldFocusWrap:()=>E(e.shouldFocusWrap),disallowEmptySelection:()=>E(e.disallowEmptySelection),selectOnFocus:()=>E(e.selectOnFocus),disallowTypeAhead:()=>E(e.disallowTypeAhead),shouldUseVirtualFocus:()=>E(e.shouldUseVirtualFocus),allowsTabNavigation:()=>E(e.allowsTabNavigation),isVirtualized:()=>E(e.isVirtualized),scrollToKey:s=>{var a;return(a=E(e.scrollToKey))==null?void 0:a(s)},orientation:()=>E(e.orientation)},t)}var Tn="focusScope.autoFocusOnMount",Pn="focusScope.autoFocusOnUnmount",Xr={bubbles:!1,cancelable:!0},Zr={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=Fn(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=Fn(this.stack,e),(t=this.active())==null||t.resume()}};function cc(e,t){const[n,r]=R(!1),o={pause(){r(!0)},resume(){r(!1)}};let s=null;const a=d=>{var v;return(v=e.onMountAutoFocus)==null?void 0:v.call(e,d)},l=d=>{var v;return(v=e.onUnmountAutoFocus)==null?void 0:v.call(e,d)},i=()=>je(t()),c=()=>{const d=i().createElement("span");return d.setAttribute("data-focus-trap",""),d.tabIndex=0,Object.assign(d.style,So),d},g=()=>{const d=t();return d?Co(d,!0).filter(v=>!v.hasAttribute("data-focus-trap")):[]},h=()=>{const d=g();return d.length>0?d[0]:null},u=()=>{const d=g();return d.length>0?d[d.length-1]:null},f=()=>{const d=t();if(!d)return!1;const v=Ht(d);return!v||Ke(d,v)?!1:$o(v)};B(()=>{const d=t();if(!d)return;Zr.add(o);const v=Ht(d);if(!Ke(d,v)){const m=new CustomEvent(Tn,Xr);d.addEventListener(Tn,a),d.dispatchEvent(m),m.defaultPrevented||setTimeout(()=>{pe(h()),Ht(d)===v&&pe(d)},0)}U(()=>{d.removeEventListener(Tn,a),setTimeout(()=>{const m=new CustomEvent(Pn,Xr);f()&&m.preventDefault(),d.addEventListener(Pn,l),d.dispatchEvent(m),m.defaultPrevented||pe(v??i().body),d.removeEventListener(Pn,l),Zr.remove(o)},0)})}),B(()=>{const d=t();if(!d||!E(e.trapFocus)||n())return;const v=m=>{const b=m.target;b!=null&&b.closest(`[${fn}]`)||(Ke(d,b)?s=b:pe(s))},p=m=>{const w=m.relatedTarget??Ht(d);w!=null&&w.closest(`[${fn}]`)||Ke(d,w)||pe(s)};i().addEventListener("focusin",v),i().addEventListener("focusout",p),U(()=>{i().removeEventListener("focusin",v),i().removeEventListener("focusout",p)})}),B(()=>{const d=t();if(!d||!E(e.trapFocus)||n())return;const v=c();d.insertAdjacentElement("afterbegin",v);const p=c();d.insertAdjacentElement("beforeend",p);function m(w){const x=h(),C=u();w.relatedTarget===x?pe(C):pe(x)}v.addEventListener("focusin",m),p.addEventListener("focusin",m);const b=new MutationObserver(w=>{for(const x of w)x.previousSibling===p&&(p.remove(),d.insertAdjacentElement("beforeend",p)),x.nextSibling===v&&(v.remove(),d.insertAdjacentElement("afterbegin",v))});b.observe(d,{childList:!0,subtree:!1}),U(()=>{v.removeEventListener("focusin",m),p.removeEventListener("focusin",m),v.remove(),p.remove(),b.disconnect()})})}var uc="data-live-announcer";function dc(e){B(()=>{E(e.isDisabled)||U(fc(E(e.targets),E(e.root)))})}var Bt=new WeakMap,_e=[];function fc(e,t=document.body){const n=new Set(e),r=new Set,o=i=>{for(const u of i.querySelectorAll(`[${uc}], [${fn}]`))n.add(u);const c=u=>{if(n.has(u)||u.parentElement&&r.has(u.parentElement)&&u.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const f of n)if(u.contains(f))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},g=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),h=c(i);if(h===NodeFilter.FILTER_ACCEPT&&s(i),h!==NodeFilter.FILTER_REJECT){let u=g.nextNode();for(;u!=null;)s(u),u=g.nextNode()}},s=i=>{const c=Bt.get(i)??0;i.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&i.setAttribute("aria-hidden","true"),r.add(i),Bt.set(i,c+1))};_e.length&&_e[_e.length-1].disconnect(),o(t);const a=new MutationObserver(i=>{for(const c of i)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(g=>g.contains(c.target))){for(const g of c.removedNodes)g instanceof Element&&(n.delete(g),r.delete(g));for(const g of c.addedNodes)(g instanceof HTMLElement||g instanceof SVGElement)&&(g.dataset.liveAnnouncer==="true"||g.dataset.reactAriaTopLayer==="true")?n.add(g):g instanceof Element&&o(g)}});a.observe(t,{childList:!0,subtree:!0});const l={observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return _e.push(l),()=>{a.disconnect();for(const i of r){const c=Bt.get(i);if(c==null)return;c===1?(i.removeAttribute("aria-hidden"),Bt.delete(i)):Bt.set(i,c-1)}l===_e[_e.length-1]?(_e.pop(),_e.length&&_e[_e.length-1].observe()):_e.splice(_e.indexOf(l),1)}}var ln=new Map,gc=e=>{B(()=>{const t=be(e.style)??{},n=be(e.properties)??[],r={};for(const s in t)r[s]=e.element.style[s];const o=ln.get(e.key);o?o.activeCount++:ln.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(s=>s.key)}),Object.assign(e.element.style,e.style);for(const s of n)e.element.style.setProperty(s.key,s.value);U(()=>{var a;const s=ln.get(e.key);if(s){if(s.activeCount!==1){s.activeCount--;return}ln.delete(e.key);for(const[l,i]of Object.entries(s.originalStyles))e.element.style[l]=i;for(const l of s.properties)e.element.style.removeProperty(l);e.element.style.length===0&&e.element.removeAttribute("style"),(a=e.cleanup)==null||a.call(e)}})})},Jr=gc,hc=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},vc=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},yc=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,s=0,a=0,l=!1;do{const[i,c,g]=hc(o,t),h=g-i-r*c;(c!==0||h!==0)&&vc(o,t)&&(s+=h,a+=c),o===(n??document.documentElement)?l=!0:o=o._$host??o.parentElement}while(o&&!l);return[s,a]},[eo,to]=R([]),mc=e=>eo().indexOf(e)===eo().length-1,bc=e=>{const t=j({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=He();let r=[0,0],o=null,s=null;B(()=>{be(t.enabled)&&(to(c=>[...c,n]),U(()=>{to(c=>c.filter(g=>g!==n))}))}),B(()=>{if(!be(t.enabled)||!be(t.hideScrollbar))return;const{body:c}=document,g=window.innerWidth-c.offsetWidth;if(be(t.preventScrollbarShift)){const h={overflow:"hidden"},u=[];g>0&&(be(t.preventScrollbarShiftMode)==="padding"?h.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${g}px)`:h.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${g}px)`,u.push({key:"--scrollbar-width",value:`${g}px`}));const f=window.scrollY,d=window.scrollX;Jr({key:"prevent-scroll",element:c,style:h,properties:u,cleanup:()=>{be(t.restoreScrollPosition)&&g>0&&window.scrollTo(d,f)}})}else Jr({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),B(()=>{!mc(n)||!be(t.enabled)||(document.addEventListener("wheel",l,{passive:!1}),document.addEventListener("touchstart",a,{passive:!1}),document.addEventListener("touchmove",i,{passive:!1}),U(()=>{document.removeEventListener("wheel",l),document.removeEventListener("touchstart",a),document.removeEventListener("touchmove",i)}))});const a=c=>{r=no(c),o=null,s=null},l=c=>{const g=c.target,h=be(t.element),u=pc(c),f=Math.abs(u[0])>Math.abs(u[1])?"x":"y",d=f==="x"?u[0]:u[1],v=ro(g,f,d,h);let p;h&&Vn(h,g)?p=!v:p=!0,p&&c.cancelable&&c.preventDefault()},i=c=>{const g=be(t.element),h=c.target;let u;if(c.touches.length===2)u=!be(t.allowPinchZoom);else{if(o==null||s===null){const f=no(c).map((v,p)=>r[p]-v),d=Math.abs(f[0])>Math.abs(f[1])?"x":"y";o=d,s=d==="x"?f[0]:f[1]}if(h.type==="range")u=!1;else{const f=ro(h,o,s,g);g&&Vn(g,h)?u=!f:u=!0}}u&&c.cancelable&&c.preventDefault()}},pc=e=>[e.deltaX,e.deltaY],no=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],ro=(e,t,n,r)=>{const o=r!==null&&Vn(r,e),[s,a]=yc(e,t,o?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(a)<1)},Vn=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},wc=bc,xc=wc,fi=ye();function gi(){return me(fi)}function nt(){const e=gi();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var hi=ye();function lr(){const e=me(hi);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var vi=ye();function Qe(){const e=me(vi);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function cr(e){let t;const n=Qe(),r=nt(),o=Q({id:n.generateId(`item-${He()}`)},e),[s,a]=X(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[l,i]=R(),[c,g]=R(),[h,u]=R(),f=()=>r.listState().selectionManager(),d=()=>a.id,v=()=>f().focusedKey()===d(),p=()=>{var $;($=s.onSelect)==null||$.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};Da({getItem:()=>{var $;return{ref:()=>t,type:"item",key:d(),textValue:s.textValue??(($=h())==null?void 0:$.textContent)??(t==null?void 0:t.textContent)??"",disabled:s.disabled??!1}}});const m=_o({key:d,selectionManager:f,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),b=$=>{se($,s.onPointerMove),$.pointerType==="mouse"&&(s.disabled?r.onItemLeave($):(r.onItemEnter($),$.defaultPrevented||(pe($.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(d()))))},w=$=>{se($,s.onPointerLeave),$.pointerType==="mouse"&&r.onItemLeave($)},x=$=>{se($,s.onPointerUp),!s.disabled&&$.button===0&&p()},C=$=>{if(se($,s.onKeyDown),!$.repeat&&!s.disabled)switch($.key){case"Enter":case" ":p();break}},O=P(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),T=P(()=>({"data-indeterminate":s.indeterminate?"":void 0,"data-checked":s.checked&&!s.indeterminate?"":void 0,"data-disabled":s.disabled?"":void 0,"data-highlighted":v()?"":void 0})),F={isChecked:()=>s.checked,dataset:T,setLabelRef:u,generateId:Zt(()=>a.id),registerLabel:ze(i),registerDescription:ze(g)};return y(hi.Provider,{value:F,get children(){return y(ae,j({as:"div",ref($){const I=ke(K=>t=K,s.ref);typeof I=="function"&&I($)},get tabIndex(){return m.tabIndex()},get"aria-checked"(){return O()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return l()},get"aria-describedby"(){return c()},get"data-key"(){return m.dataKey()},get onPointerDown(){return he([s.onPointerDown,m.onPointerDown])},get onPointerUp(){return he([x,m.onPointerUp])},get onClick(){return he([s.onClick,m.onClick])},get onKeyDown(){return he([C,m.onKeyDown])},get onMouseDown(){return he([s.onMouseDown,m.onMouseDown])},get onFocus(){return he([s.onFocus,m.onFocus])},onPointerMove:b,onPointerLeave:w},T,a))}})}function yi(e){const t=Q({closeOnSelect:!1},e),[n,r]=X(t,["checked","defaultChecked","onChange","onSelect"]),o=wa({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:a=>{var l;return(l=n.onChange)==null?void 0:l.call(n,a)},isDisabled:()=>r.disabled});return y(cr,j({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{var a;(a=n.onSelect)==null||a.call(n),o.toggle()}},r))}var Cc=ye();function Sn(){return me(Cc)}var Yt={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Yt.next(e==="ltr"?"rtl":"ltr",t)},oo={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function mi(e){const t=Qe(),n=nt(),r=Sn(),{direction:o}=ft(),s=Q({id:t.generateId("trigger")},e),[a,l]=X(s,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let i=()=>t.value();r!==void 0&&(i=()=>t.value()??a.id,r.lastValue()===void 0&&r.setLastValue(i));const c=wn(()=>n.triggerRef(),()=>"button"),g=P(()=>{var m;return c()==="a"&&((m=n.triggerRef())==null?void 0:m.getAttribute("href"))!=null});B(Je(()=>r==null?void 0:r.value(),m=>{var b;g()&&m===i()&&((b=n.triggerRef())==null||b.focus())}));const h=()=>{r!==void 0?n.isOpen()?r.value()===i()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},u=m=>{se(m,a.onPointerDown),m.currentTarget.dataset.pointerType=m.pointerType,!a.disabled&&m.pointerType!=="touch"&&m.button===0&&h()},f=m=>{se(m,a.onClick),a.disabled||m.currentTarget.dataset.pointerType==="touch"&&h()},d=m=>{if(se(m,a.onKeyDown),!a.disabled){if(g())switch(m.key){case"Enter":case" ":return}switch(m.key){case"Enter":case" ":case oo.first(t.orientation()):m.stopPropagation(),m.preventDefault(),fa(m.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(i);break;case oo.last(t.orientation()):m.stopPropagation(),m.preventDefault(),n.open("last");break;case Yt.next(o(),t.orientation()):if(r===void 0)break;m.stopPropagation(),m.preventDefault(),r.nextMenu();break;case Yt.previous(o(),t.orientation()):if(r===void 0)break;m.stopPropagation(),m.preventDefault(),r.previousMenu();break}}},v=m=>{var b;se(m,a.onMouseOver),((b=n.triggerRef())==null?void 0:b.dataset.pointerType)!=="touch"&&!a.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(i)},p=m=>{se(m,a.onFocus),r!==void 0&&m.currentTarget.dataset.pointerType!=="touch"&&r.setValue(i)};return B(()=>U(n.registerTriggerId(a.id))),y(Jn,j({ref(m){const b=ke(n.setTriggerRef,a.ref);typeof b=="function"&&b(m)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return a.id},get disabled(){return a.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return P(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return i()!==void 0&&(r==null?void 0:r.value())===i()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===i()||r.lastValue()===i()?0:-1:void 0},onPointerDown:u,onMouseOver:v,onClick:f,onKeyDown:d,onFocus:p,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),l))}var $c=ye();function bi(){return me($c)}function pi(e){let t;const n=Qe(),r=nt(),o=Sn(),s=bi(),{direction:a}=ft(),l=Q({id:n.generateId(`content-${He()}`)},e),[i,c]=X(l,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let g=0;const h=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),u=lc({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);cc({trapFocus:()=>h()&&r.isOpen(),onMountAutoFocus:w=>{var x;o===void 0&&((x=i.onOpenAutoFocus)==null||x.call(i,w))},onUnmountAutoFocus:i.onCloseAutoFocus},()=>t);const f=w=>{if(Ke(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),o!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case Yt.next(a(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Yt.previous(a(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},d=w=>{var x;(x=i.onEscapeKeyDown)==null||x.call(i,w),o==null||o.setAutoFocusMenu(!1),r.close(!0)},v=w=>{var x;(x=i.onFocusOutside)==null||x.call(i,w),n.isModal()&&w.preventDefault()},p=w=>{var x,C;se(w,i.onPointerEnter),r.isOpen()&&((x=r.parentMenuContext())==null||x.listState().selectionManager().setFocused(!1),(C=r.parentMenuContext())==null||C.listState().selectionManager().setFocusedKey(void 0))},m=w=>{if(se(w,i.onPointerMove),w.pointerType!=="mouse")return;const x=w.target,C=g!==w.clientX;Ke(w.currentTarget,x)&&C&&(r.setPointerDir(w.clientX>g?"right":"left"),g=w.clientX)};B(()=>U(r.registerContentId(i.id)));const b={ref:ke(w=>{r.setContentRef(w),t=w},i.ref),role:"menu",get id(){return i.id},get tabIndex(){return u.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:he([i.onKeyDown,u.onKeyDown,f]),onMouseDown:he([i.onMouseDown,u.onMouseDown]),onFocusIn:he([i.onFocusIn,u.onFocusIn]),onFocusOut:he([i.onFocusOut,u.onFocusOut]),onPointerEnter:p,onPointerMove:m,get"data-orientation"(){return n.orientation()}};return y(z,{get when(){return r.contentPresent()},get children(){return y(z,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return y(ae,j({as:"div"},()=>r.dataset(),b,c))},get children(){return y(Zo.Positioner,{get children(){return y(ic,j({get disableOutsidePointerEvents(){return P(()=>!!h())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return bn({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},i.style)},onEscapeKeyDown:d,onFocusOutside:v,get onDismiss(){return r.close}},()=>r.dataset(),b,c))}})}})}})}function Sc(e){let t;const n=Qe(),r=nt(),[o,s]=X(e,["ref"]);return xc({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),y(pi,j({ref(a){const l=ke(i=>{t=i},o.ref);typeof l=="function"&&l(a)}},s))}var wi=ye();function kc(){const e=me(wi);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function ur(e){const t=Qe(),n=Q({id:t.generateId(`group-${He()}`)},e),[r,o]=R(),s={generateId:Zt(()=>n.id),registerLabelId:ze(o)};return y(wi.Provider,{value:s,get children(){return y(ae,j({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function xi(e){const t=kc(),n=Q({id:t.generateId("label")},e),[r,o]=X(n,["id"]);return B(()=>U(t.registerLabelId(r.id))),y(ae,j({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function Ci(e){const t=nt(),n=Q({children:"▼"},e);return y(ae,j({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function $i(e){return y(cr,j({role:"menuitem",closeOnSelect:!0},e))}function Si(e){const t=lr(),n=Q({id:t.generateId("description")},e),[r,o]=X(n,["id"]);return B(()=>U(t.registerDescription(r.id))),y(ae,j({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function ki(e){const t=lr(),n=Q({id:t.generateId("indicator")},e),[r,o]=X(n,["forceMount"]);return y(z,{get when(){return r.forceMount||t.isChecked()},get children(){return y(ae,j({as:"div"},()=>t.dataset(),o))}})}function Ei(e){const t=lr(),n=Q({id:t.generateId("label")},e),[r,o]=X(n,["ref","id"]);return B(()=>U(t.registerLabel(r.id))),y(ae,j({as:"div",ref(s){const a=ke(t.setLabelRef,r.ref);typeof a=="function"&&a(s)},get id(){return r.id}},()=>t.dataset(),o))}function Mi(e){const t=nt();return y(z,{get when(){return t.contentPresent()},get children(){return y(os,e)}})}var Ii=ye();function Ec(){const e=me(Ii);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Di(e){const n=Qe().generateId(`radiogroup-${He()}`),r=Q({id:n},e),[o,s]=X(r,["value","defaultValue","onChange","disabled"]),[a,l]=en({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>{var g;return(g=o.onChange)==null?void 0:g.call(o,c)}}),i={isDisabled:()=>o.disabled,isSelectedValue:c=>c===a(),setSelectedValue:l};return y(Ii.Provider,{value:i,get children(){return y(ur,s)}})}function Ai(e){const t=Ec(),n=Q({closeOnSelect:!1},e),[r,o]=X(n,["value","onSelect"]);return y(cr,j({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var a;(a=r.onSelect)==null||a.call(r),t.setSelectedValue(r.value)}},o))}function Mc(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),s=[],a=t.clientX,l=t.clientY;switch(r){case"top":s.push([a,l+5]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]);break;case"right":s.push([a-5,l]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]);break;case"bottom":s.push([a,l-5]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([o.left,o.top]);break;case"left":s.push([a+5,l]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]);break}return s}function Ic(e,t){return t?da([e.clientX,e.clientY],t):!1}function Ti(e){const t=Qe(),n=Ao(),r=gi(),o=Sn(),s=bi(),a=Q({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[l,i]=X(a,["open","defaultOpen","onOpenChange"]);let c=0,g=null,h="right";const[u,f]=R(),[d,v]=R(),[p,m]=R(),[b,w]=R(),[x,C]=R(!0),[O,T]=R(i.placement),[F,$]=R([]),[I,K]=R([]),{DomCollectionProvider:N}=Ia({items:I,onItemsChange:K}),ne=ei({open:()=>l.open,defaultOpen:()=>l.defaultOpen,onOpenChange:G=>{var Ee;return(Ee=l.onOpenChange)==null?void 0:Ee.call(l,G)}}),{present:Z}=Ro({show:()=>t.forceMount()||ne.isOpen(),element:()=>b()??null}),le=Ua({selectionMode:"none",dataSource:I}),_=G=>{C(G),ne.open()},W=(G=!1)=>{ne.close(),G&&r&&r.close(!0)},J=G=>{C(G),ne.toggle()},ce=()=>{const G=b();G&&(pe(G),le.selectionManager().setFocused(!0),le.selectionManager().setFocusedKey(void 0))},we=()=>{s!=null?setTimeout(()=>ce()):ce()},Le=G=>{$(Oe=>[...Oe,G]);const Ee=r==null?void 0:r.registerNestedMenu(G);return()=>{$(Oe=>Fn(Oe,G)),Ee==null||Ee()}},ve=G=>h===(g==null?void 0:g.side)&&Ic(G,g==null?void 0:g.area),Ie=G=>{ve(G)&&G.preventDefault()},M=G=>{ve(G)||we()},de=G=>{ve(G)&&G.preventDefault()};dc({isDisabled:()=>!(r==null&&ne.isOpen()&&t.isModal()),targets:()=>[b(),...F()].filter(Boolean)}),B(()=>{const G=b();if(!G||!r)return;const Ee=r.registerNestedMenu(G);U(()=>{Ee()})}),B(()=>{r===void 0&&(o==null||o.registerMenu(t.value(),[b(),...F()]))}),B(()=>{var G;r!==void 0||o===void 0||(o.value()===t.value()?((G=p())==null||G.focus(),o.autoFocusMenu()&&_(!0)):W())}),B(()=>{r!==void 0||o===void 0||ne.isOpen()&&o.setValue(t.value())}),U(()=>{r===void 0&&(o==null||o.unregisterMenu(t.value()))});const xt={dataset:P(()=>({"data-expanded":ne.isOpen()?"":void 0,"data-closed":ne.isOpen()?void 0:""})),isOpen:ne.isOpen,contentPresent:Z,nestedMenus:F,currentPlacement:O,pointerGraceTimeoutId:()=>c,autoFocus:x,listState:()=>le,parentMenuContext:()=>r,triggerRef:p,contentRef:b,triggerId:u,contentId:d,setTriggerRef:m,setContentRef:w,open:_,close:W,toggle:J,focusContent:we,onItemEnter:Ie,onItemLeave:M,onTriggerLeave:de,setPointerDir:G=>h=G,setPointerGraceTimeoutId:G=>c=G,setPointerGraceIntent:G=>g=G,registerNestedMenu:Le,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:ze(f),registerContentId:ze(v)};return y(N,{get children(){return y(fi.Provider,{value:xt,get children(){return y(z,{when:s===void 0,get fallback(){return i.children},get children(){return y(Zo,j({anchorRef:p,contentRef:b,onCurrentPlacementChange:T},i))}})}})}})}function Pi(e){const{direction:t}=ft();return y(Ti,j({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var Dc={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function Li(e){const t=nt(),n=Qe(),[r,o]=X(e,["onFocusOutside","onKeyDown"]),{direction:s}=ft();return y(pi,j({onOpenAutoFocus:g=>{g.preventDefault()},onCloseAutoFocus:g=>{g.preventDefault()},onFocusOutside:g=>{var u;(u=r.onFocusOutside)==null||u.call(r,g);const h=g.target;Ke(t.triggerRef(),h)||t.close()},onKeyDown:g=>{se(g,r.onKeyDown);const h=Ke(g.currentTarget,g.target),u=Dc.close(s(),n.orientation()).includes(g.key),f=t.parentMenuContext()!=null;h&&u&&f&&(t.close(),pe(t.triggerRef()))}},o))}var io=["Enter"," "],Ac={open:(e,t)=>e==="ltr"?[...io,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...io,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Oi(e){let t;const n=Qe(),r=nt(),o=Q({id:n.generateId(`sub-trigger-${He()}`)},e),[s,a]=X(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let l=null;const i=()=>{l&&window.clearTimeout(l),l=null},{direction:c}=ft(),g=()=>s.id,h=()=>{const w=r.parentMenuContext();if(w==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return w.listState().selectionManager()},u=()=>r.listState().collection(),f=()=>h().focusedKey()===g(),d=_o({key:g,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),v=w=>{se(w,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},p=w=>{var C;if(se(w,s.onPointerMove),w.pointerType!=="mouse")return;const x=r.parentMenuContext();if(x==null||x.onItemEnter(w),!w.defaultPrevented){if(s.disabled){x==null||x.onItemLeave(w);return}!r.isOpen()&&!l&&((C=r.parentMenuContext())==null||C.setPointerGraceIntent(null),l=window.setTimeout(()=>{r.open(!1),i()},100)),x==null||x.onItemEnter(w),w.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),pe(w.currentTarget),x==null||x.listState().selectionManager().setFocused(!0),x==null||x.listState().selectionManager().setFocusedKey(g()))}},m=w=>{if(se(w,s.onPointerLeave),w.pointerType!=="mouse")return;i();const x=r.parentMenuContext(),C=r.contentRef();if(C){x==null||x.setPointerGraceIntent({area:Mc(r.currentPlacement(),w,C),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(x==null?void 0:x.pointerGraceTimeoutId());const O=window.setTimeout(()=>{x==null||x.setPointerGraceIntent(null)},300);x==null||x.setPointerGraceTimeoutId(O)}else{if(x==null||x.onTriggerLeave(w),w.defaultPrevented)return;x==null||x.setPointerGraceIntent(null)}x==null||x.onItemLeave(w)},b=w=>{se(w,s.onKeyDown),!w.repeat&&(s.disabled||Ac.open(c(),n.orientation()).includes(w.key)&&(w.stopPropagation(),w.preventDefault(),h().setFocused(!1),h().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(u().getFirstKey())))};return B(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const w=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:g(),textValue:s.textValue??(t==null?void 0:t.textContent)??"",disabled:s.disabled??!1});U(w)}),B(Je(()=>{var w;return(w=r.parentMenuContext())==null?void 0:w.pointerGraceTimeoutId()},w=>{U(()=>{var x;window.clearTimeout(w),(x=r.parentMenuContext())==null||x.setPointerGraceIntent(null)})})),B(()=>U(r.registerTriggerId(s.id))),U(()=>{i()}),y(ae,j({as:"div",ref(w){const x=ke(C=>{r.setTriggerRef(C),t=C},s.ref);typeof x=="function"&&x(w)},get id(){return s.id},role:"menuitem",get tabIndex(){return d.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return P(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return d.dataKey()},get"data-highlighted"(){return f()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return he([s.onPointerDown,d.onPointerDown])},get onPointerUp(){return he([s.onPointerUp,d.onPointerUp])},get onClick(){return he([v,d.onClick])},get onKeyDown(){return he([b,d.onKeyDown])},get onMouseDown(){return he([s.onMouseDown,d.onMouseDown])},get onFocus(){return he([s.onFocus,d.onFocus])},onPointerMove:p,onPointerLeave:m},()=>r.dataset(),a))}function Tc(e){const t=Sn(),n=`menu-${He()}`,r=Q({id:n,modal:!0},e),[o,s]=X(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),a=ei({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:i=>{var c;return(c=o.onOpenChange)==null?void 0:c.call(o,i)}}),l={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??l.isModal(),forceMount:()=>o.forceMount??!1,generateId:Zt(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??(t==null?void 0:t.orientation())??"horizontal"};return y(vi.Provider,{value:l,get children(){return y(Ti,j({get open(){return a.isOpen()},get onOpenChange(){return a.setIsOpen}},s))}})}var Pc={};xn(Pc,{Root:()=>kn,Separator:()=>Lc});function kn(e){let t;const n=Q({orientation:"horizontal"},e),[r,o]=X(n,["ref","orientation"]),s=wn(()=>t,()=>"hr");return y(ae,j({as:"hr",ref(a){const l=ke(i=>t=i,r.ref);typeof l=="function"&&l(a)},get role(){return s()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var Lc=kn,fe={};xn(fe,{Arrow:()=>ar,CheckboxItem:()=>yi,Content:()=>qi,DropdownMenu:()=>Oc,Group:()=>ur,GroupLabel:()=>xi,Icon:()=>Ci,Item:()=>$i,ItemDescription:()=>Si,ItemIndicator:()=>ki,ItemLabel:()=>Ei,Portal:()=>Mi,RadioGroup:()=>Di,RadioItem:()=>Ai,Root:()=>Fi,Separator:()=>kn,Sub:()=>Pi,SubContent:()=>Li,SubTrigger:()=>Oi,Trigger:()=>mi});function qi(e){const t=Qe(),n=nt(),[r,o]=X(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return y(Sc,j({onCloseAutoFocus:i=>{var c;(c=r.onCloseAutoFocus)==null||c.call(r,i),s||pe(n.triggerRef()),s=!1,i.preventDefault()},onInteractOutside:i=>{var c;(c=r.onInteractOutside)==null||c.call(r,i),(!t.isModal()||i.detail.isContextMenu)&&(s=!0)}},o))}function Fi(e){const t=`dropdownmenu-${He()}`,n=Q({id:t},e);return y(Tc,n)}var Oc=Object.assign(Fi,{Arrow:ar,CheckboxItem:yi,Content:qi,Group:ur,GroupLabel:xi,Icon:Ci,Item:$i,ItemDescription:Si,ItemIndicator:ki,ItemLabel:Ei,Portal:Mi,RadioGroup:Di,RadioItem:Ai,Separator:kn,Sub:Pi,SubContent:Li,SubTrigger:Oi,Trigger:mi}),S={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",80:"cc"},font:{size:{xs:"calc(var(--tsqd-font-size) * 0.75)",sm:"calc(var(--tsqd-font-size) * 0.875)",md:"var(--tsqd-font-size)"},lineHeight:{xs:"calc(var(--tsqd-font-size) * 1)",sm:"calc(var(--tsqd-font-size) * 1.25)",md:"calc(var(--tsqd-font-size) * 1.5)"},weight:{medium:"500",semibold:"600",bold:"700"}},border:{radius:{xs:"calc(var(--tsqd-font-size) * 0.125)",sm:"calc(var(--tsqd-font-size) * 0.25)",full:"9999px"}},size:{.25:"calc(var(--tsqd-font-size) * 0.0625)",.5:"calc(var(--tsqd-font-size) * 0.125)",1:"calc(var(--tsqd-font-size) * 0.25)",1.5:"calc(var(--tsqd-font-size) * 0.375)",2:"calc(var(--tsqd-font-size) * 0.5)",2.5:"calc(var(--tsqd-font-size) * 0.625)",3:"calc(var(--tsqd-font-size) * 0.75)",3.5:"calc(var(--tsqd-font-size) * 0.875)",4:"calc(var(--tsqd-font-size) * 1)",4.5:"calc(var(--tsqd-font-size) * 1.125)",5:"calc(var(--tsqd-font-size) * 1.25)",6:"calc(var(--tsqd-font-size) * 1.5)",6.5:"calc(var(--tsqd-font-size) * 1.625)",14:"calc(var(--tsqd-font-size) * 3.5)"},shadow:{xs:(e="rgb(0 0 0 / 0.1)")=>"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:(e="rgb(0 0 0 / 0.1)")=>`0 1px 3px 0 ${e}, 0 1px 2px -1px ${e}`,md:(e="rgb(0 0 0 / 0.1)")=>`0 4px 6px -1px ${e}, 0 2px 4px -2px ${e}`,lg:(e="rgb(0 0 0 / 0.1)")=>`0 10px 15px -3px ${e}, 0 4px 6px -4px ${e}`,xl:(e="rgb(0 0 0 / 0.1)")=>`0 20px 25px -5px ${e}, 0 8px 10px -6px ${e}`,"2xl":(e="rgb(0 0 0 / 0.25)")=>`0 25px 50px -12px ${e}`,inner:(e="rgb(0 0 0 / 0.05)")=>`inset 0 2px 4px 0 ${e}`,none:()=>"none"}},qc=q('<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),Fc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),_c=q('<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),Rc=q('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),dr=q('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),Kc=q('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),zc=q('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Bc=q('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Nc=q('<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">'),Vc=q('<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">'),Hc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Gc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Uc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>'),jc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),_i=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Wc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke=#F04438 stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Qc=q('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 xmlns=http://www.w3.org/2000/svg><rect class=list width=20 height=20 y=2 x=2 rx=2></rect><line class=list-item y1=7 y2=7 x1=6 x2=18></line><line class=list-item y2=12 y1=12 x1=6 x2=18></line><line class=list-item y1=17 y2=17 x1=6 x2=18>'),Yc=q('<svg viewBox="0 0 24 24"height=20 width=20 fill=none xmlns=http://www.w3.org/2000/svg><path d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Xc=q('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Zc=q('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><animateTransform attributeName=transform attributeType=XML type=rotate from=0 to=360 dur=2s repeatCount=indefinite>'),Jc=q('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),eu=q('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>');function tu(){return qc()}function Ri(){return Fc()}function cn(){return _c()}function so(){return Rc()}function ao(){return dr()}function nu(){return(()=>{var e=dr();return e.style.setProperty("transform","rotate(90deg)"),e})()}function ru(){return(()=>{var e=dr();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function ou(){return Kc()}function iu(){return zc()}function su(){return Bc()}function au(){return Nc()}function lu(){return Vc()}function cu(){return Hc()}function uu(){return Gc()}function du(){return Uc()}function fu(){return jc()}function gu(e){return(()=>{var t=_i(),n=t.firstChild;return H(()=>$e(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function hu(){return Wc()}function vu(){return Qc()}function yu(e){return[y(z,{get when(){return e.checked},get children(){var t=_i(),n=t.firstChild;return H(()=>$e(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),y(z,{get when(){return!e.checked},get children(){var t=Yc(),n=t.firstChild;return H(()=>$e(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function mu(){return Xc()}function bu(){return Zc()}function pu(){return Jc()}function wu(){return eu()}var xu=q('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Cu=q('<button title="Copy object to clipboard">'),$u=q('<button title="Remove all items"aria-label="Remove all items">'),Su=q('<button title="Delete item"aria-label="Delete item">'),ku=q('<button title="Toggle value"aria-label="Toggle value">'),Eu=q('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),Nt=q("<div>"),Mu=q("<div><button> <span></span> <span> "),Iu=q("<input>"),lo=q("<span>"),Du=q("<div><span>:"),Au=q("<div><div><button> [<!>...<!>]");function Tu(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var co=e=>{const t=Se(),n=V().shadowDOMTarget?Y.bind({target:V().shadowDOMTarget}):Y,r=P(()=>t()==="dark"?Lt(n):Pt(n));return(()=>{var o=xu();return H(()=>D(o,L(r().expander,n`
2
2
  transform: rotate(${e.expanded?90:0}deg);
3
3
  `,e.expanded&&n`
4
4
  & svg {